CN108768329A - Double AGC systems - Google Patents
Double AGC systems Download PDFInfo
- Publication number
- CN108768329A CN108768329A CN201810812700.9A CN201810812700A CN108768329A CN 108768329 A CN108768329 A CN 108768329A CN 201810812700 A CN201810812700 A CN 201810812700A CN 108768329 A CN108768329 A CN 108768329A
- Authority
- CN
- China
- Prior art keywords
- signal
- gain
- value
- agc
- output
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 22
- 238000012544 monitoring process Methods 0.000 claims description 57
- 230000009977 dual effect Effects 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000003321 amplification Effects 0.000 claims description 3
- 238000000034 method Methods 0.000 claims description 3
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 3
- 230000002265 prevention Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 230000005236 sound signal Effects 0.000 description 7
- 230000007704 transition Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000002028 premature Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G3/00—Gain control in amplifiers or frequency changers
- H03G3/20—Automatic control
- H03G3/30—Automatic control in amplifiers having semiconductor devices
- H03G3/3005—Automatic control in amplifiers having semiconductor devices in amplifiers suitable for low-frequencies, e.g. audio amplifiers
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03G—CONTROL OF AMPLIFICATION
- H03G2201/00—Indexing scheme relating to subclass H03G
- H03G2201/40—Combined gain and bias control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Control Of Amplification And Gain Control (AREA)
Abstract
The invention discloses a kind of double AGC systems, including:Zero passage detection unit;Gain linearization unit, in digital input signals zero passage, finding the first gain adjustment value and the second gain adjustment value of linearisation in linear look-up table according to automatic gain stairstep signal;Output gain adjustment unit, for obtaining digital output signal after multiplying and saturation arithmetic processing according to digital input signals and the first gain adjustment value;Input gain adjustment unit, for according to digital input signals and the second gain adjustment value, after multiplying and saturation arithmetic processing, obtaining input gain adjustment signal;Selecting unit, the mode signal for being received according to mode signal input terminal, selectivity exports digital output signal or input gain adjusts signal;Automatic gain control unit generates automatic gain stairstep signal for the output signal according to selection signal output end.The invention can avoid the risks of digital input signals truncation and signal overcompression for implementation.
Description
Technical Field
The invention relates to the field of automatic gain control, in particular to a double AGC system.
Background
In the field of audio signal processing, there has been considerable research on Automatic Gain Control (AGC) of digital audio signals, and in order to amplify audio signals without damaging speakers and without sound break, Automatic Gain Control (AGC) technology has been widely used in digital audio processing. Such as in prior art fig. 1: the output signal is used directly to check whether the gain is too large and to adjust the gain of the input signal. In prior art fig. 2: when checking whether the gain is adjusted, the signal gain is adjusted when the signal crosses zero, which can effectively prevent the sound from becoming premature in fig. 1.
However, although fig. 2 effectively prevents the sound from becoming premature by adjusting the signal gain when the signal crosses zero, the AGC strategy is too simple and the digital input signal is easily truncated and the signal is over-compressed.
Disclosure of Invention
The present invention is directed to a dual AGC system to avoid the risk of digital input signal truncation and signal overcompression.
Specifically, the present invention provides a dual AGC system comprising:
a zero-crossing detection unit 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 a linear lookup table according to an automatic gain stepping signal when the digital input signal passes through 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 select signal input for receiving the digital output signal, a second select signal input for receiving the input gain adjustment signal, and a select 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 comprises:
the prevention large unit is used for amplifying the digital input signal according to a preset amplification parameter to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, wherein the first multiplier calculates a first product of the amplified digital input signal and a first gain adjusting value, and the first saturation operation processor is used for performing saturation operation processing on the first product to obtain the digital output signal;
the input gain adjustment unit comprises a second multiplier and a second saturation operation processor, wherein the second multiplier calculates a second product of the amplified digital input signal and a second gain adjustment value, and the second saturation operation processor is used for performing saturation operation processing on the second product to obtain the input gain adjustment signal.
Furthermore, the dual AGC system further comprises an absolute value calculating unit, wherein 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;
and 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:
the device comprises a reset signal end, a fast gain enabling end and a slow gain enabling end;
the signal peak value 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 or not, and generating corresponding monitoring values according to the judgment result, wherein the monitoring values comprise a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value and a 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 fast gain counting value, the preset slow gain counter, the gain keeping counting value and the corresponding relation between various monitoring values and the working state of each automatic gain control unit, and outputting the current working state information and the next working state information; the working state comprises: a Release (Release) state in which gain adjustment is not performed on the digital input signal, a tracking (attach) state in which fast/slow gain adjustment is performed on the digital input signal, and 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 preset duration time required by the fast AGC to adjust the one-step gain to obtain a 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 preset duration time required by the slow AGC for adjusting the gain in one step to obtain a count value of the slow gain;
the gain keeping counter is used for adjusting the duration time required by one-step gain according to the current working state information, the next working state information and the preset AGC amplitude keeping value, counting is carried out, and the gain keeping count value is obtained;
and the gain stepping adjustment module is used for generating the automatic gain stepping signal according to the current working state information, the next working state information, the fast gain counting value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, wherein the amplitude of the automatic gain stepping signal is limited to a preset maximum value of gain stepping adjustment.
Further, the zero-crossing detection unit includes:
a first delay register having a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
a logical or-not operation module, a first end for receiving the digital input signal, a second end for receiving the signal of the output end of the first delay register, and a second output end;
a logic or operation module, a first end for receiving the detection result that the digital input signal is the smallest near a positive value, a second end for receiving the detection result that the digital input signal is the smallest near a negative value, a third end for receiving the output signal of the second output end, and a third output end for outputting a zero-crossing detection signal.
Further, the gain linearizing unit includes:
the adder is used for calculating and obtaining a gain sum value obtained by adding a preset gain value and the automatic gain stepping 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 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 sum 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 sum value or the delay data output terminal according to the zero-crossing detection signal;
the first look-up table module is used for finding a linearized first gain adjustment value in a linear look-up table according to the output signal of the selection output end;
and the second lookup table module is used for finding a second linearized gain adjusting value in the linear lookup table according to the gain sum value.
Further, the gain linearizing 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.
Further, the entry condition of the release state includes:
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,
when in a holding state, the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and enters the release state after the gain counter is full;
the condition for the release state to enter the tracking state includes: and the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value.
Further, the entry condition of the tracking state includes:
the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value;
the condition that the tracking state enters the holding state comprises the following steps:
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.
Further, the entry condition of the hold state includes:
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 signal is in the holding state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition that the hold state enters the track state includes:
the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and the gain counter is kept full.
The double AGC system of the invention not only has more flexible selection for the application scene of AGC, but also can dynamically adjust the amplitude of an audio signal in real time, so as to furthest reserve the original sound and reduce the risk of signal truncation and signal overcompression.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings, like reference numerals are used to indicate like elements. The drawings in the following description are directed to some, but not all embodiments of the invention. For a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic topology diagram of a first AGC system in the prior art;
fig. 2 is a schematic topology diagram of a second AGC system in the prior art;
fig. 3 is a schematic topology diagram of a dual AGC system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a dual AGC system according to an embodiment of the present invention;
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 invention;
fig. 6 is a block diagram illustrating 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 invention.
Fig. 9 is a schematic diagram of saturation operation in a dual AGC system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The following describes the dual AGC system in detail in connection with the implementation of the present invention with reference to the accompanying drawings.
Referring to fig. 3 to 4, a dual AGC system according to an embodiment of the present invention includes:
a zero-crossing detection unit 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 a linear lookup table according to an automatic gain stepping signal when the digital input signal passes through 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 select signal input for receiving the digital output signal, a second select signal input for receiving the input gain adjustment signal, and a select 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 prevention large unit is used for amplifying the digital input signal according to a preset amplification parameter to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, wherein the first multiplier calculates a first product of the amplified digital input signal and a first gain adjusting value, and the first saturation operation processor is used for performing saturation operation processing on the first product to obtain the digital output signal;
the input gain adjustment unit comprises a second multiplier and a second saturation operation processor, wherein the second multiplier calculates a second product of the amplified digital input signal and a second gain adjustment value, and the second saturation operation processor is used for performing saturation operation processing on the second product to obtain the input gain adjustment signal.
Preferably, the dual AGC system further comprises an absolute value calculating unit, an input end of the absolute value calculating unit is connected to the 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;
and 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 in fig. 4 are configurable parameters, giving the present invention great flexibility to adapt to various situations. The automatic gain control unit mainly performs amplitude judgment on 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, the gain of the input signal is adjusted after the zero-crossing detection of the signal through the pre-judgment of the digital input signal, so that the signal compression and the premature sound change of the audio signal caused by the early-time sound change can be effectively prevented. Meanwhile, the invention also improves the signal preprocessing, and after the digital quantization signal Din [15:0] of 16bits, the invention pre-amplifies the signal, thereby effectively improving the dynamic range of the digital signal. The invention can select the output quantized signal after AGC or the pre-amplified input quantized signal by configuration on the judgment source of the automatic gain. Therefore, the method has more flexible selection for the application scene of the AGC. The embodiment dynamically adjusts the amplitude of the audio signal in real time, furthest retains the original sound and reduces the risks of signal truncation and signal overcompression.
As shown in fig. 6, specifically, the automatic gain control unit includes:
the device comprises a reset signal end, a fast gain enabling end and a slow gain enabling end;
a signal peak value monitoring module, configured to determine whether an input signal of the automatic gain control unit exceeds a preset fast AGC amplitude threshold, a preset slow AGC amplitude threshold, and an AGC release amplitude threshold shown in fig. 5, and generate corresponding monitoring values according to a determination result, where the monitoring values include a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value, and an AGC release amplitude monitoring value;
a main control state machine (FSM _ Controller) for determining the working state at the corresponding monitoring value according to the corresponding relationship between the preset fast gain counting value, the preset slow gain counter, the gain keeping counting value and the working states of various monitoring values and respective automatic gain control units, and outputting the current working state information and the next working state information; the operating states include the following states as shown in fig. 7: the method comprises the following steps of releasing the digital input signal without gain adjustment, tracking the digital input signal with fast/slow gain adjustment, and maintaining the output holding state of the digital input signal under the fixed gain amplitude;
the fast gain counter is used for counting according to the current working state information, the next working state information and the preset duration time required by the fast AGC to adjust the one-step gain to obtain a 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 preset duration time required by the slow AGC for adjusting the gain in one step to obtain a count value of the slow gain;
the gain keeping counter is used for adjusting the duration time required by one-step gain according to the current working state information, the next working state information and the preset AGC amplitude keeping value, counting is carried out, and the gain keeping count value is obtained;
and the gain stepping adjustment module is used for generating the automatic gain stepping signal according to the current working state information, the next working state information, the fast gain counting value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, wherein the amplitude of the automatic gain stepping signal is limited to a preset maximum value of gain stepping adjustment.
As shown in fig. 8, the zero-crossing detecting unit includes:
a first delay register having a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
a logical or-not operation module, a first end for receiving the digital input signal, a second end for receiving the signal of the output end of the first delay register, and a second output end;
a logic or operation module, a first end for receiving the detection result that the digital input signal is the smallest near a positive value, a second end for receiving the detection result that the digital input signal is the smallest near a negative value, a third end for receiving the output signal of the second output end, and a third output end for outputting a zero-crossing detection signal.
The zero-crossing adjustment ensures that the signal amplitude is subjected to gain adjustment only when the signal crosses the zero point, so that the phenomenon that sound is changed or pop sound occurs due to the fact that the signal gain is adjusted too early is avoided, and the adjustment of the sound is smoother and softer. Note that: the detection of zero crossing adjustment is made only for the input Din [15:0] signal. Since the gain is only adjusted for zero crossings of the input signal, it is the target of the AGC.
Further, the gain linearizing unit includes:
the adder is used for calculating and obtaining a gain sum value obtained by adding a preset gain value and the automatic gain stepping 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 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 sum 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 sum value or the delay data output terminal according to the zero-crossing detection signal;
the first look-up table module is used for finding a linearized first gain adjustment value in a linear look-up table according to the output signal of the selection output end;
and the second lookup table module is used for finding a second linearized gain adjusting value in the linear lookup table according to the gain sum value.
The Gain Linear Table in fig. 8 is a linearized look-up Table: the linearized gain is found by the step gain and fed back to the input and output gain adjustment modules. The gain adjustment is accomplished by directly multiplying the input signal and the output feedback signal by the linear gain (multiplier) and performing Saturation operation (Saturation).
With continued reference to fig. 8, the gain linearizing 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. Table 3 shows the meanings of the symbols in fig. 8.
TABLE 3
Continuing with fig. 7, the entry conditions for 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,
when in a holding state, the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and enters the release state after the gain counter is full;
the condition for the release state to enter the tracking state includes: and the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value.
The above for the release state can also be described in the following intuitive way:
(ii) Release State [ Release ]
Processing content
At this time, the signal is not subjected to gain adjustment, and can be in a dynamic range
From the previous state
The reset signal rst _ n is active. (rst _ n is 0)
The module of the present invention is not enabled. (enable ═ 0)
[ Hold ] 1) no threshold exceeding Fast/Slow is detected while in the Hold state,
and also does not exceed the release threshold, enters the release state after the hold _ cnt counter is full.
Transition to the next state
Tracking 1) detects an amplitude threshold exceeding the fast AGC (above _ avth1 ═ 1)
2) Detecting an amplitude threshold exceeding the slow AGC (above _ avth0 ═ 1)
Is maintained in this state
Other conditions
Further, the entry condition of the tracking state includes:
the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value;
the condition that the tracking state enters the holding state comprises the following steps:
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.
The above for the tracking state can also be described in the following intuitive way:
② AGC tracking state [ tracking ]
Processing content
The signal is subjected to fast and slow gain adjustment to ensure that the signal is not truncated and keep high-power output
From the previous state
IDLE 1) detects an amplitude threshold exceeding fast AGC (above _ avth1 ═ 1)
2) Detecting an amplitude threshold exceeding the slow AGC (above _ avth0 ═ 1)
Hold 1) detects an amplitude threshold exceeding fast AGC (above _ avth1 ═ 1)
2) Detecting an amplitude threshold exceeding the slow AGC (above _ avth0 ═ 1)
Transition to the next state
[ HOLD ] 1) detection signal threshold, neither fast AGC nor slow AGC thresholds
Exceed (above _ avth1 ═ 0 and above _ avth0 ═ 0)
Is maintained in this state
Other conditions
Further, the entry condition of the hold state includes:
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 signal is in the holding state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition that the hold state enters the track state includes:
the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and the gain counter is kept full.
The above for the holding state can also be described in the following intuitive way:
③ 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) cannot be detected to exceed the amplitude threshold (above _ avth 1) for fast AGC
0) and no amplitude threshold exceeding the slow AGC is detected (above _ avth0 0)
Hold 1) detects a release amplitude threshold exceeding AGC (above _ rvth ═ 1)
Transition to the next state
Release 1) the release counter is full (hold _ cnt > -hold _ time _ th) and no overshoot of the AGC fast, slow, release amplitude threshold is detected. (above _ avth1 ═ 0 and above _ avth0 ═ 0 and above _ rvth ═ 0)
Is maintained in this state
Others
Fig. 9 is a simplified illustration of the saturation operation of the signed signal according to the present invention, wherein the signal that has undergone SSAT (signalsaturation) is output as a normal gain-adjusted digital audio signal. It can be seen in the figure that: if the saturation operation is not performed, the signal is distorted. And the saturation operation is to ensure that the signal is not distorted.
With reference to the above drawings, the operation principle of the dual AGC system is briefly described as follows: the audio quantization signal Din [15:0] is pre-amplified, subjected to gain adjustment of an output signal, and subjected to saturation operation processing and then output. After the input signal is subjected to zero-crossing detection, the adjustment gain generated by the automatic gain control unit is subjected to linearization processing, then the gain is respectively adjusted for the input signal and the output signal, the adjusted signal is returned to the automatic gain control unit again through the configuration of a selectable source, and the gain step of the signal is further adjusted.
In the invention, quantized digital signals are pre-amplified, AGC gain steps calculated by an automatic gain control module are calculated, and when the signals pass zero, linear gains corresponding to the gain steps are searched, and multiplication and saturation operation are carried out on the linear gains and the pre-amplified signals to obtain final output gains. The invention uses two kinds of feedback of output and input to detect gain, and adjusts the gain of the signal through the built-in fast and slow gain adjusting function. The gain can be adjusted quickly without truncation, and the high-power stable output signal can be ensured under the condition of slow gain adjustment. Due to the pursuit of tone quality and music audibility, the double-AGC framework circuit has good multi-scene applicability. The circuit of this architecture is capable of: 1, the signal is promoted by a certain dynamic range, the implementation mode is very simple and can be easily realized, and the original signal can be configured and reserved in a zero-activity mode. 2, the double AGC framework of the invention can be widely applied to digital audio power amplifier chips and chips needing similar related digital signal processing because of the characteristics of double signal source selection, selectable and configurable high and low gain compression threshold values, dynamically configurable signal compression ratio and good general type.
It will be understood by those skilled in the art that all or part of the steps/units/modules for implementing the embodiments may be implemented by hardware associated with program instructions, and the program may be stored in a computer-readable storage medium, and when executed, the program performs the steps corresponding to the units in the embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A dual AGC system, comprising:
a zero-crossing detection unit 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 a linear lookup table according to an automatic gain stepping signal when the digital input signal passes through 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 select signal input for receiving the digital output signal, a second select signal input for receiving the input gain adjustment signal, and a select 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 prevention large unit is used for amplifying the digital input signal according to a preset amplification parameter to obtain an amplified digital input signal;
the output gain adjusting unit comprises a first multiplier and a first saturation operation processor, wherein the first multiplier calculates a first product of the amplified digital input signal and a first gain adjusting value, and the first saturation operation processor is used for performing saturation operation processing on the first product to obtain the digital output signal;
the input gain adjustment unit comprises a second multiplier and a second saturation operation processor, wherein the second multiplier calculates a second product of the amplified digital input signal and a second gain adjustment value, and the second saturation operation processor is used for performing saturation operation processing on the second product to obtain the input gain adjustment signal.
3. The dual AGC system of claim 2 further comprising an absolute value calculation unit having an input coupled to the select signal output of said selection unit; the output end of the absolute value calculating unit is connected with the input end of the automatic gain control unit;
and 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. The dual AGC system of any of claims 1-3, wherein the automatic gain control unit comprises:
the device comprises a reset signal end, a fast gain enabling end and a slow gain enabling end;
the signal peak value 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 or not, and generating corresponding monitoring values according to the judgment result, wherein the monitoring values comprise a fast AGC amplitude monitoring value, a slow AGC amplitude monitoring value and a 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 fast gain counting value, the preset slow gain counter, the gain keeping counting value and the corresponding relation between various monitoring values and the working state of each automatic gain control unit, and outputting the current working state information and the next working state information; the working state comprises: the method comprises the following steps of releasing the digital input signal without gain adjustment, tracking the digital input signal with fast/slow gain adjustment, and maintaining the output holding state of the digital input signal under the fixed gain amplitude;
the fast gain counter is used for counting according to the current working state information, the next working state information and the preset duration time required by the fast AGC to adjust the one-step gain to obtain a 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 preset duration time required by the slow AGC for adjusting the gain in one step to obtain a count value of the slow gain;
the gain keeping counter is used for adjusting the duration time required by one-step gain according to the current working state information, the next working state information and the preset AGC amplitude keeping value, counting is carried out, and the gain keeping count value is obtained;
and the gain stepping adjustment module is used for generating the automatic gain stepping signal according to the current working state information, the next working state information, the fast gain counting value, the slow gain counter, the fast AGC amplitude monitoring value, the slow AGC amplitude monitoring value and the AGC release amplitude monitoring value, wherein the amplitude of the automatic gain stepping signal is limited to a preset maximum value of gain stepping adjustment.
5. The dual AGC system of claim 4, wherein the zero crossing detection unit comprises:
a first delay register having a first end for receiving the digital input signal, a second end for receiving a clock signal, and a first output end;
a logical or-not operation module, a first end for receiving the digital input signal, a second end for receiving the signal of the output end of the first delay register, and a second output end;
a logic or operation module, a first end for receiving the detection result that the digital input signal is the smallest near a positive value, a second end for receiving the detection result that the digital input signal is the smallest near a negative value, a third end for receiving the output signal of the second output end, and a third output end for outputting a zero-crossing detection signal.
6. The dual AGC system of claim 5, wherein the gain linearizer comprises:
the adder is used for calculating and obtaining a gain sum value obtained by adding a preset gain value and the automatic gain stepping 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 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 sum 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 sum value or the delay data output terminal according to the zero-crossing detection signal;
the first look-up table module is used for finding a linearized first gain adjustment value in a linear look-up table according to the output signal of the selection output end;
and the second lookup table module is used for finding a second linearized gain adjusting value in the linear lookup table according to the gain sum value.
7. The dual AGC system as recited in claim 6, wherein said gain linearizer 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 for the release 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,
when in a holding state, the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and enters the release state after the gain counter is full;
the condition for the release state to enter the tracking state includes: and the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value.
9. The dual AGC system of claim 4, wherein the tracking state entry condition comprises:
the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value or the slow AGC amplitude threshold value;
the condition that the tracking state enters the holding state comprises the following steps:
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.
10. The dual AGC system of claim 4, wherein the hold state entry condition comprises:
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 signal is in the holding state, the signal peak value monitoring module detects that the input signal of the automatic gain control unit exceeds an AGC release amplitude monitoring value;
the condition that the hold state enters the track state includes:
the signal peak value monitoring module cannot detect that the input signal of the automatic gain control unit exceeds the fast AGC amplitude threshold value, the slow AGC amplitude threshold value and the AGC release amplitude threshold value, and the gain counter is kept full.
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 true CN108768329A (en) | 2018-11-06 |
CN108768329B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111478675A (en) * | 2020-04-14 | 2020-07-31 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050221778A1 (en) * | 2004-03-30 | 2005-10-06 | Nec Corporation | Automatic gain control device, automatic gain control method, control program for automatic gain control device, radio communication terminal having automatic control device, radio communication system, and radio communication method |
CN1759551A (en) * | 2003-03-14 | 2006-04-12 | 美商内数位科技公司 | Enhanced automatic gain control mechanism for time-slotted data transmissions |
US20070135071A1 (en) * | 2005-12-09 | 2007-06-14 | Il-Gu Lee | Automatic gain control device having variable gain control interval and method thereof |
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 |
US20160087596A1 (en) * | 2014-09-19 | 2016-03-24 | Knowles Electronics, Llc | Digital microphone with adjustable gain control |
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 |
-
2018
- 2018-07-23 CN CN201810812700.9A patent/CN108768329B/en active Active
Patent Citations (11)
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 |
US20050221778A1 (en) * | 2004-03-30 | 2005-10-06 | Nec Corporation | Automatic gain control device, automatic gain control method, control program for automatic gain control device, radio communication terminal having automatic control device, radio communication system, and radio communication method |
US20070135071A1 (en) * | 2005-12-09 | 2007-06-14 | Il-Gu Lee | Automatic gain control device having variable gain control interval and method thereof |
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 |
US20160087596A1 (en) * | 2014-09-19 | 2016-03-24 | Knowles Electronics, Llc | Digital microphone with adjustable gain control |
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)
Title |
---|
DAVID S. FREEDMAN等: "an analog vlsi implementation of the inner hair cell and auditory nerve using a dual agc model", IEEE TRANSACTIONS ON BIOMEDICAL CIRCUITS AND SYSTEMS, pages 240 - 256 * |
彭卫东, 左继章: "双AGC控制在短波扩频通信中的应用", 微电子学, no. 04, pages 139 - 141 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111478675A (en) * | 2020-04-14 | 2020-07-31 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
CN111478675B (en) * | 2020-04-14 | 2024-02-09 | 上海艾为电子技术股份有限公司 | Audio signal processing system, audio signal processing method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN108768329B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2899883B1 (en) | Sound producing system and audio amplifying method thereof | |
US9614489B2 (en) | Sound producing system and audio amplifying method thereof | |
US8315410B2 (en) | Dynamic range controller | |
CN102685638B (en) | Method and apparatus for outputting audio signal | |
US7583809B2 (en) | Sound signal processing device and sound signal processing method | |
CN107682802B (en) | Method and device for debugging sound effect of audio equipment | |
US9059671B2 (en) | Automatic gain control device | |
JP4862820B2 (en) | Acoustic signal amplifier | |
CN208174647U (en) | Double AGC systems | |
US8587376B2 (en) | Automatic gain control | |
KR20120056365A (en) | Digital pre-distortion method and apparatus for performance improvement by limiting level more than saturation level | |
CN108768329A (en) | Double AGC systems | |
JP2009159375A (en) | Acoustic effect circuit and processing method | |
JPH10200351A (en) | Digital audio processor | |
WO2007040770A2 (en) | Method and system for receiving and decoding audio signals | |
US20130093489A1 (en) | Signal converter equipped with overvoltage protection mechanism | |
JPH10173455A (en) | Automatic dynamic range control circuit | |
US9356572B2 (en) | Sound processing apparatus, sound system and sound processing method | |
EP3413463A1 (en) | Electronic circuit and method of operation | |
JP6314662B2 (en) | Audio signal processing apparatus and program thereof | |
JP4803193B2 (en) | Audio signal gain control apparatus and gain control method | |
JP2002299975A (en) | Digital agc device | |
US20120155656A1 (en) | Audio-Signal Processing Apparatus and Method, and Program | |
CN114094966A (en) | Dynamic range control circuit, audio processing chip and audio processing method thereof | |
US20200213793A1 (en) | Audio Signal Control Circuit, Audio System, and Method of Controlling Audio Signal |
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 | ||
CP03 | Change of name, title or address |
Address after: Room 1201, No.2, Lane 908, Xiuwen Road, Minhang District, Shanghai, 201199 Patentee after: SHANGHAI AWINIC TECHNOLOGY Co.,Ltd. Country or region after: China Address before: Room 303-39, building 33, 680 Guiping Road, Xuhui District, Shanghai 200233 Patentee before: SHANGHAI AWINIC TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |