PowerSystems Paper
PowerSystems Paper
Keywords: Modelica, electrical systems, power sys- · AC systems, including steady-state, transi-
tems, dq0, quasi-static, transient, three-phase AC, ent, and asymmetric,
DC, wind turbines, virtual power plants, electric · Variable frequency systems, e.g. in wind
mobility. turbines or for drive control, and
· DC power systems, like HVDC
1 Introduction The replaceable phase systems also enable the appli-
cation of one and the same library with one universal
The Modelica Standard Library, version 3.2.1, con- connector to different levels of detail. This starts
tains the Electrical.Digital and Electrical.Analog from simple power balances and ranges through qua-
sub-libraries, besides Electrical.Spice3 for digital si-static models up to the treatment of detailed tran-
and analog electronics. The Electrical.Multiphase sient effects.
and Electrical.Machines sub-libraries cover detailed
2 Library Structure and Interfaces · Blocks contains signal oriented models, such
as Multiplex and Transforms;
2.1 Library Structure · Control contains special control blocks,
such as Exciters or Governors;
Figure 1 shows the package structure of the Pow-
erSystems library. · Mechanics provides TurboGroups, comple-
menting a generator with rotor and gears;
· Semiconductors define required compo-
nents such as Diodes and Thyristors.
PhaseSystem.Voltage
v[PhaseSystem.n];
flow PhaseSystem.Current
i[PhaseSystem.n];
PhaseSystem.ReferenceAngle
theta[PhaseSystem.m]
if PhaseSystem.m > 0;
end Terminal;
fixedVoltage?
The GenericInductiveImpedance model adapts to the
selected PhaseSystem.
transformer1
transformer2
3 Component models and Examples
10/10.4156
10/10
The PowerSystems library contains simple examples,
including textbook power flow calculations, demon-
stration of power/frequency control, and tutorials for
impedance1
impedance5
R=2, L=0
R=3, L=0
the modeling of power system transients.
55 A 60 A
3.1 Network flow calculations
0 0
impedance2
impedance4
R=4, L=0
R=1, L=0
PowerSystems.Examples.Network contains
examples that treat power flow with the quasi-static
ThreePhase_dq by using simple generic component
impedance3
models. 45 A 50 A
0 0
R=2, L=0
Figure 2 shows the Generic component models used
by these examples. Figure 3: NetworkLoop example
The example demonstrates that the PowerSystems
library enables the direct implementation of power
flow models using established graphical representa-
tions. The graphical representation differs from elec-
trical circuits as treated e.g. with the Electri-
cal.Analog library. The FixedVoltageSource has on-
ly one terminal, as opposed to two pins in the Elec-
trical.Analog library. Moreover there is no Ground
component needed to treat loops.
3.2 PowerWorld
PowerSystems.Examples.PowerWorld
demonstrates the principles of power/frequency con-
trol; see Figure 4.
w indFarm
HVDC
=
~
~
~ trafoH?
lineWind
pow erP?
der(dist?
linePlant distrib?
R=1, L? 380/50
city
dispatcher
The example uses Generic components with the qua- 3.3 Spot examples
si-static ThreePhase_dq because fast electrical tran-
sients and asymmetries are neglected. Rotating PowerSystems.Examples.Spot has been
masses in the power plants and active pow- ported from the Spot library [3]. They use the com-
er/frequency control determine the system dynamics. ponents from AC1ph_DC and AC3ph; see Figure 6.
Figure 5 shows simulation results covering one day
of operation.
low.
Figure 7: DoubleRXline example
f system asyn690_5M
f_nom=50
f par:true w t1
synchron
ini:st si?
gear
inertia
line1
w indSpeed ratio=1/20
w t2 J=250
realExpression
duration=80 {max(-?
w indSpeed select2
line2
1 m
1 m
2
~ = = ~
~ ~
asyn average average
line3 inverter1 meterDC inverter2
busbar sensor generator
w t4
line
1 2
line5
Figure 8: Wind farm model (electrical side) The PowerSystems library has been used as basis for
an optimization library. The optimization library
predefines component models that contain, besides
4 Applications physical equations, also optimization constraints and
objective terms. This way optimization programs can
4.1 Drive trains of wind turbines be implemented graphically like simulation models.
Figure 9 shows an exemplary model. The library is
The ITEA research project MODRIO aims for model
shown as tree on the left hand side. The intraday op-
driven online application. One application area ad-
timization treats a virtual power plant (VPP) consist-
dresses wind turbines. They are challenging because
ing of multiple power generation units, such as wind,
multiple physical domains need to be covered to
solar, hydro, as well as combined heat and power
master the overall system dynamics. The PowerSys-
plants. Available storage capacities include heat
tems library has been used to implement transient
buffers and a large battery. Moreover the exploita-
models of electrical drive trains. Figure 8 shows an
tion of electric cars and of heat pumps as controlla-
example with doubly fed induction generator (DFIG)
ble consumers is investigated.
on the right hand side. Multiple such wind turbine
models have been assembled to a wind farm model The Modelica model is translated to C code and ex-
as shown on the left hand side. ported as Functional Model Unit (FMU) to the ABB
control system. The FMU is used a basis for a large-
The electrical model will be integrated with a model
scale mixed integer optimization program, providing
for the mechanical side by SIMPACK.
a model predictive control of the VPP. The online
optimization approach is further discussed in [5].
4.2 Intraday optimization of municipal power
Figure 10 shows the result of one optimization run.
Traditional power/frequency control runs into limita- Dotted lines mark the original day-ahead plan.
tions when facing large uncertainties due to increas- Caused by a surplus of wind production, the intraday
ing use of renewable energy. Intraday optimization optimization reduces the use of combined heat and
reacts on new conditions by re-planning the power power BHKW plants (green areas) until the heat
production. Such an intraday optimization was de- buffers reach their lower limit (red areas). A battery
veloped within the project econnect Germany for the that is installed in a parking house is charged at times
investigation of the integration of emerging electric when there is too much power in the grid. More de-
mobility with power generation. tails of the intraday optimization are given in [6].
5 Conclusions References
The PowerSystems library started as a concept study [1] C. Kral, A. Haumer: Modelica libraries for
for defining configurable phase systems, together dc machines, three phase and polyphase ma-
with simple generic component models and universal chines, Modelica Conference 2005, Ham-
power connectors. Later on the Spot library was in- burg, March 2005.
tegrated, so that extensive sets of detailed component https://www.modelica.org/events/Conference2005/online_proceedings/
Session7/Session7a2.pdf
models for DC and three-phase AC are available.
[2] A. Haumer, C. Kral, J.V. Gragg, H. Kapeller:
This way PowerSystems provides the comprehen- Quasi-Static Modeling and Simulation of
siveness of Spot on the one hand side. Moreover, the Electrical Circuits using Complex Phasors,
new replaceable phase systems enable models at dif- Modelica Conference 2008, Bielefeld, March
ferent level of detail, including also simple models 2008.
for active power balances, besides symmetric and https://www.modelica.org/events/modelica2008/Proceedings/sessions/s
ession2d3.pdf
asymmetric AC models for active and reactive pow-
er, both steady-state and transient. A couple of ex- [3] B. Bachmann, H. Wiesmann: Advanced
amples and applications show the usefulness of the Modeling of Electromagnetic Transients in
library at different levels of detail. Power Systems, Modelica Workshop 2000,
Lund, September 2000.
The PowerSystems Library is available under the https://modelica.org/events/workshop2000/proceedings/Bachmann.pdf
Modelica license, version 2, at: [4] D. Oeding, B.R. Oswald: Elektrische
https://github.com/Modelica/PowerSystems Kraftwerke und Netze, Springer, 7th edition
Given sufficient interest by others, future work shall 2011.
address the integration of the PowerSystems library [5] R. Franke, J. Doppelhamer: Integration of
or its concepts with the Modelica Standard Library. Advanced Model Based Control with
Industrial IT. In: Assessment and Future
Directions of Nonlinear Model Predictive
Acknowledgements Control. R. Findeisen, F. Allgöwer, L.
Biegler (editors). Springer Verlag 2007.
We thank Martin Otter who has converted the origi-
nal Spot library to Modelica 3. This significantly [6] R. Franke, S. Kautsch, M. Blaumann, L.
simplified its integration with PowerSystems. Vogelbacher: Integration von
erneuerbaren und konventionellen
This work was supported in parts by BMBF within
Energien – Intraday-Optimierung,
the ITEA2 project MODRIO (Model Driven Physi-
cal Systems Operation) – project id: ITEA 2 –
Pooling und vorausschauende
11004. Zielsollwertführung, BWK 9/2013.
The project econnect Germany is funded by the fed-
eral ministry for economy and technology due to a
decision of the federal parliament.