Professional Documents
Culture Documents
1 INTRODUCTION
2 SYSTEM DESCRIPTION
The noise signal at the entrance of the ear canal is estimated by filtering a reference noise
signal. The reference signal xk, measured by a microphone mounted outside the ear cup,
is transmitted through a FIR filter. The adaptive filter represents a parametric model of the
transfer function of the ear cup. Adaptation of the filter coefficients is based on
minimizing the mean square error-signal (from a microphone mounted inside the ear cup.
A small loudspeaker is used to deliver the acoustic cancellation-signal. This signal is
delivered in reverse phase compared to the unwanted noise signal we have to cancel.
In figure 1 a model of the ANC-system is shown. G(z) represents the transfer function
from the external sound field to the sound pressure inside the cup. Especially head
movements should be considered. The convergence time of the adaptive algorithm is
therefore of utmost importance.
- 1 -
Figure 1: Adaptive Noise Cancelling system scenario
H(z) is the transfer functions of the microphones (the two microphones are assumed to be
identical). J(z) represents the transfer function for the loudspeaker (including the acoustical
load impedance). This transfer function will normally contain a highpass function caused
by an acoustical leak between the cup and head. This is important in relation to the low-
frequency performance of the ANC-system. I(z) represents an equalizing filter placed
before the adaptive filter. This filter is intended to equalize the transfer function J(z).
3 ADAPTIVE FILTERING
The aim of digital adaptive filtering is to adjust the required modification filter after each
new sample arrival. The usual method is to employ FIR adaptive algorithms. Thus, the
filter is always stable, and adjusting the filter coefficients is directly related to impulse
response alterations. The algorithms considered in this paper are the Least Mean Square
(LMS) and the Normalized Least Mean Square (NLMS). In both algorithms the coefficient
update is based on the squared system error, i.e. the instant power of the difference
between corrected signal and desired signal, see figure 1.
The headphone transfer function J(z) yields the corrected acoustical output. Unfortunately,
J(z) is not a minimum phase function, i.e. it cannot be subject to inversion. The necessary
invertibility is ensured by decomposing the transfer funtion J(z) into a minimum phase part
Jmp(z) and an excess phase part Jep(z) for which no reciprocal counterpart can be obtained.
The microphone transfer function H(z) is invertible because it does not suffer from excess
phase.
- 2 -
3.2 The LMS algorithm
The most simple adaptive FIR-filter, the LMS algorithm, is based on a filter coefficient
update equation in which the difference between coefficients at time k and time k+1 is
given by the negative gradient to the function that is to be minimized. This function,
denoted the performance function, is equal to the expected squared error E{e 2[k]}.
The constant µ determines the rate of convergence, i.e. the time to reach the optimum
Wiener solution that corresponds to the minimum of the performance function. Simplifying
the expression above leads to the noisy gradient estimate LMS algorithm, where instead
of +k the instant error e[k] and the input sample vector x[k] are used:
%x2 being the average power of the reference signal. If µ exceeds the upper limit, the
convergence of the algorithm is no longer ensured.
The theory behind this filter is not different from that of the LMS filter. Only now the
step-size parameter µ is normalized to µ n, i.e. the power of x[k] is incorporated in the
algorithm which takes the form:
The instant power estimate of x[k] employs an exponential window defined by the
forgetting factor 1 and is given by:
- 3 -
The major advantages of the NLMS to the LMS algorithm is the fact that normalized
stepsize enables comparison between simulations with different input signals and ensures
that the maximum allowable actual stepsize never exceeds the upper limit. The price,
however, is a slight increase in computational complexity.
The performance of two algorithms, LMS and NLMS, was investigated for bandlimited
(60Hz-3kHz) white and colored noise. A measured impulse response of the headphone was
used in the simulations. It is our experience that reliable results are not obtained by using
simplified models for the sound transmission and loudspeaker-ear transfer function.
The ability of the two algorithms to cancel out noise was investigated using both floating
point and fixed point simulations. Various approaches show that for the NLMS algorithm,
optimum performance is reached by choosing the exponential window forgetting factor to
0.99. For both algorithms convergence time lies in the interval 0.5 sec. to 5 sec. depending
upon the length of the filter and the step-size parameter. Thus, simulations are performed
using these quantities as parameters. A representative part of the Noise Reduction Ratio
(NRR) results is listed beneath in the table. NNR is defined as:
L = 1000 samples is used in these equations. Note that NRR is calculated after the filter
adaptation is finished (stationary condition).
- 4 -
The highlighted numbers are the maximum achievable "average" Noise Reduction Ratio.
Fixed point simulations show that 19 bit variable representation is necessary to maintain
the results found in floating point.
5 IMPLEMENTATION
illustrated in figure 2.
x(k) = Read(M2) x(k) = Read(M2)
presentation. Write k
The ANC system requires four input channels and two output channels. I.e. to prevent
noise in one ear cup, two input channels are necessary. So is the reference signal, x, the
error signal, e, and one out channel for the estimated and inverted noise signal ê. The
hardware system for right and left channels are identical as can be seen from figure 3.
- 5 -
Figure 3: Block diagram of the ANC hardware architecture, where the signal processing can be
performed by one or two DSPs depending on the number of input channels on the device.
If the DSP system has four input channels it is only necessary to have one DSP. However,
if the processor has the computational capacity to calculate both left and right channels
it is possible to multiplex the input channels. Then it is not necessary to have four input
channels, but two would be enough. The sampling frequency is 8 kHz and with a
processor latitude of 33 mips, there are 4125 instructions to calculate one sample.
For testing purposes the ADSP-2181 easy kit lite, abbreviated EKL, from analog devices
with two input channels and two output channels is chosen. I.e. two EKL boards are
needed to complete the ANC-system. The final target hardware architecture however will
be a dedicated ASIC (application specific integrated circuit).
Figure 4 illustrates the memory maps for the program memory and the data memory of
the ANC program. The filter coefficients in the program memory and the variables in the
data memory are implemented as ring buffers, this reduces the need for extra control
instructions as shown in the CDFG in figure 3.
The memory map of the ANC NLMS system is identical to figure 4, although there must
be five more variables. As shown in figure 4, only a fraction of the memory is in use and
naturally in an ASIC solution the need for memory is limited to less than 1kb.
The assembler program is based on the CDFG in figure 3 and operates on the memory
map illustrated in figure 4. Little effort has been put into optimising the assembler code
because it is not necessary due to its simplicity. The program starts on interrupt from the
A/D-converter, when input data are ready. Then data are read into the internal registers
and internal data memory.
- 6 -
Figure 4: Memory map of the ANC system
6 CONCLUSIONS
It is possible to attenuate white noise by 19 dB and colored noise by 17 dB using the LMS
and NLMS algorithm. These results were obtained with floating point simulation. Fixed
point simulations have shown that these two algoritms gave satisfactory results using 19
bits. The optimum filter length is about 150-200 taps (sampling frequency 8 kHz).The
step-size parameter should be selected very carefully. There is a trade-off between fast
convergence (require large step size) and small stationary error (small step size). The
NLMS algorithm was selected for real-time implementation.
For the LMS algorithm the step size is dependent on the actual variance of the noise signal
(not acceptable for practical applications). Convergence times in the range from 0.5 sec.
to 5 sec. were calculated (depending on step size). For practical applications we believe
that convergence times about 1-2 sec. are acceptable.
Acknowledgement:
The simulation material is widely based on the M.Sc. thesis by Flemming Pihl, [7]; his
contribution is gratefully acknowledged.
- 7 -
7 REFERENCES
1. Carme, C.E. 1989. Method and apparatus for attenuating external origin noise
reaching the eardrum, and for improving intelligibility of electro-acoustic
communications. United States Patent No. 4,833,719
2. Gauger, D., et.al. 1989. The Bose Headset System: Background, Description and
Applications. Bose Corporation, Massachusetts.
3. Goodfellow, E.A. A Prototype Active Noise Reduction In-Ear Hearing Protector.
Applied Acoustics, Vol. 42, 1994
4. Haykin, S. 1991. Adaptive Filter Theory. Prentice-Hall. 1991.
5. Maxwell, D.W, et.al. 1987. Performance characteristics of active hearing
protection devices. Sound and Vibration, May 1987.
6. Nelson, P.A. 1994 (Second printing). Active Control of Sound. ACADEMIC
PRESS. 1994.
7. Pihl, F. 1995. Akustisk støjundertrykkelse i headset-baseret på digital
signalbehandling (in Danish). M.Sc. Thesis, Aalborg University, June 1995
- 8 -