How to choose the right integration method in SPS ⚙️

Choosing the correct integration method is one of the most critical decisions you will make when setting up a simulation in SPS. The right choice gives you fast, accurate results, while the wrong choice can lead to painfully slow simulations or solver errors.

In SPS, there are three primary solution methods available through the powergui block. Here is a guide on when to use each one.


:chart_increasing: 1. Continuous Method (Variable-Step)

Best for: Small systems (fewer than 50 electrical states and fewer than 25 electronic switches).

The continuous method uses Simulink® variable-step solvers. For small systems, this is usually the most accurate and fastest method because the solver takes large steps when the system is stable and small steps only when necessary.

  • The major advantage: When using line-commutated power electronics (like diodes and thyristors), event-sensitive algorithms detect zero crossings with extreme accuracy, completely avoiding “current chopping”.
  • The drawback: If your system is large, the extreme precision of the continuous solver will force it to take millions of tiny steps, drastically slowing down your simulation.

:stopwatch: 2. Discrete Method (Fixed-Step)

Best for: Large systems containing many states, non-linear blocks, or forced-commutated power electronics (like PWM inverters).

If your system exceeds the “small system” threshold, you should discretize it. Instead of calculating exact event times, the solver evaluates the circuit at fixed time intervals (e.g., every 20 µs).

  • The major advantage: It provides predictable, manageable simulation times for heavy models and is the standard choice for complex power electronics and grid simulations.

:high_voltage: 3. Phasor Solution Method

Best for: Transient stability studies of networks containing large generators and motors (electromechanical oscillations).

If you are only interested in how the magnitude and phase of fundamental voltages and currents change over time (like when a breaker opens or closes), you do not need to solve the complex differential equations of every R, L, and C element.

  • How it works: The Phasor method ignores fast, high-frequency transients and replaces the network’s differential equations with a simpler set of algebraic equations evaluated at the fundamental frequency (50/60 Hz).
  • Why it is powerful: Electromechanical oscillations (interactions between machine inertias and regulators) happen at low frequencies (0.02 Hz to 2 Hz) and require long simulation times—often tens of seconds. Simulating this with Continuous or Discrete methods would take forever. The Phasor method dramatically reduces the required simulation time.
  • Solver Tip: The recommended solver for Phasor simulations is ode23tb with a maximum time step of one cycle of the fundamental frequency (e.g., 1/60 s or 1/50 s).

Summary Rule of Thumb:

  • Small circuit & high precision needed? Continuous
  • Large circuit or complex power electronics? Discrete
  • Grid stability, large machines, and long simulation times? Phasor

Hi @MariaZanutto very nice way to summarize it, but I would give maybe some precision.

For instance, in the case of non-linear elements, continuous solvers will often give more accurate results, since it can iterate in order to really find the most accurate results. If you use a discrete solver, you might miss a zero crossing yielding a small error in the behavior of the component. While it might not have too much impact on the overall simulation result if you start accumulating those error simulations can become erroneous or even unstable.

If you are not sure what you are doing, you should always go for continuous solvers, regardless of the system. Once you see the simulation results you obtained, you can find the fastest transient of your simulation. Taking the period of this transient, you can choose a time steps 10 to 20 times faster, or smaller, than that transient and use discrete time simulation step. Once you change the solver, you can confirm the results remain accurate, and keep on with your studies.

Now you mention there were 3 methods, but there is acutely 4, since you didn’t mention Discrete Phasor.

Continuous and discrete is one axe, the other would be EMT vs phasor simulation. In SPS, when powergui refers to Continuous or Discrete, is for EMT type of simulation, while Phasor and Discrete phasor are for phasor type simulation.

But you really nailed your explanation of Phasor simulations, but it can also apply to Discrete phasor.

Keep up the post, I find really find them interesting.