======================DIGITAL_FILTERS====================================== FIR Finite Impulse Response input samples put in shift register with limited length. output is function of what is stored in shift register stuff below has some errors/typos: ex. y(k)=a*y(k)+b*y(k-1)+c*y(k-2) The above difference equation is recursive, w hich makes it IIR. (Actually it's not even a filter, since there is no input) I guess it was a typo :) It should read: y(k)=a*x(k)+b*x(k-1)+c*x(k-2) Transfer function: H(z) = Y(z)/X(z) = a + b*z^-1 + c*z^-2 H(z) has only zeros, no poles. coefficients a, b, c may be determined by studying response of a dirac pulse (spike). a=0, b=0.5, c=0.25 would probably give a nice low pass filter, to make an unscientific guess. To be scientific, use the z-transform. ---------------------------------------------------------------------------- IIR Infinite Impulse Response recursive algorithm, where filter value is determined by input value and current value. I think this is more accurate: A recursive algorithm where the filter output value is determined by current and past input values, as well as past output values. > > ex. first order low pass filter y(k)=(d-1)y(k)-d*y(k-1) > where the rise time is determined by d and the sample rate > Again, this equation does not have any input. (Where do you put the 'stuff' you want to filter?) Example of IIR: y(k) = b0*x(k) + b1*x(k-1) - a1*y(k-1) - a2*y(k-2) Transfer function of same filter: H(z) = Y(z)/X(z) = (b0 + b1*z^-1) / (1 + a1*z^-1 + a2*z^-2) H(z) has both zeros and poles. > >This is the general idea, off the top of my head. >Study a book on digital filters to get the details. > Original Subject: Re: digital filtering Two common filter structures are used: FIR- Finite Impulse Response The input samples are put in a shift register with limited length. The output is a function of what is stored in the shift register for the time being. ex. y(k)=a*y(k)+b*y(k-1)+c*y(k-2) coefficients a, b, c may be determined by studying the response of a dirac pulse (spike). a=0, b=0.5, c=0.25 would probably give a nice low pass filter, to make an unscientific guess. To be scientific, use the z-transform. IIR- Infinite Impulse Response A recursive algorithm, where the filter value is determined by the input value and the current value. ex. first order low pass filter y(k)=(d-1)y(k)-d*y(k-1) where the rise time is determined by d and the sample rate