Main Content

viewGain

Plot output transmitter power or output phase shift as a function of input transmitter power

Since R2024a

    Description

    viewGain(transm) plots the output power of the first channel of the transmitter as a function of input power to the transmitter, tranms, due to the gain specified by the transmitter's GainMethod property.

    example

    viewGain(transm,Type=PT) specifies the type of plot, PT. "AmAm" plots the receiver output power as a function of input power. "AmPm" plots the output phase shift as a function of input power. The default is "AmAm".

    viewGain(transm,Parent=hax) plots the output power on the hax axes.

    viewGain(transm,ChannelInde=cidx) plots the output power for the cidx channel.

    Examples

    collapse all

    Transmit a pulse containing a linear FM waveform. The transmitter has three channels with different gains, OIP3 values, and phase offsets.

    First, create an LFM waveform. The sample rate is 10 MHz, the pulse width is 10 microseconds, and the sweep bandwidth is 5 MHz.

    fs = 10e6;
    waveform = phased.LinearFMWaveform('SampleRate',fs, ...
        'PulseWidth',1e-5,'SweepBandwidth',5e6);
    x = waveform();

    Transmit the waveform over three channels..

    tx = phased.Transmitter(GainMethod="Cubic polynomial", ...
        Gain=[19,21,25],OIP3=[11,32,29],PhaseOffset=[0,30,45]);
    y = tx(x);

    Display gains for each channel.

    viewGain(tx,'ChannelIndex',1,'Parent',gca);
    hold on
    viewGain(tx,'ChannelIndex',2,'Parent',gca);
    viewGain(tx,'ChannelIndex',3,'Parent',gca);
    legend('Channel 1, Gain = 19','Channel 2, Gain = 21','Channel 3, Gain = 25', ...
        'Location','SouthEast')
    hold off

    Figure contains an axes object. The axes object with title Transmitter Gain Method Plot, xlabel Input Power (dBm), ylabel Output Power (dBm) contains 3 objects of type line. These objects represent Channel 1, Gain = 19, Channel 2, Gain = 21, Channel 3, Gain = 25.

    Transmit a waveform through a phased.Transmitter System object™. Use a lookup table gaun model to simulate non-linear gain behavior and specify noise using noise temperature. Display the transmitter phase shift.

    fs = 1e7;
    waveform = phased.LinearFMWaveform(SampleRate=fs,...
        PulseWidth=1e-5,SweepBandwidth=5e6);
    wav = waveform();

    Create a transmitter.

    pw = [-10 -5 0 5 10 15 20 25 30 35 40]';
    pw1 = ones(size(pw));
    pw2 = [-3.8 -1.9 0 1.9 3.8 5.9 8.2 10 14 18 23]';
    tbl = [pw,pw1,pw2];
    
    transm = phased.Transmitter(GainMethod="Lookup table",Table=tbl, ...
        NoiseMethod="Noise temperature", ...
        NoiseTemperature=350, ...
        SampleRate=fs);

    Pass the waveform through the transmitter.

    y = transm(wav);

    Display the phase shift for the channel.

    viewGain(transm,Type="AmPm")

    Figure contains an axes object. The axes object with title Transmitter Gain Method Plot, xlabel Input Power (dBm), ylabel Phase Shift (deg) contains an object of type line.

    Input Arguments

    collapse all

    Transmitter, specified as a phased.Transmitter System object.

    Plot type specified as "AmAm" or "AmPm". Use this argument with the Type property.

    Example: "AmPm"

    Data Types: char | string

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: Parent=5,ChannelIndex=3

    Parent plot axes, specified as an axes handle. When 'Parent' is not set, a new axes is created.

    Example: Parent=4

    Data Types: double

    Channel index, specified as a positive scalar.

    Example: ChannelIndex=8

    Data Types: double

    Plot type, specified as "AmAm" or "AmPm". Selecting Type="AmAm" plots the output power as a function of input power. Selecting Type="AmPm" plots the output phase shift as a function of input power. Use this Name-value pair with the PT input argument.

    Example: Type="AmPm"

    Data Types: char | string

    Version History

    Introduced in R2024a

    expand all

    See Also