MatPower Simulating Power Systems
MatPower Simulating Power Systems
Presented by
For full publication list, see our Power And Clean Energy (PACE) research
group official website.
http://pace.ee.uwa.edu.au/
2. Comparison between a standard electric circuit and
a power system
• A power system is nothing but an electric circuit.
• Comparing to an electric circuit, a different set of data is provided in
power system studies.
2. Comparison between a standard electric circuit and
a power system
Given the information of the power sources and impedances in a power system,
we are able to find the voltage magnitudes and phase angles of all the nodes, and
also current magnitudes and phase angles of all branches, by simply using the KCL.
• For instance consider bus-bar NO.1.
1. Bus-bars
• Generator bus
• The active power injected by a generator into a generator
bus-bar the voltage magnitude of the generator bus-bar are
specified.
• Load bus
• The active power consumed by the load and the reactive
power either provided or consumed by the load are specified.
• Swing bus
• The voltage magnitude and phase angle are specified.
2. Network
Impedance values of transmission lines
4. Solving power flow with MATPOWER
• MATPOWER is a package of MATLAB® M-files for solving power flow and
optimal power flow problems. It is intended as a simulation tool for researchers
and educators that is easy to use and modify.
Specified values
Calculation results
4. Solving power flow with MATPOWER
• Runpf (case9_Sauer) also gives us
Active power balance: 𝑃𝑔𝑒𝑛 = 𝑃𝑙𝑜𝑠𝑠 + 𝑃𝑙𝑜𝑎𝑑 , i.e., 319.64 ≈ 4.61 + 315𝑀𝑊
Reactive power balance: 𝑄𝑔𝑒𝑛 = 𝑄𝑙𝑜𝑠𝑠 + 𝑄𝑙𝑜𝑎𝑑 , i.e., 22.84 ≈ 115 + 48.38 − 140.5𝑀𝑉𝑎𝑟
5. Introducing a disturbance and the subsequent
dynamic behaviour of a power system
A disturbance in power system can be:
1. Changes in active or/and reactive power at load bus bars;
2. Disconnection of a transmission line due to a fault;
3. Three-phase-to-ground fault at a certain point of a transmission line.
The power system will settle at a new operating point after a disturbance. The
dynamic behaviour of electrical signals, including voltage, frequency, power, etc,
from the original operating point to the new operating point is the transient
behaviour, i.e., the dynamic behaviour of the power system.
6. Slow and fast subsystems and DAE formulation
Faster Dynamics
Slower Dynamics
(Transmission and distribution
(All the generators)
network with all electrical loads)
𝑥 = 𝑓(𝑥, 𝑢) 0 = 𝑔(𝑥, 𝑢)
Step 2: Solve
𝑓 𝑥, 𝑢0 = 0,
for 𝑥 and the solution is 𝑥0 .
𝑥 = 𝑓 𝑥, 𝑢 ,
0=𝑔 𝑢 ,
where 𝑥 is the generator dynamic state vector, whereas 𝑢 represents the algebraic
variable vector.
Assuming the power system is initially operating at steady state, with MATPOWER,
we can obtain the initial algebraic variables, i.e., elements in 𝑢0 , then the initial
values of the dynamic states can be obtained by solving the following equations:
0 = 𝑓 𝑥, 𝑢0 ,
The solution of 𝑥, named 𝑥0 is the initial condition of the power system operating
at a particular steady state. In MATLAB, we make use of “𝑓𝑠𝑜𝑙𝑣𝑒” command to
solve for the initial condition 𝑥0 .
7. Dynamic simulation of a power system
1. The initial steady state values of all the variables will remain unchanged until a
disturbance occurs.
2. Immediately after a perturbation, the function 𝑔 changes to a new function
𝑔∗ since the system configuration is different now.
3. The function 𝑓 remains unchanged as the structure of generators stays the
same.
4. The values of algebraic variables 𝑢 after the disturbance can be computed by
the solving the following equation:
0 = 𝑔∗ 𝑥0 , 𝑢 ,
where 𝑥0 is the pre-fault values of the states, which cannot change
instantaneously. The solution of the equation is 𝑢∗ .
5. Use (𝑥0 , 𝑢∗ ) as the initial condition to solve for the dynamic transience during
the faulty condition. Then the system evolves and eventually settles to a new
operating point.