discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] averaged power spectrum calculation


From: Johnathan Corgan
Subject: Re: [Discuss-gnuradio] averaged power spectrum calculation
Date: Thu, 22 Nov 2007 07:41:41 -0800
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

Juha Vierinen wrote:

> avg = gr.single_pole_iir_filter_ff(1.0, fft_size)

> The avg block should simply sum up all the vectors that come out of
> Mod(fft(signal)), but this doesn't seem to happen. It almost seems as
> if nothing is done in the avg block. What am I doing wrong?

The single pole IIR is an exponential averaging filter.  The "alpha"
parameter becomes the feed-forward tap, and 1.0-alpha becomes the
feedback tap.  So in your case, you've set it such that there is no
averaging done.

Try some value like 0.001.  You'll need to experiment to get the amount
of smoothing that you want.

You can also look in fftsink2.py in gr-wxgui to see how this same
technique is used to "average" the FFT display in usrp_fft.py.  When it
is turned off, alpha is set to 1.0, when it is turned on, alpha is set
to a value dependent on the FFT frame rate.

-- 
Johnathan Corgan
Corgan Enterprises LLC
http://corganenterprises.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]