Patent Publication Number: US-6035034-A

Title: Double talk and echo path change detection in a telephony system

Description:
BACKGROUND OF THE INVENTION 
     1. Technical Field of the Invention 
     The present invention relates in general to the telecommunications field and, in particular, to echo cancellation in telephony systems. 
     2. Description of Related Art 
     &#34;Echo&#34; is a phenomenon that can occur in a telephony system whenever a portion of transmitted speech signal energy is reflected back to a sender. These reflections are caused by impedance mismatches in analog portions of the telephony network. There can be many different sources of echo, such as, for example, a hybrid circuit that converts a 4-wire line to a 2-wire line in a Public Switched Telephone Network (PSTN) subscriber interface, or acoustical cross-talk in a mobile radiotelephone. The presence of echo along with a substantial delay (e.g., physical distance or processing delay) can severely degrade the quality of the speech signals being processed. 
     An echo canceller is a device that is commonly used in telephony systems to suppress or remove echoes in long distance traffic. For example, in cellular Public Land Mobile Networks (PLMNs), echo cancellers are used in mobile services switching centers (MSCs) to suppress or remove echoes in speech traffic. Echo cancellers are also used in mobile radiotelephones and &#34;handsfree&#34; telephone equipment to compensate for acoustical echoes. A general description of an existing echo cancellation technique can be found in the paper entitled: &#34;A Double Talk Detector Based on Coherence&#34; by Gansler et al, Signal Processing Group, Dept. of Elec. Eng. and Comp. Science, Lund University, Sweden. 
     FIG. 1 is a simplified schematic block diagram of a conventional echo canceller (10). The main component of such an echo canceller is an adaptive finite-impulse-response (FIR) filter 12. Under the control of an adaptation algorithm (e.g., in software), filter 12 models the impulse response of the echo path. A non-linear processor (NLP) 14 is used to remove residual echo that may remain after linear processing of the input signal. A double-talk detector (DTD) 16 is used to control and inhibit the adaptation process, when the echo signal to &#34;near end&#34; signal ratio is of such a value that no additional improvement in the echo path estimation can be obtained by further adaptation of filter 12. The block denoted by 18 represents the echo source in the telephony system which generates the &#34;desired&#34; signal, y(t), as a function of the &#34;far end&#34; signal, x(t), and the &#34;near end&#34; signal, v(t). 
     The quality of the echo path estimation made is determined primarily by the step size used in the adaptation algorithm. In order to obtain a small estimation error, a small step size can be used. However, one result of using a small step size is a slow adaptation rate, and fast adaptation is desired during the initial adaptation stages. A practical trade-off is to use a large step size during the initial adaptation stage (for a high adaptation rate), and after a prescribed period of time, reduce the step size (to obtain a low estimation error). 
     Any one of a number of existing approaches can be used to solve a double talk detection problem. A standard approach uses an algorithm based on a comparison of signal levels between the &#34;far end&#34; signal, x(t), and the &#34;desired&#34; signal, y(t), shown in FIG. 1. These signal levels, x L  and y L , can be measured by an exponential &#34;windowing&#34; technique and expressed as: 
     
         x.sub.L (t+1)=(1-τ)x.sub.L (t)+τ|x(t)|(1) 
    
     
         y.sub.L (t+1)=(1-τ)y.sub.L (t)+τ|y(t)|(2) 
    
     Double talk is assumed to be present if the &#34;desired&#34; signal level, y L  (t) , exceeds the maximum &#34;far end&#34; signal level multiplied by the expected hybrid circuit attenuation, inside a window &#34;length&#34; that is equal to the filter &#34;length&#34;. In other words, double talk is assumed to be present if: 
     
         y.sub.L (t)≧α(max){x.sub.L (t), . . . ,x.sub.L (t-N)}(3) 
    
     Typically, a hybrid circuit with 6 dB attenuation is assumed, so α is equal to 1/2. 
     Another approach used to solve a double talk problem is to determine if there is any linear dependence between the &#34;far end&#34; and &#34;desired&#34; signals. If there is a large amount of linear dependence between the two signals, it is assumed that the &#34;desired&#34; signal is dominated by echo, and the FIR filter (12) adaptation is advanced. If little or no linear dependence between the two signals is found, then it is assumed that double talk is present and the FIR filter (12) adaptation is inhibited. 
     An important performance characteristic of a double talk detector is that it should be capable of distinguishing between actual double talk and a change in the echo path impulse response (referred to hereafter as &#34;echo path change&#34;). Notably, both double talk and echo path changes appear as increases in residual echo power. However, the two results require opposite adaptation actions. For example, when double talk is present, the adaptation process should be inhibited, but when the echo path is changed, the adaptation rate should be increased so the FIR filter (12) can quickly model the new signal environment. Unfortunately, the existing double talk detection approaches do not provide useful information about echo path changes. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to distinguish between double talk and echo path changes in a telephony network. 
     It is another object of the present invention to provide reliable and useful information about double talk and echo path changes for echo cancellation purposes. 
     It is yet another object of the present invention to provide a computationally effective method for providing an echo canceller with useful information about double talk and echo path changes for echo cancellation purposes. 
     It is still another object of the present invention to provide a digital method for implementing double talk and echo path change detection. 
     In accordance with the present invention, the foregoing and other objects are achieved by a double talk and echo path change detector that determines whether a residual signal is dominated by echo or by a &#34;near end&#34; signal. In order to make this determination, a first measure of linear dependency is computed between the residual signal and an echo estimate, and a second measure of linear dependency is computed between the residual signal and a desired signal. The two results are compared with each other, and if they are of about the same order, no further action is needed. However, if the comparison determines that the dependence between the residual signal and the desired signal is much stronger than the dependence between the residual signal and the echo estimate, the present detector assumes that double talk has been detected and an appropriate signal denoting that result is output. On the other hand, if the dependence between the residual signal and the desired signal is much weaker than the dependence between the residual signal and the echo estimate, the detector assumes that an echo path change has been detected and an appropriate signal denoting that result is output. As such, a reliable and computationally effective method and apparatus are provided to give an echo canceller useful information about double talk and echo path changes that have occurred. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     A more complete understanding of the method and apparatus of the present invention may be had by reference to the following detailed description when taken in conjunction with the accompanying drawings wherein: 
     FIG. 1 is a simplified schematic block diagram of a conventional echo canceller; and 
     FIG. 2 is a schematic block diagram of a double talk and echo path change detector, which can be used to implement the apparatus and method of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE DRAWINGS 
     The preferred embodiment of the present invention and its advantages are best understood by referring to FIGS. 1-2 of the drawings, like numerals being used for like and corresponding parts of the various drawings. 
     Essentially, in accordance with the present invention, a double talk and echo path change detector is provided, which functions based on making a determination about whether the residual signal, e(t), is dominated by echo or the &#34;near end&#34; signal. In order to make this determination, a measure of linear dependency is computed between the residual signal, e(t), and the echo estimate, s (t), on the one side, and between the residual signal, e(t), and the desired signal, y(t), on the other side. The two resulting measurements are then compared with each other, and if they are of about the same order, no further action is taken. However, if the comparison determines that the dependence between e(t) and y(t) is much stronger than the dependence between e(t) and s (t), then double talk is detected. On the other hand, if the dependence between e(t) and y(t) is much weaker than the dependence between e(t) and s (t), then an echo path change is detected. Albeit, these determinations are made only if the signals being processed have a significant amount of power. 
     A linear dependence measurement can be obtained by considering the coherence function, γ 2   xy  (f) between the two stationary random processes, x(t) and y(t), which is defined by: ##EQU1## where S xy  (f)=1/T*E[X*(f)Y(f)] is the cross-spectral density between x(t) and y(t), and S xx  (f) and S yy  (f) are the corresponding auto-spectral densities. The coherence function is a measure of a possible linear relationship between the stationary random processes involved, and it is bounded between zero and one. If a perfect linear relationship exists between those stationary random processes for some frequency, then the coherence will be equal to unity at that frequency. If no such linear relationship exists, then the coherence function will be equal to zero. A scalar linear dependence measure can be obtained by computing a mean value for the coherence function. 
     An approach that can be used to detect echo path changes is based on the observation that under the principle of orthogonality, there can be no linear relationship between the residual signal, e(t), and the echo estimate, s (t), if the echo estimate is produced by an optimal estimator and, therefore, the coherence function is equal to zero. Using an adaptive algorithm with a FIR filter to model the echo path, the coherence function will be close to zero if the adaptive algorithm is converged. However, if an echo path change occurs, a strong linear relationship will appear between the signals, e(t) and s (t), and therefore, the coherence function will be large. 
     Considering the coherence between the desired signal, y(t), and the residual signal, e(t), if the adaptive algorithm is converged and the &#34;near end&#34; signal, v(t), is weak, the coherence function will be small. If the &#34;near end&#34; signal is strong, then the residual signal is dominated by the &#34;near end&#34; component, v(t), and the coherence function will be close to unity. Notably, if the FIR filter&#39;s coefficients are initialized to zero, then a linear relationship will exist between the residual signal and the desired signal during the initial adaptation stage. 
     In order to detect both double talk and echo path changes, the following test variable (d) can be used: ##EQU2## where f 1  and f 2  are the borders of the frequency band of interest. The value of the test variable, d, will be close to zero during normal operation of the detector (e.g, no double talk or echo path change detected). However, test variable d will be close to unity when double talk is detected, and it will go negative if an echo path change is detected. Consequently, in accordance with the present invention, the adaptive algorithm used for a FIR filter in an echo canceller (e.g., filter 12) can compare the test variable, d, with two predetermined threshold levels, th1 and th2, where 0&lt;th1&lt;1, and -1&lt;th2&lt;0. If the test variable d&gt;th1, then it is assumed that double talk has been detected. If d&lt;th2, then it is assumed that an echo path change has been detected. The absolute values of th1 and th2 can be used to control the sensitivity of the detector. In the preferred embodiment, the threshold level are set at th1=0.8 and th2=-0.5. 
     FIG. 2 is a schematic block diagram of a double talk and echo path change detector, which can be used to implement the apparatus and method of the present invention. Detector 100 includes a first coherence measurement unit 102 and second coherence measurement unit 104. First coherence measurement unit 102 computes the linear dependency between the residual signal, e(t), and the echo path estimate, s (t). Second coherence measurement unit 104 computes the linear dependency between the residual signal, e(t), and the desired signal, y(t). The output of each of the two measurement units is compared at comparator 106. This comparison is accomplished in accordance with Equation 5 described above. The output of comparator 106 is coupled to an input of a first test unit 110 and a second test unit 112. First test unit 110 compares the output value (e.g., test variable d) of comparator 106 with a first predetermined threshold level, th1. Second test unit 112 compares the output value (d) of comparator 106 with a second predetermined threshold value, th2. As described above, the value of test variable, d, is close to zero during a normal operation, and no filter adaptation occurs. If, however, the value of test variable, d, is greater than threshold level th1, then first test unit 110 outputs a signal (preferably to an appropriate stage in echo canceller 12) denoting that double talk has been detected. Consequently, the adaptive algorithm for the FIR filter (12) is inhibited. 
     If the value of test variable, d, is less than threshold level th2, then second test unit 112 outputs a signal (preferably to an appropriate stage in echo canceller 12) denoting that an echo path change has been detected. Consequently, the adaptive algorithm for the FIR filter (12) is advanced. A timer 108 is used to decouple the output of comparator 106 to ensure that the filter adaptation process occurs during the initial test period. For this embodiment, timer 108 is set for about 20 times the &#34;length&#34; of the FIR filter used. 
     In a digital implementation of the preferred embodiment, the coherence functions can be estimated by replacing the mathematical expectations with time averages, and computing the spectra by using discrete Fourier transforms (or some other orthogonal transform). The integration performed above in Equation 5 can be replaced by summation over discrete frequencies. 
     Specifically, since a detected echo path change is compensated for by an adaptive algorithmic process over a period of time, it is preferable to select relatively short window lengths. Consequently, for the preferred embodiment, the adaptive algorithm computes the coherence functions using an 8-point Fast Fourier Transform (FFT). However, the present invention is not intended to be limited to any specific FFT value, and any appropriate value (e.g., any other positive value) can be used instead of &#34;8&#34;. Preferably, positive values should be used that allow the use of FFT algorithms (e.g., powers of 2). In this embodiment, time averaging is performed over 64 consecutive transforms, which overlap in seven samples (using a sliding rectangular window). Notably, however, other types of windows may be used for averaging (e.g., an exponential window). 
     In solving these echo cancellation problems, the signals involved are real signals, and consequently, the real parts of their Fourier transforms are symmetric and the imaginary parts are asymmetric. Consequently, for this embodiment, an N×N transform matrix for N=8 can be defined as: ##EQU3## where c nk  =cos 2πnk/N and s nk  =sin 2πnk/N. Substituting these values for c nk  and s nk  in the matrix of Equation 6, the following values are obtained: ##EQU4## where c=√2/2. 
     The transform of the last N samples of signal x, x(t)=[x(t), . . . , x(t-N+1)] T , is given by a matrix vector multiplication Fx(t). The discrete coherence function can be defined in this transform domain, by replacing S xy  with diagonal elements of: 
     
         U.sub.xy (t)=E[diag(Fx(t)diag(Fy(t)))],                    (8) 
    
     where the diag() operator forms a diagonal matrix from the argument vector. 
     Denoting the vector of the diagonal elements of U xy  (t) by u xy  (t), an element of the discrete coherence vector can be defined as: ##EQU5## where a is a regularization constant, which controls errors in division when the denominator otherwise is small. The regularization constant can be a design variable that allows a measure of control over the detector&#39;s sensitivity. The value of the regularization constant is preferably comparable to the fourth power of the signal levels expected. 
     The coherence vector described by Equation 9 results from an element-wise division of vectors, the elements of which have dimensions of the fourth powers of the corresponding signals. In other words, the dynamic range of these elements is four times greater than that of the signals involved. This result may be undesirable if the above-described math is to be implemented with fixed point arithmetic. Consequently, the following normalization vector may be used instead: ##EQU6## The value of the regularization constant, a 1 , should be selected to be comparable to the power levels of the signals expected to be involved. 
     Although a preferred embodiment of the method and apparatus of the present invention has been illustrated in the accompanying Drawings and described in the foregoing Detailed Description, it will be understood that the invention is not limited to the embodiment disclosed, but is capable of numerous rearrangements, modifications and substitutions without departing from the spirit of the invention as set forth and defined by the following claims.