Background technology
Echo generally comprises two classes: a class is a network echo, and this echo is the reflected signal that does not match and cause owing to the impedance of the 2-4 line converting unit of near-end in public switch telephone network; Another kind of is acoustic echo, and this echo is because the signal that the acoustic reflection of surrounding environment body surface causes, and for example sound, is sampled by microphone directly or through the reflection of ambient surface from the loud speaker of near-end hand free device.The echo path of network echo is relatively stable, and echo path length is no more than 32ms; The echo path of acoustic echo changes easily, and echo path length can reach hundreds of ms, and echo path is non-linear.And in actual communication process, the echo meeting that surpasses 20ms has a strong impact on speech quality.For telecommunication system, for example toll telephone is essential to the elimination of network echo; And for IP phone and digital video conference system based on packet switching network, the actual time delay that is caused by reasons such as network jitter, audio coding decoding and audio frequency pre-process and post-process is much larger than 20ms, and the elimination of acoustic echo is essential.
Usually can adopt an echo cancellation system to eliminate echo, typical, echo canceller 100 as shown in Figure 1.These echo canceller 100 inside comprise adaptive-filtering unit 101, step parameter adjustment unit 102, wherein:
(1) adaptive-filtering unit 101 typically can be a sef-adapting filter, it can adopt LMS (Least Mean Square, lowest mean square), NLMS (Normalized Least-Mean-Square, normalized lowest mean square) and RLS (Recursive Least-Squares, recursive least-squares) etc. carry out filtering, it can be realized on time-domain or frequency domain.And in actual applications, in order to reduce computational complexity and to improve convergence rate, actual echo canceller (the especially acoustic echo arrester) great majority that use realize that in frequency domain (comprise Substrip analysis-comprehensive) mode accompanying drawing 2 is exactly the schematic diagram that this acoustic echo arrester carries out echo cancellation in an exemplary scene.
(2) step parameter adjustment unit 102 is used for the step parameter of filter being adjusted, thereby being avoided filter seriously to disperse the distorted signals that causes in two-way call (refer to far-end and near-end talk simultaneously) process.This step parameter adjustment unit 102 utilization step parameter regulation means, this method are based upon on the basis of the signal strength signal intensity of output signal e (n) and/or remote signaling x (n) or correlation mostly, and algorithm self has the parameter of one or more very difficult settings.In a typical case, step parameter adjustment unit 102 is a two-way call detector (double talk detector, DTD), the step parameter regulation means that it adopted then is the two-way call detection method, in a single day it detect near-end voice signals, stops immediately that filter coefficient adapts to or the step parameter that reduces filter adaptation adapts to speed to reduce.
At present, the algorithm that step parameter regulation means (comprising the two-way call detection method) is adopted mainly contains two kinds, a kind of signal strength signal intensity that is based between remote signaling x (n) and the microphone signal d (n), and another kind is based on this two correlation between signals.Concrete method flow is: in step S301, in the two-way call process, detect near-end voice signals after, then obtain the threshold value of signal strength signal intensity or signal correlation; In step S302, adjust step parameter based on the threshold value of signal strength signal intensity or signal correlation, avoid filter divergence.But, because the characteristics right and wrong static state of actual voice signal, and be highly autocorrelative (conditional number of correlation matrix that is voice signal is bigger), the excursion of voice signal intensity is big and pace of change is fast, therefore is difficult to select appropriate signal intensity decision threshold; Because actual echo path is inevitably non-linear, and environmental noise, circuit noise and quantization noise have tangible influence to correlation between the signal, is difficult to select appropriate signal correlation decision threshold equally, so these two kinds of methods are all unreliable.
The two-way call detection method can be considered a kind of special circumstances of more general variable step size parametric technique.The variable step size parametric technique is by certain strategy, adjusts step parameter continuously, does not comprise clear and definite two-way call detector usually.Present variable step size parametric technique, great majority are based upon on the basis of the signal strength signal intensity of output signal and/or remote signaling or correlation, its particular content can reference: H.-C.Shin, A.H.Sayed, W.-J.Song, " Variable Step-Size NLMS and Affine Proj ection Algorithms; " IEEESignal Processing Letters, vol.11, no.2, PP.132-135, Feb2004.And algorithm self has the parameter of one or more very difficult settings, and as above-mentioned, directly the algorithm based on the variable step size parameter of signal strength signal intensity or correlation is insecure.And if this method has been utilized output signal and do not take careful measure, then more unreliable, this is because output signal equals the echo signal that microphone signal deducts estimation, and to the small sample perturbations of the echo signal estimated, to influence step parameter by output signal, and the mistake of step parameter changes the disturbance that can strengthen the echo signal of estimating, this will constitute positive feedback, thereby destroys stability of filter.
Therefore need a kind of new step parameter regulation means, can when echo canceller utilizes its sef-adapting filter to carry out echo cancellation, guarantee the stability of sef-adapting filter by this step parameter regulation means.
Summary of the invention
The object of the present invention is to provide a kind of echo cancellation equipment, be intended to solve prior art can't guarantee filter stability in the process of carrying out echo cancellation problem.
The present invention also aims to provide a kind of step parameter regulation means that is used for echo cancellation, to solve the above-mentioned problems in the prior art better.
In order to realize goal of the invention, described equipment, promptly echo canceller comprises the adaptive-filtering unit that is used to carry out echo cancellation, and coupled step parameter adjustment unit, described step parameter adjustment unit comprises the Energy distribution determination module, disperses value determination module and step-length control module;
Described Energy distribution determination module with disperse the value determination module and link to each other, be used to obtain filter coefficient, the probability distribution of calculating filter coefficient energy, and result of calculation sent into disperse the value determination module;
The described value determination module of dispersing links to each other respectively with Energy distribution determination module and step-length control module, is used to calculate the JS relevant with the probability distribution of described filter coefficient energy and disperses value D
JS, and described JS dispersed value D
JSSend into the step-length control module;
Described step-length control module is dispersed value D by one with described JS
JSFor the step parameter function of independent variable is adjusted step parameter.
Preferably, described disperse the value determination module be used for the discrete probability distribution of calculating filter coefficient energy and evenly the JS between the probability distribution disperse value D
JS, computing formula is:
Wherein, p
(1)Be the discrete probability distribution of filter coefficient energy, p
(2)Be the uniform probability distribution of filter coefficient energy,
I=0,1 ..., N-1, and j=1,2, π
(j)Be probability distribution p
(j)Weight, satisfy
With 0≤π
(j)≤ 1; H (p) is the entropy of probability distribution p.
Preferably, the step parameter function that adopted of described step-length control module is: μ (D
JS)=μ
Min+ f (D
JS) (μ
Max-μ
Min);
Wherein, D
JSThe relevant JS of probability distribution that is the filter coefficient energy disperses value, and 0≤D
JS≤ 1; μ
Max, μ
MinBe respectively maximum step parameter and the minimum step parameter of presetting, 0≤μ
Min<μ
Max≤ 1; F (D
JS) be with D
JSStep-length controlling elements for independent variable.
Preferably, described step-length controlling elements f (D
JS) be one with D
JSBe the monotonically increasing function of independent variable, its function expression is:
Wherein, 0≤D
JS≤ 1, α, β〉the 0th, the algorithm parameter that can set flexibly.
In order to realize goal of the invention better, described step parameter regulation means said method comprising the steps of based on aforesaid echo canceller:
A. obtain filter coefficient, and the probability distribution of calculating filter coefficient energy;
B. calculate the JS relevant and disperse value D with the probability distribution of described filter coefficient energy
JS
C. utilize with described JS and disperse value D
JSFor the step parameter function of independent variable is adjusted step parameter.Preferably, before described steps A, also comprise:
The end value of default step parameter, promptly maximum step-size parameter mu
MaxAnd minimum step parameter μ
Min, 0≤μ wherein
Min<μ
Max≤ 1.
Preferably, described step B disperses value D by the probability distribution calculating JS of filter coefficient energy
JSFormula be:
Wherein, p
(1)Be the discrete probability distribution of filter coefficient energy, p
(2)Be the uniform probability distribution of filter coefficient energy,
I=0,1 ..., N-1, and j=1,2, H (p) is the entropy of probability distribution p, is defined as
Preferably, the step parameter function that described step C adopted is: μ (D
JS)=μ
Min+ f (D
JS) (μ
Max-μ
Min);
Wherein, D
JSThe relevant JS of probability distribution that is the filter coefficient energy disperses value, and 0≤D
JS≤ 1; μ
Max, μ
MinBe respectively maximum step parameter and the minimum step parameter of presetting, 0≤μ
Min<μ
Max≤ 1; F (D
JS) be with D
JSStep-length controlling elements for independent variable.
Preferably, described step-length controlling elements f (D
JS) be one with D
JSBe the monotonically increasing function of independent variable, its function expression is:
Wherein, 0≤D
JS≤ 1, α, β〉the 0th, the algorithm parameter that can set flexibly.
The present invention is by increase Energy distribution determination module in the step parameter adjustment unit of echo canceller and disperse the value determination module, and passes through one with D in the step-length control module
JSStep-length controlling elements f (D for independent variable
JS) step parameter is adjusted accurately and reliably, guaranteed stability of filter.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Core concept of the present invention is: increase step-length if filter is stable, otherwise then reduce step-length.For realizing this purpose, need and to describe the parameter of filter stable state direct quantitatively, and utilize it to remove the step parameter of control filters.
Therefore, in the present invention, echo canceller comprises adaptive-filtering unit and step parameter adjustment unit, and this step parameter adjustment unit comprises three modules: the Energy distribution determination module, disperse value determination module and step-length control module.The Energy distribution determination module obtains filter coefficient, and calculates the probability distribution of its filter coefficient energy; Dispersing the value determination module utilizes the probability distribution calculating JS of this filter coefficient energy to disperse value D
JS, and result of calculation sent into the step-length control module; The latter then passes through one with D
JSFor the parametric function of independent variable is adjusted step parameter.Because the present invention is based on the probability distribution of the filter coefficient energy that can clearly quantize, but not signal strength signal intensity that can't accurately limit or signal correlation, so the present invention can adjust accurately and reliably to step parameter, thereby guarantees stability of filter.
Fig. 4 is the structure chart of echo canceller 100 among the present invention.This echo canceller 100 comprises adaptive-filtering unit 101 and step parameter adjustment unit 102.Should be noted that the annexation between each equipment is the needs of explaining its information interaction and control procedure for clear in all diagrams of the present invention, therefore should be considered as annexation in logic, and should not only limit to physical connection.Wherein:
Adaptive-filtering unit 101 is used to carry out echo cancellation, and it can take methods such as foregoing LMS, NLMS and RLS to carry out filtering, can realize on time-domain or frequency domain.
Step parameter adjustment unit 102 links to each other with adaptive-filtering unit 101, is used for the stability of real-time detection filter device, and step parameter is adjusted.It comprises Energy distribution determination module 1021, disperses value determination module 1022 and step-length control module 1023, wherein:
(1) Energy distribution determination module 1021 with disperse value determination module 1022 and link to each other, it is used to obtain filter coefficient, and the probability distribution of calculating filter coefficient energy, comprises discrete probability distribution and even probability distribution.
In an exemplary scenario, this echo canceller 100 utilize finite impulse response (Finite ImpulseResponse, FIR) filter is simulated echo path, so, in most cases, the impulse response of FIR (being filter coefficient) h=(h
0, h
1..., h
N-1) gross energy (being defined as the quadratic sum of the mould of the absolute value of each real coefficient or complex coefficient) concentrate on the fraction coefficient, as shown in Figure 5.
The discrete probability distribution of filter coefficient energy can be used following formulate:
The even probability distribution of filter coefficient energy can be used following formulate:
Satisfy common restriction
With
I=0,1 ..., N-1 and j=1,2.
Therefore,
Can be considered the discrete probability distribution of FIR filter coefficient energy,
Be even probability distribution, promptly as shown in Figure 6.
(2) disperse value determination module 1022 and link to each other with Energy distribution determination module 1021 and step-length control module 1023 respectively, it utilizes the result of calculation of Energy distribution determination module 1021, calculates the JS relevant with the probability distribution of described filter coefficient energy and disperses value D
JS, then described JS is dispersed value D
JSSend into described step-length control module 1023.
In the foregoing example scheme, the JS relevant with the probability distribution of filter coefficient energy disperses value D
JSComputing formula be:
Wherein, p
(1)Be the discrete probability distribution of filter coefficient energy, p
(2)Be the uniform probability distribution of filter coefficient energy,
I=0,1 ..., N-1, and j=1,2, π
(j)Be probability distribution p
(j)Weight, satisfy
With 0≤π
(j)≤ 1; H (p) is the entropy of probability distribution p, is defined as
In addition, the further peak pos of the probability distribution of calculating filter coefficient energy also
Max, formula is:
(3) step-length control module 1023 with disperse value determination module 1022 and link to each other, be used for by one with D
JSFor the step parameter function of independent variable to step-size parameter mu (D
JS) adjust.In an exemplary scenario, it utilizes step-length controlling elements f (D
JS) carrying out concrete adjustment, the step parameter function that is adopted is:
μ(D
JS)=μ
min+f(D
JS)·(μ
max-μ
min) (5)
Wherein, D
JSThe relevant JS of probability distribution that is the filter coefficient energy disperses value, and 0≤D
JS≤ 1; μ
Max, μ
MinBe respectively maximum step parameter and the minimum step parameter of presetting, 0≤μ
Min<μ
Max≤ 1; F (D
JS) be with D
JSStep-length controlling elements for independent variable.
In an exemplary scenario, step-length controlling elements f (D
JS) be one with D
JSBe the monotonically increasing function of independent variable, its function expression is:
Wherein, wherein, 0≤D
JS≤ 1, α, β〉the 0th, algorithm parameter of the present invention can be set as the case may be flexibly.Fig. 7 is exactly the step-length controlling elements f (D that the step parameter function is comprised in one embodiment of the present of invention
JS) schematic diagram.
Fig. 8 shows the present invention and carry out the method flow that step parameter is adjusted in the echo cancellation process.
Institute in steps before, default step-size parameter mu (D in the step parameter adjustment unit 102 of echo canceller 100
JS) end value, promptly maximum step-size parameter mu
MaxAnd minimum step parameter μ
Min, 0≤μ wherein
Min<μ
Max≤ 1.
In step S801, obtain filter coefficient, and the probability distribution of calculating filter coefficient energy.Particularly, echo canceller 100 utilizes the Energy distribution determination module 1021 in its step parameter adjustment unit 102 to obtain filter coefficient, and the discrete probability distribution of calculating filter coefficient energy and even probability distribution.
At first, utilize the FIR filter to simulate echo path, the filter coefficient that is obtained also is impulse response h=(h
0, h
1..., h
N-1), its schematic diagram as shown in Figure 5, its energy probability distribution is as shown in Figure 6.By the discrete probability distribution and the even probability distribution of (1) formula and (2) formula difference calculating filter coefficient energy, and by (4) formula calculating peak POS
Max
In step S802, calculate the JS relevant by (3) formula and disperse value D with the probability distribution of filter coefficient energy
JS, the degree of stability of real-time detection filter device, the specific implementation process of this step can be with reference to the content in the earlier figures 2.
In step S803, by (5) formula and (6) formula, step-length adjustment unit 102 passes through one with D
JSFor the step parameter function of independent variable is adjusted step parameter, comprise a step-length controlling elements f (D in this step parameter function
JS).
Fig. 9 is that the present invention carries out the filter status conversion schematic diagram of step parameter when adjusting in the echo cancellation process.Be convenient and describe, in the present invention, significant echo path changed and near-end voice signals is considered as acting on the external force of echo cancellation system, definition Boolean variable bForce, when significant echo path variation or near-end voice signals occurring, bForce is 1, otherwise is 0.And define two kinds of possible filter status: stable state and unsteady state.
When filter was in stable state, if bForce=0, then filter remained on stable state, D
JSBigger, step parameter is also bigger, has the good follow-up control that echo path is changed this moment.
If bForce=1, filter will be gradually by stable state to the unsteady state transition, this moment is active to be external force, it causes D
JSReduce, thereby filter step size is reduced, slow down adaptation speed, avoid occurring big dispersing.
If external force continues always, filter will arrive and rest on unsteady state, at this moment, and D
JSAll very little with step-length, adapt to speed and become very slow, can avoid seriously dispersing.This moment, filter output had the signal of certain residual echo.If the external force of removing, filter will enter the recovery process of acceleration: D by unsteady state to the stable state transition
JSIncrease, cause step-length to increase, the filter rate of convergence is accelerated, and makes D again
JSFurther increase, so form positive feedback.
In a concrete application scenarios of the present invention, details are as follows for its step parameter adjustment process:
Before carrying out the step parameter adjustment, need carry out following presetting:
The adaptive filter algorithm that be used for echo cancellation basic according to selections such as application scenarios, computational resources, for example, NLMS, PNLMS, APA, FAP, MDF, MDF-α etc.In order to reduce computational complexity and to improve convergence rate, select frequency domain (comprise Substrip analysis-comprehensive) implementation as far as possible.
According to selected adaptive filter algorithm, the lower limit μ of suitable step parameter is set
MinWith upper limit μ
Max, μ for example
Min=0, μ
Max=0.5.
Determine the parameter alpha and the β of step parameter Adaptive adjusting algorithm of the present invention.β has determined function f (D
JS) the horizontal level of symmetric points, for example get β=0.325, be the central point of closed interval [0.15,0.5]; α has determined function f (D
JS) shape, span is for example got α=12 between 6-15.
Determine the amount h=(h of simulation echo path
0, h
1..., h
N-1), for example, the filter coefficient of FIR filter transversary, or the filter reflection coefficient of lattice structure are to be used for the probability distribution p of calculating filter coefficient energy
(1)
Select suitable filter order.Use if network echo is eliminated, echo path length can be made as 32ms.Use if acoustic echo is eliminated, can make and estimate best filter order in the following method.
Presuppose echo path length and be 128 or 256ms.
If filter remains on stable state (D
JSBig and fluctuating range is less, POS
MaxSubstantially constant) and keep about 10 seconds.Best filter order should make D
JSMean value between 0.5-0.6;
If D
JSMean value be higher than this scope, it is excessive to show that filter order is set to, and has not only wasted computational resource (the especially situation of high sampling rate) but also reduced the filter rate of convergence; On the contrary, if D
JSMean value be lower than this scope, it is too small to show that filter order is set to, and will cause bigger residual echo and influence the effect of step length regulating method of the present invention.So, unless the computational resource restriction, otherwise should adjust filter order, the D when making stable state
JSMean value within above-mentioned scope.
Calculate D in order to reduce
JSWith the computational complexity of step parameter, can:
1), then selects not contain the filter coefficient of low frequency subband of DC frequency or the probability distribution that reflection coefficient is used for the calculating filter coefficient energy if filter is embodied as Substrip analysis-comprehensive method.
2) when filter order is big, can be with filter coefficient h=(h
0, h
1,, h
N-1) be divided into the coefficient block of several continuous equal in length, and substitute original coefficient Energy distribution with the Energy distribution of filter coefficient piece.If integer B represents every number of coefficients, integer
Expression piece number, then the Energy distribution of filter coefficient piece is:
Wherein, regulation is as i〉h during N-1
i=0.(1) formula is the special case (B=1) of following formula as can be seen.And the number of coefficients N in (2-4) formula replaced with coefficient block number K.For example, if N=2048 can get B=16, K=128;
3) periodically calculate D
JS, POS
MaxAnd step-length, for example every interval 1-6ms time once calculates and saving result, and all the other then utilize the result of calculation of preserving constantly;
4) calculate the subexpression χ log of Shannon entropy with linear interpolation with tabling look-up
2χ, χ ∈ [0,1].
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.