Your latter suggestion (do it in blocks) with a once per block integrator makes perfect sense and would save many ticks. Mathematically, it is nearly identical. Since we are taking a perfect average for the block, we would have to change the integration time constant on the IIR to accomodate varying block sizes, but I see this as no problem would be a computational win.

Thanks,
Bob



Martin Dvh wrote:

Robert McGwier wrote:
Dawei:

You have understood it.  Can you suggest a less expensive way than a
single pole iir filter (integrator) to compute the running average of
the data so we can subtract that mean?
You could use a decimating fir with no window (use all samples)
and taps (1.0/ntaps,1.0/ntaps,1.0/ntaps,1.0/ntaps, .....)
and decimation==ntaps
followed by a single pole IIR (running at a much lower rate)
What you win by this is the more efficiant SIMD implementation of FIR versus 
IIR.
You could also make a block which just adds up a whole block of samples
Then divide the result by the number of samples, followed by a single pole IIR
This way you avoid the tap multiplication.
(I used this once for DC-removal in a test gnuradio ADC frontend)

Note however that this is mathematically not exactly the same as only a IIR, 
because you work in blocks and only do the feedback after every block.

Greetings,
Martin


--
Laziness is the number one inspiration for ingenuity.  Guilty as charged!



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to