0% found this document useful (0 votes)
72 views5 pages

Active Noise Cancellation Using Adaptive Filter Algorithms IJERTV7IS020020

This document discusses active noise cancellation using adaptive filter algorithms. It summarizes three algorithms: (1) Least Mean Square (LMS) which minimizes the mean square error and updates filter weights in each sample to reduce error, (2) Normalized LMS which improves on LMS by including a step size normalization, and (3) Recursive Least Squares (RLS) which more complex but converges faster than LMS/NLMS and has better performance in minimizing mean square error. The paper focuses on enhancing speech signals by reducing noise using these adaptive filter algorithms on a DSP processor.

Uploaded by

Vishnu Priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views5 pages

Active Noise Cancellation Using Adaptive Filter Algorithms IJERTV7IS020020

This document discusses active noise cancellation using adaptive filter algorithms. It summarizes three algorithms: (1) Least Mean Square (LMS) which minimizes the mean square error and updates filter weights in each sample to reduce error, (2) Normalized LMS which improves on LMS by including a step size normalization, and (3) Recursive Least Squares (RLS) which more complex but converges faster than LMS/NLMS and has better performance in minimizing mean square error. The paper focuses on enhancing speech signals by reducing noise using these adaptive filter algorithms on a DSP processor.

Uploaded by

Vishnu Priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Published by : International Journal of Engineering Research & Technology (IJERT)

http://www.ijert.org ISSN: 2278-0181


Vol. 7 Issue 02, February-2018

Active Noise Cancellation using Adaptive Filter


Algorithms
B A Sujathakumari Ravi S Barki
Associate Professor 1st Sem M Tech
Sri Jayachamarajendra College of Engineering Sri Jayachamarajendra College of Engineering
JSS Science &Technology University, Mysuru, India JSS Science &Technology University, Mysuru, India

Lokesh A R Pavithra C M
1st Sem M Tech 1st Sem M Tech
Sri Jayachamarajendra College of Engineering Sri Jayachamarajendra College of Engineering
JSS Science &Technology University, Mysuru, India JSS Science &Technology University, Mysuru, India

Abstract:- This paper describes a speech enhancement system II NOISE CANCELLATION USING ADAPTIVE FILTER
based on TMS320C6713 digital signal processor (DSP) for active The Single channel adaptive feedback Active Noise
real-time noise cancellation. In conventional FIR and IIR digital Cancellation (ANC) system works by processing the acoustical
filters, it is assumed that the process parameters to determine the noise (the “target” noise) that would like to reduce, by
filter characteristics are known. They may vary with time, but
the nature of the variation is assumed to be known. In many
producing an anti-noise which cancels out the noise component
practical problems, there may be a large uncertainty in some by the method of adaptive filtering. Therefore, the main aim of
parameters because of inadequate prior test data about the ANC system is to reduce the noise component from the signal
process. Some parameters might be expected to change with time, of interest. Figure 1 shows schematic diagram of a single
but the exact nature of the change is not predictable. In such channel feedback ANC system
cases it is highly desirable to design the filter to be self-learning so
that it can adapt itself to the situation at hand.
. In this paper the focus is on enhancement of speech audio
signal from noise and will compare Least Mean-Square (LMS),
Normalized Least Mean-Square (NLMS) and Recursive Least
Square (RLS) algorithms using DSP processor with code
composer studio (CCS)

Keywords: Adaptive noise cancellation (ANC), LMS algorithm,


NLMS algorithm, RLS algorithm, adaptive filter

I. INTRODUCTION Fig1: Single channel feedback active noise cancellation


Adaptive filters are best used in cases where signal conditions The anti-noise waveform is similar to that of the target noise,
or system parameters are slowly changing and the filter is to except its phase is reversed by 180 degrees. If these waveforms
be adjusted to compensate for this change. A very simple but are combined together. It will result in a much weaker residual
powerful filter is called the linear adaptive combiner, which is waveform (this waveform should be of zero amplitude if the
nothing more than an adjustable FIR filter. anti-noise matches perfectly with the target noise).
The LMS criterion is a search algorithm that can be used to
The residual waveform is what is picked up by the microphone
provide the strategy for adjusting the filter coefficients.
as shown in figure2. The feedback ANC system produces an
In conventional FIR and IIR digital filters, it is assumed that
anti-noise by predicting the incoming target noise
the process parameters to determine the filter characteristics
are known. They may vary with time, but the nature of the
variation is assumed to be known. In many practical problems,
the coefficients of an adaptive filter are adjusted to
compensate for changes in input signal, output signal or
system parameters. Instead of being rigid, an adaptive system
can learn the signal characteristics and track slow changes. An
adaptive filter can be very useful when there is uncertainty
about the characteristics of a signal or when these
characteristics change.

Fig 2: Description of active noise control

IJERTV7IS020020 www.ijert.org 15
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 7 Issue 02, February-2018

III. NOISE CANCELLATION USING ADAPTIVE FILTER


ALGORITHMS
(i) LEAST MEAN SQUARE (LMS) ALGORITHM
In the LMS algorithm, the coefficients are adjusted from
sample to sample in such a way as to minimize the Mean
Square Error (MSE).The LMS is based on the steepest descent
algorithm where the weight vector is updated from sample to
sample as follows
Wk+1 = Wk - µk (1)
Where Wk and µk are the weight and the true gradient vectors,
respectively at the kth sampling instant. µ controls the stability
and rate of convergence.

1. Initially, set each weight to an arbitrary fixed value as 0.


For each subsequent sampling instant, k, carryout steps
from 2 to 4 below.
2. Compute filter output
n’k= Σw (i) x k-i (2)

3. Compute the error estimate

ek = yk – n’k (3)

4. Update the next filter weights

wk+1(i) = wk(i) + 2µekx k-i (4)


Fig 3: Flowchart of LMS algorithm
Because of its simplicity, the LMS algorithm is one of the
popular adaptive algorithm. However, the LMS algorithm is Initially, the weight parameter (w) and also the loop variable
very slow and data dependent convergence behaviour. (i) are set to zero. Then obtained input signals from the
One of the primary disadvantages of the LMS algorithm is microphone. In the next step the filter output is calculated and
having a fixed step size parameter for every iteration. This is further used to compute the error estimate signal.
requires an understanding of the statistics of the input signal
prior to commencing the adaptive filtering operation. In Then the filter weights are updated by fixing the step size
practice this is rarely achievable. value (µ) to be a constant. This procedure is repeated until the
loop parameter becomes equal to the buffer size. This
Implementation of Least Mean Square Algorithm for noise implementation is depicted in figure 3.
reduction
Stability OF LMS:

 Condition for stability is: 0< µ < ÷ 2 (input signal


power)
 Larger values for step size
 Increases adaptation rate (faster adaptation)
 Increases residual mean-squared error

(II) RECURSIVE LEAST SQUARE (RLS) ALGORITHM


RLS is relatively complex algorithm as compared to LMS and
NLMS algorithm. Also performance of RLS in terms of
convergence and Mean Square Error (MSE) is better when
compare to LMS and NLMS.
The Recursive least square (RLS) adaptive filter is an
algorithm which recursively determines the filter coefficients
that reduces a weighted linear least squares cost function
relating to the input signals. The RLS algorithms are known
for their excellent performance when working in time varying
environments but at the cost of an increased computational
complexity along with stability problems.

IJERTV7IS020020 www.ijert.org 16
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 7 Issue 02, February-2018

1. RLS adaptation algorithm with input signals y(n) and x(n) 2. Power estimation is upgraded by following equation,
is given below. Initial values for RLS algorithm is given
by P’k+1 = (1-β) P’k+ Nβx2k-i (11)
P (n) = δI Where, β: smoothing parameter
P (0) = (δ−1) I
w (0) = wI

2. For m = 1,2,… filter gain update vector is given by

k(n)=λ−1P(n−1)y(n)+(λ−1)yT(n)P(n−1)y(n) (5)

3. Error signal equation is given by

e(n)=x(n)− wT(n−1)y(n) (6)

4. Filter coefficient adaptation is given by

w(n)=w(n−1)− k(n)e(n) (7)

5. Inverse correlation matrix update is calculated using

P(n)= λ−1[P(n−1)−(λ−1)k(n)yT(P(n−1)] (8)

(iii) NORMALIZED LMS ALGORITHM (NLMS)


The NLMS algorithm is equally simple, but more robust
Fig 4: Flowchart of NLMS algorithm
variant of the LMS algorithm and exhibits a better balance
between simplicity and performance compared to LMS Initially, the weight parameter (w) and the loop variable (i) are
algorithm. Due to its better properties the NLMS has been
set to zero. The obtained input signals from the microphone. In
largely used in real-time applications. The normalized least
mean square algorithm (NLMS) is an extension of the LMS the next step the filter output is calculated and is further used
algorithm which bypasses this issue by computing maximum to calculate the error estimate signal. The filter weights are
step size value. Step size value is computed by using the updated depending on the calculated step size value (µ). This
following formula. procedure is repeated until the loop parameter becomes equal
to the buffer size. This implementation is depicted in figure 4.
Step size=1/dot product (input vector, input vector)
REAL-TIME IMPLEMENTATION THROUGH CODE
This step size is proportional to the inverse of the total
COMPOSER STUDIO
expected energy of the instantaneous values of the coefficients
CCS provides an IDE to incorporate the software tools. CCS
of the input vector. NLMS algorithm is having the advantage includes tools for code generation, such as a C compiler, an
over the LMS algorithm in case of Mean square error and assembler, and a linker. It has graphical capabilities and also
Average attenuation supports real time debugging and provides an easy-to-use
software tool to build and debug programs. The C compiler
IMPLEMENTATION OF NLMS ALGORITHM
compiles a C source program with extension .c to produce an
assembly source file with extension.asm. The assembler
1. The NLMS algorithm is written as follows assembles an .asm source file to produce a machine language
object file with extension.obj. The linker combines object files
Wk+1 = Wk + 2µekXk (9) and also objects libraries as input to produce an executable file
µk = α / NP’
with extension.out
Where, µk : time varying step size factor normalised by N
Real-time analysis is performed using real-time data exchange
N : filter length
(RTDX). RTDX allows for data exchange between the host
α : constant ( 0 < α < 2 )
PC and the target DSK, along with analysis in real time
P’k: power estimate of xk
without stopping the target. Key statistics and performance can
be monitored in real time. Through the joint team action group
(JTAG), communication with on-chip emulation support
occurs to control and monitor program execution. The C6713
DSK board includes a JTAG interface through the USB port.

IJERTV7IS020020 www.ijert.org 17
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 7 Issue 02, February-2018

IMPLEMENTATION USING TMS320C6713 PROCESSOR


IN REAL TIME
Algorithm implementation is done on TMS320C6713
processor using Code Composer Studio (CCS) software which
generates the executable code of the algorithm and burns the
same to the DSK chip. The features of TMS320C6713
Processor are as explained below.
• VLIW core – is a processor architecture that allows 8
instructions to be issued in a single clock.
Fig7: Output: Mean Square Error for NLMS
• 192KB of high speed internal memory for maximum
memory performance.
• 64KB L2 cache/RAM four 16KB blocks of internal
RAM that can be configured as RAM/cache.
• 4KB separate caches for program and data.
• On – chip PLL generates processor clock rate from
slow external clock reference.
• Two timers generate periodic times events as a
function of processor clock. Used by DSP/BIOS to
create time slices for multi – tasking.
• Enhanced DMA (EDMA) controller that allows high Fig8: Mean Square Error for RLS
speed data transfer without intervention from DSP.

IV. EXPERIMENTAL RESULTS


• Output: Mean Square Error For LMS

.Fig 9: Actual signal

 
Fig5: Mean Square Error for LMS

Fig 10: Input and noise signal

Fig6: Variation Of MSE With Respect To Μ

Fig 10: LMS filter output

IJERTV7IS020020 www.ijert.org 18
(This work is licensed under a Creative Commons Attribution 4.0 International License.)
Published by : International Journal of Engineering Research & Technology (IJERT)
http://www.ijert.org ISSN: 2278-0181
Vol. 7 Issue 02, February-2018

VI. CONCLUSION
• Active noise cancellation (ANC) scheme employs the
adaptive digital filter to generate control signals. The
adaptive filter updates its coefficients iteratively to track
the best possible solutions using adaptive algorithms
(LMS and NLMS)
• LMS was the simplest and easiest to implement but it
converges at the slowest rate RLS has rapid rate
convergence, compared to LMS.
• NLMS has a normalized step size making it converge
faster than LMS but complexity also increases along with
convergence rate
Fig 11: NLMS filter output
• RLS is computationally more expensive than LMS.
• The RLS algorithms are known for their excellent
V. COMPARISON OF ALGORITHMS
performance when working in time varying environments
Table1: Comparison of Algorithms but at the cost of an increased computational complexity
and some stability problems.

VII. 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] R. Chassaing, Digital Signal processing and applications with the C6713
and C6416 DSK, A John Wiley and Sons, Inc., Publications, 2005.
[4] (2010, May.) [Online]. Available: Texas instruments DSP developer’s
village. World Wide Web, www.dspvillage.ti.com
[5] B. Widow, "Adaptive noise canceling: principles and applications",
Proceedings of the IEEE, vol. 63, pp. 1692-1716, 1975. and Samuel
D.Stearns; Pearson Education Asia, LPE

IJERTV7IS020020 www.ijert.org 19
(This work is licensed under a Creative Commons Attribution 4.0 International License.)

You might also like