SlideShare a Scribd company logo
1 of 11
1
Abstract
Today, people are more interested in hands-
free communication. In such a situation, the
use a regular loudspeaker and a high-gain
microphone, in place of a telephone
receiver, might seem more appropriate. The
presence of a large acoustic coupling
between the loudspeaker and microphone
would produce a loud echo that would make
conversation difficult. Furthermore, the
acoustic system could become instable,
which would produce a loud howling noise
to occur. The solution to these problems is
the elimination of echo with an echo
cancellation algorithm. The echo cancellers
have main disadvantage since it supports
only a half-duplex communication . An
important aspect of echo cancellers is that
full-duplex communication can be
maintained, which allows both speakers to
talk at the same time.
Introduction
Echo is the repetition of a waveform due to
reflection from points where the
characteristics of the medium through which
the wave propagates changes. Echo is
usefully employed in sonar and radar for
detection and exploration purposes. In
telecommunication, echo can degrade the
quality of service, and echo cancellation is
an important part of communication
systems. The development of echo reduction
began in the late 1950s. There are two types
of echo in communication systems: acoustic
echo and telephone line hybrid echo.
Acoustic echo results from a feedback path
set up between the speaker and the
microphone in a mobile phone or hands-free
phone. Telephone line echoes result from an
impedance mismatch at telephone exchange
hybrids where the subscriber's 2-wire line is
connected to a 4-wire line. The perceptual
effects of an echo depend on the time delay
between the incident and reflected waves,
the strength of the reflected waves, and the
number of paths through which the waves
are reflected. Telephone line echoes, and
acoustic feedback echoes are undesirable
and annoying and can be disruptive.
What is echo ?
Echo is a phenomenon where a delayed and
distorted version of an original sound or
electrical signal is reflected back to the
source. If a reflected wave arrives after a
very short time of direct sound, it is
considered as a spectral distortion or
reverberation. However, when the leading
edge of the reflected wave arrives a few tens
of milliseconds after the direct sound, it is
2
heard as a distinct echo. Fig 1 illustrate
simple diagram explained echo .
Fig 1 Here B is the reflected wave arrives after a very short
time of direct sound
How echo generated
A significant problem in communications is
the generation of echoes. The echoes arise
for a number of reasons, with the primary
reason being an impedance mismatch. The
impedance mismatch occurs when the two-
wire network meets the four-wire network,
this interface is known as the hybrid. This
impedance mismatch causes some of the
signal energy to be returned to the source as
an echo .
The delays between primary and echo
signals are directly related to the
transmission distance. For example, if a
signal was sent to a satellite that redirected
the signal back to another location on earth,
that signal would have a very large time
delay compared to a signal sent to a local
switching station and back. Short delays
(less than 50 ms) will not affect the quality
of the signal as much as longer delays.
Delays of this length are not noticed by the
receiver and therefore are not considered an
annoyance. However, these echoes may
have an effect on data being transmitted
through transmission lines [1]
Echo Types
There are two types of echo in
communication systems :
One) Acoustic echo : Acoustic echo
results from a feedback path set up between
the speaker and the microphone in a mobile
phone, hands-free phone, teleconference or
hearing aid system. Acoustic echo is usually
reflected from a multitude of different
surfaces, such as walls, ceilings and floors,
and travels through different paths .
Fig 2 Acoustic echo .
Gain of an acoustic feedback loop depends
on the frequency responses of the electrical
and the acoustic signal paths. The
undesirable effects of the electrical sections
3
on the acoustic feedback can be reduced by
designing systems that have a flat frequency
response . [1]
Two) Telephone line Hybrid echo
[Hybrid] : Hybrid echo is the main source
of echo generated from the public-switched
telephone network (PSTN). Echoes on a
telephone line are due to the reflection of
signals at the points of impedance mismatch
on the connecting circuits. Conventionally,
telephones in a given geographical area are
connected to an exchange by a 2-wire
twisted line, called the subscriber's line ,
which serves to receive and transmit signals.
In a conventional system a local call is set
up by establishing a direct connection, at the
telephone exchange, between two
subscribersโ€™ loops. For a local call, there is
usually no noticeable echo either because
there is not a significant impedance
mismatch on the connecting 2-wire local
lines or because the distances are relatively
small and the resulting low-delay echoes are
perceived as a slight amplification and
โ€œliveningโ€ effect. For long communication
between two exchanges, it is necessary to
use repeaters to amplify the speech signals;
therefore a separate 2-wire telephone line is
required for each direction of transmission.
Fig 3: Illustration of a telephone call set up by connection of 2-
wire subscriber's via hybrids to 4-wire lines at the exchange
Figure 4: A 2-wire to 4-wire hybrid circuit.
To establish a long-distance call, at each
end, a 2-wire subscriber's line must be
connected to a 4-wire line at the exchange
fig 4 , as illustrated in Figure 5 . The device
that connects the 2-wire subscriber's loop to
the 4-wire line is called a hybrid as shown in
figure 4 . the hybrid is basically a three-port
bridge circuit. If the hybrid bridge were
4
perfectly balanced then there would be no
reflection or echo. However, each hybrid
circuit serves a number of subscribersโ€™ lines.
The subscribers' lines do not all have the
same length and impedance characteristics;
therefore it is not possible to achieve perfect
balance for all subscribers at the hybrids.
When the bridge is not perfectly balanced,
some of the signal energy on the receiving
4-wire lines becomes coupled back onto
itself and produces an echo.
Echo is often measured in terms of the echo
return loss (ERL); the higher the echo
return loss the lower will be the echo.
Telephone line echoes are undesirable, and
become annoying when the echo amplitude
is relatively high and the echo delay is long.
For example when a long distance call is
made via a satellite the round-trip echo
delay can be as long as 600 ms, and echoes
can become disruptive. Also, as already
mentioned, there are appreciable delays of
up to 200 ms inherent in digital mobile
phones, which make any echo quite
noticeable. For this reason the employment
of echo cancellers in mobile switching
centers is mandatory. [2]
How to reduce acoustic echo ?
When the telephone connection is between
hands-free telephones or between two
conference rooms, then an acoustic echo
problem emerges that is due to the reflection
of the loudspeakerโ€™s sound waves from the
boundary surfaces and other objects back to
the microphone. There are a number of
methods for removing acoustic feedback.
One method for alleviating the effects of
acoustic feedback and the room
reverberations is to place a frequency shifter
(or a phase shifter) in the electrical path of
the feedback loop. Each time a signal travels
round the feedback loop it is shifted by a
few hertz before being re-transmitted by the
loudspeaker. This method has some effect in
reducing the howling but it is not effective
for removal of the overall echo of the
acoustic feedback. Another approach is to
reduce the feedback loop-gain at those
frequencies where the acoustic feedback
energy is concentrated. This may be
achieved by using adaptive notch filters to
reduce the system gain at frequencies where
acoustic oscillations occur. The drawback of
this method is that in addition to reducing
the feedback the notch filters also result in
distortion of the desired signal frequencies.
The most effective method of acoustic
feedback removal is the use of an adaptive
feedback cancellation system as in fig 5 [3]
5
fig 5 the use of an adaptive feedback cancellation system
x(n): far-end signal,, y(n): echo signal ,v(n)
near-end signal, d(n): microphone signal,
u(n): background noise, yhat(n): filter
input, e(n): error signal, d[n]=y[n]+u[n],
e[n] = d[n]- yhat(n)
Hybrid echo cancellation
We will define the speech of speaker A as
the near end signal for hybrid A and the
speech of speaker B as the far-end signal for
hybrid A. For hybrid B, the near-end and
far-end signals are the signals of speaker B
and of speaker A, respectively. The speaker
at the far-end hears not only what the
speaker at the near-end says ,but also an
echo of his own voice .fig 6 , The signal
from the near end signal will be denoted by
v(t). The signal from the far-end speaker is
x(t). The echo of the far-end speaker is y(t).
The echo can be modeled as the result of the
signal x(t) passing through a linear filter h(t)
y(t) = h(t) * x (t) Where *
denotes convolution.
The signal which is sent back to the far-end
speaker is: z(t) = v(t) + y (t)
Another possibility is to identify the impulse
response h(t) of the hybrid or the acoustic
coupling between the loudspeaker and the
microphone, then estimate the echo signal
y(t) and subtract it from z(t). Let the
estimated echo and impulse response be
ห†y(t) and ห†h(t), respectively . The signal sent
back to the far end is:
e(t) = z(t) - ห†y (t) = v(t) + y (t) - ห†y (t)
The estimated echo ห†y(t) is:
ห†y (t)= ห†h (t) * x(t) If ห† h(t) =h(t), then the
cancellation is complete, i.e. e(t) โ‰ก v(t) [4]
6
Fig 6: hybrid echo cancellation
The echo canceller coefficients wk(m) are
adapted to minimize the energy of the echo
signal on a telephone line, say from speaker
B to speaker A. Assuming that the speech
signals xA(m) and xB(m) are uncorrelated,
the energy on the telephone line from B to A
is minimized when the echo canceller output
x^echo
A (m ) echo xA m is equal to the echo
xA
echo
(m ) echo xA m on the line. The echo
canceller coefficients may be adapted using
one of the variants of the recursive least
square error (RLS) or the least mean squared
error (LMS) adaptation methods. One of the
most widely used algorithms for adaptation
of the coefficients of an echo canceller is the
normalized least mean square error (NLMS)
method. The time-update equation
describing the adaptation of the filter
coefficient vector is
w(m)= w(m-1)+ ยต [e(m) / ( x(m)T
A x(m) A )]
x(m) A
where xA(m)=[xA(m), ..., xA(mโ€“P)] and
w(m)=[w0(m), ..., wPโ€“1(m)] are the input
signal vector and the coefficient vector of
the echo canceller, and e(m) is the difference
between the signal on the echo line and the
output of the echo synthesizer. Note that the
normalizing quantity x(m)T
A x(m) A is the
energy of the input speech to the adaptive
filter. The scalar ยต is the adaptation step
size, and controls the speed of convergence,
the steady-state error and the stability of the
adaptation process.
acoustic echo cancellation is more
complex than line echo cancellation
The problem of acoustic echo cancellation is
more complex than line echo cancellation
for a number of reasons. First, acoustic echo
is usually much longer (up to a second) than
terrestrial telephone line echoes. In fact, the
delay of an acoustic echo is similar to or
more than a line echo routed via a
geostationary satellite system. The large
delay of an acoustic echo path implies that
impractically large filters on the order of a
few thousand coefficients may be required.
7
The stable and speedy adaptation of filters
of such length presents a difficult problem.
Secondly, the characteristics of an acoustic
echo path is more non stationary compared
with that of the telephone line echo.
Thirdly, acoustic echoes are due to signals
reflected back from a multitude of different
paths, off the walls, the floor, the ceiling, the
windows etc. Finally, the propagation and
diffusion characteristics of the acoustic
space of a room is a non-linear process, and
is not well approximated by a lumped FIR
(or IIR) linear filter. In comparison, it is
more reasonable to model the characteristics
of a telephone line echo with a linear filter.
In any case, for acoustic echo cancellation,
the filter must have a large impulse response
and should be able to quickly track fast
changes in echo path characteristics. [3]
Matlab Implementation
of Echo Cancellation in
Telephone Line
The RLS methods provides a faster
convergence rate and better overall
performance at the cost of higher
computational complexity
The information bearing signal is a sine
wave of 0.055 cycles/sample. It is
considered in this case to be assumed
voice signal , When the voice is passing
through the telephone line fig-7 the echo
is added with the signal fig-8 so that at
the far end we would not able to receive
the signal of actual voice but we get the
signal shown in fig 9. Now our aim is to
cancel the echo path. Here the Running
the RLS adaptive filter for 1000
iterations. The plot shows the
convergence of the adaptive filter
response to the response of the FIR filter
in fig 10. By computing we get the error
e signal shown in fig 11
fig 7 : Assumed voice signal
8
fig 8 : Echo path
fig 9 : Voice signal + Echo signal
Fig:10 filter response
Fig: 11 error signal
matlab implementation of
Acoustic Echo Cancellation
(AEC)
In acoustic echo cancellation, a measured
microphone signal d(n) contains two signals: -
the near-end speech signal v(n) - the far-end
echoed speech signal dhat(n) The goal is to
remove the far-end echoed speech signal from
the microphone signal so that only the near-end
speech signal is transmitted The Room Impulse
Response we describe the acoustics of the
loudspeaker-to-microphone signal path where
the speakerphone is located. We can use a long
finite impulse response filter to describe these
characteristics
P.S. far end and near end signals are uploaded
from matlab
9
Summary
Telephone line echo and acoustic
feedback echo affect the functioning of
telecommunication and teleconferencing
systems. In general, line echo
cancellation, is a relatively less complex
problem than acoustic echo cancellation
because acoustic cancellers need to
model the more complex environment of
the space of a room. We discussed
telephone line echoes arising from the
mismatch at the 2/4-wire hybrid bridge.
And implement RLS filter using matlab
simulink to remove it .we considered the
acoustic coupling between a loudspeaker
and a microphone system. Acoustic
feedback echo can result in howling, and
can disrupt the performance of
teleconference, hands-free telephones,
and hearing aid systems. The main
problems in implementation of acoustic
echo cancellation systems are the
requirement for a large filter to model
the relatively long echo.
References
[1] echo cancellation using adaptive filtering By Thani
Tridhavee And Steve Vuco
[2] Soria, E.; Calpe, J.; Chambers, J.; Martinez, M.; Camps, G.;
Guerrero, J.D.M.; โ€œA novel approach to introducing adaptive
filters based on the LMS algorithm and its variantsโ€, IEEE
Transactions, vol. 47, pp. 127-133, Feb 2008.
[3] Implementation of Acoustic Echo Cancellation For PC
Applications Using MATLAB,Master of Science Thesis In
System on Chip Design, by Lu Lu Stockholm, 05/2007
[4] International Journal of Emerging Technology and Advanced
Engineering Website: www.ijetae.com (ISSN 2250-2459, Volume
2, Issue 10, October 2012) 411 Matlab Implementation of Echo
Cancellation in Telephone Line
10
Appendix
M = 4001;fs = 8000;
[B,A] = cheby2(4,20,[0.1 0.7]);
Hd = dfilt.df2t([zeros(1,6) B],A);
% Discrete-time, direct-form II
transposed filter numerator
coefficients B and denominator
coefficients A.
hFVT = fvtool(Hd); % Analyze the
filter using Open Filter
Visualization Tool
set(hFVT, 'Color', [1 1 1])
%he Room Impulse Response
H =
filter(Hd,log(0.99*rand(1,M)+0.01).
* ...
sign(randn(1,M)).*exp(-
0.002*(1:M)));
H = H/norm(H)*4; % Room Impulse
Response
plot(0:1/fs:0.5,H)
xlabel('Time [sec]')
ylabel('Amplitude')
title('Room Impulse Response')
set(gcf, 'Color', [1 1 1])
%The Near-End Speech Signal
load nearspeech
n = 1:length(v);
t = n/fs;
plot(t,v);
axis([0 33.5 -1 1]);
xlabel('Time [sec]');
ylabel('Amplitude');
title('Near-End Speech Signal');
set(gcf, 'Color', [1 1 1])
x=wavrecord(16000,8000);
p8 = audioplayer(v,fs);
playblocking(p8);
%he Far-End Speech Signal
load farspeech
x = x(1:length(x));
dhat = filter(H,1,x);
plot(t,dhat);
axis([0 33.5 -1 1]);
xlabel('Time [sec]');
ylabel('Amplitude');
title('Far-End Echoed Speech
Signal');
set(gcf, 'Color', [1 1 1])
p8 = audioplayer(dhat,fs);
playblocking(p8);
%The Microphone Signal
d = dhat +
v+0.001*randn(length(v),1);
plot(t,d)
axis([0 33.5 -1 1]);
xlabel('Time [sec]');
ylabel('Amplitude');
title('Microphone Signal');
set(gcf, 'Color', [1 1 1])
p8 = audioplayer(d,fs);
playblocking(p8);
%the Frequency-Domain Adaptive
Filter (FDAF)
mu = 0.025;
W0 = zeros(1,2048);
del = 0.01;
lam = 0.98;
x =
x(1:length(W0)*floor(length(x)/leng
th(W0)));
d =
d(1:length(W0)*floor(length(d)/leng
th(W0)));
% Construct the Frequency-Domain
Adaptive Filter
hFDAF =
adaptfilt.fdaf(2048,mu,1,del,lam);
[y,e] = filter(hFDAF,x,d);
n = 1:length(e);
t = n/fs;
pos = get(gcf,'Position');
set(gcf,'Position',[pos(1), pos(2)-
100,pos(3),(pos(4)+85)])
subplot(3,1,1);
plot(t,v(n),'g')
axis([0 33.5 -1 1]);
ylabel('Amplitude');
title('Near-End Speech Signal');
subplot(3,1,2);
plot(t,d(n),'b');
axis([0 33.5 -1 1]);
ylabel('Amplitude');
title('Microphone Signal');
subplot(3,1,3);
plot(t,e(n),'r')
axis([0 33.5 -1 1]);
xlabel('Time [sec]');
ylabel('Amplitude');
title('Output of Acoustic Echo
Canceller');
set(gcf, 'Color', [1 1 1])
p8 = audioplayer(e/max(abs(e)),fs);
playblocking(p8);
11

More Related Content

What's hot

Acoustic echo cancellation
Acoustic echo cancellationAcoustic echo cancellation
Acoustic echo cancellation
chintanajoshi
ย 
Single side band and double side band modulation
Single side band and double side band modulationSingle side band and double side band modulation
Single side band and double side band modulation
Md. Hasan Al Roktim
ย 
Mobile phone jammer
Mobile phone jammerMobile phone jammer
Mobile phone jammer
Deepak Bhojwani
ย 
Cognitive Radio
Cognitive RadioCognitive Radio
Cognitive Radio
Rajan Kumar
ย 

What's hot (20)

Optical heterodyne detection
Optical heterodyne detectionOptical heterodyne detection
Optical heterodyne detection
ย 
Acoustic echo cancellation
Acoustic echo cancellationAcoustic echo cancellation
Acoustic echo cancellation
ย 
Jamming Devices and how they works?
Jamming Devices and how they works?Jamming Devices and how they works?
Jamming Devices and how they works?
ย 
Single side band and double side band modulation
Single side band and double side band modulationSingle side band and double side band modulation
Single side band and double side band modulation
ย 
Polarization
PolarizationPolarization
Polarization
ย 
Lecture no.1 emi new
Lecture no.1 emi newLecture no.1 emi new
Lecture no.1 emi new
ย 
Eye pattern
Eye patternEye pattern
Eye pattern
ย 
IEEE-488
IEEE-488IEEE-488
IEEE-488
ย 
Fading Seminar
Fading SeminarFading Seminar
Fading Seminar
ย 
Intelligent Reflecting Surfaces
Intelligent Reflecting SurfacesIntelligent Reflecting Surfaces
Intelligent Reflecting Surfaces
ย 
Handoff and its type
Handoff and its typeHandoff and its type
Handoff and its type
ย 
Information Theory MSU-EEE.ppt
Information Theory MSU-EEE.pptInformation Theory MSU-EEE.ppt
Information Theory MSU-EEE.ppt
ย 
Pre-emphasis and de-emphasis circuits
Pre-emphasis and de-emphasis circuitsPre-emphasis and de-emphasis circuits
Pre-emphasis and de-emphasis circuits
ย 
Mobile phone jammer
Mobile phone jammerMobile phone jammer
Mobile phone jammer
ย 
M ary psk and m ary qam ppt
M ary psk and m ary qam pptM ary psk and m ary qam ppt
M ary psk and m ary qam ppt
ย 
Antenna (2)
Antenna (2)Antenna (2)
Antenna (2)
ย 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalization
ย 
Cognitive Radio
Cognitive RadioCognitive Radio
Cognitive Radio
ย 
Introduction to communication system lecture1
Introduction to communication system lecture1Introduction to communication system lecture1
Introduction to communication system lecture1
ย 
3F3 โ€“ Digital Signal Processing (DSP) - Part1
3F3 โ€“ Digital Signal Processing (DSP) - Part13F3 โ€“ Digital Signal Processing (DSP) - Part1
3F3 โ€“ Digital Signal Processing (DSP) - Part1
ย 

Viewers also liked (10)

Introduction to Wireless Communication
Introduction to Wireless CommunicationIntroduction to Wireless Communication
Introduction to Wireless Communication
ย 
Wireless communication
Wireless communicationWireless communication
Wireless communication
ย 
Challenges and Opportunities for Wireless Networks
Challenges and Opportunities for Wireless NetworksChallenges and Opportunities for Wireless Networks
Challenges and Opportunities for Wireless Networks
ย 
Wireless communication
Wireless communicationWireless communication
Wireless communication
ย 
4g wireless communication
4g wireless communication4g wireless communication
4g wireless communication
ย 
Wireless technology
Wireless technologyWireless technology
Wireless technology
ย 
wireless communication
wireless communicationwireless communication
wireless communication
ย 
Wireless communication and cellular concept
Wireless communication and cellular conceptWireless communication and cellular concept
Wireless communication and cellular concept
ย 
Wireless communication
Wireless communicationWireless communication
Wireless communication
ย 
Wireless communication
Wireless communicationWireless communication
Wireless communication
ย 

Similar to Echo Cancellation Paper

Catalogue 2013 en
Catalogue 2013 enCatalogue 2013 en
Catalogue 2013 en
Guy Crt
ย 
Ref ch01 louis-frenzel
Ref ch01 louis-frenzelRef ch01 louis-frenzel
Ref ch01 louis-frenzel
Sarah Krystelle
ย 
Lecture 1 introduction and signals analysis
Lecture 1 introduction and signals analysisLecture 1 introduction and signals analysis
Lecture 1 introduction and signals analysis
talhawaqar
ย 

Similar to Echo Cancellation Paper (20)

Application of Digital Signal Processing In Echo Cancellation: A Survey
Application of Digital Signal Processing In Echo Cancellation: A SurveyApplication of Digital Signal Processing In Echo Cancellation: A Survey
Application of Digital Signal Processing In Echo Cancellation: A Survey
ย 
L1 Review.pptx
L1 Review.pptxL1 Review.pptx
L1 Review.pptx
ย 
Communication Engineering
Communication EngineeringCommunication Engineering
Communication Engineering
ย 
Spectrum Physics.pdf
Spectrum Physics.pdfSpectrum Physics.pdf
Spectrum Physics.pdf
ย 
Communication Theory - Noise Characterization.pdf
Communication Theory - Noise Characterization.pdfCommunication Theory - Noise Characterization.pdf
Communication Theory - Noise Characterization.pdf
ย 
Catalogue 2013 en
Catalogue 2013 enCatalogue 2013 en
Catalogue 2013 en
ย 
Comms 1.docx
Comms 1.docxComms 1.docx
Comms 1.docx
ย 
CBSE Class 12 Physics Sample ebook
CBSE Class 12 Physics Sample ebookCBSE Class 12 Physics Sample ebook
CBSE Class 12 Physics Sample ebook
ย 
CBSE Class 12 PCM Sample ebook
CBSE Class 12 PCM Sample ebookCBSE Class 12 PCM Sample ebook
CBSE Class 12 PCM Sample ebook
ย 
CBSE Class 12 PCB Sample ebook
CBSE Class 12 PCB Sample ebookCBSE Class 12 PCB Sample ebook
CBSE Class 12 PCB Sample ebook
ย 
Audio
AudioAudio
Audio
ย 
Noise
NoiseNoise
Noise
ย 
Ref ch01 louis-frenzel
Ref ch01 louis-frenzelRef ch01 louis-frenzel
Ref ch01 louis-frenzel
ย 
Lecture 1 introduction and signals analysis
Lecture 1 introduction and signals analysisLecture 1 introduction and signals analysis
Lecture 1 introduction and signals analysis
ย 
chap5.ppt
chap5.pptchap5.ppt
chap5.ppt
ย 
LECTURE 3.pptx
LECTURE 3.pptxLECTURE 3.pptx
LECTURE 3.pptx
ย 
Chap 02 antenna & wave propagation
Chap 02 antenna & wave propagation Chap 02 antenna & wave propagation
Chap 02 antenna & wave propagation
ย 
RW Modulation Transmission Basics
RW Modulation Transmission BasicsRW Modulation Transmission Basics
RW Modulation Transmission Basics
ย 
Solution_Book_4th.pdf.pdf
Solution_Book_4th.pdf.pdfSolution_Book_4th.pdf.pdf
Solution_Book_4th.pdf.pdf
ย 
Principles of electronic communication systems 4th edition frenzel solutions ...
Principles of electronic communication systems 4th edition frenzel solutions ...Principles of electronic communication systems 4th edition frenzel solutions ...
Principles of electronic communication systems 4th edition frenzel solutions ...
ย 

Recently uploaded

Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
amitlee9823
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
ย 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
ย 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
SUHANI PANDEY
ย 

Recently uploaded (20)

Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
ย 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
ย 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
ย 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
ย 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
ย 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
ย 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
ย 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
ย 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
ย 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
ย 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
ย 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
ย 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
ย 

Echo Cancellation Paper

  • 1. 1 Abstract Today, people are more interested in hands- free communication. In such a situation, the use a regular loudspeaker and a high-gain microphone, in place of a telephone receiver, might seem more appropriate. The presence of a large acoustic coupling between the loudspeaker and microphone would produce a loud echo that would make conversation difficult. Furthermore, the acoustic system could become instable, which would produce a loud howling noise to occur. The solution to these problems is the elimination of echo with an echo cancellation algorithm. The echo cancellers have main disadvantage since it supports only a half-duplex communication . An important aspect of echo cancellers is that full-duplex communication can be maintained, which allows both speakers to talk at the same time. Introduction Echo is the repetition of a waveform due to reflection from points where the characteristics of the medium through which the wave propagates changes. Echo is usefully employed in sonar and radar for detection and exploration purposes. In telecommunication, echo can degrade the quality of service, and echo cancellation is an important part of communication systems. The development of echo reduction began in the late 1950s. There are two types of echo in communication systems: acoustic echo and telephone line hybrid echo. Acoustic echo results from a feedback path set up between the speaker and the microphone in a mobile phone or hands-free phone. Telephone line echoes result from an impedance mismatch at telephone exchange hybrids where the subscriber's 2-wire line is connected to a 4-wire line. The perceptual effects of an echo depend on the time delay between the incident and reflected waves, the strength of the reflected waves, and the number of paths through which the waves are reflected. Telephone line echoes, and acoustic feedback echoes are undesirable and annoying and can be disruptive. What is echo ? Echo is a phenomenon where a delayed and distorted version of an original sound or electrical signal is reflected back to the source. If a reflected wave arrives after a very short time of direct sound, it is considered as a spectral distortion or reverberation. However, when the leading edge of the reflected wave arrives a few tens of milliseconds after the direct sound, it is
  • 2. 2 heard as a distinct echo. Fig 1 illustrate simple diagram explained echo . Fig 1 Here B is the reflected wave arrives after a very short time of direct sound How echo generated A significant problem in communications is the generation of echoes. The echoes arise for a number of reasons, with the primary reason being an impedance mismatch. The impedance mismatch occurs when the two- wire network meets the four-wire network, this interface is known as the hybrid. This impedance mismatch causes some of the signal energy to be returned to the source as an echo . The delays between primary and echo signals are directly related to the transmission distance. For example, if a signal was sent to a satellite that redirected the signal back to another location on earth, that signal would have a very large time delay compared to a signal sent to a local switching station and back. Short delays (less than 50 ms) will not affect the quality of the signal as much as longer delays. Delays of this length are not noticed by the receiver and therefore are not considered an annoyance. However, these echoes may have an effect on data being transmitted through transmission lines [1] Echo Types There are two types of echo in communication systems : One) Acoustic echo : Acoustic echo results from a feedback path set up between the speaker and the microphone in a mobile phone, hands-free phone, teleconference or hearing aid system. Acoustic echo is usually reflected from a multitude of different surfaces, such as walls, ceilings and floors, and travels through different paths . Fig 2 Acoustic echo . Gain of an acoustic feedback loop depends on the frequency responses of the electrical and the acoustic signal paths. The undesirable effects of the electrical sections
  • 3. 3 on the acoustic feedback can be reduced by designing systems that have a flat frequency response . [1] Two) Telephone line Hybrid echo [Hybrid] : Hybrid echo is the main source of echo generated from the public-switched telephone network (PSTN). Echoes on a telephone line are due to the reflection of signals at the points of impedance mismatch on the connecting circuits. Conventionally, telephones in a given geographical area are connected to an exchange by a 2-wire twisted line, called the subscriber's line , which serves to receive and transmit signals. In a conventional system a local call is set up by establishing a direct connection, at the telephone exchange, between two subscribersโ€™ loops. For a local call, there is usually no noticeable echo either because there is not a significant impedance mismatch on the connecting 2-wire local lines or because the distances are relatively small and the resulting low-delay echoes are perceived as a slight amplification and โ€œliveningโ€ effect. For long communication between two exchanges, it is necessary to use repeaters to amplify the speech signals; therefore a separate 2-wire telephone line is required for each direction of transmission. Fig 3: Illustration of a telephone call set up by connection of 2- wire subscriber's via hybrids to 4-wire lines at the exchange Figure 4: A 2-wire to 4-wire hybrid circuit. To establish a long-distance call, at each end, a 2-wire subscriber's line must be connected to a 4-wire line at the exchange fig 4 , as illustrated in Figure 5 . The device that connects the 2-wire subscriber's loop to the 4-wire line is called a hybrid as shown in figure 4 . the hybrid is basically a three-port bridge circuit. If the hybrid bridge were
  • 4. 4 perfectly balanced then there would be no reflection or echo. However, each hybrid circuit serves a number of subscribersโ€™ lines. The subscribers' lines do not all have the same length and impedance characteristics; therefore it is not possible to achieve perfect balance for all subscribers at the hybrids. When the bridge is not perfectly balanced, some of the signal energy on the receiving 4-wire lines becomes coupled back onto itself and produces an echo. Echo is often measured in terms of the echo return loss (ERL); the higher the echo return loss the lower will be the echo. Telephone line echoes are undesirable, and become annoying when the echo amplitude is relatively high and the echo delay is long. For example when a long distance call is made via a satellite the round-trip echo delay can be as long as 600 ms, and echoes can become disruptive. Also, as already mentioned, there are appreciable delays of up to 200 ms inherent in digital mobile phones, which make any echo quite noticeable. For this reason the employment of echo cancellers in mobile switching centers is mandatory. [2] How to reduce acoustic echo ? When the telephone connection is between hands-free telephones or between two conference rooms, then an acoustic echo problem emerges that is due to the reflection of the loudspeakerโ€™s sound waves from the boundary surfaces and other objects back to the microphone. There are a number of methods for removing acoustic feedback. One method for alleviating the effects of acoustic feedback and the room reverberations is to place a frequency shifter (or a phase shifter) in the electrical path of the feedback loop. Each time a signal travels round the feedback loop it is shifted by a few hertz before being re-transmitted by the loudspeaker. This method has some effect in reducing the howling but it is not effective for removal of the overall echo of the acoustic feedback. Another approach is to reduce the feedback loop-gain at those frequencies where the acoustic feedback energy is concentrated. This may be achieved by using adaptive notch filters to reduce the system gain at frequencies where acoustic oscillations occur. The drawback of this method is that in addition to reducing the feedback the notch filters also result in distortion of the desired signal frequencies. The most effective method of acoustic feedback removal is the use of an adaptive feedback cancellation system as in fig 5 [3]
  • 5. 5 fig 5 the use of an adaptive feedback cancellation system x(n): far-end signal,, y(n): echo signal ,v(n) near-end signal, d(n): microphone signal, u(n): background noise, yhat(n): filter input, e(n): error signal, d[n]=y[n]+u[n], e[n] = d[n]- yhat(n) Hybrid echo cancellation We will define the speech of speaker A as the near end signal for hybrid A and the speech of speaker B as the far-end signal for hybrid A. For hybrid B, the near-end and far-end signals are the signals of speaker B and of speaker A, respectively. The speaker at the far-end hears not only what the speaker at the near-end says ,but also an echo of his own voice .fig 6 , The signal from the near end signal will be denoted by v(t). The signal from the far-end speaker is x(t). The echo of the far-end speaker is y(t). The echo can be modeled as the result of the signal x(t) passing through a linear filter h(t) y(t) = h(t) * x (t) Where * denotes convolution. The signal which is sent back to the far-end speaker is: z(t) = v(t) + y (t) Another possibility is to identify the impulse response h(t) of the hybrid or the acoustic coupling between the loudspeaker and the microphone, then estimate the echo signal y(t) and subtract it from z(t). Let the estimated echo and impulse response be ห†y(t) and ห†h(t), respectively . The signal sent back to the far end is: e(t) = z(t) - ห†y (t) = v(t) + y (t) - ห†y (t) The estimated echo ห†y(t) is: ห†y (t)= ห†h (t) * x(t) If ห† h(t) =h(t), then the cancellation is complete, i.e. e(t) โ‰ก v(t) [4]
  • 6. 6 Fig 6: hybrid echo cancellation The echo canceller coefficients wk(m) are adapted to minimize the energy of the echo signal on a telephone line, say from speaker B to speaker A. Assuming that the speech signals xA(m) and xB(m) are uncorrelated, the energy on the telephone line from B to A is minimized when the echo canceller output x^echo A (m ) echo xA m is equal to the echo xA echo (m ) echo xA m on the line. The echo canceller coefficients may be adapted using one of the variants of the recursive least square error (RLS) or the least mean squared error (LMS) adaptation methods. One of the most widely used algorithms for adaptation of the coefficients of an echo canceller is the normalized least mean square error (NLMS) method. The time-update equation describing the adaptation of the filter coefficient vector is w(m)= w(m-1)+ ยต [e(m) / ( x(m)T A x(m) A )] x(m) A where xA(m)=[xA(m), ..., xA(mโ€“P)] and w(m)=[w0(m), ..., wPโ€“1(m)] are the input signal vector and the coefficient vector of the echo canceller, and e(m) is the difference between the signal on the echo line and the output of the echo synthesizer. Note that the normalizing quantity x(m)T A x(m) A is the energy of the input speech to the adaptive filter. The scalar ยต is the adaptation step size, and controls the speed of convergence, the steady-state error and the stability of the adaptation process. acoustic echo cancellation is more complex than line echo cancellation The problem of acoustic echo cancellation is more complex than line echo cancellation for a number of reasons. First, acoustic echo is usually much longer (up to a second) than terrestrial telephone line echoes. In fact, the delay of an acoustic echo is similar to or more than a line echo routed via a geostationary satellite system. The large delay of an acoustic echo path implies that impractically large filters on the order of a few thousand coefficients may be required.
  • 7. 7 The stable and speedy adaptation of filters of such length presents a difficult problem. Secondly, the characteristics of an acoustic echo path is more non stationary compared with that of the telephone line echo. Thirdly, acoustic echoes are due to signals reflected back from a multitude of different paths, off the walls, the floor, the ceiling, the windows etc. Finally, the propagation and diffusion characteristics of the acoustic space of a room is a non-linear process, and is not well approximated by a lumped FIR (or IIR) linear filter. In comparison, it is more reasonable to model the characteristics of a telephone line echo with a linear filter. In any case, for acoustic echo cancellation, the filter must have a large impulse response and should be able to quickly track fast changes in echo path characteristics. [3] Matlab Implementation of Echo Cancellation in Telephone Line The RLS methods provides a faster convergence rate and better overall performance at the cost of higher computational complexity The information bearing signal is a sine wave of 0.055 cycles/sample. It is considered in this case to be assumed voice signal , When the voice is passing through the telephone line fig-7 the echo is added with the signal fig-8 so that at the far end we would not able to receive the signal of actual voice but we get the signal shown in fig 9. Now our aim is to cancel the echo path. Here the Running the RLS adaptive filter for 1000 iterations. The plot shows the convergence of the adaptive filter response to the response of the FIR filter in fig 10. By computing we get the error e signal shown in fig 11 fig 7 : Assumed voice signal
  • 8. 8 fig 8 : Echo path fig 9 : Voice signal + Echo signal Fig:10 filter response Fig: 11 error signal matlab implementation of Acoustic Echo Cancellation (AEC) In acoustic echo cancellation, a measured microphone signal d(n) contains two signals: - the near-end speech signal v(n) - the far-end echoed speech signal dhat(n) The goal is to remove the far-end echoed speech signal from the microphone signal so that only the near-end speech signal is transmitted The Room Impulse Response we describe the acoustics of the loudspeaker-to-microphone signal path where the speakerphone is located. We can use a long finite impulse response filter to describe these characteristics P.S. far end and near end signals are uploaded from matlab
  • 9. 9 Summary Telephone line echo and acoustic feedback echo affect the functioning of telecommunication and teleconferencing systems. In general, line echo cancellation, is a relatively less complex problem than acoustic echo cancellation because acoustic cancellers need to model the more complex environment of the space of a room. We discussed telephone line echoes arising from the mismatch at the 2/4-wire hybrid bridge. And implement RLS filter using matlab simulink to remove it .we considered the acoustic coupling between a loudspeaker and a microphone system. Acoustic feedback echo can result in howling, and can disrupt the performance of teleconference, hands-free telephones, and hearing aid systems. The main problems in implementation of acoustic echo cancellation systems are the requirement for a large filter to model the relatively long echo. References [1] echo cancellation using adaptive filtering By Thani Tridhavee And Steve Vuco [2] Soria, E.; Calpe, J.; Chambers, J.; Martinez, M.; Camps, G.; Guerrero, J.D.M.; โ€œA novel approach to introducing adaptive filters based on the LMS algorithm and its variantsโ€, IEEE Transactions, vol. 47, pp. 127-133, Feb 2008. [3] Implementation of Acoustic Echo Cancellation For PC Applications Using MATLAB,Master of Science Thesis In System on Chip Design, by Lu Lu Stockholm, 05/2007 [4] International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 10, October 2012) 411 Matlab Implementation of Echo Cancellation in Telephone Line
  • 10. 10 Appendix M = 4001;fs = 8000; [B,A] = cheby2(4,20,[0.1 0.7]); Hd = dfilt.df2t([zeros(1,6) B],A); % Discrete-time, direct-form II transposed filter numerator coefficients B and denominator coefficients A. hFVT = fvtool(Hd); % Analyze the filter using Open Filter Visualization Tool set(hFVT, 'Color', [1 1 1]) %he Room Impulse Response H = filter(Hd,log(0.99*rand(1,M)+0.01). * ... sign(randn(1,M)).*exp(- 0.002*(1:M))); H = H/norm(H)*4; % Room Impulse Response plot(0:1/fs:0.5,H) xlabel('Time [sec]') ylabel('Amplitude') title('Room Impulse Response') set(gcf, 'Color', [1 1 1]) %The Near-End Speech Signal load nearspeech n = 1:length(v); t = n/fs; plot(t,v); axis([0 33.5 -1 1]); xlabel('Time [sec]'); ylabel('Amplitude'); title('Near-End Speech Signal'); set(gcf, 'Color', [1 1 1]) x=wavrecord(16000,8000); p8 = audioplayer(v,fs); playblocking(p8); %he Far-End Speech Signal load farspeech x = x(1:length(x)); dhat = filter(H,1,x); plot(t,dhat); axis([0 33.5 -1 1]); xlabel('Time [sec]'); ylabel('Amplitude'); title('Far-End Echoed Speech Signal'); set(gcf, 'Color', [1 1 1]) p8 = audioplayer(dhat,fs); playblocking(p8); %The Microphone Signal d = dhat + v+0.001*randn(length(v),1); plot(t,d) axis([0 33.5 -1 1]); xlabel('Time [sec]'); ylabel('Amplitude'); title('Microphone Signal'); set(gcf, 'Color', [1 1 1]) p8 = audioplayer(d,fs); playblocking(p8); %the Frequency-Domain Adaptive Filter (FDAF) mu = 0.025; W0 = zeros(1,2048); del = 0.01; lam = 0.98; x = x(1:length(W0)*floor(length(x)/leng th(W0))); d = d(1:length(W0)*floor(length(d)/leng th(W0))); % Construct the Frequency-Domain Adaptive Filter hFDAF = adaptfilt.fdaf(2048,mu,1,del,lam); [y,e] = filter(hFDAF,x,d); n = 1:length(e); t = n/fs; pos = get(gcf,'Position'); set(gcf,'Position',[pos(1), pos(2)- 100,pos(3),(pos(4)+85)]) subplot(3,1,1); plot(t,v(n),'g') axis([0 33.5 -1 1]); ylabel('Amplitude'); title('Near-End Speech Signal'); subplot(3,1,2); plot(t,d(n),'b'); axis([0 33.5 -1 1]); ylabel('Amplitude'); title('Microphone Signal'); subplot(3,1,3); plot(t,e(n),'r') axis([0 33.5 -1 1]); xlabel('Time [sec]'); ylabel('Amplitude'); title('Output of Acoustic Echo Canceller'); set(gcf, 'Color', [1 1 1]) p8 = audioplayer(e/max(abs(e)),fs); playblocking(p8);
  • 11. 11