Brain Dump

Acoustic Echo Canceler

Tags
speech-processing

Reduces the amplitude of Acoustic Echo responses.

We essentially form an Adaptive Filter with a bunch of weighted [see page 5, coefficients] that cancels out the acoustic echo response before transmission. The problem of acoustic echo cancellation is finding the weights at time \( n \) which cancels the current acoustic echo response.

Note: In this situation we have to use an adaptive filter because the acoustic echo response varies over time and so a filter with constant coefficients can't accurately remove acoustic echos.

We define:

\begin{align*} e_{AEC}[n] &=& &\text{echo}& &-& &\text{estimated echo}& \\

         &=& &\phi& &-& &\hat{\phi}& \\\\
         &=& &W\_{AEC}[n] \* x[n]& &-& &h[n] \* x[n]&

\end{align*}

Where:

MathNameMeaning
\( e_{AEC}[n] \)AEC Error SignalA measure of the error of our Acoustic Echo Canceller.
\( x[n] \)Input signalThe input signal at time \( n \)
\( h[n] \)Room Impulse ResponseAn filter that reproduces the affect acoustic-echo [1].
\( W_{AEC}[n] \)AEC weightsThe weights of our acoustic echo canceller at time \( n \)
\( \phi \), \( \hat{\phi} \)Output signalResult of passing \( x[n] \) through \( h[n] \) and \( W_{AEC}[n] \)

[1]: Bouncing a signal through a room.

Note: By this definition the weights we're trying to find are equivalent to the room impulse response... I.E. we're trying to find the room impulse response.

You can [see page 8, think] of this problem as an \(n+1\) dimension Gradient Descent problem, with \(n\) being the order/complexity/number-of-weights of the filter we're trying to find and 1 more dimension containing the error at those weight which we're trying to minimise.

See [see page 4, applications] for adaptive filtering.

Finding the Weights

The goal of an AEC is to create a filter that minimises a cost function defined in terms of \( e_{AEC}[n] \). The cost function specifically [see page 8, used] here is [see page 9, mean squared error]: \[ f(e[n]) = E\{|e[n]|^2\} = E{[\phi[n] - \hat{\phi}[n]]^2} \] This equation can be further expanded into: \[ \phi^2[n] - W^T_{AEC}[n] x[n] \phi[n] - \phi[n] x^T[n] W_{AEC}[n] + W^T_{AEC}[n]x[n] x^T[n] W_{AEC}[n] \]

We now differentiate this equation, seting it to 0, to find a [see page 11, final equation] that we set to 0 and re-arrange to get:

\begin{align*} E\{x[n] \phi[n]\} &= E\{x[n] x^T[n]\} w_{AEC,opt}[n] \
r_{x\phi}[n] &= R_{xx}[n] \
\end{align*}

The optimum weights \( W_{AEC,opt} \) are thus defined as: \[ W_{AEC, opt} = R^{-1}_{xx} r_{x\phi} \].

This final equation for \( {W}_{AEC, opt} \) is known as the weiner-filter.

Problems

There are are a lot of computational [see page 11, issues] with this implementation due to the size of the equations and dimensionality involved. Specifically inverting \( R_{xx} \) can be computationally intensive. Furthermore the input signal \( x[n] \) and the echo signal \( \phi[n] \) are non-stationary and time-varying meaning the calculation has to be repeated every time they change. Lastly both \( R_{xx} \) and \( r_{x\phi} \) must be estimated.