[Top][All Lists]

## Re: [Discuss-gnuradio] Spectrum sensing Simulation Only

 From: Martin Braun Subject: Re: [Discuss-gnuradio] Spectrum sensing Simulation Only Date: Wed, 30 Jul 2014 21:52:44 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

```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

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
>
> I have the following variables
>
> NFFT=1024
> Nav=512
> ampl=1
> seed=1
> Sampling_rate= 10k
>
> 1. Generate any real time signal (This could be done by using
> "gr.noise_source_f (gr.GR_GAUSSIAN, ampl, seed1)).
>
> 2. Insert throttle to control the sampling rate (i.e., gr.throttle(1,
> Sampling_rate))
>
> 3. Compute the FFT (even without windowing) (i.e., NFFT samples at a time)
>
>     Let me assume that after I compute FFT I got "x" vector of size NFFT
>
> 4. Compute the square magnitude (This could be done by using
> gr.complex_to_mag_squared(NFFT))
>
> i.e., in matlab y=abs(x).^2
>
> 4. sum the first and second Nav samples
>
> i.e., av1=sum(y(1:512)) and
>        av2=sum(y(513:1024))
>
> 5. Then display "av1" and "av2" in some GNUradio GUI continuosly.
>
> Note that in matlab (without GUI it is very easy task)
>
> And I feel that there should be some simple approach to do it in GNUradio
>
> Thank you again for your help
>
> ---
>  Postdoctoral Researcher
>  Institut National de recherche Scientifique
>  Centre Energie Matriaux Telecommunications
>  Place Bonaventure,
>  800 de la Gauchetiere Ouest, Suite 6900
>  H5A 1K6
>  Montreal, QC
> ________________________________________
> Sent: July 30, 2014 10:01 AM
> Subject: Re: [Discuss-gnuradio] Spectrum sensing Simulation Only
>
> On 07/30/2014 03:37 PM, Tom Rondeau 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.
>
> https://github.com/kit-cel/gr-specest).
>
> M
>
>
> _______________________________________________
>

```