Abstract:
The invention concerns a method of controlling an adaptation of a filter, and a controller and a computer program product to execute this method. The filter is an adaptive finite impulse response (=FIR) filter for modelling an echo path impulse response for echo cancellation in a telecommunications connection between a first terminal providing a near-end signal at a first end of the telecommunications connection and a second terminal providing a far-end signal at another end of the telecommunications connection. In a multi-windowing scheme, a plurality of filter segments and segments of the far-end signal is determined in the time domain. An energy level associated to an individual segment of the far-end signal is compared with an energy level associated to a sample of the near-end signal. In dependence on the result of the comparison of the energy levels, the adaptation of an individual filter segment associated to the individual segment of the far-end signal is enabled or inhibited.

Description:
The invention is based on a priority application EP 06 290 310.9 which is hereby incorporated by reference. 
     TECHNICAL FIELD 
     The present invention relates to a method of controlling an adaptation of a filter, in particular an adaptive finite impulse response filter for modelling an echo path impulse response for echo cancellation in a telephone connection, and a controller and a computer program product to execute said method. 
     BACKGROUND OF THE INVENTION 
     Echo significantly degrades the sound quality of telephony voice communications. In telephony voice communications between two parties, i.e., a far-end speaker and a near-end speaker, the far-end speaker perceives echo effects if his voice signals are transmitted back to him. Two types of echoes can be differentiated, according to the place where they are created: acoustic echo, due to a coupling between the loudspeaker and the microphone on the near-end side (e.g., with a handsfree telephone set such as in a car), and electric—or line—echo, due to a line impedances mismatch during the 2-to-4 wire conversion at the switching station. Therefore, echo cancellation is important to preserve a good communication quality. Furthermore, with the development of VoIP telephony, which increases end-to-end transmission delays, echo cancellation becomes mandatory (VoIP=Voice over Internet Protocol). 
     The task of an echo canceller is to mimic the echo signal, thus providing an estimate of the echo signal, and remove this estimate from the signal combining near-end signals and echo of the far-end signals, yielding a residual signal ideally consisting of only the near-end speaker signal. The estimated echo signal is also known as echo path estimate. For the modelling of the echo signal, most commonly an adaptive finite impulse response (=FIR) filter is used. 
     However, the performance of the echo canceller drastically deteriorates during double-talk periods in which signals from both the near-end and far-end speakers coexist. As the large component of the near-end speech distorts the output signal, the filter coefficients determined by the echo canceller deviate from their converged state. Consequently, the error between the real echo signal and its replica generated by the filter increases. The major target of a double-talk detection (=DTD) module is to detect phases when the far-end speaker and the near-end speaker are talking at the same time and suspend the echo estimation during these phases in order to prevent a filter divergence. 
     The existing solutions for DTD can be classified into three groups. First, energy-based algorithms, such as Geigel DTD or robust Geigel DTD, which require few MIPS but are not very efficient (MIPS=Million Instructions per Second). Second, correlation-based algorithms such as the cross-correlation or the coherence methods which are quite efficient provided the echo-to-noise ratio is high, but these methods require extensive memory storage and involve a high computational complexity. Third, methods based on the echo path estimate filter evolution control have a higher performance than the Geigel DTD method but are nearly as computationally complex as correlation-based methods. 
     Currently, there is no solution that provides a good trade-off between efficiency and complexity. Moreover, the present solutions do not provide for the case of a detection miss, i.e., an actual double-talk situation not detected by the algorithm. Thus, adaptation will needlessly be allowed for the whole filter length and therefore leads to divergence of the entire filter. 
     SUMMARY OF THE INVENTION 
     It is the object of the present invention to provide an improved DTD solution. 
     The object of the present invention is achieved by a method of controlling an adaptation of a filter, wherein the filter is an adaptive FIR filter for modelling an echo path impulse response for echo cancellation in a telecommunications connection between a first terminal providing a near-end signal at a first end of the telecommunications connection and a second terminal providing a far-end signal at another end of the telecommunications connection, wherein the method comprises the steps of determining, in a multi-windowing scheme, a plurality of filter segments and segments of the far-end signal in the time domain, comparing an energy level associated to an individual segment of the far-end signal with an energy level associated to a sample of the near-end signal, and enabling the adaptation of an individual filter segment associated to the individual segment of the far-end signal in dependence on the result of the comparison of the energy levels. The object of the present invention is further achieved by a controller for controlling an adaptation of a filter, wherein the filter is an adaptive FIR filter for modelling an echo path impulse response for echo cancellation in a telecommunications connection between a first terminal providing a near-end signal at a first end of the telecommunications connection and a second terminal providing a far-end signal at another end of the telecommunications connection, wherein the controller is adapted to determine, in a multi-windowing scheme, a plurality of filter segments and segments of the far-end signal in the time domain, compare an energy level associated to an individual segment of the far-end signal with an energy level associated to a sample of the near-end signal, and enable the adaptation of an individual filter segment associated to the individual segment of the far-end signal in dependence on the result of the comparison of the energy levels. And the object of the present invention is further achieved by a computer program product for controlling an adaptation of a filter, wherein the filter is an adaptive FIR filter for modelling an echo path impulse response for echo cancellation in a telecommunications connection between a first terminal providing a near-end signal at a first end of the telecommunications connection and a second terminal providing a far-end signal at another end of the telecommunications connection, wherein the computer program product, when executed by a controller, performs the steps of determining, in a multi-windowing scheme, a plurality of filter segments and segments of the far-end signal in the time domain, comparing an energy level associated to an individual segment of the far-end signal with an energy level associated to a sample of the near-end signal, and enabling the adaptation of an individual filter segment associated to the individual segment of the far-end signal in dependence on the result of the comparison of the energy levels. 
     With this method, during single-talk phases, the probability for the segments of the filter operating on the main (or principal) echo to be adapted is very high. For the other segments of the filter, even if adaptation is not often enabled—for instance if the far-end energy level in the considered frames is low—it is not a critical issue since they do not contain any useful information. Therefore, this filter segment processing guarantees high convergence rate. 
     By segmenting the filter into subfilters, the risk of unwanted adaptation of the filter is minimised. During double-talk phases, when a detection error occurs, i.e., a double-talk situation is not detected, the fact that each segment of the filter is processed totally independently limits the divergence spread: not all the filter segments will simultaneously diverge, but only those which do not fulfil the energy difference condition. 
     Besides, the negligible computational complexity of this method enables its implementation in addition to the other existing solutions to increase the robustness of the double-talk detection. 
     A large number of DTD applications are based on the Geigel algorithm of which this invention is an enhancement. Therefore and because the global quality of an echo canceller depends a lot on its DTD performance, the present invention means an extensive and significant advancement in the field of echo cancellation. 
     Further advantages are achieved by the embodiments of the invention indicated by the dependent claims. 
     According to a preferred embodiment of the invention, the filter segments are created from a representation of the filter in the time-domain, i.e., characteristics of the filter plotted against time. The representation of the filter in the time-domain is divided into N filter segments, wherein N&gt;1. Likewise, the segments of the far-end signal are created from a representation of the far-end signal in the time-domain. N samples of the far-end signal are extracted wherein each of the N samples of the far-end signal corresponds to one of the N filter segments. From each of the N samples of the far-end signal a corresponding energy level is determined. A current sample of the near-end signal, which is to be corrected for unwished echo, is taken in the time domain and a corresponding energy level is determined. Then, for each of the N segments of the far-end signal, an energy level of the i-th segment of the far-end signal is compared with a corresponding energy level of the near-end signal, wherein 1&lt;=i&lt;=N. Based on the result of this comparison of the energy levels, the adaptation of the corresponding i-th filter segment is enabled or inhibited. 
     According to another preferred embodiment of the invention, the far-end signal and the near-end signal are plotted with a comparable representation of their energy against time, and from these representations the corresponding energy levels of the far-end signal and the near-end signal are determined. Then, the ratio of the energy level of an i-th segment of the far-end signal and the corresponding energy level of the current sample of the near-end signal is calculated. The calculated ratio is used for comparison of said energy levels. This comparison comprises the comparison of said ratio with a pre-defined threshold value. Based on the comparison, the adaptation of the i-th filter segment corresponding to the i-th segment of the far-end signal is decided on. If the ratio is higher than the threshold value, the adaptation of the corresponding i-th filter segment is allowed. However, if the ratio is lower than or equal to the threshold value, this is taken as an indication that double-talk exists, and the adaptation of the corresponding i-th filter segment is not allowed. 
     According to another preferred embodiment of the invention, the threshold value used for comparison of said energy levels is defined on the basis of an hypothesis of a minimum echo path attenuation. In a given telephony connection, the echo path attenuation—also known as echo return loss (=ERL) —depends on the switched telephone network characteristics. 6 dB is specified in ITU-T G.168 recommendation as a typical worst-case value encountered for most networks. Therefore the minimum echo path attenuation of most echo cancellers is set to 6 dB, or sometimes 3 dB or 0 dB. 
     In a preferred embodiment, the N segments of the far-end signal are determined as N subsequent and equidistant segments of the far-end signal, i.e., comprising the current sample of the far-end signal and the N−1 past time-domain segments of the far-end signal adjacent to the current sample of the far-end signal. For each of these N segments of the far-end signal a corresponding filter segment is determined, wherein N&gt;1. 
     According to another preferred embodiment of the invention, the segment size of each of the N segments of the far-end signal is chosen equal to the sample size of the near-end signal. Thus, the length of the far-end signal sample used in the method is N times the length of the near-end signal sample. 
     Preferably, the controller is adapted to operate in parallel to an existing DTD unit. The controller may be implemented into an existing DTD unit or installed in a separate place. The controller may be used to check the results of the DTD unit. In case the existing DTD unit does not decide on double-talk and the controller decides on double-talk, the controller overrules the decision of the existing DTD unit. 
     Preferably, the controller is adapted to receive data about the energy levels from existing double-talk detection units measuring said energy levels. Thus, the controller can utilise existing resources of a DTD unit. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       These as well as further features and advantages of the invention will be better appreciated by reading the following detailed description of presently preferred exemplary embodiments taken in conjunction with accompanying drawings of which: 
         FIG. 1  is a block diagram of a telephone connection according to an embodiment of the invention. 
         FIG. 2  is a block diagram of an AEC according to an embodiment of the invention message. 
         FIG. 3   a  is a diagram of an echo path estimate FIR filter according to an embodiment of the invention. 
         FIG. 3   b  is a diagram of a far-end signal according to an embodiment of the invention. 
         FIG. 3   c  is a diagram of a near-end signal according to an embodiment of the invention. 
         FIG. 4  is a message flow diagram showing processing steps of a controller according to an embodiment of the invention. 
     
    
    
     To simplify the description, the example of an acoustic echo canceller (=AEC) has been taken in the following sections, but the present invention could be embedded in any type of echo canceller. 
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       FIG. 1  shows a telephone connection  8  between a first terminal  1  assigned to a first subscriber  10  and a second terminal  2  assigned to a second subscriber  20 . The telephone connection  8  comprises the exchange of electric signals  12   b ,  21  across a telecommunications network  3 . The telecommunications network  3  may consist of legacy telephone networks, e.g., of the PSTN type, and/or packet-switched telephone networks, e.g., VoIP networks (PSTN=Public Switched Telephone Network). The terminals  1 ,  2  may be legacy telephone sets and/or VoIP telephones. 
     The electric signal  21  originating from a microphone  202  of the second terminal  2  is transmitted via the telecommunications network  3  to a loudspeaker  101  of the first terminal  1 . The electric signal  12   b  originating from a microphone  102  of the first terminal  1  is transmitted via the telecommunications network  3  to a loudspeaker  201  of the second terminal  2 . The microphone  102  of the first terminal  1  receives acoustic voice signals  122  from the first subscriber  10 , acoustic echo signals  121  from the loudspeaker  101 , transmitted via the air and the housing of the first terminal  1 , and acoustic and/or electric channel noise signals  123 . The signals  121 ,  122 ,  123  received by the microphone  102  are converted into an electric signal  12   a  by the microphone  102  and processed by an AEC  4  before being transmitted as electric signal  12   b  to the second terminal  2 . There, the electric signal  12   b  is re-converted in acoustic signals by means of the loudspeaker  201 . 
     In analogy to the first terminal  1 , the microphone  202  of the second terminal  2  also receives voice signals from the second subscriber  20 , echo signals from the loudspeaker  201  and channel noise signals from the environment of the second terminal  2 , which however are not shown in  FIG. 1  to simplify the description. The signals received by the microphone are converted by the microphone to electric signals and transmitted as electric signals  21  via the telecommunications network  3  to the first terminal  1 . 
     Although the second terminal  2  may also comprise an AEC, the description of the present invention will be limited—for simplicity reasons—to the AEC  4  comprised in the first terminal  1 . As we concentrate on the AEC  4  in the first terminal  1 , the electric signals  12   a ,  12   b  originating from the first terminal  1  will be referred to in the following as original near-end signal  12   a  and residual near-end signal  12   b , respectively, whereas the electric signal  21  originating from the second terminal  2  will be referred to as far-end signal  21 . 
     As an acoustic wave originating from the loudspeaker  101  propagates within the environment  9  surrounding the first terminal  1  and undergoes reflections at different surfaces located in the environment  9 , the acoustic echo signals  121  arriving at the microphone  102  consist of different fractions of the reflected acoustic wave, whereby each fraction shows an individual attenuation and an individual delay with regard to the original acoustic wave. 
     The echo signals  121  received by the microphone  102  are an unwanted constituent of the signals  121 ,  122 ,  123  received by the microphone  102 . In order to prevent that the second subscriber  20  perceives an acoustic echo when listening to the signals from his loudspeaker  201 , the far-end signal  21  stimulating the loudspeaker  101  is adapted by means of a filter to mimic the echo signal  121  as well as possible, and subtracted from the original near-end signal  12   a  created by the microphone  102  out of the acoustic and/or electric signals  121 ,  122 ,  123 . In many cases, the filter is an adaptive FIR filter for modeling an echo path impulse response. The process steps of filtering and subtracting are conducted in the AEC  4 . 
       FIG. 2  is a block diagram showing the AEC  4 . By means of the AEC  4 , the original near-end signal  12   a  produced by the microphone  102  is modified dependent on the far-end signal  21  sent from the microphone  202  to the loudspeaker  101  as described with reference to  FIG. 1 . The acoustic waves  121   a  originating from the loudspeaker  101  are modified on account of echo effects  120  and arrive as echo signals  121   b  at the microphone  102 , together with the acoustic voice signals  122  from the first subscriber  10  and the channel noise signals  123 . The signals  121   b ,  122 ,  123  received and converted to the original electric signal  12   a  by the microphone  102 , the echo signals  121   b  represent a constituent of the electric near-end signal  12   a.    
     The AEC  4  comprises a DTD unit  5 , a filtering unit  6 , and a subtracting unit  7 . The filtering unit  6  comprises a filter adaptation unit  61  and a summing unit  62 . The filter adaptation unit  61  continuously receives a copy  215  of the far-end signal  21  and splits the received copy  215  by means of a splitter unit  63  in N equidistant segments. The N segments of the far-end signal  215  are modified by means of N corresponding filter segments  611  to  614  of the same segment size as the N equidistant segments of the far-end signal  215 , resulting in filtered signals  6110 ,  6120 ,  6130 ,  6140 . The filtered signals  6110 ,  6120 ,  6130 ,  6140  are recomposed in the summing unit  62  and sent as signal  620  to the subtracting unit  7 . In the subtracting unit  7 , the signal  620  is subtracted from the original near-end signal  12   a , resulting in a residual near-end signal  12   b . A copy of the residual near-end signal  12   b  is sent as feedback signal  126  to the filter adaptation unit  61  where the feedback signal  126  is utilised for the adaptation of the filter segments  611  to  614 . Therefore, the filtering unit  6  represents a self-adapting system. 
     The DTD unit  5  comprises a controller  50  and a module  51  for determining the energy level of the original near-end signal  12   a . The controller  50  comprises a calculator  510 , a mediator  520  and an analyzer  530 . A copy of the original near-end signal  12   a  is supplied as signal  125  to the module  51  where the energy level of the near-end signal  125  is determined. Likewise, copies of the far-end signal  21  are sent as signals  211  to  214  to the analyzer  530  and conducted to the modules  531  to  534 . The modules  531  to  534  comprise delay circuits and units for determining the energy levels of the far-end signals  211  to  214 . 
     The analyzer  530  divides the far-end signal  21  into N equidistant segments  211  to  214  with their size equivalent to the size of the filter segments  611  to  614 . The first module  531  receives and holds a current sample of the far-end signal  21  of a temporal length equal to the temporal length of the equidistant filter segments  611  to  614 . The second module  532  holds a sample of the far-end signal with a temporal delay equal to the temporal length of the far-end signal sample held by the first module  531 . This way, every module  531  to  534  holds another sample of the far-end signal, such that the plurality of module  531  to  534  hold the past N samples  211  to  214  of the far-end signal  21 . 
     The energy levels of the N segments  211  to  214  of the far-end signal  21  are determined and are sent as signals  5310 ,  5320 ,  5330 ,  5340  to the calculator  510 . The calculator  510  calculates a ratio of the energy level  5330  of an i-th segment of the far-end signal  21  with a corresponding energy level  52  of the current sample  125  of the original near-end signal  12   a  and compares the calculated ratio with a threshold value which is defined by the controller  50  based on an hypothesis of a minimum echo path attenuation. 
     The results of the calculation in the calculator  510  is sent to the mediator  520 . If the calculated ratio is higher than the threshold value, the mediator  520  enables the adaptation of the corresponding i-th filter segment  613  in the filter adaptation unit  61 . On the other hand if the ratio is lower than or equal to the threshold value, the mediator  520  decides on double-talk and blocks the adaptation of the corresponding i-th filter segment  613  in the filter adaptation unit  61 . The enabling signal and the blocking signals, respectively, are transmitted from the controller  50  to the filter adaptation unit  61  via a signal channel  5061 . 
       FIG. 3   a  shows an exemplary representation of an echo path estimate FIR filter where the amplitude of the filter signal  600  is plotted in arbitrary units  81  against time  80 . The filter signal  600  is divided in the time domain in equidistant segments  611  to  614 . 
     Corresponding to the diagram shown in  FIG. 3   a ,  FIG. 3   b  shows the past N samples of the far-end signal  21 . The far-end signal  21  is plotted in arbitrary units  82  against time  80 . The far-end signal  21  is divided in the time domain in N segments  211  to  214  which have the same temporal width as the segments  611  to  614  shown in  FIG. 3   a  and for each of which the energy level is determined. 
       FIG. 3   c  shows a diagram of a current sample of the original near-end signal  12   a  which is plotted in arbitrary units  83  against time  80 . The time domain width of the sample  125  has the same size as each of the segments  611  to  614  shown in  FIG. 3   a  and each of the segments  211  to  214  shown in  FIG. 3   b . For each of the segments  211  to  214  of the far-end signal  21  and for the segment  125  of the original near-end signal  12   a , the energy levels of the signals  21 ,  600  are determined. Then, the determined energy level of each segment  211  to  214  of the far-end signal  21  is compared with the energy level of the segment  125  of the original near-end signal  12   a . This is done by calculating the ratio of the energy level of an i-th segment  213  of the far-end signal  21  with the energy level of the current sample  125  of the original near-end signal  12   a . If the calculated ratio is higher than the threshold value, the corresponding i-th segment  613  of the filter is released for adaptation. Otherwise, if the ratio is lower than or equal to the threshold value, the adaptation of the i-th segment  613  of the filter is blocked against adaptation. 
       FIG. 4  shows a message flow diagram with processing steps  401  to  408  which are performed in the controller  50 . After the start  401  of the program, a loop variable i is set to the initial value  1  in a first step  402 . In a next step  403 , the ratio of the energy level of the first segment of the far-end signal  21  and the energy level of the segment  125  of the original near-end signal  12   a  are calculated and compared to a threshold value T. If the comparison shows that the ratio is higher than the threshold value T, the first filter segment  611  is released for adaptation in step  405 . On the other hand, if the calculated ratio is equal to or lower than the threshold value T, the adaptation of the first filter segment  611  is blocked in step  404 . 
     In either case, the value of the loop variable i is increased by 1 in the next step  406 . After increasing the value of the loop variable i to the next higher value, a check is performed in step  407  whether the current value of the loop variable i is higher than the total number of segments N. If this is not the case, the loop runs the same steps  403  to  407  for the current value of the loop value. In this manner, for all N segments  611  to  614  of the filter signal  600  a determination is made as whether to open an individual segment of the N filter segments  611  to  614  for adaptation by means of the filter adaptation unit  61  or not. If the loop steps  403  to  406  have been performed for the value of the loop variable i equal to N, the decision step  407  will be positive, and the message flow has reached the end  408 .