What is Acoustic Echo Cancellation?
The Acoustic Echo Cancellation (AEC) block is designed to remove echoes, reverberation, and unwanted added sounds from a signal that passes through an acoustic space. As shown in the diagram below, the sound coming from the remote person speaking, known as the Far End In, is sent in parallel to a DSP path and to an acoustic path. The acoustic path consists of an amplifier/loudspeaker, an acoustic environment, and a microphone returning the signal to the DSP. The AEC block is based on an adaptive FIR filter. The algorithm continuously adapts this filter to model the acoustic path. The output of the filter is then subtracted from the acoustic path signal to produce a “clean” signal output with the linear portion of acoustic echoes largely removed. The AEC block also calculates a residual signal containing nonlinear acoustic artifacts. This signal is sent to a Residual Echo Cancellation block (RES) that further recovers the input signal. The signal is then (optionally) passed through a noise reduction function to produce the output, which is a known as the “Far End Out.”
The filter pauses adaptation when it detects sounds in the acoustic path unrelated to the far end in. This allows sounds in to be added to the far end out. For example, in the case of a hands-free system or speakerphone, adaptation pauses when a person speaks directly into the microphone. The person at the far end hears only the local talker and not the echoes and reverberation from the far end in the near end space. This is absolutely necessary for clear, full duplex conversation over communication channel.
The adaptive filter in the AEC block will remove any signal that is part of the far end in. This can be extremely useful. For example, if music that is playing in the near end space, it may be added to the far end input signal. The music will be cancelled by the adaptive filter along with the signal coming from the far end. This allows full duplex conversation while music (or any known signal) is playing in the near end space. Continuing the example above, if a driver is listening to music while talking on the hand-free, the music does not need to be paused during the conversation. Both the voice of the remote speaker and the music will be removed from the signal picked up by the microphone, and only the local speaker's voice will be sent on the far end out.
There are two blocks that, together, comprise the Acoustic Echo Cancellation algorithm as implemented on the SigmaDSP. The primary block (AEC) removes the linear portion of the echoes and reverberation. operates in the stream processing domain and performs most of the functionality. A second block (RES) runs in the frequency domain and supplements the primary AEC block by performing nonlinear processing on the residual echo signal. The residual echo removal improves the performance substantially, and all performance benchmarks have been made using the two blocks together. However, the RES block is, strictly speaking, optional.
An additional block, noise reduction, is also shown in the diagram below. While not formally part of the AEC algorithm, they are used together more often than not. The noise reduction block also operates in the frequency domain and can follow the residual echo suppression in the block/frequency domain space with no additional overhead. The noise reduction block has use in many applications, however, that do not requires AEC.

Most AEC implementations, including this one, are optimized for speech. As such, the bandwidth is reduced to minimize processing resources. There are three widely accepted bandwidth standards: Narrow band (NB) uses a sampling rate of 8 kHz (bandwidth of 4 kHz). This is the bandwidth historically used in telephony (PSTN). Wide band (WB) uses a sampling rate of 16 kHz (8 kHz bandwidth). This is the most commonly used implementation for new products, and is the implementation documented below. The base implementation of SigmaDSP is narrow band. However, a wide band implementation can be constructed using two narrow band blocks, one for the lower frequencies and one for the upper frequencies. The documentation and example projects are all wide band and are implemented in this way. Ultra-wide band (UWB) uses a sampling rate of 32 kHz (16 kHz bandwidth). UWB AEC is not often used in speech applications.
Why do I need Acoustic Echo Cancellation?
AEC is needed when a far end signal is played over a loudspeaker into a reverberant acoustic space and is picked up by a microphone. In the full duplex hand-free telecommunication systems remote user's voice will be delayed and returned to the remote user. AEC will remove those echoes, reverberation, and unwanted added sounds.
What are the design considerations?
Tunable Parameters
|
Algorithm |
Parameter |
Range |
Optimal |
|
AEC |
Taps |
320 to 640 |
640 |
|
HPF Cut Off |
20 to 300 Hz |
150 Hz |
|
|
RES |
Temporal Smoothing |
0.1 to 1.0 |
0.2739 |
|
Spectral Smoothing |
0.1 to 1.0 |
0.2 |
|
|
Smoothing factor |
0.1 to 1.0 |
0.7 |
Note that the standard compliance testing was performed with the above mentioned optimal parameters and there is no guarantee of performance if this parameter is changed.
Resource Requirement
|
Algorithm |
MIPS (16kHz) |
Data Memory (16kHz) |
|
AEC |
24 |
6k |
|
RES |
8 |
6k |
More information about AEC available on ADI wiki
Ready to get started? Find all the information needed to start your evaluation journey here...
Please contact SigmaStudioLicensing@analog.com for licensing information.