electromagnetic transient simulation of large power
TRANSCRIPT
Electromagnetic Transient Simulation of Large Power Networks
with Modelica
Alireza Masoom1 Jean Mahseredjian1 Tarek Ould-Bachir2 Adrien Guironnet3 1Department of Electrical Engineering, Polytechnique Montreal, Canada,
{alireza.masoom, jean.mahseredjian}@polymtl.ca 2Department of Computer Engineering, Polytechnique Montreal, Canada,
[email protected] 3Réseau de Transport d'Électricité, France, [email protected]
Abstract This paper presents the simulation of electromagnetic
transients (EMTs) with Modelica. The advantages and
disadvantages are discussed. Simulation performance and
accuracy are analyzed through the IEEE 118-bus
benchmark which includes EMT-detailed models with
nonlinearities. The domain-specific simulator EMTP is
used for validations and comparisons.
Keywords: Modelica, Equation-based Modeling, Acausal
modeling, Electromagnetic transients, EMT, Synchronous
machines, Large scale, Nonlinearity, IEEE 118-bus grid.
1 Introduction
Power system simulations are mainly categorized into
phasor-domain and time-domain. In phasor-domain
analysis, voltages and currents are computed as phasors
varying in time. The electrical network is solved in steady-
state and at the fundamental frequency. Power generation
sources, such as synchronous machines, are solved with
their differential equations in time-domain and interfaced
with network equations using phasor equivalents. The
phasor-domain approach is suitable for electromechanical
transients, load flow, and short-circuit studies in very
large-scale grids and can be applied to any linear system
but becomes less accurate with the presence of power
electronics-based equipment e.g., FACTS and HVDC
since this technique cannot represent the faster transients.
Its main advantage remains computational speed for
studying lower frequency transients, but harmonics and
nonlinear models are ignored.
In the time-domain simulation approach, the network
and all integrated components are solved in time-domain
with detailed differential equations. Harmonics and
nonlinearities are modeled accurately. The solution may
include lower frequency interactions, as well as very high-
frequency transients. The time-domain approach allows to
solve networks for electromagnetic transients and is
tagged as the EMT-type solution.
Various specialized EMT-type simulation tools
(Mahseredjian 2009) are currently available and well
adapted for studying various power system phenomena,
including transformer saturation effects, lightning and
switching transients, and integration of inverter-based
resources. Power electronics-based components can be
simulated very accurately.
The EMTP (Mahseredjian, et al. 2007) software used
in this paper is widely used for the EMT simulations. The
cornerstone of this software is the discretization of
component models using the well-known companion
circuit approach. The A-stable trapezoidal and Backward-
Euler numerical integration methods are employed for the
discretization. The latter is used at discontinuity points to
avoid numerical oscillations (Sana, Mahseredjian, et al.
1995). In EMTP, the companion circuits of components
are interconnected (to respect Kirchhoff's first law)
through a sparse matrix solver using the Modified
Augmented Nodal Analysis (Mahseredjian, Dennetière, et
al. 2007) formulation.
In power system modeling, Modelica has been first
considered for phasor-domain simulations. iTesla Power
Systems Library (iPSL) (Vanfretti et al. 2016) is a
comprehensive Modelica package that was generated
through the iTesla project (Lemaitre 2014) for unified
modeling and for facilitating network model exchanges
amongst transmission system operators. PowerGrids
(Bartolini et al. 2019) and ObjectStab (Larsson 2004) are
other advanced libraries developed for electromechanical
and stability analyses, respectively.
Modelica (Fritzson 2014) is an equation-based
language that relies on the description of a system by
differential-algebraic equations. The EMT behavior of
electrical components can be modeled by their differential
equations. The language emphasizes the acausal approach
based on declarative modeling where the model and
solver are decoupled. It significantly improves model
development process and model readability.
The first attempt to develop a Modelica-based EMT-detailed simulator was reported in (Masoom et al. 2020),
where transmission lines incorporating the constant
parameter and wideband (Kocar Mahseredjian 2016)
models were introduced and validated. An EMT-detailed
library was developed and validated using the IEEE 39-
bus network. A challenging problem with Modelica is computational
speed (including compilation and simulation time). Some
DOI10.3384/ecp21181277
Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
277
solutions are based on numerical optimizations, e.g.,
Jacobian optimization (Kofman, Fernández, and
Marzorati 2021) and simulation in DAE mode (Braun et
al. 2017; Henningsson 2019). An open-source solution
(called DynaꞶo) is specifically designed for power system
simulations in phasor-domain (Guironnet et al. 2018).
DynaꞶo approach is based on hybrid coding with
Modelica and C++ and demonstrates competitive
performance compared to the specific domain packages
(Guironnet et al. 2018). This approach was used for EMT
simulations in (Masoom et al. 2021) as well. Even though
it delivers better performance compared to the pure
Modelica tools, there is still a significant gap in
comparison with EMTP.
The IEEE 118-bus benchmark contains the following
models: synchronous generators (including magnetic
saturation model) with controls, transformers,
transmission lines, nonlinear inductances, and nonlinear
surge arresters. The basic models, such as resistance,
inductance, and advanced models, that is, various models
of transmission line, loads, saturable transformers,
synchronous machine (without saturation), machine
controls, etc. were already presented in previous papers
(Masoom et al. 2020; Masoom et al. 2021). This paper
focuses on the synchronous machine model with
saturation and the nonlinear arrester and comparison of
simulation efficiency in Modelica.
The paper is organized as follows. Two selected
models, namely the synchronous machine and nonlinear
arrester are developed using Modelica in Section 2. The
numerical results for the IEEE 118-bus system are
provided in Section 3.
2 Modelica Model Implementation
In this Section, two nonlinear models are presented and
discussed in more detail. The models have been developed
based on EMTP mathematical representations.
2.1 Synchronous Machine Model with
Magnetic Saturation
The details required to model Synchronous Machine (SM)
depend on the type of transient study. Saturation effects in
SM are important for EMT analysis. Assuming the SM is
modeled by two damping windings on the q-axis (denoted
by kq1, kq2) and one damper winding (kd) and one field
winding (fd) on the d-axis, (1)-(6) provide the flux-based
equations of SM in state-variable form.
𝐯𝑑𝑞0 = 𝐏(θ)𝐯𝑎𝑏𝑐/V𝑠𝑡𝑎𝑡𝑜𝑟,𝑏𝑎𝑠𝑒 (1) 𝑝𝛙 = ω𝑏(𝐀𝛙+ 𝐮) (2) 𝐀 = −(𝐑𝐋−1 +𝐖) (3)
𝐢 = 𝐋−1𝛙 (4) 𝐢𝑎𝑏𝑐 = 𝐏
−𝟏(θ)𝐢𝑑𝑞0 (5)
𝐢𝑎𝑏𝑐,𝑎𝑐𝑡𝑢𝑎𝑙 = 𝐢𝑎𝑏𝑐 . I𝑠𝑡𝑎𝑡𝑜𝑟,𝑏𝑎𝑠𝑒 (6) where:
𝐮 = [v𝑞 , v𝑑 , v𝑓𝑑 , 0, 0, 0]𝑇
(7)
𝛙 = [ψ𝑞 ,ψ𝑑 , ψ𝑓𝑑 ,ψ𝑘𝑑 ,ψ𝑘𝑞1, ψ𝑘𝑞2]𝑇
(8)
𝐢 = [i𝑞 , i𝑑 , i𝑓𝑑 , i𝑘𝑑 , i𝑘𝑞1, i𝑘𝑞2]𝑇
(9)
𝐢𝑑𝑞0 = [−i𝑞 ,− i𝑑 , 0]𝑇
(10)
𝐑 = diag(R𝑎 , R𝑎, R𝑓𝑑 , R𝑘𝑑 , R𝑘𝑞1, R𝑘𝑞2) (11)
In the above equations, the operator 𝑝 is 𝑑
𝑑𝑡 , the vector
𝐯𝑎𝑏𝑐 is the terminal voltage, 𝐯𝑑𝑞0 is the voltage in dq
frame, ω𝑏 is the base angular velocity, 𝐏(θ) is the Park’s
transformation, vectors 𝐮, 𝐢, and 𝛙 denote the stator and
rotor voltages, currents, and flux linkages in the dq frame
and 𝐢𝑎𝑏𝑐 is the stator current. 𝐖6×6 is the rotor speed-
dependent matrix; all elements are zero except 𝑤[1,2] =𝜔𝑟 and 𝑤[2,1] = −𝜔𝑟, 𝐋6×6 is the symmetrical matrix of
inductances in the rotor reference frame, 𝐑6×6 is the stator
and rotor resistance matrix.
The details of saturation effects modeling in the dq axes
are explained in (Karaagac et al. 2011). In magnetic
saturation modeling, the following assumptions are made:
(1) The leakage flux saturation and cross saturation are
ignored. It means only magnetizing inductances, L𝑚𝑑 and
L𝑚𝑞 are saturable. (2) Saturation is determined by the air-
gap flux linkage. (3) The sinusoidal distribution of the
magnetic field over the face of the pole is unaffected by
saturation.
Since the saturation relationship between the total air-
gap flux, ψ𝑇, and the magnetomotive force under loaded
conditions is assumed to be the same as at no-load
conditions, therefore magnetic saturation of stator and
rotor iron can be modeled by the no-load saturation curve which is characterized by a piecewise linear graph
(Karaagac et al. 2017).
Consequently, the mathematical model of saturation is
introduced by:
ψ𝑇 = 𝑓(ψ𝑇,𝑢𝑠) = 𝑓 (√ψ𝑚𝑑,𝑢𝑠2 +ψ𝑚𝑞,𝑢𝑠
2 ) (12)
ψ𝑚𝑑,𝑢𝑠 = L𝑚𝑑,𝑢𝑠i𝑚𝑑
i𝑚𝑑 = i𝑑 + i𝑓𝑑 + i𝑘𝑑 (13)
ψ𝑚𝑞,𝑢𝑠 = L𝑚𝑞,𝑢𝑠i𝑚𝑞
i𝑚𝑞 = i𝑞 + i𝑘𝑞1 + i𝑘𝑞2 (14)
where ψ𝑇,𝑢𝑠 is the total unsaturated air-gap flux, ψ𝑚𝑑,𝑢𝑠 and ψ𝑚𝑞,𝑢𝑠 are the unsaturated magnetizing flux linkages,
L𝑚𝑑,𝑢𝑠 and L𝑚𝑞,𝑢𝑠 are the unsaturated magnetizing
inductances, and i𝑚𝑑 and i𝑚𝑞 are the magnetizing
currents; each on the dq axis, respectively. Throughout the
paper, the subscript sat and us mean saturated and
unsaturated, respectively.
The value of saturated magnetizing flux linkages on the
dq axis (ψ𝑚𝑑,𝑠𝑎𝑡 and ψ𝑚𝑑,𝑠𝑎𝑡) can be corrected by a ratio
of corresponding unsaturated values as illustrated in
Figure 1.a. In EMTP, the magnetic saturation is
represented by a piecewise linear curve as sketched in
Figure 1.b. For the jth operating segment, ψ𝑇 is given by:
Electromagnetic Transient Simulation of Large Power Networks with Modelica
278 Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
DOI10.3384/ecp21181277
ψ𝑇 = ψ𝑘𝑗 + b𝑗ψ𝑇𝑢 (15)
= ψ𝑘𝑗 + b𝑗L𝑚𝑑,𝑢𝑠i𝑇
i𝑇 = √i𝑚𝑑2 + (
L𝑚𝑞,𝑢𝑠
L𝑚𝑑,𝑢𝑠)2
i𝑚𝑞2 (16)
b𝑗 =L𝑚𝑑,𝑠𝑎𝑡𝑗
L𝑚𝑑,𝑢𝑠 (17)
where b𝑗 is the saturation factor and ψ𝑘𝑗 is the residual
flux. The saturated values L𝑚𝑑,𝑠𝑎𝑡 and L𝑚𝑞,𝑠𝑎𝑡 are
computed as:
L𝑚𝑑,𝑠𝑎𝑡 = b𝑗L𝑚𝑑,𝑢𝑠
L𝑚𝑞,𝑠𝑎𝑡 = b𝑗L𝑚𝑞,𝑢𝑠 (18)
For a salient pole machine, because of large airgap path
along the q-axis, it is only required to correct the ψ𝑚𝑑;
thus:
L𝑚𝑑,𝑠𝑎𝑡 = b𝑗L𝑚𝑑,𝑢𝑠
L𝑚𝑞,𝑠𝑎𝑡 = L𝑚𝑞,𝑢𝑠 (19)
Figure 2 demonstrates the solution procedure for the
electrical equations of SM. In the case of no saturation,
the relationship between field current (i𝑓𝑑) and terminal
voltage (v𝑡) is linear; therefore, the magnetizing
inductances in (20) are constant (q𝑗 = d𝑗 = 1). If
saturation is selected, it is required to compute the
magnetizing inductances at each time point; thus, 𝐋 is
time-variant (q𝑗 = d𝑗 = b𝑗 for round rotor and q𝑗 = 0,
d𝑗 = b𝑗 for salient pole machine). This method results in
implicit equations requiring an iterative solution.
The model discussed above has been implemented for
the first time in Modelica. The model code is illustrated in
Figure 3. The declaration of variables and the conversion
of operational parameters to the standard ones are hidden
to conserve space and only the equation section is
demonstrated. The terminal voltages of SM are
represented by Pk.pin[1].v, Pk.pin[2].v and
Pk.pin[3].v for the phases a, b and c, respectively.
P(theta) represents a pre-defined function for the Park’s
transformation calculations.
Equation (2) is used as a differential equation for the
implemented model; the state vector Phi represents the
flux linkages and the input vector u the voltages. The
system matrix A is time-variant and computed as per (3).
The matrix of parameters for representation of
saturation, SD, is given by a 2-by-n matrix, where n is the
number of points taken from the no-load saturation curve.
The first row of this matrix contains the values of field
currents (physical value), while the second row contains
values of corresponding terminal voltages (per unit).
LinearInterplate(SD1PU, SD2PU, iT) is a function to
interpolate the iT by the two vectors of field current
(SD1PU) and voltage (SD2PU). These two vectors are
calculated in the non-reciprocal per unit. The function
returns the total flux (PhiT) and Lmdsat which the latter is
used for calculation of coefficient b as per (17). The
stator physical currents are represented by Pk.pin[1].i,
Pk.pin[2].i and Pk.pin[3].i for the phases, a, b and c,
respectively.
Other pieces of code represent the mechanical
equations of SM which are not discussed in this paper.
𝐋 =
(
L𝑙𝑠 + q𝑗L𝑚𝑞,𝑢𝑠 0 0 0 q𝑗L𝑚𝑞,𝑢𝑠 q𝑗L𝑚𝑞,𝑢𝑠0 L𝑙𝑠 + d𝑗L𝑚𝑑,𝑢𝑠 d𝑗L𝑚𝑑,𝑢𝑠 d𝑗L𝑚𝑑,𝑢𝑠 0 0
0 d𝑗L𝑚𝑑,𝑢𝑠 L𝑙𝑓𝑑 + d𝑗L𝑚𝑑,𝑢𝑠 d𝑗L𝑚𝑑,𝑢𝑠 0 0
0 d𝑗L𝑚𝑑,𝑢𝑠 d𝑗L𝑚𝑑,𝑢𝑠 L𝑙𝑘𝑑 + d𝑗L𝑚𝑑,𝑢𝑠 0 0
q𝑗L𝑚𝑞,𝑢𝑠 0 0 0 L𝑙𝑘𝑞1 + q𝑗L𝑚𝑞,𝑢𝑠 q𝑗L𝑚𝑞,𝑢𝑠q𝑗L𝑚𝑞,𝑢𝑠 0 0 0 q𝑗L𝑚𝑞,𝑢𝑠 L𝑙𝑘𝑞2 + q𝑗L𝑚𝑞,𝑢𝑠)
(20)
Eq. 2
vdq
ψ
AW
saturation
L-1
inv(*)
Eq. 4
no
yes
LEq. (20)
start
R
P(θ)vabc
iabc
wit
h
satu
rati
on
wit
hout
satu
rati
on
state
-vari
able
Eq
uati
on
s
qj=1, dj=1
Round
rotor
dj=qj=bj
dj=bj, qj==0
Eq. 16
idq P
-1(θ)
i d,q
,fd,k
d,k
q1,k
q2
?
iT
yes
nobj
id,q,fd,kd,kq1,kq2
Lmd,us
Lmq,us
L-1
RL-1
×
--
Figure 2. Solution procedure of synchronous machine with/without magnetic saturation in Modelica (Only electrical
equations are demonstrated).
iT
ψT
ψk2
ψk3
Lmd,sat2
Lmd,sat3
ψT
ψT,us
ψmd,us
ψm
q,u
s
ψmd,sat
ψm
q,s
at
(a) (b)
Lmd,sat1=Lmd,us
ib1
ψb1
ψb2
ib2
Lmd,us imd
Lm
q,u
s i m
qLmd,sat imd
Figure 1. (a): Saturated and unsaturated magnetizing flux linkages in the dq axes of a synchronous machine. (b): Magnetic
saturation characteristic (piecewise-linear approximation).
Session 4A: Applications (2)
DOI10.3384/ecp21181277
Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
279
model SM "Synchronous Machine 6 order including
saturation"
// Declaration of variables and parameters are hidden
due to space limitations.
equation
// Conversion of terminal voltage to pu
vabc= {Pk.pin[1].v,Pk.pin[2].v,Pk.pin[3].v} /Vsbase;
// Conversion from abc frame to dq0 frame
vdq0 = P(theta)*vabc;
// State space electrical equations
der(Phi) = Wb * (A * Phi + u);
A = -(R * inv(L) + W);
i = inv(L) * Phi;
// Implementation of magnetic saturation
imd = Ip[2] + Ip[3] + Ip[4]; //imd = id + ifD + ikd
imq = Ip[1] + Ip[5] + Ip[6]; //imq = iq + ikq1+ ikq2
iT = sqrt(imd^2 + (Lmqus/Lmdus)^2 * imq^2);
(PhiT,Lmdsat) = LinearInterpolation(SD1pu,SD2pu, iT);
b = Lmdsat / Lmdus;
if Sauration then
if RoundRotor then
q=b;
d=b;
else
q=0;
d=b;
end if;
else
q=1;
d=1;
end if;
Lq = Lls + q * Lmqus;
Ld = Lls + d * Lmdus;
Lffd = Llfd + d * Lmdus;
Lkdkd = Llkd + d * Lmdus;
Lkq1kq1 = Llkq1 + q * Lmqus;
Lkq2kq2 = Llkq2 + q * Lmqus;
L= [ Lq , 0 , 0 , 0 ,q*Lmqus ,q*Lmqus ;
0 , Ld , d*Lmdus, d*Lmdus, 0 , 0 ;
0 , d*Lmdus, Lffd , d*Lmdus, 0 , 0 ;
0 , d*Lmdus, d*Lmdus, Lkdkd , 0 , 0 ;
q*Lmqus , 0 , 0 , 0 ,Lkq1kq1 , q*Lmqus;
q*Lmqus , 0 , 0 , 0 , q*Lmqus, Lkq2kq2];
// Conversion from dq0 to abc frame
iabc = inv(P(theta))* idq0;
// Calculations of actual Terminal current
Pk.pin[1].i = -iabc[1] * Isbase;
Pk.pin[2].i = -iabc[2] * Isbase;
Pk.pin[3].i = -iabc[3] * Isbase;
// Mechanical equations
Te = Phi[2] * idq0[1] - Phi[1] * idq0[2];
Tnet = Tm - Te - D * dw;
Tm = Pm_pu / Wr;
der(dw) = Tnet * (1 / 2 / H);
Wr = 1 + dw;
der(d_theta)= dw * Wb;
theta = d_theta + Wb * time;
// where
// u = {Vq , Vd , Vfd , Vkd , Vkq1 , Vkq2 }
u = {vdq0[1], vdq0[2], vfd , 0 , 0 , 0 };
// Phi = {Phiq , Phid , Phifd , Phikd , Phikq1,Phikq2 }
Phi = {Phi[1], Phi[2], Phi[3], Phi[4], Phi[5] , Phi[6]};
// i = {iq , id , ifd , ikd , ikq1 , ikq2 }
i = {i[1] , i[2] , i[3] , i[4] , i[5] , i[6] };
// Change of sign due to generating mode
idq0 = {-i[1], -i[2], 0};
W[6, 6] = [ 0 , Wr , 0 , 0 , 0 , 0 ;
-Wr , 0 , 0 , 0 , 0 , 0 ;
0 , 0 , 0 , 0 , 0 , 0 ;
0 , 0 , 0 , 0 , 0 , 0 ;
0 , 0 , 0 , 0 , 0 , 0 ;
0 , 0 , 0 , 0 , 0 , 0 ];
R[6, 6] = diagonal({Rs, Rs, Rfd, Rkd, Rkq1, Rkq2});
end SM;
Terminal voltage
Eq.(20)
Eq.(15)Eq.(17)
Eq.(16)
Figure 3. Implementation of synchronous machine model with
magnetic saturation in Modelica. The saturation formulation is distinguished with the blue dashed frame.
2.2 Nonlinear Arrester Modeling
Surge arresters protect the insulation of equipment, e.g., transformers in electrical systems against overvoltage
transients caused by lightning or switching surges. The
voltage and current characteristic of a gapless metal-oxide
surge arrester as illustrated in Figure 4 is a severely
nonlinear resistor with an infinite slope in the normal
operation region and an almost horizontal slope in the
protection region (temporary and lightning overvoltages).
In EMTP, the nonlinear resistance is represented by the
following power function:
i𝑘𝑚 = 𝑝𝑗 (v𝑘𝑚V𝑟𝑒𝑓
)
𝑞𝑗
(21)
where i𝑘𝑚 and v𝑘𝑚 are arrester current and voltage, 𝑗 is
the segment number starting at the voltage V𝑚𝑖𝑛𝑗,
multiplier 𝑝𝑗 and exponent 𝑞𝑗 are coefficients defined for
each V𝑚𝑖𝑛𝑗 and V𝑟𝑒𝑓 is the arrester reference voltage. A
linear function is used for the first segment.
The technique for modeling a nonlinear resistance
(arrester function) is like the one used for the nonlinear
Vmin, 1
Vmin, 2
Vmin, j
Vkm
ikmSymmetricalextension
Vmin, 3
10-2 102 104103
Temporary OVLightning OV
Maximum Continuous voltage
Protection region
23 4
5
1
Figure 4. Voltage-current characteristic of ZnO surge arrester
and operating regions.
model ZnoArrester ZnO arrester model in Modelica
extends Modelica.Electrical.Analog.Interfaces.OnePort;
parameter Real Vref = 516000 Reference voltage
//Exponential segments before flashover
parameter Real T[:, 3] "multiplier p, Exponent q, Vmin_pu";
protected
final parameter Real[:] p = T[:, 1];
final parameter Real[:] q = T[:, 2];
final parameter Real[:] V_min = T[:, 3]*Vref;
equation
i_km = ExponentialInterpolate(V_min, p, q, Vref, v_km);
end ZnoArrester;
Inheritance of OnePort partial class
Constructive equation of surge arrester
Internal parameters of model
Parameters of model
Zno
vkm
ikm
vk vm
Figure 5. Implementation of the ZnO surge arrester model in
Modelica environment.
Electromagnetic Transient Simulation of Large Power Networks with Modelica
280 Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
DOI10.3384/ecp21181277
inductance. Figure 5 illustrates the code for the
implementation of the surge arrester. The parameters of
𝑝𝑗, 𝑞𝑗 and V𝑚𝑖𝑛𝑗 are defined by n -by-3 matrix, T.
ExponentialInterpolate() is a function defined by the
specific class function, where the operating voltage is
searched for the appropriate segment, j. Then, the value of
i𝑘𝑚 is exponentially interpolated using (21). The
properties of partial class OnePort are inherited to apply
the appropriate equations of one-port devices.
As one can see, the implementation of the model is very
straightforward, there is no limitation for connection of
this model in series to current sources, or inductors.
Solutions converge for very small time steps in the range
of nanoseconds without any numerical errors (Masoom et
al. 2021).
3 Model Verification and Validation
This section presents simulation results of the modified
IEEE 118-bus benchmark (Haddadi, Mahseredjian, et al.
2018) which is used to validate the accuracy of the
proposed models. The same test case is also simulated
with EMTP.
Figure 6.a shows the schematic diagram of the IEEE
118-bus network sketched using the developed EMT
library in Modelica. A user-friendly Graphical User
Interface (GUI) with an illustrative icon is designed for
each component model for entering the parameters and
drawing networks easily. The physical connection of
components is carried out by interconnecting the
terminals of appropriate components.
The IEEE-118 bus circuit consists of 54 generating
units with controls (a few power plants contain more than
one SM; the total number of SMs is 69), 177 transmission
lines (RL coupled), 9 three-winding grid transformers,
145 two-winding transformers (91 Yd1-connected load-
serving transformers+ 54 generator transformers), and 91
three-phase loads. The voltage levels are 345kV
transmission, 138kV sub-transmission, 25kV distribution,
and {20, 15, 10.5} kV generation. The network includes
(a)(b)
+Line_70
_75
CP
Portsmth_138_070
SthPoint_138_075
+BRk
+BRm
+
SW
100ms|300ms|0 P_b
P_c
Load075
12-30
LoadBUS
138/25125MVA
LoadTransfo75
47.94MW11.01MVAR25kVRMSLL
m-end
k-end
-1|200ms|0
450ms|1E15s|0
(c)
Faulted zone
m
m
Power plant
PQ Load
138kV Network
345kV Network
PI Model of TL
Rf
R=1
Measuring Point
+ PI_ 3PH L ine _1 _2
Rive rs de _1 38 _0 01
+
PI_3 PH
Lin e_1 _3
Po kag on _1 38 _0 02
lo ad 00 2
Hick ryC k_1 38 _ 00 3
+
PI_3 PH
Lin e_3 _5
Shu nt_Re acto r g
Oliv e_ 13 8_ 00 5
+ PI_ 3PH L ine _2 _1 2
+ PI_ 3PH L ine _3 _1 2
TwinBr ch _1 38 _0 12
+ PI_ 3PH L ine _1 1_ 12
So uth Bnd _1 38 _0 11
+ PI_ 3PH L ine _5 _1 1
+ PI_ 3PH L ine _4 _1 1
NwC ar lsl_1 38 _ 00 4
+
PI_3 PH
Lin e_4 _5
lo ad 00 3
lo ad 01 1
G n wCa rlsl_ Con d
G twin Brc h_ PP
+ PI_ 3PH L ine _1 2_ 11 7
Co re y_ 13 8_ 11 7
+
PI_3 PH Lin e_7 _12
+
PI_3 PH Lin e_1 2_1 6
Ja cksn Rd _1 38 _0 07
+ PI_ 3PH L ine _6 _7
Ka nka ke e_ 13 8_ 00 6
+ PI_ 3PH L ine _5 _6
Co nc or d_ 13 8_ 01 3
+ PI_ 3PH L ine _1 1_ 13
FtWa yne _1 3 8_ 01 5
+ PI_ 3PH L ine _1 3_ 15
+
PI_3 PH Lin e_1 4_1 5
Go sh en Jt_ 13 8_ 01 4
+ PI_ 3PH L ine _1 2_ 14
+ PI_ 3PH L ine _1 5_ 33
Ha vilan d _1 38 _0 33
+ PI_ 3PH L ine _1 5_ 17
So re nso n_ 13 8_ 01 7
+ PI_ 3PH L ine _1 6_ 17
NE_ 13 8_ 01 6
+ PI_ 3PH L ine _1 7_ 31
+
PI_3 PH Lin e_1 7_1 13
De er Crk 2_ 13 8_ 11 3
+ PI_ 3PH L ine _3 1_ 32
+
PI_3 PH Lin e_3 2_1 13 De lawa re _ 13 8_ 03 2 De er Crk _1 38 _0 31 Gr an t_ 13 8_ 02 9
+ PI_ 3PH L ine _2 9_ 31
+ PI_ 3PH L ine _2 7_ 32
+
PI_3 PH Lin e_2 8_2 9
M ullin _1 38 _0 28
+
PI_3 PH Lin e_2 7_2 8
M ad iso n_ 13 8_ 02 7
+ PI_ 3PH L ine _3 2_ 11 4
WM ed fo rd _1 38 _1 14
+ PI_ 3PH L ine _1 14 _1 15
M ed fo rd _1 38 _1 15
+ PI_ 3PH L ine _2 7_ 11 5
+
PI_3 PH Lin e_0 8_0 9
+ PI_ 3PH L ine _0 8_ 30
1
Olive _T1 2 3
Bre e d_ 34 5_ 01 0
Oliv e_ 34 5_ 00 8
+
PI_3 PH Lin e_9 _10
Be qu ine _3 45 _0 09
+ PI_ 3PH L ine _2 5_ 27
+ PI_ 3PH L ine _3 3_ 37
Ea stL ima _1 38 _0 37
+ PI_ 3PH L ine _3 7_ 39
NwL ibr ty_ 1 38 _0 39
+ PI_ 3PH L ine _3 9_ 40
We stEn d_ 13 8_ 04 0
+
PI_3 PH Lin e_3 7_4 0
+ PI_ 3PH L ine _4 0_ 41
+ PI_ 3PH L ine _4 0_ 42
ST iffin _1 38 _0 41 Ho wa rd _1 38 _0 42
+ PI_ 3PH L ine _4 1_ 42
Wo ost er _1 38 _0 53
+ PI_ 3PH L ine _5 3_ 54
Tor re y_1 3 8_ 05 4
+ PI_ 3PH L ine _5 4_ 56
Su nn ysd e_ 13 8_ 05 6
+ PI_ 3PH L ine _5 5_ 56
Wa ge nh ls_ 13 8_ 05 5
+ PI_ 3PH L ine _5 5_ 59
T idd _1 38 _0 59
+ PI_ 3PH L ine _5 6_ 59 _1
+ PI_ 3PH L ine _5 6_ 59 _2 +
PI_3 PH Lin e_5 6_5 8
WNw Phil2 _1 38 _0 58
+ PI_ 3PH L ine _5 6_ 57
WNw Phil1 _1 38 _0 57
+
PI_3 PH Lin e_5 0_5 7
WCa m br dg _1 38 _0 50
+
PI_3 PH Lin e_5 1_5 8
Ne wcm rs t_1 38 _ 05 1
+
PI_3 PH Lin e_5 2_5 3
SCo sh oct _1 38 _0 52
+ PI_ 3PH L ine _5 1_ 52
+
PI_3 PH Lin e_4 9_5 0
Ph ilo_ 13 8_ 04 9
+
PI_3 PH Lin e_4 9_5 1
+
PI_3 PH Lin e_4 9_5 4_2
+
PI_3 PH Lin e_4 9_5 4_1
+ PI_ 3PH L ine _4 2_ 49 _1
+ PI_ 3PH L ine _4 2_ 49 _2
+ PI_ 3PH L ine _3 4_ 37
Ro ckh ill_1 38 _0 34
+ PI_ 3PH L ine _3 4_ 43
SKe nto n_ 13 8_ 04 3
+ PI_ 3PH L ine _4 3_ 44
WM Ver no n_ 1 38 _0 44
+
PI_3 PH Lin e_4 4_4 5
NNe wa rk_ 13 8 _0 45
WL an cst_ 1 38 _0 46
+ PI_ 3PH L ine _4 5_ 46
+ PI_ 3PH L ine _4 5_ 49
Cr oo ksvl_ 1 38 _0 47
+ PI_ 3PH L ine _4 6_ 47
+ PI_ 3PH L ine _4 7_ 49
+ PI_ 3PH L ine _4 6_ 48
Zan es vll_1 38 _0 48
+ PI_ 3PH L ine _4 8_ 49
+
PI_3 PH Lin e_3 4_3 6
Ste rlin g_ 13 8_ 03 6 We stL ima _1 3 8_ 03 5 L inco ln_ 13 8_ 01 9
+ PI_ 3PH L ine _1 5_ 19
+ PI_ 3PH L ine _1 9_ 34
+ PI_ 3PH L ine _3 5_ 36
+ PI_ 3PH L ine _3 5_ 37
M cKinle y_ 13 8_ 01 8
+
PI_3 PH Lin e_1 8_1 9
+ PI_ 3PH L ine _1 7_ 18
1
Sor enso n_T1
2 3
So re nso n_ 34 5_ 03 0
+
PI_3 PH Lin e_2 6_3 0
Tan nr sCk_ 3 45 _0 26
1 YgYgD
2 3
Tan nr sCk_ 1 38 _0 25
+
PI_3 PH Lin e_1 9_2 0
Ad am s_ 13 8_ 02 0
Ja y_ 13 8_ 02 1
+
PI_3 PH Lin e_2 0_2 1
Ra nd olp h_ 13 8_ 02 2
+
PI_3 PH Lin e_2 1_2 2
Co llCrn r_ 13 8 _0 23
+
PI_3 PH Lin e_2 2_2 3
+ PI_ 3PH L ine _2 3_ 25
+ PI_ 3PH L ine _2 3_ 32
T re nto n _1 38 _0 24
+ PI_ 3PH L ine _2 3_ 24
Hillsb ro _1 3 8_ 07 2
+
PI_3 PH Lin e_2 4_7 2
NPo rts mt _1 38 _0 71
+ PI_ 3PH L ine _7 1_ 72
+
PI_3 PH Lin e_7 1_7 3
Sa rg en ts_ 13 8_ 07 3
Po rtsm th _1 3 8_ 07 0
+
PI_3 PH Lin e_7 0_7 1
+ PI_ 3PH L ine _2 4_ 70
+
PI_3 PH Lin e_7 0_7 4
Be llefn t_ 13 8_ 07 4
+
PI_3 PH Lin e_7 4_7 5
Sth Poin t_ 13 8_ 07 5
+
PI_3 PH Lin e_7 0_7 5
+
PI_3 PH Lin e_4 9_6 9
Sp or n_ 13 8_ 06 9
+ PI_ 3PH L ine _4 7_ 69
+ PI_ 3PH L ine _6 9_ 70
+
PI_3 PH Lin e_6 9_7 5
Sp or n_ 34 5_ 06 8
1 YgYgD1
2 3
Ka na wha _1 38 _0 80
+
PI_3 PH Lin e_6 8_1 16 Ca pit lH l_1 38 _0 79 Kyg er Crk _3 45 _1 16
Tur ne r_ 13 8_ 07 7
+ PI_ 3PH L ine _7 5_ 77
+ PI_ 3PH L ine _7 5_ 11 8
WHu nt ng d_ 13 8_ 11 8 Da rr ah _1 38 _0 76
+ PI_ 3PH L ine _7 6_ 11 8
+
PI_3 PH Lin e_7 6_7 7
+
PI_3 PH Lin e_6 9_7 7
Ch em ica l_1 38 _0 78
+
PI_3 PH Lin e_7 7_7 8
+ PI_ 3PH L ine _7 8_ 79
+ PI_ 3PH L ine _7 9_ 80
+ PI_ 3PH L ine _7 7_ 80 _1
+ PI_ 3PH L ine _7 7_ 80 _2
+
PI_3 PH Lin e_8 0_9 7
Su nd ial_ 13 8_ 09 7
+ PI_ 3PH L ine _9 6_ 97
Ba ileys v_1 38 _0 96
+
PI_3 PH Lin e_8 0_9 6
L og an _1 38 _0 82
+
PI_3 PH Lin e_7 7_8 2
+ PI_ 3PH L ine _8 2_ 96
+
PI_3 PH Lin e_9 5_9 6
Ca rsw ell_ 13 8_ 09 5 Switc hb k_ 13 8_ 09 4
+ PI_ 3PH L ine _9 4_ 95
+ PI_ 3PH L ine _9 4_ 96
+ PI_ 3PH L ine _9 4_ 10 0
Gle n Lyn _1 38 _1 00 Ha nc ock _1 38 _1 04
+ PI_ 3PH L ine _1 00 _1 04
+ PI_ 3PH L ine _1 04 _1 05
Ro an ok e_ 13 8_ 10 5
+ PI_ 3PH L ine _1 05 _1 07
Re us en s_1 38 _1 07
+ PI_ 3PH L ine _9 3_ 94
Taze we ll_1 38 _0 93
Sa ltvlle _1 38 _0 92
+
PI_3 PH Lin e_9 2_9 3
+ PI_ 3PH L ine _9 2_ 94
+ PI_ 3PH L ine _9 2_ 10 0
Bla ine _1 38 _1 08
Fra nklin _1 3 8_ 10 9
+
PI_3 PH Lin e_1 05_ 108
+
PI_3 PH Lin e_1 08_ 109
+ PI_ 3PH L ine _9 2_ 10 2
Sm yth e_ 13 8_ 10 2 Wyt he _1 38 _1 01
+ PI_ 3PH L ine _1 01 _1 02
+ PI_ 3PH L ine _1 00 _1 01
Cla yto r_ 13 8_ 10 3
+ PI_ 3PH L ine _1 00 _1 03
+
PI_3 PH Lin e_1 03_ 104
+ PI_ 3PH L ine _1 03 _1 05
F ield ale _1 38 _1 10
+
PI_3 PH Lin e_1 09_ 110 + PI_ 3PH
L ine _1 03 _1 10
Da nv ille _ 13 8_ 11 2 Da nR iv er _1 38 _1 11
+ PI_ 3PH L ine _1 10 _1 11
+ PI_ 3PH L ine _1 10 _1 12
+
PI_3 PH Lin e_9 1_9 2
Ho lsto nT_ 13 8_ 09 1
+ PI_ 3PH L ine _8 9_ 92 _1
Clin chR v_1 3 8_ 08 9
+ PI_ 3PH L ine _8 9_ 92 _2
F re mo nt _1 38 _0 88 Be ave rC k_1 38 _0 85
+ PI_ 3PH L ine _8 5_ 89
+ PI_ 3PH L ine _8 8_ 89
+ PI_ 3PH L ine _8 5_ 88
Ho lsto n_ 13 8_ 09 0
+
PI_3 PH Lin e_8 9_9 0_1
+
PI_3 PH Lin e_8 9_9 0_2
+ PI_ 3PH L ine _9 0_ 91
Pin evlle _1 38 _0 87
Ha za rd _1 38 _0 86
+
PI_3 PH Lin e_8 5_8 6
+ PI_ 3PH L ine _8 6_ 87
Be tsyL ne _1 38 _0 84
+
PI_3 PH Lin e_8 4_8 5
Sp rig g_ 13 8_ 08 3
+ PI_ 3PH L ine _8 3_ 84
+ PI_ 3PH L ine _8 3_ 85
+ PI_ 3PH L ine _8 2_ 83
Clo ve rd l_ 1 38 _1 06
+ PI_ 3PH L ine _1 00 _1 06
+ PI_ 3PH L ine _1 05 _1 06
+ PI_ 3PH L ine _1 06 _1 07
Bra d ley_ 13 8_ 09 8
+ PI_ 3PH L ine _9 8_ 10 0
+ PI_ 3PH L ine _8 0_ 98
+ PI_ 3PH L ine _9 9_ 10 0
Hin to n_ 13 8_ 09 9
+ PI_ 3PH L ine _8 0_ 99
1
Kan awha _T1
2 3
Ka na wha _3 45 _0 81
+ PI_ 3PH L ine _6 8_ 81
M usk ng um _ 34 5_ 06 5
M usk ng um _ 13 8_ 06 6
+ PI_ 3PH L ine _6 5_ 68
1
M uskng um _T1
2 3
+ PI_ 3PH L ine _4 9_ 66 _2
+ PI_ 3PH L ine _4 9_ 66 _1
Na triu m _1 38 _0 62
+ PI_ 3PH L ine _6 2_ 66
+
PI_3 PH Lin e_6 6_6 7
Su mm er fl_ 13 8_ 06 7
+ PI_ 3PH L ine _6 2_ 67
Ka mm er _1 3 8_ 06 1
+
PI_3 PH Lin e_6 1_6 2
+
PI_3 PH Lin e_6 4_6 5
Ka mm er _3 4 5_ 06 4
1 Ka mm er _T1
2 3
+ PI_ 3PH L ine _5 9_ 61
T idd _3 45 _0 63
+ PI_ 3PH L ine _5 9_ 60
SWKa mm e r_ 13 8_ 06 0
+
PI_3 PH Lin e_6 0_6 1
+
PI_3 PH Lin e_6 0_6 2
1 YgYgD3
2 3
+
PI_3 PH Lin e_6 3_6 4
+ PI_ 3PH L ine _3 8_ 65
1
EastL ima _T1
2 3
Ea stL ima _3 45 _0 38
e ar th
+ PI_ 3PH L ine _3 0_ 38
e ar th1
e ar th2
e ar th3
e ar th4
e ar th5
e ar th6
e ar th7
e ar th8
lo ad 11 7
lo ad 03 3
lo ad 01 3 lo ad 00 7
lo ad 01 6
lo ad 01 7
lo ad 02 9
lo ad 11 5 lo ad 11 4
lo ad 02 8
lo ad 04 1
lo ad 03 9
Shu nt_Re acto r_ 37
G
lo ad 02 0
lo ad 02 1
lo ad 02 2
lo ad 02 3
G ka nk ake e_ Co nd G
ftW ayn e_ Co nd
G lin coln _C on d
G m cKinle y_ Co nd
G ta nn rs Ck1 38 _PP
G m ad iso n_ Con d
G b re ed _PP
G d ee rCr k_ PP
G d ela war e_ Co nd
G o live_ Co nd
G p ine vlle_ PP
G h olst on _Co nd
G h olst on T_ Co nd
G d an Rive r_ PP
G fie lda le_ Co nd
G d an ville_ Co nd
G cla yto r_ PP
G b ea ver Ck_ Co nd
G clin ch Rv_ PP
G sa ltvlle _Co n d
G g len Lyn _PP G
h an coc k_C on d
G ro a no ke_ Co nd
G re u sen s_ Con d
G tu rn er _C on d
G b elle fnt _Co nd
G sa rg en ts_ Co nd
G h ills br _Co n d
G tr en to n_ Con d G
p or tsm th_ Co nd
G kyg e rCr k_PP
G m usk ng um 3 45 _PP
G m usk ng um 1 38 _PP G
n atr ium _ Con d
G ka mm e r_ PP
G wL an cst _PP
G we stEn d_ Co nd
G h owa rd _C on d
G to rr ey_ PP
G su nn ysd e_ Co nd
G wa ge nh ls_ Con d
G tid d_ PP
G h into n_ Co nd
lo ad 07 5
lo ad 08 6
lo ad 08 8
lo ad 10 1 lo ad 10 2
lo ad 10 9
lo ad 10 8 lo ad 08 4 lo ad 09 3
lo ad 09 5
lo ad 09 4
lo ad 09 6
lo ad 09 7
lo ad 09 8
lo ad 10 6
G d ar ra h_ Con d
G ka na wh a_ PP
lo ad 11 8
lo ad 07 8
lo ad 07 9
G sp or n_ PP
G p hilo _PP
lo ad 06 7
lo ad 04 7
lo ad 04 5
lo ad 04 8
lo ad 04 3
lo ad 04 4 lo ad 05 0 lo ad 05 1
lo ad 05 7 lo ad 05 8 lo ad 05 2
lo ad 05 3
lo ad 06 0
lo ad 08 3
lo ad 08 2
lo ad 03 5 G
ste rlin g _3 6_ Con d
G ro ckh ill_C on d
G riv er sde _ Con d
lo ad 01 4
BR
BR
To=0 .3 s
SW
Tc=0 .1 s
k = 3 p lug To Pin
k = 2 p lug To Pin1
R1
R= 0.00 01*{ 1,1, 1}
R
R= 1
ZnO1
GPortsmth_Cond
Figure 6. (a): IEEE 118-bus Network including 177 PI-section models of TL sketched using the Modelica GUI. (b): the faulty
zone; a phase-b-to-phase-c fault at k-end of Line_70_75. The powerplant “Portsmth_Cond” is selected for validation of SM with saturation in Case 2, Surge arrester ZnO1 is inserted in the circuit only for Case 3. (c): the sub-circuit of Load75 including a
saturable transformer model and constant-impedance model of load.
Session 4A: Applications (2)
DOI10.3384/ecp21181277
Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
281
519 nonlinear inductances and 1909 RLC elements. All
SMs use a single-mass Wye-grounded model including
the normalized saturation characteristics represented by 7
points. The SM control systems consist of exciter type ST1, steam turbine and governor type IEESGO,
synchronous machine phasor and power system stabilizer
type PSS1A. The model of all three-phase transformers
consists of three single-phase units. The nonlinear
magnetization branch is placed on the high-voltage side.
The model uses a piecewise linear current-flux curve
defined by 8 points (in the positive part of the symmetric
characteristic) to represent saturation. All loads are
represented by a constant impedance model.
The transmission lines (TL) are modeled using pi-
sections. The constant parameter line model with
propagation delay is simulated slowly, owing to the very
high computational cost of the Modelica built-in delay
operator. Simulation of the network starts with zero initial
states.
3.1 Case 1: Phase-to-Phase Fault Analysis
For creating a transient disturbance, (see Figure 6.b), a
temporary phase-to-phase fault with a fault resistance of
1 Ω is applied on the phases ‘b’ and ‘c’ of “Line_70_75”
at t =100 ms followed by the isolation of the line at t= 200
ms (i.e. the breakers BRm and BRk open simultaneously
after 6 cycles). The fault is cleared at t = 300 ms, then the
line is reconnected at t = 450 ms.
Re-energizing the TL introduces high-frequency
transient oscillations and allows to investigate the
accuracy of transformer models in nonlinear regions.
For this purpose, the curve of flux versus current for
LoadTransfo75 which is located near the faulty line is
compared with EMTP as well.
Numerical tests are performed using the variable-step
DASSL solver (Petzold 1982) in ODE mode with the
tolerance of 1e-3 and the maximum integration order of 5
in Dymola 2021x. In EMTP, Trapezoidal/Backward Euler
integrator with the step sizes of 1 µs and 5 µs is employed.
The simulation time is 500 ms. The network model in
Modelica contains 96308 acausal DAEs. The total number
of network nodes and the size of the main system of
equations in EMTP are 2533 and 3773, respectively.
Figure 7.a depicts the voltage waveforms of phases a,
b and c at the k-end of Line_70_75 obtained by the two
simulators with different precisions. An excellent
agreement is observed between the results. Figure 7.b
shows the simulation results for the phases b and c in the
interval of [300, 310] ms, i.e., after the fault is removed.
The results produced by Modelica models are almost
identical to EMTP when step size is 1 µs (black curve),
whilst the high-frequency transient oscillations (f=1820
Hz) are not captured by EMTP when 𝛥𝑡 = 5 μs (blue
curve). Figure 7.c depicts the curves of voltage after the
re-energization of TL. The consistent results between
Modelica and EMTP are observed in this period once
more. The close-up view of the phase a voltage waveform
at the instant of closing the breakers BRm and BRk shows
that Modelica voltage waveform rises precisely at t = 450
ms while in EMTP it goes up in the next time point. The close-up illustrates the discontinuity treatment
discrepancies between the two simulators. This is an
0 100 200 300 400 500-1.5
-1
-0.5
0
0.5
1
1.5
300 302 304 306 308 310-0.1
-0.05
0
0.05
0.1
Vo
ltag
e (p
u)
450 460 470 480 490 500
-1
-0.5
0
0.5
1
445
Time (ms) (c)
EMTP, h:5us{
va vb{ vc}Dymola, Tol 1e-3
va vb vc}
EMTP, h:1us{ va vb vc}
{Dymola, Tol 1e-2 va vb vc}
Line_70_75 energizedFault duration
Line_70_75 disconnected
EMTP, h:1usDymola, Tol:1-3
306 306.5 307 307.5 308-0.01
0
0.01
0.02
0.03
EMTP, h:5us
Dymola, Tol:1-2 EMTP, h:1usDymola, Tol:1-3
EMTP, h:5us
(b)
(a)
phase b
phase c
450.01450 450.005
0
0.5
1
EMTP, h:5us
EMTP, h:1us
f =1820 Hz
450.001
Figure 7. (a): Voltage waveforms of phases a, b and c at the k-end of Line_70_75; (b): comparison of results for the phases b
and c for different solvers’ parameters. (c): voltage waveforms after re-energization of Line_70_75; the close-up at the instant
of closing the breakers BRk and BRm.
Current (A)
0 100 200 300 400 500 600 700 800 900 1000-200
0
200
400
EMTPModelica
0 20 40 60 80 100260
300
340
380
Magnetization data
Mag
neti
zin
g F
lux
(W
b)
Breakpoints
600
Figure 8. Current-Flux curve of magnetization branch in the LoadTransfo75 transformer; close-up of Modelica and EMTP
solutions near to the knee-point.
Electromagnetic Transient Simulation of Large Power Networks with Modelica
282 Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
DOI10.3384/ecp21181277
important issue for the simulation of circuits with high-
frequency switching.
For validating the accuracy of nonlinear components,
the magnetization branch curve of LoadTransfo75 (see
Figure 6.c) is examined in Figure 8. Once again, the
results obtained by the two models show an excellent
agreement and transformer operating points (depicted by
the red dashed line) move on the transformer current-flux
characteristics (distinguished by the solid red line). The
iterative solution allows reproducing the nonlinear
function accurately in both tools.
The number of nonlinear components and control
closed loops has a significant impact on the accuracy and
speed of simulation. For example, simulation of the same
network, that is IEEE 118-bus, jams in Simscape
Electrical Specialized Power Systems (SPS) package
(Simscape Electrical 2020) which is comparable to
Modelica environment in some ways. This package is
based on the state-space representation of the linear
network in a loop with external current sources denoting
the nonlinear components. In Modelica, nonlinear
functions are solved simultaneously through iterative
methods which gives the most accurate results.
Table 1 shows the data and run-times of simulations
carried out in Dymola and EMTP. The CPU times are extracted from the average of 5-times “re-simulations”. In
Dymola, simulation is accomplished with 203034 steps in
371.2 s, which yields 1.83 ms for each time step. EMTP
outperforms Dymola with the ratio of 3.37:1 when the
least error is favorite, i.e., 𝛥𝑡 = 1 μs. Tolerance has a significant impact on the CPU time and
the number of time steps for the DASSL since the local
error is tightly coupled with the logic for selecting the step
size and order of integration. In this experiment, the
simulation is repeated with the tolerance of 1e-2 as well.
It causes a considerable increase in the number of time
steps, Jacobian, and function evaluations. Consequently,
the CPU time increases with the ratio of 4:1, whereas the
accuracy of simulation does not change effectively (see
Figure 7.b). The norm of error between these two
simulations is reported 4.8e-3 for phase b. In both
tolerances, the results are practically identical to EMTP
when 𝛥𝑡 = 1 μs . However, it should be noted that the solution methods
in Modelica and EMTP are fundamentally different, and a
direct comparison of variable step solver with fixed-step
one is not so fair. The time steps selected in Table 1 are
for demonstration/comparison purposes; in reality, it is possible to select even higher time steps without
significant loss of accuracy.
0 100 200 300 400 500
Ter
min
al v
olta
ge (
kV)
0
20
10
-10
-20
Time (ms)
204200 201 202 2030
10
20
295 305 315 325-20-10
0
10
20 with saturationwith saturationwithout saturation
0 100 200 300 400 5000
10
20
30
40
50
Fie
ld C
urre
nt (
A)
50 70 90 100
10
20
30
40
150 170 190 2100
10
20
30
Time (ms)
with saturation
without saturation
without saturation
Three-phase fault
(a) (b)
EMTP Modelica }With saturation{ Modelica }EMTP Without saturation{
Figure 9. (a): Waveform of phase-a stator voltage of SM with and without saturation model; the close-up after load rejection. (b):
field current with and without saturation model; the zoomed views during and after fault.
Term
inal cu
rren
t (k
A)
0 100 200 300 400 500
-10
-5
0
5
10
EMTP with saturation
Modelica with Saturation
EMTP without saturation
Modelica without Saturation
Time (ms)
152 156 160 164 168
-2-10123
420 440 460 480 500-0.1
0
0.1without saturation
with saturation
without saturation
with saturationw/o sat
w. sat.
Figure 10. Phase-a stator current with and without saturation
model; zoomed view after removing the fault and load rejection.
Table 1. Case 1: comparison of simulation performance.
Characteristics Dymola EMTP Solver DASSL Trapezoidal /Backward Euler
Tolerance 1e-3 1e-2
∆𝑡: 1 𝜇𝑠 ∆𝑡: 5 𝜇𝑠 ∆𝑡: 10 𝜇𝑠 ∆𝑡𝑀𝐼𝑁 0.115 𝑓𝑠 0.116 𝑓𝑠
∆𝑡𝑀𝐴𝑋 5.79 𝜇𝑠 0.16 𝜇𝑠
No result points 203035 335261 601757 154367 81 661
No accepted steps 203034 335260 Not applicable
f-evaluations 415437 760052 Not applicable
J-evaluations 7393 337458 Not applicable
CPU time (s) 371.2 1510.6 110.1 44.2 23.5
CPU-time for 1
accepted steps 1.83 𝑚𝑠 4.49 𝑚𝑠 0.18 𝑚𝑠 0.28 𝑚𝑠 0.28 𝑚𝑠
Performance ratio 1 0.24 3.37 8.39 15.79
Session 4A: Applications (2)
DOI10.3384/ecp21181277
Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
283
3.2 Case 2: Analysis of Saturation in SM
To verify the validity of the SM model in the saturation
region, a large disturbance including a sudden three-phase
short-circuit fault is applied at t = 50 ms near to the
terminals of SM “Portsmth_Cond” and lasts till t =150
ms. The SM protective relays detect the fault and trip the
generator breaker at t = 200 ms. The parameters of both
solvers are the same as Case 1, e.g., Tol=1e-3 in Dymola
and 𝛥𝑡 = 5 μs in EMTP.
Figure 9.a shows the phase-a stator voltage waveforms
of the SM with and without magnetic saturation. As one
can see, the results obtained from Modelica model are
superimposed on EMTP ones. As time elapses, the
difference between the results obtained by saturated and
unsaturated models is more distinguishable on the voltage
curves.
Figure 9.b depicts the field current curves of the SM
with and without magnetic saturation. It is observed that
the inclusion of saturation has an important impact on the
excitation current needed for the generator operation.
Figure 10 illustrates the phase-a stator current graphs.
As one can see, Modelica model yields precisely the same
results as EMTP for both cases (with and without
saturation). The stator current considering magnetic
saturation is lower than without saturation. It is seen that
the effect of saturation on the current in the sub-transient
state is more than the transient state and the difference
decreases as time elapses.
3.3 Case 3: Lightning
In this case, it is assumed that a lightning strike with the
characteristics of 10kA, 8 /20 µs (see Appendix, equation
(22) for the impulse source model) hits the phase-a of
“Line_70_75” when the network is in steady state at t =
95 ms. The surge arresters (see Appendix, Table 3 for the
parameters) are located on the bus “SthPoint_138_075”,
the nearest place to the high-voltage side of the
transformer “LoadTransfo75” to protect it from transient overvoltages (see Figure 6.b). The simulation is run for
130 ms with the step sizes of 0.1 µs (depicted by black
curve) and 10 µs (depicted by red curve) in EMTP. Other
solvers parameters are like Case 1.
Figure 11 shows the phase-a voltage waveforms of the
arrester ZnO1. As one can see the results obtained from
Modelica arrester model are identical to EMTP when
𝛥𝑡 = 0.1 𝜇𝑠. A high frequency transient (1300 Hz) is
created due to the strike of lightning.
Table 2 compares the performances of simulations in
both tools. In Dymola, simulation is accomplished with
51513 steps in 87.2 s, which yields 1.69 ms for each time
step. In this case, Dymola outperforms EMTP’s best
result, that is when 𝛥𝑡 = 0.1 μs, with the ratio of 5.56:1.
This test case is designed to show the potential
advantages of variable time step solvers over fixed time
step ones (like EMTP). It is designed on the purpose to
illustrate the fact that a very smalltime step used for the
short duration of the very high transient has a penalizing
effect on EMTP, but not on Modelica solver. Modelica
integrator expectedly reverts to a very small time step only
for a short duration. It would have been possible to apply
lightning in EMTP at simulation time t = 0 s, and in which
case the performance results would have been much
better, nevertheless, our demonstration remains valid. A
more practical example is the breaker arc model that also
forces the usage of very small time steps and may be
triggered at any point of time. It will effectively give an
advantage to Modelica since in this case, it is required to
capture longer simulation periods.
Table 2. Case 3: comparison of simulation performance.
Characteristics Dymola EMTP
Solver DASSL Trapezoidal /BE
Tolerance 1e-3
∆𝑡: 0.1 𝜇𝑠 ∆𝑡: 10 𝜇𝑠 ∆𝑡𝑀𝐼𝑁 0.623 𝑝𝑠
∆𝑡𝑀𝐴𝑋 5.56 𝜇𝑠
No result points 51514 1335308 21637
No accepted steps 51513 Not applicable
f-evaluations 105576 Not applicable
J-evaluations 1503 Not applicable
CPU time (s) 87.2 485.6 9.9
CPU-time for 1 accepted steps 1.69 𝑚𝑠 0.36 𝑚𝑠 0.45 𝑚𝑠
Performance ratio 1 0.179 8.8
Conclusion
In this paper, Modelica programming language has been
considered for EMT simulations due to its advantages for
creating models at very high abstraction levels. In this
paper, we have emphasized the modeling of synchronous
machine including magnetic saturation and surge arrester.
These two nonlinear models are validated by comparisons
with EMTP in a large grid (IEEE 118-bus benchmark). It
is shown that high-level modeling in Modelica is very
accurate as compared to EMTP. However, the
performance is not satisfactory, except when variable time
step is used advantageously for very high-frequency
transients of short duration in a long simulation interval.
Nonetheless, in comparison with Simscape Electrical SPS
package, the Modelica package demonstrates an excellent
90 95 100 105 110 115 120 125 130-1
-0.5
0
0.5
1
1.5
Arr
est
er
Vo
ltag
e (
pu
)
95 96 97 98-1
-0.5
0
0.5
1
1.5f=1300 Hz
EMTP{ ModelicaΔt: 0.1µs, Δt: 10 µs}
Time (ms)
9896.4 96.8 97.2 97.6
0.2
0.4
0.6
0.81
Figure 11. Voltage waveform of surge arrester ZnO1 on the bus
SthPoint_138_075, DASLL solver: Tol=1e-3, EMTP solver:
Trapezoidal /BE with ∆t=0.1 μs and 10 μs.
Electromagnetic Transient Simulation of Large Power Networks with Modelica
284 Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
DOI10.3384/ecp21181277
performance in the EMT simulation of large-scale
networks composed of many nonlinearities.
The EMT-type package created by Modelica code is
user-friendly, modular, easily expandable, and
modifiable. It can be used for didactic purposes as well.
Furthermore, the EMT-type models can be used for model
exchange and co-simulation incorporating FMI.
This paper presents useful and practical information on
currently available capabilities with Modelica for EMT
simulation of large-scale grids. Future work will be
oriented toward performance improvements and the
inclusion of new models.
Acknowledgments
We would like to acknowledge the continuous support of
the R&D team of RTE in this research.
Appendix
Lightning is represented by an impulse current source
given by:
i(𝑡) = i𝑚[𝑒𝛼𝑡 − 𝑒𝛽𝑡] (22)
where i𝑚 = 24.9 [𝑘𝐴], 𝛼 = −55k [1/s] and 𝛽 = −175k [1/s].
Table 3. Exponential segments before flashover for ZnO1.
Multiplier p Exponent q 𝐕𝒎𝒊𝒏 (𝒑𝒖) 0.163113059479073E+02 0.240279296219978E+02 0.667857269772541E+00
0.134112947529269E+02 0.266219333383985E+02 0.107838745800672E+01
0.383838137212802E+02 0.200870413085749E+02 0.117458089341624E+01
0.115443146532003E+01 0.352906710089203E+02 0.125919561101624E+01
0.407093229412981E+03 0.111310570543275E+02 0.127478619617635E+01
0.256681175704043E+04 0.536270125014350E+01 0.137605475880033E+01
References
Bartolini, A., Casella, F., & Guironnet, A. (2019). “Towards
pan-European power grid modelling in Modelica: Design
principles and a prototype for a reference power system
library”. In 13th International Modelica Conference, vol.
157, pp. 627-636. Linkoping University Electronic Press.
Braun, W., Casella, F., & Bachmann, B. (2017). “Solving large-
scale Modelica models: new approaches and experimental
results using OpenModelica”. In 12 International Modelica
Conference pp. 557-563. Linkoping University Electronic
Press. DOI: 10.3384/ecp17132557.
Fritzson, Peter (2014). Principles of object-oriented modeling
and simulation with Modelica 3.3: a cyber-physical
approach. John Wiley & Sons.
Fritzson, P. et al. (2020), “The OpenModelica Integrated
Environment for Modeling, Simulation, and Model-Based
Development”. Modeling, Identification and Control, vol. 41,
no. 4, pp. 241–295, 2020. DOI: 10.4173/mic.2020.4.1.
Guironnet, A. et al. (2018). “Towards an Open-Source Solution
using Modelica for Time-Domain Simulation of Power
Systems”. In: 2018 IEEE PES Innovative Smart Grid
Technologies Conference Europe (ISGT-Europe), pp. 1–6.
Haddadi, A., & Mahseredjian, J. (2018). Power system test cases
for EMT-type simulation studies. CIGRE, Paris, France,
Tech. Rep. CIGRE WG C, 4, 1-142.
Henningsson, E., Olsson, H., & Vanfretti, L. (2019). “DAE
solvers for large-scale hybrid models.” In Proceedings of the
13th International Modelica Conference, Regensburg,
Germany, March 4–6, 2019, No. 157. Linköping University
Electronic Press. DOI: 10.3384/ecp19157491
Kocar, I. and J. Mahseredjian (2016). “Accurate Frequency
Dependent Cable Model for Electromagnetic Transients”. In:
IEEE Transactions on Power Delivery 31.3, pp. 1281–1288.
DOI: 10.1109/TPWRD.2015.2453335.
Kofman, Ernesto, Joaquín Fernández, and Denise Marzorati
(2021). “Compact sparse symbolic Jacobian computation in
large systems of ODEs”. In: Applied Mathematics and
Computation 403, p. 126181. DOI:
10.1016/j.amc.2021.12618.
Karaagac, U., Mahseredjian, J., & Saad, O. (2011). “An efficient
synchronous machine model for electromagnetic transients”.
In IEEE transactions on power delivery, 26(4), 2456-2465. DOI: 10.1109/TPWRD.2011.2159249.
Karaagac, U., Mahseredjian, J. and Martinez-Velasco, J. A.
(2017). “Synchronous machines,” in Chapter for Book
“Power System Transients: Parameter Determination. Boca
Raton, FL: CRC, 2009, ch. 5, pp.103–103.
Larsson, M. (2004). “ObjectStab-an educational tool for power
system stability studies”. In: IEEE Transactions on Power
Systems, vol. 19, no. 1, pp. 56-63, Feb. 2004. DOI:
10.1109/TPWRS.2003.821001
Lemaitre, C. and P. Panciatici (2014). “iTesla: Innovative tools
for electrical system security within large areas”. In: 2014
IEEE PES General Meeting Conference Exposition, pp. 1–2.
DOI: 10.1109/PESGM.2014.6939447.
Mahseredjian, J., S. Dennetière, et al. (2007). “On a new
approach for the simulation of transients in power systems”.
In: Electric Power Systems Research 77.11. Selected Topics
in Power System Transients - Part II, pp. 1514–1520. ISSN:
0378-7796. DOI: 10.1016/j.epsr.2006.08.027.
Mahseredjian, J., V. Dinavahi, and J. A. Martinez (2009).
“Simulation Tools for Electromagnetic Transients in Power
Systems: Overview and Challenges”. In: IEEE Transactions
on Power Delivery 24.3, pp. 1657–1669. DOI:
10.1109/TPWRD.2008.2008480.
Masoom, Alireza et al. (2020). “Simulation of electromagnetic
transients with Modelica, accuracy and performance
assessment for transmission line models”. In: Electric Power
Systems Research 189, p. 106799. DOI:
10.1016/j.epsr.2020.106799.
Masoom, Alireza et al. (2021). “Modelica-based Simulation of
Electromagnetic Transients Using Dynaωo: Current Status
and Perspectives”. In: Electric Power Systems Research 197,
107340. DOI: 10.1016/j.epsr.2021.107340.
Petzold, L. R. (1982). Description of DASSL: a
differential/algebraic system solver (No. SAND-82-8637;
CONF-820810-21). Sandia National Labs., Livermore, CA
(USA).
Sana, A. R., Mahseredjian, J. et al. (1995). “Treatment of
discontinuities in time-domain simulation of switched
networks”. In Mathematics and Computers in Simulation,
vol. 38, pp. 377-387. DOI: 10.1016/0378-4754(95)00047-2.
Simscape Electrical (2020), Specialized Power Systems User's
Guide Release 2020b, Hydro-Quebec and Math Works, Sep.
2020.
Vanfretti, L., Rabuzin, T., Baudette, M., & Murad, M. (2016).
“iTesla Power Systems Library (iPSL): A Modelica library
for phasor time-domain simulations”. In: SoftwareX, vol: 5,
pp. 84-88. DOI: 10.1016/j.softx.2016.05.001.
Session 4A: Applications (2)
DOI10.3384/ecp21181277
Proceedings of the 14th International Modelica ConferenceSeptember 20-24, 2021, Linköping, Sweden
285