In this section you:
Learn how to simulate a three-phase power system containing electrical machines and other three-phase models.
Simulate the power system and observe its dynamic performance by using and comparing results of the Continuous and Phasor Simscape™ Electrical™ Specialized Power Systems simulation types (continuous and discrete).
You can use three types of machines in the Simscape > Electrical > Specialized Power Systems > Fundamental Blocks > Machines library: simplified synchronous machines, detailed synchronous machines, and asynchronous machines. You interconnect these machines with linear and nonlinear elements such as transformers, loads, and breakers to study the transient stability of an uninterruptible power supply using a diesel generator.
The two-machine system shown in this single-line diagram represents a diesel generator and asynchronous motor in a distribution network:
Diesel Generator and Asynchronous Motor on Distribution Network
This system consists of a plant (bus B2) simulated by a 1 MW resistive load and a motor load (ASM) fed at 2400 V from a distribution 25 kV system through a 6 MVA, 25/2.4 kV transformer, and from an emergency synchronous generator/diesel engine unit (SM).
The 25 kV system is modeled by a simple R-L equivalent source (short-circuit level 1000 MVA, quality factor X/R = 10) and a 5 MW load. The asynchronous motor is rated 2250 HP, 2.4 kV, and the synchronous machine is rated 3.125 MVA, 2.4 kV.
This system is modeled in the
The SM parameters and the diesel engine and governor models are based on reference .
Initially, the motor develops a mechanical power of 2000 HP and the diesel generator is in
standby, delivering no active power. The synchronous machine therefore operates as a
synchronous condenser generating only the reactive power required to regulate the 2400 V bus
B2 voltage at 1.0 pu. At
t = 0.1 s, a three-phase to ground fault occurs
on the 25 kV system, causing the opening of the 25 kV circuit breaker at
0.2 s, and a sudden increase of the generator loading. During the transient
period following the fault and islanding of the motor-generator system, the synchronous
machine excitation system and the diesel speed governor react to maintain the voltage and
speed at a constant value.
When you simulate this system for the first time, you normally do not know what the initial conditions are for the SM and ASM to start in steady state.
These initial conditions are:
SM block: Initial values of speed deviation (usually 0%), rotor angle, magnitudes and phases of currents in stator windings, and initial field voltage required to obtain the desired terminal voltage under the specified load flow.
ASM block: Initial values of slip, rotor angle, magnitudes and phases of currents in stator windings.
Open the Synchronous Machine and Asynchronous Machine blocks.
All initial conditions are set at
0, except for the initial SM field
voltage and ASM slip, which are set at
1 pu. Open the three scopes
monitoring the SM and ASM signals and the bus B2 voltage. Start the simulation and observe
the first 100 ms before fault is applied.
As the simulation starts, note that the three ASM currents start from zero and contain a slowly decaying DC component. The machine speeds take a much longer time to stabilize because of the inertia of the motor/load and diesel/generator systems. In our example, the ASM starts to rotate in the wrong direction because the motor starting torque is lower than the applied load torque. Stop the simulation.
To start the simulation in steady state with sinusoidal currents and constant speeds, all the machine states must be initialized properly. This is a difficult task to perform manually, even for a simple system. In the Tools tab of the powergui block dialog, click the Load Flow Analyzer button. Use the Load Flow Analyzer app to initialize the machines.
 Yeager K.E. and Willis J.R. "Modeling of Emergency Diesel Generators in an 800 Megawatt Nuclear Power Plant." IEEE Transactions on Energy Conversion. Vol.8, No.3, September 1993.
When you increase the complexity of your network by adding extra lines, loads, transformers, and machines, the required simulation time becomes longer. Moreover, if you are interested in slow electromechanical oscillation modes (typically between 0.02 Hz and 2 Hz on large systems) you might have to simulate for several tens of seconds, which can result in long simulation times. The conventional continuous or discrete solution method is therefore not practical for stability studies involving low-frequency oscillation modes. For these studies, use the phasor technique (see Introducing the Phasor Simulation Method).
For a stability study, you ignore the fast oscillation modes that result from the interaction
of linear R, L, C elements and distributed parameter lines. These oscillation modes, which
are usually located above the fundamental frequency of 50 Hz or 60 Hz, do not interfere with
the slow machine modes and regulator time constants. In the phasor solution method, these
fast modes are ignored by replacing the network differential equations with a set of
algebraic equations. The state-space model of the network is therefore replaced by a
transfer function evaluated at the fundamental frequency and relating inputs (current
injected by machines into the network) and outputs (voltages at machine terminals). The
phasor solution method uses a reduced state-space model consisting of slow states of
machines, turbines, and regulators, thus dramatically reducing the required simulation time.
Two solver types are available for phasor models: continuous and discrete. The type of
solver is specified in the powergui block by setting Simulation
type to either
Phasor (continuous) or
Discrete phasor. The continuous phasor solution uses a
Simulink® variable-step solver. Continuous variable-step solvers are efficient in
solving this type of problem. An example of a continuous variable-step solver you can use in
this situation is the
ode23tb with a maximum time step of one cycle of
the fundamental frequency (1/60 s or 1/50 s).
uses a local solver to discretize and solve the phasor model at a specified sample time. The
Discrete phasor simulation method allows you to use Simulink
Coder™ to generate code and simulate your model in real time.
Apply the phasor solution method to the two-machine system you simulated n the
power_machines example with the conventional method. Open the
In the powergui block, set Simulation type to
Phasor. Specify the fundamental frequency used to solve the
algebraic network equations. Enter
60 in the
Frequency field. Note that the words
Phasor 60 Hz
now appear on the powergui icon, indicating that this new method is used to
simulate your circuit. To start the simulation in steady state, you must first repeat the
machine initialization procedure.
Observe that simulation is now much faster. The results compare well with those obtained with the continuous mode simulation.
You may also try the discrete phasor simulation. In the powergui block,
set Simulation type to
Discrete phasor and
specify a sample time of
The synchronous machine waveforms are compared on the following figure for three simulation types:
Phasor (continuous) (cyan)
Discrete phasor with a 4 ms sample time (magenta)
Comparison of Results for Continuous and Phasor Simulation Methods
Both phasor models (continuous and discrete) compare well with the continuous model.
Contrary to the continuous phasor solver, which uses a full set of machine differential equations for modeling stator and rotor transients, the discrete phasor solver uses simplified machine models where differential equations on the stator side are replaced with algebraic equations. These lower-order machine models eliminate two states (phid and phiq stator fluxes) and produce simulation results similar to commercial stability software. Compared with the continuous phasor solver, the discrete phasor solver produces cleaner waveforms. For this example, you can observe that in the discrete phasor model, the speed (w) and terminal voltage (Vt) high-frequency oscillations are eliminated and the Vt voltage glitch observed at the breaker opening is also eliminated.
The discrete phasor solver has also two additional advantages:
This solver uses a robust solution method, which allows you to eliminate machine parasitic loads.
This solver allows you to use Simulink Coder to generate code and simulate your model in real time.
When you set Simulation type to
phasor, the two control blocks (Diesel Engine and Governor and Excitation)
stay continuous and still use the
ode23tb variable-step solver. If you
want to simulate this model in real time, the whole model must use fixed-time steps. You
therefore need to change the variable-step solver to a fixed-step solver that uses the
same sample time as the electric network.
The phasor solution method is illustrated on more complex networks in the following examples:
The first example illustrates the impact of PSS and use of a SVC to stabilize a two-machine system. The second example compares the performance of three different types of power system stabilizers on a four-machine, two-area system.