CN107911091B - Method and circuit for adjusting gain - Google Patents

Method and circuit for adjusting gain Download PDF

Info

Publication number
CN107911091B
CN107911091B CN201711193565.6A CN201711193565A CN107911091B CN 107911091 B CN107911091 B CN 107911091B CN 201711193565 A CN201711193565 A CN 201711193565A CN 107911091 B CN107911091 B CN 107911091B
Authority
CN
China
Prior art keywords
gain
signal
value
adjustment
power
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
CN201711193565.6A
Other languages
Chinese (zh)
Other versions
CN107911091A (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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Network Systems 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 Comba Network Systems Co Ltd filed Critical Comba Network Systems Co Ltd
Priority to CN201711193565.6A priority Critical patent/CN107911091B/en
Publication of CN107911091A publication Critical patent/CN107911091A/en
Application granted granted Critical
Publication of CN107911091B publication Critical patent/CN107911091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03GCONTROL OF AMPLIFICATION
    • H03G3/00Gain control in amplifiers or frequency changers without distortion of the input signal
    • H03G3/20Automatic control

Abstract

The embodiment of the invention provides a method and a circuit for adjusting gain, which are used for solving the technical problem of low signal power adjustment precision of a communication system for signals. The method comprises the following steps: multiplying a first frame signal in at least two frame signals included in the received input signal by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal; performing first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value, and multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal; performing second adjustment on the first gain value according to the signal power of the second frame gain signal to obtain an adjusted second gain value; the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system; the second gain value is determined as an initial gain value of a second frame signal subsequent to the first frame signal among the at least two frame signals.

Description

Method and circuit for adjusting gain
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a circuit for adjusting gain.
Background
In a communication system, the power directly affects the stability of the system, so it is always important to adjust the stability of the signal power.
Automatic Gain Control (AGC) refers to the adjustment of an output signal using an effective combination of linear amplification and compressive amplification. The automatic control method can change the amplitude of the input and output compression ratio automatic control gain through the AGC function, so that the gain of the amplifying circuit is automatically adjusted along with the signal strength, actually, the amplification factor of the amplifier is automatically adjusted, the amplitude of an output signal is sampled by utilizing the negative feedback principle, and a corresponding control value is obtained to reversely adjust the amplification factor of the amplifier.
Currently, in order to avoid the power of the signal being too high or too low, an AGC circuit is usually used for periodic detection. As shown in fig. 1, which is a schematic circuit diagram of an AGC circuit in the prior art, the AGC circuit performs power adjustment by substantially increasing or decreasing signal gain once through a gain adjustment module, and then feeds back an adjusted gain value to a next period. However, such a large adjustment easily causes a sudden change in the output signal, and affects the characteristics of the signal itself.
In summary, in the prior art, the communication system has a poor signal power control effect on signals and has low adjustment precision.
Disclosure of Invention
The embodiment of the invention provides a method and a circuit for adjusting gain, which are used for solving the technical problems of poor signal power control effect and low adjustment precision of a communication system on signals.
In a first aspect, an embodiment of the present invention provides a method for adjusting a gain, including the following steps:
multiplying a first frame signal of at least two frame signals included in a received input signal by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal;
performing first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value, and multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal;
performing second adjustment on the first gain value according to the signal power of the second frame gain signal to obtain an adjusted second gain value; the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system;
determining the second gain value as an initial gain value of a second frame signal of the at least two frame signals that follows the first frame signal.
Optionally, the first adjusting the initial gain value according to the signal power of the first gain frame signal to obtain a first gain value includes:
determining a first preset power range in which the signal power of the first frame gain signal is located;
determining a gain adjustment value corresponding to the first preset power range according to the corresponding relation between the power range and the gain adjustment value;
and adjusting the initial gain value according to the gain adjustment value to obtain an adjusted first gain value.
Optionally, performing a second adjustment on the first gain value according to the signal power of the second frame gain signal to obtain an adjusted second gain value, including:
dividing the second frame gain signal into a plurality of subframe gain signals, and recording a power signal corresponding to each subframe gain signal;
determining at least two subframe gain signals of the plurality of subframe gain signals, wherein the signal power of the at least two subframe gain signals is not within a second preset power range; the power interval of the second preset power range is smaller than the power interval of the first preset power range;
determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range;
and adjusting the first gain value in sequence according to the at least two sub-gain adjustment values to obtain a second gain value.
Optionally, determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range includes:
determining the magnitude relation between the signal power of each subframe gain signal in the at least two subframe gain signals and the maximum value and the minimum value of the second preset power range;
if the signal power of the subframe gain signal is determined to be larger than the maximum value, determining that a sub-gain adjustment value corresponding to the subframe gain signal is a first adjustment value, or if the signal power of the subframe gain signal is determined to be smaller than the minimum value, determining that the sub-gain adjustment value corresponding to the subframe gain signal is a second adjustment value;
wherein the first adjustment value is used to increase the first gain value by a first preset value, and the second adjustment value is used to decrease the first gain value by a second preset value.
Optionally, sequentially adjusting the first gain value according to the at least two sub-gain adjustment values to obtain a second gain value, including:
determining an adjustment value corresponding to each sub-gain adjustment value in the at least two sub-gain adjustment values, where the adjustment value is the first adjustment value or the second adjustment value;
and adjusting the first gain value according to all the determined adjustment values to obtain an adjusted second gain value.
In a second aspect, an embodiment of the present invention provides a circuit for adjusting a gain, including:
the signal receiving module is used for receiving an input signal and dividing the input signal into at least two frames of signals;
a first signal gain module, configured to multiply a first frame signal of the at least two frame signals by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal;
the first adjusting module is connected with the first signal gain module and used for carrying out first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value;
a second signal gain module, connected to the first signal gain module and the first adjustment module, respectively, for multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal;
a second adjusting module, connected to the second signal gain module, configured to perform a second adjustment on the first gain value according to the signal power of the second frame gain signal, to obtain an adjusted second gain value, and feed back the second gain value to the first signal gain module, so as to use the second gain value as an initial gain value of a next frame signal; and the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system.
Optionally, the circuit further includes:
and the signal output module is connected with the first signal gain module and used for outputting the signal processed by the first signal gain module.
Optionally, the first adjusting module includes:
the first power statistical module is used for recording the signal power of the currently received first frame gain signal;
the first power comparison module is used for comparing the signal power of the first frame gain signal with a power range corresponding to each power range in a plurality of preset power ranges, and determining a first preset power range in which the signal power of the first frame gain signal is located;
and the first gain adjustment module is used for determining a gain adjustment value corresponding to the signal power of the first frame gain signal according to the corresponding relation between the power range and the gain adjustment value, and adjusting the initial gain value according to the gain adjustment value to obtain a first gain value.
Optionally, the second adjusting module includes:
the second power statistical module is used for dividing the received second frame gain signal into a plurality of subframe gain signals and recording a power signal corresponding to each subframe gain signal;
the second power comparison module is used for comparing the signal power of each subframe gain signal with the maximum value and the minimum value of a second preset power range, and determining at least two subframe gain signals of the plurality of subframe gain signals, wherein the signal power of the at least two subframe gain signals is not in the second preset power range; the power interval of the second preset power range is smaller than the power interval of the first preset power range;
and the second gain adjustment module is used for determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range, and sequentially adjusting the first gain value according to the at least two sub-gain adjustment values to obtain a second gain value.
Optionally, the second power comparing module is configured to:
determining the magnitude relation between the signal power of each subframe gain signal in the at least two subframe gain signals and the maximum value and the minimum value of the second preset power range;
if the signal power of the subframe gain signal is determined to be larger than the maximum value, determining that a sub-gain adjustment value corresponding to the subframe gain signal is a first adjustment value, or if the signal power of the subframe gain signal is determined to be smaller than the minimum value, determining that the sub-gain adjustment value corresponding to the subframe gain signal is a second adjustment value;
wherein the first adjustment value is used to increase the first gain value by a first preset value, and the second adjustment value is used to decrease the first gain value by a second preset value.
Optionally, the second gain adjustment module is configured to:
determining an adjustment value corresponding to each sub-gain adjustment value of the at least two sub-gain adjustment values, and adjusting the first gain value according to all determined adjustment values to obtain an adjusted second gain value; wherein the adjustment value is the first adjustment value or the second adjustment value.
In a third aspect, an embodiment of the present invention provides a computer apparatus, which includes a processor, and the processor is configured to implement the method according to the second aspect when executing a computer program stored in a memory.
In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the method according to the second aspect.
In the embodiment of the invention, the input signal is divided into a plurality of frame signals, the current frame signal is multiplied by the initial gain value obtained in the previous period, so that the signal power of the gain signal is obtained, the initial gain value is adjusted with different precisions according to the signal power of the gain signal, and the adjusted second gain value of which the corresponding signal power is in the power range allowed by the system is obtained, so that the frame signal is used as the adjusting basis, the real-time and rapid adjusting effect can be achieved, and the accuracy is higher.
Meanwhile, the gain value is acted on the next frame signal, so that the signal power can be kept in an ideal interval, and the stability of the signal power of the output signal is ensured.
Drawings
FIG. 1 is a schematic diagram of a prior art AGC circuit;
FIG. 2 is a schematic diagram of a circuit for adjusting gain according to an embodiment of the present invention;
FIG. 3 is a block diagram of a circuit for adjusting gain according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating power ranges and corresponding gain adjustment values in an embodiment of the present invention;
FIG. 5 is a flowchart of a method for adjusting gain according to an embodiment of the present invention;
FIG. 6 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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.
The technical solution is described in detail below with reference to the drawings and the detailed description.
Example one
The circuit for adjusting the gain provided in the embodiment of the present invention may be an AGC circuit, and its circuit structure is shown in fig. 2, and the circuit for adjusting the gain includes a signal receiving module 10, a first signal gain module 20, a first adjusting module 30, a second signal gain module 40, and a second adjusting module 50.
In practical applications, the circuit for adjusting the gain further includes a signal output module 60, which is also shown in fig. 2. The circuit for adjusting the gain in the embodiment of the invention can be applied to a communication system, for example, can be applied to signal receiving/transmitting.
Specifically, the signal receiving module 10 may be configured to receive an input signal and divide the input signal into at least two frame signals. That is, the signal receiving module 10 may divide the received input signal in a frame form, thereby adjusting the input signal to an applicable serial form. For example, the input signal is adjusted to an applicable serial form 10ms frame apart.
In practical applications, the signal receiving module 10 may perform frame division on the input signal in real time, and sequentially send the divided frame signals to the first signal gain module 20.
The first signal gain module 20 may be configured to multiply a first frame signal of the received at least two frame signals by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal. The first frame signal may refer to a frame signal currently received by the first signal gain module 20 from the signal receiving module 10.
The initial gain value mainly refers to a gain value obtained after adjustment in a previous period. That is, the initial gain value may represent the gain value determined by the adjusting module when the system adjusts the signal power of the previous frame signal of the current frame signal to be within the normal power range. The initial gain value may be a preset gain value, for example 1000, when the adjustment module is first used.
In practical applications, the first signal gain module 20 may be an amplifier or a functional module including an amplifier. If the amplification of the amplifier is K100, the corresponding gain may be 20 logK, i.e. 40.
The first adjusting module 30 is connected to the first signal gain module 20, and configured to perform a first adjustment on the initial gain value according to the signal power of the first frame gain signal, so as to obtain a first gain value.
The block structure of the circuit for adjusting gain according to the embodiment of the present invention is shown in fig. 3, wherein the arrow may indicate the processing flow of the frame signal. Specifically, the first adjusting module 30 may include the following functional modules:
the first power statistics module may be configured to record a signal power of a currently received first frame gain signal.
In the statistical process, the first power statistical module may identify a frame header of a received frame signal and record a signal power of a currently received frame signal, and meanwhile, the first power statistical module may also clear a previous statistical power record, for example, a recorded signal power of a previous frame signal.
The second power comparison module is connected to the second power statistics module, and configured to compare the signal power of the second frame of gain signals with a power range corresponding to each of a plurality of preset power ranges, and determine a second preset power range in which the signal power of the second frame of gain signals is located.
The plurality of preset power ranges may be common power ranges preset in advance, for example, the range of signal power in which the received signal may be located is determined according to the operating property of the system. There may be one of a plurality of predetermined power ranges corresponding to normal signals, which may be referred to herein as a nominal predetermined power range.
In the embodiment of the present invention, a plurality of power thresholds may be set, where two adjacent power thresholds correspond to a preset power range, and power differences between two adjacent power thresholds in the plurality of power thresholds may be the same, for example, 3 dB. For example, 4 power thresholds may be set in the system, which are, in order from large to small: the ADC overflow threshold, the power high threshold 1, the power high threshold 2 and the power low threshold, wherein the ADC overflow threshold can be set according to the precision and the bearable power of an ADC chip, the power high threshold 1 can be set according to the maximum power which can be reached by a previous signal, the power high threshold 2 can be set according to the rated power peak value of a normal signal, and the power low threshold can be set according to the minimum signal power required by a test signal.
A plurality of preset power ranges may be determined based on the power threshold value. For example, if the signal power is P, the preset power range correspondingly determined according to the threshold value may include: in the I power range, P is more than or equal to the ADC overflow threshold; in the power range II, the overflow threshold of the ADC is more than P and is more than or equal to the power high threshold 1; in the power range III, the power high threshold 1 is more than or equal to P and more than the power high threshold 2; in the IV power range, the power high threshold 2 is more than or equal to P and is more than the power low threshold; within the V power range, P is less than or equal to the power low threshold. In the embodiment of the present invention, a power range formed by the power high threshold 2 and the power low threshold may be determined as a rated power range, and a signal with a signal power within the rated power range is generally regarded as a normal signal.
Then, the first power comparison module may compare the counted signal power of the first frame gain signal with a set power threshold, and locate which interval the signal power of this time is in, or may also determine whether a preset power range in which the signal power of the first frame gain signal is located is within a rated power range.
And the first gain adjustment module is connected with the first power comparison module and used for determining a gain adjustment value corresponding to the signal power of the first frame gain signal according to the corresponding relation between the power range and the gain adjustment value, and adjusting the initial gain value according to the gain adjustment value to obtain a first gain value.
That is to say, each power range in the multiple preset power ranges may correspond to one gain adjustment value, and in the set preset power range, the larger the power threshold value of the power range is, the larger the adjustment of the preset power range on the signal power is, and the larger the adjusted gain adjustment value is.
For example, the power of the adjustment signal may be-3 dB (i.e. 3dB power reduction) for the I-th power range and the corresponding gain adjustment value may be-200, i.e. 200 reduction of the initial gain value. The power of the adjustment signal corresponding to the power range III may be-1 dB, and the corresponding gain adjustment value may be-150, that is, the initial gain value is reduced by 150; the IV power range may be a rated power range, and the corresponding gain adjustment value may be 0, that is, if the signal power is within the range, the gain value does not need to be adjusted; the power of the adjustment signal for the vth power range may be +1dB, and the corresponding gain adjustment value may be + 150.
Each preset power range and the corresponding adjusted signal power are shown in fig. 4, in which a double arrow indicates a power difference between two threshold values, a one-way upward arrow indicates increasing the signal power (corresponding to increasing the first gain value), and a one-way downward arrow indicates decreasing the signal power (corresponding to decreasing the first gain value).
Therefore, after determining the preset power range in which the signal power of the first frame gain signal is located, the first gain adjustment module may adjust the initial gain value according to the gain value corresponding to the preset power range, so as to obtain the adjusted gain value.
For example, the initial gain value is 1000, and if the signal power of the first frame gain signal is determined to be greater than the ADC overflow threshold, i.e., within the ith power range, the initial gain value may be adjusted to 800. Alternatively, if it is determined that the signal power of the first frame gain signal is within the III-th range, the initial gain value may be adjusted to 850. Alternatively, if the signal power of the first frame gain signal is determined to be within the IV range, the gain value does not need to be adjusted, and at this time, the determined first gain value may be the same as the initial gain value.
In the embodiment of the present invention, the first adjusting module 30 determines to increase or decrease the signal power by determining the preset power range in which the signal power is located, so as to perform a large-amplitude adjustment on the initial gain value, that is, based on the requirement of power adjustment, to correspondingly increase or decrease the initial gain value, so that the signal power corresponding to the adjusted first gain value is in or closer to the rated power range.
And a second signal gain module 40, respectively connected to the first signal gain module 20 and the first adjustment module 30, for multiplying the first gain signal frame by the first gain value to obtain a second gain signal frame.
Specifically, the first gain adjustment module sends the first gain value to the second signal gain module 40 after determining the first gain value. Meanwhile, the second signal gain module 40 also receives the first frame gain signal processed and transmitted by the first signal gain module 20, and multiplies the first frame gain signal by the first gain value by using a multiplier to obtain a second frame gain signal, where the second frame gain signal and the first frame gain signal have different signal amplitudes.
In the embodiment of the present invention, the first adjusting module 30 performs a first adjustment on the initial gain signal according to the signal power of the first frame gain signal, and feeds back the adjusted first gain value to act on the first frame gain signal, so as to form a first AGC circuit loop.
A second adjusting module 50, connected to the second signal gain module 40, configured to perform a second adjustment on the first gain value according to the signal power of the second gain signal frame, to obtain an adjusted second gain value, and feed back the second gain value to the first signal gain module 20, so as to use the second gain value as an initial gain value of a next signal frame; and the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by the system.
That is, the second adjustment module 50 further performs a small adjustment on the first gain value, so that the signal power corresponding to the determined second gain value is within the power range allowed by the system.
Specifically, the second adjustment module 50 includes the following functional modules:
and the second power statistical module is used for dividing the received second frame gain signal into a plurality of subframe gain signals and recording the power signal corresponding to each subframe gain signal. For example, a 10ms second frame gain signal is divided into 10 1ms sub-frame gain signals, and the signal power of each sub-frame gain signal is recorded.
A second power comparison module, configured to compare the signal power of each subframe gain signal with a maximum value and a minimum value of a second preset power range, and determine at least two subframe gain signals of the plurality of subframe gain signals whose signal power is not within the second preset power range; and the power interval of the second preset power range is smaller than the power interval of the first preset power range.
The maximum value (or power high threshold) and the minimum value (or power low threshold) of the second predetermined power range may be determined by the maximum power value and the minimum power value allowed by the normal signal.
The second power comparison module may determine a magnitude relationship between a signal power of each of the at least two subframe gain signals and a maximum and minimum of a second predetermined power range.
If the signal power of the subframe gain signal is determined to be larger than the maximum value, determining that a sub-gain adjustment value corresponding to the subframe gain signal is a first adjustment value, or if the signal power of the subframe gain signal is determined to be smaller than the minimum value, determining that the sub-gain adjustment value corresponding to the subframe gain signal is a second adjustment value; wherein the first adjustment value is used to increase the first gain value by a first preset value, for example the first gain value may be +100, and the second adjustment value is used to decrease the first gain value by a second preset value, for example the first gain value may be-100.
Therefore, the second power comparing module may determine an adjustment value corresponding to each sub-gain adjustment value of the at least two sub-gain adjustment values, for example, to be +100 or-100, and adjust the first gain value according to all the determined adjustment values to obtain an adjusted second gain value, where the adjustment value is the first adjustment value or the second adjustment value.
And the second gain adjustment module is used for determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and a second preset power range, and sequentially adjusting the first gain value according to the at least two sub-gain adjustment values to obtain a second gain value.
In the embodiment of the present invention, the second adjusting module 50 further adjusts the first gain signal according to the signal power of the second frame gain signal, and feeds back the adjusted second gain value to the first signal gain module 20 to act on the second frame signal to form the second AGC circuit loop, and the second AGC circuit loop can implement fine adjustment of the signal power, so that the whole circuit system can implement control of the signal power of the system through one coarse adjustment with a large amplitude and one fine adjustment with a small amplitude, so as to achieve the technical effect of keeping the signal power within an ideal interval.
Meanwhile, in the embodiment of the invention, the digital signal processing method is adopted, and the signal power is adjusted by using two different adjustment accuracies, so that the accuracy of the gain adjustment of the AGC circuit is higher and the adjustment interval is more stable than that of the AGC circuit in the prior art. In addition, in the embodiment of the invention, the frame signal is used as the adjusting basis, so that the real-time and rapid adjusting effect can be achieved, the accuracy is higher, the platform transplantation is more convenient, and the use and the maintenance are more convenient.
Example two
Fig. 5 provides a method for adjusting gain according to an embodiment of the present invention, which may be applied to a circuit having the adjusted gain shown in fig. 2 and/or a device including the circuit for adjusting gain. The method can be described as follows:
s11: multiplying a first frame signal in at least two frame signals included in the received input signal by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal;
s12: performing first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value, and multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal;
s13: performing second adjustment on the first gain value according to the signal power of the second frame gain signal to obtain an adjusted second gain value; the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system;
s14: the second gain value is determined as an initial gain value of a second frame signal subsequent to the first frame signal among the at least two frame signals.
In embodiments of the present invention, the circuitry may separate the received input signal into a multi-frame signal in frame form in S11, for example, adjusting the input signal to an applicable serial form 10ms frame apart. The multiplier may further be used to multiply the current first frame signal by an initial gain value, which may be an adjusted gain value in the last period.
In practical application, after the first frame signal is multiplied by the initial gain value to obtain the first frame gain signal, the first frame gain signal can be output through the corresponding signal output module.
In S12, the initial gain value is roughly adjusted once according to the signal power of the gain signal of the first frame, i.e., adjusted with a larger power range, for example, the initial gain value may be increased or decreased by 200dB by the first adjustment, which corresponds to the signal power, i.e., the signal power increased or decreased by 3 dB.
Specifically, the process of S12 may be determining a first preset power range in which the signal power of the first frame gain signal is located, determining a gain adjustment value corresponding to the first preset power range according to a corresponding relationship between the power range and the gain adjustment value, and then adjusting the initial gain value according to the gain adjustment value to obtain the adjusted first gain value. Please refer to fig. 4 and the corresponding description for each preset power range and the corresponding adjusted signal power, which are not described herein again.
That is, after the signal power of the first frame gain signal is determined, the signal power may be compared with a power threshold value to determine a power range in which the signal power is located, and then the initial gain value may be adjusted according to a gain adjustment value corresponding to the power range, so that the signal power corresponding to the first gain value obtained after the first adjustment is within or close to a rated power range, that is, a power range formed by the power high threshold 2 and the power low threshold in fig. 4.
In the embodiment of the present invention, the process of S13 may include the following processes:
(1) and dividing the second frame gain signal into a plurality of subframe gain signals, and recording a power signal corresponding to each subframe gain signal. For example, a 10ms second frame gain signal is divided into 10 1ms sub-frame gain signals, and the signal power of each sub-frame gain signal is recorded.
(2) Determining at least two subframe gain signals of the plurality of subframe gain signals, wherein the signal power of the at least two subframe gain signals is not within a second preset power range; and the power interval of the second preset power range is smaller than the power interval of the first preset power range.
The maximum value (or power high threshold) and the minimum value (or power low threshold) of the second predetermined power range may be determined by the maximum power value and the minimum power value allowed by the normal signal, the difference between the maximum value and the minimum value may be small, for example, 1dB, that is, the power interval of the second predetermined power range may be 1dB, and the power interval of the first predetermined power range may be large, for example, 3 dB. In the embodiment of the present invention, the signal with the signal power within the second preset power range may be considered as a normal signal.
The at least two subframe gain signals may be signals of which the signal power is greater than the maximum value of the second preset power range and is less than the minimum value of the second preset power range among the plurality of subframe gain signals.
(3) And determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and a second preset power range.
Wherein, the at least two sub-gain adjustment values may be the values with smaller adjustment amplitude, i.e. the amplitude of the signal power adjusted correspondingly by each self-gain adjustment value is smaller, such as 1dB or 0.5dB, etc.
Specifically, when at least two sub-gain adjustment values are determined, a magnitude relationship between a signal power of each sub-frame gain signal in the at least two sub-frame gain signals and a maximum value and a minimum value of a second preset power range may be determined, and if it is determined that the signal power of the sub-frame gain signal is greater than the maximum value, the sub-gain adjustment value corresponding to the sub-frame gain signal is determined to be a first adjustment value, or if it is determined that the signal power of the sub-frame gain signal is less than the minimum value, the sub-gain adjustment value corresponding to the sub-frame gain signal is determined to be a second adjustment value. The first adjustment value may be used to increase the first gain value by a first preset value, the second adjustment value may be used to decrease the first gain value by a second preset value, the first preset value may be +100 (corresponding to a 0.5dB increase in signal power), and the second preset value may be-100 (corresponding to a 0.5dB decrease in signal power).
(4) And adjusting the first gain value in sequence according to at least two sub-gain adjustment values to obtain a second gain value.
That is to say, an adjustment value corresponding to each sub-gain adjustment value of the at least two sub-gain adjustment values is determined, and the adjustment value is the determined first adjustment value or the second adjustment value, and further, the first gain value is adjusted according to all the determined adjustment value interfaces to obtain the adjusted second gain value.
For example, the first adjustment modulation value is 800, and if the signal power of 5 subframe gain signals out of 10 subframe gain signals of 1ms is not in the second preset power range, and the correspondingly determined sub-gain adjustment values are-100, +100, -100, and +100, respectively, then the second adjustment value obtained by the action of these self-gain adjustment values is 700.
Of course, in practical applications, the fine adjustment of the gain value based on the plurality of subframe gain signals corresponding to the second frame gain signal may be performed in real time. The signal power of each sub-frame gain signal is counted along with the receiving sequence and compared with a threshold value of a preset power range, so that a corresponding sub-adjustment gain value is determined according to the comparison result, and the gain value is adjusted based on the sub-adjustment gain value.
For example, the first adjusted gain value is 800, and the second frame gain signal corresponds to 3 subframe gain signals. If it is determined that the sub-adjustment gain value corresponding to the 1 st sub-frame gain signal is +100 (corresponding to the signal power being increased by 0.5dB), the first gain value is increased by 100, then, it is determined that the sub-adjustment gain value corresponding to the 2 nd sub-frame gain signal is 0 (the signal power being within the second preset power range), the first gain value is unchanged on the basis of increasing by 100, then, if it is determined that the sub-adjustment gain value corresponding to the 3 rd sub-frame gain signal is-100 (corresponding to the signal power being decreased by 0.5dB), the first gain value is decreased by 100 on the basis of increasing by 100, and finally, the gain value 800 after the fine adjustment is obtained, that is, the second gain value.
In the embodiment of the present invention, after the second gain value is determined in S13, the second gain value can be fed back to the next period, i.e. used as the initial gain value of the next frame signal.
Therefore, in the embodiment of the invention, by adopting a digital signal processing method, the signal power is adjusted by using two different adjustment accuracies, namely, one large-amplitude coarse adjustment and one small-amplitude fine adjustment, so that the technical effect of keeping the signal power in an ideal interval is achieved, and compared with the prior art, the AGC circuit gain adjustment has higher accuracy and more stable adjustment interval. In addition, in the embodiment of the invention, the frame signal is used as the adjusting basis, so that the real-time and rapid adjusting effect can be achieved, the accuracy is higher, the platform transplantation is more convenient, and the use and the maintenance are more convenient.
EXAMPLE III
In an embodiment of the present invention, a computer apparatus is further provided, which has a structure as shown in fig. 6, and includes a processor 31 and a memory 32, where the processor 31 is configured to implement the steps of the method for adjusting gain provided in the second embodiment of the present invention when executing the computer program stored in the memory 32.
Optionally, the processor 31 may specifically be a central processing unit, an Application Specific Integrated Circuit (ASIC), one or more Integrated circuits for controlling program execution, a hardware Circuit developed by using a Field Programmable Gate Array (FPGA), or a baseband processor.
Optionally, the processor 31 may include at least one processing core.
Optionally, the electronic device further includes a Memory 32, and the Memory 32 may include a Read Only Memory (ROM), a Random Access Memory (RAM), and a disk Memory. The memory 32 is used for storing data required by the processor 31 in operation. The number of the memory 32 is one or more.
Example four
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the steps of the method for adjusting gain according to the second embodiment of the present invention may be implemented.
In the embodiments of the present invention, it should be understood that the disclosed method and circuit for adjusting gain can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical or other form.
The functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be an independent physical module.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device, such as a personal computer, a server, or a network device, or a Processor (Processor), to execute all or part of the steps of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Universal Serial Bus flash drive (USB), a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
The above embodiments are only used to describe the technical solutions of the present invention in detail, but the above embodiments are only used to help understanding the method of the embodiments of the present invention, and should not be construed as limiting the embodiments of the present invention. Variations or substitutions that may be readily apparent to one skilled in the art are intended to be included within the scope of the embodiments of the present invention.

Claims (13)

1. A method of adjusting gain, comprising:
multiplying a first frame signal of at least two frame signals included in a received input signal by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal;
performing first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value, and multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal;
dividing the second frame gain signal into a plurality of subframe gain signals, and recording the signal power corresponding to each subframe gain signal;
determining at least two subframe gain signals of the plurality of subframe gain signals, wherein the signal power of the at least two subframe gain signals is not within a second preset power range;
determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range;
sequentially carrying out second adjustment on the first gain value according to the at least two sub-gain adjustment values to obtain a second gain value; the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system;
determining the second gain value as an initial gain value of a second frame signal of the at least two frame signals that follows the first frame signal.
2. The method of claim 1, wherein first adjusting the initial gain value based on the signal power of the first frame gain signal to obtain a first gain value comprises:
determining a first preset power range in which the signal power of the first frame gain signal is located;
determining a gain adjustment value corresponding to the first preset power range according to the corresponding relation between the power range and the gain adjustment value;
and adjusting the initial gain value according to the gain adjustment value to obtain an adjusted first gain value.
3. The method of claim 2, wherein a power interval of the second predetermined power range is smaller than a power interval of the first predetermined power range.
4. The method according to any one of claims 1-3, wherein determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range comprises:
determining the magnitude relation between the signal power of each subframe gain signal in the at least two subframe gain signals and the maximum value and the minimum value of the second preset power range;
if the signal power of the subframe gain signal is determined to be larger than the maximum value, determining that a sub-gain adjustment value corresponding to the subframe gain signal is a first adjustment value, or if the signal power of the subframe gain signal is determined to be smaller than the minimum value, determining that the sub-gain adjustment value corresponding to the subframe gain signal is a second adjustment value;
wherein the first adjustment value is used to increase the first gain value by a first preset value, and the second adjustment value is used to decrease the first gain value by a second preset value.
5. The method of claim 4, wherein adjusting the first gain value in sequence according to the at least two sub-gain adjustment values to obtain a second gain value comprises:
determining an adjustment value corresponding to each sub-gain adjustment value in the at least two sub-gain adjustment values, where the adjustment value is the first adjustment value or the second adjustment value;
and adjusting the first gain value according to all the determined adjustment values to obtain an adjusted second gain value.
6. A circuit for adjusting gain, comprising:
the signal receiving module is used for receiving an input signal and dividing the input signal into at least two frames of signals;
a first signal gain module, configured to multiply a first frame signal of the at least two frame signals by an initial gain value to obtain a first frame gain signal corresponding to the first frame signal;
the first adjusting module is connected with the first signal gain module and used for carrying out first adjustment on the initial gain value according to the signal power of the first frame gain signal to obtain a first gain value;
a second signal gain module, connected to the first signal gain module and the first adjustment module, respectively, for multiplying the first frame gain signal by the first gain value to obtain a second frame gain signal;
a second adjusting module, connected to the second signal gain module, configured to perform a second adjustment on the first gain value according to the signal power of the second frame gain signal, to obtain an adjusted second gain value, and feed back the second gain value to the first signal gain module, so as to use the second gain value as an initial gain value of a next frame signal; the adjustment value of the first adjustment is larger than the adjustment value of the second adjustment, and the signal power corresponding to the second gain value is in a power range allowed by a system;
wherein the second adjusting module comprises:
the second power statistical module is used for dividing the received second frame gain signal into a plurality of subframe gain signals and recording the signal power corresponding to each subframe gain signal;
the second power comparison module is used for comparing the signal power of each subframe gain signal with the maximum value and the minimum value of a second preset power range, and determining at least two subframe gain signals of the plurality of subframe gain signals, wherein the signal power of the at least two subframe gain signals is not in the second preset power range;
and the second gain adjustment module is used for determining at least two sub-gain adjustment values corresponding to the at least two sub-frame gain signals according to the at least two sub-frame gain signals and the second preset power range, and sequentially adjusting the first gain value according to the at least two sub-gain adjustment values to obtain a second gain value.
7. The circuit of claim 6, wherein the circuit further comprises:
and the signal output module is connected with the first signal gain module and used for outputting the signal processed by the first signal gain module.
8. The circuit of claim 7, wherein the first adjustment module comprises:
the first power statistical module is used for recording the signal power of the currently received first frame gain signal;
the first power comparison module is used for comparing the signal power of the first frame gain signal with a power range corresponding to each power range in a plurality of preset power ranges, and determining a first preset power range in which the signal power of the first frame gain signal is located;
and the first gain adjustment module is used for determining a gain adjustment value corresponding to the signal power of the first frame gain signal according to the corresponding relation between the power range and the gain adjustment value, and adjusting the initial gain value according to the gain adjustment value to obtain a first gain value.
9. The circuit of claim 8, wherein a power interval of the second predetermined power range is less than a power interval of the first predetermined power range.
10. The circuit of any of claims 6-9, wherein the second power comparison module is to:
determining the magnitude relation between the signal power of each subframe gain signal in the at least two subframe gain signals and the maximum value and the minimum value of the second preset power range;
if the signal power of the subframe gain signal is determined to be larger than the maximum value, determining that a sub-gain adjustment value corresponding to the subframe gain signal is a first adjustment value, or if the signal power of the subframe gain signal is determined to be smaller than the minimum value, determining that the sub-gain adjustment value corresponding to the subframe gain signal is a second adjustment value;
wherein the first adjustment value is used to increase the first gain value by a first preset value, and the second adjustment value is used to decrease the first gain value by a second preset value.
11. The circuit of claim 10, wherein the second gain adjustment module is to:
determining an adjustment value corresponding to each sub-gain adjustment value of the at least two sub-gain adjustment values, and adjusting the first gain value according to all determined adjustment values to obtain an adjusted second gain value; wherein the adjustment value is the first adjustment value or the second adjustment value.
12. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method according to any of claims 1 to 5 are performed when the computer program is executed by the processor.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201711193565.6A 2017-11-24 2017-11-24 Method and circuit for adjusting gain Active CN107911091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711193565.6A CN107911091B (en) 2017-11-24 2017-11-24 Method and circuit for adjusting gain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711193565.6A CN107911091B (en) 2017-11-24 2017-11-24 Method and circuit for adjusting gain

Publications (2)

Publication Number Publication Date
CN107911091A CN107911091A (en) 2018-04-13
CN107911091B true CN107911091B (en) 2021-09-24

Family

ID=61848002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711193565.6A Active CN107911091B (en) 2017-11-24 2017-11-24 Method and circuit for adjusting gain

Country Status (1)

Country Link
CN (1) CN107911091B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889968B (en) * 2019-01-08 2021-11-02 京信网络系统股份有限公司 Power amplifier device and aging method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09148997A (en) * 1995-11-22 1997-06-06 Matsushita Electric Ind Co Ltd Automatic gain control circuit
US20030026363A1 (en) * 2001-07-31 2003-02-06 Jan Stoter Adaptive automatic gain control
CN1765071A (en) * 2003-03-27 2006-04-26 美商内数位科技公司 Method and apparatus for estimating and controlling initial time slot gain in a wireless communication system
KR100715912B1 (en) * 2004-08-10 2007-05-08 삼성전자주식회사 Apparatus and method for controlling digital agc in ofdma communication system
CN102594275A (en) * 2011-01-07 2012-07-18 中国科学院微电子研究所 Automatic gain control device and automatic gain control method
CN103546110B (en) * 2013-10-09 2016-08-17 京信通信系统(中国)有限公司 A kind of Attenuation control voltage determines method, device and alc circuit

Also Published As

Publication number Publication date
CN107911091A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
US8615095B2 (en) Automatic volume control for audio signals
US7627293B2 (en) Strategic predistortion function selection
US9401685B2 (en) Systems and methods for adjusting automatic gain control
US10355890B2 (en) Repeatable backchannel link adaptation for high speed serial interfaces
CN107086859B (en) Digital automatic gain control circuit for wireless communication receiver
US20160173808A1 (en) System and method for level control at a receiver
EP3209071B1 (en) Voltage regulation method and apparatus for power amplifier
GB2506458A (en) Automatic gain control system for an analogue to digital converter
CN107333076B (en) Television and method and device for adjusting intermediate frequency point data of audio signal of television
US9444665B2 (en) Signal processing system and signal processing method cooperating with variable gain amplifier
US11196399B2 (en) Signal processing method, signal processing device and signal processing system
CN107911091B (en) Method and circuit for adjusting gain
US9059671B2 (en) Automatic gain control device
US20120025908A1 (en) Automatic gain control
EP2200340A1 (en) Sound processing methods and apparatus
US7277510B1 (en) Adaptation algorithm based on signal statistics for automatic gain control
US9191737B2 (en) Crest-factor based gain modification
US9070371B2 (en) Method and system for peak limiting of speech signals for delay sensitive voice communication
CN102739178A (en) Mixed signal dynamic range compression
US10218328B2 (en) Audio processing apparatus for generating audio signals for monitoring from audio signals for recording and method of controlling same
CN107708036B (en) Method and device for debugging output power of audio equipment
CN108063601B (en) Automatic gain control circuit and signal processing system
CA2607144A1 (en) Cellular network amplifier with automated output power control
CN102665267B (en) A kind of power regulating method and device
US20190181819A1 (en) Automatic gain control apparatus and automatic 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200107

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Luogang District Science City, Guangzhou, Shenzhou Road, No. 10, Guangdong

Applicant before: Jingxin Communication System (China) Co., Ltd.

Applicant before: Jingxin Communication System (Guangzhou) Co., Ltd.

Applicant before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant before: Comba Telecom System (China) Ltd.

GR01 Patent grant
GR01 Patent grant