METHOD AND DEVICE FOR ECHO CANCELLATION USING POWER ESTIMATION IN A RESIDUAL SIGNAL

Abstract: An echo canceller determines a dynamic threshold (TH(n)) that depends on a non-linear error power estimate (24), and preferably also a linear error power estimate (22). A residual power estimate (28) of a residual signal (e(n)) is compared to this dynamic threshold. The residual signal is attenuated in a non-linear processor (20) if the residual power estimate falls below the dynamic threshold.

Description: Method and device for echo cancellation usinq power estimation in a residual signal TECHNICAL FIELD The present invention relates to an echo canceller and an echo cancellation method using a model of an echo path for forming a residual signal. BACKGROUND OF THE INVENTION Echo is a problem related to the perceived speech quality m telephony systems with long delays, e.g. telephony over long distances or telephony systems using long processing delays, like digital cellular systems. The echo arises in the four-to-two wire conversion m the PSTN/subscriber interface. To remove this echo, echo cancellers are usually provided in transit exchanges for long distance traffic, and m mobile services switching centers for cellular applications. Due to the location of the echo canceller it is made adaptive, the same echo canceller is used for many different subscribers in the PSTN This adaption is necessary not only between different calls, but also during each call, due to the non-fixed nature of the transmission network, e.g. phase slips, three-party calls, etc. The main part of an echo canceller is an adaptive filter The filter generates a replica of the echo, which is subtracted from the near end signal . Due to imperfect knowledge of the echo generating system, the estimated echo signal always contains errors Hence, in practice, the echo attenuation obtained by using an adaptive filter is usually at most approximately 30 dB For long time delays this attenuation is not enough, and m order to minimize the audible effects of these errors, a residual echo suppressor is used. The purpose of the echo suppressor is to further suppress the residual signal whenever this signal is dominated by the errors n the echo estimate. This is done by blocking the output of the echo canceller for certain levels of the output signal. Reference [1] describes an echo canceller provided with an echo suppressor in the form of an adaptive center clipper. The echo estimate produced by the echo canceller is used to control, via signal processing means, the threshold, and thereby the clipping window, of this adaptive clipper. If the power of the residual signal falls below the adaptive threshold, the residual signal is blocked or clipped, otherwise the residual signal is passed through the adaptive clipper without modification. However, the residual signal contains not only residual echo, but also background noise produced at the near end subscriber. Occasional¬ ly residual echo samples and background noise samples add constructively, and the resulting residual signal may therefore exceed the threshold. The result is undesirable sporadic transmissions of residual signals containing residual echo, which can be very annoying. A basic problem with echo cancelling is that an echo canceller operates in a wide range of system and signal conditions: (i) The system may have an attenuation of, say, 6 - 25 dB, and may be well described by a linear model. (ii) The background noise level at the near end may be between, say, -65 - -30 dBmO . (iii) The system may have a poor attenuation and may be poorly modelled as a linear system. Determining proper values of thresholds that give satisfactory performance of echo suppressors in all relevant situations is a fundamental problem with control strategies based on power comparisons. Designing the threshold for case (i) would lead to imperfect suppression of the residual echo for systems described by case (iii) . However, designing for case (iii) would lead to a very conservative suppressing function for systems described by case (i) . Furthermore, the amount of background noise from the near end side (case (ii)) affects the performance of the adaptive filter in the echo canceller. For a high background noise level, the fluctuation of the estimated model, and not the model errors, might dominate the residual signal. Hence, even for systems described by case (i) , different control strategies for the echo suppressor should be taken depending on the background noise level. From this discussion it is clear that it is difficult, if not impossible, to obtain one fixed control strategy and one set of fixed parameters that give a satisfactory performance of the echo suppressor in all relevant situations. SUMMARY OF THE INVENTION An object of the present invention is to provide a new echo canceller and a new echo cancellation method that adapt relevant parameters to different situations in order to avoid the above problems . The basic idea of the present invention is to use dynamic power estimates non-linear errors, and preferably also linear errors, in the residual signal to determine a dynamic threshold, and to attenuate the residual signal if the power of the residual signal falls below this dynamic threshold. BRIEF DESCRIPTION OF THE DRAWINGS The invention, together with further objects and advantages thereof, may best be understood by making reference to the following description taken together with the accompanying drawings, in which: FIGURE 1 is a block diagram of an echo generating system; FIGURE 2 is a block diagram of an echo cancellation system; FIGURE 3 is a block diagram of a previously known echo canceller with a variable center clipper; FIGURE 4 is a diagram illustrating the transfer function of the center clipper of the echo canceller of Fig. 3; FIGURE 5a-b are diagrams illustrating the different transfer functions of a non-linear processor in accordance with the present invention for two different cases at lowest possible attenuation; FIGURE 6a-b are diagrams illustrating the different transfer functions of a non-linear processor in accordance with the present invention for two different cases at low attenuation; FIGURE 7a-b are diagrams illustrating the different transfer functions of a non-linear processor in accordance with the present invention for two different cases at high attenuation; FIGURE 8a-b are diagrams illustrating the different transfer functions of a non-linear processor in accordance with the present invention for two different cases at highest possible attenuation; FIGURE 9 is a flow chart illustrating the operation of a non-linear processor performing a preferred em¬ bodiment of the method in accordance with the present invention; FIGURE 10 is a flow chart illustrating a method for determi¬ ning the dynamic threshold in accordance with a preferred embodiment of the present invention; and FIGURE 11 is a block diagram of an echo canceller operating in accordance with the echo cancellation method of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the following description elements performing the same or similar functions have been provided with the same reference designations . Fig. 1 illustrates the echo generating process in a telephony system. A subscriber A, called the far end subscriber below, is connected to a hybrid (a hybrid forms the interface between a four-wire and a two-wire connection, aε is well known in the art) over a two-wire line. Similarly a subscriber B, called the near end subscriber below, is connected to another hybrid over a two- wire line. The two-wire lines transfer both incoming and outgoing speech signals. Outgoing speech from far end subscriber A is transferred to near end subscriber B over the upper two-wire line in Fig. 1. Similarly outgoing speech from near end subscriber B is transferred to far end subscriber A on the lower two-wire line in Fig. 1. However, the lower two-wire line from subscriber B to subscriber A also contains an echo of outgoing speech from subscriber A, which the hybrid at subscriber B was not able to suppress completely. Similarly the upper two-wire line in Fig. 1 contains echo from outgoing speech from subscriber B. Fig. 2 illustrates how the echo back to subscriber A is cancelled at the near end side (a similar arrangement is provided at the far end side) . Input signal x(n) , where n denotes discrete time, represents speech from subscriber A. The input signal x(n) is attenuated by the hybrid, represented by a filter 10 with transfer function H(q -1 } , where q "1 represents the backward shift operator (q _1 x (n) =x(n-1) ) , and a summation unit 14, and the resulting echo signal s (n) is combined with the near end signal v(n) , which may or may not contain near end speech, in summation unit 14. The attenuation of filter 10 is represented by the echo path attenuation ERL (ERL = Echo Return Loss) . Thus, the resul¬ ting output signal y(n) contains both the near end signal and echo from the far end signal. Furthermore, input signal x(n) is also forwarded to an adaptive filter 12, which models the impulse response of the hybrid by adjusting its filter coefficients. The resulting estimate of echo signal s (n) is denoted s (n) . This estimate is, m a summation unit 16, subtracted from output signal y(n) (ERLE = Echo Return Loss Enhancement represents the obtained improvement m echo attenuation) , and the resulting error signal e (n) is forwarded to adaptive filter 12 for adjust¬ ment of the filter coefficients and to the two-wire line back to far end subscriber A. The coefficients of filter 12 may be adjusted in accordance with, for example, the NLMS algorithm (see [2] ) Since adaptive filter 12 may not completely remove the echo, the echo canceller may be supplemented by an echo suppressor. Figure 3 illustrates an arrangement of this type described in reference fl] . Here the echo suppressor has the form of a variable center clipper 18, which is controlled by the estimated echo signal s (n) The output signal e vcc (n) from center clipper 18 may be described by 0 \ e (n) j <τ =δ-|s(__) vcc Λn) (1) e(__) : \ e (n) I ≥τ where T IS the variable threshold of center clipper 18 and δ is a constant scaling factor. This transfer function is illustrated m Fig. 4. Thus, if signal e (n) falls within the center window it will be completely blocked, otherwise it will pass through center clipper 18 unaltered. However, threshold T depends on the value of s (n) . Thus, if s (n) has a low magnitude, threshold T will also be low. In this case |e(n) | may actually exceed the threshold if signal e (n) contains significant background noise from subscriber B. Thus, signal e vcc (n) may contain sporadic signals containing echo and background noise. In this previously known arrangement there is no way to avoid this situation, since scaling factor δ is a constant . The present invention will now be described with reference to Figs. 5-11. Briefly, the present invention differs from the prior art in three aspects, namely the non-linear processing of the residual signal e (n) , the determination of a dynamic threshold that may depend on both linear and non-linear errors, and the determina¬ tion of dynamic scaling factors in this threshold. Non-linear processing Instead of comparing residual signal e (n) directly to a threshold a power estimate R e (n) over a predetermined time period is formed, for example in accordance with R e {n) = p_? e (__-l) + (l-p) e 2 (n) (2) where weighting factor p is a constant between 0 and 1, for example 127/128. Furthermore, the power may also be estimated by summing the squares of, for example, the last 128 samples of e (n) , but equation (2) requires a less complex implementation. The non-linear processing is divided into two steps. In the first step the shape of a transfer function is defined in accordance with f sgn ( e {n) ) ■ min(]e(_ι) |, NL) : R e (n) < TH( n) t I n ) - . ' ^ / ( e (n) : R n) ≥ TH ( n) where TH(n) is a dynamic threshold (defined below) and NL is a measure of the background noise level from near end subscriber B. The background noise level NL may, for example, be estimated as the minimum value of the residual power R e over a long time interval . In the second step an attenuation A(n) is determined in accordan- ce with Here the attenuation is divided into 32 levels, but this is only an example. Both more and fewer levels are possible. Finally, compensated signal e c (n) of (3) is attenuated m accordance with e NL p (n) - 3 2 ~ 2 ( n ) e c (n) (5) Figures 5-8 illustrate this procedure for different attenuations. Figures 5a-8a illustrate the transfer function defined by the linear processing in accordance with the present invention for the case R e (n) < TH(n) . Similarly Figs. 5b-8b illustrate the transfer function for the case R e (n) ≥ TH(n) . As can be seen from these figures the shape of the transfer function depends on whether power estimate R e (n) exceeds or falls below threshold TH(n) . If the power estimate exceeds the threshold, the transfer function will simply be a linear function, represented by the straight lines in Figs 5b-8b On the other hand, f power estimate R e (n) falls below threshold TH(n) , the transfer function will be non-linear, with a linear part for amplitudes of e (n) below the noise level NL, and a constant part for values above the noise level NL. As can be seen from Figs. 5-8 the left hand figures are similar in shape, but have different attenuations. The same comment applies to the right hand figures The reason for this is that m equation (4) the attenuation A(n) depends on the attenuation A(n-l) of the previous sample. As may be seen from Figs. 5a-8a, as long as R e (n) < TH(n) the attenuation A(n) will increase, until signal e (n) will be completely suppressed when the attenuation A(n) has reached its maximum value (Fig. 8a) . An essential difference, as compared to Fig. 4, is that at this maximum attenuation all values of e (n) will be blocked, not only values that fall withm a center clipping window. Thus, m this case signals containing both residual echo and background noise will be suppressed even when these signals add constructively. On the other hand, as may be seen from Figs. 5b-8b, when R e (n) exceeds TH(n) output signal e NLP (n) will be a linearly scaled version of signal e (n) . If the above condition persists until the attenuation A(n) has reached zero level, signal e (n) will be unaltered Thus, m the two stationary cases (with either maximum or minimum attenuation A(n)) , signal e (n) will either be completely suppressed (Fig 8a) or unaltered (Fig. 5b) . Figs. 6 and 7 represent the transitional phase between these two stationary states. The double arrows in Figs. 5-8 illustrate the fact that the transfer function may change shape if power estimate R e (n) falls below threshold TH (n) for one sample and R e (n+1) exceeds threshold TH(n+l) for the next sample, or vice versa. Thus, depending on the result of this test condition, the shape of the transfer function may change abruptly, but the attenuation A(n) will be maintained at approximately the same level, and will only change slowly if the changed result of the test persists In order to avoid noise pumping effects introduced by this non¬ linear processing m situations with near end background noise, in accordance with a preferred embodiment of the present invention, comfort noise may be added to the compensated signal m accordance with where CN(n) represents this comfort noise (generated noise having the same level as NL) . Determining threshold TH(n) Threshold TH(n) that is used m the above described non-linear process may be defined as TH (n) = γ{ α (n) -R x (n) + β i n) -R B (n) } ( 7 ) where γ is a constant scaling factor, preferably m the range 1- 10 (γ=4 m a preferred embodiment) , c_(n) , β (n) are dynamic scale factors (defined below) , and R x (n) , R § (n) are defined in accordan¬ ce with R x (n) = X τ (n) x (n) (8) X(n) = [x (n) , x (n-l ) , , x (n-M+l ) ] τ R s (n) = pR § (n-l ) + ( 1 - ) § 2 (n) ( 9 ) Here X(n) is a vector of M (for example 128, 256, 512, I e the same as the length of filter 12) samples of input signal x(n) , and s (n) is the estimated echo. In equation (7) the first term m the parenthesis, c_(n)R x (n) , represents the linear error m the estimation of the echo signal (the difference between the estimated echo and the best possible linear echo estimate of this echo) The second term, β(n)R g (n) , represents non-linear errors introduced by the echo path, which cannot be modelled by a linear model (FIR filter) . An important feature of equation (7) is the scaling by scale factors α(n) and β (n) It is to be noted that these scale factors are dynamic (updated every sampling period) . The determination of these scale factors will be described in the next two subsec¬ tions. However, before these scale factors are further described, the non-linear process m accordance with the invention will be described with reference to the flow chart n Fig 9. In step 300 the sampling period is updated In step 310 scale factor α(n) is determined (will be described m next subsection) In step 320 power estimate R x (n) is calculated in accordance with equation (8) . In step 330 scale factor β (n) is determined (will be described with reference to Fig. 10 below) . In step 340 power estimate R g (n) is calculated in accordance with equation (9) . Step 350 calculates threshold TH(n) for the current sampling period in accordance with equation (7) . In step 360 power estimate R e (n) of residual signal e(n) is calculated in accordan¬ ce with equation (2) . Step 370 tests whether this power estimate falls below the current threshold. If this is the case, compensa- ted signal e c (n) and attenuation A(n) are calculated (steps 380 and 390, respectively) in accordance with the first parts of equations (3) and (4) , respectively. On the other hand, if R e (n) exceeds threshold TH(n) , compensated signal e c (n) and attenuation A(n) are calculated (steps 400 and 410, respectively) in accordance with the lower parts of equations (3) and (4) , respectively. Finally, signal e NLP (n) is calculated (step 420) in accordance with equation (6) . Thereafter the flow chart returns to step 300 and repeats the same process for the next sampling period. Determining scale factor o.(n) It has been found that for a FIR filter that is updated using the NLMS method a suitable algorithm for determining c. (n) is described by ( n) = ( l - ± ) a (n- l ) + μ 2 J ? "1 . . < 10 > N N-R x (n- 1 ) where Ν is the filter length of the adaptive filter in the echo canceller (for example 512 taps) and μ is a step length (for example 1/2, 1/4, 1/8) . Furthermore, it is assumed that c.(0)=l. However, for other estimation methods and/or filter structures c_(n)R x (n) should be replaced by an appropriate estimate of the power of the estimation error, see e.g. [3] for expressions of these errors. Determining scale factor S(n) Scale factor β (n) is determined by the correlation between residual signal e (n) and input signal X(n) . In order to determine this correlation a test variable T k (n) may be formed in accordan- ce with Ee 2 {n) x 2 (n-k) - Ee 2 ( n) Ex 2 { n-k) TΛn) = (11) Ee s (__) Ex 2 ( n-k) where E represents expected value Theoretically, this test variable should equal zero if no correlation exists between e (n) and x(n-k) , and be larger than zero otherwise. To simplify the procedure T k (n) may be computed only for those lags k that dominate the echo. Furthermore, since the estimated echo s (n) is a linear combination of delayed input signals x(n) , or where h(n) represents the filter coefficients of the echo canceller and N represents the length of filter 12, the test variable T may be computed using s (n) instead of x(n-k) , leading to the following expression Ee 2 (n) s 2 i n) - Ee 2 i n) Es 2 (n) Ti n) (13) Ee 2 i n) Es 2 ( n) For implementation reasons, it is furthermore advantageous to consider the equivalent expression Ti n) E e 2 ( n) _ \ι s 2 (__) (14) Ee 2 (__) ) Es 2 (__) Using the fact that Es 2 (n)=R g (n) equation (13) may be rewritten as This test variable T(n) does not give any explicit value for β (n) . Instead an average value of this test variable is used for an implicit updating of β (n) , which will be described with reference to Fig. 10. If the non-linear processor is inactive, i.e. R e (n) exceeds the threshold and there is no attenuation, no correlation should be found between e(n) and s (n) , which implies that the average of T(n) should equal zero. If this average is not zero, it indicates that jδ(n) is too small, and should be increased. Similarly, if no correlation is found (average of T(n)=0) when the non-linear processor is active, this indicates that (n) is too large and should be decreased. Figure 10 is a flow chart illustrating the procedure for determining β in) . This procedure is called from step 330 in the flow chart of Fig. 9. The procedure may be summarized as follows. A short time average T SA of T(n) is computed over a time period of 128 samples. This short time average is used for increasing β (n) (i.e. raising threshold TH(n)) . This corresponds to the left part of Fig. 10. A long time average T LA of T(n) is computed over 2048 samples. This long time average is used for checking that β (n) is not too large (i.e. threshold TH(n) is too high) . This part of the procedure is only executed if the non-linear processor is active (R e <TH) . The procedure starts in step 500. In step 510 T(n) is computed in accordance with equation (15) . Furthermore, a first counter CNT S1 is decremented. This counter runs between 1024 and 0 and prevents β in) from increasing too rapidly (only one level of 3 dB every 1024 sample) . Step 520 tests whether R e >αR x +2|βR s . If this condition is fulfilled and there is no obvious double talk situation, i.e. the condition 2R s >Ry is not fulfilled, the procedure performs step 530. In step 530 short time average T SA is updated, and a second counter CNT S2 is decremented. Counter CNT S2 runs from 128 to 0 and assures that β (n) is increased only when T SA has been completely filled with new samples of T(n) . The next step, step 540, tests whether both counters have been decremented to zero. If this is the case, step 550 tests whether the calculated short time average T SA exceeds a first limit UL (a suitable value for UL is 1.2) . If this is the case step 560 increases β by 3 dB and resets counters CNT S1 , CNT S2 to 1024 and 128, respectively. Step 560 then also sets a long time average T ω and a third counter CNT L to zero and proceeds to step 570. Step 570 is also performed if the tests in steps 520, 540 and 550 fail. Test 570 tests whether the non-linear processor is active. If so, step 580 tests whether R e exceeds αR y +,βR s . If so, T(n) is added to long time average T u . If not, a constant LL is added to T ω . Thereafter the third counter CNT L is incremented in step 610. Step 620 tests whether counter CNT L has reached the value 2048 (2048 samples of T(n) have been added) . If so, step 630 tests whether the long time average is less than or equal to the constant LL (a suitable value for LL is 0.4) . If this is the case jβ is decremented by 3 dB m step 640. Otherwise β is left unchanged. Finally T ω and CNT L are reset to zero in step 650. Thereafter the procedure returns m step 660. If tests 570, 620 fail, the procedure will not reduce β and will proceed directly to step 660. In the presently preferred embodiment of the invention the non- linear part of the dynamic threshold is represented as β(n)R g (n) . However, a similar procedure may be based on other quantities than R s (n) , for example quantities R y (n) or R x (n) calculated m analogy with equation (9) . If computational complexity is a concern, it is even possible to base a threshold TH(n) on the simple expression β(n)s(n) (where β(n) is determined in accordance with the principles described with reference to equations (11) -(15) ) . In such a case this threshold could be compared directly to the amplitude of residual signal e (n) . A block diagram of an apparatus that performs the method m accordance with the present invention will now be described with reference to Fig 11. A non-linear processor 20 receives residual signal e(n) and outputs the processed signal e NLP (n) . Output signal e NLP (n) is computed m accordance with equations (3) -(6) . An estimator 22 estimates the power of the linear error m accordance with the first term of equation (7) by using signals x(n) and e(n) Similarly, an estimator 24 computes the second term of equation (7) by using signals e (n) and s (n) . Threshold TH(n) is computed in element 26 in accordance with equation (7) . An element (28) computes power estimate R e (n) in accordance with equation (2) A comparator 30 compares R e (n) to TH(n) , and the output signal from comparator 30 determines the shape and attenuation of output signal e NLP (n) . Preferably the functions of elements 20-30 are performed by a microprocessor or a micro/signal processor combination It will be understood by those skilled in the art that various modifications and changes may be made to the present invention without departure from the spirit and scope thereof, which is defined by the appended claims. REFERENCES [1] US, A, 4 577 071, assigned to British Telecommunications [2] D.T.M. Slock, "On the Convergence Behavior of the LMS and the Normalized LMS Algorithms", IEEE Transactions on Signal Processing, 41 (9) :2811-2825, September 1993 [3] L. Ljung and T. Sδderstrόm , "Theory and Practice of Recursive Identification", The MIT Press, Cambridge, Massachusetts, 1983, pp 12-16, 88-96

Claims: CLAIMS 1. An echo cancellation method using a model of an echo path for forming a residual signal, characterized by determining a residual power estimate of said residual signal; determining a non-linear error power estimate of remaining non-linear error parts of said residual signal; determining a dynamic threshold that depends on said non¬ linear error power estimate; comparing said residual power estimate to said dynamic threshold; and attenuating said residual signal if said residual power estimate falls below said dynamic threshold. 2. The method of claim 1, characterized by determining a linear error power estimate of remaining linear error parts of said residual signal; and determining a dynamic threshold that depends on both ' said linear error power estimate and said non-linear error power estimate. 3. The method of claim 1 or 2 , characterized by increasing the attenuation each time said residual power estimate falls below said dynamic threshold until said residual signal is completely suppressed. 4. The method of claim 3, characterized by attenuating said residual signal as a non-linear function of the amplitude of said residual signal each time said residual power estimate falls below said dynamic threshold and as a linear function of the amplitude of said residual signal each time said residual power estimate does not fall below said dynamic threshold. 5. The method of claim 4, characterized by said non-linear function being a linear function for amplitudes of said residual signal that are below an estimated noise level and a constant function for amplitudes that exceed said noise level. 6. The method of claim 5, characterized said dynamic threshold being formed by the sum of said linear and non-linear error power estimates . 7. The method of claim 6, characterized by said dynamic threshold being formed in accordance with the formula γ{α in) -R x (n) +β i n) -R s in) } where R x (n) is a power estimate of an input signal to said echo path, R s (n) is a power estimate of an output signal from said echo path, α(n) and β(n) are continuously updated scale factors, and γ is a constant scale factor. 8. An echo canceller using a model of an echo path for forming a residual signal, characterized by means (28) for determining a residual power estimate of said residual signal; means (24) for determining a non-linear error power estimate of remaining non-linear error parts of said residual signal; means (26) for determining a dynamic threshold that depends said non-linear error power estimate; means (30) for comparing said residual power estimate to said dynamic threshold; and means (20) for attenuating said residual signal if said residual power estimate falls below said dynamic threshold. 9. The apparatus of claim 8, characterized by means (22) for determining a linear error power estimate of remaining linear error parts of said residual signal; and means (26) for determining a dynamic threshold that depends on both linear error power estimate and said non-linear error power estimate.

Inventors: ERIKSSON ANDERS, KARLSEN JOHNNY, ERIKSSON, ANDERS, KARLSEN, JOHNNY
Applicants: ERICSSON TELEFON AB L M, ERIKSSON ANDERS, KARLSEN JOHNNY, ERIKSSON, ANDERS, KARLSEN, JOHNNY, TELEFONAKTIEBOLAGET LM ERICSSON
Application year: 1996
Main classification: H04B3
IPC codes: H04B3, H04M1