# Spectrum Sensing

**URL:** <https://www.ruby-forum.com/t/spectrum-sensing/74790>\
**Category:** GNU Radio\
**Created:** [November 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790 "2006-11-07T10:56:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shravan\_Rayanchu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Shravan\_Rayanchu](https://www.ruby-forum.com/u/Shravan_Rayanchu)\
**Post date:** [November 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790/1 "2006-11-07T10:56:29Z")

</div>

Hello everyone,

I was going through some gnuradio documentation (on [comsec.org](http://comsec.org) wiki)  
which says “…16-bit I and 16-bit Q data (complex), resulting in 8M  
complex samples/sec across the USB (32 Mbps max. data rate). This  
provides a maximum effective total spectral bandwidth of about  
6MHz…”.

By Nyquist criteria, should not this be 4 Mhz? Also, I found this note  
at some other place which said that we can sense spectrum upto +/-  
15MHz from the carrier frequency. Which one of the above is correct?  
And what is bottleneck for maximum amount of spectrum we can sense at  
one time, is it limited by the usb bus speed?

Also, the in the program “usrp\_spectrum\_sense.py [options] min\_freq  
max\_freq”, is there a limit on (max\_freq - min\_freq)?

Thanks,  
Shravan.  
PS: My DSP background is zilch.

---

<div class="post-metadata">

**Author:** ![Shravan\_Rayanchu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Shravan\_Rayanchu](https://www.ruby-forum.com/u/Shravan_Rayanchu)\
**Post date:** [November 7, 2006, 10:56am UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790/2 "2006-11-07T10:56:54Z")

</div>

Shravan -

On Thu, Nov 02, 2006 at 03:53:35PM -0600, Shravan Rayanchu wrote:

> I was going through some gnuradio documentation (on [comsec.org](http://comsec.org) wiki)  
> which says “…16-bit I and 16-bit Q data (complex), resulting in 8M  
> complex samples/sec across the USB (32 Mbps max. data rate). This  
> provides a maximum effective total spectral bandwidth of about  
> 6MHz…”.
> 
> By Nyquist criteria, should not this be 4 Mhz?

When you have both I and Q, we have sign information on the  
frequency, so the full range of -4 MHz to +4 MHz is 8 MHz.  
Of that, 75% is valid data, the rest includes aliases and  
shouldn’t be trusted in most circumstances.

> Also, I found this note  
> at some other place which said that we can sense spectrum upto +/-  
> 15MHz from the carrier frequency. Which one of the above is correct?

Both. The choice of _which_ 6 MHz band can be adjusted  
digitally.

> And what is bottleneck for maximum amount of spectrum we can sense at  
> one time, is it limited by the usb bus speed?

Yes.

```
- Larry

```

---

<div class="post-metadata">

**Author:** ![Shravan\_Rayanchu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Shravan\_Rayanchu](https://www.ruby-forum.com/u/Shravan_Rayanchu)\
**Post date:** [December 18, 2013, 11:33am UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790/3 "2013-12-18T11:33:17Z")

</div>

Hi Nikita,

In order to answer your question we need more information on what you  
want  
to do exactly. gr-fosphor takes all unprocessed samples and does  
everything  
on the GPU. Calculating spectrum, graphical output etc. As far as I know  
there isn’t a way to get the samples back from the GPU.

Cheers  
Johannes

---

<div class="post-metadata">

**Author:** ![Shravan\_Rayanchu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Shravan\_Rayanchu](https://www.ruby-forum.com/u/Shravan_Rayanchu)\
**Post date:** [December 18, 2013, 4:29pm UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790/4 "2013-12-18T16:29:32Z")

</div>

Hi Nikita,

so basically what you want is a couple of calculated FFTs per second.  
These  
are then sent to the web service and delivered to who ever connects to  
it.  
Let’s assume every USRP has its own flowgraph. Then The thing to do is,  
receive samples, convert them to a vector with the size of your FFT, use  
a  
‘Keep one in N’ block to decimate the number of FFTs per second and feed  
the output to a FFT block. Then pass your results around as you like.

Happy hacking  
Johannes

---

<div class="post-metadata">

**Author:** ![Shravan\_Rayanchu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Shravan\_Rayanchu](https://www.ruby-forum.com/u/Shravan_Rayanchu)\
**Post date:** [December 20, 2013, 11:47am UTC](https://www.ruby-forum.com/t/spectrum-sensing/74790/5 "2013-12-20T11:47:44Z")

</div>

Hi Nikita,

uhd\_fft uses a WX sink. It does its own FFT calculations. They are not  
meant to be used elsewhere. I recommend using a FFT block and then  
format  
the output according to your needs.

Happy hacking  
Johannes
