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.
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.
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.
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
ode23tbwith 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