# BER over air

**URL:** <https://www.ruby-forum.com/t/ber-over-air/233575>\
**Category:** GNU Radio\
**Created:** [December 25, 2014, 11:07am UTC](https://www.ruby-forum.com/t/ber-over-air/233575 "2014-12-25T11:07:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [December 25, 2014, 11:07am UTC](https://www.ruby-forum.com/t/ber-over-air/233575/1 "2014-12-25T11:07:18Z")

</div>

Hello all,

BER (Bit Error Rate) measurement isn’t a cumbersome task which is  
realizable for each system with transmitting a known sequence of bits  
and  
take them @ a receiver which translates BER measurement into a simple  
comparison.

I have a question regarding how it’s possible to measure SNR @ an Rx  
with a  
USRP? In fact to obtain a graph of BER vs SNR I need to measure SNR !

I didn’t find anything specific to this question. However, I’ve heard  
it’s  
possible to estimate an initial SNR in Rx by accounting noise figure of  
the  
USRP, then by changing the transmitter’s power, different SNRs can be  
seen  
at Rx.

Any idea please!?

Best,  
Mostafa

–

* * *

Department of Electrical Engineering  
Aboureyhan Building  
MMWCL LAB  
Amirkabir University Of Technology  
Tehran  
IRAN  
Tel: +98 (919) 158-7730  
LAB: [http://ele.aut.ac.ir/~mmwcl/?page\_id=411](http://ele.aut.ac.ir/~mmwcl/?page_id=411)  
Homepage: [http://ele.aut.ac.ir/~alizadeh/](http://ele.aut.ac.ir/~alizadeh/)

* * *

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 26, 2014, 9:32pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/2 "2014-12-26T21:32:40Z")

</div>

On 12/25/2014 11:06 AM, Mostafa A. wrote:

> I have a question regarding how it’s possible to measure SNR @ an Rx  
> with a USRP? In fact to obtain a graph of BER vs SNR I need to measure  
> SNR !
> 
> I didn’t find anything specific to this question. However, I’ve heard  
> it’s possible to estimate an initial SNR in Rx by accounting noise  
> figure of the USRP, then by changing the transmitter’s power, different  
> SNRs can be seen at Rx.
> 
> Any idea please!?

Measuring exact SNR is a difficult science. What you can do quite easily  
is to use the SNR estimator blocks. However, for accurate BER/SNR  
curves, there’s a catch-22 here because you’re using the same noise to  
estimate noise power that’s affecting the signal (and hence, BER). So,  
if you’re writing a paper, don’t forget to mention and explain this.

Also, when you say SNR, what _exactly_ do you want? Is it Eb/N0?

If you want to figure out SNR by analog measurements (i.e. by measuring  
the exact rx power and estimating the exact noise figure), that’s a lot  
of work. And your calibrations will be off if you open the window and  
the temperature drops (depending on how accurate you need these values).

Also, when doing real measurements, you’re including lots of other  
effects (multipath, phase noise, quantization noise, frequency offset,  
timing offset… most of these can be modeled as an additional noise  
figure if they’re static, but with some limited accuracy). Is that  
really what you want?

If multipath is negligible you might be able to transmit a very long  
known BPSK sequence and use the analytical functions for BER in AWGN to  
estimate Eb/N0 (measure BER and solve for the Eb/N0). I’d need to have  
another look at the math for our SNR estimators, but they probably do  
something similar. This only works for _perfect time and frequency  
synchronisation_!

M

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 3:55pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/3 "2014-12-28T15:55:26Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 6:10pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/4 "2014-12-28T18:10:54Z")

</div>

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 5:43pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/5 "2014-12-28T17:43:04Z")

</div>

Hi Mostafa,

On 12/28/2014 03:54 PM, Mostafa A. wrote:

> Hi Martin,
> 
> Thank you for response. I don’t want Eb/N0, because there is not bit  
> stream but complex symbols.  
> A symbol represents information you want to transmit. The unit for  
> information is bit.

> said it depends on both receiver hardware parameters (such as phase
> 
> changing just the Tx power.
> 
> I’m not sure whether this approach is accurate as we need or not! Is  
> it true? I want to know your recommendations.  
> Assuming you’re noise is a) purely additive, b) your channel is  
> absolutely flat, and so is your noise (white), c) everything is linear  
> (memoryless channel) and c) you’re able to reliably measure the power of  
> a infinitely narrow peak (which implies you can produce a infinitely  
> narrow peak), this applies. As you can see in your picture, the peak is  
> _not_ infinitely narrow (obviously, the FFT has limited length, so  
> frequency resolution can’t be arbitrarily fine).  
> It’s but a basic estimate. Giving you the rx power for a specific  
> frequency and estimating noise power by averaging for a limited amount  
> of time, you get something that, depending on how your system behaves,  
> might or might not represent actual SNR well.

I have to stress this: SNR is _signal_ to noise ratio. Signal is what  
your application defines to be signal!

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 6:32pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/6 "2014-12-28T18:32:34Z")

</div>

Hello Mostafa,

I’ve forgot to add that  
"

> All nonlinear and time variant effects isn’t just due to the channel  
> but the RF hardware.  
> "  
> is usually not true – again, SNR is signal to noise, and maybe your  
> signal undergoes correction, and I don’t know if that is going to be  
> memoryless.  
> Far more importantly, real radio channels _are not_ flat. They are  
> frequency-selective, and they are time-variant. In many (easier) cases,  
> you can consider the channel to be flat for your very limited bandwidth,  
> and you can consider it’s properties (or at least the statistical  
> properties of these properties) to be stationary – but if you’re  
> serious about channel characteristics, you can’t just say “my channel is  
> flat and time-invariant”, without really saying why you can make these  
> simplifications.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 7:07pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/7 "2014-12-28T19:07:49Z")

</div>

On 28/12/14 16:41, Marcus M. wrote:

> I have to stress this: SNR is _signal_ to noise ratio. Signal is what your  
> application defines to be signal!

_THIS_

The Signal is what you want to hear. Whether that be a nice square wave  
from MSF, DCF, WWV, or where ever at a nice 1bps, or 802.11 PSK, or  
1200 baud AFSK, or whatever, _everything else_ is noise.

That noise _will_ be coming from the earth, the sun, the universe,  
pickup from your downlink cable, any mast head preamps or anything else  
that happens to be around.

It will also include your next door neighbour doing experiments not  
far from your chosen frequency, or anyone else local using an adjacent  
channel.

Even if there is an intended signal, it can still be noise.  
Take for example, a “ham” station working a remote station quite  
nicely.

Then 2.5kHz away, some other local ham station keys up with 1500W. No  
longer can the remote station be heard, due to the noise floor rising.

It’s nothing to do with the receiving station becoming less sensitive,  
or the transmitting station dropping power, but simply that the  
receiving station’s noise floor has risen, thus his SNR has dropped  
significantly (more likely massively)

The fact that the 1500 Watt station was working a station the other  
side of the globe _does not matter_ to the original station’s ability  
to receive the station he was working.

A further example. TDF is an AM station that transmits a time signal  
(like MSF, DCF, WWV). But due to this being an AM station they can’t  
modulated the AM carrier, so they twiddle its phase.

In trying to decode (And yes, for those following my posts over the  
months and years I’ve now managed it!) the time data, all the AM  
modulation, music, and speech is all noise. I have to filter it  
out.

73s

Iain

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 8:06pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/8 "2014-12-28T20:06:34Z")

</div>

Yeah,  
If we have include the chanel the received symbol is:  
y(t) = h(t) \* x(t) + n(t).  
So h can vary with time and isn’t flat. In SNR we would know h. For  
simplicity I ignored it by setting h = 1 which is not acurrate.

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 6:22pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/9 "2014-12-28T18:22:03Z")

</div>

Hi Mostafa,

On 12/28/2014 06:09 PM, Mostafa A. wrote:

> _Is there any way (like sending and receiving a simple sine wave) to  
> extract this model?_

- 

That would be channel sounding.

Greetings,  
Marcus\*

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 8:09pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/10 "2014-12-28T20:09:39Z")

</div>

I suddenly found a book which discussed SNR estimation which is also  
assumed the AWGN channel [1, chap. 6, p. 121]. This book also considers  
carrier phase and frequency uncertainties and developed a kind of  
compensation for them.

Again I think we need to remove fading channel before SNR estimation. Is  
it  
true?

Best,  
Mostafa

[1] Jon Hamkins; Marvin Kenneth Simon,“Autonomous software-defined radio  
receivers for deep space applications”,Wiley-Interscience, 2006.

On Sun, Dec 28, 2014 at 9:01 PM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Far more importantly, real radio channels _are not_ flat. They are

–

* * *

Department of Electrical Engineering  
Aboureyhan Building  
MMWCL LAB  
Amirkabir University Of Technology  
Tehran  
IRAN  
Tel: +98 (919) 158-7730  
LAB: [http://ele.aut.ac.ir/~mmwcl/?page\_id=411](http://ele.aut.ac.ir/~mmwcl/?page_id=411)  
Homepage: [http://ele.aut.ac.ir/~alizadeh/](http://ele.aut.ac.ir/~alizadeh/)

* * *

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 28, 2014, 8:25pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/11 "2014-12-28T20:25:07Z")

</div>

On 28/12/14 19:08, Mostafa A. wrote:

> Again I think we need to remove fading channel before SNR estimation. Is it  
> true?

To answer this specific point (and Marcus is far more better versed than  
I in this science):

More fading equals less signal, more noise at particular times, thus  
worse Signal to Noise Ratio.

If you need to be able to pass data during any fading, then you need  
to take it into account (often this is done with FEC or PM schemes etc)

SNR is only “true” for a moment in time. The next moment, both signal  
and noise may change.

Best Regards

Iain

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 29, 2014, 12:56pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/12 "2014-12-29T12:56:29Z")

</div>

I finally got to this point that if one need to measure SNR, it means  
that  
he/she has to eliminate all the other channel effects as well as  
receiver  
uncertainties, (like fading, shadowing, Doppler shift, carrier frequency  
and phase offsets etc.) to have a correct estimate of SNR. Otherwise,  
he/she coudln’t obtain signal-to-noise power ratio.

Remember the received signal formulation I mentioned before:  
y(t) = h(t) \* x(t) + n(t).

Thank you all. Any interesting ideas would be appreciated.

Best,  
Mostafa

On Sun, Dec 28, 2014 at 10:53 PM, Iain Young, G7III [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> More fading equals less signal, more noise at particular times, thus worse
> 
> Iain
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–

* * *

Department of Electrical Engineering  
Aboureyhan Building  
MMWCL LAB  
Amirkabir University Of Technology  
Tehran  
IRAN  
Tel: +98 (919) 158-7730  
LAB: [http://ele.aut.ac.ir/~mmwcl/?page\_id=411](http://ele.aut.ac.ir/~mmwcl/?page_id=411)  
Homepage: [http://ele.aut.ac.ir/~alizadeh/](http://ele.aut.ac.ir/~alizadeh/)

* * *

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 29, 2014, 1:13pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/13 "2014-12-29T13:13:13Z")

</div>

Hello Mostafa,  
On 12/29/2014 12:55 PM, Mostafa A. wrote:

> I finally got to this point that if one need to measure SNR, it means  
> that he/she has to eliminate all the other channel effects as well as  
> receiver uncertainties, (like fading, shadowing, Doppler shift,  
> carrier frequency and phase offsets etc.) to have a correct estimate  
> of SNR.  
> SNR is relative to signal. Signal is what you define it to be. You can  
> say “I measure my SNR after equalizing and perfect synchronization”, you  
> could also say “the power of the signal coming out of the receiver  
> amplifier relative to the noise generated in that amplifier, before any  
> filtering”. It’s all up to your definition. I will never cease to repeat  
> that.

There is no physical entity SNR to measure. When you say “SNR is XY dB”,  
it is utterly meaningless unless you define what your signal is and  
where in your signal processing chain you determine the SNR.

> Otherwise, he/she coudln’t obtain signal-to-noise power ratio.
> 
> Remember the received signal formulation I mentioned before:  
> y(t) = h(t) \* x(t) + n(t).
> 
> Thank you all. Any interesting ideas would be appreciated.  
> … you’re still asking for easy ideas how to solve your problem which  
> is complicated. You will have to accept the fact that SNR is not a  
> universal measure with a “right” way to measure for any kind of signal,  
> any kind of channel, any kind of system.

Marcus

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 29, 2014, 1:59pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/14 "2014-12-29T13:59:41Z")

</div>

Hi Marcus,

I completely agree to the statement. But take a look at this simple  
model:

y(t) = h(t) \* x(t) + n(t).

‘y’ is the received signal, ‘h’ is the channel response (here I assumed  
that the channel is linear as a filter), ‘x’ is the \*desired _signal and  
‘n’ is noise and the sign '_’ is the convolution. Hence, if we try to  
find  
signal (x) power to noise (n), it implies that the ‘h’ is somehow  
estimated. _Again, consider that noise and channel are different both  
statistically and in nature._

take look at the "Tom R."s website:

> **[SNR Estimators — Rondeau Research](http://www.trondeau.com/blog/2011/12/30/snr-estimators.html)**
>
> In GNU Radio, we have been slowly evolving our digital communications capabilities. One thing that becomes quickly and painfully obvious to anyone doing real over-the-air communications with digital modulations is that the modulators and demodulators...

He said:

" In the case of an SNR estimator, though, I thought about this and had  
to  
come to the conclusion that the only way to handle this is to have an  
estimator that you can plug in variables for your channel model, which  
of  
course assumes that you have or can estimate these parameters."

So we need acquire ‘h’.

Best,  
Mostafa

On Mon, Dec 29, 2014 at 3:42 PM, Marcus M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> also say "the power of the signal coming out of the receiver amplifier  
> y(t) = h(t) \* x(t) + n(t).
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–

* * *

Department of Electrical Engineering  
Aboureyhan Building  
MMWCL LAB  
Amirkabir University Of Technology  
Tehran  
IRAN  
Tel: +98 (919) 158-7730  
LAB: [http://ele.aut.ac.ir/~mmwcl/?page\_id=411](http://ele.aut.ac.ir/~mmwcl/?page_id=411)  
Homepage: [http://ele.aut.ac.ir/~alizadeh/](http://ele.aut.ac.ir/~alizadeh/)

* * *

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 29, 2014, 5:13pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/15 "2014-12-29T17:13:39Z")

</div>

Marcus you’re right. This question is somehow out of GNURadio  
discussion.  
However, I’ve found something about different perspectives of SNR  
calculation at a receiver.

Thank you for participating in this discussion. If I find enough time, I  
will try to generate a code for SNR calculation regardless of type of  
modulation used and I will share it.

Best,  
Mostafa

---

<div class="post-metadata">

**Author:** ![mostafa\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@mostafa\_a](https://www.ruby-forum.com/u/mostafa_a)\
**Post date:** [December 29, 2014, 2:24pm UTC](https://www.ruby-forum.com/t/ber-over-air/233575/16 "2014-12-29T14:24:32Z")

</div>

Hi Mostafa,

On 12/29/2014 01:58 PM, Mostafa A. wrote:

> I completely agree to the statement. But take a look at this simple  
> model:
> 
> y(t) = h(t) \* x(t) + n(t).  
> it’s totally ok to use that model, but only if your application  
> indicates that this is the right model to use. By the way, _all_  
> components in your equation have time dependency (t), so this alone  
> doesn’t justify assuming time-invariance.  
> Estimation h is called gaining channel state information, to give you  
> some hints on what to look for in literature.
> 
> ‘y’ is the received signal, ‘h’ is the channel response (here I  
> assumed that the channel is linear as a filter), ‘x’ is the  
> \*desired _signal and ‘n’ is noise and the sign '_’ is the convolution.  
> Hence, if we try to find signal (x) power to noise (n), it implies  
> that the ‘h’ is somehow estimated.  
> convolution with the channel is exactly identical to “applying a  
> filter”. This implies your channel is not flat.

> _Again, consider that noise and channel are different both  
> statistically and in nature._  
> If I understand you correctly, then you state exactly what I’m saying:  
> everything you calculate is but an estimate, and the things you can say  
> about SNR are thus only estimates. Whether or not that estimate is a  
> good representation for the reality depends on the way you estimate, and  
> how well your assumptions match reality. This demands a high level of  
> understanding for the underlying concepts!
> 
> He said:
> 
> " In the case of an SNR estimator, though, I thought about this and  
> had to come to the conclusion that the only way to handle this is to  
> have an estimator that you can plug in variables for your channel  
> model, which of course assumes that you have or can estimate these  
> parameters."
> 
> So we need acquire ‘h’.  
> There’s two key words in this paragraph: 1. “channel model” and 2.  
> “acquire”.

1. “channel model”: this implies you model the channel, ie. you make  
justified assumptions on what the channel is. in the y(t) =  
h(t)\*x(t)+n(t), it’s implied the channel is linear and might have a time  
dependence.
2. acquiring channel state information usually is done by transmitting  
something that you already know (e.g. a preamble) or using redundancy  
(ie. coding); if you’re being honest, you would have to say “ok, now  
that I have information about h, I can actually transmit data, but since  
it took energy and time to get that information, I must account for this  
effort (==energy) when considering the effort I have sending the data  
(==bit energy)”. That’s a strong argument for not using SNR but E\_b/N.

All in all, I think I should stop participating in this thread, since I  
feel that I’m repeating myself. I’d very very humble suggest that you  
take a few days with the appropriate theoretical literature on digital  
communications [1], as you seem to be about to write something with a  
very strong theoretical aspect. None of these mails related in any kind  
to GNU Radio or even SDR, just basic digital communication theory.

Best regards, and all the best,

Marcus

[1]  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/SuggestedReading#Digital-Comms](http://gnuradio.org/redmine/projects/gnuradio/wiki/SuggestedReading#Digital-Comms)
