You are on page 1of 27

DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION

OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 1

INTRODUCTION

Noise cancellation has become a part of the ever-rising field which has its focus on cancelling
the unwanted signals. The unwanted signal is minimized in order to reduce the effect that the
latter has on the desired signal. Usually a signal corrupted with noise is found out by passion it
through a filter. The filter does its role of suppressing or eliminating the noise content while the
signal is left unchanged. The Filters used for noise cancellation can either be fixed or adaptive.
As the name suggests, fixed filters have clear information about the signal and the noise present
in it. As for an adaptive filter, it can adjust its own parameters and the design of such filters
does not require any prior knowledge above the signal and its noise characteristics. This makes
adaptive filters better on comparison with fixed filters.

In noise cancellation, an approximate of the noise is obtained by filtering the input that is set as
reference and then subtracting this estimate form the primary input containing both signal and
noise. Over the past thirty years, the field of signal processing has made by tremendous
contributions. With the advancement in the design of digital circuits, digital signal processing
has become more attractive. Digital signal processing includes digital systems for the purpose
of filtering. The information of the input signal is controlled by the digital system which
handles the signal. One of the main advantages of Adaptive filters is that it is suitable in any
environment whether it be new or old. Adaptive filters are powerful devices which are capable
of signal processing and control applications in time variation environment of input statistics.
The use of Adaptive filters reduces any corruption of the signal due to any form of predictable
and unpredictable noises. The applications of Adaptive filters include identification, inverse
modelling, prediction and interference cancellation. The applications are essential for
explicating the problems of acoustic echo and noise cancellation. Various algorithms have been
developed for the cancellation of active interference to obtain Adaptive filters such as LMS,
RLMS, NLMS etc.

Dept of ECE NBA Accredited Page 1


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

Adaptive noise cancellation removes the noise present in the signal thereby improving the
signal to noise ratio (SNR). The Adaptive filtering process is said to achieve best results when
the system output is noise free. This condition can be achieved by minimizing the mean square
value of the error signal.

Adaptive filters change their coefficients to nullify an error signal and could be realized as finite
impulse response (FIR), infinite impulse response (IIR), lattice and transform domain filter. The
foremost common type of Adaptive filters are the transversal filter using least mean square
(LMS) algorithm. Adaptive noise cancellation (ANC) attenuates low frequency noise that
passive noise filters cannot. An ANC system is based on the destructive interference of an anti-
noise, which have equal amplitude and opposite replica of primary unwanted noise.

Owing to the powerful digital signal processors and the development of advanced adaptive
algorithms there are a great number of different applications for which adaptive filters are
utilized. The last two decades have shown a considerable increase in the number of different
applications using Adaptive techniques. There is a wide variety of configurations that could be
applied in different fields such as telecommunications, radar, sonar, video and audio signal
processing, noise reduction, between others.

As said earlier there is a wide variety of algorithms which can be employed for the purpose of
de- noising a system. In the project, the algorithm used for updating the filter coefficients is the
Least Mean Square (LMS) algorithm. LMS algorithm provides a clear trade-off between
complexity and convergence time.

Dept of ECE NBA Accredited Page 2


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 2
LITERATURE SURVEY

The adaptive algorithm provides various application of noise elimination and thus we can
improve the signal quality. The adaptive filters like Least Mean Square, sign Least Mean Square
and Normalized Least Mean Square are widely used in different signal processing application
because it is very easy implement and simple computation.
Ishika Sharma, proposes the adaptive filters algorithms for removing noise from the
Electrocardiogram to receive noise less pure embryo signals. Filtering ECG signals requires a
filter which can automatically adapt according to changing input and noise. Adaptive filtering
has been used to reduce the noise from the desired ECG signals by using LMS algorithm. Other
algorithms like NLMS and RLS can also be used but LMS gives least MMSE amongst them so
it can be used where accuracy is required. The measures of performance contain the
optimization between the rate of convergence and MMSE by the help of MATLAB. The
experimental results have shown that for small values of step size the rate of convergence
increases.

K Rohith Kumar, proposed Implementation of noise cancellation using least mean square in
GNU radio. The ECG signals are mixed with random noise from sources. Noises signals are
mixed with basic ECG signals are power line interference, baseline wander interference, noises
due to respirational movements. There are different types of adaptive filter algorithms have
been reduced these noises. In this paper they used Least Mean Square algorithm (LMS) is an
adaptive filtering algorithm which is defined as the minimization of the sum of the squares of
the difference between the original signal and the filter output.
N Sireesha proposed, an adaptive filter based on Least Mean Square (LMS) algorithm. The
paper discusses the system configuration, filter structure and the implementation of the
Adaptive LMS algorithm. The convergence and stability of the filter which ensures stable
adaptation behavior is also discussed. The performance of the designed adaptive filter is
comparable to the in-built MATLAB LMS filter. The performance of the designed filter is

Dept of ECE NBA Accredited Page 3


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

evaluated based on the bit error rates by varying the additive white Gaussian noise levels in the
system. The performance of the designed adaptive filter is found to be satisfactory and is viable
to be applied in underwater acoustic communication.

Saurabh Prasad, proposed implementation and optimization of LMS algorithm for the
application of unknown system identification. Most common optimizing algorithms are Least
Mean Square (LMS) and Recursive Least Square (RLS). Although RLS algorithm perform
superior to LMS algorithm, it has very high computational complexity so not useful in most of
the practical scenario. So most feasible choice of the adaptive filtering algorithm is the LMS
algorithm including its various variants. The LMS algorithm uses transversal FIR filter as
underlying digital filter.

K. Shivaani, proposed an automatic bird species recognizer which identifies the bird species
based on bird songs and voice signals. used a tenth-order LMS adaptive filter. The design of a
tenth-order LMS adaptive filter using MATLAB has been implemented. The performance and
characteristics of the filter for five different methods of LMS has been shown. After removal of
noise from the noisy bird voice signal using LMS algorithm, we have made use of cross
correlation to identify the bird species that it corresponds to. Signal to Noise Ratio (SNR) and
Mean Square Error (MSE) of the filtered bird signals obtained using the variants of LMS like
Normalized LMS, Sign-Data LMS, Sign-Error LMS and Sign-Sign LMS have been estimated
and compared. We have made use of signal processing tool kits and various noise parameter
schemes have been computed to show the effectiveness of the designed filter in the field of bird
recognition.

The technical article on ‘Discrete Wavelet Transform Techniques in Speech Processing’, shows
how in many applications of noise cancellation the changes in signal characteristics could be
quite fast. This requires the utilization of adaptive algorithms, which converge rapidly. From
this point of view the best choice is the recursive Least Squares(RLS) algorithm. Unfortunately,

Dept of ECE NBA Accredited Page 4


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

this algorithm has high computational complexity and stability problems. Paper also shows an
algorithm based on adaptive filtering with averaging.

The research article on, ‘Adaptive wiener filtering approach for speech enhancement’, describes
that spectral subtraction is the earliest method for enhancing speech degraded by adaptive
noise. This technique estimates the spectrum of the clean (noise free) signal by the subtraction
of the estimated noise magnitude spectrum from the noisy signal magnitude spectrum while
keeping the phase spectrum of the noisy signal. The drawback of this technique is the residual
noise.

At present, we have many adaptive filtering algorithms in the field of noise cancellation.
The survey about the adaptive filtering algorithm shows that the proposed LMS algorithm is best
for its stability, high speed capability and convergence rate. To achieve minimum mean square
error at a high convergence rate is the main problem of this algorithm. On the other hand, RLS
algorithm offers a faster convergence and lower error at steady state. But, RLS algorithm is
computationally complex. If proper design steps are not followed, the other algorithms may
diverge away and become unstable.
Apart from these, LMS is the mostly suited algorithm for channel equalization, echo
cancellation and noise cancellation.
W(n+1) =w(n)+ µe(n)x(n). This is the LMS algorithm for updating the tap weights of
adaptive for each iteration. Where, x(n)is the input vector of time delayed input values and
w(n)is the weight vector at time n. µ is the step size parameter. This algorithm is used due to its
computational simplicity. It requires 2N+1 multiplications and additions but it has a fixed step
size for each iteration.

Dept of ECE NBA Accredited Page 5


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 3

PROPOSED SYSTEM

3.1BLOCK DIAGRAM

FIG3.1 BLOCK DIAGRAM OF THE PROPOSED SYSTEM

3.2 NOISE IN SPEECH SIGNAL

The most frequent problem in speech processing is the consequence of interference noise in
speech signals. Interference noise in a certain way modulates the speech signal and reduces its
clearness. Interference noise can be produced from acoustical sources such as ventilation
equipment, echoes, crowds and in general with any type of signal that interfaces with speech
signal.

Dept of ECE NBA Accredited Page 6


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

A relationship between the strength of the speech signal and the modulation due to the noise is
called the signal-to-noise ratio, which expressed in decibels. In an ideal world, the signal-to-
noise ratio is greater than 0dB. This indicates that the speech is louder than the noise. The sort
and spectral content of the noise determines how much

the speech is understood. The most effect mask is broadband noise. Although, narrow-band
noise is less effective at modulating speech than broadband noise., the degree of its
effectiveness varies with the frequency.

High -frequency noise encapsulate only the constants, and its effectiveness decreases as the
noise increases its amplitude. On the other hand, low frequency noise is much more effective
modulation when the signal is louder than the speech signal. The noise is able to encapsulate
vowels and consonants at high pressure levels.

In general, noise that affects the speech signals can be described using one of the following
criteria:

1. White noise: It is a sound or signal consisting of all audible frequencies that have equal
intensity. For each frequency, the phase of the noise is completely uncertain. The phase can
be shifted up to 360°, and its value is unrelated to the phase for the given frequency value.
In the case where two or more noise signals are added together, the resultant signal has a
power equal to the sum of the component powers. The white noise has a strong
encapsulating property because of the broad-band spectrum.
2. Colored noise: One can say that any noise that is not white noise can be considered as
colored noise. Colored noise has a frequency spectrum that is band limited inside a range,
therefore is different to white noise which extends over the entire spectrum. There are
different types of colored noise (pink noise, orange noise, etc.) depending on the limited
range in the Power Spectral Density of the noise. We can generate a specific color noise by
filtering white noise by using a filter that has a required frequency response.
3. Impulsive noise: This type of noise refers to unexpected peaks of noise with quite high
amplitude. Impulsive noise is generally modeled as contaminated Gaussian noise.

Dept of ECE NBA Accredited Page 7


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

3.2.1 NOISE IN FILTER DESIGN

A system that has been digitized has errors; therefore, the circuit can only be an approximation
to the original analog system. In general, the result of the noise introduced into the system due to
the errors produced is more pronounced IIR filters, because of the feed-back elements cause the
errors to increase over time. On the other hand, FIR filters are feed -forward circuits. Therefore,
any error that appears in the output signal is seeing only once per sampling period.

3.3 FIR FILTER

In signal processing, a finite impulse response (FIR)filter is a filter whose impulse response (or response
to any finite length input) is of finite duration, because it settles to zero in finite time. This is in contrast
to infinite impulse response (IIR) filters, which may have internal feedbackand may continue to respond
indefinitely. The impulse response (that is, the output in response to a delta input) of a Nth-order discrete
time FIR filter lasts exactly N+1 samples (from first nonzero element) before it then settles to zero. FIR
filters can be discrete-time, continuous- time and digital or analog.

ֿ
FIG 3.2 TRANSVERSAL FIR FILTER

A direct form discrete-time FIR filter of order N. The top part is an N-stage delay line with N+1 taps.
Each unit delay is a
operator in Z transform notation.

Dept of ECE NBA Accredited Page 8


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

FIG 3.3 Lattice form FIR filter

A lattice-form discrete-time FIR filter of order N. Each unit delay is a operator in Z


transform notation.
For a causal discrete-time FIR filter of order N, each value of the output sequence is a weighted
sum of the most recent input values.

Where, x(n) is the input signal,


y(n) is the output signal
n is the filter order; an N- the order filter has (N+1) terms on the right-hand side.
bi is the value of the impulse response at the i-th instant for 0 of an N- th order FIR
filter. If the filter is a direct form then bi is also a coefficient of the filter. This computation is also
known as discrete convolution.
The x(n-i) in these terms are commonly referred to as taps, based on the structure of a
tapped delay line that in many implementations or block diagrams provides the delayed inputs to the
multiplication operations. One may speak of a 5 -th order or 6 tap filters for instance. The impulse
response of the filter as defined is nonzero over a finite duration. Including zeros, the impulse response
is the infinite sequence.

Dept of ECE NBA Accredited Page 9


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

If a FIR filter is non-causal, the range of nonzero values in its impulse response can start before n=0,
with the defining formula appropriately generalized.

3.4ADAPTIVE FILTERING

An adaptive filter is a system with a linear filter that has a transfer function controlled by
variable parameters and a means to adjust those parameters according to an optimization
algorithm. Because of the complexity of the optimization algorithm, almost all adaptive filters
are digital filters. Adaptive filters are required for some applications because some parameters
of the desired processing operation are not known in advance or are changing. The closed loop
adaptive filters use feedback in the form of an error signal to refine its transfer function.

Generally speaking, the closed loop adaptive process involves the use of a cost function, which
is a criterion for optimum performance of the filter, to feed an algorithm, which determines how
to modify filter transfer function to minimize the cost on the next iteration. The most common
cost function is the mean square of the error signal.

As the power of the signal processors has increased, adaptive filters have become much more
common and are now routinely used in devices such as mobile phones and other
communication devices, camcorders and digital cameras and medical monitoring equipment.

FIG 3.4 BLOCK DIAGRAM OF ADAPTIVE FILTR

Dept of ECE NBA Accredited Page 10


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

3.5Least Mean Square(LMS)

Least Mean Square (LMS) is an adaptive algorithm, that performs certain operations to update
the coefficients of an adaptive FIR filter. LMS algorithm uses the estimates of the gradient
vector from the available data. The LMS incorporates an iterative procedure that makes
corrections to the weight vector in the direction of the negative of the gradient vector which
eventually leads to the minimum mean square error. Compared to other algorithms, the LMS
algorithm is considered simpler because it does not require correlation function calculations nor
does it require matrix inversions. There are many algorithms used to adjust the coefficients of
the digital filter in order to match the desired response as well as possible. The LMS Algorithm
is the more successful of the algorithms because it is the most efficient in terms of storage
requirement and indeed computational complexity, the basic LMS algorithm updates the filter
coefficients after every sample.

The Least-Mean-Square algorithm in words:

Fig 3.5 The LMS algorithm in words

The simplicity of the LMS algorithm and ease of implementation means that it is the best choice for many
real time systems.

The LMS adaptive filter algorithm that developed in this study is shown in Figure 3. The
parameters y1 and y2 are the inputs of the algorithm in the form of column vector. This is study
y1 is the noise corrupted signal and y2 is the noise signal. The parameter W(k) is the column
weight vector of the filter at kth time, which is used in the algorithm to update the subsequent
column weight vector and can be represented in the equation (1) below:

Dept of ECE NBA Accredited Page 11


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

Fig3.6 LMS Adaptive filter

The LMS Algorithm consists of two basic processes:


-
1. Calculate the output of FIR filter by convolving input and taps.
2. Calculate estimation error by comparing the output to desired signal
-
1.Adjust tap weights based on the estimation error.

3.5.1 IMPLEMENTATION STEPS

1. Filter output

2. Estimation error

3. Tap weight adaptation

Dept of ECE NBA Accredited Page 12


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

3.5.2 LMS WEIGHT UPDATION

In LMS algorithm w(n) is assumed as

Since in LMS algorithm,

Therefore

FIG 3.7 TAP WEIGHT UPDATION

Dept of ECE NBA Accredited Page 13


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

3.5.3 Stability and Convergence of LMS


As the LMS algorithm does not use the exact values of the expectations, the weights
would never reach the optimal weights in the absolute sense, but a convergence is possible in
mean. That is, even though the weights may change by small amounts, it changes about the
optimal weights. However, if the variance with which the weights change, is large, convergence
in mean would be misleading. This problem may occur, if the value of step-size parameter is not
chosen properly.
If step size parameter is chosen to be large, the amount with which the weights change
depends heavily on the gradient estimate, and so the weights may change by a large value so that
gradient which was negative at the first instant may now become positive. And at the second
instant, the weight may change in the opposite direction by a large amount because of the
negative gradient and would thus keep oscillating with a large variance about the optimal
weights. On the other hand, if step size parameter is chosen to be too small, time to converge to
the optimal weights will be too large.

Thus, an upper bound on is needed which is given as

Where is the greatest eigen value of the autocorrelation matrix.

Maximum convergence speed is achieved

3.5.4 ADVANTAGES OF LMS

 Simplicity of implementation
 Not neglecting the noise like zero forcing equalizer.
 Stable and robust performance against different signal conditions.

3.6 FIELD PROGRAMMABLE GATTE ARRAY

An FPGA is a device that contains a matrix of reconfigurable gate array logic circuitry. When
FPGA is configured, the internal circuitry is connected in a way that creates a hardware
implementation of the software application. Unlike processors, FPGA use dedicated hardware
for processing logic and do not have an operating system. FPGAs are truly parallel in nature so

Dept of ECE NBA Accredited Page 14


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

different processing operations do not have to complete for the same resources. As a result, the
performance of one part of the application is not affected when additional processing is added.
Also, multiple control loops can run on a single FPGA device at different rates. FPGA-based
control systems can enforce critical interlock logic and can be designed to prevent I/O forcing by
an operator. However, unlike hard-wired printed circuit board (PCB) designs which have fixed
hardware resources. FPGA-based systems can literally rewire their internal circuitry to allow
reconfiguration after the control system is deployed to the field. FPGA devices deliver the
performance and reliability of dedicated hardware circuitry. A single FPGA can replace
thousands of discrete components by incorporating millions of logic gates in a single integrated
circuit(IC) chip. The internal resources of an FPGA chip consist of a matrix of CLB, IOB and
routing channel.

FIG 3.8 FPGA BOARD

Dept of ECE NBA Accredited Page 15


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 4

IMPLEMENTATION

4.1 MATLAB

MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and


proprietary programming language developed by MathWorks. MATLAB allows matrix
manipulations, plotting of functions and data, implementation of algorithms, creation of user
interfaces, and interfacing with programs written in other languages. Although MATLAB is
intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic
engine allowing access to symbolic computing abilities. An additional package, Simulink, adds
graphical multi-domain simulation and model-based design for dynamic and embedded
systems. As of 2020, MATLAB has more than 4 million users worldwide. MATLAB users
come from various backgrounds of engineering, science, and economics.

MATLAB is an interactive programming environment for scientific computing. MATLAB is


heavily used in many technical fields for data analysis, problem solving, and for
experimentation and algorithm development. Discipline-specific software written in MATLAB,
organized into libraries of functions called toolboxes, is widely used as well. MATLAB has
found extensive use as the basis for computational laboratory work in technical education; more
than 1000 textbooks use MATLAB as a teaching vehicle. MATLAB is a product of The
MathWorks of Natick, Massachusetts, USA. There is general agreement in the technical
computing community that the main reasons for MATLAB's success are its intuitive, concise
syntax, the use of complex matrices as the default numeric data object, the power of the built-in
operators, easily used graphics, and its simple and friendly programming environment, allowing
easy extension of the language. To this one can add the reliability of numerical methods on
which the operators are based.

Dept of ECE NBA Accredited Page 16


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

4.1.1 LMS ALGORITHM IN MATLAB

The LMS algorithm for adaptive filtering was coded in MATLAB using direct form FIR filter
and SNR of noisy signal and the filtered signals were calculated. Also, MSE for different sound
signals were determined. To perform the system improvement signal to noise ratio is
determined and which shows the system effectiveness. The figure of merit used to measure the
performance of the adaptive algorithms is the Mean square error or MSE. It is given as

MSE=

In this equation e (n) represents the difference between the original signal and the filtered
signal. N is order of the filter. MATLAB is used as the simulation tool for the project. The
function adaptfilt.lms() is used for creating the adaptive filter working on LMS algorithm. This
function gives the characteristics of the adaptive filter according to the input like step size, filter
length etc. provided. The performance of the LMS algorithm has been assessed for noise
cancellation. The MATLAB tool r2017b has been used for analysis. First a recorded voice
signal is taken and then different noises i.e. AWGN (additive white Gaussians noise) is used to
corrupt the voice signal and the corrupted signal were filtered adaptively and results have been
analyzed.

Dept of ECE NBA Accredited Page 17


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

FIG 4.2 LMS Implementation

Dept of ECE NBA Accredited Page 18


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 5
RESULT AND DISCUSSIONS

5.1 FILTER PARAMETERS

For the obtained results, the following parameters are calculated to evaluate the performance of
the filter being used.

5.1.1 Mean Square Error (MSE)

The MSE is a metric indicating how much a system can adapt to a given solution. A small
MSE is an indication that the adaptive system has accurately modeled, predicted, adapted or
converged to a solution for the system. There are a number of factors which will help to
determine the MSE including, quantization noise, order of the adaptive system, measurement
noise, error of the gradient due to the finite step size.

Error=desired signal-Enhanced signal


E(n) =d(n)-y(n), then MSE is

J(n) =

5.1.2 Peak signal-to-noise ratio(PSNR)

PSNR is the ratio between the maximum possible power of a signal and the power corrupting
noise that affects the fidelity of its representation. Because many signals have a very wide
dynamic range, PSNR is usually expressed in terms of decibels.

PSNR=10∙ , where MAX is the peak value.

=20∙

=20∙

Dept of ECE NBA Accredited Page 19


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

For a better performance, frequencies were selected such that the MSE value is below 0 and
PSNR is above 50.

Frequency range (rad/sample) MSE PSNR


0.35 0.0019 27.1718

0.05 0.0017 27.6535

0.01 2.6533e-0.4 35.7622

0.005 7.3983e-0.5 41.3087

0.001 3.0991e-0.5 55.0876

0.0001 3.1778e-0.8 74.9787

TABLE 1: FILTER DESIGN


The above table shows the PSNR and MSE value under different frequency range. A high
PSNR value indicates that the error associated with the system is less and thereby resulting in
better performance. To achieve a noise free system, the mean square error value is minimized.
From the table it is evident that within the range of 0.0001 the PSNR exceeds the
basic conditional value of 50 and also MSE is minimized such that it is below zero.

5.2 GRAPHICAL ANALYSIS

Here, sine wave was used to analyse the variation of MSE with iteration for different values of
step size parameter.

Dept of ECE NBA Accredited Page 20


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

FIG 5.1 Results for speech signal with AWGN

This figure shows the results for the speech signal with AWGN. The voice signal is corrupted
with additive noise and then this signal is filtered adaptively. The result shows the analysis
with a step size parameter µ=0.013. The corrupted signal which consists of the voice signal
and the additive noise is compared with reference to a desired signal.

Dept of ECE NBA Accredited Page 21


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

FIG 5.2 Frequency response


Normalized frequency is a unit of measurement of frequency equivalent to cycles/samples. In
digital signal processing (DSP), the continuous time variable, t with units of seconds, is
replaced by the discrete integer variable n, with units of samples. More precisely, the time
variable , in seconds, has been normalized (divided) by the sampling interval, T
(seconds/samples), which causes rime to have convenient integer values at the moment of
sampling.

Dept of ECE NBA Accredited Page 22


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

The spectrogram of the output signal from which noise is eliminated is given below.

FIG 5.3 Spectrogram output

The declination in the difference between the reference signal and the filtered signal has proven
that speech signa is recovered from the noise corrupted speech signal. The filtered speech
signal recovered from the noise corrupted speech signal has low percentage difference which is
8.9% compared to the noise-free speech signal. This shows the performance of the LMS
adaptive filter in filtering the noise signals.

Dept of ECE NBA Accredited Page 23


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 6
CONCLUSION AND FUTURE SCOPE

This project verifies the suppression of noise from a speech signal using the proposed method
on the adaptive filter with the LMS algorithm. The simulation of the same is done using the
MATLAB software. The results show that a better filtering is obtained with improved values of
SNR. The LMS algorithm proves to be the more successful of the algorithms because of its
simplicity. The simplicity of the LMS algorithm and ease of Implementation makes it the best
choice for many real time systems. It is also noted that LMS is the best algorithm since it
produces minimum mean square error thereby making the system outputs noise free.

The software implementation of LMS noise cancelling algorithm can be further moved into
hardware description language. For this purpose, Xilinx Field Programmable Gate array
(FPGA) development kit can be used. Also, this miniaturized FPGA chip can be incorporated in
the hearing aid for better hearing for the people suffering from sensorineural hearing loss.
FPGAs are the best choice as a platform due to their greater flexibility and higher bandwidth
resulting from their parallel architecture.

Dept of ECE NBA Accredited Page 24


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

CHAPTER 7
REFERENCES

[1] Jiashu Zhang' and Heng-Ming Tai2, “Adaptive Noise Cancellation Algorithm for Speech
Processing” The 33rd Annual Conference of the IEEE Industrial Electronics Society (IECON) Nov. 5-
8, 2007
[2] K. Khaldi, A. Boudraa, A. Bouchikhi, M. Turki-Hadj Alouane and E. S. Diop, "Speech signal noise
reduction by EMD," 2008 3rd International Symposium on Communications, Control and Signal
Processing, St Julians, 2008, pp. 1155-1158.
[3] Sayed. A. Hadei, A Family of Adaptive Filter Algorithms in Noise Cancellation for Speech
Enhancement, International Journal of Computer and Electrical Engineering, Vol. 2, No. 2, April
2010. 1793-8163.
[4] J. Cheng, T. Su, T. Li and C. Wu, "The Noise Reduction of Speech Signals Based on RBFN," 2015
International Conference on Intelligent Information Hiding and Multimedia Signal Processing (IIH-
MSP), Adelaide, SA, 2015, pp. 449-452.
[5] A. N. Untwale and K. S. Degaonkar, "Survey on noise cancellation techniques of speech signal by
adaptive filtering," 2015 International Conference on Pervasive Computing (ICPC), Pune, 2015, pp.
1-4.
[6] V. Anoop and P. V. Rao, "Adaptive noise cancellation in speech signals using optimization
algorithms," 2016 International Conference on Communication and Signal Processing (ICCSP),
Melmaruvathur, 2016, pp. 0027-0031.
[7] A. Kumar, P. Goel, V. K. Gupta and M. Chandra, "Comparative research of various adaptive
algorithms for noise cancellation in speech signals," 2016 International Conference on Control,
Computing, Communication and Materials (ICCCCM), Allahabad, 2016, pp. 1-5.
[8] P. Kumar and S. Kansal, "Noise removal in speech signal using fractional Fourier transform,"
2017 International Conference on Information, Communication, Instrumentation and Control
(ICICIC), Indore, 2017, pp. 1-4.

Dept of ECE NBA Accredited Page 25


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

[9] M. Arif, I. Naseem, M. Moinuddin, S. S. Khan and M. M. Ammar, "Adaptive noise cancellation using
q-LMS," 2017 International Conference on Innovations in Electrical Engineering and Computational
Technologies (ICIEECT), Karachi, 2017, pp. 1-4.

[10] D. Niranjan and B. Ashwini, "Noise cancellation in musical signals using adaptive filtering
algorithms," 2017 International Conference on Innovative Mechanisms for Industry Applications
(ICIMIA), Bangalore, 2017, pp. 82-86.
[11] J. Zhang, T. D. Abhayapala, W. Zhang, P. N. Samarasinghe and S. Jiang, "Active Noise Control
Over Space: A Wave Domain Approach," in IEEE/ACM Transactions on Audio, Speech, and Language
Processing, vol. 26, no. 4, pp. 774-786, April 2018.
[12]C. Ho, K. Shyu, C. Chang and S. M. Kuo, "Equation-Error Model Based Active Noise Cancellation
Systems," ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal
Processing (ICASSP), Brighton, United Kingdom, 2019, pp. 8474-8478.
[13] S. Kalaivani, G. Geetha, S. M. M. Banu, S. Sowjanya, R. Vishali and C. Tharini, "Analysis of
Adaptive Filter Algorithms in Real Time Signals," 2019 International Conference on Smart Systems
and Inventive Technology (ICSSIT), Tirunelveli, India, 2019, pp. 988-993.

Dept of ECE NBA Accredited Page 26


DESIGN AND IMPLEMENTATION OF ADAPTIVE FILTERING ALGORITHM FOR NOISE CANCELLATION
OF SPEECH SIGNAL ON FPGA FOR HEARING AID

Dept of ECE NBA Accredited Page 27

You might also like