How to calculate SNR?

Hi All,

In order to calculate the SNR at the receiver, I have generated a QPSK
signal, sent it with an USRP through a canal and then received it with
another USRP.
So, I have used The “MPSK SNR Estimator” block at the receiver to
monitor
the SNR values. But values are not correct, I have tried “MPSK SNR
Estimator Probe” block, but values still not correct.

I am wondering what is the proper way to use “MPSK SNR Estimator” block?
or
if there is another block or method to retrieve SNR values correctly? So
that I can find correct results.
Any help is appreciated. Thank you.

Best regards,
Azza

On 03/25/2014 05:00 PM, Azza Ben Mosbah wrote:

Any help is appreciated. Thank you.
Estimating SNR is a bit of a science. How do you know your SNR values
are incorrect?
In general, our SNR estimators have been tested a lot and should work.
Post your rx flow graph and your results, that way we can tell what
you’ve been doing.

M

Hi azza and Martin,
I have the same problem, that is my flowgraph.
http://gnuradio.4.n7.nabble.com/file/n47201/SNR_rx.jpg
The SNR values have not sens. For example, with 0.065 transmitting power
i
had values between 0.06 and -0.012. may be the problem is how to use the
block in the flowgraph.
I appreciate your help
Zakaria


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47201.html
Sent from the GnuRadio mailing list archive at Nabble.com.

I calculate the SNR using the formula
SNR=20*log10[RMS(signal)/RMS(noise)].
You find attached my flow graph.
http://gnuradio.4.n7.nabble.com/file/n47229/flowgraph.png

Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47229.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On 03/25/2014 11:04 PM, zielalaoui wrote:

Hi azza and Martin,
I have the same problem, that is my flowgraph.
http://gnuradio.4.n7.nabble.com/file/n47201/SNR_rx.jpg
The SNR values have not sens. For example, with 0.065 transmitting power i
had values between 0.06 and -0.012. may be the problem is how to use the
block in the flowgraph.
I appreciate your help
Zakaria

Well, you need to provide valid PSK symbols.
Have a look at gr-digital/examples/snr_estimators.py.

M

As you can see from the flowgraph, I add noise to the signal to simulate
a
channel. And I calculate the SNR at the receiver. Since the noise is
known,
I can calculate my SNR.
But, comparing to the output of the “MPSK SNR Estimator Probe”, it is
not
the same.

Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47231.html
Sent from the GnuRadio mailing list archive at Nabble.com.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Azza,

how do you know RMS(noise)?

Greetings,
Marcus

On 26.03.2014 16:14, Azza Ben Mosbah wrote:

http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47229.html

Sent from the GnuRadio mailing list archive at Nabble.com.

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTMu9PAAoJEBQ6EdjyzlHtCJgH/3fsLtytf1iHUfNFTrE881Dk
msf8h+VPYYaczbVjqdCxXWMWhWA/XRrUt2tHg9t1aIkDa7F2GdEe/jau8nvaEQce
sd9dxkknZHlOvLf+Uup3hwu5Sksdw2o+DJRTugoRcdVKhntR4cEseGyGp9KPgI+h
cef/VFRHbCCeU45zLFto8bHKiWEN/G5jb7ImaAUIFeMhOs403i7IF1pyVpnH8j8N
ChG62isPZHzTl3a2pWJTLQWjlzuBTVknHNi05uMm1W7rTL4YAgyvNg5ysp8HgfoD
k5mUWqn2Vbmn8+3OYg26Ojnrcza20FKyemIKX5C0z7cPcYeaViez4ovZX1bRBgM=
=IGpn
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ah, the picture of your flowgraph took some time to load, so I thought
it was broken.
First of all: to get truly comparable numbers, you should set the IIR
alpha to the same value for the probe and the RMS blocks.

Then: What you’re doing with the RMS blocks is something different
than what the MPSK SNR estimators do; please refer to
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est.html
and the papers linked on the respective implementations for detail.

Greetings,
Marcus

On 26.03.2014 16:16, Marcus M. wrote:

http://gnuradio.4.n7.nabble.com/file/n47229/flowgraph.png

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTMvK8AAoJEBQ6EdjyzlHtUHwH/RUSeDJXGXWYQtcmPAEGz+XK
FNy79zpqogkhYWZ9EPylVPZL0qS9jDWAcymOxw/FCz280zqOM8AA+CSIGLDWrQEI
667IcrV44/fL4fMgiiIC2p87iUPqpqIfoI6TU67qXjEkq4vsXxlosbG0NoH61DnK
D6dxWVv3yT4zp387BZ4CfT3XS9jvXVqO4XlPt0INstAC83v/j1xiU2392fwQJZsn
pHGUFY/SSDsYRWO8a+Mf+IxvtyEPB1EDXC3ckELs/OGxWTin+uuYx1aPCq+RmTo3
N5v2BTaH8YVP0v6CGUzax+tTTbzAHUEZkFXXPauriv9qELsoW+/pYZLtkT2JC5I=
=eoyN
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Azza,
On 26.03.2014 16:46, Azza Ben Mosbah wrote:

Ok. Thank you. I will see that. A one more question please: the
SNR, is it in dB? and why the output for the SNR block is complex?
This is a pass-through block; it just forwards the complex samples and
updates the internal estimation. You can then get the SNR estimate
using the snr() method.

Greetings,
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTMvfGAAoJEBQ6EdjyzlHtFnUH/RI0ipYZHzo6d/uY4nMLeJS0
AFUBc/3UbJfZ2nV160lECjjYA3XK4cL/0h5FOlR4r1Xe7n9wdlwlcNwcdzjDnI95
hadvxZ1iajM1LnPTqi5xZmiKoWF5W6XUUbA4pCkWMCU2GPsCRONkkRYI4/hJHCGn
fQ1MrEhoG5C1tjlMyWr569xhfBpC1i3okRwSqA01NVouYU4FE8eHwuaQG9qJoaeo
7+DMgAWClVXTKxBzGP7RptCapD73ITFdL3oYOG7guhCFwelWyMVNPsvzvUmuEuTX
emiMBV3TPNYQBIxTXx0hrzmCVmjlrgtcBLB7ff2LM6IuE++X8L3iP8OPCvqfL9o=
=VmCN
-----END PGP SIGNATURE-----

On Wed, Mar 26, 2014 at 8:46 AM, Azza Ben Mosbah
[email protected] wrote:

Ok. Thank you. I will see that.
A one more question please: the SNR, is it in dB? and why the output for the
SNR block is complex?

Azza

Azza,

Please try to be more specific with your questions. Notice that there
are two blocks that calculate the SNR of an MPSK signal. Which one are
you talking about? What output are you talking about?

The documentation for the mpsk_snr_est_cc block is found here:
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est__cc.html#details

It says that this block passes all incoming data on the input stream
to the output stream. You can get the SNR by using the snr() function
to return the current estimate. And notice that in the constructor,
there is an argument:
“after this many samples, a tag containing the SNR (key=‘snr’) will be
sent”

So a stream tag is issued every so many samples containing the value
of the SNR estimate.

The other block is the probe_mpsk_snr_est_c, which is a sink:
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1probe__mpsk__snr__est__c.html

Again, this has an snr() function. Instead of stream tags, this block
emits a message every so many samples. So you can attach a block that
receives messages to get the SNR estimates.

Tom

Ok. Thank you. I will see that.
A one more question please: the SNR, is it in dB? and why the output for
the
SNR block is complex?

Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47233.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Hi All,

I checked this document, it gives an idea about SNR estimators in GNU
Radio:
http://www.trondeau.com/blog/2011/12/30/snr-estimators.html
And I checked this Python file:
http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/ef4d48de26b64d89851a93fc5402b33fcc1a809f/entry/gr-digital/examples/snr_estimators.py

But, I need more details about the types of estimators (simple,
skewness,
2nd and 4th moment, svr). What are the differences between those
estimators?
And in which case should I consider each type?
Any help is appreciated.

Thank you,
Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47348.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Ah, ok thank you.

Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47237.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Thank you. That helps.

Azza


View this message in context:
http://gnuradio.4.n7.nabble.com/How-to-calculate-SNR-tp47193p47354.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Mon, Mar 31, 2014 at 2:56 PM, Azza Ben Mosbah
[email protected] wrote:

Any help is appreciated.

Thank you,
Azza

When in doubt, check the docs!

http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est__simple.html
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est__skew.html
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est__m2m4.html
http://gnuradio.org/doc/doxygen/classgr_1_1digital_1_1mpsk__snr__est__svr.html

Tom

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs