discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] m.data in usrp_spectrum_sense.py


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] m.data in usrp_spectrum_sense.py
Date: Thu, 11 Jun 2015 16:05:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

ah! the meaning of m.data is explained a few lines before, line 284[1]:

> m.data are the mag_squared of the fft output

As I explained, the value that gets displayed is just the squared magnitude of the FFT -- that means that values displayed are somehow proportional to the powers in individual frequency spans,  but they are just proportional -- which means the relationship between the dB displayed (dB relative to the digital value of 1) and real world power (relative to for example 1mW, which could then be displayed as dBm) is something that you will have to calibrate yourself.

Best regards,
Marcus

[1] https://github.com/gnuradio/gnuradio/blob/master/gr-uhd/examples/python/usrp_spectrum_sense.py#L284

On 06/11/2015 02:20 PM, Ashraf Younis wrote:
m.data is what they use to calculate power_db (i.e. power_db = 10*math.log10(m.data[i_bin]/tb.usrp_rate) - noise_floor_db) from this code 
line 303.
How would I calibrate my system with an external signal? I don't understand what you mean by this.

On Wed, Jun 10, 2015 at 5:01 PM, Marcus Müller <address@hidden> wrote:
Hi Ashraf,

that's no real power -- it's the absolute magnitude of the FFT in each bin, in dB relative to 1.
If you need numbers in real power (ie. numbers on your screen that directly relate to a signal power in real physics), you will need to calibrate your system with an external signal of which you know the (physical) power of. This will only apply for a short time, for a given configuration of frequency, sampling rate, gain.
I don't know what you mean with m.data, but I think you're on to nothing correct.

Best regards,
Marcus

On 06/10/2015 09:50 PM, Ashraf Younis wrote:
I have been running usrp_spectrum_sense.py for hours now and I cannot figure out where it is getting its power_db from. I narrowed it down to m.data.  My end goal is to have the program scan frequencies from a desired list that I have created and output its power. usrp_spectrum_sense.py scans frequencies in a range and I have been successful in reading a file of known frequencies in usrp_spectrum_sense.py. I what to be able to pass a list of frenquencies (floats) into the program and let it scan for the power. But the program computes power from m.data and now from its own variable 'freq'. Can someone explain to me what these numbers (m.data) are?


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

[Prev in Thread] Current Thread [Next in Thread]