Automatically adjusts gain to maintain output waveform amplitude
System object™ applies an adaptive variable gain to the input waveform to achieve a desired RMS
output voltage. Averaging the RMS voltage over a specified number of symbols,
serdes.AGC performs automatic gain control (AGC) by increasing or
decreasing the gain, or keeping the gain constant.
To adjust the gain of the input signal:
serdes.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?.
returns an AGC object that
modifies an input waveform according to the root-mean-squared property of the
agc = serdes.AGC
agc = serdes.AGC(
sets properties using one or more name-value pairs. Enclose each property name in quotes.
Unspecified properties have default values.
agc = serdes.AGC('TargetRMSVoltage',0.5)returns an AGC object with an output RMS voltage of 0.5 V.
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release function unlocks them.
If a property is tunable, you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.Main
Mode— AGC operating mode
AGC operating mode, specified as
Mode determines if the AGC adjusts the gain of input baseband
signal or acts as a pass-through.
|Mode Value||AGC Mode||AGC Operation|
TargetRMSVoltage— Desired RMS voltage of output waveform
0.3(default) | nonnegative real scalar in the range [0, 10]
Desired RMS voltage of the output waveform, specified as a nonnegative real scalar
in the range [0, 10] in volts. Setting the
0 results in an all zero output.
SymbolTime— Time of single symbol duration
1e-10(default) | positive real scalar
Time of a single symbol duration, specified as a positive real scalar in seconds.
SampleInterval— Uniform time step of waveform
6.25e-12(default) | positive real scalar
Uniform time step of the waveform, specified as a real positive scalar in seconds.
Modulation— Modulation scheme
Modulation scheme, specified as
|Modulation Value||Modulation Scheme|
|Non-return to zero (NRZ)|
|Three-level pulse amplitude modulation (PAM3)|
|Four-level pulse amplitude modulation (PAM4)|
IBIS does not support PAM3 modulation scheme. So you cannot export to IBIS-AMI model if the modulation scheme is PAM3.
MaxGain— Maximum allowed AGC gain
10(default) | positive real scalar
Maximum allowed AGC gain, specified as a positive real scalar.
MaxGain provides a stable startup of the adaptive
AveragingLength— Averaging length for RMS calculation
100(default) | positive real integer
Averaging length, specified as a positive real integer.
AveragingLength defines the number of symbol over which the RMS
calculation of the input signal is made.
WaveType— Input wave type form
Input wave type form:
'Sample' — A sample-by-sample input signal.
'Impulse' — An impulse response input signal.
'Waveform' — A bit-pattern waveform type of input signal,
such as pseudorandom binary sequence (PRBS).
x— Input baseband signal
Input baseband signal. If the
WaveType is set to
'Sample', the input signal is a sample-by-sample signal specified
as a scalar. If the
WaveType is set to
'Impulse', the input signal is an impulse response vector
y— Gain adjusted output signal
Gain adjusted output signal. If the input signal is a sample-by-sample signal specified as a scalar, the output is also scalar. If the input signal is an impulse response vector signal, the output is also a vector.
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
serdes.AGC system object™ to reduce the amplitude of a waveform signal to maintain an rms voltage of
Create a signal with two sinusoids, one at
250 Hz, and the other at
340 Hz. The sampling frequency is 800 Hz. The signal is corrupted with additive zero-mean random noise.
Fs = 10000; L = 1000; t = (0:L-1)'/Fs; x = sin(2*pi*250*t) + 0.75*cos(2*pi*340*t); % Original signal y = x + .5*randn(size(x)); % Noisy signal
Find the frequency components of the signal using serdes.AGC.
agcblock = serdes.AGC('TargetRMSVoltage',0.25); z = agcblock(y);
Plot the input and modified waveforms.
figure, plot(t,y,t,z) legend('AGC input','AGC output') title('Example Application of the Automatic Gain Control SerDes block'); xlabel('time [seconds]'); ylabel('Volts');
 Design and Operation of Automatic Gain Control Loops for Receivers in Modern Communication Systems, https://www.analog.com/media/en/training-seminars/tutorials/42575412022953450461111812375Design_and_Operation_of_AGC_Loops.pdf.
Usage notes and limitations:
IBIS-AMI codegen is not supported in MAC.