Main Content

Create and Modify Subsystem Plots

Plot the Network Parameters of a Subsystem

In this part of the example, you open and run a RF Blockset™ Equivalent Baseband example that uses file data to specify an amplifier in a physical subsystem. Then, you plot the network parameters of the physical subsystem, which consists of the General Amplifier, the Input Port, and the Output Port blocks.

  1. Type sparam_amp at the MATLAB® prompt to open the RF Blockset Equivalent Baseband example called “AMP Data File for Amplifier”.

  2. In the model window, click Run to run the simulation. Once the simulation has reached steady state, click Debug > Simulate > Stop to stop the simulation.

  3. Double-click the Output Port block to open the block dialog box.

  4. Select the Visualization tab and set the Output Port block parameters as follows:

    • In the Source of frequency data list, select Derived from Input Port parameters.

    • In the Plot type list, select X-Y plane.

    • In the Y Parameter1 list, select S21.

    Outport Port block mask showing Visualization tab with Source of frequency data is set to Derived from Input Port parameters and Plot type is set to X-Y plane and Y parameter1 is set to S21.

  5. Click Plot.

    This action plots the magnitude of S21 (in decibels) as a function of frequency on an X-Y plot.

    S21 versus Frequency for a Physical Subsystem

    Plot showing magnitude of S21 as a function of frequency in the X-Y plot.

Add Data to an Existing Plot

In this part of the example, you add data to the plot you created in Plot the Network Parameters of a Subsystem.

  1. Double-click the Output Port block to open the block dialog box.

  2. Select the Visualization tab and change the value of Y Parameter1 to S22.

    Outport Port block mask showing Visualization tab with Y parameter1 is set to S22.

  3. Click Plot.

    This action adds S22 to the plot.

    S21 and S22 versus Frequency for a Physical Subsystem

    S21 and S22 plot as a function of frequency for a physical subsystem.

Change Data on an Existing Plot

In this part of the example, you change the data on the plot you created in the previous steps of the example by modifying the Plot type.

  1. Double-click the Output Port block to open the block dialog box.

  2. Select the Visualization tab and change the value of Plot type to Polar plane, as shown in the following figure.

    As the figure shows, the value of Y Parameter1 remains as S22, the last parameter selected for the previous plot.

    Output Port block mask showing Visualization tab with Plot type showing Polar plane.

  3. Click Plot.

    This action creates a Polar plane plot of S22 as a function of frequency.

    S22 versus Frequency for a Physical Subsystem

    S21 plot on a polar chart.

  4. In the Output Port block dialog box, change the Plot type to Composite data to generate four plots in one figure. The parameters for the plots are defined by the block, so the Y Parameter1, Y Parameter2, and X Parameter fields becomes invisible.

    Output Port block mask showing Visualization tab with Plot type is set to Composite data.

  5. Click Plot.

    This action creates a composite plot.

    Composite Plot for a Physical Subsystem

    Composite plot consisting of four plots: Magnitude S12 and S21 X-Y plot, Phase S12 and S21X-Y plot, Polar plot ans Z smith chart and S12 and S21.

Related Topics