Arba Minch University Arba Minch Institute of Technology Department of Electrical and Computer Engineering Title
Arba Minch University Arba Minch Institute of Technology Department of Electrical and Computer Engineering Title
Arba Minch University Arba Minch Institute of Technology Department of Electrical and Computer Engineering Title
DECLARATION
We hereby declare that we carried out the work" Designing and Analysis of
Acoustic Echo Cancellation" in the department of Electrical and computer
engineering, University of Arbaminch, under the advisor of Mr. Eyayu H.
(MSc in communication Engineering). All source of knowledge used have
been duly acknowledge.
Name Signature
Date
Mr. A ____________
___________
Mr. A _____________
___________
Mr. A _____________
___________
APROVAL
It is approved that this project has been written in compliance with the formatting
rules laid down by electrical and computer engineering university of, Ethiopia.
……………………………………………………….
Advisor Signature Date
MR. A. __________ _________
Department head
MR. A. __________ _________
First of all our gratitude goes to the Almighty God for his positive will and help
without which the things we made here were value less. Secondly we, want to
thank our teachers especially, our Advisor Mr. Eyayu H.( MSC in electrical and
computer engineering) for his unlimited, truly help and guide us from the very
beginning of selecting the title and we also thank some other lectures for helping
us to do the project.
ABSTRACT
ABSTRACT ......................................................................................................... iv
TABLE OF CONTENT ........................................................................................ v
LIST OF FIGURE............................................................................................... vii
ACRONYMS ......................................................................................................viii
CHAPTER ONE .....................................................................................................1
Introduction ............................................................................................................1
Background .............................................................................................................1
Statement of problem .............................................................................................3
Objective of the Study ...........................................................................................3
General Objective ..................................................................................................3
The specific objectives ..........................................................................................3
Scope of this project ...............................................................................................4
Literature review ....................................................................................................4
Methodology .........................................................................................................6
Project organization ................................................................................................8
CHAPTER TWO ...................................................................................................8
Basic Echo Canceller .............................................................................................8
Acoustic Echo Cancellation in teleconference/Videoconference ...........................9
Acoustic Echo Cancellation (AEC) .....................................................................11
Adaptive filters .....................................................................................................12
General block diagram of the adaptive filters ......................................................13
Adaptive Algorithms .............................................................................................16
LMS algorithm .....................................................................................................16
Performance evaluation ...........................................................................................
Convergence Test .......................................................................................................
CHAPTER THREE ...................................................................................................
3. SYSTEM DESIGN FOR ECHO CANCELLATION ............................................
CHAPTER FOUR.......................................................................................................
4. SIMULATION AND RESULTS............................................................................
4.1 Discussion..............................................................................................................
4.2 Results...................................................................................................................
CHAPTER FIVE.........................................................................................................
5. CONCLUSION AND RECOMMENDATIONS ..................................................
5.1 Conclusion............................................................................................................
5.2 Recommendations.................................................................................................
REFERANCE..............................................................................................................
APPENDEX................................................................................................................
LIST OF FIGURE
Figure 1.1 principle of acoustic echo cancellation system ............................... 2
Figure2. 1 a Generic Adaptive Echo Canceller ............................................... 8
Figure2. 2 The basic model of adaptive filter ............................................... 10
Figure2. 3 block diagram of adaptive filter .........................................................
Figure2. 4 LMS Algorithm .............................................................................14
Figure2. 5 Generic LMS Algorithm .............................................................. 15
Figure3. 1 Flowchart for Echo Cancellation........................................................ 17
Figure4. 1 plot of the impulse response H(n) ........................................ 18
Figure4. 2 Plot of the Far-end Signal, x(n)............................................... 19
Figure4. 3 Plot of the Near-end Signal, x(n)............................................... 19
Figure4. 4 Plot of the microphone Signal............................................................ 20
Figure4. 5 Microphone Signal is entered into Adaptive filter and output of AC.20
Figure4. 6 Normalized LMS method................................................................... 21
Figure4. 7 convergence performance of regular LMS ........................................ 21
Figure4. 8 convergence performance of regular NLMS...................................... 22
Figure4. 9 comparing the LMS and NLMS convergence performance............... 22
ACRONYMS
AEC…………………………… acoustic echo cancellation
RIR………………………………room impulse response
AF………………………………. adaptive filters
LMS……………………………..least mean-square
FFT………………………………fast Fourier transform
FDAF……………………………frequency-domain adaptive filter
DSP……………………………..digital signal processing
NLMS……………………………normalized least mean square
FE……………………………….far end
NE………………………………. near end
EMSE…………………………… estimate mean square error
ERLE……………………………...echo return loss enhancement
ANC………………………………active noise cancellation
FIR………………………………..finite impulse response
IIR…………………………………infinite impulse response
BIBO……………………………..bounded input bounded output
CHAPTER ONE
1. Introduction
1.1 Background
People have been using telephones as a way of distant voice communication for
more than one century until now. In a phone conversation, echo is the sound of
one’s own voice being played back to him after a delay. There are two types of
echo presenting in typical communication networks: hybrid (line) echo and
acoustic echo. Acoustic echo cancellation and line echo cancellation both address
similar problems, and are often based on the same technology. However, a line
echo canceller generally cannot replace an acoustic echo canceller, because
acoustic echo cancellation is a more difficult problem. Hybrid echo is the outcome
of impedance mismatches along a telephone line, and is relatively easy to identify
and cancel. Acoustic echo is due to the leakage from loudspeaker to microphone in
a hands-free telephone, and is much more difficult to tackle. With acoustic echo
cancellation, the echo path is very complex (dozens or hundreds of reflections),
lasts 100-200 ms, and can vary continuously during a conversation as people move
around the room. Acoustic echo cancellers are therefore much more complicated
devices.
The solution to these problems is the elimination of the echo with an echo
suppression or echo cancellation algorithm. The echo suppressor offers a simple
but effective method to counter the echo problem. However, the echo suppressor
possesses a main disadvantage since it supports only half-duplex communication.
Half-duplex communication permits only one speaker to talk at a time. This
drawback led to the invention of echo cancellers. An important aspect of echo
cancellers is that full-duplex communication can be maintained, which allows both
speakers to talk at the same time.
This has led to intensive research into the area of echo cancellation, with the aim of
providing solutions that can significantly reduce or even remove acoustic echo.
Good acoustic echo cancellation system can greatly enhance the audio quality of a
communication system by allowing conversation to progress more smoothly and
naturally, keeping the participants more comfortable, and preventing listener
fatigue.
However, a poorly designed acoustic echo cancellation will not provide these
benefits and can even degrade audio quality significantly. This paper describes the
design and simulation of an acoustic echo cancellation (AEC) approach, which is
based on the least mean square(LMS) and somewhat normalized least mean square
(NLMS) algorithm. According to the simulation, the proposed acoustic echo
cancellation approach works well in the modest linear noisy environment.
The way how acoustic echo canceller works is shown in Figure 1.1. In general, the
near end microphone signal d(n) consists of signals from near end microphone,
near end, background noise and echo of the far-end audio signal originating from
the loudspeaker. The last signal is undesired. The objective of the echo canceller is
thus to form a replica of the acoustic echo signal picked up by the terminal
microphone by inserting an adaptive filter h(n) parallel to the signal path through
loudspeaker, room, and microphone.
Our university is making relation with other universities with in country and
outside the country but still now we cannot get on line learning and training, so we
are assume the limitation is there is no good video and teleconferencing room and
even it needs good echo cancellation. During the meeting to address the
information uniformly from one place by the president or selected person to the
whole student attend in meeting hall is still impossible in our university.
The noise i.e. echo is now available everywhere which can harm or change the
original signal and a reduction in the quality of the communication. Noise can’t be
removed totally but can be reduced and controlled by using different mechanisms
Acoustic echo cancellation traditionally involves passive methods such as
enclosures, barriers and silencers to attenuate noise. These techniques use either
the concept of impendence change or the energy loss due to sound absorbing
materials. These methods are however not effective for low frequency noise. Many
factors influence the design of an AEC system, such as computational complexity,
memory consumption. A technique to overcome this problem is Acoustic echo
Cancellation (AEC), so we design of Adaptive Acoustic Echo Canceller Using
LMS Algorithm in MATLAB software, which is sound field modification by elect
acoustic means.
Scope of this project is about echo cancelers have found wide use in full-duplex
data transmission over two-wire circuits and are now being applied to control echo
and howl in electronic conferencing applications. We simulated using adaptive
algorithm to reduce echo in a communication system by MATLAB software.
The aim of this work is to review the most recent acoustic echo cancellation
techniques and their applicability for current hands free applications. Therefore,
this paper presents Acoustic echo cancellation (AEC) systems challenges and
comparison between these techniques is also presented.
The history of echo cancellation begins on 10 July 1962.On that date, Bell
Laboratories ushered in the era of satellite communications with the launching of
Telstar, the first telecommunications satellite. Echo cancellation was developed in
the early 1960s by AT&T Bell Labs and later by COMSAT Tele-Systems. The
adaptive echo canceller tries to overcome the deficiencies of the classical methods
(Sondhi, Mar. 1967)].
Improvements in the design of echo suppressors were not able to deal with this
problem. A new technique was required that did not interrupt the echo return path,
and that technique was echo cancellation as opposed to echo suppression.
The idea of adaptive echo cancellation, first proposed by John L. Kelly of Bell
Labs. John Kelly unfortunately died of a sudden heart attack so the task of writing
the first full paper summarizing this work fell on Man Mohan Sondhi (Sondhi,
Mar. 1967)
M.M Sondhi:- Clearly states the history of echo cancellation that is important used
as a background for this project and also idea of adaptive echo cancellation by
using different algorithm was addressed. However he did not evaluate the effective
working of the algorithm and compare the convergence performance of regular
LMS algorithm to the normalized variant also did not addressed by him.
Therefore in order to evaluate the effective working of the algorithm, some basic
tests were conducted that is convergence test and Compare the convergence
performance of regular LMS algorithm to the normalized variant in this project
were added.
Lin Bai et al:- Adaptive algorithm for ANC to filter a noisy speech signal is
proposed in this paper. The new algorithm further relaxes the constraint in the CS-
LMS algorithm. The new algorithm attempts to minimize the estimation error and
the estimation is obtained using the concept of Taylor’s expansion. CS-LMS can
be seen as a special case of the new algorithm. Analysis results show that the new
algorithm can obtain better EMSE performance than NLMS and the new algorithm
can get performance improvement.
1.6 Methodology
We had to start from the research phase at the beginning and need to gain
knowledge on all the echo cancellation and different type algorisms components
that we had intended to use for our project.
Generally, the methods and steps involved throughout the study are as
following;
Literature review: We are gathering different information and components by
referring different books and searching web site regarding with our project.
System analysis and design approach: By using LMS Algorism we will design
acoustic echo cancellation and analyze how to remove delayed (echo) part from
original sound.
Simulation: Simulate in MATLAB software
Hardware tools: Desktop computer (laptop), Storage devices: hard disk, flash
disc, displaying devices like printer.
This paper analyzed the echo cancellation by developing MAT LAB code. The
project is preceded by the use of MAT LAB software. Generally this project
includes five chapters, each describing different parts but in general related.
The second chapter explores the basics of acoustic echo cancellation, the need and
advantage of the echo cancellation. It also explains about adaptive filters
application and different algorithms. The third chapter is about the system design
and flowchart for echo cancellation, the analysis of LMS algorithm and its block
diagram are explained.
The fourth part is the result and discussion of the project, in this part the MATLAB
Code is developed and run then the plots are put with explanation of their
characteristics. The output of echo canceller and comparison of the convergence
performance is shown in this part by simulating in MAT LAB software.
Finally the last part is about conclusion and recommendation based on result as this
is one parts of the projects.
CHAPTER TWO
2. Basic Echo Canceller
A basic echo canceller used to remove echo in telecommunication networks is
presented in Figure 2.1. This problem can be solved by using an adaptive filter that
gradually matches its estimated impulse response,h^ to that of the impulse response
of the actual echo path, h. The echo path is highly variable and can even depend on
such things as the movement of people in the room as well as other things. These
variations are accounted for by the adaptive control loop, which is built into the
canceller. The estimated echo ^y (n), desired response d(n) =r(n)+v(n) , error signal
is e(n) is given by
e ( n )=d ( n ) −^y (n) …… ……eq 2.1
In the ideal case, e(n) = v(n) this represents the case when the adaptive echo
canceller is perfect.
This acoustic echo can be removed using an adaptive filter as illustrated in Figure
2.1 Echo is the delayed and distorted version of the original speech which is
reflected back to the source. If reflected wave arrives after a very short time of
direct sound, it is considered as a spectral distortion or reverberation. However,
when the reflected wave arrives a few tens of milliseconds after the direct sound, it
is heard as a distinct echo. In data communication, the echo can lead to a big data
transmission error. In application like hands-free telecommunications, this echo, in
multichannel conditions, can make conversations impossible. Thus the echo has
been a big problem in communications networks.
Adaptive filters are efficient filters that iteratively alter their filter coefficients in
order to achieve an optimal output. Adaptive echo cancellation is achieved by
synthesizing the effect of echo path on voice or data and subtracting it from the
echo path output. The error function which is the difference between the desired
Signal and the filtered output is minimized algorithmically by the adaptive filter by
altering the coefficients. For the cancellation of echo the adaptive filter is used in
the feedback path. The role of the adaptive filter is to minimize the error between
the desired signal (i.e., the signal reverberated within the acoustic environment)
and filter output. The error signal is used to steer the filter coefficients to converge
fatly to optimum value which is depend on the input signals back into the adaptive
filter and its coefficients are converged according to an update equation to
minimize this error function or cost function. In case of AEC, the optimum value
of the output of the adaptive filter is equal to the echo signal. While the adaptive
filter output is equal to the desired signal the error signal goes to zero. In this
particular situation as we want the echo signal is completely cancelled and the FE
user would not receive the original speech returned back to them.
The signal x (n) and y (n) are correlated. Then, it gets the error signal as,
e ( n )=d ( n ) −~y ( n )=v ( n ) + y ( n ) −~y ( n ) …. …. eq 2.4
The adaptive filter works to minimize the echo ( y ( n )− ^y ( n )) to be zero to obtain only
near-end signal v(n) in the perfect case.
FIR filters are usually implemented with non-recursive structures, whereas IIR
filters utilize recursive realizations. FIR filter is preferred for AEC applications for
its stability during adaptation. IIR can normally achieve similar performance as
FIR, with smaller amount of coefficients and less computation. However, as the
complexity of the filter grows, the order of the IIR filter increases a lot and the
computational advantage is less dominant. Also, IIR suffers from the instability
problem.
The Wiener filter consists of a digital input signal x(k), an desired output d(k) and
a linear filter containing the answer to the impulse h(k); the input x(k) is used to
obtain the output y(k). The difference between the output of Wiener filter y(k) and
the desired output d(k) is the estimation error e(k).The importance of Weiner
filtration is given by the answer of the impulse h(k), which gives a small estimation
error. So, the main purpose is to minimize the square value of e(k).
Here w represents the coefficients of the FIR filter tap weight vector, x(n) is the
input vector sample, is a delay of one sample, y(n) is the adaptive filter output, d(n)
is the desired echoed signal and e(n) is the estimation of the error signal at time n.
The aim of an adaptive filter is to calculate the difference between the desired
signal and the adaptive filter output, e(n). The error signal is fed back into the
adaptive filter and its coefficients are changed algorithmically in order to minimize
a function of this difference, which is known as the cost function.
In the sample-by-sample adaptive algorithms the adaptation can take place both in
time domain as well as in frequency domain. Therefore, sample-by sample
adaptive algorithm will further divided into two classes of algorithms. One class
includes filter that are updated in time domain sample-by-sample, called time
domain sample-by sample adaptive algorithm. Algorithms belonging to this
category are Least Mean Square (LMS) and Recursive Least mean Square (RLS)
which are popular due to number of advantages. Other class includes filters that are
updated in frequency domain and are known as Frequency Domain Adaptive Filter
(FDAF). FDAF is designed to achieve fast convergence rate and low
computational cost using of FFT reduces the computational complexity of FDAF.
The common algorithm belonging
Adaptive filter algorithms are widely applied in acoustic echo canceller (AEC)
such as namely Recursive Least Square (RLS) filter and Least Mean Square
(LMS) filter. The RLS is a Recursive implementation of Wiener filter that is used
for stationary processes. A relatively simpler algorithm, LMS, uses the gradient
search method to search for the least square error filter coefficients. The LMS
algorithm provides good numerical stability and its hardware requirements are low,
therefore being the best choice on the available hardware platform. A disadvantage
of this algorithm is its weak convergence, but based on obtained results this didn’t
prove to become a major issue. On the other hand, the NLMS algorithm is one of
the most implemented adaptive algorithms in actual telecom/industrial
applications. The echo cancellation algorithm is recommended to be implemented
in hardware in case of Internet conversations (VoIP or voice chat) where high
latencies and echo can induce perturbations.
The least mean square, (LMS), is a search algorithm that is widely used in various
applications of adaptive filtering. The main features that attracted the use of the
LMS algorithm are low computational complexity, proof of convergence in
stationary environments and stable behavior when implemented with finite
precision arithmetic. Figure 2.4 illustrates how such an algorithm works. A path
that changes the signal x is called h. Transfer function of this filter is not known in
the beginning. The task of the LMS algorithm is to estimate the transfer function of
the filter.
The signals are added so that the output signal from the algorithm is
v+ r−^r =v +e …. …. eq 2.4b
Where denotes the error signal. The error signal and the input signal x are used for
estimation of the filter coefficient vector w. One of the main problems associated
with choosing the filter weight is that the path h is not stationary. Therefore, the
filter weights must be updated frequently so that the adjustment to the variations
can be performed.
−1
w=b 0+ b 1 z +…+(bL−1) z
−( L−1)
…. …. eq 2.5
Where w(k) is a vector containing the filter weights [b0,b1,b2,…,b0] and x(k)
represents the vector[x(n),x(n-1),…,x(n-L)]T. L is the length of the adaptive filter.
Then the gradient estimate gw(k) is given by
gw ( k )=2d ( k ) x ( k ) +2 x (k) X (k ) w(k) …. …. eq 2.8
T
¿ 2 x ( k ) ( d ( k )+ X ( k ) w ( k )) …. …. eq 2.9
T
The echo cancellation system design flowchart is shown in following figure 5. This
flow chart is designed for acoustic echo cancellation system using LMS algorithm.
This program must create echo signal and desired signal d (n). From overall flow
chart, the process must read far-end signal, x (n) and room impulse response, h.
Then, the program created echo signal from near-end speech signal, v (n) and read
near end signal. The program must create desired signal, d (n) to compare the
result from the output results. The echo canceller run using LMS and NLMS
algorithm to compute error signal. Then, the echo cancellation process gets
residual echo by subtracting estimate echo from the desired signal. Finally, the
nonlinear processor removed the remaining echo from adaptive filter output.
4.1 Discussion
The previous chapters provide a detailed sketch of an AEC and the flowchart for
the software simulation. In this chapter the results of simulation of the AEC
algorithm, which was performed in MATLAB are discussed.
4.2 Results
First modeled the acoustic of the loudspeaker-to-microphone signal path where the
speakerphone is located. Use a long finite impulse response filter to describe the
characteristics of the room. The plot of impulse response is H(n) presented in
Figure 4.1
Figure 4. 5 Microphone Signal is entered into Adaptive filter and output of AEC
By using Normalized LMS method in this paper can generate Echo free signal
which can be transmitted to the receiver end in figure 4.6
In order to evaluate the effective working of the algorithm, some basic tests were
conducted. This section provides a brief account of these tests.
5.1 Conclusion
5.2 Recommendations
There are many possibilities for further development in this work. Other
techniques such as infinite impulse response (IIR) or lattice filtering may prove to
be more effective in an echo cancellation application, but with more hardware
complications and need more than one chip to implement.