This invention relates to the field of signal processing, and in particular to an automatic gain control for adaptive speech echo cancellation, specifically to acoustic echo cancellation for loud speaking telephones, hands free car sets and voice conferencing systems. The invention also applies also to line echo cancellers.
An automatic gain control (AGC) systems, also known as an automatic level control (ALC) in some telecommunication applications, are used in multi-microphone high definition acoustic echo cancellation systems, for example, desktop phone devices, hands free car kits and the tele-presence (conferencing) systems. An automatic gain or level control is used to maintain constant signal level by varying the gain as a function of the input signal power as shown in
ITU-T G.169 states the desired features of ALC systems for telecommunication networks, but the standard does not enforce a particular design approach. The G.169 standard specifies a few tests that would insure the integrity of speech, voice-band data and signaling tones. Those standard tests also insure that the network gain or level control device will not change the levels of background noise or residual echo signals.
Existing automatic gain control systems suffer from a number of problems. They only work with signals that has small peak to average ratio (PAR). This is often not the case in speech systems. When the PAR is large, current solutions distort the desired signal by rapid update of the system gain, which also induces system howling. There is no return path, and yet the acoustic echo system has a return path. They do not control system howling, which is associated with closed loop systems.
Moreover, current solutions do not accommodate system silent periods, such that the gain might amplify background noise, which is also a factor induced system howling. They also amplify echo return loss (ERL) when it is smaller than 0 dB, which causes microphone saturation instead of speaker saturation, and suffer from lack of howling control.
Embodiments of the invention provide an effective automatic gain control as per the recommendations of ITU-T G.169 using several status signals from the voice echo cancellation system to decide on the gain levels in a unique integrated approach. A complete signal level control block in the acoustic closed loop system functions to deliver acceptable signal levels with nonstationary speech signals while preventing system howling.
According to the present invention there is provided a method of controlling gain in an acoustic system with a gain control module, comprising computing a first gain based on near-end signal levels; computing a second gain based on the output of the gain control module; computing a third gain based on a howling condition; and computing a final gain applied to the gain control module as the product of the first, second and third gains.
Embodiments of the invention control the amount of increase and reduction of the gain applied to the signals on the near-end and far-end paths of the acoustic echo cancellation system. The user can set a predetermined range of gain to be applied to the near-end signal. On the far-end path, the AGC will control the level of the input signal, which is used as a reference to the adaptive cancellation filter. The invention can be used with the other elements of the echo cancellation system, such as beamforming, noise reduction and filtering, to improve the overall speech quality of echo cancellation systems.
The invention will now be described in more detail, by way of example only, with reference to the accompanying drawings, in which:—
In the discussion that follows the following variables will be referred to:
Embodiments of the invention introduce a method for controlling the gain on the near-end and far-end paths of an acoustic echo cancellation system. The same control engine is called independently to control the gain on both paths. For distinction, the block on the far-end path will be referred to as an AGC, while the block on the near-end path will be referred to as ALC. The only difference between the two blocks is the input/output signals and the top level control, as shown in
Received signals are passed successively through equalizer pysychoacoustic AGC 32, automatic gain control 34, speaker linearization block 36, and dynamic range control block 38 to speaker 40. Anti howling unit 42 is connected between ALC 18 and AGC 34.
The main gain control value is divided into three gain elements to take into account the different factors that influence a closed loop acoustic echo cancellation system. The gains are:
1. G1: representing the gain part that changes based on the near-end signal levels (Sin).
2. G2: representing the gain part that changes based on the output of the gain control block, which is (Rout) for the AGC and the far-end output signal (Sout) for the ALC.
3. HG: representing the howling gain. The anti-howling block in the echo cancellation system reduces this gain based on a howling condition, and the gain control engine (AGC/ALC) brings back this gain in normal conditions.
Then, the total gain G is computed as follows
G=G
1
G
2
HG
The output signal of the gain control block is generated by multiplying this gain value G by the input signal. The core gain control engine provides a total of 18 dB dynamic range. In this design the value of 0x4000 corresponds to unity gain. Thus, multiplication result at the AGC output is shifted right by 13 to generate the 16-bit Rout signal. This corresponds to a maximum of 6 dBAGC gain. The ALC output (Sout), on the other hand is shifted by a programmable value to produce the desired maximum ALC Gain level (13 for 4-6 dB, 12 for 12 dB, etc.).
The description will be divided into the control logic and the gain control engine as shown in
The following is the ALC control sequence:
1. Compute Pi1 and Pout0 directly as the power of the input signal to the ALC block (ALCi),
2. Check if the system None-linear-processor (NLP) is active. If the NLP is active, skip the ALC engine call, and go to step 6 of this sequence.
3. Generate a logical variable TH5=˜[(Rin active)&&˜(Sin active)].
4. Call the Gain control engine.
5. Read back total G and generate the output G×ALCi.
6. Compute Pout as the power of the Sout signal for the next call of the ALC control logic sequence.
The following is the AGC control sequence:
1. Compute Pi1 as the power of the input signal Sin.
2. Compute Pout0 and Pout as the power of the Rout signal.
3. Generate a logical variable TH5=(Rin active).
4. Call the Gain control engine.
5. Read back total G and generate the output G×Rin.
The detailed implementation of the gain control engine is described in
In
AGC0 is the start state. If the AGC engine output power is “large”, i.e. above a predetermined threshold, the algorithm resets the handover counter which resets the period before the first gain increase (speed of increase) and reduces the far-end gain part (G2), which is related to the AGC input signal.
Then the algorithm moves to exit state AGC2. Otherwise (for low power), we need to increase the total gain, so we go to state AGC1.
In this state the algorithm measures the near-end power and the return-echo power. If both values are large, reset the handover counter is reset. Since there is an increase in near-end signal powers, the near-end gain component (G1) is reduced. Then the algorithm jumps to exit state AGC2. Otherwise (for low power), a gain increase is required, so the algorithm continues to state AGC3.
The following steps are performed in priority. Each step leads to exit state AGC2 if the condition is satisfied.
The algorithm checks first to increase the howling gain (HG). If it is “small”, then it gets incremented and the algorithm jumps to the exit state AGC2. Before changing the other two components of the total gain, HG is incremented to determine the impact on the system during the next few voice samples.
If the far end signal is not active for AGC (noise level detection) or double talk is detected for ALC we need to reduce the far-end gain component (G2), which is the only task performed in state AGC22, then the algorithm exits to state AGC2. Reducing the far end component of the total gain is intuitive since the far end signal does not exist and it is important not to increase the gain on purely noise signals. If the total gain is “large”, the algorithm just exits to AGC2.
A check is made to see if the handover time (counter) has been crossed; if yes the algorithm jumps to the gain increase state (AGC31), otherwise, the counter and the algorithm exits to state AGC2. This handover counter is an important solution to dealing with larger peak to average ratio in speech signals. It prevents a sudden reaction to any sudden change in signal power levels.
AGC31 (G1 and G2 Increase State):
Increment the values of these two gain components according to the programmable speed value.
Compute total gain and exit.
AGC0 in
1) If Pout>TH1 then reset the counter with the user programmable value (2), which works as the gain handover time for smooth gain update. If Pout<TH1 go to AGC1.
2) If G>0x800 then reduce G2 (1) as follows. G2=G2(1−2−11). Then go to AGC2. If G<0x800, go to AGC2.
AGC1 in
1) if (Pi1>2×TH2) and (Pout0>TH2) then reset the counter with the user programmable value (2). Otherwise go to AGC3.
2) If (G>0x800) and (G1>TH3) then reduce G1 (3) as follows then go to AGC2. Otherwise, go to AGC2.
AGC3 in
1) If (HG<TH4) then increment HG (4) as follows HG=HG(1+2−18AGCUP), then go to AGC2.
2) If (TH5), which is described in the control logic part, is logical zero, then go to AGC22,
3) if (G>TH6) then go to AGC2.
4) If (Counter==0) go to AGC31, otherwise decrement Counter and go to AGC2.
AGC31 in
1) If (G1<TH7) increment G1 (6) as follows G1=G1(1+2−18AGCUP), then go to AGC2.
2) Increment G2 (5) as follows G2=G2(1+2−18AGCUP), then go to AGC2.
AGC22 in
1) if (G2<TH8) then reduce G2 (7) as follows G2=G2(1+2−11), otherwise, go to AGC2.
AGC22 in
The algorithm utilizes noise level status, double talk status and average signal power to increase or decrease signal levels in the forward and return paths of the closed loop system. The level control is performed using different up and down speeds, which is essential for speech signals with large peak to average ratio. Embodiments of the invention provide an integrated automatic level control procedure for closed loop voice systems in reverberant environments.
Novel aspects of invention include a new method for gain level control in acoustic systems, a new algorithm for gradual adaptation of the path gain levels through dividing the gain into three elements, each controlled by specific system signals, controlled gain increase speed through a programmable hand over counter and gain step size, and the inclusion of an anti-howling gain factor in the over all adaptive gain control engine. Embodiments of the invention control the increase of the howling gain through gain levels and programmable step size. Also, the same gain control engine is used on both near-end and far-end paths by passing the corresponding relevant path control and status bits.
Thus, in accordance with embodiments of the invention that the gain is controlled with different up and down speeds, noise level and double talk detection is used so that the gain is unchanged during system quite periods, use is made of the signal power on both the forward and the return paths to provide a complete solution. The howling gain is also controlled.
The invention is applicable to any acoustic echo cancellation environment, such as hands free car kits, wireless applications and desktop phones.
It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the invention. For example, a processor may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. Moreover, explicit use of the term “processor” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, network processor, application specific integrated circuit (ASIC), field programmable gate array (FPGA), read only memory (ROM) for storing software, random access memory (RAM), and non volatile storage. Other hardware, conventional and/or custom, may also be included. The term circuit is used herein to encompass functional blocks that may in practice be implemented in software.
Number | Date | Country | Kind |
---|---|---|---|
1108340.9 | May 2011 | GB | national |