Power System Toolbox
Version 3.0
© copyright Joe Chow/ Graham Rogers 1991 - 2008:
All rights reserved
Graham Rogers phone & fax: (905)349-2485
RR#5 Colborne email: cherry@eagle.ca
Ontario K0K 1S0
Canada
Contents
Table of Contents
.................................................................................................................................4 1 LOAD FLOW
..........................................................................................................................4 1.1 INTRODUCTION
...............................................................................................................4 1.2 DATA REQUIREMENTS
....................................................................................................4 1.3 LOAD FLOW EXAMPLE DATA
..............................................................................................................................5 1.4 LOAD FLOW
.................................................................................................................7 1.5 VOLTAGE STABILITY
.......................................................................................................................................9 1.6 HVDC
.........................................................................................................11 2 DYNAMIC SIMULATION
........................................................................................................................11 2.1 INTRODUCTION
................................................................................................12 2.2 DYNAMIC MODEL FUNCTIONS
...............................................................................................12 2.3 STANDARD DYNAMIC DRIVERS
...................................................................................12 2.4 EXPANDING THE CAPABILITIES OF PST
.......................................................................................13 2.5 TRANSIENT STABILITY SIMULATION
......................................................................................................25 2.6 SMALL SIGNAL STABILITY
.............................................................................................34 2.7 DAMPING CONTROLLER DESIGN
............................................................................................................................40 2.8 REFERENCES
....................................................................................................41 3 FUNCTION DESCRIPTIONS
.......................................................................................................................................41 3.1 CALC
........................................................................................................................................41 3.2 CDPS
.................................................................................................................................41 3.3 CHQ_LIM
...................................................................................................................................41 3.4 DBCAGE
.................................................................................................................................42 3.5 DEEPBAR
.................................................................................................................................42 3.6 DC_CONT
...................................................................................................................................44 3.7 DC_CUR
..................................................................................................................................45 3.8 DC_LINE
.................................................................................................................................46 3.9 DC_LOAD
......................................................................................................................................46 3.10 DESAT
...............................................................................................................................47 3.11 EXC_DC12
................................................................................................................................50 3.12 EXC_INDX
..................................................................................................................................51 3.13 EXC_ST3
................................................................................................................................55 3.14 IMTSPEED
.....................................................................................................................................56 3.15 I_SIMU
...................................................................................................................................57 3.16 LINE_PQ
.......................................................................................................................................59 3.17 LMOD
..................................................................................................................................61 3.18 MAC_EM
....................................................................................................................................63 3.19 MAC_IB
...............................................................................................................................65 3.20 MAC_IGEN
.................................................................................................................................67 3.21 MAC_IND
.................................................................................................................................70 3.22 MAC_SUB
................................................................................................................................75 3.23 MAC_TRA
..................................................................................................................................79 3.24 MDC_SIG
................................................................................................................................79 3.25 MEXC_SIG
....................................................................................................................................80 3.26 ML_SIG
................................................................................................................................80 3.27 MSVC_SIG
..................................................................................................................................81 3.28 MTG_SIG
.................................................................................................................................82 3.29 NC_LOAD
...........................................................................................................................................83 3.30 PSS
...................................................................................................................................86 3.31 PSS_DES
2
Contents
..................................................................................................................................87 3.32 PST_VAR
...............................................................................................................................93 3.33 RED_YBUS
....................................................................................................................................95 3.34 RLMOD
..................................................................................................................................96 3.35 RML_SIG
....................................................................................................................................97 3.36 S_SIMU
................................................................................................................................99 3.37 EXAMPLE
.................................................................................................................................102 3.38 SMPEXC
..................................................................................................................................104 3.39 STATEF
...............................................................................................................................105 3.40 STEP_RES
........................................................................................................................................105 3.41 SVC
..............................................................................................................................107 3.42 SVC_INDX
............................................................................................................................107 3.43 SVM_MGEN
......................................................................................................................................117 3.44 TCSC
..........................................................................................................................................118 3.45 TG
............................................................................................................................120 3.46 TG_HYDRO
................................................................................................................................122 3.47 TG_INDX
3.48 Y_SWITCH..............................................................................................................................122
3
LoadFlow
1 Load Flow
1.1 Introduction
In power systems, a load flow study is performed to obtain a set of feasible steady state system conditions
which obey certain system constraints. It requires that the system structure is specified together with the
generators’ real powers and the system’s active and reactive power loads. System bus voltage magnitudes
and angles are then calculated by solving the nonlinear algebraic network equations so that the specified
loads are supplied.
Although load flow studies are important in their own right, they are also required to act as starting points
for dynamic simulation.
1.2 Data Requirements
The system structure is specified, in PST, by two matrices, bus and line. The format for these two
specification matrices is given in Function: loadflow. The example given in that function description is
used as a basis for this tutorial.
1.3 Load Flow Example Data
The bus and line data of a 4 generator, 2 area system [1] are
bus = […
1 1.03 18.5 7.00 1.61 0.00 0.00 0.00 0.00 1 99.0 -99.0 22.0 1.1 .9;
2 1.01 8.80 7.00 1.76 0.00 0.00 0.00 0.00 2 5.0 -2.0 22.0 1.1 .9;
3 0.9781 -6.1 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5;
4 0.95 -10 0.00 0.00 9.76 1.00 0.00 0.00 3 0.0 0.0 115.0 1.05 .95;
10 1.0103 12.1 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5;
11 1.03 -6.8 7.16 1.49 0.00 0.00 0.00 0.00 2 5.0 -2.0 22.0 1.1 .9;
12 1.01 -16.9 7.00 1.39 0.00 0.00 0.00 0.00 2 5.0 -2.0 22.0 1.1 .9;
13 0.9899 -31.8 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5;
14 0.95 -38 0.00 0.00 17.67 1.00 0.00 0.00 3 0.0 0.0 115.0 1.05 .95;
20 0.9876 2.1 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5;
101 1.05 -19.3 0.00 8.00 0.00 0.00 0.00 0.00 2 99.0 -99.0 230.0 1.5 .5;
110 1.0125 -13.4 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5;
120 0.9938 -23.6 0.00 0.00 0.00 0.00 0.00 0.00 3 0.0 0.0 230.0 1.5 .5 ];
line = [...
1 10 0.0 0.0167 0.00 1.0 0. 0. 0. 0.;
2 20 0.0 0.0167 0.00 1.0 0. 0. 0. 0.;
3 4 0.0 0.005 0.00 1.0 0. 1.2 0.8 0.05;
3 20 0.001 0.0100 0.0175 1.0 0. 0. 0. 0.;
3 101 0.011 0.110 0.1925 1.0 0. 0. 0. 0.;
3 101 0.011 0.110 0.1925 1.0 0. 0. 0. 0.;
10 20 0.0025 0.025 0.0437 1.0 0. 0. 0. 0.;
11 110 0.0 0.0167 0.0 1.0 0. 0. 0. 0.;
12 120 0.0 0.0167 0.0 1.0 0. 0. 0. 0.;
13 14 0.0 0.005 0.00 1.0 0. 1.2 0.8 0.05;
13 101 0.011 0.11 0.1925 1.0 0. 0. 0. 0.;
13 101 0.011 0.11 0.1925 1.0 0. 0. 0. 0.;
13 120 0.001 0.01 0.0175 1.0 0. 0. 0. 0.;
110 120 0.0025 0.025 0.0437 1.0 0. 0. 0. 0.];
The single line diagram of the test system is shown in Fig. 1. The system consists of two identical areas
interconnected by two long transmission lines. In each area, there are two generators, at buses 1 and 2 in
area 1, and at buses 11 and 12 in area 2. The loads are at bus 4 in area 1, and at bus 14 in area 2. Bus 1 acts
as the swing bus. Bus 101 is considered to be a generator in the load flow. It has zero real power
generation and acts as a reactive power source to hold the voltage at the center of the interconnecting
transmission lines. When we come to do dynamic simulations, this bus will be the site of a static VAR
compensator, and the reactive generation will give the initial susceptance of the SVC.
4
LoadFlow
There are step down under-load tap changing transformers between bus 3 and bus 4, and bus 13 and bus
14. The tap settings are changed during a load flow solution so that the load bus voltages are maintained
between the limits set in columns 14 and 15 of the bus matrix .
The generators at buses 2, 11, and 12 have reactive power limits set to -2pu to 5pu. The swing bus
generator and the reactive power source at bus 101 has limits -99pu to 99pu.
The rated voltage (kV) for each bus is specified in column 13 of bus. This is not used in an ac power flow,
but we will see later, that in a dc power flow the information is necessary, since the dc system is modelled
in natural units rather than in per unit.
1.4 Load Flow
G1
G2 G4
G3
1
10
20
2
3
4
101
13
14
120
12
11
110
Figure 1 Single Line Diagram Two Area System
The script file lfdemo is an ac load flow driver. When lfdemo is typed at the MATLAB command , you are
asked to choose a data file which contains the bus and line load flow specification files. In our example
case, these are specified in data2a.m. If your choice of file contains valid load flow data, you will be asked
whether you wish to have a load flow report. Entering ‘y’ opens a diary file in the current MATLAB
directory with the name lf_report.txt. type ‘n’ or press enter if you do not want a report. As the solution
progresses (a Newton_Raphson algorithm performed by loadflow) the voltages at the load buses are found
to be out-of-limits. The corresponding transformer taps are adjusted to bring the load voltage back in
range. At the end of the solution, either the solution has converged, or the number of allowed iterations has
been exceeded. In either case, the user is given a list of solution viewing options.
5