Adaptively adjust gain for constant signal level output
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. For more information, see Logarithmic-Loop AGC.
This object is designed for streaming applications. For more information, see Tips.
To adaptively adjust gain for a constant signal level at the output:
Create the comm.AGC
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates an AGC
System object that adaptively adjusts its gain to achieve a constant signal
level at the output.agc
= comm.AGC
set properties using one or more name-value pairs. Enclose each name in quotes.
For example, 'agc
= comm.AGC(Name
,Value
)AdaptationStepSize
',0.05 sets the step size
for gain updates to 0.05.
adaptively adjusts the gain to the input signal to achieve a reference signal
level at the output. The AGC System object uses a square law detector to determine the output signal level.
For more information, see AGC Detector.y
= agc(x
)
[
returns y
,powerlevel
] = agc(x
)powerlevel
, the power level estimate of the input
signal. You can use powerlevel
as an energy detector
output.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
This System object is designed for streaming applications.
If the signal amplitude does not change within the frame, you can simulate an ideal AGC by calculating the average gain desired for a frame of samples. Then, apply the gain to each sample in the frame.
If you use the AGC with higher order QAM signals, you might need to reduce the variation in the gain during steady-state operation. Inspect the constellation diagram at the output of the AGC during steady-state operation. You can increase the averaging length to avoid frequent gain adjustments. An increase in averaging length reduces execution speed.