Sie sind auf Seite 1von 41

Acoustic Echo Cancellation

Franklin Falcon Stephen Hagedorn Chao Huang Bryan Luu Daniel Marti Jeffrey Swofford

Acoustic Echo Cancellation (AEC)


AEC Theory
Far End Signal vs. Near End Signal

AEC Implementation
Error Signal Adaptive Filter Double Talk Detection

AEC Simulation (in MATLAB)


No near end speech & near end speech

AEC Hardware
Host Interface TI DSK Board

AEC Theory

What is AEC?
Concerns: 1. Double Talk 2. ECHO Room designations are arbitrary

Far End Signal


Far End = Secondary Caller Caller talks into the receiver and the signal is transferred to the primary caller at the Near End Signal is then processed by the primary callers phone and then comes back to the far end through the phones speaker Issues: Assume no echo for far end

Near End Signal


Near End = Primary Caller Far End signal is transmitted to the Near End through the phones speaker Near End signal is then transmitted back to the Far End through the receiver Concerns with the transmission of the signal: Echo of Room One Double Talk at Near End

Near End Echo


Receiver input to phone = Primary Caller + Far End Echo Signal Far End Echo Signal: Function of both speaker volume and the size of the room Transmitted back to the secondary caller on the far end Requires Acoustic Echo Cancellation to eliminate the echo signal

Double Talk?
Near End No Talk Small Talk Large Talk Any Talk Far End Any Talk Large Talk Small Talk No Talk Double Talk? O.K. Double Talk Double Talk O.K.

AEC Implementation

AEC Block Diagram

x(n): far-end signal y(n): echo signal u(n): background noise v(n): near-end signal

d(n): microphone signal yhat(n): filter input e(n): error signal w(n): adaptive filter

E(n) : Error Signal


CASE 1: v(n) = 0 The error signal should converge to zero as the echo (and thus) is cancelled CASE 2: v(n) 0 IDEALLY, the error signal will converge towards the microphone signal

AEC Block Diagram

x(n): far-end signal y(n): echo signal u(n): background noise v(n): near-end signal

d(n): microphone signal yhat(n): filter input e(n): error signal w(n): adaptive filter

Far-End Signal
Receiver

Receiver x(n): far-end signal receiver mimicked by electronic signal exists within the electronic system

Near-End Signal (Speaker)


Speaker Speaker

x(n): far-end signal converted into sound by a speaker configuration propagates within a given room y(n) = conv(x(n),h(n))

Near-End Signal (Receiver)

Receiver Receiver

d(n): microphone signal captures the sound within the room input back into the electronic system composed of echo, near-end signal, and extraneous noise

Adaptive Filter
Concerns:
Algorithm of the Adaptive Filter Convergence of the Adaptive Filter Length of the Adaptive Filter Double-talk Detection

Adaptive Filter Algorithms

NLMS Adaptive Filter Algorithm


NLMS (Normalized Least Mean Squared)

w(n): adaptive filter : convergence factor e(n): error of the system = d(n) yhat(n) Yhat(n) = w(n)*x(n) Speed: Convergence independent of input signal power Efficiency: Requires only two mult and two add operations

Adaptive Filter Convergence


determines the convergence of the filter For 2 << 0.5 the filter converges quickly to cancel the echo signal the convergence may reach the minimum of the function and surpass the desired point and result in a longer convergence time For 0.5>>0.01 the filter converges slowly to cancel the echo signal the convergence will reach the minimum of the function at slow rates Choose a large initially and decrease Beta as the error becomes smaller in magnitude (Applicable for N dimensions)

Adaptive Filter Length


Distance from speaker to microphone =d Speed of sound = v = 340 m/s Sampling rate = fs v/fs = distance sound travels per sample Length of the filter must be long enough to cover the distance between the speaker and the microphone: L = d*fs/v Must also take into account the distance between the speakers and the walls

AEC Block Diagram

x(n): far-end signal y(n): echo signal u(n): background noise v(n): near-end signal

d(n): microphone signal yhat(n): filter input e(n): error signal w(n): adaptive filter

Double-talk Detection

When v(n) is active, w(n) may diverge DTD: Detect double-talk quickly Distinguish double-talk from echo path variations

Double-talk Detection
Multiple Algorithms
Geigel, Cross-correlation Method (CCM), Normalized CCM, Coherence Method, Two Path Model

Actions:
Determine if there is double-talk Dont update w(n) if there is double-talk Change beta to be smaller

Geigel Algorithm
Comparison between x(n) and d(n) Double talk if

T is approximately 2 for line echo cancellation Hard to find a universal T-value

AEC Simulation
(performed in MATLAB)

MATLAB Simulation
function aec(M,N) %%%%%%%%%%%%%%%%%%%%%%%% % function aec(M,N) takes in two integers M and % N. M represents the length of the adaptive % filter 'w(n)' while N represents the length of % the far end signal 'x(n)' %%%%%%%%%%%%%%%%%%%%%%%%

MATLAB Simulation
Simulation Assumptions:
Length of Filter = variable Length of FE Signal = variable FE Signal is generated by a .wav file Room echo response is generated Geigel Algorithm used for DTD Utilizes NLMS Adaptive Filter

MATLAB Simulation
Case 1 : No Near End Input Signal

Far End Signal and Room Response before convolution

MATLAB Simulation
Case 1 : No Near End Input Signal

Echo Signal and Echo Cancelled Output

MATLAB Simulation
Case 1 : No Near End Input Signal

Demonstration of Convergence of Error

MATLAB Simulation
Case 1 : No Near End Input Signal

Effect of Changing Beta

AEC Hardware
Host Interface and TMS320C6713 DSK DSP board

Block Diagram of Hardware

Host Interface

Host Interface

Host Interface
OPERATIONS:
1. Read F.E. Signal from disk 2. Read parameter values from sliders 3. Establish RTDX connection with TI DSK
1. Transfer F.E. Signal, slider parameters 2. Receive filtered error signal

4. Display error signal

Host Interface
1. Read F.E. Signal From Disk

Select Browse to select a wave file for a far end signal The number of channels, sampling rate, and bits per second of the file are subsequently displayed in the Wave Signal Parameters tab

Host Interface
2. Read Parameter Values From Sliders

Moving the sliders in the AEC Parameters section changes the properties of the NLMS algorithm. As the slider is moved the new parameter value is sent to the TMS320C6713 DSK DSP board.

Host Interface
4. Display Error Signal

As the error signal is transferred to the host computer, the left panel displays the graphical information. The zoom factor parameter in the wave signal parameters section allows for further analysis of the error signal.

TMS320C6713 DSK DSP Board

Board Connections

Das könnte Ihnen auch gefallen