Background noise can be a nuisance in the workplace or if you are just trying to relax. A good way to counter this issue is by using high-end headphones which are equipped with active noise-canceling (ANC) technology.
We have implemented an ANC system using a Hybrid (feedforward + feedback) loop that takes the background noise from your surroundings and produces an anti-noise for that noise that it played through your earphones to give you the desire silence you need.
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
Active Noise Cancellation
1. Active Noise
Cancellation
Ghulam Mohiyuddin (2017119)
Huzaifa Yahya (2017161)
M. Jibran Mughal (2017282)
Osama Naeem (2017216)
Advisor: Dr. Memoon Sajid
Co-Advisor: Dr. Ahmad Kamal Hassan
S enio r Design P ro jec t (EE -481)
Gro u p No 6
01/33
2. — Noise Cancellation
— Motivation
— Project Aims & Objectives
— Simulation I
— Simulation II
— Algorithm Comparison
— Hardware Implementation
— Conclusion
— References
Project Outline
Contents
O V E R C O M I N G A N X I E T Y T A L K
02
02 02/33
3. Noise Cancellation
• Noise cancellation is the rejection of
undesired contents in a signal
• There are two main types of noise
cancellation methods
1. Passive Noise Cancellation
2. Active Noise Cancellation Fig. 1 Noise Cancellation [3]
Fig. 3 Passive Noise Cancellation
Fig. 2 Active Noise Cancellation
03/33
4. Passive Noise Cancellation
• Passive noise cancellation is reduction of
undesired sound using isolating materials
• For instance, headphones reduce noise
based on the physical design of the
earcups
• Some example of isolating materials:
padding insulation, sound absorber tiles
and muffler
Fig. 4 Inside of a Passive Noise Cancellation Ear-cup[4]
04/33
5. Active Noise Cancellation (ANC)
• ANC is the process of using a microphone
to monitor environmental noise and
creating anti-noise
• Anti-noise is then superimposed with audio
playback to cancel noise entering the user’s
ear
• Active noise cancellation can be achieved
with digital filters
Fig. 5 Active Noise Cancellation Headphone
05/33
6. Motivation
• Noise cancellation is necessary for workers working in noisy environments such as:
1. Ground staff on airport runways need to hear their instructions clearly to avoid
accidents without the background noise of aircrafts
2. Workers on construction sites would require noise cancellation equipment to
prevent any hearing damage
3. Background Noise cancellation is required for emergency services personals, e.g.,
firemen to carry out their responsibilities
• Noise cancellation would also be helpful for people who, because of COVID-19, must
work from home
• Available noise cancellation equipment is costly and a cheaper solution is desirable
06/33
7. Project Aims & Objectives
• To design a system that removes unwanted noise from the desired signal:
1. Target noise signals may be deterministic, random or periodic
2. Target attenuation level of noise = 8 dB
• To study and compare the performance of different noise cancellation
algorithms available in literature
05
07/33
8. Literature Review
• There are three major Active Noise cancellation schemes:
1. Feedback Control System
2. Feedforward Control System
3. Hybrid Control System
• There are two major Algorithms:
1. Recursive Least Square Algorithm
2. Least Mean Square Algorithm
O V E R C O M I N G A N X I E T Y T A L K
05
05 08/33
9. Literature Review (Continued)
O V E R C O M I N G A N X I E T Y T A L K
05
05
O V E R C O M I N G A N X I E T Y T A L K
Feed-forward Control:
• Microphone is placed outside the ear
cup
• Noise signal is detected by microphone
before the person does
• ANC processes the noise and generates
anti-noise signals
• Works well in high frequency ranges
Feed-back Control:
• Microphone is placed inside the ear cup
• Noise signal is detected by microphone
exactly as the listener
• ANC processes the noise and generates anti-
noise signals
• Works well in low frequency ranges
Fig. 6 Feed-back Control Loop [5] Fig. 7 Feed-forward Control Loop [5]
09/33
10. Literature Review (Continued)
O V E R C O M I N G A N X I E T Y T A L K
05
05
Hybrid Control:
• Using feedback and feedforward
systems
• Reduces error over wider range of
frequencies
• Not prone to sound angles or user wear
Fig. 8 Hybrid Noise Cancellation Control Loop [6]
10/33
11. Literature Review (Continued)
O V E R C O M I N G A N X I E T Y T A L K
05
Least Mean Square Algorithm
• Least mean squares (LMS) algorithms are a class of adaptive filter
used to mimic a desired filter by finding the filter coefficients
that relate to producing the least mean square of the error signal
(difference between the desired and the actual signal)
• The basic idea behind LMS filter is to approach the optimum
filter weights by updating the filter weights in a manner to
converge error
• The algorithm starts by assuming small weights (zero in most
cases) and, at each step, by finding the gradient of the mean
square error, the weights are updated
11/33
12. Literature Review (Continued)
Least Mean Square Algorithm
• LMS is used to calculate weights for the adaptive filter
• Adaptive filter transfer function:
𝑤(𝑛)=
𝑦(𝑛)
𝑥(𝑛)
• Adaptive filter output:
𝑦 𝑛 = 𝑤 𝑛 𝑥(𝑛)
• Error Signal:
𝑒(𝑛) = 𝑑(𝑛) – 𝑦 𝑛 ≈ 𝑠(𝑛)
Where d(n) = 𝑠 𝑛 + 𝑛 𝑛
• 𝑤(𝑛+1) = 𝑤(𝑛) + 𝜇e(n) 𝑥(𝑛)
Where 𝜇 is the converging coefficient
• 𝐸 𝑧2
= 𝐸 𝑠2
+ 𝐸[(𝑛 − 𝑦)2
]
O V E R C O M I N G A N X I E T Y T A L K
05
Fig. 9 Hybrid Noise Cancellation Headphones [1]
12/33
13. Literature Review (Continued)
O V E R C O M I N G A N X I E T Y T A L K
05
Recursive Least Square Algorithm
• Recursive least squares (RLS) is an adaptive filter algorithm that
recursively finds the coefficients that minimize a weighted linear
least squares cost function relating to the input signals
• In the derivation of the RLS, the input signals are considered
deterministic, while for the LMS and similar algorithm they are
considered stochastic
• RLS exhibits extremely fast convergence. However, this benefit
comes at the cost of high computational complexity
𝑥𝑘= 𝑥𝑘−1 + 𝐾𝑘(𝑦𝑘- 𝐻𝑘 𝑥𝑘−1)
13/33
Fig 10. RLS Block diagram
14. Methodology
O V E R C O M I N G A N X I E T Y T A L K
05
• After the initial literature review of the different methods of
ANC, Hybrid control system is chosen for further investigation
and implementation
• Considering the computational limitations of the processor,
we have decided to adapt the LMS algorithm
• Our system will cancel noise in real-time and work on a Hybrid
(Feedforward + Feedback) loop, taking inputs from two points
in the system (shown in Fig.11)
Fig. 11 Hybrid Noise Cancellation Headphones [7]
14/33
15. Primary and Secondary Path
O V E R C O M I N G A N X I E T Y T A L K
05
15/33
Primary Path
Secondary Path
Noise
Adaptive Filter
Error
Microphone
• Noise is picked by the reference microphone and sent to Adaptive filter
• Noise attenuates as it travels along the primary path
• Output of the adaptive filter travels through the secondary path and attenuates
• Noise is fed in Adaptive filter
• In summary, adaptive filter predicts the primary path characteristics by considering the
error signal and noise
Fig 12. Primary and secondary path
-1
Reference
Microphone
16. Simulation 1: LMS Algorithm
16/33
Fig 13. LMS Active Noise cancellation Block Diagram
• LMS Algorithm block diagram (Fig 4) is implemented
• Real time noise is introduced into the system
• Primary path coefficients are estimated by LMS update block and fed to the LMS filter copy
• Anti noise is added to the noise attenuates the resultant noise at the output
17. Simulation 1: Secondary Path
17/33
• The secondary path is also estimated by the LMS algorithm
• The estimated coefficients for secondary path are fed to LMS algorithm prior to
estimating the coefficients of primary path
Fig 14 . Active Noise cancellation Secondary path
18. Simulation 1: LMS Results
18/33
Fig 15. Audio sound (Time Domain)
• Simulation parameters:
i. Desired Signal: Nil (Silence)
ii. Noise signal: Music
• Signal of noise and output is shown
• Initially output has greater noise and with time it is attenuated to zero
• Audio files of noise and output justifies the graph
Normalized
amplitude
Time
19. Simulation 1: LMS Results
19/33
Fig 16. Spectrum analysis
• Frequency analysis is shown on Fig 7
• An attenuation of 38.079 dB is observed at 7K Hz frequency
20. Simulation 1: LMS Results
20/33
Fig 17. Calculated LMS weights
• The weights calculated by the LMS update block are shown below
• Throughout the process the weights update themselves based on the error and noise
signal
• Weights converges as the error signal minimizes
Samples
21. Simulation 2: Normalized LMS
Algorithm
21/33
Fig 18. Normalized LMS Active Noise Cancellation Block Diagram
• Normalized LMS computation power is higher than LMS
• NLMS vary the step size (µ) by taking in to the consideration the power of the input signal
• 𝜇 𝑛 =
𝜇^
𝑎+| 𝑥 𝑛 |2
22. Simulation 2: Acoustic
Environment
22/33
Fig 19. Acoustic Environment Block Diagram
• In acoustic environment primary path is estimated with the help of filters
• Desired output is considered to be silence hence, no signal is added
23. Simulation 2: NLMS Filter Results
23/33
Fig 20. Audio sound (Time Domain)
• Simulation parameters:
i. Desired Signal: Nil (Silence)
ii. Noise signal: Music
• Rapid attenuation can be seen in the output as compared to LMS
• With time noise signal is reduced nearly to zero
• Audio files justifies the observed graph
Normalized
Amplitude
Time
24. Simulation 2: NLMS Filter Results
24/33
Fig 21. Spectrum analysis
• Frequency analysis is shown in Fig 12
• Greater attenuations can be observed compared to LMS spectrum
• An attenuation of 48.819 dB is observed at 7K Hz frequency
• For higher frequencies better attenuation is experienced
25. Simulation 2: NLMS Filter Results
25/33
Fig 22. Calculated LMS weights
• The weights calculated by the NLMS update block are shown below
• Throughout the process the weights update themselves based on the error and noise
signal
Samples
26. Simulation 2: NLMS Filter Results
26/33
Fig 23. Audio sound (Time Domain)
• Simulation parameters:
i. Desired Signal: Violin
ii. Noise signal: Music
• Rapid attenuation can be seen in the output as compared to LMS
• With time noise signal is reduced nearly to zero
• Audio files justifies the observed graph
27. Algorithm Comparison
05
27/33
• After the comparison and our computational limit we have preferred to opt
Normalized LMS technique for Active noise cancellation
• To summaries the comparison a table is drawn
Properties LMS NLMS
Complexity Simpler More complex
Convergence
rate
Takes longer to
converge.
Takes less than LMS
to converge
Adaptation
Technique
Gradient based
approach
Gradient based
approach
Memory Memory less Memory less
Table 1 Comparison of algorithms
28. 05
28/33
• Our Algorithm is ready to be implemented on DSP boards:
1. The OMAP board available in the Institute does not have Jtag, If provided with the JTag for
the OPAM-L138 we would be able to implement our code on this processor
2. To overcome the problem of the JTag on the OMAP-L138 we implemented the algorithm
on the TMS320C6713 DSP board (Results are shown in the next slides)
Hardware Implementation
Fig 25. TMS320C6713 DSP Board
Fig 24. TMS320C6713 DSP Board
31. Conclusion
05
31/33
• Successfully implemented the NLMS algorithm
• Surrounding noise was canceled in real time with minimum latency
• The Sound Spectrum and audio graphs of noise were plotted in real time for
visualization
32. References
[1] P. Lueg, “Process of Silencing Sound Oscillations,” U.S Patent 2043416 Jun. 9, 1936
[2] S. M. Kuo and D. R. Morgan, ”Active Noise Control Systems: Algorithms and DSP
Implementation”. New York: Wiley 1996
[3] A. Swain, “Active Noise Control: Basic Understanding”. Research Gate(2013:1-19)
[4] YPANERN. Available at:
https://www.ypanern.com/index.php?main_page=product_info&products_id=692662
[5] S. Ajay, “Adaptive Active Noise Control” Surge 2007 Programme
[6] P. Sylvia (et al),” Adaptive Feedforward Control for Active Noise Cancellation in-ear
Headphones,” The Journal of the Acoustical Society of America 123(3):2014
[7] XDA-Developers. Available at: https://www.xda-developers.com/razer-opus-
bluetooth-wireless-headphones-active-noise-cancelling
[8] T. Lizhe and J. Jean, “Digital Signal Processing, 3rd ed”, 2019
05
32/33