Advanced SIMPLIS Training

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

2.2.2 Back Annotating a Schematic

In this Topic Hide

What You Will Learn

  1. How to back annotate a schematic.
  2. How to initialize a schematic with a .INIT file.
  3. That .INIT files override any schematic back annotation.

Getting Started

Exercise #1: Schematic Back-Annotation

  1. Open the schematic 2.2_PFC_Critical_Conduction_Mode.sxsch.

  2. Run the simulation.
    Result: The graph viewer has the simulation data plotted over the time interval of zero to 40ms.

  3. From the schematic menu, select Simulator Initial Conditions Back-annotate.
    Results:

    1. The information in the .INIT file is parsed and the initial condition information is written to the individual symbols.
    2. A message is output to the command shell: Back annotation complete.
The next time the simulation is launched, the circuit will be in the same state as it was at time=40ms in this simulation.

Discussion

The method used in the Getting Started section is the most common way to back-annotate a schematic. The example circuit here is in soft-start operation, and the control voltages and the output voltage are ramping up from the starting values. A couple of items to note:

  1. The circuit uses a current source I2, capacitor C5, and PWL resistor R1 to effect soft-start. Because the capacitor is back-annotated, the simulation will pick up exactly where it left off. The back-annotation process effectively charges the capacitor to the voltage which it reached at the end of the previous simulation.

  2. The stop time for the example was strategically chosen to stop the simulation exactly on a line voltage zero crossing. Even though the sinusoidal input source V1 is excluded from back annotation, the voltage across V1 is zero every 20ms. This allows the circuit to continue simulating as if the voltage source was back-annotated.

  3. The PWL source V3 is set to zero, enabling the power supply. Because the source is effectively the same DC value for all simulation time, the fact that the source is not back-annotated doesn't impact your simulation results.

In the next exercise you will continue the simulation from this point, and observe the circuit is properly initialized.

Exercise #2: Run the Back-Annotated Circuit

  1. You have already back-annotated the schematic, all you need to do is to run the simulation.

  2. Run the simulation.
    Result: The simulation starts at the back-annotated initial conditions. The graph viewer now has two sets of waveforms - the first set from the first simulation, and the second from the back-annotated simulation.

In the above graph it is easy to see that in the second simulation, the soft start voltage, SS starts at the same voltage where the first simulation stopped. In the next exercise you actually measure the voltage across the capacitor which the SS probe is attached to.

Exercise #3: Measure the Soft-Start Voltage

  1. Select the green SS curve from the first simulation.
    Result: A check appears in the check box next to the curve label in the graph legend.

  2. From the graph menu, select Training Show Last Value of Sel Curves.
    Result: the last value of the SS curve is output to the command shell:

    last_val = 1.43848515791

  3. Unselect the green SS curve.

  4. Select the teal SS (simplis_tran2) curve from the second simulation.

  5. From the graph menu, select Training Show 1st Value of Sel Curves.
    Result: the first value of the SS curve is output to the command shell:

    first_val = 1.43848515791

Although your measured value might be different from those above, the first and last values should be the same.

Exercise #4: Initialize the Schematic by Including a .INIT File

SIMetrix/SIMPLIS has the ability to easily include text files in the simulation. The .INIT file is a sequence of SIMPLIS commands which tell the simulator to initialize each circuit device. Because the file is already in the correct format for SIMPLIS, all you need to do to initialize the circuit is to include the .INIT file with a .INCLUDE statement.

In this example you are going to include the auto-generated .INIT file. This means that each successive simulation will use the final values generated during the previous simulation. Each time you simulate, another two line cycles of soft-start will be displayed on the graph viewer. To automatically include the init file,

  1. You first need to disable the initial conditions on the schematic. From the schematic menu, select Simulator Initial Conditions Disable.
    Result: The schematic values for the initial conditions disappear.

  2. Select the schematic window and press F11 to open the command (F11) window.

  3. Scroll down to the bottom of the F11 window and add the .INCLUDE statement as the last line:

    .INCLUDE ./SIMPLIS_Data/2.2_PFC_Critical_Conduction_Mode.deck.init

  4. Run the simulation.
    Result: The simulation starts from the initial conditions generated when the second simulation in exercise #2 finished. The graph viewer shows three sets of curves:

You can easily prove to yourself that each successive simulation continues where the last simulation left off. For example shown below is the results of the next two simulations. These were generated after closing the graph viewer, so two sets of curves appear:

What Can go Wrong?

The number of problems with loading initial conditions is quite small. By far the most common problem is when a circuit has duplicate or multiple initial condition statements for the same component. Each schematic symbol must be designed to handle initial conditions, and the method used by each symbol varies with the underlying device model. To avoid duplicate .INIT statements, you disabled the schematic back annotation when you included the .INIT file in the third exercise.

Another way you can mistakenly get duplicate or repeated initial conditions is if the include file is included twice. This is most often a classic copy-cut-paste error. If the command (F11) window has the following text,

.INCLUDE ./SIMPLIS_Data/2.2_PFC_Critical_Conduction_Mode.deck.init
.INCLUDE ./SIMPLIS_Data/2.2_PFC_Critical_Conduction_Mode.deck.init

the circuit will have a large number of repeated initial conditions.

Conclusions and Key Points to Remember

© 2015 simplistechnologies.com | All Rights Reserved