You are on page 1of 5

A Matlab-Based Tool for Power System Dynamics

Analysis: A Comparison with PSS/E


R. Vargas F. S. Sellschopp M. A. Arjona D. Díaz
rvargas07@hotmail.com sellschopp@hotmail.com marjona@ieee.org danieldiazlopez82@hotmail.com
Instituto Tecnológico de la Laguna
División de Estudios de Posgrado e Investigación
Torreón Coahuila, México
Tel: +52 (871)-705-13-31 ext. 170, Fax: +52 (871)-713 09 70

Abstract- The paper presents the development of a in the commercial package PSS/E. Nowadays, three different
computational program that simulates the electromechanical models of excitation systems have been incorporated into the
dynamics of an Electric Power System (EPS). It allows the program. In this paper, simulation results for two test systems
evaluation of the transient stability and will be integrated into are presented [2,3].
an on-line security assessment system in the northern control
area of the Mexican Electric Utility (CFE). Initially, the II. MODELS OF DYNAMICAL ELEMENTS
program was developed for research and academic purposes.
The program was written in MATLAB and then in C++ using This section presents the mathematical models of the
available public license compiler and numerical libraries. The different dynamic elements that integrate an electric power
power system model structure for transient stability analysis is system; they were incorporated into the ESTABI program.
defined by a set of algebraic and differential-ordinary equations The elements taken into account are synchronous generators,
(ADOE). This model structure allows the study of several automatic-voltage regulators and power system stabilizers.
solution algorithms, here an algorithm is used and its particular
features are explained. The simulation results of the developed
model are validated against the commercial software PSS/E, A. Synchronous Generators
where good agreement was found.
The machine model was expressed in terms of the so-called
I. INTRODUCCIÓN fundamental parameters. Usually, the derived or characteristic
parameters are known, therefore a conversion program is
The paper describes basically the developed version in needed. The stator-voltage equations of the machine model
MATLAB environment. MATLAB is a programming are given by:
language very well-suited for applications in power system
calculations. It comes with functions for creating sparse ⎡v d k − e"d k ⎤ ⎡ − rs X " q ⎤ ⎡i d k ⎤
matrices and operating upon them with most of the functions ⎢ ⎥=⎢ ⎥⋅⎢ ⎥ (1)
⎢⎣ v qk − e"qk ⎥⎦ ⎣− X " d − rs ⎦ ⎢⎣i qk ⎥⎦
and operators used for full matrices, as that for factorizing and
reordering the nodal admittance matrix. The code can be where the subscript k indicates variables evaluated at time
computationally efficient by avoiding the use of control t=tk. The subtransient voltages e"d and e"q , depend on the
commands such as if, for and while, and by operating with all rotor flux linkages and they are used as state-space variables
the vectorized information. In this paper, the development of a in the rotor voltage equations. Equation (1) can be
MATLAB based program for the analysis of power system represented as a Norton equivalent, which is more appropriate
dynamics (ESTABI) is presented. ESTABI was designed for for the nodal analysis used in the power system network
research and educational purposes. It incorporates a friendly modelling.
user interface for the construction and solution of a study case.
The program can be linked to the POWER WORLD
SIMULATOR and to a Power Flow program, which was also After applying the trapezoidal integration rule, a set of
developed in the MATLAB environment for the initial algebraic equations are obtained, and the voltage equations of
condition calculation. the rotor circuit are:
ESTABI allows the modelling of generators, turbines and ⎡e"d k ⎤ ⎡ 0 − Dx ⎤ ⎡i d k ⎤ ⎡ Fd k ⎤
speed governors, AC and DC excitation systems, power ⎢ ⎥=⎢ ⋅⎢ ⎥ + ⎢ ⎥ (2)
⎢⎣e" qk ⎥⎦ ⎣Qx 0 ⎥⎦ ⎢⎣i qk ⎥⎦ ⎢⎣ Fqk ⎥⎦
system stabilizers and ZIP type model for voltage dependent
load, as it is composed of constant impedance (Z), constant where,
current (I), and constant power (P) components [1]. The
network is modelled with the nodal admittance matrix in the Fqk = −( X d'' − X ls ) ⋅ A0 (3)
synchronous reference frame. The synchronous generators can
be modelled with up to two rotor circuits in the d-q axes. The Fd k = ( X d'' − X ls ) ⋅ B 0 (4)
models used for excitation systems are the same as those used Qx = ( X '' − X ) ⋅ A (5)
d ls 1
Dx = ( X d'' − X ls ) ⋅ B1 (6) Attempting to make this procedure by hand represents a
formidable algebraic task because it requires many
where A0 and B0 depend on parameters and states at substitutions and simplifications. Consequently, a systematic
t = t k −1 . A1 and B1 are constants that depend on parameters procedure was developed which is based in the representation
and they are time-invariant during the simulation. of state equations of the dynamic models and in the
The above equations can be integrated into (1) by substituting applications of the trapezoidal integration rule.
the subtransient voltages from (2) to (1), hence, The state equations for x l are,
⎡v d k − Fd k ⎤ ⎡ − rs X " q − Dx ⎤ ⎡i d k ⎤ p ⋅ x l = A l ⋅ x l + B l ⋅ x nl + Cl ⋅ u + Dl (8)
⎢ ⎥=⎢ ⎥⋅⎢ ⎥ (7)
v − Fqk ⎥ ⎣− ( X "d −Qx ) − rs ⎦ ⎣⎢i qk ⎥⎦
⎣⎢ q k ⎦ where u is input variable vector of the model. Ec , Vref and
As it can clearly be seen, the model structure and complexity VS are the elements of this vector as shown in Fig.1
remains the same. However, this representation includes the In this kind of representation Dl could be a constant vector
differential equations related to the rotor machine. This
that can take into account the linearization of a nonlinear
mathematical representation of the synchronous generator is
function which is present in the model, for example, the
useful when an iterative procedure is to be used at each time
saturation function of a cd exciter can be expressed as:
step, and if only updates for A0 and B 0 at t k +1 = t k + h are
B ⋅E
needed. The time step is indicated by h. At present, the E fd ⋅ Se( E fd ) = Aexc ⋅ e exc fd (9)
machine model in ESTABI does not consider the magnetic
saturation representation, but its modelling is possible This function can be linearized as is suggested in [4],
because the model structure remains identical (2). E fd ⋅ Se( E fd ) = k1 + k 2 ⋅ Efd
By applying the trapezoidal rule to (8) at the integration step
B. Automatic Voltage Regulators and Stabilizers k, gives,
The stability problem solution at every time step required the x lk = El ⋅ x nl + Fl ⋅ u k + G l (10)
solution of an algebraic loop which has to be solved k

independently of the employed solution scheme, and also where, E l , Fl , y G l are matrices that depend on the state
from the numerical method used in the solution of the values at the integration step (k-1), and therefore are constant
differential equations. In this paper, the trapezoidal rule was in the iterative simulation loop. The state equations of the
selected because of its implicit feature in solving linear nonlinear variables are,
systems. In the algebraic loop, the set of algebraic and
differential equations are solved. Figure 1 shows an excitation p ⋅ x nl = A nl ⋅ x nl + B nl ⋅ x l + C nl ⋅ x nw
(11)
system model. + D nl ⋅ u + E nl ⋅ y ( x w , x nl , u) + Fnl

where y( x w , xnl , u) is a vector of algebraic variables that


VS VImax VRMAX-KCIFD represent the static limiter. Verr (Fig. 1) is an example of
Ec Vc + Verr Vr Efd these variables. Applying the trapezoidal rule to (11) and
1 - Σ
1 + s ⋅ TC KA
using (10) it is possible to get,
1 + s ⋅ TR 1 + s ⋅ TB 1 + s ⋅ TA
+
Vref x nlk = H nl ⋅ x nw + I nl ⋅ u k + J nl ⋅ y ( x wk , x nlk , u k ) + K nl (12)
VImin VRMIN k

Fig. 1. Excitation system model IEEE type AC4A [5]. where, G nl , H l , I nl , J nl y K nl are matrices that depend on
previous state values (k-1). A similar procedure as the one
The differential equations associated to the rotor machine used to obtain (12) is employed with the state equations with
were incorporated into the stator equations without making limits, such that,
any structure modification, on other words, the differential
x nw = H nw ⋅ x nlk + I nw ⋅ u k + J nw ⋅ y ( x wk , x nlk , u k ) + K nw (13)
equations are not being solved explicitly, and their solution is k
included in the modified model (7).
x wk = H w ⋅ x nlk + I w ⋅ u k + J w ⋅ y ( x wk , x nlk , u k ) + K w (14)

The differential equations of the dynamic elements are treated The elements of x nw w nl
k y y ( x k , x k , u k ) must be limited if they
in a similar way, the derivation of the integration formulae in
a compact form where the static limits were taken into are out of range. To solve (12)-(14) is necessary to estimate
account: x w , and with dynamic limits: x nw and those that the starting values for x nl , x nw , x w and u before the iteration
directly depend on them through the state equations: x nl loop. In the developed program, the elements of u were
which are being called nonlinear states. In these formulae, extrapolated and they correspond to the magnitude of
the solution of the states must be included, we called them terminal generator voltages.
linear states x l , and they are no related with limited states.
Using a similar procedure to obtain equations (12) to (14) The solution algorithm used in our work can be classified as
where all linear state variables are eliminated, even though that of partitioned solution approach [7] with some particular
their solution is implicit in (12)-(14). The output variable of ways of representing models of dynamic devices as was
the model can be any of the elements: x nl , x nw or x w , their already discussed in section II.
combination or any other combination that includes one or The algorithm needs of estimate values for the algebraic
more linear states, where it would be necessary to keep the variables before getting into to the iterative loop. Interpolation
corresponding equations of (10) to be solved in the iterative formulas were developed for some of these variables, which
loop. The application of this procedure to the model shown in are the real and imaginary parts of nodal voltages. An
Fig. 1 gives the following result, interpolation formula is also used for the rotor angle, because
it is needed in the network solution. For the real and imaginary
⎡Vref k ⎤
Verrk = [b c ]⋅ ⎢ ⎥ ⋅ +d (15) parts of the nodal voltages, a quadratic Langrage interpolation
⎣ Ec k ⎦ was used and for the rotor angle, the following formula was
employed [4],
Efd k = e ⋅ Verrk + f (16)
(Δt ) 2
where x nw
k
= 0 , x nlk = Efd k , u = [Vref k Eck ]t and δ(t k ) = 2δ(t k −1 ) ⋅ δ(t k − 2 ) + ( Pm − Pe (t k −1 )) (20)
ω(t k −1 ) J
y(x wk , x nlk , u k ) = Verrk . The algorithm used is presented in Fig. 2. In discontinuities,
due to network switching, the problem is solved at t = t − , and
III. NETWORK MODEL at t = t + , all state variables are kept fixed during the iterative
The network is described by the following nodal equation: loop and only the network is solved.
I = Ybus ⋅ V ( x, t ) (17)
Start
where x represents the state variables of the included
Read Power flow and
dynamic models, the flux linkages of rotor circuits. Ybus is the Dynamic data
nodal admittance matrix of a large and sparse system.
Calculus of initial
The model that has been widely used for representing the conditions and Ybus
dependence of voltage for the loads is the polynomial model: factorization

[
P = P0 ⋅ p1 ⋅ V 2 + p 2 ⋅ V + p 3 ] (18) t=0

[
Q = Q0 ⋅ q 1 ⋅ V 2 + q 2 ⋅ V + q 3 ]
(19) Disturbance detection

where P and Q are the active and reactive power Voltage extrapolation
Predictor formula for δ
components of the load when the terminal voltage is V. The
subscript 0 denotes the values of the respective variables at Calculus of nodal
injection currents
the initial condition. This model is commonly referred as the from generators and
ZIP model. loads

IV. SOLUTION ALGORITHM OF THE ALGEBRAIC-DIFFERENTIAL solve


V = Y*I false
EQUATIONS. true
Solve controllers Print
t = tmax
The problem consists in simultaneously solving a set of diferential equations output
differential equations together with a set of algebraic
equations. There is solution schemes that are characterized on false Check for interface true
the way are coupled to the two set of equations. Therefore, two variables
convergence
t = t + Δt

methods are identified: partitioned and simultaneous. Iterative loop


of calculus
In the partitioned solution strategy, the set of differential and
Fig. 2. Solution algorithm.
algebraic equations are separately solved. These solutions are
alternate between them and the solution may be iterative. The V. PROGRAM IMPLEMENTATION IN MATLAB.
elimination of the true interface error may be achieved and it
is dependant on the method and the system models. In the
simultaneous solution strategy, the implicit integration The program was initially developed in MATLAB due to
methods change the set of differential equations into a set of its programming advantages. The program was gradually
algebraic equations. These discretized equations are improved until good validation results were obtained. The
combined with the algebraic equations becoming a single set validation was made against to the program PSS/E.
of equations of larger size which are simultaneously solved. The graphical user interface was developed in MATLAB
Consequently with this strategy the two set of equations are and it allows to the user to carry out transient stability studies
solved at the same frequency, and there is no error in the of a power system. The interface allows the used to execute
interface. the following tasks:
• To select a data file with the case study of power In order to make the validation against the commercial
load flow, which can be generated with the software program PSS/E, the following two study cases were carried
PWS [9], or with a standard load flow program. out:
• To select the data file with the dynamic information A. Five node system.
which is generated through the user interface.
• To edit the study case to modify parameters of the The first study case is a five node system [2], it has two
dynamic elements like generators, excitation turbine-generators, and each generator has an excitation
systems, speed governors, turbines and SVC´s. system of the type shown in Fig. 1. The test system is shown
• To define events or disturbances to simulate, like the in Fig. 5. A three-phase fault is simulated at node 2, and it
simulation options, i.e. simulation time, tolerances, starts at t = 0.5 s. and it is released at 0.1s. The system load is
output variable selection, etc. modelled with a 70% constant admittance and with 30% of
• To display information of the study case and constant current. The total simulation time is 2 s.
simulation results.
130 MW 45 MW 40 MW
-7 MVAR 15 MVAR 5 MVAR
The user interface is shown in Fig. 3, where the user can 1 3 4
define the simulation parameters.

2 5

20 MW 40 MW 60 MW
10 MVAR 30 MVAR 10 MVAR

Fig. 5. Five node system.


The simulation comparisons are shown in Figs. 6 and 7,
where it can be seen a good agreement in field voltage and
load angle at node 2.

Fig. 3. Simulation parameters


The simulation results are shown in a window as illustrated
in Fig. 4.

Fig. 6. Field voltage of machine at node 2.

Fig. 4. Simulation results.

VI. VALIDATION RESULTS AGAINST PSS/E Fig. 7. Rotor angle dynamics of machine at node 2.
The discontinuities due to the limits of state variables were regulator model. The angle at node 12 presents some minor
not dealt in this paper. However, as seen in the simulation differences. It might be due differences in the numerical
results of the excitation voltage in Fig. 6, neglecting the limit integration methods, PSS/E uses the modified Euler method,
modelling does not affect the simulation results in this study meanwhile in ESTABI the trapezoidal rule is used. Another
case. cause might be the convergence criterion. More research is
being carried out to improve the results of the ESTABI
B. 57 node system. program.

ACKNOWLEDGMENT
The next comparison was made on a 57 node system [3]. The
system has 7 turbine-generators and each generator has an The authors are grateful to CONACYT, DGEST, PROMEP
excitation system AC4A. The load was modelled with a 70% and Instituto Tecnológico de la Laguna for the financial
constant admittance and 30% of constant power. A three- support.
phase fault was simulated on node 10 starting at t = 0.5 s.
REFERENCES
and clearing it out at 0.08 s. The comparison of load angle
and terminal voltage for the machine at node 12 are presented
[1]. IEEE Task Force Report, “Load Representation for Dynamic
in Figs. 8 and 9. Performance Analysis,” Paper 92WM126-3 PWRD, presented at the
IEEE PES Winter Meeting, New York, January 26-30, 1992.
[2]. Stagg and El-Abiad, “Computer Methods in Power System Analysis,”
McGraw-Hill, 1968.
[3]. IEEE test system 57 nodes.
(http://www.ee.washington.edu/research/pstca)
[4]. H. W. Dommel and N. Sato “Fast Transient Stability Solutions,”
Paper T72 137-3, presented at the IEEE Winter Meeting, New York,
January 30-February 4, 1972.
[5]. IEEE Recommended Practice for Excitation System Models for
Power System Stability Studies, IEEE Standard 421.5-1992.
[6]. Prabha Kundur, “Power System Stability and Control,” McGraw-Hill,
1994.
[7]. Brian Stott, “Power System Dynamic Response Calculations,” IEEE
Proceedings of the IEEE, Vol. 67, No.2, pp. 210-240 , February
1979.
Fig. 8. Angle dynamics at node 12.
[8]. IEEE Committee Report, “Computer Representation of Excitation
System,” IEEE Trans on PAS, Vol. PAS-87, pp. 1460-1464, June
1968.
[9]. Software, Power World Simulator version 7, 2000.

Fig. 9. Terminal voltage of machine connected at node 12.

VII. CONCLUSIONS
In this paper, the development of program for transient
stability analysis was presented. The program was validated
against the commercial software PSS/E and good results were
obtained. It can be seen sudden changes in the electrical
variables like power and voltages in three-phase faults and
they are because of discontinuities which are considered in
the nodal solution. This effect is not present in the automatic
voltage regulator because it is an output state variable of the

You might also like