Download presentation
Presentation is loading. Please wait.
Published byRandall Barnard Walker Modified over 9 years ago
1
Recursive Average The recursive average is a very efficient way to obtain a time-weighted average by low-pass filtering the signal. y[n] = (1-a)y[n-1] + ax[n] Consider the output for a step input if a = 0.632 Output initialized to 0
2
Recursive Average By careful choice of a, we can create extremely efficient integer versions in software and hardware. Choose a to be N/2 n, where n ≥ 0 and 0 < N < 2 n 1-a is then 1 – N/2 n The accumulator width is generally larger than the input and output widths Exercise – implement in Verilog Let a = 5/8 (0.625) x, y are 8-bit unsigned values Keep 8 bits of fractional precision in accumulator NO multiplies or divides!
3
Simulation Results Note that accumulator value is still increasing after y=254. Will it ever get to 255?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.