Embodiment
Embodiment mono-:
Fig. 1 shows the flow chart of rapid automatic gain control method of the present invention.Wherein, described auto gain control method can be used in the receiver of communication system.As a kind of optimal way, as shown in Figure 2, it comprises the structure of described receiver: antenna, radiofrequency signal amplification module (LNA), local oscillation signal provide module, frequency mixer, intermediate frequency filtering module, intermediate-freuqncy signal amplification module (PGA), analog to digital converter (ADC) and demodulator etc.Wherein, described radiofrequency signal amplification module is sent into frequency mixer after the radiofrequency signal of antenna access is amplified and is carried out mixing, described local oscillation signal provides module to comprise voltage controlled oscillator (VCO) and the signal of voltage controlled oscillator output is converted to the Quadrature signal generation device (0/90) of two-way orthogonal signalling (i/q signal), after the radiofrequency signal mixing that described frequency mixer is exported LNA based on two-way orthogonal signalling, form intermediate-freuqncy signal, by intermediate frequency filtering module, by sending into PGA after the intermediate-freuqncy signal filtering of two frequency mixer outputs, carry out intermediate frequency amplification again, again after analog to digital converter is converted to digital signal, by demodulator, give demodulation to obtain the communication information.
Concrete, in step S11, AGC (automatic gain control) system is calculated the first intermediate-freuqncy signal intensity before intermediate frequency filtering of intermediate-freuqncy signal that the radiofrequency signal conversion by current reception forms and the second intermediate-freuqncy signal intensity after intermediate frequency filtering.
As a kind of optimal way, the input signal of AGC (automatic gain control) system based on described intermediate frequency filtering module calculates described the first intermediate-freuqncy signal intensity.For example, the described AGC (automatic gain control) system first input signal based on described intermediate frequency filtering module calculates the first intermediate-freuqncy signal intensity, subsequently, described AGC (automatic gain control) system is digital the first intermediate-freuqncy signal intensity by described the first intermediate-freuqncy signal intensity-conversion, for example, be E
rssi.The method that the input signal of described AGC (automatic gain control) system based on described intermediate frequency filtering module calculates the first intermediate-freuqncy signal intensity is known to those skilled in the art knowing, therefore be not described in detail in this.
It should be noted that, the first intermediate-freuqncy signal intensity that described AGC (automatic gain control) system calculates is the intensity level after logarithm process, and the unit that is to say this first intermediate-freuqncy signal intensity is dBm.
As a kind of optimal way, the digital medium-frequency signal of described AGC (automatic gain control) system based on described ADC output calculates the second intermediate-freuqncy signal intensity, and for example, the second intermediate-freuqncy signal strength calculation formula of n time window is:
the sampled signal values that x (t) is described ADC.
It should be noted that, the second intermediate-freuqncy signal intensity that described AGC (automatic gain control) system calculates also, for the intensity level after logarithm process, that is to say that this second intermediate-freuqncy signal volume unit is dBm.
Then, in step S12, described AGC (automatic gain control) system judges whether described the second intermediate-freuqncy signal intensity surpasses predetermined threshold, if, described AGC (automatic gain control) system judges that described reception signal is useful signal, then perform step S13, otherwise, described AGC (automatic gain control) system judges that current reception signal is invalid signals, next signal of antenna reception of transmitter described in described automatic gain system wait, receives formed the second intermediate-freuqncy signal intensity of signal to again calculate next.
For example, for the receiver shown in Fig. 2, if the minimum signal strength require detecting be-105dBm, when the current gain of described LNA is maximum, for example, 30dB; The current gain of described PGA is also maximum, and for example, during 60dB, when described AGC (automatic gain control) system calculates surpass-15dBm of described the second intermediate-freuqncy signal intensity, described AGC (automatic gain control) system judges that current reception signal is useful signal.As can be seen here, described AGC (automatic gain control) system, after an energy computing cycle, just can detect the arriving of useful signal.
Then, in step S13, described AGC (automatic gain control) system is determined received signal strength according to described the first intermediate-freuqncy signal intensity, and then the intensity desired value of the radiofrequency signal of definite radiofrequency signal amplification module output.
As a kind of optimal way, described AGC (automatic gain control) system is first determined received signal strength according to numeral the first intermediate-freuqncy signal intensity calculating in step S11 and the current gain of described radiofrequency signal amplification module; Then, described AGC (automatic gain control) system is determined the intensity desired value of the radiofrequency signal of described radiofrequency signal amplification module output again based on described received signal strength.For example, numeral the first intermediate-freuqncy signal intensity calculating in the step S11 of institute is E
rssi, the current gain of described radiofrequency signal amplification module is initial value RF_GAIN_0, described AGC (automatic gain control) system determines that received signal strength is: E
ana=E
rssi-RF_GAIN_0, then, described AGC (automatic gain control) system is according to E
anainquire about following table one, carry out thus to determine the intensity desired value E of the radiofrequency signal of radiofrequency signal amplification module output
rf.
Wherein, in order to ensure receiving useful signal, described AGC (automatic gain control) system arranges the maxgain value that described initial value is radiofrequency signal amplification module conventionally.
Concrete, it is E that described AGC (automatic gain control) system calculates described received signal strength
ana=-50dBm, by question blank one, described AGC (automatic gain control) system obtains the intensity desired value E of the radiofrequency signal of described LNA output
rffor :-26dBm.
Table one: LNA gain and antenna end input signal energy relationship
It should be appreciated by those skilled in the art that above-mentionedly by tabling look-up to obtain the intensity desired value of radiofrequency signal, only just to list, but not for limiting the present invention.In addition, the gain of the LNA in this table one also only just lists with antenna end input signal strength relation.
Then,, in step S14, the intensity desired value of described AGC (automatic gain control) system based on described received signal strength and received signal strength and radiofrequency signal adjusted the current gain of described radiofrequency signal amplification module.For example, described AGC (automatic gain control) system obtains described received signal strength E
anafor-50dBm, the intensity desired value E of radiofrequency signal
rffor-26dBm, thus, described AGC (automatic gain control) system is adjusted to RF_GAIN_1=E by the gain of described LNA
rf-E
ana=-26-(50)=24dB.
As a kind of optimal way, described auto gain control method also comprises the intensity desired value of the intermediate-freuqncy signal of intensity desired value based on described radiofrequency signal and default described intermediate-freuqncy signal amplification module output, adjusts the step of the current gain of described intermediate-freuqncy signal amplification module.
For example, the intensity desired value E of the radiofrequency signal of described AGC (automatic gain control) system based on obtaining
rffor-26dBm; The intensity desired value E of the intermediate-freuqncy signal of default described intermediate-freuqncy signal amplification module output
iffor-10dBm, described AGC (automatic gain control) system is determined the current gain desired value IF_GAIN_1=E of described intermediate-freuqncy signal amplification module
if-E
rf=-10-(26)=16dB, thus, described AGC (automatic gain control) system by the current gain of described intermediate-freuqncy signal amplification module, for example, is initial value IF_GAIN_0, is adjusted to IF_GAIN_1=16dB.
Embodiment bis-:
In this enforcement, described AGC (automatic gain control) system according to the execution of step of step shown in Fig. 1 S14 after, described receiver is in receiving the operating state of effective radiofrequency signal, at described receiver, receive in the process of effective radiofrequency signal, described AGC (automatic gain control) system is again calculated by effectively receiving signal conversion and is formed and pass through the second intermediate-freuqncy signal intensity of intermediate frequency filtering, and based on described the second intermediate-freuqncy signal intensity again calculating, the current gain of described radiofrequency signal amplification module is regulated again.
For example, described AGC (automatic gain control) system is calculated the second intermediate-freuqncy signal intensity again according to the digital medium-frequency signal of described ADC output, and when the second intermediate-freuqncy signal intensity of calculating acquisition changes, for example, the the second intermediate-freuqncy signal intensity calculating with respect to step S11, becomes large, and described AGC (automatic gain control) system is according to predetermined step-length, for example, 3dB, regulates the gain of described LNA, and its gain is reduced, for example, by RF_GAIN_1=26dB, be reduced to RF_GAIN_2=26-3=23dB.
As a kind of optimal way, described method also comprises the step that the second intermediate-freuqncy signal intensity based on again calculating regulates again to the current gain of described intermediate-freuqncy signal amplification module.
For example, the second intermediate-freuqncy signal intensity of described AGC (automatic gain control) system based on again calculating, for example, this the second intermediate-freuqncy signal intensity is with respect to the second intermediate-freuqncy signal intensity calculating in step S11, reduced, described AGC (automatic gain control) system for example, according to predetermined step-length,, 3dB, tunes up the current gain of described intermediate-freuqncy signal amplification module.For example, by IF_GAIN_1=16dB, be increased to IF_GAIN_2=16+3=19dB.
Described in it should be appreciated by those skilled in the art that, based on step-length, the adjusting of gain is only just listed, but not limitation of the present invention, in fact, described step-length can be worth for other, for example, and 2dB etc.In addition,, in receiving the process of useful signal, described AGC (automatic gain control) system also can not carried out based on step-length the adjusting again of gain etc.; Have again, in receiving useful signal process, described AGC (automatic gain control) system can regularly be calculated the second intermediate-freuqncy signal intensity again, to can adjust in time the gain of radiofrequency signal amplification module and the gain of intermediate-freuqncy signal amplification module when reception signal energy changes.
Embodiment tri-
Fig. 3 shows speed automatic gain control system schematic diagram of the present invention.Wherein, described AGC (automatic gain control) system comprises: computing module 11, judge module 12, determination module 13 and radio frequency adjustment module 14.
Concrete, computing module 11 calculates the first intermediate-freuqncy signal intensity before intermediate frequency filtering of intermediate-freuqncy signal that the radiofrequency signal conversion by current reception forms and the second intermediate-freuqncy signal intensity after intermediate frequency filtering.
As a kind of optimal way, computing module 11 can comprise: receive signal energy indicating device (RSSI), analog to digital converter (R-ADC), as shown in Figure 4.Described RSSI calculates described the first intermediate-freuqncy signal intensity for the input signal based on intermediate frequency filtering module, and subsequently, described R-ADC is digital the first intermediate-freuqncy signal intensity by described the first intermediate-freuqncy signal intensity-conversion.For example, the input signal of described RSSI based on described intermediate frequency filtering module calculates the first intermediate-freuqncy signal intensity, and transfers digital the first intermediate-freuqncy signal intensity E to by described R-ADC
rssi.The method that the input signal of described RSSI based on described intermediate frequency filtering module calculates this first intermediate-freuqncy signal intensity is known to those skilled in the art knowing, therefore be not described in detail in this.
It should be noted that, the first intermediate-freuqncy signal intensity that described RSSI calculates is the intensity level after logarithm process, and the unit that is to say this first intermediate-freuqncy signal intensity is dBm.
As a kind of optimal way, the digital medium-frequency signal of described computing module 11 based on described ADC output calculates the second intermediate-freuqncy signal intensity, and for example, the second intermediate-freuqncy signal strength calculation formula of n time window is:
the sampled signal values that x (t) is described ADC.
Then, described judge module 12 judges whether described the second intermediate-freuqncy signal intensity surpasses predetermined threshold, if, the described reception signal of described judge module 12 judgement is useful signal, otherwise, the current reception signal of described judge module 12 judgement is invalid signals, and next signal of antenna reception of transmitter described in described automatic gain system wait, so that described computing module 11 calculates the second intermediate-freuqncy signal intensity that next receives the formation of signal again.
For example, for the receiver shown in Fig. 2, when the current gain of described LNA is maximum, for example, 30dB; The current gain of described PGA is also maximum, and for example, during 60dB, as the surpass-15dBm of described the second intermediate-freuqncy signal intensity that the described computing module 11 of described judge module 12 judgement calculates, the current reception signal of described judge module 12 judgement is useful signal.As can be seen here, described AGC (automatic gain control) system, after an energy computing cycle, just can detect the arriving of useful signal.
Then, described determination module 13 is determined received signal strength according to described the first intermediate-freuqncy signal intensity, and then the intensity desired value of the radiofrequency signal of definite radiofrequency signal amplification module output.
As a kind of optimal way, received signal strength is determined in the first intermediate-freuqncy signal intensity and the current gain of described radiofrequency signal amplification module that described determination module 13 first calculates according to computing module 11; Then, described determination module 13 is determined the intensity desired value of the radiofrequency signal of described radiofrequency signal amplification module output again based on described received signal strength.For example, the numeral first intermediate-freuqncy signal intensity of the R-ADC of described computing module 11 output is E
rssi, the current gain of described radiofrequency signal amplification module is initial value RF_GAIN_0, described AGC (automatic gain control) system determines that current received signal strength is: E
ana=E
rssi-RF_GAIN_0, then, described AGC (automatic gain control) system is according to E
anainquire about following table one, carry out thus to determine the intensity desired value E of the radiofrequency signal of radiofrequency signal amplification module output
rf.
Wherein, in order to ensure receiving useful signal, described AGC (automatic gain control) system arranges the maxgain value that described initial value is radiofrequency signal amplification module conventionally.
For example, to calculate described current received signal strength be E to described determination module 13
ana=-50dBm, by question blank one, described determination module 13 is determined the intensity desired value E of the radiofrequency signal of described LNA output
rffor :-26dBm.
It should be appreciated by those skilled in the art that and above-mentionedly by tabling look-up, determine that the intensity desired value of radiofrequency signal only just lists, but not for limiting the present invention.In addition, the gain of the LNA in this table one also only just lists with antenna end input signal strength relation.
Then, the intensity desired value of described radio frequency adjustment module 14 based on described received signal strength and radiofrequency signal adjusted the current gain of described radiofrequency signal amplification module.For example, the described received signal strength of described determination module 13 acquisition is E
anafor-50dBm, radio-frequency (RF) signal strength desired value E
rffor-26dBm, thus, described radio frequency adjustment module 14 is adjusted into RF_GAIN_1=E by the current gain of described LNA
rf-E
ana=-26-(50)=24dB.
As a kind of optimal way, described AGC (automatic gain control) system also comprises: intermediate frequency adjustment module (not giving diagram), for the second intermediate-freuqncy signal intensity desired value of intensity desired value based on described radiofrequency signal and default described intermediate-freuqncy signal amplification module output, adjust the current gain of described intermediate-freuqncy signal amplification module.
For example, the intensity desired value E of the radiofrequency signal of described intermediate frequency adjustment module based on obtaining
rffor-26dBm, the intensity desired value E of the second intermediate-freuqncy signal of default described intermediate-freuqncy signal amplification module output
iffor-10dBm, described intermediate frequency adjustment module determines that the current gain desired value of described intermediate-freuqncy signal amplification module is: IF_GAIN_1=E
if-E
rf=-10-(26)=16dB, thus, described intermediate frequency adjustment module by the current gain-adjusted of described intermediate-freuqncy signal amplification module to 16dB.
Embodiment tetra-:
In this enforcement, described AGC (automatic gain control) system also comprises: computing module 11, judge module 12, determination module 13 radio frequency adjustment modules 14 and radio frequency be adjustment module (not giving diagram) again.Wherein, the result of calculating is offered to the intensity desired value of the radiofrequency signal that judge module 12 judges, the judged result of determination module 13 based on described judge module 12 determined radiofrequency signal amplification module to described computing module 11 and the adjustment process of 14 pairs of radiofrequency signal amplification modules of radio frequency adjustment module is described in detail in the embodiment shown in fig. 3, at this, comprise by reference, no longer describe in detail.
When described receiver is after receiving the operating state of effective radiofrequency signal, at described receiver, receive in the process of effective radiofrequency signal, described computing module 11 calculates again by effectively receiving that signal conversion forms and the second intermediate-freuqncy signal intensity after filtering, and the described radio frequency again second intermediate-freuqncy signal intensity of adjustment module based on calculating again regulates again to the current gain of described radiofrequency signal amplification module.
For example, described computing module 11 calculates the second intermediate-freuqncy signal intensity again according to the digital medium-frequency signal of described ADC output, and when again calculating the intermediate-freuqncy signal intensity of acquisition and change, for example, intermediate-freuqncy signal intensity with respect to calculating before, becomes large, described radio frequency again adjustment module according to predetermined step-length, for example, 3dB, regulates the gain of described LNA, and its gain is reduced, for example, reduce 3dBm.For example, by RF_GAIN_1=26dB, be reduced to RF_GAIN_2=26-3=23dB.
As a kind of optimal way, described AGC (automatic gain control) system also comprises: intermediate frequency adjustment module, the course of work of this intermediate frequency adjustment module is described in detail in the embodiment shown in fig. 3, at this, no longer repeats.
As another kind of optimal way, described AGC (automatic gain control) system also comprises: intermediate frequency is adjustment module (not giving diagram) again, for the current gain of described intermediate-freuqncy signal amplification module being regulated again by effectively receiving the second intermediate-freuqncy signal intensity that signal conversion forms based on described.
For example, described intermediate frequency the second intermediate-freuqncy signal intensity that adjustment module calculates again based on described computing module 11 again, for example, this the second intermediate-freuqncy signal intensity is with respect to the second intermediate-freuqncy signal intensity calculating before described computing module 11, reduced, described intermediate frequency again adjustment module for example, according to predetermined step-length,, 3dBm, tunes up the current gain of described intermediate-freuqncy signal amplification module.For example, by IF_GAIN_1=16dB, be increased to IF_GAIN_2=16+3=19dB.Meanwhile, radio frequency again adjustment module regulates the gain of described LNA, and its gain is increased, and for example, increases 3dBm, for example, by RF_GAIN_1=26dB, is increased to RF_GAIN_2=26+3=29dB.
It should be appreciated by those skilled in the art that described radio frequency again adjustment module and intermediate frequency again adjustment module based on step-length, the adjusting of gain is only just listed, but not limitation of the present invention, in fact, described step-length can be worth for other, for example, 2dB etc.In addition,, in receiving the process of useful signal, described AGC (automatic gain control) system also can not carried out based on step-length the adjusting again of gain etc.
In sum, quick automatic controlling method for gain of the present invention and system can determine that based on a computing cycle whether the radiofrequency signal of reception is effective, and after determining that the radiofrequency signal receiving is effective, based on tabling look-up, can determine the gain desired value of RF Amplifier Module, and then the gain-adjusted of realization to radiofrequency signal amplification module and intermediate-freuqncy signal amplification module, therefore, the present invention is according to the parameter of table one, it to input signal strength, is the useful signal of-100~-28dBm, can within the very short time, complete convergence, actual only need the adjusting that 3us left and right just can complete pair gain, and signal to be greater than-28dBm of signal strength signal intensity, also only need to be in receiving the process of useful signal, then gain is regulated again, therefore, the gain-adjusted time is also very short, even if the adjusting again that need to gain, the convergence time of whole adjusting also can be controlled in 4us.
Above-described embodiment just lists expressivity principle of the present invention and effect is described, but not for limiting the present invention.Any person skilled in the art person all can without departing from the spirit and scope of the present invention, modify to above-described embodiment.Therefore, the scope of the present invention, should be as listed in claims.