6.6.5 Using the CreateXYScalarPlot() Function

In 5.1 Running the Built-in Efficiency Testplan, you simulated the efficiency of the converter using the built-in efficiency testplan. The last graph produced in that section plotted three efficiency curves based on scalar data aggregated from the previous tests. Three CreateXYScalarPlot() functions were used to generate those curves. A copy of the efficiency testplan is available from  SIMPLIS_dvm_tutorial_examples.zip at this path:

testplans/dvm_builtin-efficiency_dcdc_1in_1out.testplan

The CreateXYScalarPlot() function has the following syntax with the seven required arguments and one optional argument as explained in the table below.
CreateXYScalarPlot(x-expression, y-expression, scalars to extract, curve_name, graph_name, grid_index, axis_name, OPTIONAL_PARAMETER_STRING)
Arg # Argument Name Description
1 x-expression The expression of scalars to be plotted on the x-axis
2 y-expression The expression of scalars to be plotted on the y-axis
3 scalars_to_extract A space delimited list of scalars to extract from the previous reports.
4 curve_name Name of the curve as it appears in the report.
Note: For your curve to appear in the report, you must prefix the curve name with "DVM".
5 graph_name Name of the graph for the new test report*
6 grid_index Grid on which to place the curve*
7 axis_name Axis on a particular grid*
8 OPTIONAL_PARAMETER_STRING A space-separated set of KEY=VALUE pairs that define additional parameters**

* For additional information about graph_name, grid_index, and axis_name, see Graph Address System.

** For additional information about OPTIONAL_PARAMETER_STRING, see Optional Parameters.

In the simplest case, the scalar expressions x-expression and y-expression can be any scalars from the test reports. In more complex applications, the expressions can be any mathematical expression of scalar values, such as values set with the Var(), GlobalVar(), and Change() testplan entries.

The built-in efficiency testplan uses the following arguments in the CreateXYScalarPlot() function that plotted the efficiency vs. load current:

Argument Value / Notes
x-expression AVG(ILOAD)
y-expression Efficiency_Nom

The y-expression function arguments used a scalar alias created with the Alias() function as explained in 6.6.1 Creating Scalar Aliases.

scalars_to_extract AVG(ILOAD) Efficiency_Nom

This argument is the list of scalars to extract from the previous reports and is composed of a space-delimited list of scalar values used in the x-expression and y-expression.

curve_name DVM Vin Nom

The curve_ name for the nominal input voltage cases should be prefixed with DVM in order for DVM to retain the curve on the overview and test report graphs.

graph_name DVM Efficiency
grid_index A1
axis_name vert

Since this does note multiple axes, the axis name is not important.

OPTIONAL_PARAMETER_STRING xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=red

This argument is almost always used with the CreateXYScalarPlot() function to annotate labels, units, and major grid spacing. The full range of options is described in the CreateXYScalarPlot() in the DVM documentation.

The complete CreateXYScalarPlot() function for the nominal input voltage in the built-in efficiency testplan is as follows:

CreateXYScalarPlot( AVG(ILOAD), Efficiency_Nom, AVG(ILOAD) Efficiency_Nom, DVM Vin Nom, DVM Efficiency, A1, vert, xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=red)

To build the other two functions for the minimum and maximum input voltages, follow these steps:

  1. Make two copies of the above function.
  2. In one copy, replace all Nom entries with Min and change the color from red to green.
  3. In the second copy, replace all Nom entries with Max and change the color from red to blue.

The final three functions are shown below.

CreateXYScalarPlot( AVG(ILOAD), Efficiency_Nom, AVG(ILOAD) Efficiency_Nom, DVM Vin Nom, DVM Efficiency, A1, vert, xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=red)
CreateXYScalarPlot( AVG(ILOAD), Efficiency_Min, AVG(ILOAD) Efficiency_Min, Min, DVM Efficiency, A1, vert, xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=green )
CreateXYScalarPlot( AVG(ILOAD), Efficiency_ Max , AVG(ILOAD) Efficiency_ Max , DVM Vin Max , DVM Efficiency, A1, vert, xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color= blue )

After these three CreateXYScalarPlot() functions are entered in three new Create columns, you have the following built-in testplan that was used in 5.1 Running the Built-In Efficiency Testplan.

***
*** efficiency_dcdc_1in_1out.testplan
***
*?@ Analysis Objective Source Load Label Create Create Create Promote
***
***
***
***
***
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, Light) Steady-State|Steady-State|Vin Nominal|Light Load Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 10%) Steady-State|Steady-State|Vin Nominal|10% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 20%) Steady-State|Steady-State|Vin Nominal|20% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 30%) Steady-State|Steady-State|Vin Nominal|30% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 40%) Steady-State|Steady-State|Vin Nominal|40% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 50%) Steady-State|Steady-State|Vin Nominal|50% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 60%) Steady-State|Steady-State|Vin Nominal|60% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 70%) Steady-State|Steady-State|Vin Nominal|70% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 80%) Steady-State|Steady-State|Vin Nominal|80% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 90%) Steady-State|Steady-State|Vin Nominal|90% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Nominal) Load(OUTPUT:1, 100%) Steady-State|Steady-State|Vin Nominal|100% Alias( Efficiency, Efficiency_nom)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, Light) Steady-State|Steady-State|Vin Maximum|Light Load Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 10%) Steady-State|Steady-State|Vin Maximum|10% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 20%) Steady-State|Steady-State|Vin Maximum|20% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 30%) Steady-State|Steady-State|Vin Maximum|30% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 40%) Steady-State|Steady-State|Vin Maximum|40% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 50%) Steady-State|Steady-State|Vin Maximum|50% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 60%) Steady-State|Steady-State|Vin Maximum|60% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 70%) Steady-State|Steady-State|Vin Maximum|70% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 80%) Steady-State|Steady-State|Vin Maximum|80% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 90%) Steady-State|Steady-State|Vin Maximum|90% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Maximum) Load(OUTPUT:1, 100%) Steady-State|Steady-State|Vin Maximum|100% Alias( Efficiency, Efficiency_Max)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, Light) Steady-State|Steady-State|Vin Minimum|Light Load Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 10%) Steady-State|Steady-State|Vin Minimum|10% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 20%) Steady-State|Steady-State|Vin Minimum|20% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 30%) Steady-State|Steady-State|Vin Minimum|30% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 40%) Steady-State|Steady-State|Vin Minimum|40% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 50%) Steady-State|Steady-State|Vin Minimum|50% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 60%) Steady-State|Steady-State|Vin Minimum|60% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 70%) Steady-State|Steady-State|Vin Minimum|70% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 80%) Steady-State|Steady-State|Vin Minimum|80% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 90%) Steady-State|Steady-State|Vin Minimum|90% Alias( Efficiency, Efficiency_Min)      
Steady-State Steady-State Source(INPUT:1, Minimum) Load(OUTPUT:1, 100%) Steady-State|Steady-State|Vin Minimum|100% Alias( Efficiency, Efficiency_Min)      
NoSimulation       Steady-State|Generate Efficiency Curves CreateXYScalarPlot(AVG(ILOAD),Efficiency_Min,AVG(ILOAD)Efficiency_Min,DVM Vin Min,DVM Efficiency,A1,vert,xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=green) CreateXYScalarPlot( AVG(ILOAD), Efficiency_Nom,AVG(ILOAD) Efficiency_Nom,DVM Vin Nom,DVM Efficiency,A1,vert,xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=red) CreateXYScalarPlot( AVG(ILOAD), Efficiency_Max,AVG(ILOAD) Efficiency_Max,DVM Vin Max,DVM Efficiency,A1,vert,xlabel=Load Current xunits=A ylabel=Efficiency yunits=%%% showpoints=true color=blue) PromoteGraph(DVM Efficiency,1)