METHOD AND APPARATUS FOR COMPUTING MEASURES OF ECHO

Abstract: In methods and apparatus for computing measures of echo of a far end signal in a near end signal, the evolution over time of frequency spectra of the near end and far end signals are compared to compute a measure of the echo. A far end spectrum of the far end signal and a near end spectrum of the near end signal are determined for each of a plurality of successive time intervals. A respective measure of correlation is determined for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag. The measures of correlation are compared to determine a maximum measure of correlation which can be used as a measure of echo. The echo measure computation technique is particularly suitable for use in echo suppressors for digital cellular telephony systems, but has other applications.

Description: METHOD AND APPARATUS FOR COMPUTING MEASURES OF ECHO Field of the Invention This invention relates to methods and apparatus for computing measures of echo in telecommunications systems. Background of the Invention Echo is a common problem in telecommunications systems. Echo can be very annoying to users, particularly in telecommunications systems having relatively long transmission delays, as for example satellite telecommunications systems and cellular radio telecommunications systems. Consequently, several methods for suppressing echo have been developed. In one type of known echo suppression techniques, received signals are first processed to determine whether echo is present. If echo is detected, the received signal is processed to suppress the echo. If no echo is detected, no echo suppression is applied. Conventional echo detection techniques rely on measurements of the signal energy of far end (transmitted) and near end (received) signals to determine whether echo is present. Unfortunately, these echo detection techniques are not accurate enough to provide good performance in some applications. Summary of the Invention An object of this invention is to provide novel methods and apparatus for computing measures of echo in telecommunications systems. One aspect of the invention provides a method for computing a measure of echo of a far end signal in a near end signal. The method comprises: (1) determining a far end spectrum of the far end signal for each of a plurality of successive time intervals; (2) determining a near end spectrum of the near end signal for each of a plurality of successive time intervals; (3) for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag, determining a respective measure of correlation of the near end spectrum to the far end spectrum; and (4) comparing the measures of correlation to determine a maximum measure of correlation. The method according to the invention relies on a comparison of the evolution over time of the frequency spectra of the near end and far end signals to compute a measure of the echo. The maximum measure of correlation may be compared to a predetermined value, and echo detection may be declared when the maximum measure of correlation exceeds the predetermined value. Alternatively, the maximum measure of correlation may be used as a non- binary measure of the echo. The near and far end spectra may be near and far end spectral envelopes, i.e., smoothed spectra as generated, for example, by time averaging spectra generated by Discrete Fourier Transforms (DFTs). Alternatively, the far end signal may be an LPC-encoded speech signal, and the step of determining a far end spectral envelope for each of a plurality of successive time intervals may comprise deriving the spectral envelope from LPC coefficients and excitation parameters of the LPC-encoded speech signal for each of the successive time intervals. Similarly, the near end signal may be an LPC-encoded speech signal, and the step of determining a near end spectral envelope for each of a plurality of successive time intervals may comprise deriving the spectral envelope from LPC coefficients and excitation parameters of the LPC-encoded speech signal for each of the successive time intervals. In this case, the echo measure computation technique may be used at points in the telecommunications system where there is no access to the speech signal itself, but only access to the LPC- encoded speech signal. Consequently, the echo measure computation technique may be applied at locations other than the speech encoder or the speech decoder without requiring extra decoding and encoding operations. Thus, the technique can be particularly advantageous in codec bypass configurations of cellular radio telecommunications systems where there is access only to the encoded signal in the network portion of the telecommunications system. Moreover, this variant of the invention can be implemented with little complexity because the LPC coefficients, which are already available, contain the required frequency domain information regarding the near end and far end signals. The method may further comprise estimating an echo delay upon detection of echo by determining the time lag corresponding to the maximum measure of correlation. The method may also comprise estimating an echo return loss upon detection of echo by determining a ratio of a near end signal energy value to a far end signal energy value, the near end signal energy value being associated with a first time interval and the far end signal energy value being associated with a second time interval, the second time interval lagging the first time interval by an echo delay associated with the first time interval. The estimated echo delay and echo return loss can be used to determine what signal processing should be used to suppress the echo most effectively. Another aspect of the invention provides apparatus for computing a measure of echo of a far end signal in a near end signal. The apparatus comprises a processor and a memory, the memory storing instructions for execution by the processor. The instructions comprise: (1) instructions for determining a far end spectrum of the far end signal for each of a plurality of successive time intervals; (2) instructions for determining a near end spectrum of the near end signal for each of a plurality of successive time intervals; (3) instructions for determining a respective measure of correlation of the near end spectrum to the far end spectrum for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag; and (4) instructions for comparing the measures of correlation to determine a maximum measure of correlation. Yet another aspect of the invention provides a processor- readable storage medium for storing instructions executable by a processor. The storage medium stores an instruction set comprising: (1) instructions for determining a far end spectrum of a far end signal for each of a plurality of successive time intervals; (2) instructions for determining a near end spectrum of a near end signal for each of a plurality of successive time intervals; (3) instructions for determining a respective measure of correlation of the near end spectrum to the far end spectrum for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag; and (4) instructions for comparing the measures of correlation to determine a maximum measure of correlation. Brief Description of the Drawings Embodiments of the invention are described below by way of example only with reference to accompanying drawings, in which: Figure 1 is a block schematic diagram of a telecommunications system including an echo measure computation device according to an embodiment of the invention; Figures 2A, 2B and 2C are flow charts showing steps in a method for echo measure computation according to an embodiment of the invention; and Figure 3 is a flow chart showing steps in a method for applying echo suppression. Detailed Description of Embodiments Figure 1 is a block schematic diagram of a telecommunications system including an echo measure computation device 100 according to an embodiment of the invention. The computation device 100 comprises a processor 110 and a processor-readable storage medium in the form of a memory 120 which stores instructions for execution by the processor 110. The processor 110 has a near end signal input port 112 on which it receives an LPC-encoded near end signal, and a far end signal input port 114 on which it receives an LPC- encoded far end signal. The processor 110 executes instructions stored in the memory 120 to process the near end and far end signals so as to compute measures of echo of the far end signal in the near end signal as described below. Figures 2A, 2B and 2C are flow charts showing steps performed by the processor 110 according to the instructions stored in the memory 120 to compute measures of echo of the far end signal in the near end signal. For each successive 20 ms time interval, the processor 110 receives a frame of LPC-encoded information for the near end signal, and a frame of LPC-encoded information for the far end signal. The processor 110 executes stored instructions to derive a set of LPC coefficients and a set of excitation parameters from each frame of encoded information. The processor 110 executes further stored instructions to calculate a near end spectrum, S^(fi,k) for M values of // between about 100 Hz and 2 kHz, for the frame corresponding to time k from the LPC coefficients and the excitation parameters for the frame of the near end signal corresponding to time k. Similarly, the processor 110 executes stored instructions to calculate a far end spectrum, Sp(fι,k) for M values of f{ between about 100 Hz and 2 kHz, for the frame corresponding to time k from the LPC coefficients and the excitation parameters for the frame of the far end signal corresponding to time k. M is typically 8 to 12. The far end spectra for the past 20 ms time intervals are stored in the memory for use in calculations described below. L is selected according to an expected value of echo delay. For example, if the expected echo delay is from 240 ms to 360 ms, L would be at least 18. (The methods used to derive spectra from LPC coefficients and excitation parameters depend on the specific LPC coding scheme used, and are well known to those skilled in the LPC coding art.) The processor 110 also executes stored instructions to calculate a near end signal energy R (k) from the LPC coefficients and the excitation parameters for the frame of the near end signal corresponding to time k, and a far end signal energy Rp (k) from the LPC coefficients and the excitation parameters for the frame of the far end signal corresponding to time k. The near end signal energies are averaged over a predetermined number of frames, typically 2 or 3 frames. The far end signal energy values are also averaged over the predetermined number of frames, and the far end signal energy averages for the past L 20 ms time intervals are stored in the memory 120 for use in calculations described below. (The methods used to derive signal energies from LPC coefficients and excitation parameters depend on the specific LPC coding scheme used, and are well known to those skilled in the LPC coding art.) The processor 110 executes stored instructions to calculate exponential averages of the near end and far end spectra according to the following equations: S^(f t ,k) = λ.- F (f k-l) + (l-λ.)-S F (f k) fori = l toM Eql Sfø,*) = λ-S N ~ (f i ,k-l) + {l-λ l )-S N {f i ,k) fori = l toM Eq2 sf(/„*) = λ.-SJr(f i ,k-l) + (l-λ l )-S F (f l ,k) fori = l toM Eq3 (fi.k) = Λ.-^( .,Λ-l) + (l-λ 1 )-5^,Λ) fori = l toM Eq4 λ. is typically 0.5. An exponential average of cross-spectral components is also calculated according to the following equation: s F 2 N {fΛ = λ l -s FN {f l ,k-\) l +{ι-λ l s F {f i ,k-ι)-s N {f i ,k) for i - 1 to M and I = L^,!^ + 1,..., Eq 5 where / denotes a time lag, 2^ is a minimum expected echo path delay, and L is a maximum expected echo path delay, each of these quantities representing an integer number of 20 ms time intervals. The processor 110 executes further stored instructions to calculate variances of the near end spectra and the far end spectra according to the following equations: var(S N (f.,kj) = l% (f.,k) - S?{f.,k) for i = l to M Eq 6 Msr(S F (f„k)) ~ F (f„k) - S; 2 {f.,k) for i ^ 1 to M (store from k-L to k) Eq 7 The far end signal variances for the past L 20 ms time intervals are stored in the memory 120 for use in calculations described below. The far end signal variances are divided into two groups. Group A contains the variances calculated for a sub-band of frequencies between 200 Hz and 920 Hz, a frequency range which generally contains a first formant frequency in a speech signal. The variances in Group A are compared, the maximum variance is determined and the frequency corresponding to the maximum variance is designated f A . Group B contains the variances calculated for a sub-band of frequencies between 1160 Hz and 1800 Hz, a frequency range which generally contains a second formant frequency in a speech signal. The variances in Group B are compared, the maximum variance is determined and the frequency corresponding to the maximum variance is designated /„. The processor 110 executes further stored instructions to calculate a covariance at each of frequencies / Λ and f B for each time lag in the range between the minimum echo delay and the maximum echo delay according to the following equation: 2/ , (sϊ s (fΛ -s F {f l ,k-ι ss(f l ,k)) 1 var(S f (^* -/))- var(S w ( ,*)) The processor 110 executes further stored instructions to average the covariances at the two frequencies to derive an average covariance for each time lag between , and L as follows: 2 C*) = ∑ ?('.*) l = £.,l_ +l.....L Eq9 ^ i=A.B The processor 110 then executes stored instructions to determine the maximum value of the average covariance: PLM - r( 2 ( .*)) = P 2 (Λ*) EqlO and the time lag /° corresponding to the maximum value of the average covariance. The maximum value of the average covariance is a measure of echo of the far end signal in the near end signal which may be used as described below. The processor 110 executes further instructions to compare the maximum value of the average covariance to a predetermined value (typically about 0.1). If the maximum value of the average covariance exceeds the predetermined value, the processor 110 declares frame k of the near end signal to contain echo. When frame k of the near end signal is declared to contain echo, the processor 110 executes further stored instructions to calculate an exponential average of the time lag /"corresponding to the maximum value of the average covariance according to the following equation: D(k) - λ. - D{k - l) + (l - λ_) - l°(k) Eq ll to estimate an echo delay D(k)- λ is typically about 0.9 to 0.95. When frame k is declared to contain echo, the processor 110 also executes further stored instructions to count consecutive echo frames. If the maximum value of the average covariance exceeds a predetermined value (which may exceed the predetermined value used for declaring echo in the first instance to provide even greater certainty that echo is present), the number of consecutive echo frames exceeds a predefined minimum number (typically 2 or 3) and the average far end signal energy at the time interval lagging the present time interval by the echo delay exceeds a predetermined threshold, an echo return loss (ERL) is estimated from the average signal energies calculated above according to the following equation: ERL(k) = Λ 2 - ER ( - - l) + (l - A 2 ) - -^ ) / Eq l2 where /?#(£) and RF - I 0 ) are the averages of the near and far end energies respectively. The echo delay, D(k), and the echo return loss, ERL(k), are used in further operations of the processor 110 to determine the most effective echo suppression treatment as shown in Figure 3. If the echo delay, D(k), is less than a threshold delay, typically 10 msec, no echo suppression is applied. If the echo return loss, ERL(k), is greater than a threshold loss, typically 45-50 dB for an echo delay greater than 50 msec, no echo suppression is applied. But if the echo delay, D(k), exceeds the delay threshold, and the echo return loss, ERL(k), is below the loss threshold, the processor 110 executes stored instructions to replace the signal for frame k with comfort noise. In a sophisticated implementation, the loss threshold may be a function of the echo delay, D(k), for the current frame. If the maximum value of the average covariance does not exceed the predetermined value, the processor 110 declares frame k of the near end signal to be echo-free, and takes no action to suppress echo in that frame of the near end signal, to calculate echo delay or to calculate echo return loss. The implementations described above can be modified without departing from the principles of the invention. For example, the specific parameter values exemplified above, and the particular methods used for averaging over time, calculating near end and far end spectra, calculating measures of correlation for the near and far end spectra can be substituted with other parameter values and methods. Indeed, at least some such modifications are likely to be appropriate if the invention is applied to a different LPC coding scheme. The parameters given above are likely to be most appropriate for the VSELP codec specified by the IS-54 standard. In the embodiment described above, the computed measure of echo is used to drive echo suppression. However, the computed measure of echo may also be used in a variety of other applications in which measures of echo are useful including, but not limited to, sparse echo cancellation. In the embodiment described above, the maximum value of the average covariance is compared to a predetermined value to determine whether detectable echo is present. The maximum value of the average covariance could be compared to a plurality of predetermined values to estimate the relative level of echo. The relative level of echo could then be used to determine what further signal processing steps are appropriate, different signal processing being performed for different levels of echo. Indeed, the maximum value of the average covariance could itself be used as a measure of the level of echo. In the embodiment described above, the maximum values of the covariance are selected from within two frequency sub-bands containing the first and second formant frequencies and averaged. This approach adds to the robustness of the technique at a reasonable level of computational complexity by emphasizing characteristics measured at frequencies where signal to noise ratios are expected to be maximized. More frequency sub- bands could be used to capture the characteristics at other formant frequencies. These and other modifications are within the scope of the invention as defined by some or all of the claims below.

Claims: We Claim: 1. A method for computing a measure of echo of a far end signal in a near end signal, comprising: determining a far end spectrum of the far end signal for each of a plurality of successive time intervals; determining a near end spectrum of the near end signal for each of a plurality of successive time intervals; for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag, determining a respective measure of correlation of the near end spectrum to the far end spectrum; and comparing the measures of correlation to determine a maximum measure of correlation. 2. A method as defined in claim 1, further comprising declaring an echo to be detected when the maximum measure of correlation exceeds a predefined value. 3. A method as defined in claim 1, wherein: the step of determining a far end spectrum comprises determining a far end spectral envelope; the step of determining a near end spectrum comprises determining a near end spectral envelope; and the step of determining measures of correlation comprises determining measures of correlation of near end spectral envelopes to far end spectral envelopes. 4. A method as defined in claim 3, wherein: the far end signal is an LPC-encoded speech signal, and the step of determining a far end spectral envelope for each of a plurality of successive time intervals comprises deriving said spectral envelope from LPC coefficients and excitation parameters of the LPC-encoded speech signal for each of said successive time intervals; and the near end signal is an LPC-encoded speech signal, and the step of determining a near end spectral envelope for each of a plurality of successive time intervals comprises deriving said spectral envelope from LPC coefficients and excitation parameters of the LPC-encoded speech signal for each of said successive time intervals. 5. A method as defined in claim 1, wherein each step of determining a respective measure of correlation of a near end spectrum to a far end spectrum comprises determining a cross-covariance of the near end spectrum to the far end spectrum for each of a plurality of frequency sub- bands. 6. A method as defined in claim 5, wherein each step of determining a respective measure of correlation of a near end spectrum to a far end spectrum comprises averaging the cross-covariances. 7. A method as defined in claim 5, wherein each step of determining a cross-covariance of a near end spectrum to a far end spectrum comprises calculating averages over time of the near end spectrum and the far end spectrum. 8. A method as defined in claim 2, further comprising, upon detecting echo, estimating an echo delay by determining the time lag corresponding to the maximum measure of correlation. 9. A method as defined in claim 8, wherein the step of estimating the echo delay further comprises determining an average over time of the echo delay. 10. A method as defined in claim 2, further comprising, upon detecting echo, estimating an echo return loss by determining a ratio of a near end signal energy value to a far end signal energy value, the near end signal energy value being associated with a first time interval and the far end signal energy value being associated with a second time interval, the second time interval lagging the first time interval by an echo delay associated with the first time interval. 11. A method as defined in claim 10, wherein: the near end signal energy value is determined by averaging a near end signal energy over a plurality of time intervals preceding the first time interval; and the far end signal energy value is determined by averaging a far end signal energy over a plurality of time intervals preceding the second time interval. 12. A method as defined in claim 10, wherein the step of determining a ratio of a near end signal energy value to a far end signal energy value is performed only for time intervals for which the far end signal energy value exceeds a predetermined value. 13. A method as defined in claim 10, wherein the step of determining a ratio of a near end signal energy value to a far end signal energy value is performed only after a predetermined number of consecutive time intervals declared to contain echo. 14. Apparatus for computing a measure of echo of a far end signal in a near end signal, the apparatus comprising a processor and a memory, the memory storing instructions for execution by the processor, the instructions comprising: instructions for determining a far end spectrum of the far end signal for each of a plurality of successive time intervals; instructions for determining a near end spectrum of the near end signal for each of a plurality of successive time intervals; instructions for determining a respective measure of correlation of the near end spectrum to the far end spectrum for each of a plurality of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag; and instructions for comparing the measures of correlation to determine a maximum measure of correlation. 15. Apparatus as defined in claim 14, wherein the instructions further comprise instructions for declaring an echo to be detected when the maximum measure of correlation exceeds a predefined value. 16. Apparatus as defined in claim 13, wherein: the instructions for determining a far end spectrum comprise instructions for determining a far end spectral envelope; the instructions for determining a near end spectrum comprise instructions for determining a near end spectral envelope; and the instructions for determining measures of correlation comprise instructions for determining measures of correlation of near end spectral envelopes to far end spectral envelopes. 17. Apparatus as defined in claim 16, further comprising a near end signal input port operable to receive an LPC-encoded near end signal and a far end signal input port operable to receive an LPC-encoded far end signal, the echo estimator being operable on the LPC-encoded signals to determine the near end and far end spectral envelopes. 18. Apparatus as defined in claim 16, wherein the instructions further comprise instructions for estimating an echo delay upon detection of echo by determining the time lag corresponding to the maximum measure of correlation. 19. Apparatus as defined in claim 16, wherein the instructions further comprise instructions for estimating an echo return loss upon detection of echo by determining a ratio of a near end signal energy value to a far end signal energy value, the near end signal energy value being associated with a first time interval and the far end signal energy value being associated with a second time interval, the second time interval lagging the first time interval by an echo delay associated with the first time interval. 20. A processor-readable storage medium for storing instructions executable by a processor, the storage medium storing an instruction set comprising: instructions for determining a far end spectrum of a far end signal for each of a plurality of successive time intervals; instructions for determining a near end spectrum of a near end signal for each of a plurality of successive time intervals; instructions for determining a respective measure of correlation of the near end spectrum to the far end spectrum for each of a pluraUty of spectrum pairs, each spectrum pair comprising a respective near end spectrum and a respective far end spectrum, the far end spectrum corresponding to a time interval which lags a time interval corresponding to the near end spectrum by a respective time lag; and instructions for comparing the measures of correlation to determine a maximum measure of correlation. 21. A storage medium as defined in claim 21, wherein the instructions further comprise instructions for comparing the maximum measure of correlation to a predetermined value, and instructions for estimating an echo delay by determining a time lag corresponding to the maximum measure of correlation when the maximum measure of correlation exceeds the predetermined value. 22. A storage medium as defined in claim 21, wherein the instructions further comprise instructions for comparing the maximum measure of correlation to a predetermined value, and instructions for estimating an echo return loss by determining a ratio of a near end signal energy value to a far end signal energy value when the maximum measure of correlation exceeds the predetermined value, the near end signal energy value being associated with a first time interval and the far end signal energy value being associated with a second time interval, the second time interval lagging the first time interval by an echo delay associated with the first time interval.

Inventors: FOODEEI MAJID, HO DOMINIC, RABIPOUR RAFI, FOODEEI, MAJID, HO, DOMINIC, RABIPOUR, RAFI
Applicants: NORTHERN TELECOM LTD, NORTHERN TELECOM LIMITED
Application year: 1997
Main classification: H04B3
IPC codes: H04B3