You are on page 1of 7

Plantilla IEEE para realizar las actividades del curso

A continuación encontrará un archivo word IEEE editable para que puedan realizar los documentos de las
actividades del curso. Es de recordar que solo el abstract se escribirá en inglés.

FxLMS algorithm for active noise control


García, Mauricio
Pontificia Universidad Javeriana
Electronic Engineering Department
Optimization Course
Bogotá, Colombia
mauricio_garcia@javeriana.edu.co

Abstract — In this work it is presented a DSP card PhD Student, Ted Hoff. In this article it is presented eighteen
implementation method of the FxLMS single channel algorithm (18) offline results for LMS system identification algorithm,
for active noise control (ANC). The ANC technique uses the also it is presented twenty one (21) simulation results of the
superposition principle to attenuate acoustical noise. It is
FxLMS ANC algorithm, and finally the single channel
presented some simulating and experimental results of the LMS
and FxLMS algorithms. The signals used in the ANC are several
FxLMS algorithm it is implemented in Simulink to download
low frequency tones and a broadband sound signal (air it then to the DSP card, in order to obtain experimental real
compressor), which is a machine widely used in industrial time results. The simulations are important, because it can be
applications. The experiments are carried out in an enclosure test if the algorithm is working well and also to compare the
(control room of approximately 36 cubic meters of volume). performance of the algorithms between simulations and real
time results. ANC has been widely investigated for
Keywords—component; system identification, LMS algorithm, applications like, noise control in air ducts [13], headphones
FxLMS algorithm, active noise control, Matlab, Simulink, adaptive applications [14], aircraft cabins [17], multi-channel ANC for
filtering, FIR filters, secondary path estimation, transfer function,
automobiles [18], 3d reverberant enclosures multi-channel
adaptive algorithm, impulse response, FIT, white noise.
ANC [15], but single channel ANC in 3d reverberant
I. INTRODUCTION (HEADING 1) enclosure for single channel, has been little documented,
Acoustic noise affects the life quality of the society, causing always is used multichannel setups (multiple control sources
stress and issues related to ear. In most of industries, it exists and error sensors) to achieved considerable attenuation of
machines, which generate high sound pressure levels and can approximately 20 dB [16-17]
be considerate like acoustic noise sources. In order to minimize
the negative effects on employees, generally it is used passive This article is divided as follows: Section II, System
methods, like acoustic isolation with acoustic barriers (walls), description, Section III, Simulation results. Section IV,
and hearing protectors. These passive techniques are widely Implementation of the FxLMS algorithm for active noise
used, but its performance in low frequencies is poor [1]. control in the DSP Texas TSM320C6713DSK, Section V,
Conclusions, and Section VI, Future work.
Active noise control refers to attenuate acoustic noise at
specific space points, without using passive methods (physical II. SYSTEM DESCRIPTION
barriers or hearing protection), between the noise source and For ANC is commonly used two different configurations of
the receptor. This technique is based on the wave the FxLMS algorithm, one is a feedback ANC approach
superposition principle, which tells how waves may interfere proposed by Olson and May in 1953 [10], in this scheme, a
on a constructive or destructive way, and just adding to the microphone is used as error sensor and also as reference
existing acoustic field, another wave with the same frequency sensor.
and amplitude, but opposite phase, then they interfere
destructively and cancel each other out. For ANC algorithm
design purposes, it is used the LMS algorithm invented by the
Standford University Professor, Bernard Widrow and his first
Figure 2. LMS algorithm block diagram, for system
This control setup is commonly used for control narrow band identification
or predictable noises, one of the applications of this approach Where x(n) is the input to the system identification
is controlling the sound field in headphones and hearing algorithm, which generally is a signal with equal energy in all
protectors [11]. The second is a feed-forward ANC approach, the frequencies, in this case it is used white noise as the input
which uses two sensors, an error sensor and a reference sensor. of the system. P(z) is the system to identify, which is the
This setup is used for narrow band noise control using a non- electro acoustic system (enclosure and transductors). W(z) is
acoustic reference sensor “accelerometer”, and for broad band the adaptive filter, whose coefficients are updated by the LMS
noise control using an acoustic reference sensor ”microphone” adaptive algorithm, until the error signal converges to zero.
[7]. In this case, it will be used a microphone as the reference
For the secondary path estimation, it is necessary an input
sensor. In the figure 1, we can observe the FxLMS block
and an output, which are the white noise and the signal
diagram algorithm for feed-forward active noise control.
recorded by the error microphone. Then, it is possible to put
these audio signals (input-output) into the algorithm to identify
the coefficients of the impulse response.
The adaptive algorithm depends of an optimization criterion
or cost function, which for LMS, is based in minimize the
mean square error, as it is shown in equation 1. Where d(n) is
the desired signal (observed output), and y(n) is the predicted
output.
J=E ¿
In order to minimize the MSE, it’s used the descendent
gradient method, shown in the equation 2. The equation 3 is the
Figure 1. FxLMS Algorithm for Feed forward Active Noise
solution to the descendent gradient method which minimizes
Control. [2]
the cost function, and it is obtained assuming that the input and
The Primary noise is the undesirable signal, which is tried output signals are jointly wide sense stationary processes [12].
to be attenuate, and this is measured by the input microphone
(reference signal). The secondary source (cancelling speaker) h ( n+1 ) =h ( n )−μ ∇ J ( n ) (2)
generates the control signal and finally the primary noise is
attenuated at the physical error microphone position. h ( n+1 ) =h ( n ) +2 μe ( n ) x ( n ) (3)
It is important to know the software elements that are part Where h(n+1) is the coefficient at instant (n+1), μ is the
of the ANC controller, these are: the LMS adaptive algorithm step size which controls the convergence and the stability of the
which update the coefficients of the W(z) adaptive filter, which algorithm, e(n) is the error signal and x(n) is the input signal.
is this case is represented as a FIR filter [8]. The C(z) filter B. Analitical solution (Least Mean Square) algorithm for
represented the secondary path estimation or the transfer system identification
function between the secondary source (control source) and the
error microphone [2].
Let us consider de output filter as a FIR filter
A. LMS (Least Mean Square) algorithm for system
N−1
identification
y ( n )= ∑ h (k )x (n−k )= X (n)T h
In this part it is described the implementation procedure of the k=0
LMS algorithm for system identification, which will be useful
in active noise control to estimate the secondary path transfer
function. The figure 2, describes the LMS block diagram Where:
algorithm, for system identification. T
x ( n )=[ x ( n ) , x ( n−1 ) , x ( n−2 ) , … .. , x ( n−N +1 ) ]
.
h ( n )=[ h ( 0 ) , h ( 1 ) , h ( 2 ) , … .., h ( N−1 ) ]

Then we can formulate the cost function:


J=E [(d (n )−x(n)T h )2 ]
J=E [(d 2 (n )]−2 E [d (n )x(n )T h ]+E[( x(n )T h)2 ] (4)
secondary source (cancelling speaker). Second, because of
this, the step size μ must be negative. Third, the input to the
R=E[ x(n ) x( n)T ] (5)
LMS block must be filtered by the secondary path estimation
C(z), and fourth, for simulation effects, must be included the
secondary path transfer function H(z).
P=E [ x (n )d (n)] (6)
Replacing (5) and (6) in (4)

J=E [ d 2 (n )]−2 E[ d (n) x(n )T h]+E [ hT Rh ]


J=E [ d 2 (n )]−E[ PT h ]−E [ PhT ]+E [hT Rh ]
J=σ 2 −PT h−PhT + hT Rh
d (7)
Figure 3. FxLMS algorithm block diagram, for active noise
Then we find the gradient of (7) control (ANC)
∂ J (h ) III. SIMULATION RESULTS
=−P−P+2 Rh
∂(h ) (8) In this section will be shown some results for off line
identification with LMS algorithm and simulation results for
Then we replace (8) in (2) FxLMS ANC algorithm, in order to evidence the algorithms
h( n+1)=h(n )−μ(−2 P+2 Rh) behavior before their implementation in the DSP card.
A. Offine LMS (Least Mean Square) identification results
h( n+1)=h(n )+2 μ( P−Rh ) (9) For LMS algorithm implementation it was used the software
To make the LMS adaptive filter more practical, our next step Matlab. To obtain results of the algorithm behavior, it was
is to eliminate, by an approximation, the need to know R and P. used the following elements: first, an electroacoustic sensor
We can form a very rough approximation of R and P, simply (dbx RTA omnidirectional condenser microphone), located at
by throwing away the expectation. Thus we use one of the the position which the sound pressure will be attenuate by the
sample values as an estimate of expected value. ANC algorithm. Second, a loudspeaker (control source, M-
T
^ =x ( n ) x ( n )
¿
audio Active Subwoofer 10 inches), which will reproduce the
R ¿ input signal, in this case “white noise”. Finally it is reproduce
(10)
the white noise through the loudspeaker for a minute, while
¿^ =x ( n ) d ( n )
the microphone is recording the signal that comes from the
P ¿ (11) speaker, then, both signals are used (reproduced and
Then we replace (10) and (11) in (9) recorded), as the input and output of the LMS identification
system, respectively. To measure the quality of the
h( n+1)=h(n )+2 μ( x (n )d( n)−x (n )x (n )T h(n )) identification, it is necessary to compare the estimated and the
real outputs; in this case it was used FIT equation 12, which
h( n+1)=h(n )+2 μx(n )( d (n)−x( n)T h(n )) shows a percentage of similarity. Table 1 shows the test results
with white noise as input (sample rate 8 Khz), for the
h( n+1)=h(n )+2 μx (n )e (n ) secondary path identification.
So we have the same equation (3) which find the coefficients
that minimizes the mean square error J. ‖ y−^y‖
FIT =100(1− )
C. FxLMS (Filtered x Least Mean Square) feedforward ‖ y−mean( y)‖
algorithm for active noise control (12)
The FxLMS algorithm it’s a variation of the LMS, it has been
widely used for active noise control, an important
characteristic is that it is required an estimation of the
secondary path C(z) [7], in the figure 3 it is shown the block
diagram of the algorithm FxLMS, which has four important
differences in comparison to LMS. First, the error signal is the
sum of the desired signal and the control signal, because the
total acoustic field is equivalent to the sum of the sound
pressure levels that comes from the primary noise and the
Where y is the real output and ^y is the estimated output. 700 -0.00000000003 Unstable
700 -0.000000000003 375 ms
System order FIT Step size Error convergence
μ time Table 2.FxLMS simulation results
100 NA 0.3 Not converge
100 NA 0.03 15ms Some points deserved to be remarked from table 2, if the filter
100 51% 0.003 25 ms order is higher: first, to stabilize the algorithm it is necessary
100 51% 0.0003 2s to increase the step size. Second, the error signal converges
100 43% 0.00003 12.5 s quickly. Also, if the step size is higher, the error signal
100 NA 0.000003 Not converge
converges slowly.
400 NA 0.3 Not converge
400 NA 0.03 Not converge IV. IMPLEMENTATION OF THE FXLMS ALGORITHM IN THE DSP
400 58% 0.003 20ms TEXAS INSTRUMENTS TSM320C6713DSK
400 76% 0.0003 1s For real time processing purposes, it is necessary the
400 72% 0.00003 9s
FxLMS implementation in a DSP card. To reach the target the
400 44% 0.000003 60 s
following elements were used: Matlab (Simulink), DSP Texas
700 NA 0.3 Not converge Instruments, Code Composer studio V3.1, USB Sound Card
700 NA 0.03 Not converge (M-box2), Active subwoofer 10 inches (Control Source),
700 NA 0.003 Not converge Active Tannoy Speaker 6 inches (Primary Source), Senheiser
700 87% 0.0003 0.8 s e614 condenser Microphone (reference microphone), dBx RTA
700 82% 0.00003 6.7 s condenser microphone (error microphone) and wiring need. In
700 58% 0.000003 60 s the figure 4, it is shown the ANC setup.
Table 1. Testing results for secondary path identification

Some points deserved to be remarked from table 1, if the filter


order is higher: first, to stabilize the algorithm it is necessary
to decrease the step size. Second, the FIT is higher and the
identification is more accurate, and three, the error signal
converges quickly. Also if the step size is lower, the error
signal converges slowly.
B. FxLMS (Filtered x Least Mean Square) ANC results
In order to obtain simulating results, it was used the secondary
path estimation (Impulse Response) obtained in the
preliminary identification stage. In the table 2, it is shown the
results for error convergence times, using several step sizes μ Figure 4. ANC setup (reference microphone at left and
and several orders for secondary path estimation. error microphone at right)
A. FxLMS Simulink Model
Secondary path estimation Step size Error convergence
First of all, it is necessary to make a Simulink model, which
order μ time
will be downloaded to the DSP card, through the compilation
100 -0.0003 Not converge
100 -0.00003 Unstable software “Code Composer Studio.” Then it is important to
100 -0.000003 Unstable design the following blocks (algorithms): LMS, Real Time
100 -0.0000003 120 ms Convolution and an adaptive FIR Filter. In the figure 4, it is
100 -0.00000003 170 ms shown the block diagram of the Simulink model, for a
100 -0.000000003 1.2 s secondary path estimation of 400 coefficients. Where P(z) is
the plant (primary path transfer function), C(z) is the secondary
400 -0.0003 Unstable
path estimation, W(z) is the adaptive filter, C(z)1 is the real
400 -0.00003 Unstable
400 -0.000003 Unstable
secondary path transfer function, and LMS the adaptive
400 -0.0000003 Unstable algortihm. The blocks called “W” are the memory algorithms,
400 -0.00000003 82 ms which store the update coefficients of the iterative process.
400 -0.000000003 346 ms

700 -0.0003 Unstable


700 -0.00003 Unstable
700 -0.000003 Unstable
700 -0.0000003 Unstable
700 -0.00000003 Unstable
700 -0.000000003 Unstable
700 -0.0000000003 Unstable
Table 3.FxLMS simulation results in Simulink

Frequency (Hz) Error convergence Atenuation


time (dB)
60 1s 31 dB
80 1.3 s 27.4 dB
100 2.3 s 27 dB
120 0.6 s 31.4 dB
140 2.5 s 34 dB
160 1.5 s 33.9 dB
190 15 s 30.5 dB

Figure 6. Error Signal using an audio recording of the


compressor noise

The error signal obtained for simulation in Simulink, for the


compressor noise (figure 6), gives an attenuation of 6 dB.
C. FxLMS Error convergence time Results in the DSP card
In the same way like in simulink, the low frequencie
signals and the compressor noise were used as input to the
active noise control system. To download the algorithm to the
DSP, it was performed the setup described in the figure 7. As
it can be seen, it is just necessary to used the adaptive filter
W(z), the LMS algorithm and the secondary path estimation
C(z), since the secondary and primary paths are the real
transfer functions of the electro-acoustic system. The block
Figure 5. Block diagram of the FxLMS algorithm, for DAC is the digital-analog converter which sends the control
active noise control in simulink (400 coefficients) signal to the control speaker, and the ADC block is the analog-
digital converter which capture the signals from the reference
B. FxLMS Results in simulink and error microphone.
To obtained simulation results in Simulink, several audible
low frequencies were used (60, 80, 100. 120, 140, 160 and 190
Hz). In the table 3 it is shown the results.

Also it was used the compressor noise as input to the Simulink


model, in the figure 6, it is shown the error signal for 400
coefficients and step size μ = -0.0003, using the noise of the
machine (compressor), as input to the control system. This
configuration was used, because it was the only setup which
works well, with 74% of FIT. The other configuration tested
offers no satisfactory results, because the error signal does not
converge or it becomes unstable.
Figure 7 FxLMS Simulink model for implementation in the
DSP card

In the table 5. It is shown the results, for the FxLMS DSP


implementation.
Frequency (Hz) Error convergence Atenuation
time (dB)
60 2s 27.6 dB
80 2s 26.4 dB
100 2.4 s 27.3 dB
120 5s 23. 1 dB
140 27 s 21.7 dB
160 45 s 21.3 dB
190 130 s 20.5 dB

Table 5. FxLMS results in DSP

For monitoring purposes, the output of the error signal was


recorded to a digital audio workstation. In the figures 8 (time) Figure 9. Control results in the DSP (100 Hz)
and 9 (frequency), it is shown the error signal for 400
coefficients and step size μ = -0.003, using a frequency of 100 In the figures 10 (time) and 11 (frequency), it is shown the
HZ as input to the control system. error signal for 400 coefficients, μ = -0.0003, using the noise
of the machine (compressor), as input to the control system.

Figure 10. Control results in the DSP (compressor)

Figure 8. Control results in the DSP (100 Hz)

Figure 11. Control results in the DSP (compressor)


[2] P.B. Pathak and M.P.P. Hirave “FxLMS Algorithm for active noise
cancellation”, pp. 978-981, 2012.
[3] E. N. Rivas and P. Lischinsky “HERRAMIENTA DE SOFTWARE
LIBRE CON ACCESO”, 2008.
[4] R. A. Quintana-Soler and D.A. Patiño Guevara “Identificación de
We can observe that the principal attenuation were in the sistemas aplicado a un recinto reverberante” pp. 1-10. 2014
range of 0 Hz to 60 Hz. [5] LJUNG, Lennart. System identification. Birkhäuser Boston, 1998.
[6] B. Widrow and S.D. Stearns, Adaptive Signal Proccesing, Prentice-Hall.
V. CONCLUSIONS 1985.
It is important to consider that the control in the DSP it [7] S. Kuo, Gan, W, Kalluri, Active Noise Control Systems, Algorithms and
DSP Implementation. New York, 1996.
worked only to 190 Hz, since the control source used was
[8] J. Proakis and D. Manolakis, Digital Signal Proccesing, principles,
limited to play higher frequencies, because the subwoofer has algorithms and applications. Prentice Hall. 1996.
a High-pass/low-pass linked filter from 50 Hz to 200 Hz. [9] S.Y. Radiocomunicaciones, TESIS DOCTORAL Ingeniería avanzada
para sistemas de control de ruido acústico mediante técnicas adaptativas.
The low frequency tones used for ANC in the DSP card were 1998.
attenuated around 20 and 26 decibels. DSP control tests [10] Olson, H.F, and E. G. May, “Electronic Sound Absorber,” J. Acoust.
carried out with the compressor noise were unsatisfactory, Soc. Am., Vol 25, No. 6, Nov. 1953, pp. 1130-1136
since no significant attenuation of the signal was achieved. [11] Gan, W.S.; Mitra, S.; Kuo, S.M.: Adaptive feedback activenoise control
headset: implementation, evaluation an its extensions. IEEE Trans.
The largest was 4 dB attenuation. Consum. Electron., 51 (3) (2005), 975–982.
[12] Diniz, P. S. (1997). Adaptive filtering. Boston, MA: Kluwer.
VI. FUTURE WORK
[13] Kostek, T. M., & Franchek, M. A. (2000). Hybrid noise control in ducts.
It is important to test the behavior of other identification Journal of Sound and Vibration, 237(1), 81-100.
algorithms, like the normalized LMS or the recursive LMS for [14] Kuo, S. M., Mitra, S., & Gan, W. S. (2006). Active noise control system
active noise control applications. It is possible to design LMS for headphone applications. Control Systems Technology, IEEE
Transactions on, 14(2), 331-335.
algorithm in frequency domain, in order to reduce processing
[15] Bao, C., Sas, P., & Van Brussel, H. (1993). Adaptive active control of
overloads in DSP. LMS could even be used for online noise in 3-D reverberant enclosures. Journal of sound and vibration,
identification systems. Also it can experiment the use of other 161(3), 501-514.
digital realizations of FIR or IIR filters direct form II, [16] S. M. Kuo and D. Vijayan, “Adaptive algorithms and experi-mental
transpose, cascade or lattice, etc. verification of feedback active noise control systems,”Noise Control
Eng. J., vol. 42, pp. 37–46, Mar.–Apr. 1994
It is important to evaluate the active noise control for smaller [17] S. J. Elliott, P. A. Nelson, I. M. Stothers, and C. C. Boucher, “In-flight
experiments on the active control of propeller-inducedcabin noise,” J.
sample rates, since the sample rate used were 8 KHz, and also Sound Vibration, vol. 140, no. 2, pp. 219–238, 1990.
evaluate the ANC behavior in the DSP with a control source [18] De Diego, M., Gonzalez, A., Pinero, G., Garcia, C., & Ferrer, M. (2000).
which can play higher frequencies, like 500 Hz or higher. Acoustic field conformation using multichannel active noise control
techniques. In Sensor Array and Multichannel Signal Processing
REFERENCES Workshop. 2000. Proceedings of the 2000 IEEE (pp. 202-206). IEEE.
[19] Moon, T. K., & Stirling, W. C. (2000). Mathematical methods and
algorithms for signal processing (Vol. 1). New York: Prentice hall.
[1] D. A. Harris, Noise Control Manual: Guidelines for problem solving in
the industrial/commercial acoustical environment, 1 st ed. Van Nostrand
Reinhold, 1991, p. 172.

You might also like