Preferred embodiments of the present invention will be described below in more detail, with reference to the accompanying drawings, in which:
While the specification concludes with claims defining features of the invention that are regarded as novel, it is believed that the invention will be better understood from a consideration of the description in conjunction with the drawings. As required, detailed embodiments of the present invention are disclosed herein; however, it is to be understood that the disclosed embodiments are merely exemplary of the invention, which can be embodied in various forms. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present invention in virtually any appropriately detailed structure. Further, the terms and phrases used herein are not intended to be limiting but rather to provide an understandable description of the invention.
The present invention relates to a method and a system for improving echo cancellation when clipping occurs on an echo.
As used herein, the term “echo” is a signal corresponding to a portion of an acoustic signal 130 that is received by a communication device from which the acoustic signal originally radiated. In the present arrangement, the echo 150 can be received by the audio input transducer 135 in an analog echo signal 210, and converted into a digital signal by the analog to digital converter (ADC) 145. The ADC 145 can generate the digital form of the echo 150 by sampling the analog echo signal 210 output by the input audio transducer 135 or the amplifier 140.
As used herein, the term “filter coefficient adaptation” is the process of updating filter coefficients 225 for use by a filter 215 to generate an echo estimation 220. To generate the echo estimation 220, the filter 215 can apply the filter coefficients 225 to an algorithm that is used to filter the audio signal 110. The filter 215 can be a finite impulse response (FIR) filter, an infinite impulse response filter (IIR), or any other suitable filter.
In operation, while the echo 150 remains unclipped and the filter coefficients 225 are converged with the echo 150, the filter 215 generates an echo estimation 220 that very closely matches the echo 150. Since an error signal 230 is calculated using an adder 240 to subtract the echo estimation 220 from the echo 150, the error signal 230 generally is small. Because the amount by which the filter coefficients 225 change as they are updated directly correlates to the size of the error signal 230, the filter coefficients 225 do not change greatly as the unclipped echo 150 continues to be received, and thus the filter coefficients 225 remain converged with the echo 150.
When the echo 150 is clipped, the amplitude of the echo 150 remains relatively constant, and is only slightly greater than the amplitude that was measured by the last sample before clipping began. The amplitude of the received audio signal 110, however, may continue to increase. Since the echo estimation 220 is generated by filtering the audio signal 110, it too may continue to increase. Accordingly, the difference between the echo estimation 220 and the echo 150 will increase, thereby generating an error signal 230 that becomes relatively large. Without intervention, the filter coefficients 225 also will increasingly diverge from their optimal value, thereby causing divergence of the echo estimation 220 and the echo 150. In such an arrangement, much of the echo 150 will remain uncorrected and additional noise will be generated whenever clipping of the echo 150 occurs. Thus, if the error signal 230 is provided as an output signal 260 that is communicated to other components of the communication device 200, such as a noise suppressor 160 and/or vocoder 165, much of the echo 150 and noise will be present.
To understand how neutralizing filter coefficient adaptation minimizes the amount of echo 150 and noise being communicated to the other components of the communication device 200 when the echo 150 is clipped, assume that the last digital sample of the echo 150 is measured just before clipping of the analog echo signal 210 begins. Rather than allowing the filter coefficients 225 to increase as the error signal 230 increases, the filter coefficients 225 that are determined using the last sample prior to clipping can continue to be used by the filter 215 to generate an echo estimation 220 that is a very good approximation of the clipped echo 150. Accordingly, the echo estimation 220 and the echo 150 can remain converged, and the error signal 230 may represent only the approximate difference between the clipped echo 150 and the echo 150 were it not to be clipped (i.e. the portion of signal clipped from the echo 150).
Detection of the clipping of the echo 150 can be accomplished in any suitable manner. For example, the echo cancellation system 205 can include an adaptation control module 235. The adaptation control module 235 can comprise hardware, software or firmware executable by a suitable processing device, or a combination of hardware and software. The adaptation control module 235 can be communicatively linked to the ADC 145. Although the communication link can be a direct connection, other components (not shown) may be included along the communication pathway. For example, amplifiers, filters, processors, or any other suitable devices may be included. The adaptation control module 235 can receive the echo 150, or a representation of the echo 150, from the ADC 145.
The adaptation control module 235 can process the echo 150 to determine whether the echo 150 is being clipped. For example, the adaptation controller 235 can be configured to identify whether the echo 150 has an amplitude equal to at least a threshold value. The threshold value may be close to, or equal to, a maximum output amplitude of the amplifier 140 or a maximum amplitude of analog signals within the ADC 145 before analog to digital conversion. To accomplish the identification, the adaptation control module 235 can detect signal samples represented in the echo 150 and identify particular signal samples that represent at least the threshold value.
In response to detecting clipping of the echo 150, filter coefficient adaptation can be neutralized in any suitable manner. For example, the adaptation control module 235 can communicate a control signal 250 to an adaptive algorithm 255. The adaptive algorithm 255 can be a normalized least mean squared (NLMS) algorithm, or any other suitable algorithm that operates in the time domain. During normal operation when the echo 150 is not clipped, the control signal 250 can be equal, or substantially equal, to the error signal 230. When the echo 150 is clipped, however, the adaptation control module 235 can ignore the error signal 230 and provide a control signal 250 that indicates zero error. When the control signal 250 indicates zero error, filter coefficients 225 provided by the adaptive algorithm 255 can be maintained at their previous values before the clipping was detected. In another arrangement, when clipping occurs, the control signal 250 can indicate to the adaptive algorithm 255 to halt automatic updating of the filter coefficients 225 that are generated, and to provide to the filter 215 filter coefficients that were determined immediately prior to the present occurrence of clipping being detected.
In another arrangement, to neutralize filter coefficient adaptation, the adaptation control module 235 can communicate a control signal (not shown) to the filter 215 to halt automatic updating of the filter coefficients 225 that are processed by the filter 215, and to indicate to the filter 215 to process previously provided filter coefficients 225.
In another aspect of the invention, when clipping of the echo 150 is detected, the adaptation control module 235 can set the output signal 260 to a zero value, which can completely eliminate the echo and noise, although audio signals generated by a user of the communication device 200 also would be eliminated when the clipping occurs.
If the sample is not clipped, at step 320 an adaptive filter output, filt_out(i), correlating to the sample i can be determined. At step 325, an echo cancellation output, EC_out(i), can be determined for the sample i by subtracting the adaptive filter output from the microphone sample. e.g. EC_out(i)=mic_sample(i)−filt_out(i). Proceeding to step 330, filter coefficients can be changed based on the echo cancellation output, EC_out(i).
Referring again to decision box 315 and step 335, if the first sample mic_sample(i) is clipped, the filter coefficients can remain unchanged and steps 320 through 330 can be skipped. Referring to decision box 340, if audio is still being received from the other communication device, at step 345 a next sample, mic_sample(i), can be selected and the process can return to decision box 315. The process can continue until audio is no longer being received from the other communication device, at which time the process can end at step 350. The process can repeat when audio is again received from another communication device.
The method 400 can begin at step 405 in a state in which a first communication device has been receiving audio from another communication device and the first communication device has presented a correlating acoustic signal through an output audio transducer. At least a portion of the acoustic signal may be undesirably received by an input audio transducer and initial filter coefficients may have been generated for echo cancellation. At step 410, a first sample, mic_sample(i), of an audio signal detected by an input audio transducer on the first communication device can be selected. Referring to decision box 415, a determination can be made as to whether the sample is clipped.
If the sample is clipped, the process can proceed to step 420 and the filter coefficients can remain unchanged. In addition, a counter, cntr, can be set to a suitable counter value X. The value of X can be selected based on the number of previous audio samples that are used by the ADC to generate a sample(i) with a desired level of accuracy. For example, the value of X can be 5, 10, 50, 100, 500, 1000, 5000, 10000 or any other desired number. Proceeding to decision box 435, if audio is still being received, a next sample mic_sample(i) can be selected at step 440.
Referring again to decision box 415, if the sample mic_sample(i) is not clipped, the process can proceed to decision box 425 and a determination can be made whether cntr is equal to 0. If the cntr is not equal to zero, the process can continue to step 430 can cntr can be decremented by one (i.e. cntr=cntr−1). The process can again proceed to decision box 435 and continue as previously described.
Referring back to decision box 425, if cntr is equal to zero, the process can proceed to step 445 and an adaptive filter output, filt_out(i), correlating to the sample i can be determined. At step 450, an echo cancellation output, EC_out(i), can be determined for the sample i by subtracting the adaptive filter output from the microphone sample. e.g. EC_out(i)=mic_sample(i)−filt_out(i). Proceeding to step 455, filter coefficients can be changed based on the echo cancellation output, EC_out(i). The process can again proceed to decision box 435 and continue until audio is no longer being received, at which time the process can end at step 460. The process can repeat when audio is again received from another communication device.
The present invention can be realized in hardware, software, or a combination of hardware and software. The present invention can be realized in a centralized fashion in one processing system or in a distributed fashion where different elements are spread across several interconnected processing systems. Any kind of processing system or other apparatus adapted for carrying out the methods described herein is suited. A typical combination of hardware and software can be a processing system with an application that, when being loaded and executed, controls the processing system such that it carries out the methods described herein. The present invention also can be embedded in an application product, which comprises all the features enabling the implementation of the methods described herein, and which when loaded in a processing system is able to carry out these methods.
The terms “computer program,” “software,” “application,” variants and/or combinations thereof, in the present context, mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: a) conversion to another language, code or notation; b) reproduction in a different material form. For example, an application can include, but is not limited to, a subroutine, a function, a procedure, an object method, an object implementation, an executable application, an applet, a servlet, a source code, an object code, a shared library/dynamic load library and/or other sequence of instructions designed for execution on a processing system.
The terms “a” and “an,” as used herein, are defined as one or more than one. The term “plurality,” as used herein, is defined as two or more than two. The term “another,” as used herein, is defined as at least a second or more. The terms “including” and/or “having,” as used herein, are defined as comprising (i.e., open language). This invention can be embodied in other forms without departing from the spirit or essential attributes thereof. Accordingly, reference should be made to the following claims, rather than to the foregoing specification, as indicating the scope of the invention.