One of the most common topologies in electronic design is the Automatic Gain Control (AGC). In this post we will study what is its operating modes, its basic topology and its most common use. We will also make to its simulation in MatLab, using SIMULINK, understanding better its behavior.
One of the most common blocks in an electronic system is the linear amplifier. This is a device where the output signal is directly proportional to the input. As the output level is greater than the input, the block increase the signal level, then it is an amplification. If the output level was lower than the input level, then we would speak of a level reduction or attenuation.
The linear amplifiers usually have a fixed gain, which is the proportionality constant between the input and the output signals, and a variable gain, where this ratio can be controlled an external control voltage vc.
This voltage is a variable that also depends on time, although under conditions of free control, done by the user, once the control value is chosen, this variable becomes stationary with time and the amplifier becomes fixed gain.
However, the input signals may have oscillations due to the propagation channel, and increase or decrease in value as a function of time. If the amplifier has a fixed gain, the output will follow lineary the input variations.
In general, conventional amplifiers usually have a fixed gain with an external regulation that can be controlled by the user. However, within communication systems there may be cases in which it is always necessary to ensure that the output takes a fixed value. And for this it is needed to use an Automatic Gain Control (AGC).
THE AUTOMATIC GAIN CONTROL
The AGC is a feedback system, which uses the output variable, taking a sample, and processes it properly generating a control voltage vc(t) that varies the output level, keeping it fixed against the input variations.
The typical AGC block diagram can be seen in the following figure
It consists of a variable voltage amplifier, which is expressed by the formula seen in the previous section, an envelope detector, because the amplitude of the signal vout contains the information of the variation of the input signal, since vout is proportional a vin, a comparator, which compares the detected signal with a reference signal vref, which is the one that will govern the appropriate output level in vout and an integrating filter, which provides the control variable.
By varying vin at time t0, the VGA is in a steady state, behaving like a linear gain amplifier. This causes a variation in the output signal vout that follows the input vin. This variation is detected by the envelope detector, causing a change in the comparator output, which, when integrated, modifies the value of vc, adapting it so that vout is corrected and starts to match the value before the change.
It is a dynamic process: the vin and vout signals vary temporarily but keeping a stationary envelope level. For example, a pure sine wave has a constant envelope varying in [-1, 1] intervale
When a change in the envelope is detected at a certain time, the peak value of the amplitude changes and is detected by the detector, which initiates a temporary feedback process that does not affect the waveform, but does affect its amplitude.
CONTROL MECHANISMS IN AN AGC
Returning to the system in Fig. 1, where the VGA has a gain represented by the expression
In this expression the temporal domain is removed, because at this moment we are not interested in the temporal variation of vc, since if there is no variation in vin, vc remains stationary.
The input signal is the next
and the output signal is
This signal will pass through the envelope detector, the output of which is a signal that is proportional to the amplitude of the input signal, where k is the proportionality constant. Therefore, the output signal of the envelope detector will be
This signal is passed through a logarithmic amplifier, since the dependence of vE on vc is exponential. Since the base is natural, we choose the natural logarithm as the logarithmic amplifier, and we can get an output voltage v2 whose expression is
In this expression we can verify that k and g0 are constant values, and that a and vc are the ones that can vary with respect to time. If we now include the temporal variation of a, we will have that the expression is
Therefore a variation of a is compensated by a variation of vc so that v2 returns to the value before the change in a.
Making the comparison between the voltage v2(t) and vR, which is a fixed value and that will fix the output level on the amplifier, we have a signal v1 that has the following expression
This signal is passed through a low-pass filter that integrates it, getting vC(t). If the filter has a transfer function h(t), what we do is a convolution of the signal v1 with h(t)
In the temporal domain, convolution is a dynamic integral equation, so if we use the Laplace domain, we will transform that convolutional response to a response in the domain of the complex variable s, which is linear. Using this domain, the equation above is now
which is the Laplace transform. Studying the value of V1(s) if the output has a value an amplitude b
removing the dependency with k and with g0. Thus, making the same steps as in the previous case, we will have to
The first term is the quotient of two functions, one of them depends on the output amplitude and the other depends on the input amplitude. If we choose k · g0 = 1, we will get
And being y(t) and x(t) voltage values, we can apply the dB definition, which is
removing the temporary domain and turning the system into a totally linear system. Then we will have to
being the transfer function in dB of the variation between the output and input amplitudes.
If the filter used is an integrating filter with a pole at the origin (low-pass filter), like this
the expression will be
Now suppose that the input envelope AdB changes 1 dB, increasing or decreasing. The new envelope is A’dB(s), and the output envelope, B’dB(s). Then:
since feedback must always respond in the same way. Substituting the expression for the input variation in the previous expression we have
Se we can calculate B’dB(s) multiplying by the transfer function
And knowing that the first term is BdB(s), the expression will be the next
The above equation links the new envelope B’dB(s) with the former BdB(s). And being a transient response, applying the inverse transformation it is got
Lt’s study this result: When 1 dB (instant t=0) is increased, the expresion is b’dB(t)–bdB(t)=+δ(t)=+1, because at t=0 the filter h(t) has not worked yet. Therefore, at this time the difference between the new and the initial envelope is 1 dB. When t is increasing, there is an decreasing exponential response due to the second term of the previous expression, ans when the time is increasing more, the difference between b’dB(t) and bdB(t) is decreasing (inicially b’dB(t)>bdB(t)) until both are equal.
Conversely, decreasing the input envelope 1dB, then b’dB(t)–bdB(t)=-δ(t)=-1, and the final envelope decreases this value for the same reason, and the operation is the inverse of the previous case.
From this it follows that when the input envelope rises or falls 1 dB, the output envelope, at the initial moment, tends to rise or fall following the variation of the input envelope, but when time passes, the output envelope stabilizes until it reaches the initial value ydB(t).
The AGC time response is α·C/e es τ=1/α·C, which is a constant time. When this constant is high, the AGC changes slowly, but being low, the AGC changes fastly. A compromise with the AGC response time is required in signals that also contain nominal variations for their content, such as analogue audio or video signals, so as not to confuse a level variation with a variation of that content.
In this entry we have been able to verify what is the theoretical behavior of the AGC block diagram, studying its response in the Laplace domain and in the temporal domain. We have reached a transfer relationship that allows us to relate the variations of the output signal to the input signal and how we can calculate the AGC response time, which we will have to include through the integrating filter and the study of the variation constant of the amplifier gain.
In the next post we will study this system using SIMULINK.
- Benjamin C. Kuo; “Automatic Control Systems”; 2nd ed.; Englewood Cliffs, NJ; Prentice Hall; 1975
- Pere Matí i Puig; “Subsistemas de radiocomunicaciones analógicos”;Universitat Oberta de Catalunya;2010