Vous êtes sur la page 1sur 6

Raj Kumar Thenua et. al.

/ International Journal of Engineering Science and Technology


Vol. 2(9), 2010, 4373-4378

SIMULATION AND PERFORMANCE


ANALYASIS OF ADAPTIVE FILTER IN
NOISE CANCELLATION
RAJ KUMAR THENUA
Department of Electronics & Instrumentation, Anand Engineering College,
Agra, Uttar Pradesh-282007,India

S.K. AGARWAL
Department of Electronics & Communication, Sobhasaria Engineering College,
Sikar, Rajasthan-332021, India
Abstract
Noise problems in the environment have gained attention due to the tremendous growth of technology that has
led to noisy engines, heavy machinery, high speed wind buffeting and other noise sources. The problem of
controlling the noise level has become the focus of a tremendous amount of research over the years. In last few
years various adaptive algorithms are developed for noise cancellation. In this paper we present an
implementation of LMS (Least Mean Square), NLMS (Normalized Least Mean Square) and RLS (Recursive
Least Square) algorithms on MATLAB platform with the intention to compare their performance in noise
cancellation. We simulate the adaptive filter in MATLAB with a noisy tone signal and white noise signal and
analyze the performance of algorithms in terms of MSE (Mean Squared Error), percentage noise removal,
computational complexity and stability. The obtained results shows that RLS has the best performance but at the
cost of large computational complexity and memory requirement.
Keywords: Adaptive filter; convergence speed; LMS; Mean Squared Error; NLMS; RLS.
1. Introduction
In the process of transmission of information from the source to receiver side, noise from the surroundings
automatically gets added to the signal. This acoustic noise [1] picked up by microphone is undesirable, as it
reduces the perceived quality or intelligibility of the audio signal. The problem of effective removal or reduction
of noise is an active area of research [2]. The usage of adaptive filters is one of the most popular proposed
solutions to reduce the signal corruption caused by predictable and unpredictable noise.
An adaptive filter [3] has the property of self-modifying its frequency response to change the behavior in
time, allowing the filter to adapt the response to the input signal characteristics change. Due to this capability
the overall performance and the construction flexibility, the adaptive filters have been employed in many
different applications, some of the most important are: telephonic echo cancellation [1], radar signal processing,
navigation systems, communications channel equalization and biometrics signals processing.
The purpose of an adaptive filter in noise cancellation is to remove the noise from a signal adaptively to
improve the signal to noise ratio. Figure 1 shows the diagram of a typical Adaptive Noise Cancellation (ANC)
system [4]. The discrete adaptive filter processed the reference signal x(n) to produce the output signal y(n) by a
convolution with filters weights w(n).The filter output y(n) is subtracted from d(n) to obtain an estimation error
e(n). The primary sensor receives noise x1(n) which has correlation with noise x(n) in an unknown way. The
objective here is to minimize the error signal e(n). This error signal is used to incrementally adjust the filters
weights for the next time instant.
The basic adaptive algorithms which widely used for performing weight updation of an adaptive filter are:
the LMS (Least Mean Square), NLMS (Normalized Least Mean Square) and the RLS (Recursive Least Square)
algorithm [5]. Among all adaptive algorithms LMS has probably become the most popular for its robustness,
good tracking capabilities and simplicity in stationary environment. RLS is best for non-stationary environment
with high convergence speed but at the cost of higher complexity. Therefore a tradeoff is required in
convergence speed and computational complexity, NLMS provides the right solution.

ISSN: 0975-5462

4373

Raj Kumar Thenua et. al. / International Journal of Engineering Science and Technology
Vol. 2(9), 2010, 4373-4378
2. Adaptive algorithms
2.1 LMS algorithm
The LMS is one of the simplest algorithm used in the adaptive structures due to the fact that it uses the error
signal to calculate the filter coefficients. The output y(n) of FIR filter structure can be obtain from Eq. (1)[6].
N 1

y ( n) w(m) x (n m)

(1)

m 0

Where n is no. of iteration


The error signal is calculated by Eq. (2)
e( n ) d ( n ) y ( n )

( 2)

The filter weights are updated from the error signal e(n) and input signal x(n) as in Eq. (3).
w( n 1) w(n) e(n) x(n)
(3)
Where: w(n) is the current weight value vector, w(n+1) is the next weight value vector, x(n) is the input
signal vector, e(n) is the filter error vector and is the convergence factor which determine the filter
convergence speed and overall behavior.

Signal
Source

s(n)

Primary Sensor

d(n)

x1(n)

Noise
Source

Reference Sensor
x(n)

Adaptive
Filter

Output

e(n)
_

y(n)

Adaptive Noise Canceller


Fig.1 Adaptive Noise Cancellation

2.2 NLMS algorithm


In the standard LMS algorithm, when the convergence factor is large, the algorithm experiences a gradient
noise amplification problem. In order to solve this difficulty, we can use the NLMS (Normalized Least Mean
Square) algorithm. The correction applied to the weight vector w(n) at iteration n+1 is normalized with
respect to the squared Euclidian norm of the input vector x(n) at iteration n.
We may view the NLMS algorithm as a time-varying step-size algorithm, calculating the convergence factor
as in Eq. (4)[7].

4
( n)
2
c x(n)

Where: is the NLMS adaption constant, which optimize the convergence rate of the algorithm and should
satisfy the condition 0< <2, and c is the constant term for normalization and is always less than 1.
The Filter weights are updated by the Eq. (5).

w( n 1) w( n)

c x(n)

e( n ) x ( n )

(5)

2.3 RLS algorithm

ISSN: 0975-5462

4374

Raj Kumar Thenua et. al. / International Journal of Engineering Science and Technology
Vol. 2(9), 2010, 4373-4378
The RLS algorithms are known for their excellent performance when working in time varying environments
but at the cost of an increased computational complexity and some stability problems. In this algorithm the filter
tap weight vector is updated using Eq. (6) [8].
wn w T n 1 k n en 1 n

( 6)

Eq. (7) and (8) are intermediate gain vector used to compute tap weights.

k n u n / xT n u n

(7 )

u (n) w (n 1) x ( n)

(8)

Where: is a small positive constant very close to, but smaller than 1.
The filter output is calculated using the filter tap weights of previous iteration and the current input vector as
in Eq. (9).

y n1 n w T n 1xn

(9)

en1 n d n yn1 n

(10)

In the RLS Algorithm the estimate of previous samples of output signal, error signal and filter weight is
required that leads to higher memory requirements.
3. Simulation Results
In the simulation the reference input signal x(n) is a white Gaussian noise of power two-dB generated using
randn function in MATLAB, the desired signal d(n) ,obtained by adding a delayed version of x(n) into clean
signal s(n), d(n) = s(n) + x1(n) as shown in Fig.2.

Fig.2:(a) Clean tone(sinusoid) signal s(n);(b)Noise signal x(n);(c) Delayed noise signal x1(n);(d) desired signal d(n)

The simulation of the LMS algorithm is carried out with the following specifications:
Filter order N=19, step size = 0.001 and iterations= 8000
The LMS filtered output is shown in Fig.3 (a), the mean squared error generated as per adaption of filter
parameters is shown in Fig.3 (b). The step size control the performance of the algorithm, if is too large the
convergence speed is fast but filtering is not proper, if is too small the filter gives slow response, hence the
selection of proper value of step-size for specific application is prominent to get good results. The effect of stepsize on mean squared error is illustrated in Fig.7.

ISSN: 0975-5462

4375

Raj Kumar Thenua et. al. / International Journal of Engineering Science and Technology
Vol. 2(9), 2010, 4373-4378

Fig.3: MATLAB simulation for LMS algorithm; N=19, step size=0.001

Fig.4: MATLAB simulation for NLMS algorithm; N=19, step size=0.001

Fig.5: MATLAB simulation for RLS algorithm; N=19, lembda=1

Fig.4 and Fig.5 shows the output results for NLMS and RLS algorithms respectively. If we investigate the
filtered output of all algorithms, LMS adopt the approximate correct output in 2800 samples, NLMS adopt in
2300 samples and RLS adopt in 300 samples. This shows that RLS has fast learning rate.
The filter order also affect the performance of a noise cancellation system.Fig.6 illustrate how the MSE
change as we change filter order, when filter order is less (<15) LMS has good MSE as compared to NLMS and
RLS but as the filter order increased (>15) the performance of RLS becomes good and LMS has poor
performance it proves that the selection of right filter order is necessary to achieve the best performance. In our
work the appropriate filter order is 19 therefore all simulations are carried out at N=19.
In table1 performance analysis of all three algorithms is presented in term of MSE, percentage noise reduction,
computational complexity and stability [9]. It is clear from the table1, the computational complexity and
stability problems increases in an algorithm as we try to reduce the mean squared error. NLMS is the favorable
choice for most of the industries due less computational complexity and fair amount of noise reduction.

ISSN: 0975-5462

4376

Raj Kumar Thenua et. al. / International Journal of Engineering Science and Technology
Vol. 2(9), 2010, 4373-4378

Fig.6 MSE versus filter order (N)

Fig.7 MSE versus Step-size () for LMS algorithm


Table1. Performance comparison of various adaptive algorithms

S.N

Algorithm Mean
Squared

% Noise

Complexity

Reduction

(No. of multiplications

Stability

per iteration)

Error
(MSE)
1.

LMS

2.510-2

91.62%

2N+1

Highly Stable

-2

93.85%

5N+1

Stable

98.78%

4N2

less Stable

2.

NLMS

2.110

3.

RLS

1.710-2

4. Conclusions
In this work, different Adaptive algorithms were analyzed and compared. These results shows that the LMS
algorithm has slow convergence but simple to implement and gives good results if step size is chosen correctly
and is suitable for stationary environment. For a lower filter order (<15) the LMS proved to have the lowest
MSE then the NLMS and RLS, but as we increase the filter order (>15) the results showed the opposite, so we
need to take this in consideration when selecting the algorithm for a specific application.

ISSN: 0975-5462

4377

Raj Kumar Thenua et. al. / International Journal of Engineering Science and Technology
Vol. 2(9), 2010, 4373-4378
When input signal is non-stationary in nature, the RLS algorithm proved to have the highest convergence
speed, less MSE, and highest percentage of noise reduction but at the cost of large computational complexity
and memory requirement.
The NLMS algorithm changes the step-size according to the energy of input signals hence it is suitable for
both stationary as well as non-stationary environment and its performance lies between LMS and RLS. Hence it
provides a trade-off in convergence speed and computational complexity. The implementation of algorithms
was successfully achieved, with results that have a really good response.
References
[1] J. Benesty, et. al. , Adaptive Filtering Algorithms for Stereophonic Acoustic Echo Cancellation, International
Conference on Acoustics, Speech, and Signal Processing, 1995, vol.5, Page(s): 3099 3102.
[2] Bernard Widrow, et. al. Adaptive Noise Cancelling: Principles and Applications, Proceedings of the IEEE, 1975,
Vol.63 , No. 12 , Page(s): 1692 1716.
[3] Simon Haykin, Adaptive Filter Theory, Prentice Hall, 4th edition.
[4] Ying He, et. al. The Applications and Simulation of Adaptive Filter in Noise Canceling, 2008 International
Conference on Computer Science and Software Engineering, 2008, Vol.4, Page(s): 1 4.
[5] Paulo S.R. Diniz, Adaptive Filtering: Algorithms and Practical Implemetations ,ISBN 978-0-387-31274-3, Kluwer
Academic Publisher 2008 Springer Science+Business Media, LLC, pp.77-195.
[6] Slock, D.T.M., On the convergence behavior of the LMS and the normalized LMS algorithms, IEEE Transactions on
Signal Processing, 1993,Vol. 41, Issue 9, pp. 2811-2825.
[7] Abhishek Tandon, M. Omair Ahmad, An efficient, low-complexity, normalized LMS algorithm for echo cancellation
The 2nd Annual IEEE Northeast Workshop on Circuits and Systems, 2004. NEWCAS 2004, Page(s): 161 164.
[8] Sanaullah Khan, M.Arif and T.Majeed, Comparison of LMS, RLS and Notch Based Adaptive Algorithms for Noise
Cancellation of a typical Industrial Workroom, 8th International Multitopic Conference, 2004, Page(s): 169 173.
[9] Yuu-Seng Lau, Zahir M. Hussian and Richard Harris, Performance of Adaptive Filtering Algorithms: A Comparative
Study, Australian Telecommunications, Networks and Applications Conference (ATNAC), Melbourne, 2003.

ISSN: 0975-5462

4378

Vous aimerez peut-être aussi