0% found this document useful (0 votes)
67 views8 pages

PowerSystems Paper

The document introduces the new Modelica PowerSystems library for modeling electrical power systems. The library covers different phase systems, including DC, single-phase AC, and three-phase AC, within a single modeling framework using replaceable phase system packages. It contains generic component models that can be used across different phase systems as well as detailed models for DC, single-phase AC, and three-phase AC components from the previous Spot library. The library is demonstrated on applications including power/frequency control, optimization, and electrical drive trains for wind turbines.

Uploaded by

takis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views8 pages

PowerSystems Paper

The document introduces the new Modelica PowerSystems library for modeling electrical power systems. The library covers different phase systems, including DC, single-phase AC, and three-phase AC, within a single modeling framework using replaceable phase system packages. It contains generic component models that can be used across different phase systems as well as detailed models for DC, single-phase AC, and three-phase AC components from the previous Spot library. The library is demonstrated on applications including power/frequency control, optimization, and electrical drive trains for wind turbines.

Uploaded by

takis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Flexible modeling of electrical power systems –

the Modelica PowerSystems library


Rüdiger Franke, ABB, Germany – Ruediger.Franke@de.abb.com,
Hansjürg Wiesmann, Switzerland – HJ.Wiesmann@bluewin.ch

Abstract dynamic models of power electronics in the time


domain [1]. The Electrical.QuasiStationary sub-
New trends such as renewable power, virtual power library treats AC systems with complex phasors [2].
plants, electric mobility and smart grids raise the im- Some more electrical libraries have been developed
portance of electrical power systems. The systems during the last years by different authors. One of
are manifold, including e.g. DC, single- and multi- them, the Spot library, introduced a couple of im-
phase AC with fixed and variable frequency. Often portant features, such as the uniform treatment of
times such systems cover other physical domains as natural (abc) and modal (dq0) coordinates in one
well, such as rotational mechanics and thermo-fluid. framework, making it well suited for the detailed
Required system models range from simple flow cal- modeling of transient effects [3]. Moreover the Spot
culations of active power to detailed transient and library supported the per-unit system for parameteri-
asymmetric studies of three-phase systems. Trans- zation and it contained an extensive set of compo-
formed modal coordinates play an important role for nent models.
the treatment of three-phase AC systems.
Being well suited for detailed transient modeling of
The paper introduces the new Modelica PowerSys-
three-phase power systems, the Spot library has
tems library. It covers arbitrary phase systems in one
sometimes been considered overkill if simpler quasi-
modeling framework. Besides simple generic models
static models were sufficient. A further drawback of
that are valid with all phase systems, also large sets
the Spot library was that the same models appeared
of detailed component models for DC and three-
multiple times in distinct sub-libraries for particular
phase AC are included. The detailed component
phase systems. The Spot library hasn’t been availa-
models have been ported from the former Spot li-
ble since Modelica version 3 anymore.
brary to PowerSystems.
The usefulness of the library is shown on behalf of This paper introduces the new PowerSystems library
manifold examples and applications carried out so that integrates the Spot library with a new concept of
far for power/frequency control, intraday optimiza- replaceable phase systems. The aim is to support dif-
tion and virtual power plants as well as electrical ferent single and poly phase systems and different
drive trains of wind turbines. mathematical formulations in one framework. In par-
ticular this shall cover systems like:

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

DOI Proceedings of the 10th International ModelicaConference 515


10.3384/ECP14096515 March 10-12, 2014, Lund, Sweden
Flexible modeling of electrical power systems - the Modelica PowerSystems library

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.

2.2 Interfaces and PhaseSystems

The interfaces define a general power terminal.


connector Terminal
replaceable package PhaseSystem;

PhaseSystem.Voltage
v[PhaseSystem.n];

flow PhaseSystem.Current
i[PhaseSystem.n];

PhaseSystem.ReferenceAngle
theta[PhaseSystem.m]
if PhaseSystem.m > 0;
end Terminal;

The connector contains a replaceable PhaseSystem


package making it applicable to different mathemati-
cal representations. The PhaseSystem defines:
· Number n of independent current and volt-
age components
· Number m of reference angles
· Types used in the connector (Voltage, Cur-
Figure 1: Library structure of PowerSystems rent, ReferenceAngle) so that terminals of
different phase systems cannot be directly
The main packages are: connected
· Examples cover textbook power flow calcu- · Functions
lations, a demo for power/frequency control
and introductory tutorials to the detailed o j “operator”
component models; o angle and phase
· PhaseSystems defines different mathemati- o phase quantities for voltage, current
cal representations of electrical systems; and power
· Generic contains simple component models o system quantities for voltage, cur-
that can be used with any phase system for rent and power
basic investigations;
The vector of reference angles theta[m] allows
· AC1ph_DC contains detailed component the definition of a rotating reference system for the
models for DC and one phase AC; description of AC systems with modal components.
· AC3ph contains detailed component models It is known from the Spot library that this enables the
for three phase AC; treatment of modal quantities in the time domain,
covering transient and asymmetric systems as well.

516 Proceedings of the 10th International ModelicaConference DOI


March 10-12, 2014, Lund, Sweden 10.3384/ECP14096515
Session 3D: Electrical Power Systems

The power Terminal is overdetermined with the ref- der(PhaseSystem.angle(


erence angles though. This is treated with the opera- terminal_p.theta));
tors Connections.root, Connections.potentialRoot, parameter
Modelica.SIunits.Resistance
Connections.isRoot and Connections.branch. A
R = 1 "active component";
Modelica tool needs to analyze connection graphs parameter
and eliminate redundant equations. Modelica.SIunits.Inductance
The following table summarizes the PhaseSystems L = 1/50
"reactive component";
that are predefined in the PowerSystems library:
equation
PhaseSystem n m Description v = R*i + w*L*j(i);
zeros(PhaseSystem.n) =
DirectCurrent 1 0 One voltage and one terminal_p.i + terminal_n.i;
current component in if PhaseSystem.m > 0 then
natural coordinates terminal_p.theta =
TwoConductor 2 0 Two voltage and two terminal_n.theta;
current components Connections.branch(
for Spot AC1ph_DC terminal_p.theta,
components terminal_n.theta);
end if;
ThreePhase_d 1 0 One modal compo- end GenericInductiveImpedance;
nent for active power
— like DirectCurrent,
but converting volt- Note the use of the function j that generalizes com-
age values to three plex calculations known from quasi-static AC mod-
phase els to arbitrary phase systems. ThreePhase_dq with
two model components for active and reactive power
ThreePhase_dq 2 1 Two modal compo-
nents for active and defines a multiplication with the complex j:
reactive power; one function j
reference angle for input Real x[n];
frequency — cf. output Real y[n];
complex phasors algorithm
with variable fre-
quency y := {-x[2], x[1]};
ThreePhase_dqo 3 2 Three modal compo- end j;
nents for active, re-
active and dc power; The simpler ThreePhase_d neglecting reactive power
two reference angles defines:
for Spot dqo compo- function j
nents
input Real x[n];
output Real y[n];
algorithm
A generic steady-state impedance model can be de-
fined as: y := zeros(n);
model GenericInductiveImpedance end j;
replaceable package PhaseSystem =
PackagePhaseSystem; The more detailed PhaseSystem_dqo also considers a
function j = PhaseSystem.j; component for dc power in asymmetric systems, be-
Terminal terminal_p( sides active and reactive power. It defines:
redeclare package PhaseSystem =
function j
PhaseSystem);
Terminal terminal_n( input Real x[n];
redeclare package PhaseSystem = output Real y[n];
PhaseSystem); algorithm
PhaseSystem.Voltage v[:] = y := cat(1, {-x[2], x[1]},
terminal_p.v - terminal_n.v;
PhaseSystem.Current i[:] =
zeros(size(x,1)-2));
terminal_p.i; end j;
PhaseSystem.Frequency w =

DOI Proceedings of the 10th International ModelicaConference 517


10.3384/ECP14096515 March 10-12, 2014, Lund, Sweden
Flexible modeling of electrical power systems - the Modelica PowerSystems library

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?

Figure 2: Generic component models 380/10


hydroPlant
R=1, L?

lineWind

The NetworkLoop example implements a simple


traf oPlant
power flow model; see Figure 3. The textbook ex-
lineHydro
R=1, L?

ample is taken form [4]. 10/380


frequency

pow erP?
der(dist?

linePlant distrib?

R=1, L? 380/50
city

dispatcher

Figure 4: PowerWorld example

518 Proceedings of the 10th International ModelicaConference DOI


March 10-12, 2014, Lund, Sweden 10.3384/ECP14096515
Session 3D: Electrical Power Systems

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.

Figure 6: AC3ph component models


Figure 5: Simulation results for the PowerWorld ex-
ample The extensive AC3ph components range from simple
The wind farm introduces disturbances into the sys- impedances through special devices such as breakers
tem, caused by deviations of the actual weather from up to transformers, inverters and electrical machines.
the forecast – see forecast in magenta vs. actual feed- Moreover they cover composed models for Drives
in in green in the upper plot. A misbalance between and Generation.
production and consumption leads to deviations of The Spot examples serve as tutorials for detailed
the grid frequency from the nominal value of 50 Hz. transient modeling of electrical power systems. Fig-
The conventional power plant and the hydro plant ure 7 shows the fault clearance by short-time line
accommodate for deviations with primary frequency switched off as example.
control by means of proportional control. The re- f system trafo20k_400k_YD OH400kV
f _nom=50
maining control error is exploited by the load dis- f par:true
synchron
ini:st si?
patcher to determine the misbalance and to send out
set points for secondary frequency control. This way
abc
the fast primary frequency control is relieved with
sw itch sw itch
the slower secondary frequency control, so that sub- relay1 relay2
sequent disturbances can be treated as well. The
overall balance between production and consumption
is maintained. boundary
m
2

sw itch1 meterF lineF sw itch2


The example does not cover tertiary frequency con- w
p
1 2
slack
V

trol and intraday optimization that form further con- v


~ ~
cst_set turbGen trafo Inf Bus grd2
trol loops on top of secondary and primary frequency
control – see also the application in section 4.2 be- meterL line

low.
Figure 7: DoubleRXline example

DOI Proceedings of the 10th International ModelicaConference 519


10.3384/ECP14096515 March 10-12, 2014, Lund, Sweden
Flexible modeling of electrical power systems - the Modelica PowerSystems library

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

w t3 bdCond bdCond1 bdCond2

1 m

1 m
2
~ = = ~
~ ~
asyn average average
line3 inverter1 meterDC inverter2
busbar sensor generator

w t4

line
1 2

busbar sensor trafo term


line4
dqo
slack
V
w t5
~
infBus grd

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].

520 Proceedings of the 10th International ModelicaConference DOI


March 10-12, 2014, Lund, Sweden 10.3384/ECP14096515
Session 3D: Electrical Power Systems

Figure 9: Optimization model for municipal power

Figure 10: Exemplary intraday optimization result

DOI Proceedings of the 10th International ModelicaConference 521


10.3384/ECP14096515 March 10-12, 2014, Lund, Sweden
Flexible modeling of electrical power systems - the Modelica PowerSystems library

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.

522 Proceedings of the 10th International ModelicaConference DOI


March 10-12, 2014, Lund, Sweden 10.3384/ECP14096515

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy