Echo Cancellation Study Record


I. Overview

The acoustic front-end algorithm mainly refers to the 3A algorithm, namely AEC (echo cancellation) , ANS (adaptive noise suppression) and AGC (automatic gain control) 3 types of algorithms. Among them, the echo canceller is the core of the front-end acoustic signal processing, and it is also a key module necessary for various types of intelligent voice terminal equipment.

The research focus of the domestic research team is mainly on the algorithm research of speech recognition and semantic analysis, not enough attention is paid to the link of acoustic front-end signal processing, and there is a lack of systematic research on the theory, technology and methods of acoustic front-end signal processing.

2. Basic knowledge

1 Introduction

The two sides of the conference are located at the far end and the near end. The voice of the far end speaker is transmitted to the near end and released through the near end speaker. Together with the voice of the near end speaker, it is picked up by the near end microphone and transmitted through the far end speaker. . At this time, the far-end speaker will hear the voice of the near-end speaker and the echo of his own voice at the same time.

insert image description here

2. Classic echo cancellation algorithm processing architecture

The code is as follows (example):

insert image description here

3. Echo evaluation index:

1. Misalignment coefficient: represents the degree to which the echo path estimated by the echo cancellation algorithm is close to the real path
insert image description here

2. Echo return loss: represents how much gain the echo canceller removes the echo from the microphone signal
insert image description here
3. Computational complexity

3. Echo Cancellation Algorithm

1. LMS algorithm

The LMS algorithm was proposed by Widrow and Hopf of Stanford University in the United States. This algorithm is simple and practical, and it is a standard algorithm for adaptive filters.
e ( n ) = y ( n ) − y ^ ( n ) = y ( n ) − wn T x ( n ) e(n)=y(n)-\hat{y}(n)=y(n) -\boldsymbol{w}_n^T \boldsymbol{x}(n)e(n)=and ( n )y^(n)=and ( n )wnTx (n)
uses the steepest descent method to filter coefficientwn \boldsymbol{w}_nwnUpdate as follows:
w ^ n + 1 = w ^ n − g ( n ) μ ( n ) \hat{\boldsymbol{w}}_{n+1}=\hat{\boldsymbol{w}}_n -\boldsymbol{g}(n) \mu(n)w^n+1=w^nThe gradient vector for g (n)μ(n)
iterations is computed as follows:
g ( n ) = ∂ E { ∣ e 2 ( n ) ∣ } ∂ w ^ n ∗ = ∂ E { e ( n ) e ∗ ( n ) } ∂ w ^ n ∗ = − E { e ( n ) x ∗ ( n ) } \boldsymbol{g}(n)=\frac{\partial E\left\{\left|e^2(n)\right| \right\}}{\partial \hat{\boldsymbol{w}}_n^*}=\frac{\partial E\left\{\mathrm{e}(n) e^*(n)\right\} }{\partial \hat{\boldsymbol{w}}_n^*}=-E\left\{e(n) \boldsymbol{x}^*(n)\right\}g(n)=w^nE{ e2(n) }=w^nE{ e ( n ) e(n)}=E{ e(n)x( ____
_
_ n ) e ( n ) x ( n ) \begin{aligned} \hat{\boldsymbol{w}}_{n+1} & =\hat{\boldsymbol{w}}_n+\mu(n) E\left \{e(n) \boldsymbol{x}^*(n)\right\} \\ & =\hat{\boldsymbol{w}}_n+\mu(n) e(n) \boldsymbol{x}(n ) \end{aligned}w^n+1=w^n+m ( n ) E{ e(n)x(n)}=w^n+μ ( n ) e ( n ) x ( n )
The structure of LMS algorithm is simple and practical.
There are two obvious deficiencies:
1) The strategy of using instantaneous value instead of expected value in LMS algorithm introduces random fluctuations, which seriously affects the collection performance. If the input signal is too large, the gradient will be enlarged, and if the input signal is too small, the collection speed will be reduced.
2) The update of each coefficient requires N \mathrm{N}N (filter order) times of multiplication, as the filter order increases, the computational complexity will increase significantly, which will cause this type of system to be unable to eliminate the echo in time in the environment of long-delay echoes, making the system unable to satisfy Real-time requirements.

2. NLMS algorithm

NLMS Algorithm LMS algorithm is estimated by the instantaneous value of the sample, which is unbiased in the average sense, but it will introduce random fluctuations, which will affect the performance after convergence. Aiming at this deficiency, NLMS has made corresponding improvements, and the correction calculation is as follows: The
insert image description here
NLMS algorithm is also updated point by point, calculating the error requires N times of real number multiplication, the coefficient update needs N times of real number multiplication, and calculating the adaptive step size needs N times of real number multiplication. A total of 3N multiplications are required for each iteration, and a total of real number multiplications are required to process a sequence of N points.

3. RLS algorithm

RLS Algorithm The Least Squares (LS) algorithm aims to minimize the sum of squares of the difference between the desired signal and the model filter output. When a new sampling value of the input signal is received in each iteration, the least squares problem can be solved in a recursive form, and a recursive least squares (RLS) algorithm is obtained. For the least squares algorithm, its objective function is deterministic and is given by:
insert image description here

4. FDNLMS algorithm

The FDNLMS algorithm divides the reference signal into N-point blocks, and the filter coefficients are updated every N points, and are updated by the accumulation of N samples, so that the processing can effectively use the FFT calculation, and it has the same convergence speed as the NLMS algorithm. After being divided into blocks, the filter output value of the pth block is the linear convolution of the reference data of the pth block and the corresponding filter coefficients (the block remains unchanged), and the calculation method is as follows: FDNLMS greatly reduces the computational complexity of NLMS,
insert image description here
but there is still Disadvantages:
1) Limiting the use of hardware: The number of FFT points needs to be twice the tail length of the echo path. Most available FFT or DSP chips are designed and optimized for small-size FFTs, usually less than 256 points. At this point, it is rather inefficient and expensive to implement an acoustic echo canceller of several thousand taps.
2) Affects real-time performance: Since the FLMS algorithm implements block processing, if the filter length is 1024, each processing needs to wait for 1024 sample points, and the delay is 64ms under 16k samples. Such a long delay can seriously affect the real-time performance of the device.
3) Quantization error of FFT: As the size of FFT increases, the number of multiplication and scaling increases, which will cause additional quantization error and affect the calculation accuracy.

5. PBFDAF algorithm

When PBFDAF algorithm deals with long echoes, in order to collect enough processing data, BFDAF will bring huge processing delay, which is not suitable for occasions requiring real-time processing. Therefore, based on this improvement, the basic idea of ​​the segmented block frequency domain filtering algorithm is obtained: before the frequency domain filtering, the coefficients of the adaptive filter are divided into equal lengths, and after zero padding, they are transformed into the frequency domain for calculation similar to the NLMS algorithm.

Guess you like

Origin blog.csdn.net/weixin_62501745/article/details/128747054