Application of The PSAT An Open Source S
Application of The PSAT An Open Source S
Abstract— This paper describes the authors’ and users’ System Analysis Toolbox (PSAT) [3]. PSAT is currently used
experience in the application of a free and open source in several Universities all around the world [4]. Statistics on
software for teaching and research in power system anal- the users’ feedback, which has been collected on the web
ysis and modeling, namely Power System Analysis Toolbox forum dedicated to PSAT, are also presented in this paper.
(PSAT). PSAT is currently used in several Universities As far as the authors know, there are currently only two
for undergraduate courses, graduate courses and research. active FOSS projects for power systems: the PSAT [3] and
Selected experiences of the application of PSAT for educa- InterPSS [5]. While PSAT has been designed to provide a
tional and research purposes are discussed in this paper. tool suitable for research and education, InterPSS is oriented
PSAT has its own web forum, which provides support toward consultant activities and power industry applications.
to students and researchers all around the world. The Furthermore, InterPSS is currently lacking a comprehensive
paper also discusses the contributions of PSAT to power documentation which makes it not suitable for education.
engineering education based on the results of a survey on Therefore, PSAT is unique in the sense that is the only tool
PSAT filled up by the members of the PSAT web forum. whose main focus is to support education and research of
electric power systems.
Index Terms— Power system analysis, open-source soft-
PSAT also has its own web forum, which provides support
ware, Internet, Matlab, GNU Octave.
to students and researchers all around the world; this has
lead to an almost unique community of learners and a sort
I. I NTRODUCTION of “virtual laboratory” over the Internet.
Power system courses deal with complex physical phe- This paper is organized as follows: Section II presents
nomena and detailed mathematical models [1]. More often practical and pedagogical strategies for the development of
than not, the complexity of mathematical models deviate PSAT. A sample class activity which has been used in teaching
students attention from understanding the underlaying main an undergraduate course is briefly described in Section III.
concepts. Furthermore, the computational burden of power In Section IV selected documented applications of PSAT as
system analysis is cumbersome even for small networks, espe- a didactic and research tool are presented, while Section
cially if dynamic models are involved. As a result, educational V describes the PSAT web forum. In particular, subsection
power system software has become a fundamental teaching V-D presents the results of survey on PSAT proposed to
tool because it helps students to assimilate theoretical issues the members of the PSAT forum. Finally, in Section VI,
through graphic visualization of results and the use of user- conclusions are duly drawn.
friendly interfaces.
The deployment of Free and Open Source Software (FOSS) II. P EDAGOGICAL F EATURES OF PSAT
emerges as an option that provides a platform to distribute an
The desired features of pedagogical software and free and
educational and research tool obtainable by anyone around
open source software are discussed in this section. Afterwards,
the world, and thus, seamlessly creating a community of
it is shown how PSAT merges the features of both educational
users/learners that interact and collaborate with each other.
and free and open source software. The pedagogical features
An underlying reason behind the success of a variety of
implemented in the development of PSAT as an undergraduate
FOSS projects (see for example the Linux, Perl and LATEX
teaching tool and as a graduate research-oriented tool are also
experiences) is the freedom given to the users as well as the
discussed in this section.
spirit of collaboration that arises among them. If applied to the
power system academic community, the FOSS approach leads
to the deployment of tools suitable for education and research, A. Features of pedagogical software
and at the same time to create a community of learners [2]. Software for educational purposes should be user-friendly,
This paper presents the authors’ and users’ experience in easy to use and reliable. In particular, software for power
the usage and development of a specific FOSS, namely Power system education should contain an user interface that allows
drawing one-line diagrams, displays results and plots time
Invited Paper, OSS Panel Session, PES GM 2007.
L. Vanfretti is with the Department of Electrical, Computer and Systems domain simulations.
Engineering, Rensselaer Polytechnic Institute, Troy, NY, USA. E-mail: van- Most commercial software for power system analysis
[email protected] presents the features described above (see for example PSS/E
F. Milano is with the Department of Electrical Engineering, Univer-
sity of Castilla-La Mancha, 13071 Ciudad Real, Spain. E-mail: Fed- [6]). However, commercial software has two main drawbacks:
[email protected]. it needs a costly license and it is typically very difficult (if
not impossible) to modify models and/or algorithms provided
with the software.
The first drawback basically limits the diffusion of commer-
cial software in developing countries, while the second issue
imposes a severe limitation to the software development by
Ph.D. students and researchers.
B. Features of FOSS
Opposite to proprietary software, free and open source soft-
ware provides the user with the freedom of reading, copying,
and modifying the source code. It is also possible with FOSS
to redistribute the modified code, with the only condition that
the resulting program must also be distributed as free and open
source software [7].
Despite initial skepticism shown by commercial software
houses, a huge number of FOSS projects have been developed
and improved thanks to the cooperation of thousands of users.
Some FOSS projects have also obtained worldwide success
(see for example the Linux, Perl and LATEX experiences). Fig. 1. Main Graphical User Interface of PSAT.
If applied to the power system academic community, the
FOSS approach would allow deploying tools that are suitable
for education and research, and at the same time creating a 1) Pedagogical and Practical Features: In the authors’
community of learners [2]. experience, PSAT leads to an improvement of the students’
From the educational point of view FOSS projects typically learning process in several ways. First, PSAT appears user-
have the drawback of being barely understood by an under- friendly to the students because it is based on Matlab, which
graduate student. Even for Ph.D. students to be familiar with is typically used by students beginning their first year of
the details of large C++ or Java projects would require a lot undergraduate courses. The students can familiarize them-
of time, which should be dedicated to their research topics. selves with the algorithms not just by using the program but
also by reading the code. Furthermore, the educator and the
students can modify the algorithms implemented in PSAT and
C. Features of pedagogical FOSS
eventually add custom features. Finally, PSAT runs on Linux
An education oriented FOSS should merge the positive and GNU Octave; thus there is no need for an expensive
features of educational softwares and open source philosophy. license to set up a laboratory using PSAT. This property is
Educational free and open source software should have a particularly relevant in developing countries where the students
reasonably user-friendly interface and should be written in a do not have access to proprietary software.
simple and high-level programming language (e.g. Matlab [8] 2) Implementation Considerations: The main practical
or GNU Octave [9]). steps in setting up laboratory experiences or classes based on
Educational software should develop the learning process PSAT can be summarized as follows: system requirements,
and the curiosity of the student. However, only if the code is main goals, and assignment design.
open can the student explore all the software features. Finally, Systems requirements are minimal. The classroom or labo-
the students should get used to the idea that knowledge should ratory should consider an adequate number of personal com-
be free and available to everyone [2]. puters where MATLAB [8] or GNU Octave [9] are properly
installed. This consideration is more important in developing
D. PSAT, an example of educational FOSS nations where the hardware and software should be provided
PSAT is a Matlab-based FOSS for electric power system by the universities.
simulation and analysis. The command line version of PSAT Setting up laboratory classes is also rather simple. PSAT
is also GNU Octave compatible. PSAT includes power flow, comes with a set of sample test cases that can be used
continuation power flow, optimal power flow, small signal for didactic purposes. If it is necessary to modify or to
stability analysis and time domain simulation. All operations implement new features, the open source nature of PSAT
can be assessed by means of graphical user interfaces and makes it possible. As it will be described in Section III, power
a S IMULINK-based library provides a user friendly tool for system networks can be extracted from widely used textbooks
network design. to design class activities, give assignments, class projects and
A complete description of PSAT is beyond the main scope to teach students how to use toolbox.
of this paper. For interested readers, an in-depth description The assignments and design activities should be divided into
of all features of PSAT can be found in [3], [4]. A discussion stages of increasing complexity.
on the usage of PSAT as a Virtual Laboratory is described in 1) Students should become familiar with the toolbox. It
[10]. Finally, the Appendix A depicts how users can access is important that students get used to the philosophy of
the source code and the docuemtnation of PSAT. the program (e.g. main features, graphical user interface,
2
the students learning process. This simple activity consists of
the following steps:
1) Manually obtain the solution for the first iteration of
the Newton-Raphson method for the network. Emphasis
should be made on the the structure of each of the
element of the Jacobian matrix.
2) Construct a PSAT readable data format for the network
used in Step 1.
3) Edit PSATs’ power flow routine, fm spf.m, to display
the results of each iteration of the Newton-Raphson
Method. This can be done by adding the following the
commands to the function:
disp([’------------’])
disp([’Jacobian: ’])
disp([’------------’])
disp(’Element J11:’)
DAE.J11
disp(’Element J21:’)
DAE.J21
disp(’Element J12:’)
Fig. 2. Small 4-bus Network extracted from [11] and translated into the DAE.J12
PSAT-Simulink format. disp(’Element J22:’)
DAE.J22
disp(’Voltages:’)
DAE.V
etc.). disp(’Angles:’)
2) The second stage is to familiarize with algorithms and DAE.a
data structures. This will help to design specific class
activities, assignments and design activities such as the 4) Execute the power flow routine of PSAT to obtain a
one illustrated in Section III. solution to the problem.
3) For graduate courses, or if the number of student is re- 5) Compare the first iteration results calculated manually
duced, it is also possible to ask the students to implement with the one calculated by PSAT, explaining the students
new models and/or plug-ins. how the output structure of the program is arranged so
they can observe the changes of the variables for each
III. A S AMPLE C LASS ACTIVITY FOR U NDERGRADUATE iteration.
T EACHING 6) Observe the resulting state variables and Jacobian matrix
PSAT can be used to exemplify the topics covered in the for each iteration. This will offer to the students a clearer
textbooks recommended for power system analysis courses idea on how the results are converging to a solution.
(e.g. [11], [12]). This can be done by designing computer- 7) Compare the solution of the first iteration with the final
based lab activities. In the authors’ experience, lab activities solution.
stimulate the students’ interest in the power system analysis. It 8) Vary the tolerance of the power flow convergence and
is not uncommon that, after attending the lab, students design observe how this affects the number of iterations to get
their own test systems and experiments with the toolbox. the final solution.
One of the most important topics covered in power sys- 9) Vary the load and generator powers and observe how this
tem analysis course is power flow analysis. While students affects voltages and power flow in transmission lines.
generally understand most of the mathematical derivations This simple class activity shows how the open source nature
involved in the development of the Newton-Raphson power of PSAT can help in setting up undergraduate lab activities.
flow method, they often show difficulties in understanding the PSAT can also be used for graduate courses and research, as
physical meaning and analyzing the results in a “critical” way. is illustrated in the following section.
This is likely due to the computational burden involved
in the solution of power flow problems which deviates the
IV. S AMPLE E XPERIENCES OF T EACHING AND R ESEARCH
focus of the students to the computation of each step of the
WITH PSAT
solution method instead of paying attention to the underlaying
concepts. Figure 3 depicts the diffusion of PSAT all around the world.
Let us consider the network depicted in Fig. 2, which was Observe that, since it is free of charge, the diffusion of PSAT
extracted from [11] and translated into the PSAT-S IMULINK is open to industrialized as well as developing countries.
data format. This network is adequate for a first introduction PSAT is used in several Universities all around the world
to power flow analysis. However, the computational burden of (see the Appendix J of the PSAT documentation [4] for the rec-
a single power flow iteration is high and cannot be done by ommendation letters). Some examples are: University of Wa-
hand. It is thus necessary to set up a computer-based class and terloo, Canada; Universidad de San Carlos de Guatemala; Uni-
use software to obtain the power flow solution. PSAT can be versidad Mariano Galvéz de Guatemala; Universidad Camp-
conveniently adapted for a lab activity that can enhance greatly inas (Unicamp), Brazil; Universidad Centroamericana José
3
simulations required are power flow analysis, continuation
power flow analysis, small signal stability analysis and time
domain simulations.
V. T HE PSAT F ORUM
A. History of the Forum
PSAT diffusion
4
TABLE I TABLE II
R ELEVANT T OPICS AND T HEIR I NCIDENCE ON THE PSAT F ORUM J OBS OF PSAT U SERS
Topic Incidence (%) Job Percentage (%)
Slack bus 16 Undergraduate student 0
Infinite bus 5 Master student or Ph.D. candidate 53
Bifurcation theory 4.5 Professor or researcher 22
Continuation Power Flow 28 Professional or practitioner 25
Optimal Power Flow 32 Other 0
Small signal stability analysis 10
Time domain simulation 23.5
N-1 contingency analysis 2.7
Electricity markets 5.8
Wind Power 3.8 PSAT because it is distributed as a FOSS, while another 40%
SVC 22 of the users decided to use the software because of some of
TCSC 12 its features. Poll A.3 asks about reasons users subscribed to
STATCOM 5.6 the PSAT Forum. As was to be expected, about 39% of the
SSSC 10.5 users subscribed to the forum to obtain help on the use of
UPFC 14.6 the software. However, the interesting data is that 37% of
the users subscribed to the forum to discuss power systems
and about 23% subscribed to give feedback on the program.
This is clear evidence that the PSAT Forum has lead to the
power system courses all around the world. Furthermore, the
creation of a community of learners that share their experience
fact that students subscribe the forum and post messages about
on power systems. Note that this is a unique community in the
their doubts on simulations and power system issues is per se
conservative power engineering field. Finally, note that about
an implicit and clear proof of the usefulness of PSAT and its
55% of the users prefer using PSAT among other power system
forum.
software packages because it is free and open source (see poll
Frequent asked questions (FAQs) give an idea of what
A.4).
students find more difficult and thus suggest what can be
improved for making the toolbox more user-friendly. From Section B of the survey aims to understand how PSAT
the point of view of the software maintainer, the incidence has been used by the users and what impact it had on their
of FAQs about missing models or algorithms can be used work. The replies to polls B.1 and B.2 show that about 60%
as a valuable database to understand which developments of use PSAT for research, among these about 30% use standard
PSAT could be more useful to the community and what is routines and sample data files provided with PSAT, while 25%
worth studying. For the sake of illustration, Table I depicts the create their own routines and 20% create their own models.
incidence of some relevant topics in the web forum messages. Poll B.3 addresses the feature of PSAT that has most improved
the learning processes of the students. Statistics show that
D. PSAT Survey the documentation is the most important source of aid in the
learning process with about 35% of the replies, while the PSAT
This section discusses the results of the PSAT survey that
Forum and user-friendliness of the program are ranked with
was proposed to the members of the PSAT Forum. The text
about 23% and 20%, respectively. Finally, observe that about
of the survey is available on the PSAT forum. For the sake of
45% of the users stated that PSAT has been crucial for their
completeness, the survey is also reported in Appendix B.
research because they did not have access to any other power
The job distribution of the members of the PSAT forum is
system software (see poll B.4). This statistic shows one of the
depicted in Fig. II. Note that the majority of the PSAT users
most important contributions of PSAT as a research tool.
are PhD students. Nevertheless, the percentage of researchers,
professors, and practitioners is also relevant. Observe also Finally, polls in Section C address how users can contribute
that there are no undergraduate students. This fact was to to PSAT improvement and development. Observe that the user
be expected, since undergraduate students typically use PSAT feedback can be really effective due to the open source nature
for an assignment and expect that the teaching assistant (TA) of PSAT. Poll C.1 shows that users have an extremely positive
and/or the professor solve their doubts about the program. view of FOSS projects, with almost 98% of incidence. This
Statistics for the survey are depicted in Fig. 4. result confirms that users find FOSS very useful because they
Section A of the survey investigates how users found PSAT have the freedom to modify the code. Poll C.2 provides useful
and the users’ impressions of the software and the PSAT information on the kind of models and routines that users
Forum. The results show that almost all of the PSAT users would like to see implemented in PSAT. Poll C.3 shows that
found out about the software through the Internet (see poll a relevant percentage of users (about 37%) feel involved in
A.1). This is mainly thanks to the diffusion of PSAT through the PSAT development simply because it is an open source
University web pages (e.g. University of Waterloo, Canada, project. Poll C.4 shows that the documentation should include
and University of Castilla - La Mancha, Spain). The responses a very detailed description of how to modify the program and
to poll A.2 show that up to 40% of the users decided to adopt implement a new Simulink model translation tool.
5
A.1 A.2 A.3 A.4
100 60 40 100
40
50 20 50
%
%
20
0 0 0 0
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
B.1 B.2 B.3 B.4
60 40 40 60
40 40
20 20
%
%
20 20
0 0 0 0
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
C.1 C.2 C.3 C.4
100 40 40 30
20
50 20 20
%
%
10
0 0 0 0
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
6
5) Other (specify. . . ). C.4. What would you change in PSAT to feel more involved in its
A.2. Why did you decide to use PSAT? development?
1) A professor imposed me to use PSAT. 1) The documentation should explain better how to modify and/or
2) I liked the features of PSAT. change PSAT.
3) Just because PSAT is open source. 2) If I could use Simulink to create new models, I would contribute.
4) I had no other available software. 3) The structure of PSAT should be more modular (e.g. like a Java
5) Other (specify. . . ). project).
4) I would like to help, but I need to be guided by the PSAT
A.3. Why did you subscribe to the PSAT Forum? maintainer.
1) I thought I could get some help. 5) Other (specify. . . ).
2) To give a feedback on the program.
3) To discuss about power systems.
4) Actually, I did not subscribe. R EFERENCES
5) Other (specify. . . ).
[1] M. Kezunovic, G. H. A. Abur, A. Bose, and K. Tomsovic, “The Role
A.4. Compared to other software packages, what do you think about of Digital Modeling and Simulation in Power Engineering Education,”
PSAT? in IEEE Transactions on Power Systems, no. 1, Feb. 2004, pp. 64–72.
1) I prefer PSAT because it is open source. [2] R. M. Stallman, Free Software, Free Society: Selected Essays of Richard
2) I prefer other tools, because PSAT is open source and thus not M. Stallman. Boston: Free Software Foundation, 2002.
reliable. [3] F. Milano, “An Open Source Power System Analysis Toolbox,” IEEE
3) PSAT has limited features. Transactions on Power Systems, vol. 20, no. 3, pp. 1199–1206, Aug.
4) I cannot compare because I have used only PSAT. 2005.
5) Other (specify. . . ). [4] ——, “Power System Analysis Toolbox: Documenta-
B. How did PSAT help you? tion for PSAT version 2.0.0,” Mar. 2006, available at
http://thunderbox.uwaterloo.ca/∼fmilano.
B.1. What have you used PSAT for?
[5] M. Zhou, “InterPSS,” available at http://www.interpss.org.
1) For an assignment of an undergraduate course. [6] Power Technologies Inc., “Online Documentation PSS/E 30,” Siemens,
2) For an assignment of a graduate course. Tech. Rep., 2004.
3) For my project/thesis. [7] R. M. Stallman, “GNU General Public License,” Free
4) For research. Software Foundation, Inc., Tech. Rep., 1991, available at
5) Other (specify. . . ). http://www.gnu.org/copyleft/gpl.html.
B.2. How have you used PSAT? [8] The MathWorks Inc., Matlab Programming. The MathWorks Inc.,
1) I used standard routines and sample data files. 2006, available at http://www.mathworks.com.
2) I used standard routines and created my custom data files. [9] J. W. Eaton, GNU Octave Manual. Bristol, UK: Network Theory Ltd.,
3) I created my custom models. 1997.
4) I created my custom routines. [10] F. Milano, L. Vanfretti, and J. C. Morataya, “An Open Source Power
5) Other (specify. . . ). System Virtual Laboratory: The PSAT Case and Experience,” IEEE
Transactions on Education, accepted for pubblication in December 2006.
B.3. What features of PSAT have helped you to improve your learning [11] J. J. Grainger and W. D. Stevenson Jr., Power System Analysis. New
process? York: McGraw-Hill, 1994.
1) PSAT is intuitive and easy to use. [12] J. D. Glover and M. Sarma, Power System Analysis and Design. Boston:
2) PSAT has a user-friendly interface. PWS Publishing Company, 1994.
3) The PSAT forum helped me. [13] F. Milano and L. Vanfretti, “The Experience of PSAT as a FOSS
4) The PSAT documentation helped me. for Power System Education and Research,” IEEE Transactions on
5) Other (specify. . . ). Education, manuscript submitted in December 2006.
B.4. How was the role of PSAT for your course, project or research? [14] J. Chow, F. F. Wu, and J. Momoh, Applied Mathematics for Restructured
1) Fundamental, because I did not have access to other software. Electric Power Systems. Springer-Verlag, 2005, reference in Chapter
2) Stimulating, because it is open source. 8, Instability Monitoring and Control of Power Systems, by E. H. Abed,
3) I used PSAT only to compare results obtained with other soft- M. A. Hassouneh and M. S. Saad, from page 171.
ware. [15] P. W. Sauer and M. A. Pai, Power System Dynamics and Stability. Upper
4) I looked at PSAT only to get ideas. Saddle River, New Jersey: Prentice Hall, 1998.
5) Other (specify. . . ). [16] P. Anderson and A. Fouad, Power System Control and Stability. New
York: Wiley-IEEE Press, 2002.
C. How can you help PSAT?
C.1. What is your feeling about open source projects?
1) Great. I can open and modify the source code as I like.
2) It is useful just for people with a high programming skill.
3) Indifferent. Luigi Vanfretti (M’06) is a PhD student in the Electrical, Computer, and
4) Bad. I do not trust ”free” software. Systems Engineering Department at Rensselaer Polytechnic Institute, Troy,
5) Other (specify. . . ). NY; his supervisor is Professor Joe H. Chow. He received his B.S.E.E. from
C.2. What feature of PSAT would you like to be improved, added or the San Carlos University of Guatemala in June 2005, from where he also
changed? received the Francisco Vela award in February 2006. During fall 2005 he was a
Visiting Academic at the Department of Electronics and Electrical Engineering
1) A specific algorithm (specify: PF, OPF, etc.).
of The University of Glasgow, Scotland. Mr. Vanfretti is a member of IEEE
2) A specific model (specify: load model, AVR, etc.).
and the IEEE Power Engineering Society. His research interests are dynamics,
3) The GUI (specify: window appearance, Simulink library, etc.).
stability, control, and security of electric power systems.
4) The documentation (specify. . . ).
5) The web forum (specify. . . ).
6) Other (specify. . . ).
C.3. How would you contribute to PSAT?
1) I feel involved in the PSAT development because it is an open Federico Milano (M’03) received from the University of Genoa, Italy,
source project. the Electrical Engineering degree and the Ph.D. degree in 1999 and 2003,
2) I would like to contribute but it is too difficult. respectively. From 2001 to 2002 he worked at the University of Waterloo,
3) I would like to, but I do not have time. Canada, as a Visiting Scholar. He is currently an assistant Professor at the
4) I am not a programmer, but if I find a bug I will post a message University of Castilla-La Mancha, Ciudad Real, Spain. His research interests
on the Forum. include voltage stability, electricity markets and computer modeling of electric
5) Other (specify. . . ). power systems.