Robert wrote: >The IIR EWMA formula I gave [ Y(n+1)=Y(n) + alpha*(X(n+1)-Y(n)) ] is about >as simple as it gets. Yes, ofcource but as it uses multiplication ( even though one could simplify with shifting data ) I meant that the FIR with only addition and subtraction is 'lighter'. And concerning PIC's in particular, to avoid rounding errors one alomost is FORCED to use an 'alpha' that is 2,4,8,etc . In the case of FIR the only time an 'uneven' window size matter is during initialisation of the filter ( which is not required really ). ( I had an idea of gradually increasing/decreasing the window of the FIR, but using the IIR i'm more or less forced to step up/down ) But anyway as the ram usage for this IIR filter is very low compared to the FIR I will probably have both version and try them out in 'real life'. >The presence of a stochastic term de-tunes those exact formula to not >feedback all the information in the next same to the next filtered value. >The asymptotic form of the Kalman filter (after 100 samples or so for >transients to die out) is the EWMA form I gave above. The size of 'alpha' >is dictated by the relative size of the stochastic term. As I mentioned >before, the simplest interpretation is 1/alpha ~ window length of a >moving average. In actuality, the weighting coefficients are alpha, >alpha^2, ..., a exponentially declining (geometric) series. Thanks, very clear and consice, I think I'm starting to understand more of the implifications now. /Tony Tony KŸbek, Flintab AB ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ E-mail: tony.kubek@flintab.com ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ