Objectstab: - A Modelica Library For Power System Stability Studies
Objectstab: - A Modelica Library For Power System Stability Studies
November 1, 2000
Abstract
Traditionally the simulation of transient and voltage stability in power systems has been
constrained to domain-specific tools such as Simpow, PSS/E, ETMSP and EuroStag. While
being efficient and thereby able to simulate large systems, their component models are of-
ten encapsulated and difficult or impossible to examine and modify. Also, these simulators
often require substantial training and are therefore unsuitable for normal classroom use. For
academic and educational use, it is more important that the component modelling is transpar-
ent and flexible, and that students can quickly get started with their simulations. This paper
describes a freely available power system library called ObjectStab intended for voltage
and transient stability analysis and simulation written in Modelica, a general-purpose object-
oriented modelling language. All component models are transparent and can easily be modi-
fied or extended. Power system topology and parameter data are entered in one-line diagram
form using a graphical editor. The component library has been validated using comparative
simulations with EuroStag.
1 Introduction
The simulation of power systems using special-purpose tools is now a well-established area
and several commercial tools are available, e.g. Simpow, PSS/E and EuroStag. While most of
these tools are computationally very efficient and reasonably user-friendly they have a closed
architecture where it is very difficult or impossible to view or change most of the component
models. Some tools, e.g. EuroStag, provide the possibility of modelling controllers such
as governors and exciters using block diagram representation but this is often cumbersome.
Moreover, these constructs do not enable the user to modify any of the generator or network
models. The Power System Toolbox [1] is a set of Matlab program files capable of dynamical
simulation of power systems. Here the component models are accessible, but the modification
of these requires a proper understanding of the interaction of the model files in this specific
environment. Graphical editing of the models is not possible. Some of the above mentioned
tools have the capability of exporting a linearised representation of the system for further
analysis but the full nonlinear representation remains hidden to the user. Also, most of the
industrial-grade tools require substantial training before they can be used productively.
Modelica [2, 3] is an object-oriented general-purpose modelling language that is under
development in an international effort to define a unified language for modelling of physical
systems. Modelica supports object-oriented modelling using inheritance concepts taken from
computer languages such as Simula and C++. It also supports non-causal modelling, meaning
that a model’s terminals do not necessarily have to be assigned an input or output role. While
object-oriented concepts enable proper structuring of models, the capability of non-causal
modelling makes it easy to model for example power lines that are very cumbersome to model
using block-oriented languages such as Simulink.
Causality is generally not defined in electrical systems [4]. For example, when modelling
a resistor, it is not evident ahead of time, whether an equation of the type
u=Ri (1)
I = ia + jib (3)
V = 1 + va + jvb (4)
Using this representation a connection point for power system components can be defined by
the following Modelica connector definition
connector Pin
Real va;
Real vb;
flow Real ia;
flow Real ib;
end Pin;
By definition all Pins use a p.u. system based on the system reference of 100 MVA,
although the generator models support parameter entry on their own individual base.
5 Further Work
The current version (4.1) of the Dymola simulator does not exploit the sparse structure of
the differential-algebraic equation system resulting from a large power system model. The
simulation of large systems is therefore very slow with Dymola compared to domain-specific
ObjectStab EuroStag
0.8 0.8
0.6 0.6
0.4 0.4
0 5 10 0 5 10
Time (s)
Bus 8 Angle (deg)
50 50
0 0
−50 −50
0 5 10 0 5 10
6 6
G1 Efd (p.u.)
4 4
2 2
0 0
−2 −2
0 5 10 0 5 10
Figure 4: Simulation results obtained using the ObjectStab library and EuroStag.
tools such as PSS/E or EuroStag. As an example, the a simulation of a ground fault with
the four node system takes about 10 s with EuroStag and 15 s with Dymola on a 150 MHz
SUN UltraSparc which is comparable. The corresponding times for the same simulation with
the Nordic 32 test system [14] which contains 41 buses and 23 generators, are 20 s with
EuroStag and 1330 s with Dymola - a factor 66 slower. Integration algorithms using sparse
matrix techniques may be included in a later version of Dymola and will hopefully make the
simulation times comparable with industrial-grade tools even for large systems. Currently, the
generator and transformer models do not contain saturation modelling. This may be included
in a later version of the library.
7 Conclusions
A component library called ObjectStab for power system transient and voltage stability sim-
ulations has been presented. Using the library, students can quickly enter their power system
in one-line diagram form using a graphical editor, without having to type cryptic data files
in text format or entering parameter data in countless dialog boxes. The library has an open
structure and all models can be modified or extended using various Modelica constructs, such
as state machines, block diagrams or plain algebraic or differential equations. The models
also have reasonable default parameter values defined such that students can play around with
the models even before they have full understanding of the meaning of all system parameters.
It is primarily intended as an educational tool, which can be used to experiment with and
observe the effect of the different levels of modelling or trying out new types of controllers.
1 http://www.dynasim.se/
2 http://www.iea.lth.se/˜ielmatsl/ObjectStab/
Because of some drawbacks described in Sec. 5 it can not yet compete with special-purpose
tools such as EuroStag in terms of computational efficiency, and is therefore most suitable for
analysis of small systems.
8 Acknowledgement
Parts of the library are based on models developed in a master’s thesis [15]. A special thank
goes to Inés Romero Navarro for her dedicated work in the masters project. Also the contri-
butions from Professor Gustaf Olsson and the financial support from the Sydkraft Research
Foundation is gratefully acknowledged. Thanks also to the development crew at Dynasim
AB, especially Hans Olsson and Sven-Erik Mattsson for modelling help and quick bug fixes.
References
[1] J H Chow and K W Cheung, “A toolbox for power system dynamics and control engi-
neering education and research”, IEEE Transactions on Power Systems, vol. 7, no. 4,
pp. 1559–64, November 1992. 1
[2] Modelica Design Group, Modelica - A Unified Object-Oriented Language for Physical
Systems Modeling, Language Specification, 1999, http://www.modelica.org/
documents.shtml. 1
[3] Modelica Design Group, Modelica - A Unified Object-Oriented Language for Physical
Systems Modeling, Tutorial and Rationale, 1999, http://www.modelica.org/
current/modelicarational12rev.pdf. 1
[4] K J Åström, H Elmqvist, and S E Mattson, “Evolution of continuous-time modeling and
simulation”, in The 12th European Simulation Multiconference, ESM’98, June 16-19,
1998, Manchester, UK, 1998. 2
[5] T Hiyama, Y Fujimoto, and J Hayashi, “Matlab/Simulink based transient stability sim-
ulation of electric power systems”, in Power Engineering Society Winter Meeting. 1999,
vol. 1, pp. 249–53, IEEE. 2
[6] S-E Mattsson, “Modelling of power systems in omola for transient stability studies”, in
IEEE Symposium on Computer-Aided Control System Design, 1992. 2
[7] H Elmqvist, D Brück, and M Otter, Dymola, Users Manual, Dynasim AB, Sweden,
2000, WWW Document: http://www.dynasim.se. 2
[8] J Deuse and M Stubbe, “Dynamic simulation of voltage collapses”, IEEE Transactions
on Power Systems, vol. 8, no. 3, pp. 894–904, August 1993. 2, 7
[9] T Van Cutsem and C Vournas, Voltage Stability of Electric Power Systems, Power
Electronics and Power Systems Series. Kluwer Academic Publishers, 1998. 2
[10] J Machowski, J W Bialek, and J R Bumby, Power System Dynamics and Stability, John
Wiley, New York, 1997. 2, 3, 4
[11] P W Sauer and M A Pai, “A comparison of discrete vs. continuous dynamic models of
tap-changing-under-load transformers”, in Proceedings of NSF/ECC Workshop on Bulk
power System Voltage Phenomena - III : Voltage Stability, Security and Control, 1994.
2
[12] D Karlsson and D J Hill, “Modelling and identification of nonlinear dynamic loads
in power systems”, IEEE Transactions on Power Systems, vol. 9, no. 1, pp. 157–163,
February 1994. 2
[13] P Kundur, Power System Stability and Control, Power System Engineering Series.
McGraw-Hill, New York, 1994. 5, 6, 7
[14] “Long term dynamics phase II”, Tech. Rep., CIGRE Task Force 38.02.08, 1995. 8
[15] I Romero Navarro, “Object-oriented modelling and simulating of power systems using
dymola”, Master’s thesis, Department of Industrial Electrical Engineering and Automa-
tion, Lund University, June 1999. 9