Olin Lathrop wrote: > RussellMc wrote: > > I have used the exponential filter extensively in the past BUT it has > > such sluggish performance under some conditions when it is usually but > > not always useful that I sometimes add ad hoc rules to it to modify > > its behaviour. eg priming it with current sample value on input would > > be one possibility (depending on input function). >=20 > The tradeoff between random noise attenuation and the step response of a > single pole filter is fixed. No free lunch to be had. However, you can > significantly decrease the step response at the same random noise > attenuation by cascading multiple filters. This may sound like a free > lunch, but it's not since the computation requirements have gone up. > Fortunately single pole low pass filters are relatively easy to compute, = so > using multiple poles is often a good option. >=20 > To illustrate this, I plotted the step response of two filters with the s= ame > random noise attenuation but with different numbers of poles. The algori= thm > for each pole is as described previously: >=20 > FILT <-- FILT + FF(NEW - FILT) >=20 > For the single pole, FF =3D 1/16. For the 4 pole case, FF =3D 1/2 for ea= ch > pole. Note that the product of all FFs for each filter is the same. The > step responses are dramatically different however, as you can see in the > attached image. Olin, I have to ask, in what sense do these filters have "the same random noise attenuation"? It's pretty clear that they have different bandwidths and different cutoff slopes. I don't see the significance of having the FFs multiply out to the same value in both cases. -- Dave Tweed --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .