Usrp_spectrum_sense.py FFT bin values are all zero

Hi, all,

I use the usrp_spectrum_sense.py to sweep the TV band from 470MHz to
806MHz. But when I use self.connect(self.u, s2v, fft, c2mag, log,
stats),
the FFT bin values I got are all zero.
Also, what’s the magnitude of FFT bin value? Thanks.

I want to use usrp_spectrum_sense.py to sweep the Hong Kong TV band
which
ranges from 470MHz to 806MHz and get every channel’s power in dB. Each
channel’s frequency band is 8MHz.

Now I’m using USRP2 with TVRX2 daughter board. I have installed the
latest
gnuraio and uhd. But when I use the usrp_spectrum_sense.py to get the
power
of each channel, some FFT bin values are extremely big. In particular,
I’m
not sure abou the self.connect(self.u, s2v, fft, c2mag, stats). It
doesn’t
take “log” as the parameter,

FFT size is 2048, sample-rate is 12.5MHz(to let the decimation be 8M),
freq_step is 8MHz. Anyone has any ideas about how to use
usrp_spectrum_sense.py to calculate each channel’s power?

Hi Jincheng,

Try setting the UHD sample rate to 25e6 and the number of fft bins to 25
which will give you 1e6 Hz per bin. Adding up the magnitude of 8 bins
(1MHz * 8 = 8MHz) will therefore give you the wanted channel power in
decimal format (magnitude).

In case you are confused, I recently updated usrp_spectrum_sense.py to
include a --channel-bandwidth setting which rounds up the frequency
displayed to the nearest frequency. I’m working on making it cleaner by
adjusting the fft size to match the wanted channel. In the meantime,
set
‘–channel-bandwidth=8e6’ to make the frequency round to the nearest
8MHz
frequency.

Hope that helps,

Mike


Mike J. M0MIK BSc
Email: [email protected]
Web: http://scanoo.com

Thanks Mike. I’m a little confused. The parameters are listed as
follows:

sample-rate:
channel-bandwidth:
freq_step:
fft_size:

You mean that I should set sample-rate be 25e6, channel-bandwidth be
8e6,
freq_step be 8e6 and fft_size be 25?

If we set the fft-size be 25, then which 8 bins I should select to
calculate the power? By the way, since the magnitude of FFT bin is
decimal,
maybe I should change the magnitude of FFT bin values to mw and add the
8
bins, and then transfer to decimal again? Since we cannot straightly add
the FFT bin values in decimal.

By the way, how about the “self.connect”, should I add the log parameter
to
it?

Thanks. Hope for your reply.

Hi,

For your application, please experiment with the following command:

./usrp_spectrum_sense.py -A TX/RX --fft-size=25 --samp-rate=25e6
–gain=15
–dwell-delay=0.25 --tune-delay=0.25 --channel-bandwidth=8e6 470e6 800e6

Note that ‘freq_step’ should remain unchanged at ‘0.75 * usrp_rate’ in
the
script to make sure signals at the edge of the incoming front-end signal
bandwidth (25MHz) are not missed.

Mike


Mike J. M0MIK BSc
Email: [email protected]
Web: http://scanoo.com

The frequency band ranges from 470MHz to 806MHz, each channel’s
frequency
band is 8MHz, so we have 42 channels in total. Channel 1,3,5,7 are
analog
channels, others are digital channels.

I want to set the value of parameters in usrp_spectrum_sense.py as
follows:

fft-size: 2048
channel-bandwidth:8e6
samp-rate:12.5e6
freq_step: 8e6.
dwell-delay:0.5
tune-delay:0.5

I experiment with ./usrp_spectrum_sense.py
Then for each channel, we have 2048 bins, which can be used to calculate
each channel’s power(in dB).

Am I right?

Thanks, Mike. Then how should I calculate the power for each channel?
We have analog and digital channels.

已通过MOTOBLUR™连接

-----原始信息-----
来自: Mike J. [email protected]
收件人: Jincheng Z. [email protected]
抄送: “[email protected][email protected]
已发送: 2013-04-07, 周日, 16:39:05 格林尼治标准时间+0000
主题: Re: [Discuss-gnuradio] usrp_spectrum_sense.py FFT bin values are all
zero.

Hi,

For your application, please experiment with the following command:

./usrp_spectrum_sense.py -A TX/RX --fft-size=25 --samp-rate=25e6
–gain=15
–dwell-delay=0.25 --tune-delay=0.25 --channel-bandwidth=8e6 470e6 800e6

Note that ‘freq_step’ should remain unchanged at ‘0.75 * usrp_rate’ in
the
script to make sure signals at the edge of the incoming front-end signal
bandwidth (25MHz) are not missed.

Mike


Mike J. M0MIK BSc
Email: [email protected]
Web: http://scanoo.com