At 11:19 AM 10/08/2010, you wrote: >Hello, > >My colleage told me about a smoothing/lpf formula which is : > >a(n) =3D {a(n-1) * param + ADC} / {param + 1} > >which >ADC is the signal from adc >a(n-1) is the result of the last call to this formula >the param is the part I don't understand. > >Is there anybody knows where this formula comes from ? > >it seems to work well for smoothing, but I want to tweek the param (=20 >which is certainly for the bandwith ) > >Thank you Assume this routine is called periodically every Ts seconds (!), and assume that param >> 1, then you get a single-pole discrete-time IIR low pass filter with a cutoff frequency (3db down point) of: fc ~=3D 1/(2 * pi * Ts *param) For example, if param is 10 and Ts is 0.01 second, then your fc is about 1.6 Hz. 'param' is dimensionless. Google on "low pass filter", "discrete time" etc. if you want to know more. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the rewar= d" speff@interlog.com Info for manufacturers: http://www.trexon.co= m Embedded software/hardware/analog Info for designers: http://www.speff.co= m --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .