Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- The filter y(n) = k * y(n-1) + x(n) approximates to average(x) / (1 - k) for 0 < k < 1. It isn't as good as a rolling average, but is often good enough. --- Quote End --- Interesting point. what I found is this: for n taps running average a good approximation is y(i) = a*y(i-1) + (1-a)*x(i); with a = (n-1)/n However this requires two(or one multiplier) plus adder, so I think the true running average is simpler if you can afford the storage. surely for large value of n then your suggestion is much better. Moreover the value (a) is programmable.