How to get dBm value from usrp_spectrum_sense.py

Hi,

I wonder how can I get the dBm value by using usrp_spectrum_sense.py.

should I do it as follows?

fft = gr.fft_vcc()

c2mag = gr.complex_to_mag_squared() (or without squared?)

log = gr.nlog10_ff()

stats = gr.bin_statistics_f()

self.connect(self.u,s2v,fft,c2mag,log,stats)

in main function, I defined

m = parse_msg(tb.msgq.delete_head())

Is mean(m.data) the dBm value? If it isn’t, how can I get the it?

Thank you!

On Thu, Jun 17, 2010 at 06:03:46PM +0800, lishan_wh wrote:

stats = gr.bin_statistics_f()

self.connect(self.u,s2v,fft,c2mag,log,stats)

in main function, I defined

m = parse_msg(tb.msgq.delete_head())

Is mean(m.data) the dBm value? If it isn’t, how can I get the it?

Hi lishan_wh,

the Rx chain (before your flow graph) consists of a lot of analog stuff
(including amplifiers) and then your signal is converted to nothing but
numbers during the A/D conversion.
So, if you mag-square the incoming signal, you get some kind of power,
but differing from the absolute power by an unknown factor. You need to
calibrate your whole system before you can do actual power measurements.

Cheers
MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-3790
Fax: +49 721 608-6071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

2010/6/17 lishan_wh [email protected]:

log = gr.nlog10_ff()

stats = gr.bin_statistics_f()

self.connect(self.u,s2v,fft,c2mag,log,stats)

in main function, I defined

m = parse_msg(tb.msgq.delete_head())

Is mean(m.data) the dBm value? If it isn’t, how can I get the it?

The easiest way is to simply use an RF signal generator with a known
output power level, feeding it directly into the USRP. Then, you can
measure the value of the signal you are receiving (either manually in
your application or by viewing the samples with a graphical tool such
as using usrp_fft.py) and calibrate against this.


John O.
CEO/System Architect
Epiq Solutions