CN108768329B - Dual AGC system - Google Patents

Dual AGC system Download PDF

Info

Publication number
CN108768329B
CN108768329B CN201810812700.9A CN201810812700A CN108768329B CN 108768329 B CN108768329 B CN 108768329B CN 201810812700 A CN201810812700 A CN 201810812700A CN 108768329 B CN108768329 B CN 108768329B
Authority
CN
China
Prior art keywords
signal
gain
value
agc
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810812700.9A
Other languages
Chinese (zh)
Other versions
CN108768329A (en
Inventor
蒋松鹰
姚炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Awinic Technology Co Ltd
Original Assignee
Shanghai Awinic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Awinic Technology Co Ltd filed Critical Shanghai Awinic Technology Co Ltd
Priority to CN201810812700.9A priority Critical patent/CN108768329B/en
Publication of CN108768329A publication Critical patent/CN108768329A/en
Application granted granted Critical
Publication of CN108768329B publication Critical patent/CN108768329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03GCONTROL OF AMPLIFICATION
    • H03G3/00Gain control in amplifiers or frequency changers without distortion of the input signal
    • H03G3/20Automatic control
    • H03G3/30Automatic control in amplifiers having semiconductor devices
    • H03G3/3005Automatic control in amplifiers having semiconductor devices in amplifiers suitable for low-frequencies, e.g. audio amplifiers
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03GCONTROL OF AMPLIFICATION
    • H03G2201/00Indexing scheme relating to subclass H03G
    • H03G2201/40Combined gain and bias control

Abstract

The application discloses a dual AGC system, comprising: a zero-crossing detection unit; the gain linearization unit is used for finding a linearized first gain adjustment value and a linearized second gain adjustment value in the linear lookup table according to the automatic gain stepping signal when the digital input signal is over zero; the output gain adjusting unit is used for obtaining a digital output signal after multiplication and saturation operation processing according to the digital input signal and the first gain adjusting value; the input gain adjusting unit is used for obtaining an input gain adjusting signal after multiplication and saturation operation processing according to the digital input signal and the second gain adjusting value; a selection unit for selectively outputting a digital output signal or an input gain adjustment signal according to the mode signal received at the mode signal input terminal; and the automatic gain control unit is used for generating an automatic gain stepping signal according to the output signal of the selection signal output end. The application can avoid the risks of digital input signal truncated and signal overcompression.

Description

Dual AGC system
Technical Field
The application relates to the field of automatic gain control, in particular to a dual AGC system.
Background
In the field of audio signal processing, there has been considerable research into automatic gain control of digital audio signals, and in order to make audio signals amplified without damaging a speaker and without breaking sound, automatic gain control (automatic gain control, AGC) techniques have been widely used in digital audio processing. Such as in prior art fig. 1: the output signal is directly used to check if the gain is too large and to adjust the gain of the input signal. In prior art fig. 2: the disadvantage of prematurely sounding the sound in fig. 1 can be effectively prevented by adjusting the signal gain at the time of signal zero crossing when checking whether the gain is adjusted.
However, while fig. 2 effectively prevents the disadvantage of premature sounding of the sound of fig. 1 by adjusting the signal gain at zero crossing, its AGC strategy is too simple and is prone to the risk of digital input signal clipping and signal overcompression.
Disclosure of Invention
In view of this, the present application aims to provide a dual AGC system to avoid the risk of digital input signal truncation and signal overcompression.
Specifically, the present application provides a dual AGC system comprising:
the zero-crossing detection unit is used for detecting whether the digital input signal crosses zero;
the gain linearization unit is used for finding a linearized first gain adjustment value and a linearized second gain adjustment value in the linear lookup table according to an automatic gain stepping signal when the digital input signal is over zero;
the output gain adjusting unit is used for obtaining a digital output signal after multiplication and saturation operation processing according to the digital input signal and the first gain adjusting value;
the input gain adjusting unit is used for obtaining an input gain adjusting signal after multiplication and saturation operation processing according to the digital input signal and the second gain adjusting value;
a selection unit comprising: a mode signal input, a first selection signal input for receiving the digital output signal, a second selection signal input for receiving the input gain adjustment signal, and a selection signal output; the selection signal output end is used for selectively outputting the digital output signal or the input gain adjustment signal according to the mode signal received by the mode signal input end;
and the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the selection signal output end.
Further, the dual AGC system further includes:
the large prevention unit is used for amplifying the digital input signal according to preset amplification parameters to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, the first multiplier calculates a first product of the amplified digital input signal and a first gain adjustment value, and the first saturation operation processor is used for carrying out saturation operation on the first product to obtain the digital output signal;
the input gain adjusting unit comprises a second multiplier and a second saturation operation processor, the second multiplier calculates a second product of the amplified digital input signal and a second gain adjusting value, and the second saturation operation processor is used for carrying out saturation operation on the second product to obtain the input gain adjusting signal.
Further, the dual AGC system further includes an absolute value calculating unit, and an input end of the absolute value calculating unit is connected to a selection signal output end of the selecting unit; the output end of the absolute value calculating unit is connected with the input end of the automatic gain control unit;
the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the output end of the absolute value calculation unit.
Further, the automatic gain control unit includes:
a reset signal end, a fast gain enabling end and a slow gain enabling end;
the signal peak monitoring module is used for judging whether the input signal of the automatic gain control unit exceeds a preset fast AGC amplitude threshold value, a preset slow AGC amplitude threshold value and a preset AGC release amplitude threshold value, and generating corresponding monitoring values according to a judging result, wherein the monitoring values comprise a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value and an AGC release amplitude monitoring value;
the main control state machine is used for determining the working state of the corresponding monitoring value according to the preset corresponding relation between the fast gain count value, the slow gain counter, the maintenance gain count value and the working state of each monitoring value and each dynamic gain control unit, and outputting the current working state information and the next working state information; the working state comprises the following steps: a Release (Release) state in which gain adjustment is not performed on the digital input signal, a track (attach) state in which gain adjustment is performed fast/slow on the digital input signal, a HOLD (HOLD) state in which output of the digital input signal at a fixed gain amplitude is maintained;
the fast gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset fast AGC, and obtaining the fast gain count value;
the slow gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset slow AGC to obtain the slow gain count value;
the holding gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment when the AGC amplitude is held in a preset mode, and the holding gain count value is obtained;
the gain step adjustment module is configured to generate the automatic gain step signal according to the current working state information, the next working state information, the fast gain count value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, where the automatic gain step signal is limited at a preset maximum value of gain step adjustment.
Further, the zero-crossing detection unit includes:
a first delay register, a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
the logic NOR operation module is used for receiving the digital input signal at a first end, receiving the signal at the output end of the first delay register at a second end and outputting the signal at the second end;
the logic OR operation module is used for receiving the detection result of the minimum of the digital input signal near the positive value, the second end is used for receiving the detection result of the minimum of the digital input signal near the negative value, the third end is used for receiving the output signal of the second output end, and the third output end is used for outputting the zero-crossing detection signal.
Further, the gain linearization unit includes:
an adder for calculating a gain sum value obtained by adding a preset gain value and an automatic gain step signal;
a second delay register comprising: the data input end is used for receiving the gain sum value, the clock signal input end, the enabling end used for receiving the zero crossing detection signal and the delay data output end;
a selector, comprising: an enable terminal for receiving the zero-crossing detection signal, a first selection input terminal for receiving the gain and the value, a second selection input terminal for connecting the delay data output terminal, and a selection output terminal for selectively outputting an output signal for receiving the gain and the value or the delay data output terminal according to the zero-crossing detection signal;
the first lookup table module is used for finding a linearized first gain adjustment value in the linear lookup table according to the output signal of the selection output end;
and the second table look-up module is used for finding a linearized second gain adjustment value in the linear table look-up according to the gain sum value.
Further, the gain linearization unit further includes: and the input end of the amplitude limiting module is connected with the output end of the adder, and the output end of the amplitude limiting module is connected with the data input end of the second delay register.
Further, the entering conditions of the release state include:
the reset signal end receives a reset signal, and the fast gain enabling end and the slow gain enabling end do not receive an enabling signal; or alternatively, the process may be performed,
when in a hold state, the signal peak monitoring module cannot detect that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and enters the release state after the hold gain counter is full;
the condition for the release state to enter the tracking state includes: the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold.
Further, the entering condition of the tracking state includes:
the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold;
the condition that the tracking state enters the holding state includes:
the signal peak monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold and the slow AGC amplitude threshold.
Further, the entry conditions of the hold state include:
when in the tracking state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold value and the slow AGC amplitude threshold value;
when the automatic gain control unit is in the holding state, the signal peak value monitoring module detects that an input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition for the hold state to enter the tracking state includes:
the signal peak monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and the holding gain counter is full.
According to the dual AGC system, the output gain adjusting unit, the input gain adjusting unit and the selecting unit are arranged, the selecting signal output end is used for selectively outputting the digital output signal or the input gain adjusting signal according to the mode signal received by the mode signal input end, so that on a judging source of the automatic gain control unit, the digital output signal after AGC or the input gain adjusting signal after pre-amplification is configured and selected, the dual AGC system has more flexible selection on an AGC application scene, can dynamically adjust the amplitude of an audio signal in real time, furthest reserves original sound and reduces the risks of signal truncated and signal overcompression.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application. In the drawings, like reference numerals are used to identify like elements. The drawings, which are included in the description, illustrate some, but not all embodiments of the application. Other figures can be derived from these figures by one of ordinary skill in the art without undue effort.
Fig. 1 is a schematic topology diagram of a prior art first AGC system;
fig. 2 is a schematic topology diagram of a second prior art AGC system;
fig. 3 is a schematic topology diagram of a dual AGC system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a dual AGC system according to an embodiment of the present application;
fig. 5 is a schematic waveform diagram of a fast AGC amplitude threshold and a slow AGC amplitude threshold in a dual AGC system according to an embodiment of the present application;
fig. 6 is a block diagram of an automatic gain control unit in a dual AGC system according to an embodiment.
FIG. 7 is a state transition diagram of a master state machine in the AGC unit of FIG. 6;
fig. 8 is a schematic structural diagram of a zero crossing detection unit and a gain linearization unit in a dual AGC system according to an embodiment of the present application.
Fig. 9 is a schematic diagram of saturation operation in a dual AGC system according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be arbitrarily combined with each other.
The dual AGC system to which the present application is directed is described in detail below with reference to the accompanying drawings.
Referring to fig. 3 to 4, a dual AGC system according to an embodiment of the present application includes:
the zero-crossing detection unit is used for detecting whether the digital input signal crosses zero;
the gain linearization unit is used for finding a linearized first gain adjustment value and a linearized second gain adjustment value in the linear lookup table according to an automatic gain stepping signal when the digital input signal is over zero;
the output gain adjusting unit is used for obtaining a digital output signal after multiplication and saturation operation processing according to the digital input signal and the first gain adjusting value;
the input gain adjusting unit is used for obtaining an input gain adjusting signal after multiplication and saturation operation processing according to the digital input signal and the second gain adjusting value;
a selection unit comprising: a mode signal input, a first selection signal input for receiving the digital output signal, a second selection signal input for receiving the input gain adjustment signal, and a selection signal output; the selection signal output end is used for selectively outputting the digital output signal or the input gain adjustment signal according to the mode signal received by the mode signal input end;
and the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the selection signal output end.
Preferably, the dual AGC system further comprises:
the large prevention unit is used for amplifying the digital input signal according to preset amplification parameters to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, the first multiplier calculates a first product of the amplified digital input signal and a first gain adjustment value, and the first saturation operation processor is used for carrying out saturation operation on the first product to obtain the digital output signal;
the input gain adjusting unit comprises a second multiplier and a second saturation operation processor, the second multiplier calculates a second product of the amplified digital input signal and a second gain adjusting value, and the second saturation operation processor is used for carrying out saturation operation on the second product to obtain the input gain adjusting signal.
Preferably, the dual AGC system further includes an absolute value calculating unit, and an input end of the absolute value calculating unit is connected to a selection signal output end of the selecting unit; the output end of the absolute value calculating unit is connected with the input end of the automatic gain control unit;
the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the output end of the absolute value calculation unit.
Table 1 lists the meanings represented for each symbol in fig. 3, and table 2 lists the meanings represented for each symbol in fig. 4. The control signals in brackets of fig. 4 are all configurable parameters giving the application great flexibility to be adapted to various situations. The automatic gain control unit is mainly used for judging the amplitude of the input signal abs_agc to obtain the gain step acc_cnt [5:0] to be adjusted.
TABLE 1
TABLE 2
According to the embodiment, through the pre-judgment of the digital input signal, the gain of the input signal is adjusted after the zero crossing detection of the signal, so that the signal is effectively prevented from being over-compressed and the audio signal is prevented from becoming sound prematurely. Meanwhile, the application improves the pretreatment of the signals, and after 16bits of digital quantized signals Din [15:0], the application pre-amplifies the signals, thereby effectively improving the dynamic range of the digital signals. The present application can select the output quantized signal after AGC or the input quantized signal after pre-amplification by configuration on the judging source of automatic gain. Thus, the AGC has more flexible selection in the application scene. The embodiment dynamically adjusts the amplitude of the audio signal in real time, so that the original sound is reserved to the maximum extent, and the risks of signal truncated and signal overcompression are reduced.
As shown in fig. 6, specifically, the automatic gain control unit includes:
a reset signal end, a fast gain enabling end and a slow gain enabling end;
the signal peak monitoring module is used for judging whether the input signal of the automatic gain control unit exceeds a preset fast AGC amplitude threshold, a preset slow AGC amplitude threshold and a preset AGC release amplitude threshold shown in fig. 5, and generating corresponding monitoring values according to a judging result, wherein the monitoring values comprise a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value and an AGC release amplitude monitoring value;
the main control state machine (FSM_controller) is used for determining the working state of the corresponding monitoring value according to the preset corresponding relation between the fast gain count value, the slow gain counter, the holding gain count value and the working state of each monitoring value and each dynamic gain control unit, and outputting the current working state information and the next working state information; the operating states include the following various states as shown in fig. 7: a release state in which gain adjustment is not performed on the digital input signal, a tracking state in which gain adjustment is performed on the digital input signal at a high/low speed, and a hold state in which output of the digital input signal at a fixed gain amplitude is maintained;
the fast gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset fast AGC, and obtaining the fast gain count value;
the slow gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset slow AGC to obtain the slow gain count value;
the holding gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment when the AGC amplitude is held in a preset mode, and the holding gain count value is obtained;
the gain step adjustment module is configured to generate the automatic gain step signal according to the current working state information, the next working state information, the fast gain count value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, where the automatic gain step signal is limited at a preset maximum value of gain step adjustment.
As shown in fig. 8, the zero-crossing detection unit includes:
a first delay register, a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
the logic NOR operation module is used for receiving the digital input signal at a first end, receiving the signal at the output end of the first delay register at a second end and outputting the signal at the second end;
the logic OR operation module is used for receiving the detection result of the minimum of the digital input signal near the positive value, the second end is used for receiving the detection result of the minimum of the digital input signal near the negative value, the third end is used for receiving the output signal of the second output end, and the third output end is used for outputting the zero-crossing detection signal.
The zero crossing adjustment ensures that the signal amplitude is adjusted in gain only when the zero crossing point is reached, so that the phenomenon that the sound becomes sound or pop sound occurs due to the fact that the signal gain is adjusted too early is avoided, and the sound is adjusted smoothly and softly. Note that: the zero crossing adjustment is detected only for the input Din 15:0 signals. Since gain is only adjusted for zero crossings of the input signal, it is the AGC target.
Further, the gain linearization unit includes:
an adder for calculating a gain sum value obtained by adding a preset gain value and an automatic gain step signal;
a second delay register comprising: the data input end is used for receiving the gain sum value, the clock signal input end, the enabling end used for receiving the zero crossing detection signal and the delay data output end;
a selector, comprising: an enable terminal for receiving the zero-crossing detection signal, a first selection input terminal for receiving the gain and the value, a second selection input terminal for connecting the delay data output terminal, and a selection output terminal for selectively outputting an output signal for receiving the gain and the value or the delay data output terminal according to the zero-crossing detection signal;
the first lookup table module is used for finding a linearized first gain adjustment value in the linear lookup table according to the output signal of the selection output end;
and the second table look-up module is used for finding a linearized second gain adjustment value in the linear table look-up according to the gain sum value.
Gain Linear Table in fig. 8 is a linearized look-up table: and finding out the linearized gain through stepping the gain, and feeding back to the input and output gain adjustment modules. The gain adjustment is completed by directly multiplying (multiplying) the input signal and the output feedback signal with the linear gain and performing Saturation operation (Saturation).
With continued reference to fig. 8, the gain linearization unit further includes: and the input end of the amplitude limiting module is connected with the output end of the adder, and the output end of the amplitude limiting module is connected with the data input end of the second delay register. Table 3 shows the meanings of the symbols in FIG. 8.
TABLE 3 Table 3
Continuing with fig. 7, the entry conditions for the released state include:
the reset signal end receives a reset signal, and the fast gain enabling end and the slow gain enabling end do not receive an enabling signal; or alternatively, the process may be performed,
when in a hold state, the signal peak monitoring module cannot detect that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and enters the release state after the hold gain counter is full;
the condition for the release state to enter the tracking state includes: the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold.
The above can also be described in the following intuitive manner for the released state:
(1) release state [ release ]
Processing content
At the moment, the gain adjustment is not carried out on the signal, and the dynamic range of the signal can be within
FromIn the previous state
The reset signal rst_n is active. (rst_n=0)
The module of the present application is not enabled. (enable=0)
[ Hold ] 1) while in the hold state, no threshold exceeding Fast/Slow is detected,
and also does not exceed the release threshold, the release state is entered after the hold _ cnt counter is full.
Transition to the next state
[ tracking ] 1) detects that the amplitude threshold of the fast AGC is exceeded (above_avth1=1)
2) An amplitude threshold exceeding the slow AGC is detected (above_avth0=1)
Is kept in the present state
Other conditions
Further, the entering condition of the tracking state includes:
the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold;
the condition that the tracking state enters the holding state includes:
the signal peak monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold and the slow AGC amplitude threshold.
The above can also be described in the following intuitive manner for tracking states:
(2) AGC tracking state [ tracking ]
Processing content
Fast and slow gain adjustment is carried out on the signal to ensure that the signal is not truncated and maintain high power output
From the previous state
[ IDLE ] 1) detects that the amplitude threshold of the fast AGC is exceeded (above_avth1=1)
2) An amplitude threshold exceeding the slow AGC is detected (above_avth0=1)
[ Hold ] 1) detects that the amplitude threshold of the fast AGC is exceeded (above_avth1=1)
2) An amplitude threshold exceeding the slow AGC is detected (above_avth0=1)
Transition to the next state
[ hold ] 1) detect signal threshold, neither the fast AGC nor the slow AGC threshold
Exceeding (above_avth1=0 and above_avth0=0)
Is kept in the present state
Other conditions
Further, the entry conditions of the hold state include:
when in the tracking state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold value and the slow AGC amplitude threshold value;
when the automatic gain control unit is in the holding state, the signal peak value monitoring module detects that an input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition for the hold state to enter the tracking state includes:
the signal peak monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and the holding gain counter is full.
The above can also be described in the following intuitive manner for the hold state:
(3) hold state [ hold ]
Processing content
The signal does not need to adjust the gain at this time, and the output of the signal at a fixed gain amplitude is maintained.
From the previous state
[ tracking ] 1) no exceeding of the amplitude threshold (above_avth1) of the fast AGC is detected
=0) and cannot be detected to exceed the amplitude threshold of the slow AGC (above_avth0=0)
[ hold ] 1) detects that the release amplitude threshold of AGC is exceeded (above_rvth=1)
Transition to the next state
[ Release ] 1) the release counter expires (hold_cnt > = hold_time_th) and no fast, slow, release amplitude threshold exceeding the AGC is detected. (above_avth1=0 and above_avth0=0 and above_rvth=0)
Is kept in the present state
Others
Fig. 9 is a simplified illustration of the saturation operation of the signed signal of the present application, the signal passing through SSAT (Signed Saturation), being output as a normal gain adjusted digital audio signal. As can be seen in the figure: if the saturation operation is not performed, the signal will be distorted. Whereas the saturation operation ensures that the signal is not distorted.
The working principle of the dual AGC system is briefly described below by combining the above figures: after pre-amplification, the audio quantized signal Din [15:0] is subjected to output signal gain adjustment and output after saturation operation processing. After zero crossing detection, the input signal is subjected to linearization processing on the adjustment gain generated by the automatic gain control unit, then the gain is adjusted on the input signal and the output signal respectively, the adjusted signal is returned to the automatic gain control unit again through the configuration of the selectable source, and the gain step of the signal is further adjusted.
In the application, the quantized digital signal is preamplified, the AGC gain step calculated by the automatic gain control module is used for carrying out multiplication and saturation operation on the quantized digital signal and the preamplified signal by searching the linear gain corresponding to the gain step when the signal crosses zero, so as to obtain the final output gain. The application uses two feedback of output and input to detect gain, and carries out gain adjustment to signals through built-in fast and slow gain adjustment functions. The signal can be quickly adjusted without truncated gain, and the high-power stable output signal can be ensured under the condition of slow gain adjustment. The dual AGC architecture circuit of the present application has good multi-scenario applicability due to the pursuit of sound quality, music listening. The circuitry of this architecture is capable of: 1, a certain dynamic range is improved on the signal, the implementation mode is very simple, the implementation can be realized easily, and the original signal can be reserved through the configurable zero activity. 2, because of having the optional, configurable of high-low gain compression threshold value of the dual signal source, signal compression ratio and compression rate dynamic match and fine general characteristic, the dual AGC framework of the application can be widely applied to the digital audio power amplifier chip and need the chip like relevant digital signal processing.
It will be understood by those skilled in the art that all or part of the steps/units/modules implementing the above embodiments may be implemented by hardware associated with program instructions, and the above programs may be stored in a computer readable storage medium, which when executed, perform steps including corresponding steps in the units of the above embodiments; and the aforementioned storage medium includes: various media such as ROM, RAM, magnetic or optical disk may store program code.
While the foregoing is directed to embodiments of the present application, other and further details of the application may be had by the present application, it should be understood that the foregoing description is merely illustrative of the present application and that no limitations are intended to the scope of the application, except insofar as modifications, equivalents, improvements or modifications are within the spirit and principles of the application.

Claims (10)

1. A dual AGC system, comprising:
the zero-crossing detection unit is used for detecting whether the digital input signal crosses zero;
the gain linearization unit is used for finding a linearized first gain adjustment value and a linearized second gain adjustment value in the linear lookup table according to an automatic gain stepping signal when the digital input signal is over zero;
the output gain adjusting unit is used for obtaining a digital output signal after multiplication and saturation operation processing according to the digital input signal and the first gain adjusting value;
the input gain adjusting unit is used for obtaining an input gain adjusting signal after multiplication and saturation operation processing according to the digital input signal and the second gain adjusting value;
a selection unit comprising: a mode signal input, a first selection signal input for receiving the digital output signal, a second selection signal input for receiving the input gain adjustment signal, and a selection signal output; the selection signal output end is used for selectively outputting the digital output signal or the input gain adjustment signal according to the mode signal received by the mode signal input end;
and the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the selection signal output end.
2. The dual AGC system of claim 1, further comprising:
the large prevention unit is used for amplifying the digital input signal according to preset amplification parameters to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, the first multiplier calculates a first product of the amplified digital input signal and a first gain adjustment value, and the first saturation operation processor is used for carrying out saturation operation on the first product to obtain the digital output signal;
the input gain adjusting unit comprises a second multiplier and a second saturation operation processor, the second multiplier calculates a second product of the amplified digital input signal and a second gain adjusting value, and the second saturation operation processor is used for carrying out saturation operation on the second product to obtain the input gain adjusting signal.
3. The dual AGC system of claim 2, further comprising an absolute value calculation unit, an input of the absolute value calculation unit being connected to a selection signal output of the selection unit; the output end of the absolute value calculating unit is connected with the input end of the automatic gain control unit;
the automatic gain control unit is used for generating the automatic gain stepping signal according to the output signal of the output end of the absolute value calculation unit.
4. A dual AGC system according to any one of claims 1-3, wherein the automatic gain control unit comprises:
a reset signal end, a fast gain enabling end and a slow gain enabling end;
the signal peak monitoring module is used for judging whether the input signal of the automatic gain control unit exceeds a preset fast AGC amplitude threshold value, a preset slow AGC amplitude threshold value and a preset AGC release amplitude threshold value, and generating corresponding monitoring values according to a judging result, wherein the monitoring values comprise a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value and an AGC release amplitude monitoring value;
the main control state machine is used for determining the working state of the corresponding monitoring value according to the preset corresponding relation between the fast gain count value, the slow gain count value, the maintenance gain count value and the working state of each monitoring value and each dynamic gain control unit, and outputting the current working state information and the next working state information; the working state comprises the following steps: a release state in which gain adjustment is not performed on the digital input signal, a tracking state in which gain adjustment is performed on the digital input signal at a high/low speed, and a hold state in which output of the digital input signal at a fixed gain amplitude is maintained;
the fast gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset fast AGC, and obtaining the fast gain count value;
the slow gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment of the preset slow AGC to obtain the slow gain count value;
the holding gain counter is used for counting according to the current working state information, the next working state information and the duration time required by the one-step gain adjustment when the AGC amplitude is held in a preset mode, and the holding gain count value is obtained;
the gain step adjustment module is configured to generate the automatic gain step signal according to the current working state information, the next working state information, the fast gain count value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, where the automatic gain step signal is limited at a preset maximum value of gain step adjustment.
5. The dual AGC system of claim 4, wherein the zero crossing detection unit comprises:
a first delay register, a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
the logic NOR operation module is used for receiving the digital input signal at a first end, receiving the signal at the output end of the first delay register at a second end and outputting the signal at the second end;
the logic OR operation module is used for receiving the detection result of the minimum of the digital input signal near the positive value, the second end is used for receiving the detection result of the minimum of the digital input signal near the negative value, the third end is used for receiving the output signal of the second output end, and the third output end is used for outputting the zero-crossing detection signal.
6. The dual AGC system of claim 5, wherein the gain linearization unit comprises:
an adder for calculating a gain sum value obtained by adding a preset gain value and an automatic gain step signal;
a second delay register comprising: the data input end is used for receiving the gain sum value, the clock signal input end, the enabling end used for receiving the zero crossing detection signal and the delay data output end;
a selector, comprising: an enable terminal for receiving the zero-crossing detection signal, a first selection input terminal for receiving the gain and the value, a second selection input terminal for connecting the delay data output terminal, and a selection output terminal for selectively outputting an output signal for receiving the gain and the value or the delay data output terminal according to the zero-crossing detection signal;
the first lookup table module is used for finding a linearized first gain adjustment value in the linear lookup table according to the output signal of the selection output end;
and the second table look-up module is used for finding a linearized second gain adjustment value in the linear table look-up according to the gain sum value.
7. The dual AGC system of claim 6, wherein the gain linearization unit further comprises: and the input end of the amplitude limiting module is connected with the output end of the adder, and the output end of the amplitude limiting module is connected with the data input end of the second delay register.
8. The dual AGC system of claim 4, wherein the entry condition of the released state comprises:
the reset signal end receives a reset signal, and the fast gain enabling end and the slow gain enabling end do not receive an enabling signal; or alternatively, the process may be performed,
when in a hold state, the signal peak monitoring module cannot detect that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and enters the release state after the hold gain counter is full;
the condition for the release state to enter the tracking state includes: the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold.
9. The dual AGC system of claim 4, wherein the tracking state entry condition comprises:
the signal peak monitoring module detects that an input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold or the slow AGC amplitude threshold;
the condition that the tracking state enters the holding state includes:
the signal peak monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold and the slow AGC amplitude threshold.
10. The dual AGC system of claim 4, wherein the entry condition of the hold state comprises:
when in the tracking state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit does not exceed the fast AGC amplitude threshold value and the slow AGC amplitude threshold value;
when the automatic gain control unit is in the holding state, the signal peak value monitoring module detects that an input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition for the hold state to enter the tracking state includes:
the signal peak monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold, the slow AGC amplitude threshold and the AGC release amplitude threshold, and the holding gain counter is full.
CN201810812700.9A 2018-07-23 2018-07-23 Dual AGC system Active CN108768329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810812700.9A CN108768329B (en) 2018-07-23 2018-07-23 Dual AGC system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810812700.9A CN108768329B (en) 2018-07-23 2018-07-23 Dual AGC system

Publications (2)

Publication Number Publication Date
CN108768329A CN108768329A (en) 2018-11-06
CN108768329B true CN108768329B (en) 2023-10-13

Family

ID=63971323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810812700.9A Active CN108768329B (en) 2018-07-23 2018-07-23 Dual AGC system

Country Status (1)

Country Link
CN (1) CN108768329B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111478675B (en) * 2020-04-14 2024-02-09 上海艾为电子技术股份有限公司 Audio signal processing system, audio signal processing method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1759551A (en) * 2003-03-14 2006-04-12 美商内数位科技公司 Enhanced automatic gain control mechanism for time-slotted data transmissions
CN101447771A (en) * 2008-12-24 2009-06-03 北京中星微电子有限公司 Method and system for automatically controlling gains
CN102763326A (en) * 2009-12-28 2012-10-31 邦吉欧维声学有限公司 System and method for digital signal processing
US8457261B1 (en) * 2010-02-17 2013-06-04 Qualcomm Incorporated Automatic gain control techniques for detecting RF saturation
JP2013201600A (en) * 2012-03-26 2013-10-03 Nippon Telegr & Teleph Corp <Ntt> Automatic gain control circuit
CN104485909A (en) * 2014-12-31 2015-04-01 上海艾为电子技术股份有限公司 Gain control method and device
US9614486B1 (en) * 2015-12-30 2017-04-04 Amazon Technologies, Inc. Adaptive gain control
CN208174647U (en) * 2018-07-23 2018-11-30 上海艾为电子技术股份有限公司 Double AGC systems

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005286806A (en) * 2004-03-30 2005-10-13 Nec Corp Automatic gain control device and automatic gain control method
US7676208B2 (en) * 2005-12-09 2010-03-09 Electronics And Telecommunications Research Institute Automatic gain control device having variable gain control interval and method thereof
US9831844B2 (en) * 2014-09-19 2017-11-28 Knowles Electronics, Llc Digital microphone with adjustable gain control

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1759551A (en) * 2003-03-14 2006-04-12 美商内数位科技公司 Enhanced automatic gain control mechanism for time-slotted data transmissions
CN101447771A (en) * 2008-12-24 2009-06-03 北京中星微电子有限公司 Method and system for automatically controlling gains
CN102763326A (en) * 2009-12-28 2012-10-31 邦吉欧维声学有限公司 System and method for digital signal processing
US8457261B1 (en) * 2010-02-17 2013-06-04 Qualcomm Incorporated Automatic gain control techniques for detecting RF saturation
JP2013201600A (en) * 2012-03-26 2013-10-03 Nippon Telegr & Teleph Corp <Ntt> Automatic gain control circuit
CN104485909A (en) * 2014-12-31 2015-04-01 上海艾为电子技术股份有限公司 Gain control method and device
US9614486B1 (en) * 2015-12-30 2017-04-04 Amazon Technologies, Inc. Adaptive gain control
CN208174647U (en) * 2018-07-23 2018-11-30 上海艾为电子技术股份有限公司 Double AGC systems

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
an analog vlsi implementation of the inner hair cell and auditory nerve using a dual agc model;David s. freedman等;IEEE transactions on biomedical circuits and systems;240-256 *
双AGC控制在短波扩频通信中的应用;彭卫东, 左继章;微电子学(第04期);139-141 *

Also Published As

Publication number Publication date
CN108768329A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
US9362875B2 (en) Signal envelope processing
US8150067B2 (en) Bass enhancing method, signal processing device, and audio reproducing system
US7756280B2 (en) Audio processing system and method for automatically adjusting volume
CN102685638B (en) Method and apparatus for outputting audio signal
CN102497168B (en) Intelligent volume limiting device and method
EP2928076A1 (en) Level adjustment device and method
JP2002135897A (en) Instrument and method for measuring acoustic field
US9661438B1 (en) Low latency limiter
CN108768329B (en) Dual AGC system
JP4983694B2 (en) Audio playback device
US9059671B2 (en) Automatic gain control device
US6760452B2 (en) Multi-channel audio signal limiter with shared clip detection
WO2018036143A1 (en) Advanced servo bias method of a-class audio power amplifier and amplifier
US7684291B2 (en) Method and apparatus for blank detection of an optical disc
CN104485909A (en) Gain control method and device
CN104614573A (en) OPTIMIZED PEAK DETECTOR for the AGC LOOP IN A DIGITAL RADIO RECEIVER
CN203243288U (en) Automatic control device of volume
CN208174647U (en) Double AGC systems
JP2979119B2 (en) Automatic dynamic range control circuit
US9356572B2 (en) Sound processing apparatus, sound system and sound processing method
US20180033442A1 (en) Audio codec system and audio codec method
CN108063601B (en) Automatic gain control circuit and signal processing system
EP2466917B1 (en) Audio-signal processing apparatus and method, and program
JP2002299975A (en) Digital agc device
JP4803193B2 (en) Audio signal gain control apparatus and gain control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant