Models a variable gain amplifier
serdes.VGA system object scales the amplitude of the input waveform
based on a gain specified by the user.
To scale the input signal:
serdes.VGA 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? (MATLAB).
returns a VGA object that
modifies a input waveform according to the gain defined by the user.
vga = serdes.VGA
returns a VGA object with each specified property set to specific value. Unspecified
properties have default values.
vga = serdes.VGA(
vga = serdes.VGA('ACGain',5)
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 (MATLAB).
Mode— VGA operating mode
VGA operating mode, specified as
Mode determines if the VGA adjusts the gain of input signal or
acts as a pass-through.
|Mode Value||VGA Mode||VGA Operation|
Gain— Multiplicative gain used to scale the input waveform
1(default) | scalar
Multiplicative gain used to scale the input waveform, specified as a unitless scalar.
x— Input signal
Input signal to be scaled, specified as a scalar or vector.
y— Scaled output signal
Scaled output signal, returned as a scalar or vector corresponding to the input signal.
To use an object function, specify the
object™ as the first input argument. For
example, to release system resources of a System
This example shows how to apply variable gain to input waveform using
serdes.VGA system object™.
Create the input waveform.
t = linspace(0,12,101); y1 = sin(t);
Create the VGA object with a scale factor of 3.
vga = serdes.VGA('Gain',3);
Process the input waveform with the VGA object.
y2 = vga(y1);
Plot the input and output waveforms.
figure plot(t,y1,t,y2) xlabel('Time') ylabel('Voltage') legend('Input','output') grid on title(sprintf('Scaled Output Waveform Using VGA System Object = %g',vga.Gain))
Usage notes and limitations:
IBIS-AMI codegen is not supported in MAC.