1. Real Time
Implementation of
Active Noise Control
6th May 2016
Noise
Anti-noise
Resulting Noise
Presented by
Chittaranjan
Baliarsingh
112EI0104
Guided by
Prof. U. K. Sahoo
1ECE, NIT Rourkela
2. 2ECE, NIT Rourkela
Introduction
What is Noise ???
• Unwanted or random disturbance present in a signal
• In the audio sense, “noise” refers to any other signals besides those we want to listen to.
• Affects Performance, Overall Efficiency, Failure
Noise Reduction
Passive Noise
Reduction
Active Noise
Reduction
Blocking the path of the noise
using absorbing materials e.g.
Motorcycle Silencer.
Destructive interference with
anti-noise.
Click on the icon
to hear noise
3. 3ECE, NIT Rourkela
Active Noise Reduction
Noise Source
Anti Noise
Destructive
Interference
Resulting Noise
4. 4ECE, NIT Rourkela
Noise Cancellation in Headphones
(1) Incoming Ambient Sound
e.g. Train, Bus Engine
(2) Sound is picked up by microphone
and sent to noise cancellation circuitry
(4) Original Ambient Sound and newly
added waveform cancel each other out
(3) Noise cancellation circuitry inverts
wave and sends it back to headphone
speaker
5. 5ECE, NIT Rourkela
Structure of Active Noise Control System
An Active Noise Control system basically consists of four components.
(1) Reference microphone. It converts an acoustic signal to its equivalent
electronic form and forwards the sampled signal to the controller.
(2) Controller. This is heart of the ANC system that actually synthesizes the
anti-noise.
(3) Loudspeaker. Electronically generated anti-noise must be converted to its
equivalent acoustic form for noise cancellation.
(4) Error microphone. The residual noise field is sensed by this and feedback
to the controller for its improved performance.
6. 6ECE, NIT Rourkela
Block Diagram of Active Noise Control
+ =
d(n)
Audio Signal
corrupted with noise
Reference Mic
(converts acoustic
to electrical form)
FIR Filter
Adaptive Algorithm
Signal Inverter
Noise Cancelling
Speaker generating
Anti-noise
Adaptive Output
Error Mic
Noise
Anti-Noise
Residual Noise
-y(n)
e(n)
y(n)
-y(n)
x(n)
7. 7ECE, NIT Rourkela
Adaptive Algorithm Techniques in Active Noise Control
Steepest Descent Algorithm
For all algorithms to work there is a cost function which is to be optimized.
In this case, cost function (J) is the mean of the square of the error (e(n)).
J = E [ e2(n) ]
e(n) = d(n) – y(n) = d(n) – xT(n)*w(n)
This algorithm suggests that if a filter coefficient is adjusted by a small amount which is
proportional to the negative of the gradient of the cost function with respect to the filter
coefficient, then it approaches towards its global solution.
w(n+1) = w(n) - µ(n)
= - 2E[x(n)e(n)]
Computational complexity
increases so expectation
value is approximated as
instantaneous value.
𝛿𝐽
𝛿𝑤
𝛿𝐽
𝛿𝑤
8. 8ECE, NIT Rourkela
Adaptive Filter Block Diagram
x(n) y(n)
d(n)
FIR Filter
Adaptive Algorithm
+
-
y(n)
Approximation of Steepest Descent Algorithm
Filter output: y(n) = wT(n)x(n)
Estimation error: e(n) = d(n) – y(n)
Weight adaptation: w(n + 1) = w(n) + 2µx(n)e(n)
µ: convergence factor
The Adaptive Filter is a Finite
Impulse Response Filter (FIR),
with N variable coefficients w.
0
e(n)
9. 9ECE, NIT Rourkela
Least Mean Square (LMS) Algorithm
The Least Mean Squares Algorithm (LMS) updates each coefficient on a sample-
by-sample basis based on the error e(n).
This equation minimises the power in the error e(n).
• The value of µ (mu) is critical.
• If µ is too small, the filter reacts slowly.
• If µ is too large, the filter resolution is poor.
• The selected value of µ is a compromise.
10. 10ECE, NIT Rourkela
Simulation Result
Simulation for ANC is done in MATLAB using LMS Algorithm
Cosine
function as
signal
Noise created
using Random
Function
Anti-noise
Output
12. 12ECE, NIT Rourkela
Setting the parameters of LMS Filter
• The rate of convergence of
the LMS Algorithm is
controlled by the “Step size
(mu)”.
• Changing the number of
weights (filter length).
• If the no. of weights is more,
algorithm will be slow to run.
• If the no. of weights is too
small, then the filter will not
remove the noise properly.
13. 13ECE, NIT Rourkela
Trace of Input, LMS Filter Output and Error
Input = Signal + Noise
Error contains Noise
Step size µ=0.005
14. 14ECE, NIT Rourkela
Filter Outputs for Step size µ=0.1
When the step size is increased, LMS algorithm converges more quickly but at the
expense of granularity, the LMS filter output is not as smooth as for lower step size.
15. 15ECE, NIT Rourkela
Objective
• Hardware Implementation of Active Noise Cancellation on Texas
Instruments C6713 DSK using Code Composer Studio and
MATLAB Simulink environment.
16. 16ECE, NIT Rourkela
DSK C6713 K Development Board From TI
Micin
Linein
Lineout
Headphone
Power
Jack
USBport
The DSK C6713 is a
development platform
designed to speed up
to low-cost
development and high-
performance
applications based in
TMS320C6000 DSP
family.
17. 17ECE, NIT Rourkela
Code Composer Studio
Code Composer Studio™ (CCS) provides an integrated platform for implementation,
and verification of standard embedded systems and custom for C6000 DSP targets.
18. 18ECE, NIT Rourkela
Real Time DSP Hardware Implementation
To implement Adaptive filter on DSP Starter Kit (DSK), two methods
can be adopted.
• The first method, is quite easy in which one needs to design a
Simulink model and it can be converted into a code composer
studio project with the help of Real Time Workshop (RTW)
facility available in the MATLAB.
• In second method, a C program can be written in code composer
studio to perform the desired task, but writing C code for DSK
environment is somewhat difficult.
19. 19ECE, NIT Rourkela
Building the Simulink Model and further steps
• LMS Filter block and a predefined library package c6000lib for
DSK6713 are needed for building the Simulink Model.
• After joining the appropriate blocks, the model can be built from
Tools -> Real Time Workshop -> Build Model.
• This would build the necessary files to be later used by CCS to
program the DSK.
• Matlab generates the necessary C codes from the Simulink
model and then creates a project for CCS. Once Matlab created
the project, CCS compiles the project and downloads the
program onto the DSK board.
20. 20ECE, NIT Rourkela
Flow Diagram connecting Simulink Real Time
Workshop with DSK C6713
Simulink and Real Time Workshop
Embedded Target for TI C6713 DSK
Link for Code Composer Studio
Code Composer Studio
TI C6713 DSK
Model/Code based
Algorithm Design
Debugging/
Verification
Embedded Target
21. 21ECE, NIT Rourkela
Problems faced while building the Simulink Model
• Library package c6000lib is not available for recent versions of
Matlab.
• In DSP lab, the computers are installed with Matlab R2010a
which does not support package installer so the library package
can’t be downloaded.
• So, Simulink Model for Noise reduction system to run on TI
DSK6713 was not possible.
• Hence, manually the C code is written in Code Composer Studio
to run the program on DSP Processor.
22. 22ECE, NIT Rourkela
Interfacing PC and DSK C6713
PC
Signal
Generator
generating
Noise
NI ELVIS
for Input
Signal
Oscilloscope for
desired output
DSK
C6713
USB to PC
O/PNoise
I/P
Power Supply
5V DC
24. 24ECE, NIT Rourkela
Output on Oscilloscope
• Input signal is given from Function generator using NI ELVIS
• Noise is given using Signal Generator.
• Error and desired output is obtained on the oscilloscope.
• Error is initially high and then it converges to zero giving the sinusoidal input
as the desired output.
25. 25ECE, NIT Rourkela
Conclusion
• Simulation of ANC using LMS Algorithm is done using MATLAB and the
same is modelled in Simulink.
• Hardware implementation of the Active Noise Reduction Set up using
TI C6713 DSK processor is done and the noise is reduced to a great
extent.
26. 26ECE, NIT Rourkela
References
[1] Sen M. Kuo, “Senior Member, IEEE, and Ajay B. Puvvala,” Effects of Frequency
Separation in Periodic Active Noise Control Systems”, IEEE transactions on
audio, speech, and language processing, vol. 14, no. 5, pp. 203-217,
September 2006.
[2] Cristina Gabriela Saracin, Marin Saracin, Mihai Dascalu, AnaMaria Lepar, “Echo
Cancellation Using The LMS Algorithm”, in U.P.B. Sci. Bull., Series C, vol. 71,
pp. 167-174, August 2009.
[3] Z. Ramadan and A. Poularikas, “An adaptive noise canceller using error non-
linearity in the LMS adaptation,” in Proc. IEEE Southeast Con 2004, vol. 1,
pp. 359–364, March 2004.
[4] Bambang Riyanto, “Real-time DSP Implementation of Active Noise Control for
Broadband Noise Using Adaptive LMS Filter Algorithm”, in Proceedings of the
International Conference on Electrical Engineering and Informatics Institute
Teknologi Bandung, Indonesia, vol.1, pp. 718-722, June 2007.