Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

No.

E-16-PSS-1247

MatSim: A Matpower and Simulink based tool for


Power System Dynamics Course Education

Hamzeh Beiranvand, Esmaeel Rokrok and Mahmoud Amit Kumar, Srungavarapu Gopalakrishna and Sanjeeb
Reza Shakarami Mohanty
Dept. of Electrical Engineering Dept. of Electrical Engineering
Lorestan University National Institute of Technology
Khorramabad, Iran Rourkela, India
beiranvand.ha@fe.lu.ac.ir, rokrok.e@lu.ac.ir, contact.amit.ele@gmail.com, gopal@nitrkl.ac.in,
shakarami.mr@lu.ac.ir sanjeeb.mohanty@nitrkl.ac.in

Abstract—Power System Dynamics Course (PSDC) is one of PSDC education. Following Tools are successful examples of
the most important courses in the MSc/M.Tech program of that:
Electrical Engineering at most of the universities worldwide.
However, due to the difficulties exist in this course, students are  Power System Toolbox (PST) [1],
unable to learn the power systems dynamics, properly. This
 Power Analysis Toolbox (PAT) [2],
paper introduces a tool based on MATLAB Software that is
useful for educating PSDC, effectively. A tool based on Matpower  Power System Analysis Toolbox (PSAT) [3],
and Simulink (MatSim) has developed in this paper. MatSim
utilizes Matpower for power flow studies which is required to  The ObjectStab [4],
calculate steady-state operating points. Also, it uses Simulink to
solve the Differential Algebraic Equations (DAEs) of a power  The MatDyn [5],
system. A single-machine infinite-bus power system, a 3-machine  And the other educational tools [6-8].
power system, and a 10-machine power system are provided as
examples in MatSim. At present in beginning phase, this package The PST is a very effective tool for dynamic simulation of
is encouraged to be used by most of the students of Lorestan a power system. However, understanding the simulation
University, Iran and National Institute of Technology, Rourkela procedure for PSDC beginners is hard due to the lack of a
(NITR) for completing their PSDC assignments or studies. User Graphical Interface (GUI).
Keywords—Power System dynamic education; Matpower; The PAT uses the Simulink GUI. Also, it includes Flexible
Simulink; PSS design; AC Transmission System (FACTS) devices in the simulation.
Its simulation loop is quite simple to track. However, it uses
I. INTRODUCTION some nonlinear solvers, in addition to the Simulink solvers, to
overcome the algebraic loops. Therefore, its understanding is
Education is a critical infrastructure in any country and it not straightforward especially for PSDC beginners.
guarantees their prosperity. Unfortunately, in the academic
places, where the education system is formed systemically, The PSAT is a completely open access MATLAB based
sometimes the quality of the education is sacrificed. The toolbox that enables the electrical engineers to experience a
PSDC in MSc/M.Tech program of electrical engineering is an vast variety of studies just in one package. The PSAT’s user-
example. PSDC covers a huge amount of notions in the friendly GUI makes its usage easy. Despite its diversity, it is
electrical engineering. For instance, PSDC starts with difficult to understand its simulation loop. Also, its GUI
Electrical Machinery Theory and Power Flow studies and then provides no insight for the PSDC beginners. Furthermore, a
drives dynamical models for power plants, and finally, it huge amount of m-files confuses the PSDC beginners.
forms interconnected power system by connecting generators There are few commercially available tools such as
through the admittance matrix of transmission line systems. Simpow [9], ETMSP [10], and EuroStag [11] to study and
Thereafter, modern control theory and linear control theory are investigate the power system dynamics. While, being efficient
used to design a controller to remove power systems dynamic and thereby able to simulate large systems, their component
problems such as low-frequency oscillations. models are often encapsulated and difficult or impossible to
At present, a number of MATLAB-based tools have been examine and modify. ObjectStab has developed for academic
developed as reported in the literature and they are helpful in and educational uses and it enables the student to examine and
modify the power system component models, simply. Though
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran

ObjectStab overcomes the mentioned drawback and provides a dE fd i


useful tool for education, its main solution loop is not still  TAi   K Ai E fdi  K Ai (Vrefi  Vi )  
straightforward. dt

MatDyn utilizes Matpower to solve the power flow. Where δ is the rotor angle, ω is the rotor speed, ωs is the
Therefore, it simplifies the overall complexities of the synchronous speed, E′d and E′q are internal transient voltage
simulation. However, its drawbacks for PSDC beginners are: behind x′d and x′q, Id and Iq are d-axis and q-axis components
it has not GUI, the small signal analysis is impossible to of generator stator currents, H is the generator inertia constant,
perform, and solvers are limited as compared to MATLAB D is the damping coefficient, TM is the mechanical power
Simulink. input, xd is the d-axis reactance, xq is the q-axis reactance, x′d
is the d-axis transient reactance, x′q is the q-axis transient
The tool presented in [6] has a simple methodology to
reactance, T′d0 is the open circuit d-axis time constant, T′q0 is
simulate the power system. But, its object-oriented structure
the open circuit q-axis time constant, Efd is the excitation
introduces complexity. In [7] transient stability analysis of a
multi-machine power system based on Simulink was done. In system voltage, V is the generator terminal voltage, Vref is the
[8], a Simulink-based educational tool was proposed for the regulator reference voltage, KA is the regulator gain, and TA is
purpose of illustrating power system control and stability the regulator time constant. In these equations, subscript i
notions as well as introducing students to realistic, though denotes ith synchronous generator
tractable in size, design problems. This package only models a For simplicity purposes, the input mechanical power TMi is
single-machine infinite-bus (SMIB) power system with treated as a constant in the excitation controller design, i.e., it
associated controller and multi-machine power system are not is assumed that the governor action is slow enough, and it has
presented. not any significant impact on the machine dynamics. The
In this paper, a Matpower [12] and Simulink (MatSim) electrical torque is as follows:
based tool for PSDC beginners is developed. MatSim has a
simple structure. MatSim utilizes Matpower to perform load  TE i  Edi I di  Eqi I qi  ( X qi  X di ) I di I qi  
flow studies. In addition, it uses Simulink GUI and solvers. In
MatSim, SMIB and multi-machine power systems are
considered as examples. Finally, after the acceptance of this The electrical torque is used in equation (4).
paper, MatSim package will be available online at MathWorks The stator algebraic equation of a synchronous machine
Inc. website. can be described as follows:

II. POWER SYSTEM MODELLING


Vdi   Rsi I di  X qi I qi  Edi
The Differential Algebraic Equations (DAEs) describe the   
dynamic model of a power system. The differential equations Vqi   Rsi I qi  X di I di  Eqi
of an m-machine power system representing the synchronous
machine and the automatic voltage regulator (AVR), can be The stator algebraic equation of all synchronous machines
described as follows: in the power system can be represented in a Matrix form as
follows:
dEqi
 Td0i   Eqi  ( X di  X di ) I d i  E fdi   Vd   R s I d  Xq I q  Ed
dt
  
Vq   Xd I d  R s I q  Eq

dEdi Where
 Tq0i   Edi  ( X qi  X qi ) I qi  
dt
T T
Vd  Vd 1  Vdm  , Vq  Vq1  Vqm 
d i
  i  s   T
  , Eq   Eq1  Eqm
   
T
dt  Ed   Ed 1  Edm
T T
I d  I d 1  I dm  , I q   I q1  I qm 
2 H i d i
 TM i  Edi I di  Eqi I qi
 s dt  
R s  diag ( Rs1  Rsm )
 ( X qi  X di ) I di I qi  Di (i  s )
 Xd  diag ( X d1  X dm
 )  
Xq  diag (  X q1  X qm
  )

2
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran

Id+jIq

VS
TM Epd
Machine Stator Vd+jVq Network
Differential Algebraic Tδ Algebraic Tδ-1
Equations Equations VG Equations IG
ωS Epq

PE
Efd (Vd2+Vq2)0.5
AVR
Differential
Equations Vref

Fig. 1. The solution loop schematic of the DAEs using the ODEs.

The network equations of a power system consisting of an


infinite bus, m machines, and n loads are as follows: III. EDUCATIONAL EXAMPLES
To show the simplicity and applicability of MatSim, three
examples are given where the commonly used power systems
 I S   VSS VSG VSL   VS  in the literature are analyzed. The PSDC students have to
 I    V VGG VGL   VG    solve the problem “simulate SMIB and multi-machine power
 G   GS systems and design PSS controllers for them” using MatSim.
 I L   VLS VLG VLL   VL 
Students have to use a widely utilized conventional lead-
In a power system with m generators, the loads can be lag PSS and the IEEE-type-ST1 excitation system that are
represented by constant impedances. Therefore, IL =0 and shown in Fig. 2. The conventional lead-lag PSS can be
order reduction can be used to eliminate the load related described as:
elements in the admittance matrix of the lines network.
The following equations interface the machines and the VPSSi ( s ) Tw s (1  sT1i )(1  sT3i )
network:  Gi ( s )   K Gi  
i ( s ) (1  sTw ) (1  sT2i )(1  sT4i )

T (I d  jI q )  I G Where Tw is the washout time constant, VPSSi is the PSS


output signal at the i th machine, and Δωi is the speed
 T (Vd  jVq )  VG   deviation of this machine. The time constants Tw is equal to 10
in this study. The optimal values of the stabilizer gain KGi and
 j (1  2 ) 
j ( m  ) 
the time constants T1i, T2i, T3i and T4i are to be determined.
T  diag (  e e 2
)
 

The above DAEs solution determines the nonlinear


dynamic behavior of the power system. The DAEs can be
solved using an Ordinary Differential Equation (ODE) solver.
This paper uses a solution loop to solve the DAEs using
ODEs. This solution loop is illustrated in Fig1.
The MatSim starts with power flow calculations using
Matpower. After the results of power flow calculations were
obtained, initial values of the state variables are calculated.
MatSim uses Simulink to solve the DAEs using ODEs in a Fig. 2. Conventional lead-lag PSS is connected to IEEE-type-ST1 excitation
system.
single simulation loop as illustrated in Fig. 1.

3
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran

A. Single-Machine Infinite-Bus Power System


Fig. 3 shows the SMIB power system used in MatSim. For
this system, H=6.4 s, D=0.0, Td0 =6.0 s, Tq0 =0.535 s
Xd=0.8958, Xq=0.8645, X d =0.1198 s and X q =0.1969 are
the machine parameters; KA=50.0 and TA=0.05s are excitation
system parameters; for the transmission line XT=0.0625 and
XL=0.2 pu. Operating point informations are PG=1.63 pu,
V1=1.026 pu and V2=1.025 pu.
Implementation of SMIB power system in MatSim is
shown in Fig. 4.

XT 1
2 XL
Infinite
G Fig. 5. The rotor speed response to a symmetrical three-phase fault at the
Bus infinite bus.

Fig. 3. Single line diagram of SMIB power system.

Fig. 4. Implementation of the SMIB power system in MatSim. Fig. 6. Single line diagram of WSCC 3-machine power system.

The parameters for a PSS were simply obtained by trial


and error as KG =5.2450, T1=0.5603, T2=0.0145, T3=0.6614
and T4= 0.0415. The nonlinear simulation was done using MatSim implementation of the WSCC power system is
MatSim for a symmetrical three-phase fault at the infinite bus shown in Fig. 7.
with duration of 100 ms. After the fault is cleared, the original
system is restored. Results for the rotor speed are depicted in
Fig. 5.
The designed PSS improves the unstable
electromechanical modes (EMs) from 0.0588±j8.3601 up to a
stable position -0.4772±j4.3029.

B. Three-Machine Power System


In the second example, a widely used Western Systems
Coordinating Council (WSCC) 3-machine, 9-bus power
system is considered [13]. Single-line diagram of the WSCC
power system is shown in Fig. 6. The G1 is the slack bus
generator and its rotor angle (δ1) is selected as the reference
angle. The generators are represented as fourth-order models.
All dynamic parameters of the WSCC power system are given Fig. 7. Implementation of the multi-machine power system in MatSim.
in [13].
In order to increase damping of EMs, the stabilizer gain,
and the time constants are tuned based on the methodology

4
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran

presented in [14]. Two PSSs are considered at G2 and G3 and


their parameters are given in [14] where a detailed model
analysis was presented.
Only, following disturbance is considered in the time-
domain simulations for WSCC power system. A 100 msec
symmetrical three-phase fault at bus 9 at the end of line 8–9 at
t=1sec is simulated in MatSim. After the fault clearance, the
original system will be restored. As the generator, speeds
represent the stability status of the power system. So, the rotor
speeds ω1, ω2 and ω3 are graphically depicted in Fig. 8.

Fig. 9. Single line diagram of New England 10-machine power system.

Fig. 8. The rotor speeds response to a symmetrical three-phase fault at bus 9


in the WSCC power system.

The Fig.8 illustrates the stability properties of the WSCC


power system as a small example. Therefore, the PSDC
students can simply understand the basic concepts of the
power system stabilization of a multi-machine power system
using the MatSim.
Fig. 10. The rotor speeds response to a symmetrical three-phase fault at bus 39
in the New-England power system where generators have no PSSs.

C. Ten-Machine Power System


In the third example, the 10-machine 39-bus New England
power system is evaluated using the MatSim. The single-line
diagram of the New England power system is shown in Fig. 9.
Its parameters and normal operating point are given in [15].
A 100 msec symmetrical three-phase fault at bus 39 at
t=1sec is simulated in the MatSim. The rotor speeds for the
base case are given in Fig. 10. It can be observed that the
system is unstable and rotor of generator G9 accelerates with
the disturbed velocity profile. Furthermore, small-signal
analysis results, given in Table I, shows that the system has
three unstable eigenvalues. From their calculated participation
factors, it can be concluded that they are inter-area EMs.
In order to stabilize the New-England power system, all
generators, except G2 that is an equivalent power source
representing parts of the U.S.-Canadian interconnection Fig. 11. The rotor speeds response to a symmetrical three-phase fault at bus 39
system, were equipped with PSSs. The PSS parameters are in the New-England power system where 9 generators equiped with PSSs.
given in Table II.
For the same three-phase fault, the performance of the
proposed PSSs is evaluated. The rotor velocities, for the New-
England power system equipped with 9 PSS, are given in Fig.

5
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran

11. It can be seen from this figure that all generators are [8] C. D. Vournas, E. G. Potamianakis, C. Moors, and T. Van Cutsem, "An
stabilized and their oscillations fade out in less than 5seconds. educational simulation tool for power system control and stability,"
IEEE Transactions on Power Systems, vol. 19, pp. 48-55, 2004.
Table II lists the eigenvalues for critical modes in the [9] H. R. Fankhauser, T. Adielson, K. Aneros, A.-A. Edris, L. Lindkvist, and
New-England power system without PSSs and when PSSs S. Torseng, "SIMPOW–a digital power system simulator," ABB Review,
vol. 3, p. 2738, 1990.
were installed for 9 generators. [10] P. Hirsch, "Extended Transient-Midterm Stability Program (ETMSP)
Ver. 3.1: User’s Manual," ed: EPRI, TR-102004-V2R1, 1994.
[11] B. Meyer and M. Stubbe, "EUROSTAG, a single tool for power system
TABLE I. ELECTROMECANICAL MODES OF NEW-ENGLAND POWER
SYSTEM WITHOUT PSSS AND WITH PSSS simulation," Transmission & Distribution International, pp. 47-52,
1992.
EMs damping frequency [12] R. D. Zimmerman, C. E. Murillo-Sánchez, and R. J. Thomas,
Without 0.0205 ±6.6324i -0.0031 1.0556 "MATPOWER: Steady-state operations, planning, and analysis tools for
PSS 0.3510 ± 6.0796i -0.0576 0.9676 power systems research and education," IEEE Transactions on power
0.0369 ± 4.0108i -0.0092 0.6383 systems, vol. 26, pp. 12-19, 2011.
With PSS -5.98 ± 80.55i 0.0741 12.8200 [13] P. W. Sauer and M. Pai, "Power system dynamics and stability," Urbana,
-2.22 ± 44.75i 0.0495 7.1223 vol. 51, p. 61801, 1997.
-0.68 ± 9.08i 0.0751 1.4456 [14] H. Beiranvand and E. Rokrok, "General Relativity Search Algorithm: A
Global Optimization Approach," International Journal of
Computational Intelligence and Applications, vol. 14, p. 1550017, 2015.
[15] A. Pai, Energy function analysis for power system stability: Springer
Science & Business Media, 2012.
TABLE II. PSS PARAMETERS FOR NEW-ENGLAND POWER SYSTEM
Gen. KG T1 T2 T3 T4
G1 14.8423 0.7186 0.3155 0.6153 0.3289
G3 18.6122 0.7551 0.1352 0.6021 0.1421
G4 20.938 0.7016 0.0426 0.5638 0.0403
G5 8.4492 0.3211 0.1635 0.3701 0.0111
G6 14.4517 0.7914 0.1156 0.9058 0.1713
G7 11.2414 0.6564 0.1275 0.5869 0.1891
G8 16.5713 0.3348 0.0224 0.8531 0.4177
G9 5.7371 0.4522 0.0434 0.1292 0.0385
G10 11.5953 0.9483 0.0271 0.8877 0.0111

IV. CONCLUSION
This paper developed a Matpower and Simulink (MatSim)
based tool for teaching power system dynamics course that is
good for beginners. Simple structure and small number of files
along with Simulink GUI help the beginners to learn this
package very quickly and easily for the power system
dynamics study.

REFERENCES
[1] J. H. Chow and K. W. Cheung, "A toolbox for power system dynamics
and control engineering education and research," IEEE transactions on
Power Systems, vol. 7, pp. 1559-1564, 1992.
[2] K. Schoder, A. Hasanovic, and A. Feliachi, "PAT: a power analysis
toolbox for MATLAB/Simulink," IEEE Transactions on Power Systems,
vol. 18, pp. 42-47, 2003.
[3] F. Milano, "An open source power system analysis toolbox," IEEE
Transactions on Power systems, vol. 20, pp. 1199-1206, 2005.
[4] M. Larsson, "ObjectStab-an educational tool for power system stability
studies," IEEE Transactions on Power Systems, vol. 19, pp. 56-63, 2004.
[5] S. Cole and R. Belmans, "Matdyn, a new matlab-based toolbox for power
system dynamic simulation," IEEE Transactions on Power systems, vol.
26, pp. 1129-1136, 2011.
[6] E. Allen, N. LaWhite, Y. Yoon, J. Chapman, and M. Ilic, "Interactive
object-oriented simulation of interconnected power systems using
SIMULINK," IEEE Transactions on Education, vol. 44, pp. 87-94,
2001.
[7] R. Patel, T. Bhatti, and D. Kothari, "MATLAB/Simulink-based transient
stability analysis of a multimachine power system," International
Journal of Electrical Engineering Education, vol. 39, pp. 320-336, 2002.

You might also like