# Spectrum sensing Simulation Only

**URL:** <https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242>\
**Category:** GNU Radio\
**Created:** [July 29, 2014, 9:58pm UTC](https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242 "2014-07-29T21:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 29, 2014, 9:58pm UTC](https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242/1 "2014-07-29T21:58:43Z")

</div>

Hello Everyone

I am a new to gnuradio. I would like to do simulation of spectrum  
sensing (Simple energy detector with single band only).

Normally I have seen “usrp\_spectrum\_sense.py”. However, that is written  
for USRP (and not easy to understand and modify it). Actually I have a  
difficulty in computing average and display it continuously in a  
graphical user interface.

See also my grc and corresponding python code (The vector sinc block is  
not correct).

Any help is appreciated.

## Thanks,

Tadilo Endeshaw, PhD  
Postdoctoral Researcher  
Institut National de recherche Scientifique  
Centre Energie Matriaux Telecommunications  
Place Bonaventure,  
800 de la Gauchetiere Ouest, Suite 6900  
H5A 1K6  
Montreal, QC  
Canada  
E-mail : removed\_email\_address@domain.invalid  
removed\_email\_address@domain.invalid (private)  
Personal home page: [https://sites.google.com/site/tadilomypage/](https://sites.google.com/site/tadilomypage/)

---

<div class="post-metadata">

**Author:** ![BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/u/BogaleS_Tadilo_Ende)\
**Post date:** [July 30, 2014, 3:43pm UTC](https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242/2 "2014-07-30T15:43:41Z")

</div>

On Tue, Jul 29, 2014 at 3:34 PM, Bogale, Tadilo Endeshaw \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> See also my grc and corresponding python code (The vector sinc block is  
> not correct).
> 
> Any help is appreciated.
> 
> ## Thanks,
> 
> Tadilo Endeshaw, PhD

The easiest way to average is to use the single\_pole\_iir\_filter to  
smooth  
out the data stream. But note that you’re coming out of the FFT block as  
a  
vector. You can set the vector length of the single pole IIR, but I’d  
have  
to review exactly what that means mathematically. It probably smooths  
the  
entire vector as one as opposed to smoothing over index i in each  
vector.  
You might have to play around with that.

Tom

---

<div class="post-metadata">

**Author:** ![BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/u/BogaleS_Tadilo_Ende)\
**Post date:** [July 30, 2014, 4:03pm UTC](https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242/3 "2014-07-30T16:03:54Z")

</div>

On 07/30/2014 03:37 PM, Tom R. wrote:

> The easiest way to average is to use the single\_pole\_iir\_filter to  
> smooth out the data stream. But note that you’re coming out of the FFT  
> block as a vector. You can set the vector length of the single pole IIR,  
> but I’d have to review exactly what that means mathematically. It  
> probably smooths the entire vector as one as opposed to smoothing over  
> index i in each vector. You might have to play around with that.

gr-specest might help you with that (pybombs install gr-specest, or  
[GitHub - kit-cel/gr-specest: A module adding spectral estimation routines to GNU Radio. · GitHub](https://github.com/kit-cel/gr-specest)).

M

---

<div class="post-metadata">

**Author:** ![BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@BogaleS\_Tadilo\_Ende](https://www.ruby-forum.com/u/BogaleS_Tadilo_Ende)\
**Post date:** [July 31, 2014, 3:01pm UTC](https://www.ruby-forum.com/t/spectrum-sensing-simulation-only/231242/4 "2014-07-31T15:01:06Z")

</div>

Tadilo,

please stick to the mailing list.

On 07/30/2014 08:23 PM, Bogale, Tadilo Endeshaw wrote:

> Hello Martin
> 
> Thank you for the help. I try to run “specest\_noisy\_sinusoid\_mtm.py” (Python  
> script is also okey for me). However it does not run “it says no module specest”.

Did you install gr-specest?

> My goal is is to write a simple python or gnuradio code to perform the following  
> task

That’s really simple. In gr-specest, the “Welch” blocks pretty much do  
that. Even without, you can easily click that together in GRC.

M
