Using echo cancellation in your design

In this section

Introduction

Example MediaMatrix configurations

Understanding the flyoffs for the NIO-AEC card

See also

Control devices

Using XDAB to share DSP resources

Storing and reusing devices using plugins

Using the Feedback Ferret to eliminate feedback in your design

Using Ambient Sensing Levelers to ensure audio can be heard in a noisy venue

Linking NWare projects together

Introduction

It is quite common to hear an echo when communicating via microphones and speakers, in a set up similar to the one shown below. When the person at the far end speaks, their voice is transmitted to the speakers in the room at the near end. The microphone on the table not only picks up what the people in the room say in reply, but also the sound of the person at the far end as it emerges from the speakers. This means that the person at the far end not only hears what the people at the near end say, but also a delayed echo of what they themselves have just said. The effect can be very distracting. It is important that the echo is eliminated to ensure that the quality of the sound in the conference is kept to an acceptable level.

An echo cancellation system can be introduced into the design to eliminate the echo effect. It will ensure that the person at the far end can only hear the sound made by the people at the near end in their headphones, not the sound of the people at the near end plus the echoed sound of themselves from the far end.

In order to send only the sound of the people at the near end down the line to the person at the far end, the sound of the person at the far end, as it is heard in the room, must be removed (or subtracted) from the signal. The problem is, the part of the signal from the near end containing the signal from the far end is no longer identical to the original and cannot be easily recognized. The characteristics of the room have affected it. The echo cancellation system must determine how the room at the near end affects the signal from the far end in order to make it recognizable. It can then be cancelled out.

The diagram below shows the same scenario with the addition of an echo cancellation system.

The echo cancellation process is as follows:

  1. Sound from the far end is digitally sampled to form a reference signal (A).
  2. The sound from the microphone is digitally sampled (B). This contains the direct path sound from the people at the near end, plus the reverberant sound from the speakers containing the sound from the far end.
  3. The adaptive filter builds a mathematical model of how the room at the near end affects the sound from the far end. It does this by comparing the part of the signal from the near end (B) that contains the signal from the far end with the signal that comes directly from the far end (A) and working out how the sound has been changed.
  4. In the subtraction phase, the system locates signal A from the far end within signal B from the near end and attempts to remove it.
  5. If the sound is subtracted successfully, the adaption filter has effectively determined how the room at the near end affects signal A. It can then use the same set up to cancel echo from all further sound it receives. If the sound is not subtracted, the signal is fed back into the adaptive filter (C), so the filter can adjust the settings. The process of feeding the signal back until a successful subtraction is completed is called convergence.
  6. Once the subtraction process has completed, the signal is passed to the non-linear processing stage. If the signal still contains some residual sound from the far end that has not been removed by the adaptive filter, it is removed.

For more detailed information on how echo cancellation works, see http://en.wikipedia.org/wiki/Echo_cancellation.