How SPS software works: a conceptual overview đź§ 

Every time you start a simulation, SPS Software calls a special initialization mechanism before any simulation steps are taken. This process computes the state-space model of your electric circuit and builds the equivalent system that can be simulated by the Simulink engine.

Here is a conceptual overview of what happens under the hood and some important limitations to keep in mind.


:gear: The Initialization Process (Step-by-Step)

1. Topology Evaluation
SPS sorts all the blocks in your model, retrieves their parameters, and evaluates the network topology. The blocks are separated into linear and nonlinear blocks. Each electrical node is automatically assigned a node number.

2. State-Space Computation
Once the topology is mapped, the state-space model (A, B, C, D matrices) of the linear part of the circuit is computed. All steady-state calculations and initializations are performed at this stage.

  • Discrete Simulation: If you have chosen to discretize your circuit (highly recommended for speed), the discrete state-space model is computed from the continuous one.
  • Phasor Solution: If using the phasor method, the state-space model is replaced with the complex transfer matrix H(jω) relating inputs and outputs (voltage and current phasors) at the specified frequency.

3. Simulink Model Construction
SPS builds the Simulink model of your circuit and stores it inside the powergui block located at the top level of your model.

  • It uses an S-Function block to model the linear part of the circuit, as well as the switches and power electronic devices.
  • Predefined Simulink models are used to simulate nonlinear elements.
  • The nonlinear models are connected in a feedback loop between the voltage outputs and current inputs of the linear model.

:hammer_and_wrench: Simulation & Analysis Tools

Once initialization is complete, the simulation starts. During and after the simulation, you can:

  • Observe waveforms on standard scopes.
  • Access the Linear System Analyzer via the powergui block to obtain transfer functions.
  • Perform an FFT analysis on recorded signals to obtain their frequency spectrum.
  • Perform a Load Flow with circuits involving three-phase machinery to initialize the machine models in steady state (avoiding long mechanical transients).
  • Visualize impedance curves over a specified frequency range.

:warning: Important Limitations of Nonlinear Models

Because nonlinear models in SPS are simulated as current sources, there are a few strict electrical rules you must follow to avoid errors:

  • No series inductors / No open terminals: Nonlinear models cannot be connected in series with inductors, and their terminals cannot be left open.
  • The “Inductive Source” Error: If you feed a machine through an inductive source, SPS will prompt an error. Fix: You can avoid this by connecting large resistances in parallel with the source inductances or across the machine terminals.
  • Snubber Circuits: A series RC snubber circuit is included in the models of the Breaker block and power electronics blocks.
    • If you keep them in service, you won’t encounter issues.
    • To change to a single resistance: set Cs = inf.
    • To change to a single capacitor: set Rs = 0.
    • To eliminate the snubber entirely: specify Rs = inf or Cs = 0.
1 Like