Documentation |
The comm.AGC System object™ creates an automatic gain controller (AGC) that adaptively adjusts its gain to achieve a constant signal level at the output.
To adaptively adjust gain for constant signal-level output:
Define and set up your automatic gain controller object. See Construction.
Call step to adaptively adjust gain and achieve a constant signal level at the output according to the properties of comm.AGC. The behavior of step is specific to each object in the toolbox.
H = comm.AGC creates an automatic gain controller (AGC) System object, H, that adaptively adjusts its gain to achieve a constant signal level at the output.
H = comm.AGC(Name,Value) creates an AGC object, H, with the specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).
clone | Create AGC object with same property values |
isLocked | Locked status for input attributes and nontunable properties |
release | Allow property value and input characteristics changes |
reset | Reset internal states of automatic gain controller |
step | Apply adaptive gain to input signal |
In a linear loop AGC, the detector uses its output directly to generate an error signal. After applying a step size, the AGC passes the error signal to an integrator. The output of the integrator is used as the variable gain. Linear loop AGCs are limited by their decay, or slew, characteristics. In other words, they respond to input signal increases much more quickly than they respond to input signal decreases.
$$\begin{array}{l}y(n)=g(n)\cdot x(n);\\ e(n)=A-z(m);\\ g(n+1)=g(n)+K\cdot e(n);\end{array}$$
where
A represents the reference value, which is 1
K represents the step size
e represents the error signal
g represents the gain
x represents the input signal
y represents the output signal
z represents the detector output
In a logarithmic loop AGC, the logarithm of the ratio of the detector output and the reference signal represents the error signal. A logarithmic loop uses the exponential of the integrator output as the gain signal. Logarithmic-loop AGCs have the same response time to both increases or decreases to the input signal amplitude.
The logarithmic loop has longer attack and decay times. However, the gain pumping of the logarithmic loop is better than the linear loop.
$$\begin{array}{l}y(n)={e}^{g(n)}\cdot x(n);\\ e(n)=ln(A)-\mathrm{ln}(z(m));\\ g(n+1)=g(n)+K\cdot e(n);\end{array}$$
where
A represents the reference value, which is 1
K represents the step size
e represents the error signal
g represents the gain
x represents the input signal
y represents the output signal
z represents the detector output
Two AGC detectors are available:
z = |y| when the detector represents a rectifier
$$z(m)=\frac{1}{N}{\displaystyle {\sum}_{n=mN}^{(m+1)N-1}\left|y(n)\right|}$$
where N represents the update period
z = |y|^{2} represents the square law detector
$$z(m)=\frac{1}{N}{\displaystyle {\sum}_{n=mN}^{(m+1)N-1}{\left|y(n)\right|}^{2}}$$
where N represents the update period
There are three performance criteria for AGCs:
Attack time: The duration it takes the AGC to respond to an increase in the input amplitude.
Decay time: The duration it takes the AGC to respond to a decrease in the input amplitude.
Gain pumping: The variation in the gain value during steady-state operation.
Increasing the step size decreases the attack time and decay times, but it also increases gain pumping.