11.5. EXPONENTIAL AVERAGING
There is a kind of time-domain averaging used in
some power measurement equipmentit's called exponential
This technique provides noise reduction by multiplying an input
sample by a constant and adding that product to the constant's ones
complement multiplied by the most recent averager output. Sounds
complicated in words, but the equation for the exponential averager
is the simple expression
where y(n) is the current averager output
sample, y(n1) is the previous averager
output sample, and a is the weighting factor constant. The process
described by Eq. (11-22)
is implemented as shown in Figure 11-13. The advantage of exponential
averaging is that only one storage register is needed to hold the
value y(n1) while waiting for the next
input data sample x(n).
Figure 11-13. Exponential averager.
The exponential averager's name stems from its
time-domain impulse response. Let's assume that the input to the
averager is a long string of zeros and we apply a single sample of
value 1 at time t = 0. Then the
input returns again to a string of zero-valued samples. Now, if the
weighting factor is a = 0.4, the
averager's output is shown as the curve in Figure 11-14. When t = 0, the input sample is multiplied by
a, so the output is 0.4. On the next
clock cycle, the input is zero, and the old value of 0.4 is
multiplied by (1 0.4), or 0.6, to provide an output of 0.24.
On the following clock cycle, the input is zero, and the old value
of 0.24 is multiplied by 0.6 to provide an output of 0.144. This
continues with the averager's output, or impulse response, falling
off exponentially because of successive multiplications by 0.6.
Figure 11-14. Exponential averager
impulse response with a = 0.4.
A useful feature of the exponential averager is
its capability to vary the amount of noise reduction by changing
the value of the a weighting factor. If
a equals one, input samples are not
attenuated, past averager outputs are ignored, and no averaging
takes place. In this case, the averager output responds immediately
to changes at the input. As a is
decreased in value, input samples are attenuated, and past averager
outputs begin to affect the present output. These past values
represent an exponentially weighted sum of recent inputs, and that
summation tends to smooth out noisy signals. The smaller a gets, the more noise reduction is realized.
However, with smaller values for a, the
slower the averager is in responding to changes in the input. We
can demonstrate this behavior by looking at the exponential
averager's time-domain step response for various values of a as shown in Figure 11-15.
 The step
response is the averager's output when a string of all zeros
followed by a string of all ones is applied to the input.
Figure 11-15. Exponential averager
output vs. a when a step input is
applied at time t = 0.
So we have a trade-off. The more the noise
reduction, the more sluggish the averager will be in responding to
changes at the input. We can see in Figure 11-15 that, as a gets smaller, affording better noise
reduction, the averager's output takes longer to respond and
stabilize. Some test instrumentation manufacturers use a clever
scheme to resolve this noise reduction versus response time
trade-off. They use a large value for a
at the beginning of a measurement so that the averager's output
responds immediately with a nonzero value. Then, as the measurement
proceeds, the value of a is decreased to
reduce the noise fluctuations at the input.
The exponential averager's noise variance
reduction as a function of the weighting factor a has been shown to be[9,10]
Thus, the exponential averager's noise-power
reduction in dB is given by
(11-24) is plotted in Figure 11-16 to illustrate the trade-off
between noise reduction and averager response times.
Figure 11-16. Exponential averager
noise-power reduction as a function of the weighting factor a.
To demonstrate the exponential averager's
noise-power reduction capabilities, Figure 11-17 shows the averager's output with
a cosine wave plus noise as an input. The weighting factor a starts out with a value of 1.0 and decreases
linearly to a final value of 0.1 at the 180th data input sample.
Notice that the noise is reduced as a
decreases. However, the cosine wave's peak amplitude also decreases
due to the smaller a value.
Figure 11-17. Exponential averager
output noise reduction as a
The reader may recognize the implementation of
the exponential averager in Figure 11-13 as a one-tap infinite impulse
response (IIR) digital filter.
Indeed it is, and, as such, we can determine its frequency
We do this by remembering the general expression
6 for the frequency response of an IIR filter, or Eq.
(6-28) repeated here as
From Figure 6-18, we
modify Eq. (11-25) to set
N = 0, and M = 1, so that
Now with b(0) =
a and a(1) = 1 a, our exponential averager's frequency
response is the complex expression
For now, we're interested only in the magnitude
response of our filter, so we can express it as
Evaluating Eq. (11-27) over the normalized angular range
of 0 w p (corresponding to a
frequency range of 0
f fs/2 Hz),
the frequency magnitude responses of our exponential averaging
filter for various values of a are shown
in Figure 11-18(a) using a
normalized decibel scale. Notice that, as a decreases, the exponential averager behaves
more and more like a low-pass filter.
Figure 11-18. Exponential averager
frequency response vs. a: (a) normalized
magnitude response in dB; (b) phase response in degrees.
We can get some practice manipulating complex
numbers by deriving the expression for the phase of an exponential
averager. We know that the phase angle, as a function of frequency,
is the arctangent of the ratio of the imaginary part of Hexp(w) over the real part of Hexp(w), or
To find those real and imaginary parts, knowing
that Hexp(w) is itself a ratio, we determine what the
variables are in Eq.
(11-26') corresponding to the form of Eq. (A-20),
from Appendix A. Doing that, we
Substituting those variables in Eq. (A-20)
Representing the denominator of this messy Eq. (11-28) with the term
Den, we use Eq. (11-27) to express the phase angle of
The very nonlinear phase of
øexp(w) from Eq. (11-29) is calculated
over the normalized angular range of 0 w p, corresponding to a
frequency range of 0
f fs/2 Hz,
and plotted in Figure