Usually I'm interested in sweeping from 50 MHz to 2.2 GHz, but this scan was from 558 MHz to 568 MHz. The FFT size I use is usually 512 or 1024. I believe the decimation rate here is 256, but both problems persist no matter the decimation/sampling rate I select.
On Fri, Mar 18, 2011 at 1:43 PM, Jason Abele
<address@hidden> wrote:
On Fri, Mar 18, 2011 at 10:10 AM, devin kelly <
address@hidden> wrote:
> Hello,
>
> I've created a spectrum sensor with the USRP2, my python script uses the
> same idea as usrp_spectrum_sense.py found in gnuradio. That is, it tunes,
> takes an FFT, records, retunes, etc.
Could you post a flowgraph or tell us what frequencies you are tuning
sweeping across, what step size, any averaging you use, sample rate or
decimation, etc.
> I have two problems with my data though. In the file attached is some TV
> spectrum (left half) and noise (right half).
>
> My first question is this: why isn't the spectrum for the TV signal flat, it
> seems to bob up and down. Note that each segment is from a different FFT,
> that is each FFT produces that oval shape. At first I thought this had
> something to do with the window I was using but I've tried hamming,
> blackman-harris, and rectangular windows and they all have this effect.
The TVRX has a 6MHz bandpass filter, which will add shape to the
spectrum you sense and even if you pick a smaller than 6Msps sample
rate, you will still have several effects to consider:
* Aliasing of energy inside the 6MHz bandpass
* Probably 75% of the 6MHz is the flat region
* TVRX has finite tuning steps, so you may be causing the USRP2 DDC to
push your IF against the edge of the TVRX bandpass
> My second question is why isn't the transition between TV spectrum and noise
> more smooth? It looks like it could be smooth but the gain seems to jump for
> an FFT right after 566 MHz and then settle down again. I thought this might
> be the AGC but I've tried different attack/decay rates, different reference
> levels, etc with the agc2_cc block but the problem remains.
>
I am not familiar with the agc2 block, but I would recommend against
using AGC until you are confident you have handled the bandpass nature
of TVRX properly
> Any help with either of these questions would be appreciated,
If you are using UHD, you might consider using the uhd::tune_result_t
returned by set_center_freq() to make sure you are staying centered in
the bandpass filter
When I do a sweep from 558MHz to 568MHz with my decimation rate of 256 I get these results from tune_result_t. Note this isn't all the results, but I think you can get the idea from these.
Target Inter Frequency 567277343.75 Actual Inter Frequency 567277167.277
Target DSP Frequency -128.777472496 Actual DSP Frequency -128.778629005
Target Inter Frequency 567472656.25 Actual Inter Frequency 567472527.473
Target DSP Frequency -81.0821123123 Actual DSP Frequency -81.0716301203
Target Inter Frequency 567667968.75 Actual Inter Frequency 567667887.668
Target DSP Frequency -33.3867521286 Actual DSP Frequency -33.3879143
Target Inter Frequency 567863281.25 Actual Inter Frequency 567863247.863
Target DSP Frequency -1511.94291818 Actual DSP Frequency -1511.9323507
Target Inter Frequency 568058593.75 Actual Inter Frequency 568057081.807
Target DSP Frequency -891.903235674 Actual DSP Frequency -891.904346645
Target Inter Frequency 558097656.25 Actual Inter Frequency 558096764.347
The DSP frequency is all over the place, from -30 to -1500, why is it always negative?
Thanks Again,
Devin