2 adaptive filter, 1 pre-emphasis, Cs6422 – Cirrus Logic CS6422 User Manual

Page 33

Advertising
background image

CS6422

33

room, when someone moves the speaker or the mi-
crophone, or when someone drops a piece of paper
on top of the speaker. So, the filter needs to adapt
to modify its transfer function to match that of the
environment. It does so by measuring the error sig-
nal at point E and trying to minimize it. This signal
is fed back to the adaptive filter to measure perfor-
mance and how best to adapt, or train.

The trouble arises when the person at the near-end
(C) speaks: the error signal will be non-zero, but
the adaptive filter should not change. If it tries to
train to the near-end signal, the adaptive filter has
no way to reduce the error signal, because there is
no input to the filter, and therefore no output from
it. The adaptive filter would mistrain.

To prevent this mistraining, the echo canceller uses
double-talk detection algorithms to determine
when to update. These update control algorithms
are the heart of most echo canceller implementa-
tions.

The worst case situation for the CS6422 is when
parties at both ends are speaking and the person at
the near-end is moving. In this case, the echo can-
celler will cease to adapt because of the double-
talk, but the echo will not be optimally reduced be-
cause of the change in path.

4.1.1.2

Adaptive Filter

The adaptive filter in the CS6422 uses an algorithm
called the “Normalized Least-Mean-Square
(NLMS)” update algorithm to learn the echo path
transfer function. This Finite Impulse Response
(FIR) filter has 508 taps, which can model up to
63.5 ms of total path response at a sampling rate of
8kHz. The coverage time is calculated by the fol-
lowing formula:

x 508 = 63.5 ms.

The CS6422’s adaptive filter, like all FIR filters,
only models Linear and Time Invariant (LTI) sys-

tems. So, any non-linearity in the echo path can not
be modeled by the adaptive filter and the resulting
signals will not be cancelled. Signal clipping and
poor-quality speakers are very common sources of
non-linearity and distortion.

A common integration problem for echo cancellers
is signal clipping in the echo path. For example, if
a speaker driver is driven to its rails, the distortion
of the speech may be hard to perceive, but it is very
bad for the echo canceller. The technique of over-
driving the speaker has been used in half-duplex
phones to provide good low-level signal gain at the
expense of distortion with high amplitude signals.
Since this does not work for the CS6422, an AGC
mechanism has been introduced to provide equiva-
lent behavior without clipping. See Section 4.1.3,
“AGC”
for more details.

Another common problem is speaker quality. A
poor quality speaker which is perfectly acceptable
for a half-duplex speakerphone, may limit the echo
canceller’s performance in a full-duplex speaker-
phone. The distortion elements are not modeled by
the adaptive filter and so limit its effectiveness.
Speakers should have better than 2% THD perfor-
mance to not impede the adaptive filter.

Volume control should be implemented using the
CS6422 Microcontroller Interface. A real-time ex-
ternal change in the gain of the speaker driver re-
sults in a change in the transfer function of the echo
path, and will force the adaptive filter to readapt. If
the volume control is done before the input to the
adaptive filter, the echo path does not change, and
retraining is not necessary. Another side benefit of
the CS6422 volume control is that it transparently
provides dynamic range compression through the
AGC function.

4.1.1.2.1 Pre-Emphasis

The typical training signal for the adaptive filter is
speech, but most adaptive filters train optimally
with white noise. Speech has very different spectral

1

8kHz

-------------

CS6422

DS295F1

33

Advertising