Background
Adaptive signal processing is an important branch of information technology and is widely used in the field of communications. In the field of communications, echo cancellation is a very interesting and challenging hotspot. Multiple reflections of sound in an enclosed space can create echoes, as well as echoes in the signal transmission due to impedance mismatches in the transmission medium. Communication echoes can be cancelled by a system identification model: the recognized system is an acoustic echo channel, the output of the system recognition is the estimation of an echo signal, and the echo cancellation can be realized by subtracting the estimation of the echo signal from the voice signal containing the echo signal, which is the principle of the adaptive echo canceller.
In echo cancellation applications, the speech signal has a correlation characteristic. In the case of correlated input signals, the performance of conventional adaptive filtering algorithms such as Least Mean Square (LMS) and Normalized Least Mean Square (NLMS) is significantly degraded. For this purpose, the affine projection algorithm (h.c. shin, a.h. sayed, Mean-square performance of a family of fine projection algorithms [ J ], IEEE trans. signal process, 2004,52(1), pp.90-102), abbreviated as APA, is proposed by h.c. shin. The affine projection algorithm updates the weight by using an input matrix formed by a plurality of input vectors, and has the capability of decorrelating signals, thereby accelerating the convergence speed of the algorithm. However, the fixed-step APA algorithm suffers from a tradeoff of fast convergence speed and low steady-state imbalance. To solve this conflict, j.h.choi proposes a scheme of combining step sizes (j.h.choi, h.cho, s.w.kim, Combination of step sizes for after-field project algorithm with variable missing parameter, electron.let, 2013,49(18), pp.1149-1150), abbreviated as CSSAPA-VMP. The CSSAPA-VMP algorithm combines a large step size and a small step size by using an adaptive mixing parameter to ensure that the algorithm can obtain a fast convergence speed in an initial stage and obtain low steady state maladjustment in a steady state stage.
The tracking capability is an important index for evaluating the quality of the adaptive filtering algorithm, and has practical significance for echo cancellation application. However, the mixing parameters of the CSSAPA-VMP algorithm mainly depend on the input vector or the variance of the echo signals formed by the input signals at the current moment and the previous moments, the input signal proportion of the current moment in the input vector is lower, and the echo signal proportion of the current moment in the variance is also lower; therefore, when the channel changes suddenly, it has no tracking capability and the performance becomes very poor, resulting in undesirable echo cancellation effect.
Disclosure of Invention
The invention aims to provide a combined step size echo cancellation method with high tracking performance, which has good tracking performance and can still obtain high convergence speed and low steady state maladjustment when an acoustic echo channel changes.
The technical scheme adopted by the invention for realizing the aim is that the combined step size echo cancellation method with high tracking performance comprises the following steps:
A. signal acquisition
Sampling a far-end signal transmitted from a far end to obtain an input signal discrete value u (n) of the current moment n, and sampling a near-end signal to obtain an expected signal discrete value d (n) of the current moment n with echo;
B. echo signal estimation
The discrete value u (n) of the input signal at the time n to n-L +1, u (n-1).. u (n-L +1), and the adaptive filter input vector U (n) at the current time n, U (n) [ (n), u (n-1).. u (n-L +1) ], u (n-L +1)]TWhere L denotes the length of the adaptive filter, L is 512 or 1024, and the superscript T denotes transposition;
inputting the discrete value u (n) of the input signal into the adaptive filter to obtain the output signal y (n) of the adaptive filter at the current time n, wherein y (n) is WT(n) U (n); wherein, W (n) is the weight vector of the adaptive filter at the current moment n, the length of the weight vector is equal to L, and the initial value is a zero vector;
C. echo cancellation
Subtracting the output signal y (n) of the adaptive filter at the current time n from the desired signal discrete value d (n) at the current time n obtained in the step a to obtain an error signal e (n) at the current time n, namely e (n) ═ d (n) -y (n); and transmitting the error signal e (n) of the current moment n to the far end as a pure signal after echo cancellation;
D. adaptive filter error vector calculation
D1, using the input vector U (n), U (n-1) and U (n-P +1) of the adaptive filter from the current time n to the time n-P +1 to form the input matrix of the adaptive filter at the current time n
Wherein P is an affine projection order, and the value range of P is 2-6;
d2, using the desired signal D (n), D (n-1),. and D (n-P +1) from the current time n to the time n-P +1 to form the desired signal vector D (n) at the current time n, D (n) ([ D (n), D (n-1),. and D (n-P +1)]T;
D3, subtracting the input matrix of the current time n from the expected signal vector D (n) of the current time n
The transpose of (a) and the product of the weight vector W (n) of the adaptive filter to obtain the error vector E (n) of the adaptive filter at the current time n,
E. adaptive filter tap weight update
E1, calculating a weight error vector v (n) of the current time n, where v (n) is W ° -W (n), where W ° is an expected value of the weight vector of the adaptive filter, that is, an echo channel to be estimated; calculating weight error matrix Q (n) at current time n, Q (n) V (n)T;
E2, calculation of mixing parameters
Calculating weight error matrix trace J (n) at current time n, wherein J (n) is Tr (Q (n)), and Tr (·) represents trace of matrix calculation
Using the filter length L in step B, the input matrix in step D1
And affine projection order P, calculating a mixing parameter λ (n) of the current time n:
wherein, mu
2Is a small step size, mu
1The step length is large, the value ranges of the two are both 0.0001 to 0.5,
the variance of the echo signal is within the range of 0.001-0.1;
e3, triggering of reset mechanism
Calculating the relative strength of the signal error at the current time n
Simultaneously calculating the absolute intensity r (n-1) of the signal error of the previous time n-1 as log
10(e
2(n-1));
If R (n) ≦ t1Or R (n) > t1And r (n-1) is not less than t2If so, judging that the echo channel does not have mutation at the current moment, and performing the operation of step E4; wherein, t1The threshold value of the relative strength of the signal error is represented, the value range is 1-3, t2A threshold value representing the absolute intensity of the signal error, the value range is-3 to-1, q0To representResetting the initial value, wherein the value range is 1-10;
if R (n) > t1While r (n-1) < t2If the echo channel is suddenly changed, the weight error matrix trace is reset, i.e. J (n) q0;
E4 updating of filter tap weights
Using the input matrix in step D1
The error vector E (n) in step D3 and the blending parameter λ (n) in step E2 obtain the filter tap weight W (n +1) at the next time (n + 1):
wherein, (.)-1Representing an inversion matrix;
F. updating weight error matrix trace
Using the filter length L in step B, the input matrix in step D1
And affine projection order P, mixing the parameter λ (n) and the weight error matrix q (n) in step E2, and obtaining a weight error matrix trace J (n +1) at the next time (n + 1):
G. repetition of
Let n be n +1, repeat step A, B, C, D, E, F until the call ends.
Compared with the prior art, the invention has the beneficial effects that:
the invention designs a reset mechanism aiming at the change of an acoustic echo channel, which is used for detecting whether the channel has sudden change at each moment. In particular if the relative strength value of the error signal at the current time is
Greater than a set threshold value, and the absolute intensity value r (n-1) of the error signal at the previous moment is log
10(e
2(n-1)) is smaller than a set threshold, the echo channel at the current moment is judged to generate sudden change (the channel at the previous moment is normal); then, the weight error matrix trace J (n) is forcibly reset to a large initial value, further, the mixing parameter is immediately reset to a large numerical value, and a large-step filter in the combined filter plays a leading role, so that the algorithm of the invention has strong tracking capability when the echo channel is suddenly changed, and can obtain high convergence speed and low steady-state imbalance.
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
Detailed Description
Examples
A specific embodiment of the present invention is a combined step echo cancellation method with high tracking performance, which includes the following steps:
A. signal acquisition
Sampling a far-end signal transmitted from a far end to obtain an input signal discrete value u (n) of the current moment n, and sampling a near-end signal to obtain an expected signal discrete value d (n) of the current moment n with echo;
B. echo signal estimation
The discrete value u (n) of the input signal at the time n to n-L +1, u (n-1).. u (n-L +1), and the adaptive filter input vector U (n) at the current time n, U (n) [ (n), u (n-1).. u (n-L +1) ], u (n-L +1)]TWhere L denotes the length of the adaptive filter, L is 512 or 1024, and the superscript T denotes transposition;
inputting the discrete value u (n) of the input signal into the adaptive filter to obtain the output signal y (n) of the adaptive filter at the current time n, wherein y (n) is WT(n) U (n); wherein W: (n) is a weight vector of the adaptive filter at the current moment n, the length of the weight vector is equal to L, and the initial value is a zero vector;
C. echo cancellation
Subtracting the output signal y (n) of the adaptive filter at the current time n from the desired signal discrete value d (n) at the current time n obtained in the step a to obtain an error signal e (n) at the current time n, namely e (n) ═ d (n) -y (n); and transmitting the error signal e (n) of the current moment n to the far end as a pure signal after echo cancellation;
D. adaptive filter error vector calculation
D1, using the input vector U (n), U (n-1) and U (n-P +1) of the adaptive filter from the current time n to the
time n-P +1 to form the input matrix of the adaptive filter at the current time n
Wherein P is an affine projection order, and the value range of P is 2-6;
d2, using the desired signal D (n), D (n-1),. and D (n-P +1) from the current time n to the time n-P +1 to form the desired signal vector D (n) at the current time n, D (n) ([ D (n), D (n-1),. and D (n-P +1)]T;
D3, subtracting the input matrix of the current time n from the expected signal vector D (n) of the current time n
The transpose of (a) and the product of the weight vector W (n) of the adaptive filter to obtain the error vector E (n) of the adaptive filter at the current time n,
E. adaptive filter tap weight update
E1, calculating a weight error vector v (n) of the current time n, where v (n) is W ° -W (n), where W ° is an expected value of the weight vector of the adaptive filter, that is, an echo channel to be estimated; then, the product is processedCalculating a weight error matrix Q (n) at the current time n, wherein Q (n) is V (n)T;
E2, calculation of mixing parameters
Calculating weight error matrix trace J (n) at current time n, wherein J (n) is Tr (Q (n)), and Tr (·) represents trace of matrix calculation
Using the filter length L in step B, the input matrix in step D1
And affine projection order P, calculating a mixing parameter λ (n) of the current time n:
wherein, mu
2Is a small step size, mu
1The step length is large, the value ranges of the two are both 0.0001 to 0.5,
the variance of the echo signal is within the range of 0.001-0.1;
e3, triggering of reset mechanism
Calculating the relative strength of the signal error at the current time n
Simultaneously calculating the absolute intensity r (n-1) of the signal error of the previous time n-1 as log
10(e
2(n-1));
If R (n) ≦ t1Or R (n) > t1And r (n-1) is not less than t2If so, judging that the echo channel does not have mutation at the current moment, and performing the operation of step E4; wherein, t1The threshold value of the relative strength of the signal error is represented, the value range is 1-3, t2A threshold value representing the absolute intensity of the signal error, the value range is-3 to-1, q0Representing a reset initial value, wherein the value range is 1-10;
if R (n) > t1While r (n-1) < t2If so, the echo channel at the current moment is judged to have sudden change, and the weight value is adjustedResetting the error matrix trace, i.e. making J (n) q0;
E4 updating of filter tap weights
Using the input matrix in step D1
The error vector E (n) in step D3 and the blending parameter λ (n) in step E2 obtain the filter tap weight W (n +1) at the next time (n + 1):
wherein, (.)-1Representing an inversion matrix;
F. updating weight error matrix trace
Using the filter length L in step B, the input matrix in step D1
And affine projection order P, mixing the parameter λ (n) and the weight error matrix q (n) in step E2, and obtaining a weight error matrix trace J (n +1) at the next time (n + 1):
G. repetition of
Let n be n +1, repeat step A, B, C, D, E, F until the call ends.
Simulation experiment
To verify the effectiveness of the present invention, we performed simulation experiments.
In the simulation experiment, the impulse response of the echo channel is formed in a quiet closed room with the length M of 512, wherein the room is 6.25M long, 3.75M wide and 2.5M high, the temperature is 20 ℃ and the humidity is 50%. The real voice signal played by the loudspeaker is adopted as the input signal of the far end, the sampling frequency is 8000Hz, and the number of sampling points is 80000, as shown in figure 1.
Echo signals are collected from a telephone microphone, and the impulse response of an echo channel changes abruptly at a position of half the number of sampling points.
In the simulation experiment, the projection order value of all tested algorithms is P-4, and the step length value is marked in the simulation graph. For the CSSAPA-CMP algorithm,
with respect to the present invention, it is,
q
0=5,t
1=2,t
2=-2。
FIG. 2 is a simulation of the APA algorithm, CSSAPA-VMP algorithm and the normalized misadjustment of the present invention under a speech input signal. As can be seen from fig. 2, before the echo channel suddenly changes (before the sampling time 40000), the performance of the present invention is close to that of the CSSAPA-VMP algorithm, and both the performance of the present invention and the performance of the rsa algorithm are superior to that of the APA algorithm. After the echo channel has sudden change (sampling time 40000), the performance of the APA algorithm and the CSSAPA-VMP algorithm is poor, and the weight estimated by the algorithm deviates far from the echo channel and cannot track the sudden change of the echo channel. In contrast, when the echo channel is mutated, the weight estimation value of the algorithm is correspondingly changed, is very close to the echo channel and has strong tracking capability; the convergence rate is high and the steady state imbalance is low.