Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing...

22
1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven [email protected] homes.esat.kuleuven.be/~moonen/ Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 2 Outline • Introduction Acoustic echo cancellation (AEC) problem & applications Acoustic channels Adaptive filtering algorithms for AEC – NLMS Frequency domain adaptive filters Affine projection algorithm (APA) Control algorithm • Post-processing Loudspeaker non-linearity Stereo AEC

Transcript of Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing...

Page 1: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

1

Digital Audio Signal Processing

Lecture 5

Acoustic Echo Cancellation

Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

[email protected] homes.esat.kuleuven.be/~moonen/

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 2

Outline

•  Introduction –  Acoustic echo cancellation (AEC) problem & applications –  Acoustic channels

•  Adaptive filtering algorithms for AEC –  NLMS –  Frequency domain adaptive filters –  Affine projection algorithm (APA)

•  Control algorithm •  Post-processing •  Loudspeaker non-linearity •  Stereo AEC

Page 2: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

2

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 3

AEC problem/applications Suppress echo..

–  to guarantee normal conversation conditions –  to prevent the closed-loop system from becoming unstable

Applications –  Teleconferencing –  Hands-free telephony –  Handsets –  …

Introduction

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 4

Introduction

AEC standardization ITU-T (*) recommendations (G.167) on acoustic echo controllers state that

–  Input/output delay of the AEC should be smaller than 16 ms –  Far-end signal suppression should reach 40..45 dB (depending on

application), if no near-end signal is present –  In presence of near-end signals the suppression should be at least

25 dB –  Many other requirements …

(*) International Telecommunication Union - Telecommunication Standardization Sector

Page 3: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

3

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 5

Room Acoustics (I) •  Propagation of sound waves in an acoustic environment

results in –  signal attenuation –  spectral distortion

•  Propagation can be modeled quite well as a linear filtering operation •  Non-linear distortion mainly stems from the loudspeakers.

This is often a second order effect and mostly not taken into account explicitly

Introduction

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 6

Introduction

Observe that : –  First there is a dead time

–  Then come the direct path impulse and some early reflections, which depend on the geometry of the room –  Finally there is an exponentially decaying tail called reverberation, coming from multiple reflections on walls, objects,... Reverberation mainly depends on ‘reflectivity’ (rather than geometry) of the room…

Room Acoustics (II) The linear filter model of the acoustic path between loudspeaker and microphone is represented by the acoustic impulse response

Page 4: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

4

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 7

Introduction

Room Acoustics (III) To characterize the ‘reflectivity’ of a room the reverberation time ‘RT60’ is defined

–  RT60 = time which the sound pressure level or intensity needs to decay to -60dB of its original value –  For a typical office room RT60 is between 100 and 400 ms, for a church RT60 can be several seconds

Acoustic room impulse responses are highly time-varying !!!!

ESAT speech laboratory : RT60 ≈ 120 ms

Begijnhofkerk Leuven : RT60 ≈ 3730 ms

Original speech signal :

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 8

Introduction

Acoustic Impulse Response : FIR or IIR ? •  If the acoustic impulse response is modeled as

–  an FIR filter → many hundreds to several thousands of filter taps are needed

–  an IIR filter → filter order can be reduced, but still hundreds of filter coeffs (num. + denom.) may be needed (sigh!)

•  Hence FIR models are used in practice because… –  these are guaranteed to be stable –  in a speech comms set-up the acoustics are highly time-varying,

hence adaptive filtering techniques are called for (see DSP-CIS): •  FIR adaptive filters : simple adaptation rules, no local minima,.. •  IIR adaptive filters : more complex adaptation, local minima

Page 5: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

5

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 9

Introduction

•  Directional loudspeakers and microphones •  Voice controlled switching, loss control •  Howling control : stability margin improvement of the closed loop by

–  frequency shifting –  using comb filters –  removing resonant peaks

•  Non-linear post-processing, e.g. center clipping

`Conventional’ AEC Techniques

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 10

Outline

•  Introduction –  Acoustic echo cancellation (AEC) problem & appls –  Acoustic channels

•  Adaptive filtering algorithms for AEC –  NLMS –  Frequency domain adaptive filters –  Affine projection algorithm (APA)

•  Control algorithm •  Post-processing •  Loudspeaker non-linearity •  Stereo AEC

Page 6: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

6

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 11

Adaptive filtering algorithms for AEC

Basic set-up:

•  Adaptive filter produces a model for acoustic room impulse response + an estimate of the echo contribution in microphone signal, which is then subtracted from the microphone signal •  Thanks to adaptivity

–  time-varying acoustics can be tracked –  performance superior to performance of `conventional’ techniques

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 12

Adaptive filtering algorithms for AEC

•  Algorithms to be discussed

–  Normalized LMS (NLMS) –  Frequency-domain adaptive filter (FDAF) & partitioned block freq-domain adaptive filter (PB-FDAF) –  Affine projection algorithm (APA) & fast affine projection algorithm

Page 7: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

7

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 13

•  NLMS update equations

in which

N is the adaptive filter length, µ is the adaptation stepsize,

δ is a regularization parameter and k is the discrete-time index

][

][][][][

1 ke

kykdkeky

kk

Tk

kk

kTk

xxx

ww

wx

δµ+

+=

−=

=

+

xk =x[k]

x[k − (N −1)]

"

#

$$$

%

&

''', wk =

w[0]

w[N −1]

"

#

$$$

%

&

'''

Adaptive filtering algorithms: NLMS

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 14

•  Pros and cons of NLMS

+ cheap algorithm : O(N) + small input/output delay (= 1 sample) –  for colored far-end signals (such as speech) convergence of the

NLMS algorithm is slow (cfr lambda_max versus lambda_min, etc…., see DSP-CIS) –  large N then means even slower convergence

¤ NLMS is thus often used for the cancellation of short echo paths

Adaptive filtering algorithms: NLMS

Page 8: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

8

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 15

Adaptive Filtering Algorithms for AEC

•  As some input/output delay is acceptable in AEC (cfr ITU..), algorithms can be derived that are even cheaper than NLMS, by exchanging implementation cost for extra processing delay, sometimes even with improved performance :

•  Frequency-domain adaptive filtering (FDAF) •  Partitioned Block FDAF (PB-FDAF)

+ cost reduction + optimal (stepsize) tuning for each subband/frequency bin separately results in improved performance

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 16

Adaptive Filtering Algorithms: Block-LMS

•  To derive the frequency-domain adaptive filter the BLMS algorithm is considered first

nnnn

nTnnn

eXwwwXdeµ+=

−=

+1

Xn =

x[nL +1] x[(n+1)L]

x[nL +1− (N −1)] x[(n+1)L − (N −1)]

"

#

$$$

%

&

''', dn =

d[nL +1]

d[(n+1)L]

"

#

$$$

%

&

''', wn =

w[0]

w[N −1]

"

#

$$$

%

&

'''

in which

N is # filter taps, L is block length, n is block time index BLMS = gradient averaging over block of samples

Page 9: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

9

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 17

nnnn

nTnnn

eXwwwXdeµ+=

−=

+1

Adaptive Filtering Algorithms: Block-LMS

•  Both the BLMS convolution and correlation operation are computationally demanding. They can be implemented more efficiently in the frequency domain using fast convolution techniques, i.e. overlap-save/overlap-add :

with

Mjnnn

mnenm

Lnx

MLnxdiag

π2)()( ),(,,

])1[(

]1)1[(−

=⎥⎦

⎤⎢⎣

⎡=

⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎥⎥⎥

⎢⎢⎢

+

+−+

= F0w

FwFX !M-point DFT-matrix

convolution

correlation ⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎥⎦

⎤⎢⎣

−−

n

n

NM

N

nn

L

LM

e0

FXF000I

wXFI000

*)(1

)()(1

overlap-save

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 18

Adaptive Filtering Algorithms: FDAF

Overlap-save FDAF

)(*)(1)()1(

)()()(

)(

)()(1)(

)(

])1[(

]1[,

])1[(

]1)1[(

nn

NM

Nnn

nnn

nn

LMn

nn

L

LMn

n

Lnd

nLd

Lnx

MLnxdiag

FeXF000I

Fww

yde

dd0

d

wXFI000

y

FX

+

−−

⎥⎦

⎤⎢⎣

⎡+=

−=

⎥⎥⎥

⎢⎢⎢

+

+

=⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡=

⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎥⎥⎥

⎢⎢⎢

+

+−+

=

µ

!

!

Will only work if

1−+≥ LNM

(M is DFT-size)

Page 10: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

10

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 19

Adaptive Filtering Algorithms: FDAF

¤ Typical parameter setting for the FDAF :

¤ FDAF is functionally equivalent to BLMS (!) + FDAF is significantly cheaper than (B)LMS (cfr FFT/IFFT i.o. DFT/IDFT)

for a typical parameter setting If N=1024 :

- Input/output delay is equal to 2L-1=2N-1, which may be unacceptably large for realistic parameter settings : e.g. if N=1024 and fs=8000Hz → delay is 256 ms !

costLMScost FDAF

≈ 20

∈=== pMLMLN p ,2,2,

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 20

Adaptive Filtering Algorithms: PB-FDAF

•  Overlap-save PB-FDAF : N-tap filter split into (N/P) filter sections, P-taps each, then apply overlap-save to each section

(`P takes the place of N’).

1:0,

])1[(

]1[,

1:0,])1[(

]1)1[(

)(*)(1)()1(

)()()(

)(

1

0

)()(1)(

)(

−=⎥⎦

⎤⎢⎣

⎡+=

−=

⎥⎥⎥

⎢⎢⎢

+

+

=⎥⎦

⎤⎢⎣

⎡=

⎥⎦

⎤⎢⎣

⎡=

−=⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎥⎥⎥

⎢⎢⎢

−+

+−−+

=

+

=

−− ∑

PNp

Lnd

nLd

PNp

pPLnx

MpPLnxdiag

nnp

PM

Pnp

np

nnn

nn

n

p

np

np

L

LMn

np

PN

FeXF000I

Fww

yde

dd0

d

wXFI000

y

FX

µ

!

!

Will only work if 1−+≥ LPM

Page 11: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

11

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 21

Adaptive Filtering Algorithms: PB-FDAF

¤ Typical parameter setting : ¤ PB-FDAF is intermediate between LMS and FDAF (P/N=1) + PB-FDAF is functionally equivalent to BLMS + PB-FDAF is cheaper than LMS :

If N=1024, P=L=128, M=256 :

+ Input/output delay is 2L-1 which can be chosen small, in

the example above the delay is 32 ms, if fs=8000Hz ¤ used in commercial AECs

∈=== qMLMLP q ,2,2,

6PBFDAFcostLMScost

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 22

Adaptive Filtering Algorithms: PB-FDAF

•  PS: Instead of a simple stepsize µ, ‘subband’ dependent stepsizes can be applied –  stepsizes dependent on the subband energy (`subband

normalization’) –  convergence speed increased at only a small extra cost

•  PS: PB-FDAF algorithm can be simplified by removing

from the weight updating equation (=`unconstrained updating’)

1−

−⎥⎦

⎤⎢⎣

⎡F

000I

FPM

P

Page 12: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

12

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 23

Adaptive Filtering Algorithms: APA

Affine Projection Algorithm =intermediate between RLS and NLMS, complexity- as well as performance-wise

NLMS (delta=0) :

[ ] [ ][ ]ke

kdke

kTkkkk

kTk

11 )( −+ +=

−=

xxxwwxw

µ

[ ] [ ]0

' 1

=

−= + kTkkdke xw

[ ]

kkTkkkk

kTkkk

Pkkkk

eXXXwwwXde

xxxX

11

11

)( −+

+−−

+=

−=

=

µ

!

0wXde =−= +1' kTkkk

a-posteriori error is 0 P last a-posteriori errors are 0

APA :

if µ=1

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 24

Adaptive Filtering Algorithms: APA

Problem with APA : near-end noise amplification

kkk ndd +=noisy

orthogonal Tkkkk VΣUX =

contains sorted singular values on diagonal

Solution : replace by in update formula (=`regularization’, similar to delta in NLMS-formula)

1)( −k

TkXX 1)( −+ IXX δk

Tk

kk VU ,

, multiplied by , appears as `noise in the filter weights ’ iσ1

[ ] kTk

Pkk nVUw )1,,1,1diag(

211 σσσ

…… +=+

nk

kd

kn

is echo-signal is near-end noise

Page 13: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

13

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 25

Adaptive Filtering Algorithms: APA

Effect on near-end noise amplification

[ ] kTk

P

Pkk nVUw ),,,diag( 22

2

221

11 δσ

σδσ

σδσ

σ+++

+=+ ……

Effect on adaptation speed

[ ]…

+

⎥⎦

⎤⎢⎣

+++−=+ k

Tk

P

Pkk wUUIw ),,,diag( 22

2

221

11 δσ

σδσ

σδσ

σ

Smaller if more regularization

Slower if more regularization

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 26

[ ]⎥⎦

⎤⎢⎣

−=⎥

⎤⎢⎣

⎡⇒−=

−1)1(* k

kk

Tkkk

kee

ewXde

µ

1. `Recursive ’ error vector calculation (delta=0) :

Ex: mu=1, then lower components were already nulled @ time k-1

2. Delayed filter vector update : accumulate filter adaptations based on vector x_k, apply only when x_k `leaves ’ the X_k matrix (at time k+P-1)

kkTkk eXXε 1)( −=

APA complexity, i.e.O(P.N), may be reduced to (roughly) LMS complexity, i.e. O(N) :

3. Recursive updating scheme for inverse in

Adaptive Filtering Algorithms: Fast-APA

Skip

ste

ps 2

& 3

Page 14: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

14

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 27

Outline

•  Introduction –  Acoustic echo cancellation (AEC) problem & appls –  Acoustic channels

•  Adaptive filtering algorithms for AEC –  NLMS –  Frequency domain adaptive filters –  Affine projection algorithm (APA)

•  Control algorithm •  Post-processing •  Loudspeaker non-linearity •  Stereo AEC

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 28

Control Algorithm

•  Adaptation speed (µ ) should be adjusted… –  to the far-end signal power, in order to avoid instability

of the adaptive filter → stepsize normalization (e.g. NLMS)

–  to the amount of near-end activity, in order to prevent the filter to move away from the optimal solution (see DSP-CIS) → double-talk detection

Double talk refers to the situation where both the far-end and the near-end speaker are active.

Page 15: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

15

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 29

Control Algorithm

3 modes of operation: 1.  Near-end activity (single or double talk) (Ed large)

→ 2.  No near-end activity, only far-end activity (Ex large, Ed small)

→ 3.  No near-end activity, no far-end activity (Ex small, Ed small)

max, µµ =−= yde → FILT+ADAPT

0orsmall, =−= µyde → FILT

0, == µde → NOP

• Ex is short-time energy of the far-end signal • Ed is short-time energy of the desired signal

Ex = x[k − i]2i=0

L

Ed = d[k − i]2i=0

L

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 30

Control Algorithm

Double-talk Detection (DTD) •  Difficult problem: detection of speech during speech •  Desired properties

–  Limited number of false alarms –  Small delay –  Low complexity

•  Different approaches exist in the literature which are based on –  Energy –  Correlation –  Spectral contents –  …

Page 16: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

16

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 31

Control Algorithm Energy-based DTD Compare short-time energy of far-end and near-end

channel Ex and Ed : –  Method 1 :

If Ed > τ Ex → double talk τ is a well-chosen threshold

–  Method 2 :

22 EyExEeEx+

If ρ > 1 → double talk

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 32

Post-processing

•  Error suppression obtained in practice will be limited to +/- 30 dB, due to

–  non-linearities in the signal path (loudspeakers) –  time-variations of the acoustic impulse responses –  finite length of the adaptive filter –  failing double-talk detection –  …

•  A post-processing unit is added to further reduce the residual signal, e.g. `center clipping’

⎪⎩

⎪⎨

≤ΔΔ−

Δ≤≤Δ−

Δ−<Δ+

=

inin

in

inin

out 0eee

eee

ein

eout

Page 17: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

17

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 33

Loudspeaker Non-linearity

If loudspeaker non-linearity is significant (e.g. consumer applications), then this should be compensated for

•  Solution-1: Non-linear model (fixed) in cancellation path

d e

y

Non-linear model

x

Adaptive filter

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 34

Loudspeaker Non-linearity

•  Solution-2: Inverse non-linear model in forward path

Advantage = if successful, also improves loudspeaker characteristic/sound quality..

d

e y

Inverse non-linear model

x

Adaptive filter

Page 18: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

18

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 35

Outline

•  Introduction –  Acoustic echo cancellation (AEC) problem & appls –  Acoustic channels

•  Adaptive filtering algorithms for AEC –  NLMS –  Frequency domain adaptive filters –  Affine projection algorithm (APA)

•  Control algorithm •  Post-processing •  Loudspeaker non-linearity •  Stereo AEC

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 36

S-AEC Problem Statement

Multi-microphone/multi-loudspeaker systems : complexity for ‘pre- whitening’ (APA, RLS) of x can be shared amongst microphone channels. Apart from this, different microphone signals are processed independently

Hence from now on consider S-AEC on one microphone only. Other microphone(s) similarly (but independently) processed

Page 19: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

19

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 37

S-AEC Problem Statement

Mono : autocorrelation of x-signal (e.g. speech) has an impact on convergence (see DSP-CIS) Stereo : also cross-correlation between signals x1 and x2 plays a role now…

! [ ]

[ ]T

TTk

Tk

Nk

NkxkxNkxkxkx ]1[...][|]1[...]1[][ 22111

2,1,12

+−+−−=

xxx

Conditioning Problem: S-AEC input vectors are

Large(r) eigenvalue spread (large(r) condition number) of correlation matrix -> large(r) impact on convergence !

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 38

S-AEC Problem Statement

Hence filter input data matrix X will be singular (with `null-space’)

-> LS solution non-unique, and solutions depend on (changes in) transmission room (G1,G2) !

[ ] 0.1

22,1, =⎥

⎤⎢⎣

−GG

xx Tk

Tk

QN =

Non-uniqueness Problem: Consider transmission room impulse responses G1,G2 (length Q)

Assume then :

explain!

Page 20: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

20

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 39

S-AEC Problem Statement

In practice : QN <

[ ] 0.1

22,1, ≅=⎥

⎤⎢⎣

−δtruncated

truncatedTk

Tk G

Gxx

So that X will be (only) ill-conditioned (instead of rank-deficient) which however is still bad news…

Hence

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 40

S-AEC Fixes

-Reduce correlation between the loudspeaker signals by… •  Complementary comb filters •  White noise insertion (naive solution - large distortion) •  Colored (masked) noise insertion •  Non-linear processing

Disadvantages : •  Signal distortion •  Stereo perception may be affected

-In addition : use algorithms that are less sensitive to the condition number than NLMS, e.g. RLS, APA, ...

Page 21: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

21

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 41

S-AEC Fixes: Complementary comb filters

Comb-1 for x1, comb-2 for x2 Two channels are decorrelated, BUT stereo image is distorted if applied below 1 kHz (=psycho-acoustics) Can be combined with another technique below 1 kHz

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 42

S-AEC Fixes: Noise insertion

Remove all signal content below the masking threshold Fill with noise (both channels independently)

Correlation between input channels decreases •  Poor performance for speech •  Good performance for music •  Computationally intensive

Page 22: Digital Audio Signal Processing - pdfs.semanticscholar.org · 1 Digital Audio Signal Processing Lecture 5 Acoustic Echo Cancellation Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven

22

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 43

S-AEC Fixes: Non-linear processing

2..1))(()()(' =+= ikxfkxkx iiii α

is often a half wave rectifier )(•if

2)(

2)(

2

1

•−•=•

•+•=•

f

f

5.0=α is necessary for good performance, but audible

Good results for speech, audible artifacts in music

Digital Audio Signal Processing Version 2014-2015 Lecture-5: Acoustic Echo Cancellation p. 44

S-AEC Fixes: Non-linear processing

Loudspeakers play original signal

Loudspeakers play processed signal

Mismatch

Time