0% found this document useful (0 votes)
150 views6 pages

Noise Cancellation Using Adapter Filter

1) An adaptive filter is a digital filter that can automatically adjust its transfer function based on an optimization algorithm and error signal to match changing parameters in applications where some processing parameters are unknown. 2) Adaptive filters can be used for noise cancellation by exploiting differences between event and background noise frequencies. The LMS algorithm was selected due its lower complexity. 3) The sign-data LMS algorithm minimizes error between the desired and filtered signals using the sign of the input data to update filter coefficients, providing good convergence and stability. This algorithm is then applied to cancel noise from an audio signal.

Uploaded by

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

Noise Cancellation Using Adapter Filter

1) An adaptive filter is a digital filter that can automatically adjust its transfer function based on an optimization algorithm and error signal to match changing parameters in applications where some processing parameters are unknown. 2) Adaptive filters can be used for noise cancellation by exploiting differences between event and background noise frequencies. The LMS algorithm was selected due its lower complexity. 3) The sign-data LMS algorithm minimizes error between the desired and filtered signals using the sign of the input data to update filter coefficients, providing good convergence and stability. This algorithm is then applied to cancel noise from an audio signal.

Uploaded by

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

Noise Cancellation Using Adapter Filter

Project By:Qurat-ul-ain Ali


Umber Saba
Aysha
Department of Computer Engineering
University of Engineering and Technology, Taxila.
Adapter Filters:
An adaptive filter is a filter that self-adjusts its transfer function according to an optimization
algorithm driven by an error signal. Because of the complexity of the optimization algorithms, most
adaptive filters are digital filters. By way of contrast, a non-adaptive filter has a static transfer function.
Adaptive filters are required for some applications because some parameters of the desired processing
operation (for instance, the locations of reflective surfaces in a reverberant space) are not known in
advance. The adaptive filter uses feedback in the form of an error signal to refine its transfer function to
match the changing parameters.
Noise Cancellation using Adaptive Filters:
The use of adaptive filters for reducing the noise content is based on the assumption that the
frequency content of the event shall be unique from the background noise. This is readily justified for the
case in which the background noise is continuous and the event is transient. The transient behavior
implies that the frequency content of the event shall be spread out over many frequency bins due to its
impulsive temporal characteristics. Additionally, for many sources of background noise, the spectral
content is quite low. For engine based noise, the signal is inherently periodic in nature based on the
primary excitation modes of the rotating structures. The frequency content between engine types and
configurations can vary a great deal. The spectral signature of a single cylinder engine on a test stand is
considerably simpler than a turbine or 16 cylinder diesel with their associated gear trains. The frequency
components for these sources can be isolated and matched to appropriately tuned FIR or IIR filter banks
to reduce their amplitude. The feed forward variety (FIR) formulations offer a higher degree of stability
but typically require many more taps to realize a given frequency response.
There are several algorithms of the adapter filters.Some of them are:
1.
2.
3.
4.
5.

Least Mean Squares (LMS) Based FIR Adaptive Filters


Recursive Least Squares (RLS) Based FIR Adaptive Filters
Affine Projection (AP) FIR Adaptive Filters
FIR Adaptive Filters in the Frequency Domain (FD)
Lattice Based (L) FIR Adaptive Filters

We have selected LMS (Sign-Data) algorithm because t is less complex than all others and hence requires
less computations.
LMS Algorithm (Sign-Data):
When the amount of computation required to derive an adaptive filter drives your development process,
the sign-data variant of the LMS (SDLMS) algorithm may be a very good choice. Fortunately, the current
state of digital signal processor (DSP) design has relaxed the need to minimize the operations count by
making DSPs whose multiply and shift operations are as fast as add operations. Thus some of the impetus
for the sign-data algorithm (and the sign-error and sign-sign variations) has been lost to DSP technology
improvements. In the standard and normalized variations of the LMS adaptive filter, coefficients for the
adapting filter arise from the mean square error between the desired signal and the output signal from the
unknown system. Using the sign-data algorithm changes the mean square error calculation by using the
sign of the input data to change the filter coefficients. When the error is positive, the new coefficients are
the previous coefficients plus the error multiplied by the step size . If the error is negative, the new
coefficients are again the previous coefficients minus the error multiplied by --note the sign change.
When the input is zero, the new coefficients are the same as the previous set
In vector form, the sign-data LMS algorithm is
W(k+1)=w(k)+e(k)sgn[x(k)]
Sgn[x(k)]= 1, x(k)>0
Sgn[x(k)]= 0, x(k)=0
Sgn[x(k)]= -1, x(k)<0
with vector w containing the weights applied to the filter coefficients and vector x containing the
input data. e(k) (equal to desired signal - filtered signal) is the error at time k and is the quantity the
SDLMS algorithm seeks to minimize. (mu) is the step size. As mu specified smaller, the correction to
the filter weights gets smaller for each sample and the SDLMS error falls more slowly. Larger mu
changes the weights more for each step so the error falls more rapidly, but the resulting error does not
approach the ideal solution as closely. To ensure good convergence rate and stability, select mu within the
following practical bounds

0 < < N (Input Signal Power)


N=Number of Samples of Input Signal

Noise Cancellation by Sign-Data Algorithm

Steps of Algorithm:
1.
2.
3.
4.
5.
6.
7.
8.
9.

Create or record actual audio signal


Create or record a noise signal
Correlate noise by passing t through a low pass filter.
Merge noise signal with actual audio signal
Pass this merge signal to some adapter filter using any algorithm e.g. least mean square filter.
To create LMS.. Following steps kept in mind
Initialize adapter filter object
Then pass this object as parameter to filter command.
Calculate error by subtracting merge signal from applying signal.

For the noise cancellation, adaptfilt.sd requires two input data sets:

1. Data containing a signal corrupted by noise d(k), the desired signal. The noise cancellation
process removes the noise, leaving the signal.
2. Data containing noise noise(k) that is correlated with the noise that corrupts the signal data.
Without the correlation between the noise data, the adapting algorithm cannot remove the noise
from the signal.

For the signal,


fs=11025;
n=200000;
handles.signal1= wavrecord(n,fs,'double')
For the noise,
fs1=11025;
n=200000;
handles.noise1= wavrecord(n,fs1,'double')
For Correlation of noise data,
nfilt=fir1(11,0.4);
fnoise=filter(nfilt,1,handles.noise1);
handles.d=handles.signal1+fnoise;
For Creating Adapter Filter Object and then passing it from the filter to get the original signal together
with the error signal.
mu = 0.0001;

% Set the step size.

ha = adaptfilt.sd(42,mu)
[handles.y,handles.e] = filter(ha,handles.signal1,handles.d);
Then after passing the desired signal from the filter we can now show the result by playing the original or
by displaying it on a 2D Graph.
We have created Simple GUI for the Noise Canceller,
Here is the GUI design.

The final Output by plotting Noise Canceller is,

Conclusion:
Noise Canceller application using adapter filter is successful in cancelling the additional noise
from the corrupted signal though its only applicable for DSP Processors but still its an efficient way of
noise reduction and widely used in sound and video applications.

You might also like