The working princip...

  • 2022-09-23 10:06:27

The working principle of practical AGC algorithm and its application in audio FPGA

With the widespread use of modern communication technologies, the competition among communication enterprises is intensifying. In order to enhance their own competitive advantages, communication enterprises need to improve the quality of their communication signals and improve the stability, security, and efficiency of various indicators of the communication system. sex. In the audio signal processing method and FPGA implementation, using the AGC algorithm can improve the stability of the audio signal system and audio signal output, and solve the problem of signal distortion after AGC debugging. This paper analyzes and researches the audio signal processing method and FPGA implementation based on the practical AGC algorithm, and its related contents.

1. The principle of practical AGC algorithm in practical application In the process of using communication equipment, voice communication is an important part, and the quality of audio signal in language communication determines people's choice of communication system. AGC is currently used in communication audio signal processing, which can ensure the stability of signal output and reduce the interference of signal output. Through actual verification, there are certain differences between the practical AGC algorithm and the ordinary AGC algorithm. The practical AGC algorithm is generated on the basis of the ordinary AGC algorithm. It can not only effectively reduce the interference factors in signal transmission, but also ensure that the audio signal is transmitted during transmission. The stability of the audio signal can be accurately displayed. With the development of science and technology, the application of digital processing technology in audio signal processing can reduce signal interference and realize FPGA.

Automatic Gain Control (AGC). It is mainly composed of gain amplifier and feedback loop. In its working process, the gain amplifier component uses a certain AGC algorithm to adjust the gain value according to the amplitude and threshold of the feedback loop in the system. That is, the AGC adjusts the automatic control of the signal by automatically increasing the strength of the signal in the amplifying circuit. When the signal strength increases, the control of the feedback loop of the AGC system will be correspondingly reduced according to a certain relationship; on the contrary, when the signal amplitude in the gain amplifier of the AGC system decreases, the gain of the feedback loop will be based on a certain relationship between the two. , and increase accordingly. Through this method, after the amplification and adjustment of the AGC algorithm, it is ensured that the amplitude of the signal output of the communication system can be basically maintained in a constant state. In this paper, the AGC algorithm is applied to audio signal processing, which can realize FPGA, and can effectively reduce the interference of audio signal output and ensure the stability of the signal.

2. Audio signal processing design based on AGC algorithm

In the audio signal processing process, the application of the AGC algorithm is divided into 4 steps:

Step 1 Determine the dynamic range of the audio signal output. In the design of audio signal processing based on the use of the AGC algorithm, it needs to be determined according to the actual situation of the audio signal. If in the design process, the expected value in the practical AGC system is a fixed value, the amplitude of the audio signal output will approach the expected value of the AGC system at this time. In the process of approaching this expected value, the output signal will be continuously adjusted, which will cause the amplitude of the signal output to become unstable. Therefore, in order to ensure the stability of the audio signal output, on the basis of the expected value of AGC, the expected value can be centered on the desired value. Design and determine a dynamic range in which the audio signal output is stable. When the amplitude of the audio signal is within this dynamic range during the adjustment of the AGC algorithm, it can be determined that the output amplitude of the audio signal is stable. In general, the range of the audio signal output amplitude is plus or minus 0.1 dB from the expected value of the AGC system. At the same time, in order to protect the circuit of the audio signal output, it is necessary to set the expected value of the AGC system to reduce 0.25 dB under the full value of the audio signal output.

Step 2 Determine the gain adjustment speed. In normal voice communication, the amplitude of the speech signal is constantly changing. In order to determine, ensure and present the normal change trend of the amplitude of the speech signal, it is necessary to ensure that its gain remains unchanged or changes within a small range, so that the Ensure that the amplitude of the audio signal transmission is not distorted. The interference received during the transmission of the audio signal makes the average amplitude of the audio signal relatively small, so the gain value needs to be increased to ensure that the overall amplitude of the signal is increased, so as to ensure that the audio signal is not distorted. For the application of practical AGC in audio signal, its gain value needs to be slow and fast, and change suddenly and quickly with the slow change of signal amplitude. When the audio signal gain adjustment time is longer than the normal audio signal adjustment time, the gain value at this time will not change greatly. It is necessary to set the gain adjustment time to 4 according to the characteristics of the audio signal output. s. If the output of the audio signal is large, the gain at this time needs to be rapidly reduced. If the reduction adjustment is not performed, the device will be damaged. When the output value of the signal is greater than the upper limit of the expected value, the gain value adjustment time needs to be set to 0.5 ms.

The working principle of practical AGC algorithm and its application in audio FPGA


Step 3 Determine the dynamic range of the input signal. In the process of audio signal input, if the set input value range is too large, the signal will generate large noise during the transmission process, which will affect the input and output quality of the signal. On the contrary, if the setting range of the audio input signal is small, the signal will be ignored because the signal is small, thereby causing the audio input signal to be distorted. According to the input time of the audio signal, the signal strength of 36 dB is determined as noise. Using the AGC algorithm, the input dynamic range of the audio signal can be determined, and it can be judged whether the noise occurs in the gap of the audio signal transmission according to the existence time of the noise. gap. Usually the noise judgment time is set to 5 s for the best. According to the existence time of the noise and the actual situation of the signal input, the range of about 6 dB between the minimum value of the audio signal and the noise threshold is determined as the dynamic range of the audio signal input. In this range, the interference strength of noise to the audio signal is relatively high, so the gain value needs to be fixed.

Step 4 Limit the gain value. In order to avoid excessive gain and burn the signal transmission device or equipment, it is necessary to control its gain value within a range. If the value calculated by AGC is greater than the upper limit of the range, the gain value shall take the maximum value at this time, and vice versa. minimum value. According to the actual transmission of the audio signal, the gain range is -3 to 30 dB.

Through the above four steps, the application process of the practical AGC algorithm in audio signal processing can be designed as shown in Figure 1.

The working principle of practical AGC algorithm and its application in audio FPGA

3 Audio signal processing simulation and implementation of AGC algorithm

3.1 Simulation experiment

In audio signal processing, AGC simulation experiments are made according to the amplitude changes of audio input and output. According to the process of the practical AGC algorithm and the signal calculation formula (2), the audio output signal is calculated. At this time, when the audio signal suddenly decreases, the overshoot phenomenon will occur. In order to eliminate/avoid the overshoot phenomenon, it is necessary to follow the practical The AGC algorithm formula adds a delay to the output of the audio signal, and the delay can be calculated according to formula (3)

y(n)=x(n)×G(n) (2)

y(n)=x(n-32)×G(n) (3)

Increasing the delay of the audio signal can solve and eliminate the overshoot phenomenon. Although increasing the delay will have a certain impact on the audio signal, its adverse effect is within an acceptable range. The simulation results are shown in Figure 2 and Figure 3.

The working principle of practical AGC algorithm and its application in audio FPGA

In the process of audio signal input, when the audio signal gain becomes larger, it will be relatively slow, the gain delay performed at this time is relatively small, and the amplitude of gain increase is relatively small, although the output audio signal is larger, But it is close to the ideal output amplitude, so it will not affect the safety of the signal output device.

3.2 Implementation of FPGA

In the experiment, the signal processing flow of FPGA is shown in Figure 4.

The working principle of practical AGC algorithm and its application in audio FPGA

The audio signal is digitally filtered in the form of audio sampling to obtain the I and Q signals in Figure 4. The following formula can be used

The working principle of practical AGC algorithm and its application in audio FPGA

Calculate the amplitude of the two signals formed, and the amplitude of the feedback in the AGC system is calculated by A(n)=Ain(n)×G(n) formula (5). The audio signal is gain adjusted according to the calculated A and Ain values, and the adjustment time is 4 s.

When the amplitude of the audio signal changes, at the beginning of the gain, the adjustment is relatively fast, and the influence on the gain is greater at this time, that is, the signal gain changes greatly. After about 4 s of gain adjustment, the output value of the signal amplitude can be adjusted to the desired value. With the rapid change of the input audio signal, the output audio signal will also change correspondingly with the change of the input signal, but in the input signal When it suddenly increases, the audio output signal will not change significantly, thus realizing the audio FPGA based on the AGC algorithm.

4 Conclusion

The working principle of AGC algorithm, audio signal processing, FPGA and other contents are analyzed. In the process of audio signal processing, the practical AGC algorithm is adopted, and the application of practical AGC algorithm in audio signal processing and FPGA implementation is obtained through simulation experiments, which can reduce the distortion problem in signal transmission and effectively improve the stability of signal transmission. . The experimental results show that the practical AGC algorithm is applied to the audio signal processing method and FPGA implementation, and it has good performance and ensures the stability of the signal.