Professional Documents
Culture Documents
Matsim: A Matpower and Simulink Based Tool For Power System Dynamics Course Education
Matsim: A Matpower and Simulink Based Tool For Power System Dynamics Course Education
E-16-PSS-1247
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
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:
dEdi Where
Tq0i Edi ( X qi X qi ) I qi
dt
T T
Vd Vd 1 Vdm , Vq Vq1 Vqm
d i
i s T
, Eq Eq1 Eqm
T
dt Ed 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 )
Xd diag ( X d1 X dm
)
Xq diag ( X q1 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.
3
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran
XT 1
2 XL
Infinite
G Fig. 5. The rotor speed response to a symmetrical three-phase fault at the
Bus infinite bus.
Fig. 4. Implementation of the SMIB power system in MatSim. Fig. 6. Single line diagram of WSCC 3-machine power system.
4
MatSim: A Matpower and Simulink based tool for Power System Dynamics Course Education
31th Power System Conference - 2016 Tehran, Iran
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.