Active Noise Control Using LMS & NLMS
Algorithm
Desai Nilay1 , Pandya Utpal2 , and Desai Chintan3
Chhotubhai Gopalbhai Patel Institute of Technology, Bardoli, India
[email protected], xyz ,
[email protected] Abstract. Active filtering is a wide area of researcher in present decade
in the field of communication. Active noise cancellation is a new approach
used for noise reduction in speech signal. As received signal is continu-
ously corrupted by noise where both received signal and noise signal
both changes continuously, then this arise the need of active filtering.
This paper deals with cancellation of noise on speech signal using two
adaptive algorithms least mean square (LMS) algorithm and NLMS al-
gorithm. And compare them for better performance and provide efficient
performance with less computational complexity.
Keywords: Active noise control (ANC), LMS Algorithm, NLMS algo-
rithm, Adaptive filtering.
1 Introduction
Acoustic noise problems becomes more pronounce as increase in number of in-
dustrial equipment such as engines, transformers, compressors and blowers are
in use. The traditional approach to acoustic noise cancellation uses passive tech-
niques such as enclosures, barriers and silencers to remove the unwanted noise
signal [1][2]. Silencers are important for noise cancellation over broad frequency
range but ineffective and costly at low frequencies. Mechanical vibration is a type
of noise that creates problems in all areas of communication and electronic appli-
ances. Signals are carriers of information, both useful and unwanted. Extracting
or enhancing the useful information from a mix of conflicting information is a
simplest form of signal processing. Signal processing is an operation designed for
extracting, enhancing, storing, and transmitting useful information. The another
approach is the time domain approach in which directly signal is thresholded so
noise is removed from the signal. But the time domain methods are not efficient.
Hence signal processing is more useful. In contrast to the conventional filter de-
sign techniques, adaptive filters do not have constant filter coefficients and no
priori information is known. Such a filter with adjustable parameters is called
an adaptive filter. Adaptive filter adjust their coefficients to minimize an error
signal and can be realized as finite impulse response (FIR), infinite impulse re-
sponse (IIR), lattice and transform domain filter [4]. The most common form of
adaptive filter is the transversal filter using least mean square (LMS) algorithm
and NLMS algorithm.
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
In this paper, noise is defined as any kind of undesirable signal, whether it
is borne by electrical, vehicle, acoustic, vibration or any other kind of media. In
this paper, adaptive algorithms are applied to different kind of noise.
The basic idea of an adaptive noise cancellation algorithm is to pass the
corrupted signal through a filter that tends to suppress the noise while leaving the
signal unchanged. This is an adaptive process, which means it does not require
a priori knowledge of signal or noise characteristics. Active noise cancellation
(ANC) efficiently attenuates low frequency noise for which passive methods are
ineffective. Although both FIR and IIR filters can be used for adaptive filtering,
the FIR filter is by far the most practical and widely used. The reason being that
FIR has adjustable zeros, and hence it is free of stability problems associated
with adaptive IIR filters that have adjustable poles as well as zeros.
2 LEAST MEAN SQUARE ALGORITHM
To make exact measurements of the gradient vector at each iteration n, and if
the step-size parameter is suitably chosen then the tap-weight vector computed
by using the steepest descent algorithm would converge to the optimum wiener
solution. The exact measurements of the gradient vector are not possible and
since that would require prior knowledge of both the autocorrelation matrix
R of the tap inputs and the cross correlation vector p between the tap inputs
and the desired response, the optimum wiener solution could not be reached [3].
Consequently, the gradient vector must be estimated from the available data
when we operate in an unknown environment.
After estimating the gradient vector we get a relation by which we can update
the tap weight vector recursively as:
where µ = step size parameter
µH (n) = Hermit of a matrix µ (1)
We may write the result in the form of three basic relations as follows:
1. Filter output:
y(n) = wH (n)u(n) (2)
2. Estimation error or error signal:
e(n) = d(n) − y(n) (3)
3. Tap weight adaptation:
w(n + 1) = w(n) + µu(n)e∗ (n) (4)
Above equations are define the estimation error e(n), the computation of which is
based on the current estimate of the tap weight vector w(n). Note that the second
term, u(n)e*(n) on the right hand side of equation represents the adjustments
that are applied to the current estimate of the tap weight vector w(n). The
iterative procedure is started with an initial guess w(0). The algorithm described
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 2
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
by above equations is the complex form of the adaptive least mean square (LMS)
algorithm. At each iteration or time update, this algorithm requires knowledge of
the most recent values u(n), d(n) & w(n). The LMS algorithm is a member of the
family of stochastic gradient algorithms. In particular, when the LMS algorithm
operates on stochastic inputs, the allowed set of directions along which we step
from one iteration to the next is quite random and therefore cannot be thought
of as consisting of true gradient directions.
3 NOISE CANCELLATION
Fig. 1 shows the basic problem and the adaptive noise cancelling solution to it.
A signal s is transmitted over a channel to a sensor that also receives a noise n0
uncorrelated with the signal. The primary input to the canceller is combination
of both signal and noise s + n0. A second sensor receives a noise uncorrelated
with the signal but correlated with the noise. This sensor provides the reference
input to the canceller. This noise n1 is filtered to produce an output y that is
as close a replica of no. This output of the adaptive filter is subtracted from
the primary input to produce the system output would be signal alone. But the
characteristics of the transmission paths are unknown and are not of a fixed
nature, due to this use of a fixed filter are not feasible.
Fig. 1: Active Noise cancellation Concept
In Fig. 1 the reference input is processed by an adaptive filter. An adaptive
filter is that which automatically adjusts its own impulse response. Adjustment
is accomplished through an algorithm. The filter can operate under changing
conditions and can readjust itself continuously to minimize the error signal [6].
In noise cancelling systems the practical objective is to produce a system
output that is a best fit in the least squares sense to the signal s. This objective
is accomplished by feeding the system output back to the adaptive filter and
adjusting the filter through an LMS adaptive algorithm to minimize total system
output power. In an adaptive noise cancelling system, the system output serves
as the error signal for the adaptive process.
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 3
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
The prior knowledge of the signal s or of the noises n0 and n0 would be
necessary before the filter could be designed to produce the noise cancelling
signal y.
Assume that s, n0, n1 and y are statistically stationary and have zero means.
Assume that s is uncorrelated with n0 and, n1 and suppose that n1 is correlated
with n0. The output z is
z = s + n0 − y (5)
After Squaring, we obtain
z 2 = s2 + (n0 − y)2 + 2s(n0 − y) (6)
Taking expectations both side of the equation
E[z 2 ] = E[s2 ] + E[(n0 − y)2 ] + 2E[s(n0 − y)] (7)
Realizing that s is uncorrelated with n0
E[z 2 ] = E[s2 ] + E[(n0 − y)2 ] (8)
The signal power will be unaffected as the filter is adjusted to minimize [3].
Accordingly, the minimum output power is
min E[z 2 ] = E[s2 ] + min E[(n0 − y)2 ] (9)
When the filter is adjusted for the E[z2 ] minimized, therefore E[(n0 − y)2 ] is,
also minimized. The filter output y is then a best least squares estimate of the
primary noise n0
Adapting the filter to minimize the total output power is thus causing the
output z to be a best least squares estimate of the signal s.
The output z will contain the signal s plus noise, the output noise is given
by n0 − y.
Since minimizing E[z 2 ] minimizes E[(n0 − y)2 ] minimizing the total output
power minimizes the output noise power. Since the signal in the output remains
constant, minimizing the total output power maximizes the output signal to
noise ratio.
The smallest possible output power is
E[z 2 ] = E[s2 ] (10)
When
E[(n0 − y)2 ] = 0 (11)
At y = z0 and z = s.
Minimizing the output power causes the output signal to be perfectly noise
free.
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 4
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
4 NORMALISED LMS (NLMS) ALGORITHM FOR
ADAPTIVE FILTER
A general form of the adaptive filter is illustrated in Fig. 2. where d(n) is a desired
response (or primary input signal), y(n) is the actual output of a programmable
digital filter driven by a reference input signal x(n), and the error e(n) is the
difference between d(n) and y(n). The function of the adaptive algorithm is to
adjust the digital filter coefficients to minimize the mean-square value of e(n).
A technique to adjust the convergence speed is the Normalized LMS (NLMS)
algorithm. The NLMS is shown as follows:
w(n + 1) = w(n) + µ(n)x(n)e(n) (12)
µ(n) is adaptive step size which is calculated from the power and the step
size of the filter [7].
5 RESULTS
In this section we compare the performance of the LMS and NLMS algorithms
as noise canceller. The algorithms are implemented according to the steps. Fig.
3 shows that, the input sinusoidal signal and noisy signal. Fig. 4 shows that,
the noise present in the sinusoidal signal and is eliminated using LMS algorithm
of order 3. Fig. 5 shows that, the noise present in the sinusoidal signal and is
eliminated using NLMS algorithm of order 3.
Fig. 2: Basic Adaptive filter [4]
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 5
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
Fig. 3: Input Sinusoidal and noisy signal
Fig. 4: LMS filter output
Fig. 5: NLMS filter output
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 6
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
6 CONCLUSION
This paper has described an application in which the use of an LMS and NLMS
adaptive filter is particularly appropriate. The main work of this paper is to
investigate the application of an algorithm based on adaptive filtering in noise
cancellation problem. The LMS and NLMS algorithm has been shown to produce
good results in a noise cancellation problem. If our input changes gradually the
NLMS filter is working better than the LMS algorithm.
References
1. Adaptive Filter Theory by Simen Haykin: 3rd edition, Pearson Education Asia,
LPE.
2. Adaptive Signal Processing by John G Proakis, 3rd edition, Perntice Hall of India.
3. B. Widow, Adaptive noise canceling: principles and applications, Proceedings of the
IEEE, vol. 63, pp. 1692-1716, 1975.
4. Adaptive Signal Processing by Bernard Widrow and Samuel D. Stearns; Pearson
Education Asia.
5. Adaptive Filtering, Prediction and Control by G. Goodwin, K. Sin, Englewood
Cliffs, Prentice- Hall, 1985.
6. Soni Changlani & Dr. M. K. Gupta, The applications And Simulation of Adaptive
Filter In Speech Enhancement, in International Journal of Computer Engineering
And Architecture, Vol. 1, No. 1, pp. 95-101, June 2011.
7. Ying He, Hong He, LiLi, YiWu and Hongyan Pan, The Applications and Simulation
of Adaptive Filter in Noise Cancelling, in International conference on computer
Science and Software Engineering, 2008.
About Authors
Nilay Desai has received B. E. degree in Electronics and Com-
munication Engineering in 2011, M. E. degree in Electronics and
Communication Engineering in 2013. He has 4 years of teaching
experience at under graduate (UG) level and 2 years of teaching
experience at post graduate (PG) level. Currently, Nilay Desai is a
Assistant Professor with Electronics & Communication/Electrical
Engineering Department, Chhotubhai Gopalbhai Patel Institute of Technology,
Bardoli, Surat, India. His areas of specialization are Digital Signal Processing,
Digital Image Processing. His areas of interest are Digital Signal Processing,
Biomedical Signal Processing, Microprocessor and Microcontroller, Digital Im-
age Processing.
Prof. Chintan Desai has received B. E. degree in Electronics
and Communication Engineering in 2008, M. Tech. degree in Dig-
ital Electronics and Advanced Communication in 2010. He has 7
years of teaching experience at under graduate (UG) and 3 years of
teaching experience at post graduate (PG) level. Currently, Chin-
tan Desai is Assistant Professor with Electronics & Communication / Electrical
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 7
Desai Nilay Active Noise Control Using LMS & NLMS Algorithm
Pandya Utpal
Desai Chintan
Engineering Department, Chhotubhai Gopalbhai Patel Institute of Technology,
Bardoli, Surat, India. His area of specialization are Digital Electronics, Informa-
tion Theory and Coding, Error Control Coding. His areas of interest are Digital
Electronics, Information Theory and Coding, Error Control Coding, Micropro-
cessor and Interfacing, Optical Fiber Communication, Basics of Electrical and
Electronics, Electronic Communication, Microcontroller and Applications.
Journal of Engineering & Technology (JET) - Volume 1 - Issue 1 & 2 8