discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] USRP Spectrum Sensing - Power in dB or dBm??


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] USRP Spectrum Sensing - Power in dB or dBm??
Date: Wed, 8 Jun 2016 11:58:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Hi Ingen,

On 08.06.2016 07:58, ingen wrote:
> I'm a beginner working in Spectrum Sensing. I have been checking the
> code given in the /usrp_spectrum_sense.py/ file in GNU Radio.
> (https://github.com/gnuradio/gnuradio/blob/master/gr-uhd/examples/python/usrp_spectrum_sense.py)
>
> The power calculated (at line 303) is in dB as given below :
>
> /power_db = 10*math.log10(m.data[i_bin]/tb.usrp_rate) - noise_floor_db/
>
> My query is whether the power calculated in dB is in reference to 1
> Watt??
No, it is not! It is dB relative to a digital 1.
> Can we convert this power to dBm??
Only if you calibrate your receiver externally. The USRPs are not
calibrated measurement devices, so the digital 1 (read: full ADC output)
maps to different powers depending on individual device, frequency,
bandwidth, …
Hence, there's no other solution than to take a source of known power
and calculate the digital power of what you observe.
Do a couple of measurement points with different powers. The USRPs are
typically pretty linear, but every linear region has its limits.
Also, be sure to never feed more than -15dBm into the antenna ports of a
USRP – you risk irreparable damages.
> What parameters are needed to be
> checked or tuned in this program??
None, as far as I know. Calibration has to be done by you
> Also, how can we calculate the Power Spectral Density (PSD) from power
> in dB with reference to given frequency??
Strictly mathematically speaking: not at all. You might estimate the
PSD, but you cannot measure it this way. Technically speaking: You've
got something that pretty much looks like a density of how power is
distributed; is that maybe already what you're looking for?

Either you stick with a very "technical" definition of PSD being just
what power you can observe in small bandwidths, or you go with the
scientific notion that PSD is the expectation value of the magnitude
square of the Fourier transform of your signal – and as that, it is a
random entity and can only be estimated from observation, not directly
observed. I've wrote a short paragraph on that in [1]; see under where I
cite "is my understanding of PSD wrong?".

Assuming this is some kind of thesis, from own experience I can say that
it's probably worth getting a very precise, well-worded theory chapter
written down. That will always make it easier for you to refer to the
theory beneath when you're working on the implementation – I'm pretty
sure running a ready-to-use script to give you a few numbers per
frequency is not the whole scope of your work :)

Best regards,
Marcus

[1] http://dsp.stackexchange.com/a/31336/13320
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/USRP-Spectrum-Sensing-Power-in-dB-or-dBm-tp60372.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> _______________________________________________
> 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]