Adaptive Noise Canceller
Adaptive Noise Canceller
Adaptive Noise Canceller
Project Report
Group Members :
Ahmad Naeem
Mobeen Sohail
Jibran Shahid
mee
30/12/2016
Noise canceling in audio signal with adaptive filter
Introduction :
All the physical systems when they operate, they produce physical noise, which is a mixing of an
infinitive number of sinusoidal harmonics with different frequencies. So, the initial signal
information is corrupted with this noise. This complex signal, may be very noisy, so much that
the human ear or other system which may follow it, cannot receive correct the initial signal.
So, an algorithm has to be invented which must be able to separate the physical noise from
the information signal and to output the information signal without noise. This is not possible,
as there is not a perfect system. So, this algorithm should have the ability to reduce the noise
level as much as it can.
A good noise-canceling algorithm is the algorithm, which is presented in this paper. This
algorithm is based on the Least Mean Square algorithm. This system, operates like an automatic
control system with feedback where the feedback performs an adaptation to the filter
coefficients, otherwise it adjust the filtering of the noise in each sample.
Problem formulation :
A simple audio signal is represented by the following mathematical equation
Where f 0 is the frequency of the audio signal, fs is the sampling frequency and nis the
0
Fig.3 Adaptive filter noise canceller
3 Wk 1 Wk k
Where Wk and k are the weight or the impulse response w (n) of the filter and the true
gradient vectors respectively, at the kth sampling instant. Controls the stability and rate of
convergence.
The steepest descent algorithm in the previous equation still requires knowledge of R and P ,
since k is obtained by the next equation.
dJ
4 k 2P 2RW 0dW
The LMS algorithm is a practical method of obtaining estimations of the filter weights W k in real
time without the matrix inversion of the next equation Wopt R 1P or the direct computation of
the autocorrelation and cross correlation. The Widrow – Hopf LMS algorithm for updating the
weights from sample to sample is given by
5 Wk 1 Wk 2 ek X k
Where: ek yk WkTXk
Clearly, the LMS algorithm above does not require prior knowledge of the signal statistics (that
is the correlations R and P ), but instead uses their instantaneous estimations. The weights
obtained by the LMS algorithm are only estimations, but these estimations improve gradually
with time as the weights are adjusted and the filter learns the characteristics of the signal.
Eventually, the weights converge. The condition of convergence is:
6 0 1 max
Where max is the maximum eigenvalue of the input data covariance matrix In practice, Wk
never reaches the theoretical optimum (the Wiener solution), as the algorithm iteration step
can never be zero but it has a discrete value.
Furthermore, the LMS algorithm can be summarized in the next equation for the
implementation of the filter. N 1
7 y k wi k *u k i
i 0
8 h( 1) h( ) u( )e( )
In which: e( ) d( ) y k
In the above equation, T denotes the transpose of the vector hinv. The desired response d( )
can be found from the adaptive filter scheme to be
9 d( ) hxT( )w( g)
T
10 u(k) u( ) u( 1)...............u( N 1)
Where N is the order of the filter.
Problem solution :
The problem solution may be based on standard adaptive techniques and especially on the
adaptive filter noise canceller.
This filter gets the physical noise and filters it in such a way that the algebraic addition with the
complex signal produces a new signal with a very low level of noise. The schematic diagram of
the adaptive filter noise canceller was given above and it is presented again in the following
diagram.
As it can be observed, the adaptive filter noise canceller is a system with feedback as a system
with automatic control. For this reason, there is stability problem. The problem arises when the
error signal’s amplitude increases in accordance with time or when no convergence is obtained.
The mathematical algorithm, which is used by the adaptive filter for the filter’s coefficients
update, is called LMS (Least mean square) algorithm. This algorithm tries to minimize the
square of the error signal so; the audio signal has been reconstructed quite well.
The system output is the error signal. The error signal is the algebraic subtraction between the
audio signal with noise and the noise. When the LMS algorithm performs a good convergence
then the only error signal is the audio signal. So, the error signal must be the noise canceller
output.
The LMS algorithm has also an initial step variable μ, which is the step of the convergence in
each iteration. In the matlab code where the adaptive filter noise canceller is built, the NLMS
algorithm used. The only difference is that the step variable μ, changes in each iteration with
the next equation:
11 ( ) 2
u k
where is a positive constant, usually less than 2 , and is a small positive constant. The
symbol u( ) 2 is the energy of the signal in a predefined buffer.
The output waveforms of the system are plotted in the next figure.
Conclusion :
To sum up, the adaptive noise canceller is a very efficient and useful system in many
applications with sound, video etc. The only disadvantage is that it needs digital signal
processor DSP for its operation
References:
Simon Haykin, Adaptive Filter Theory, Prentice Hall 2002
http://matlabcode.weebly.com/matlab-projects/noise-cancellation-from-audio-signalby-
using-adapter-filter
Mathworks.com