Re: How to write a HighPass procedure?



I find the process your suggestion below interesting. Let us say a
simple FIR has window of 31 elements and I want to accumulate a
vector called Z that represents the mid point of the moving average.

If I accumulate Z by sequentially taking the 1st point after dropping
the half period which is last 15 elements I can grow Z by taking the
midpoint at each new "current" sample. However Z will differ slightly
from the results I get on 500 element that I smooth all at once on an
historical basis.

Would a Z accumulated as you suggest below return the same results
or reduce the differences in the so called historical results and that
obtain on running a slidding window process and accumulating
elements as I suggested above? If not what methods might be
useful for reducing the differences between real time tracking and
historical results using moving averages or a simple FIR.


Simplest FIR:

Compute the moving average at the current sample on the length of +/-
half period of cutoff frequency. Substract this moving average from the
current sample. Take the result to the output. Proceed to the next sample.


Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com

.