# "Error rate" block with USRP

**URL:** <https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490>\
**Category:** GNU Radio\
**Created:** [April 16, 2014, 4:32pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490 "2014-04-16T16:32:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 16, 2014, 4:32pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/1 "2014-04-16T16:32:16Z")

</div>

Hi All,

I am working with GNU Radio Companion 3.6 on CentOS. I want to calculate  
the  
BER, so I have been using the “Error rate” block.  
First, I send a random QPSK-modulated signal through a simulated noisy  
channel (AWGN). I calculate the BER using the function error:  
BER=0.5\*erfc(sqrt(snr)) and compare it to the output of the “Error rate”  
block. I find almost same results.  
Second, I send a random QPSK-modulated signal through one USRP and  
receive  
it with another USRP. Here is the problem: contrary to expections, the  
output of “Error rate” block is always 0.5, and it does not vary with  
the  
variation of SNR.  
You find attached the flowgraph of this second scenario.  
[http://gnuradio.4.n7.nabble.com/file/n47625/gnu-ber.png](http://gnuradio.4.n7.nabble.com/file/n47625/gnu-ber.png)  
I am wondering if this block should not be used with USRPs to calculate  
the  
BER. If not, any suggestions?  
Any help is appreciated. Thank you.

Regards,  
Azza

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625.html](http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 4:45pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/2 "2014-04-16T16:45:16Z")

</div>

On Wed, Apr 16, 2014 at 10:31 AM, Azza [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> it with another USRP. Here is the problem: contrary to expections, the

Azza,

First, you should take out the throttle. With the USRPs in the loop,  
you’re  
going to have conflicts with the rates that will cause problems.

Second, at the very least, you need to synchronize everything through  
the  
hardware. The constellation decoder doesn’t do any timing, phase, or  
frequency synchronization. You’ll also need an AGC block to scale the  
received samples before anything else.

Tom

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 4:58pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/3 "2014-04-16T16:58:51Z")

</div>

Thank you.  
I have taken out the throttle block and add an AGC block at the  
receiver.  
To proceed with the synchronization, should I use a Constellation  
Receiver  
block or a Polyphase Clock Sync block ?

Kind regards,  
Azza

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47627.html](http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47627.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 5:06pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/4 "2014-04-16T17:06:32Z")

</div>

On Wed, Apr 16, 2014 at 10:57 AM, Azza [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Thank you.  
> I have taken out the throttle block and add an AGC block at the receiver.  
> To proceed with the synchronization, should I use a Constellation Receiver  
> block or a Polyphase Clock Sync block ?
> 
> Kind regards,  
> Azza

You’ll actually need both. AGC → clock sync → constellation receiver  
(phase/freq recovery and decoding).

Also, please reply in-line with the rest of the message. By cutting off  
the  
other part of our conversation makes it difficult for others to follow  
the  
thread.

Tom

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 8:08pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/5 "2014-04-16T20:08:14Z")

</div>

Tom R.-2 wrote

> On Wed, Apr 16, 2014 at 10:57 AM, Azza \<

> azza.ben.mosbah@

> > 
> 
> Tom
> 
> * * *
> 
> Discuss-gnuradio mailing list

> Discuss-gnuradio@

> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

Thank you.  
I have added modifications to my flowgraph:  
[http://gnuradio.4.n7.nabble.com/file/n47630/gnu-ber-modified.png](http://gnuradio.4.n7.nabble.com/file/n47630/gnu-ber-modified.png)  
But, I am still confused about minimum/maximum frequency deviation in  
the  
Constellation Receiver block. How should it be set?

Regards,  
Azza

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47630.html](http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47630.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 8:56pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/6 "2014-04-16T20:56:02Z")

</div>

On Wed, Apr 16, 2014 at 2:06 PM, Azza [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > To proceed with the synchronization, should I use a Constellation
> 
> [http://gnuradio.4.n7.nabble.com/file/n47630/gnu-ber-modified.png](http://gnuradio.4.n7.nabble.com/file/n47630/gnu-ber-modified.png)  
> But, I am still confused about minimum/maximum frequency deviation in the  
> Constellation Receiver block. How should it be set?
> 
> Regards,  
> Azza

Those are settings to keep the frequency sync from walking away, in  
normalized frequency. +1 and -1 should work fine.

Tom

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 9:39pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/7 "2014-04-16T21:39:09Z")

</div>

Tom R.-2 wrote

> On Wed, Apr 16, 2014 at 2:06 PM, Azza \<

> azza.ben.mosbah@

> > > > I have taken out the throttle block and add an AGC block at the  
> > > > You’ll actually need both. AGC → clock sync → constellation receiver  
> > > > Thank you.  
> > > > normalized frequency. +1 and -1 should work fine.  
> > > > Azza
> 
> * * *
> 
> Discuss-gnuradio mailing list

> Discuss-gnuradio@

> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47632.html](http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47632.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 16, 2014, 9:40pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/8 "2014-04-16T21:40:20Z")

</div>

Tom R.-2 wrote

> On Wed, Apr 16, 2014 at 2:06 PM, Azza \<

> azza.ben.mosbah@

> > > > I have taken out the throttle block and add an AGC block at the  
> > > > You’ll actually need both. AGC → clock sync → constellation receiver  
> > > > Thank you.  
> > > > normalized frequency. +1 and -1 should work fine.
> 
> Tom
> 
> * * *
> 
> Discuss-gnuradio mailing list

> Discuss-gnuradio@

> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

Tom,

I still found BER=0.5, however the error output of the Constellation  
Receiver block gives 0.

Regards,  
Azza

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47634.html](http://gnuradio.4.n7.nabble.com/Error-rate-block-with-USRP-tp47625p47634.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 17, 2014, 5:10pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/9 "2014-04-17T17:10:17Z")

</div>

On Wed, Apr 16, 2014 at 3:38 PM, Azza [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > azza.ben.mosbah@
> > > > 
> > > > > Kind regards,  
> > > > > other part of our conversation makes it difficult for others to follow  
> > > > > the
> 
> I still found BER=0.5, however the error output of the Constellation  
> Receiver block gives 0.
> 
> Regards,  
> Azza

Azza,

Maybe take a step back from trying to calculate the BER. Make sure you  
have  
a transmitting system and receiver system that are working correctly. At  
the receiver, the first thing to do is make sure you’re getting a proper  
constellation. If so, you should be able to extract the bits to compare  
them. And by this, I mean make two flowgraphs for the tx and rx sides so  
you’re not confusing yourself by trying to tie everything together.

Also, make sure you are either using differential modulation encoding to  
correct for unknown phase offsets or that you are somehow correcting for  
this possibility. Then, you need to make sure you’re getting your frames  
through. There will be a delay between what you transmit over the air  
and  
when you receive it. You’ll have to account for this, too.

Tom

---

<div class="post-metadata">

**Author:** ![Azza](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@Azza](https://www.ruby-forum.com/u/Azza)\
**Post date:** [April 24, 2014, 8:34am UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/10 "2014-04-24T08:34:25Z")

</div>

Dear TOM,  
Is it needed to use AGC/Clock Sync/Constellation Receiver blocks for  
every receiver section. For my flow graph I am using phase lock loop,  
frequency locked loop blocks instead of those?. Then, may I use all  
these blocks in the receiver section?

---

<div class="post-metadata">

**Author:** ![sarehivari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ce7236/32.png) [@sarehivari](https://www.ruby-forum.com/u/sarehivari)\
**Post date:** [June 15, 2021, 2:55pm UTC](https://www.ruby-forum.com/t/error-rate-block-with-usrp/240490/11 "2021-06-15T14:55:50Z")

</div>

Hi,

I have some kind of the same problem. I want to calculate the BER using the ERROR rate block. I am there are AGC+polyphase clock sync+Costas loop+LMS DD equalizer+ Constelation demodulator.

I get the bit error rate of 0.5. I do not know what is the problem?

Thanks
