2.3 Managing Simulation Data

SIMPLIS outputs simulation data to data groups which are stored on disk as files. In this topic you will learn how to determine what data is output to a data group, how to change the current group, and learn when data groups are deleted.

To download the examples for Module 2, click Module_2_Examples.zip

In this topic:

Key Concepts

This topic addresses the following key concepts:

  • SIMPLIS outputs the vector data from simulations to data groups.
  • You can output additional vectors to the data file using the .KEEP statement.

What You Will Learn

In this topic, you will learn the following:

  • How and where SIMetrix/SIMPLIS stores simulation data.
  • How to manage data groups.
  • How to control the size of the data group.
  • How to use .KEEP statements to add hierarchical data to the data group.

Getting Started

Exercise #1: Data Groups

  1. Close and restart SIMetrix/SIMPLIS.
  2. Open the 2.3_SelfOscillatingConverter_POP_AC_Tran.sxsch schematic.
  3. Run the simulation.
  4. From the menu bar, select Simulator > Manage Data Groups... .
    Result: The Manage Data Groups dialog opens, displaying which data groups are available: The current data group is the first group with the entry current in the Flags column.

Discussion

After every POP, Transient, or AC analysis, SIMPLIS stores the simulation results in a data group. Data groups are automatically named according to the analysis type, and to guarantee uniqueness, the group name is appended with an integer. When SIMetrix/SIMPLIS starts, the integer is set to 1, and the integer increments every time you run a SIMPLIS simulation. In the Manage Data Groups dialog above, there are three groups,

  • simplis_tran1
  • simplis_ac1
  • global

As discussed in 1.0.1 SIMPLIS is a Time-Domain Simulator, all the Time, for Every Analysis, Period, the transient simulation over-writes the POP simulation data. So in this example, you ran three simulations and from those three simulations, there are two data groups. The global group contains global variables used in the SIMetrix/SIMPLIS User Interface.

Each data group is completely independent of the other data groups. Each data groups contains the simulation vectors for that simulation, but no information on how those vectors were plotted on the waveform viewer. The plot journal method described in the 2.4.6 Using Plot Journals topic records how vectors were plotted and, when the you run the plot journal, the graph is recreated from the vectors in the current data group.

Where Data Groups are Stored

Data groups are stored in files on your local hard drive. Where data groups are saved and when they are deleted is set in the Options/Preferences... dialog. To view or change the location where the data groups are saved,

  1. Cancel the Manage Data Groups dialog.
  2. From the menu bar, select File > Options > General... .
  3. Select the File Locations tab. The dialog should appear as follows:
  4. As with the other options, you can select a directory location where the data is saved. To change the directory, double click the Temp Data item.

You can save the Temp Data to any location on your local hard drives.

CAUTION:
You are strongly discouraged from using a network drive to store your Temp Data. File access times to the data groups are critical for the performance of SIMetrix/SIMPLIS.

Changing Data Groups

At any time, only one data group is the "current group." The current group is the group which SIMPLIS uses to plot data from the simulation, or if you probe the schematic after the simulation completes. Since you ran a POP/AC/Transient simulation, the transient was run last and is therefore the current data group. You can change the current group to plot different simulation runs using the Manage Data Groups dialog. Just select the desired group and click on the Set Current Group button.

Loading Data Groups

Data groups can be loaded from disk with the menu bar File > Data > Load... . This menu option will open a file selection dialog for you to open the data group.

When are Data Groups Deleted?

A setting in SIMetrix/SIMPLIS controls when data groups are deleted. In the Options/Preferences dialog, on the Graph/Probe/Data Analysis tab:

The first three options are self explanatory, only the last option requires discussion. When data is no longer needed retains only the last three data groups. While this is the most aggressive setting, it is almost required for very large circuits or for simulations which are executed in a loop, such as DVM. For more information on this setting click on the Help button on the dialog.

What Affects the Size of a Data Group?

The size of the data group is largely determined by two factors:

  1. The number of vectors in the group.
  2. The length of each vector.

The number of vectors is determined by the Save options settings on the Choose Analysis... dialog. Below is the dialog for the 2.3_SelfOscillatingConverter_POP_AC_Tran.sxsch. The Save options group determines how many top level vectors are output to the data group. This setting applies to all analyses.

Result: The Save options applies only to the top level vectors, that is, the vectors on the .sxsch schematic.

The three Save options apply to the top level circuit only. By default, the only vectors saved in hierarchical blocks are from probes inside those blocks.

To output vectors inside the design hierarchy, you use the .KEEP command in the F11 window of the hierarchical block. The next exercise demonstrates how .KEEP commands work.

Exercise #2: .KEEP Statement in the Hierarchy

  1. Open the schematic 2.3_SelfOscillatingConverter_POP_AC_Tran.sxsch, if it is closed.
  2. Run the simulation.
  3. Select the optocoupler U1.
  4. Press Ctrl+E to descend into the schematic view for the optocoupler.
  5. From the schematic menu, select Probe > Voltage... .
    Result: The mouse cursor symbol changes to a probe symbol:
  6. Position the probe over the wire connecting the positive pin of C1 and the positive control input to G1.
  7. Press the left mouse button.
    Result: Nothing happens!
Something did actually happen -  an error message was output to the command shell. The error message output is:
1. No simulation has been run on that schematic
2. The wrong data is selected for that schematic. Use "Simulator | Manage Data Groups..." to select the correct data
3. The data for that node was not saved in that simulation

The reason for the error in this case is the third item: The data doesn't exist for the node which you probed, because you haven't told SIMPLIS to output the data to the data group. To output the voltages on the optocoupler schematic, follow these steps:

  1. Select the optocoupler U1.
  2. Press Ctrl+E to descend into the schematic view for the optocoupler.
  3. Press F11 to open the F11 window.
  4. There is one commented out command in the F11 window:
    *.KEEP *V
  5. Remove the leading comment character (*) so the statement reads .KEEP *V, and note there is a space between the .KEEP and the *V.
  6. Run the simulation.

Now, probe the circuit again:

  1. Select the optocoupler U1.
  2. Press Ctrl+E to descend into the subcircuit for the optocoupler.
  3. Use the keyboard shortcut Ctrl+R to repeat last probe action.
  4. Click on the positive node of C1.
    Result: The waveform viewer displays the plot of the voltage waveform for the transient analysis.

The Concise Guide to .KEEP Statements

The following guidelines will be helpful to select .KEEP statements

Command Action
.KEEP *V Keeps all voltages at this hierarchical level.
.KEEP **V Keeps all voltages at this hierarchical level and all lower levels.
.KEEP *I Keeps all currents at this hierarchical level.
.KEEP **I Keeps all currents at this hierarchical level and all lower levels.
.KEEP *I **V Keeps all currents at this hierarchical level and all voltages at this hierarchical level and all lower levels.
Other combinations are possible using a space separated list of voltage and current declarations.
CAUTION:
For large circuits, placing a .KEEP **V at the top level will save an enormous amount of data. Using .KEEP **V **I  will save even more data, as all currents will be added to the data group.
CAUTION:
When you package your circuit for encryption and distribution, make certain you do not have .KEEP statements in the hierarchy. Any .KEEP statements will output simulation vectors to the data group, possibly exposing some internal intellectual property. This will be discussed in more detail in the 4.4 Protecting Your Intellectual Property - Model Encryption topic.

Controlling the Number of Data Points Output to the Data Group

SIMPLIS creates output vectors in an orderly and consistent manner. At every topology change, SIMPLIS will add a data point to each simulation vector. In addition to these points, SIMPLIS adds uniformly distributed points from the simulation start to the simulation stop time. SIMPLIS adds the number of uniformly distributed points defined in the Choose Analysis... dialog on the Transient tab. Below is the transient tab for the 2.3_SelfOscillatingConverter_POP_AC_Tran.sxsch converter.

With these settings, SIMPLIS will generate 4000 data points evenly spaced over the 500us simulation time. Additional points will be added every time the circuit changes PWL topologies. The next example will help to better understand this behavior.

Exercise #3: Data Points

  1. Open the 2.3_SelfOscillatingConverter_POP_AC_Tran.sxsch schematic.
  2. Close the waveform viewer.
  3. Run the simulation.
  4. On the waveform viewer, notice the measurement for the number of points: Length 5.632k.

This measurement tells us the Inductor Current vector contains 5632 data points.

Exercise #4: Reducing the Number of Data Points to the Minimum

  1. Press F8 to open the Choose Analysis... dialog.
  2. Select the Transient tab.
  3. Change the Number of plot points to 1. The dialog should appear as follows:
  4. Run the simulation.
  5. On the waveform viewer, notice the measurement for the green inductor current curve: Length 1.634k.

This message tells us the Inductor current vector contains 1634 data points. Note this is 3998 points less than the previous simulation where you added 4000 data point to the vectors. The constant offset of 2 data points represent the starting and ending data points. When you told SIMPLIS to output only 1 data point, the data group will only contain the points generated at every PWL state transition and the start/end points.

No Forced Output Data Option

There is also an option to only output data at the Number of plot points defined in the Choose Analysis... dialog. The check box No Forced Output Data will only output the points set in the Number of plot points. No additional data points will be output when the PWL topology changes. Since the data group will not have points where the PWL topology changes, such as when a switch closes, using this option will reduce the fidelity of the output vectors and waveforms. This option is as two primary uses:

  1. Generating data with fixed time steps which may be more easily handled by some post-processing. The Fast Fourier Transform is one example which requires data to be output on a fixed time step.
  2. For very long transient simulations where there are numerous PWL topology changes per switching cycle.

It is important to keep in mind that this option does not affect the accuracy of the SIMPLIS simulation, rather, the option affects the results output to the waveform viewer.

Check the Data Group File Size

You can open an explorer window to the Temp Data directory (see Where Data Groups are Stored) to see the size of these files. Below is the Explorer window which displays the data group files for this section. The three selected groups are the transient results from the three exercises. Your data group numbers will be different if you have run more simulations than are explicitly called out in this section.

Data Settings File Size
4000 points, no .KEEP 4622 KB
4000 points, with .KEEP 4887 KB
1634 points, with .KEEP 1545 KB

Further Study

( not covered in class )

  1. Change the number of plot points to 100k. Note the difference in time it takes for SIMPLIS to run the simulations. Examine the waveform fidelity with different Number of plot points.
  2. Open the example file: 2.2_PFC_Critical_Conduction_Mode.sxsch. Run simulations and determine both the length of the vectors and the data group size on disk. Experiment with the No Forced Output Data option and compare file sizes. Compare the data file size to the Self Oscillating Converter.

Conclusions and Key Points to Remember

  • SIMetrix/SIMPLIS stores simulation data in data groups.
  • Data groups are stored on your local hard drive.
  • You can change the location where the data groups are stored.
  • Data groups can be archived and reloaded for plotting.
  • Data from hierarchical blocks can be output to the data file with the .KEEP command.
  • The Number of plot points in conjunction with the PWL topology changes determines the length of the simulation vectors.
  • The No Forced Data option removes data points generated at each PWL topology change from the data group.
  • Neither the state of the No Forced Data option nor the Number of plot points impact the accuracy of the internal simulation calculations during a SIMPLIS run. These settings only impact the fidelity of the displayed waveforms in the waveform viewer. SIMPLIS never compromises the accuracy of its internal simulation calculations.