This application claims priority to Chinese Patent Application No. 200710094322.7, filed Nov. 28, 2007, the disclosure of which is hereby incorporated by reference in its entirety.
The present disclosure is related to methods and apparatus for echo cancellation, for example, to compensate for echo created in communications system hybrids.
Hybrids are employed in some telecommunications systems to interface two-wire (e.g., bidirectional pairs) and four-wire (e.g., separate transmit and receive pairs) telecommunications circuits. For example, hybrids may be employed to interface local-loop circuits to long distance circuits or to interface local-loop circuits to customer premise equipment. Parasitic effects, impedance mismatches, and other non-idealities may cause a signal transmitted via the transmit pair into the four-wire interface to echo onto the receive pair of the four-wire interface. Such echo may cause increased noise, increased interference, an increased bit-error-rate, and/or the like.
Compensating for, canceling, or otherwise decreasing the detrimental effects of echo may be complicated when the echo is relatively strong. Decreasing the detrimental effects of echo may also be complicated by double talk. Double talk may occur if audio is transmitted via the transmit pair while audio is received via the receive pair.
The following disclosure describes several embodiments of the invention. Several details describing well-known structures or processes are not set forth in the following description for purposes of brevity and clarity. Also, several other embodiments of the invention can have different configurations, components, or procedures than those described in this Detailed Description. A person of ordinary skill in the art, therefore, will accordingly understand that the invention may have other embodiments with additional elements, or the invention may have other embodiments without several of the elements shown and described below with reference to the figures. The term “based on” is not exclusive and is equivalent to the term “based, at least in part, on” and includes being based on additional factors, whether or not the additional factors are described herein.
Echo canceller 100 may be employed in a wide variety of applications such as wireless phones, conventional telephones, and/or systems where echo cancellation may be beneficial. For example, systems for which echo cancellation may be beneficial include headsets, hearing aids, modems, facsimile machines, and/or the like. Further, echo canceller 100 may be employed in a communications network to compensate for the echo created through hybrid 190. In one example, echo canceller 100 is employed in and/or in conjunction with a digital subscriber line (DSL) system.
In one embodiment, receiver input signal RX may be a voice or data signal received via hybrid 190 and may include an echo component and a received signal component. The frequency ranges of the echo component and the received signal component may also partially and/or wholly overlap. However, in other embodiments, the frequency ranges of the echo component and the received signal component may be separate.
The echo component may include echo from transmit signal TX and may be due to, for example, the feedback of transmit signal TX to receiver input signal RX through hybrid 190; non-idealities such as component variance, impedance mismatch, and circuit parasitic effects in hybrid 190; and/or the like. Likewise, transmit signal TX may be a voice or data signal to be transmitted via hybrid 190. Receiver input signal RX and transmit signal TX may be digital voice signals, analog voice signals, digital data signals, analog data signals, and/or the like.
As shown, echo compensator 110 is configured to receive transmit signal TX, to receive control signal ENABLE, to receive receiver input signal RX, and to provide receiver output signal RX_OUT. Echo compensator 110 may be configured to provide receiver output signal RX_OUT based on filtering the echo component from receiver input signal RX. For example, echo compensator 110 may be configured such that receiver output signal RX_OUT is substantially equal to the received signal component of receiver input signal RX. Echo compensator 110 may be configured to employ adaptive filtration and iterative approximation techniques as described below.
Double talk detector 120 is configured to receive receiver output signal RX_OUT, to receive transmit signal TX, and to provide control signal ENABLE. In one embodiment, double talk detector 120 is configured to detect double talk. For example, double talk detector 120 may function to selectively enable the adjustment and/or adaptation of echo compensator 110 such that echo compensator 110 is primarily adjusted and/or adapted in response to changes in the echo component of receiver input signal RX while control signal ENABLE is asserted and is held substantially unchanged while control signal ENABLE is deasserted. Any suitable logic levels may be employed. Likewise, signals may be provided as either active-high or active-low signals. In this way, echo canceller 100 may be selectively adapted to provide improved echo cancellation.
Hybrid 190 may be configured to interface a bidirectional signal to a receive signal and a transmit signal. For example, hybrid 190 may include a transformer configured to interface four-wire telephone customer premises equipment to a two-wire local-loop circuit. However, hybrid 190 may also include any other bidirectional to unidirectional interfaces.
Although not shown in
As shown, filter 212 is configured to receive signal COEFF, to receive transmit signal TX, and to provide estimated echo signal EST_ECHO. Filter 212 may be configured to provide estimated echo signal EST_ECHO as an estimate of the echo component of receiver input signal RX from transmit signal TX and may include a digital filter such as a finite impulse response (FIR) filter. However, infinite impulse response (IIR) filters, analog filters, and/or the like may also be suitably employed as filter 212.
Compensation controller 214 is configured to receive control signal ENABLE, to receive receiver output signal RX_OUT, and to provide signal COEFF. Compensation controller 214 may be configured to estimate the echo component of receiver input signal RX and provide signal COEFF based on this estimate. For example, compensation controller 214 may be configured to dynamically generate and/or adjust coefficients provided on signal COEFF, such as FIR or IIR filter coefficients.
Subtractor 216 is configured to receive estimated echo signal EST_ECHO, to receive receiver input signal RX, and to provide receiver output signal RX_OUT. Subtractor 216 may provide receiver output signal RX_OUT based on subtracting estimated echo signal EST_ECHO from receiver input signal RX. In one embodiment, subtractor 216 includes a digital subtractor. However, subtractor 216 may also include an analog subtractor, be implemented as DSP code, and/or the like.
In operation, filter 212, compensation controller 214, and subtractor 216 operate in cooperation with each other to filter the echo component of receiver input signal RX to provide receiver output signal RX_OUT. For example, filtering the echo component may include attenuating amplitude, power, and/or the like of the echo component while leaving the received signal component substantially unchanged.
In one embodiment, echo compensator 210 may employ a least mean squares algorithm (LMS) or normalized least mean squares (NLMS) algorithm to approximate the echo component of receiver input signal RX and to subtract the approximated echo component from receiver input signal RX to provide receiver output signal RX_OUT. A suitable NLMS algorithm may characterized by the following equation:
where n represents an iteration number, ak(n) represents filter coefficients (e.g., the coefficients provided on signal COEFF), μ represents an iteration step size, e(n) represents receiver output signal RX_OUT, P(n) represents the power of receiver input signal RX, and y(n) represents receiver input signal RX. In operation, the value of step size μ may be empirically determined.
The above characterized NLMS algorithm may be employed by compensation controller 214 to generate signal COEFF based on the residual echo on receiver output signal RX_OUT. Signal COEFF may then be employed by filter 212 to generate estimated echo signal EST_ECHO. For example, filter 212 may be a FIR filter implemented in DSP code to dynamically adjust performance metrics such as pole/zero frequencies, passband gain, stopband attenuation, bandwidth, and/or the like in response to signal COEFF.
In one embodiment, filter 212 and compensation controller 214 may be configured to also provide a gain of approximately 6 decibels such that echo with an amplitude that is less than or equal to approximately twice the amplitude of transmit signal TX may be cancelled. However, any suitable gain may be selected.
As discussed above, filter 212 is configured to provide estimated echo signal EST_ECHO to subtractor 216 based on coefficients from compensation controller 214. Subtractor 216 may be configured to then subtract estimated echo signal EST_ECHO from receiver input signal RX to provide receiver output signal RX_OUT. Successive iterations may be performed to additionally reduce the echo on receiver output signal RX_OUT. For example, successive iterations may be performed while the error, e(n), is greater than the iteration step value, μ, until control signal ENABLE is deasserted to indicate the presence of double talk, and/or the like.
As discussed above, echo compensator 210 may be implemented as DSP code. In such an embodiment, estimated echo signal EST_ECHO and receiver input signal RX may be represented by a vector of bit length M and subtractor 216 may truncate one or more least significant bits (LSB), leaving one or more most significant bits (MSB). Such bit length modification may be employed to reduce DC error, which may result from fixed point calculations.
The bit length modification may be, for example, performed on complementary binary codes. For example, bit length modification may be performed by truncating bit positions less significant than N−1, where N describes a bit location of a vector, if the sign bit (e.g., the MSB), indicates that the vector represents a positive number. However, if the sign bit indicates that the vector represents a negative number, all LSBs less significant than N may be truncated.
As one example, source vector X may be modified to resulting vector Y, where X is of length M, and includes bits X[M−1] to X[0] such that:
Y=X[M−1:N−1], if X[M−1]=0; and
Y=X[M−1:N], if X[M−1]=1.
Similar techniques may also be employed by filter 212, compensation controller 214, double talk detector 120, and/or the like.
As illustrated, comparator 322 is configured to receive receiver output signal RX_OUT, to receive double talk threshold signal THRESHOLD, and to provide double talk comparison signal DT_COMP. Signal THRESHOLD may be an internally or externally programmed signal that may be provided from an internal or external memory, DSP, microprocessor, microcontroller, potentiometer, current source, and/or the like.
In one embodiment, comparator 322 may include a digital comparator configured to provide an arithmetic comparison of receiver output signal RX_OUT and signal THRESHOLD such that if a binary value of receiver output signal RX_OUT is greater than that of signal THRESHOLD, the presence of double talk is indicated via signal DT_COMP. However, if signals RX_OUT and THRESHOLD are analog signals, comparator 322 may include a voltage comparator, a current comparator, and/or the like.
Similarly, comparator 324 may be configured to receive receiver output signal RX_OUT, to receive transmit signal TX, and to provide feedback comparison signal FB_COMP. In one embodiment, comparator 324 may include a digital comparator configured to provide an arithmetic comparison of the receiver output signal RX_OUT and transmit signal TX such that if the binary value of the echo component of receiver output signal RX_OUT is greater than transmit signal TX, signal FB_COMP is asserted. However, if signals RX_OUT and TX are analog signals, comparator 322 may include a voltage comparator, a current comparator, and/or the like.
As shown, logic module 326 is configured to receive double talk comparison signal DT_COMP, to receive feedback comparison signal FB_COMP, and to provide control signal ENABLE. In one embodiment, logic module 326 includes an AND gate configured to logically AND signal DT_COMP to signal FB_COMP. For example, such an embodiment may provide a greater range of echo cancellation. However, in other embodiments, logic module 326 may include an OR gate configured to logically OR signal DT_COMP to signal FB_COMP, other combinatorial logic, state machines, and/or the like.
As shown, ADC 430 is configured to receive analog receiver input signal ANALOG_RX and to provide digital receiver input signal RX. In one embodiment, ADC 430 is a high linearity and high resolution ADC. However, any suitable ADC may also be employed.
As shown, DAC 440 is configured to receive digital transmit signal TX and to provide analog transmit signal TX. In one embodiment, DAC 440 is a high linearity and high resolution DAC. However, any suitable DAC may also be employed.
Echo compensator 410 and double talk detector 420 may also be respective embodiments of echo compensator 110 and double talk detector 120 of
ADC 522 may be configured to receive analog receiver output signal RX_OUT and produce digital receiver output signal RX_OUT_N. ADC 524 may be configured to receive analog transmit signal TX and produce digital transmit signal TX_N. Many types of ADCs are suitable for use as ADCs 522 and 524, including successive-approximation ADCs, ramp-compare ADCs, delta-encoded ADCs, pipeline ADCs, Sigma-Delta ADCs, and/or the like.
As shown in
Digital logic module 526 may configured to control echo compensator 110 via control signal ENABLE. For example, it may be configured to analyze signals RX_OUT_N and TX_N to determine whether a double-talk condition is present. Depending on the result of this determination, digital logic module 526 may modify the operational mode of echo compensator 110 by modulating control signal ENABLE. In some embodiments, digital logic module 526 may be implemented as DSP code to be executed on a DSP.
For clarity, process 600 is described as performed by particular elements of the double-talk detector 520 of
Table 1 illustrates the programmable variables referred to in
Table 2 describes the calculated variables referred to by
At block 605, digital logic module 526 calculates variables Vn_TX and Vx_TX, during a period of duration To=N/fs, where fs is the sampling frequency of the double-talk detector 520. As shown above in Table 2, these calculated values may correspond to the background noise and signal power of signal TX, respectively. At block 610, digital logic module 526 calculates Vn_RX_OUT and Vx_RX_OUT during substantially the same period. As shown above in Table 2, these calculated values may correspond to the background noise and signal power of receiver output signal RX_OUT, respectively.
At block 615, digital logic module 526 determines if a non-noise signal is present on receiver output signal RX_OUT, by evaluating the logic statement Vx_RX_OUT >Vn_RX_OUT+RXVsp, where RXVsp is a speech or sound detection threshold of receiver output signal RX_OUT. If no speech or sound is detected on receiver output signal RX_OUT, at block 630 digital logic module 526 may deassert control signal ENABLE for Th seconds.
If speech or sound is detected on receiver output signal RX_OUT, digital logic module 526 then determines, at decision block 620 whether speech or sound on transmit signal TX exceeds a double-talk threshold by evaluating the logic statement Vx_TX>Vn_TX+TXVspA, where TXVspA is a programmable double-talk threshold. If no speech or sound is detected on signal TX, at block 630 digital logic module 526 deasserts control signal ENABLE for Th seconds.
In one embodiment, if speech or other sound is detected on both signals RX_OUT and TX, at block 625 digital logic module 526 asserts control signal ENABLE for Th seconds.
Process 600 may be repeated indefinitely or for a finite period during the operation of the echo canceller 100.
Those skilled in the art will appreciate that the blocks shown in
The components, blocks, circuits, and the like illustrated herein may represent functional blocks of executable code to be executed on a DSP or other processor. However, they may also be embodied as digital circuitry, analog circuitry, and/or digital/analog circuitry in a programmable logic device, a field programmable gate array, discrete components, an application-specific integrated circuit, and/or the like.
While the above description describes certain embodiments of the invention, and describes the best mode contemplated, no matter how detailed the above appears in text, the invention can be practiced in many ways. Details of the system may vary in implementation, while still being encompassed by the invention disclosed herein. As noted above, particular terminology used when describing certain features or aspects of the invention should not be taken to imply that the terminology is being redefined herein to be restricted to any specific characteristics, features, or aspects of the invention with which that terminology is associated. In general, the terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification, unless the above Detailed Description section explicitly defines such terms. Accordingly, the actual scope of the invention encompasses not only the disclosed embodiments, but also all equivalent ways of practicing or implementing the invention under the claims.
Number | Date | Country | Kind |
---|---|---|---|
200710094322.7 | Nov 2007 | CN | national |