Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- An alternative is to use an 'infinite response filter' instead of a true average. This gives more weight to recent data, but is easier to calculate since it doesn't require all the old values be stored. Basically calculate 'new_irf = old_irf * 31/32 + sample'. --- Quote End --- you are using an integrator of equation: y(n) = 31/32*y(n-1) + x(n); This has a different response from running average filter and is not functionally equivalent. The post is focused on running average. If it is ok then why not just use: y(n) = y(n-1) + x(n) i.e. just an accumulator: sum <= sum + data_in;