This application claims priority of Taiwan Application No. 108131628 filed on 2019 Sep. 3.
The present invention is related to an electronic system with echo cancellation and related echo cancellation method, and more particularly, to an electronic system with power-saving echo cancellation and related echo cancellation method.
With rapid development in network technology, instant messaging and video communication applications are surging in popularity and demanding higher voice quality. In the above-mentioned applications, microphones and speakers are used to receive and transmit audio signal. When picking up an audio signal from a far-end speaker, a far-end microphone sends it to a near-end speaker. An electrically generated echo may occur when the incoming energy from the far-end speaker is reflected back toward the far-end speaker as a slightly altered and delayed replication due to impedance mismatch in the environment. When an echo becomes audible, it can critically impair voice quality, making phones calls very unpleasant and distracting, and very often even to the point of non-comprehension of the conversation.
In order to improve subjective voice quality, an echo canceller may be used to simulate the impulse response of the echo path. Echo cancellation involves first recognizing the originally transmitted far-end signal that re-appears, with some delay, in the transmitted or received signal by the near-end microphone. Once the echo is recognized, it can be removed by subtracting it from the transmitted or received signal by the near-end microphone. However, an automotive electronic system is an embedded system with a limited amount of resources, wherein a large percentage of the overall power consumption is due to performing echo cancellation. Therefore, there is a need for an electronic system with power-saving and high-efficient echo cancellation mechanism.
The present invention provides a method of performing power-saving echo cancellation. An echo canceller including M operational segments operates in a power-saving mode by deactivating m operational segments among the M operational segments so as to allow (M-m) operational segments among the M operational segments to perform echo cancellation. The echo canceller enters a data mode by activating the M operational segments for performing echo cancellation when a condition is satisfied, wherein M is an integer larger than 1 and m is a positive integer smaller than M.
The present invention also provides an electronic system with power-saving echo cancellation mechanism. The electronic system includes an echo canceller, a calculation unit and a control circuit. The echo canceller includes M operational segments and is configured to perform echo cancellation in a data mode or in a power-saving mode. The calculation unit is configured to calculate a power of each operational segment among the M operational segments. The control circuit is configured to deactivate m operational segments among the M operational segments so as to allow (M−m) operational segments among the M operational segments to perform echo cancellation in the power-saving mode. A power of each of the m operational segments among the M operational segments is smaller than a threshold value. M is an integer larger than 1, and m is a positive integer smaller than M.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In the present invention, the echo canceller 10 may operate in a data mode and a power-saving mode. When operating in the data mode, all operational segments SEG1˜SEGM in the echo canceller 10 are activated so that a total of M operational segments are performing echo cancellation. When operating in the power-saving mode, m operational segments among the operational segments SEG1˜SEGM in the echo canceller 10 are deactivated so that a total of (M-m) operational segments are performing echo cancellation, wherein m is a positive integer smaller than M.
In an embodiment, the control circuit 30 may use registers to control the activation or deactivation of each operational segment in the echo canceller 10. However, the method of activating or deactivating each operational segment in the echo canceller 10 does not limit the scope of the present invention.
The adaptive filter AF is configured to learn the impulse response of the echo path in the environment in which the electronic system 100 is located, thereby providing a corresponding estimated echo signal d(n)′. Based on the statistic characteristics of input/output signals, the adaptive filter AF may automatically adjust the filter coefficients using a specific algorithm in order to achieve optimum filter characteristics. More specifically, the adaptive filter AF may update and adjust the weighting coefficient for each sampled value of an input signal u(n) using the specific algorithm so that its estimated echo signal d(n)′ approximates an expected error signal e(n). As previously stated, the adaptive filter AF may be implemented as a plurality of operational segments SEG1˜SEGM for learning the impulse response of the echo path in its environment, thereby providing respective estimated echo signals d1(n)′˜dM(n)′, wherein d(n)′=d1(n)′+d2 (n)′+ . . . +dM(n)′.
In an embodiment of the present invention, the adaptive filter AF may perform echo evaluation on the original far-end signal u(n) using a least mean square (LMS) algorithm, a normalized least mean square (NLMS) algorithm, a recursive least square (RLS) algorithm, or another algorithm. However, the algorithm adopted by the adaptive filter AF does not limit the scope of the present invention.
The double talk detector DTD is configured to determine whether the electronic system 100 is in a single-talk state or in a double-talk state. If the double talk detector DTD is unable to detect any input signal on the near end SIN while the original signal u(n) is being inputted to the far end RIN, it is determined that the electronic system 100 is in the single-talk state. If the double talk detector DTD detects an input signal on the near end SIN while the original signal u(n) is being inputted to the far end RIN, it is determined that the electronic system 100 is in the double-talk state.
In the single-talk state, the adaptive filter AF may perform echo evaluation on the original far-end signal u(n) using the specific algorithm. After space reflection, the original signal u(n) outputted from the near end ROUT by the speaker may be inputted to the microphone on the near end SIN, thereby resulting in a near-end echo signal d(n). The error signal e(n) may then be acquired by subtracting the estimated echo signal d(n)′ outputted by the adaptive filter AF from the near-end echo signal d(n). In an ideal scenario of echo cancellation, the estimated echo signal d(n)′ outputted by the adaptive filter AF is equal to the near-end echo signal d(n), which means the error signal e(n) is ideally 0. Therefore, each of the operational segments SEG1˜SEGM in the adaptive filter AF may continuously adjust its coefficient according to the original far-end signal u(n) and the error signal e(n) until the value of the error signal e(n) is reduced to 0. Under such circumstance, the adaptive filter AF may operate using converged optimum filter coefficients.
In the double-talk state, when both the near end SIN and the far end RIN receive input signals, the double talk detector DTD is configured to stop the learning process of the adaptive filter AF by cutting off the feedback path of the adaptive filter AF, thereby preventing the impulse response of the echo path simulated by the adaptive filter AF from diverging.
The non-linear processor NLP is configured to further eliminate residual echo. The non-linear processor NLP may be implemented to pass signals larger than a threshold value TSUP, and reduce signals not larger than the threshold value TSUP to zero or to a suppressed value. However, the design of the non-linear processor NLP does not limit the scope of the present invention.
Step 310: enter the data mode; execute step 320.
Step 320: trigger the power-saving mode for performing echo cancellation; execute step 330.
Step 330: determine whether a timer has expired; if yes, execute step 340; if no, execute step 320.
Step 340: perform echo cancellation in the data mode and reset the timer after having performed echo cancellation for a predetermined period of time; execute step 320.
In step 310 when operating in the data mode, all operational segments SEG1˜SEGM in the echo canceller 10 are activated for performing echo cancellation. In step 320 when operating in the power-saving mode, m operational segments among the operational segments SEG1˜SEGM in the echo canceller 10 are deactivated so that only (M−m) operational segments are performing echo cancellation. As depicted in
The impulse response of echo path learning is the convergence process of the adaptive filter AF. Once any environmental change influences the echo path of the electronic system 100, the echo canceller is required to re-learn the impulse response of the echo path in the new environment, which means that the adaptive filter AF requires a new convergence process for approximating the impulse response of the new echo path. When the power-saving mode is triggered in step 320 for performing echo cancellation, the adaptive filter AF may not be able to converge efficiently in response to environmental changes since not all the operational segments in the echo canceller 10 are activated.
Therefore, after determining that the timer has expired in step 330, the echo canceller 10 is configured to perform echo cancellation in the data mode for the predetermined period of time in step 340. In other words, after having performed echo cancellation in the power-saving mode for a period of time indicated by the timer, the echo canceller 10 is configured to perform echo cancellation in the data mode for the predetermined period of time. Therefore, when encountering environmental changes in the echo path, all operational segments in the echo canceller 10 are functional for achieving efficient convergence to stability.
Step 410: enter the data mode; execute step 420.
Step 420: trigger the power-saving mode for performing echo cancellation and detect a signal-to-noise ratio (SNR) on a real-time basis; execute step 430.
Step 430: determine whether the SNR is lower than a predetermined value; if yes, execute step 440; if no, execute step 420.
Step 440: perform echo cancellation in the data mode; execute step 420.
In step 410 when operating in the data mode, all operational segments SEG1˜SEGM in the echo canceller 10 are activated for performing echo cancellation. In step 420 when operating in the power-saving mode, m operational segments among the operational segments SEG1˜SEGM in the echo canceller 10 are deactivated so that only (M−m) operational segments are performing echo cancellation. Also, the electronic system 100 is configured to detect the SNR on a real-time basis in step 410 and then determine whether the SNR is lower than the predetermined value in step 430.
When determining that the SNR is not lower than the predetermined value, it means that all activated operational segments are operating in a converged state, and step 420 is thus executed for performing echo cancellation in the power-saving mode. When determining that the SNR is lower than the predetermined value, it means that the impulse response of the echo path in the environment of the electronic system 100 may be changed due to transmission length, temperature, noise or other external environmental factors, and that the echo canceller 10 may start to diverge and thus unable to provide sufficient echo cancellation. Under such circumstance, step 440 is executed for performing echo cancellation in the data mode, thereby achieving efficient convergence to stability.
In the present invention, the adaptive filter may be implemented as a plurality of operational segments. The operational segments with small computational load may be deactivated in the power-saving mode for reducing power consumption while maintaining the overall efficiency of echo path learning. Therefore, the present invention provides an electronic system with power-saving and high-efficient echo cancellation mechanism.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
108131628 | Sep 2019 | TW | national |