DSP Tricks: Dual-mode averaging
Here's a clever averaging scheme, used for noise reduction, that blends both the quick response of a moving averager and the noise reduction control of an exponential averager. The structure of this dual-mode averager is depicted in Figure 13-81(a) below. (Thanks to DSP guru Fred Harris for recommending this dual-mode averager.)
|Figure 13-81 Dual-mode averaging: (a) standard form, (b) alternate form|
The averager operates as follows: the switch remains open for K input samples after which the y(n) output is equal to the K-point average of the x(n) input.
Just prior to the arrival of the K+1 input sample the switch closes converting the moving average filter to an exponential averager, with its (1 - 1/K) feedback, giving us control over the filter's noise reduction properties.
In implementations where the adder's output word-width must be minimized, the second 1/K multiplier can be moved ahead of the adder to reduce the amplitude of the adder's output samples as shown in Figure 13-81(b).
Here's another neat idea. If we can accept K being an integer power of two, the multiply by 1/K computations can be implemented with arithmetic, or hard-wired, binary right shifts giving us a multiplierless noise reduction filter.
Used with the permission of the publisher, Prentice Hall, this on-going series of articles is based on copyrighted material from "Understanding Digital Signal Processing, Second Edition" by Richard G. Lyons. The book can be purchased on line.
Richard Lyons is a consulting systems engineer and lecturer with Besser Associates. As a lecturer with Besser and an instructor for the University of California Santa Cruz Extension, Lyons has delivered digitasl signal processing seminars and training course at technical conferences as well at companies such as Motorola, Freescale, Lockheed Martin, Texas Instruments, Conexant, Northrop Grumman, Lucent, Nokia, Qualcomm, Honeywell, National Semiconductor, General Dynamics and Infinion.