How to specify and manage initial conditions in SPS Software ⚡

Starting a simulation smoothly often requires properly managing initial conditions to avoid unwanted initial transients. In SPS Software, you have granular control over how your electrical states begin.

Here is a guide on how to understand, specify, and manage these initial conditions.

:brain: 1. Understanding State Variables in SPS Software

Before setting initial conditions, it helps to know that the state variables in a Simulink® diagram containing SPS Software blocks are divided into three categories:

  1. Electrical States: Associated with RLC branch-type blocks (defined by the state-space representation of your model).
  2. SPS Software Model States: The internal Simulink states of specific SPS Software electrical blocks, such as the Synchronous Machine or Saturable Transformer.
  3. Standard Simulink States: The states of other standard Simulink blocks in your model (like PI controllers or user-defined transfer functions).

:balance_scale: 2. Default Behavior: Steady-State Initialization

By default, you don’t need to manually calculate starting voltages and currents. The SPS Software software automatically sets the initial values of the electrical states so that the simulation starts in steady state.

However, if you want to test a specific transient, you can manually specify the initial capacitor voltages and inductor currents inside the mask of specific blocks:

  • Series and Parallel RLC Branch blocks
  • Series and Parallel RLC Load blocks

(Note: Values entered manually in these blocks will overwrite the default steady-state parameters calculated by the software).

:control_knobs: 3. Managing States with the powergui Tool

The easiest way to view and manage all electrical states at once is through the powergui block.

How to use the Initial State Tool:

  1. Double-click the powergui block.
  2. Go to the Tools tab and click Initial State.
  3. A list of all electrical state variables (inductor currents and capacitor voltages) will be displayed. These are the values automatically calculated for steady state.
  4. To modify a state: Select a variable from the list, enter a new value in the Set selected electrical state field, and click Apply. (This action will automatically update the parameter inside the respective block’s mask!)

:stop_sign: 4. Forcing Initial States (Global Overrides)

Sometimes you want to test a “cold start” or force a steady state without manually changing every single block. ThepowerguiInitial State Tool has global override checkboxes:

  • Force to Zero: Select the To zero check box and click Apply. All electrical states will start at 0, regardless of what is typed inside the block masks.
  • Force to Steady State: Select the To steady state check box and click Apply. The simulation will force a steady-state start, ignoring individual block settings.

:light_bulb: Good to know: When you use these global overrides, SPS Software will display a message in the MATLAB Command Window every time you run the simulation, reminding you that the block settings are currently being overwritten by the powergui.

To return to your specific block settings, simply uncheck both boxes and click Apply.

1 Like