# How to integrate a vector signal?

Hi,

I wonder if anybody has any suggestion on how to integrate a vector
signal? I have a block that generates a vector signal, but I want to
integrate the output over 3-10 vectors to improve the SNR. Now if this
was a regular stream signal I would have just used a FIR filter with N
taps to implement this ( y(n) = x(n) + x(n-1) + … + x(n-N-1) ) , but
I am not sure how to accomplish the same thing on a vector signal.

Any comments are welcome!

Trond D.

Trond D. wrote:

I wonder if anybody has any suggestion on how to integrate a vector
signal? I have a block that generates a vector signal, but I want to
integrate the output over 3-10 vectors to improve the SNR. Now if
this was a regular stream signal I would have just used a FIR filter
with N taps to implement this ( y(n) = x(n) + x(n-1) + … + x(n-N-1)
) , but I am not sure how to accomplish the same thing on a vector
signal.

You can use the gr.single_pole_iir_filter_xx block, but set the vlen
parameter (second constructor argument, defaults to 1) to the length of

The block will create a single pole IIR filter for each position in the
vector, then as the vectors come in, the filters will act in parallel so
the output vectors are the result of treating each vector element as its
own stream of data values.

The constructor parameter ‘alpha’ determines the amount of smoothing;
1.0 is no smoothing (out = in), and with 0.0 the output would never
change from zero. Mathematically, its the same as resistor-capacitor
low pass filter.

Google “exponential average filter” for a more detailed discussion on
how to determine the alpha parameter to have the filter response you
want.

There is a good example of using this in the fftsink.py code, where the
vector output of the FFT goes through an averaging filter before it gets
sent to the display window. See line 116.

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

2007/4/12, Johnathan C. [email protected]:

You can use the gr.single_pole_iir_filter_xx block, but set the vlen
change from zero. Mathematically, its the same as resistor-capacitor
low pass filter.

Google “exponential average filter” for a more detailed discussion on
how to determine the alpha parameter to have the filter response you want.

There is a good example of using this in the fftsink.py code, where the
vector output of the FFT goes through an averaging filter before it gets
sent to the display window. See line 116.

Thanks a lot! Don’t know how I missed that one.

Trond D.