Circuit-Based Electromagnetic Transient Simulation
Circuit-Based Electromagnetic Transient Simulation
Systems
Circuit-Based Electromagnetic
Transient Simulation
Suggested Citation: Amritanshu Pandey (2023), “Circuit-Based Electromagnetic Tran-
sient Simulation”, Foundations and Trends® in Electric Energy Systems: Vol. 6, No. 2,
pp 83–118. DOI: 10.1561/3100000038.
Amritanshu Pandey
University of Vermont
[email protected]
This article may be used only for the purpose of research, teaching,
and/or private study. Commercial use or systematic downloading
(by robots or other automatic processes) is prohibited without ex-
plicit Publisher approval.
Boston — Delft
Contents
Introduction 84
Notation 114
Acknowledgments 116
References 117
Circuit-Based Electromagnetic
Transient Simulation
Amritanshu Pandey
University of Vermont, USA; [email protected]
ABSTRACT
The growing penetration of inverter-based resources and as-
sociated controls necessitates system-wide electromagnetic
transient (EMT) analyses. EMT tools and methods today
were not designed for the scale of these analyses. In light
of the emerging need, there is a great deal of interest in
developing new techniques for fast and accurate EMT simu-
lations for large power grids; the foundations of which will
be built on current tools and methods. However, we find
that educational texts covering the fundamentals and inner
workings of current EMT tools are limited. As such, there
is a lack of introductory material for students and profes-
sionals interested in researching the field. To that end, in
this tutorial, we introduce the principles of EMT analyses
from the circuit-theoretic viewpoint, mimicking how time-
domain analyses are performed in circuit simulation tools
like SPICE and Cadence. We perform EMT simulations for
two examples, one linear and one nonlinear, including in-
duction motor (IM) from the first principles. We anticipate
that by the end of this monograph, the readers will have a
basic understanding of how power grid EMT tools work.
84
85
We will use an equivalent circuit framework [7], [8] for power grids to
develop EMT models for two simple toy networks. These toy examples
are based on a simple 2-bus three-phase power network with different
load configurations. We consider the following load scenarios:
86
87
Two of these three components (infinite bus and transmission line) are
shared across the two examples. Therefore, we begin with them. The
infinite bus is trivial to model as a circuit element. It is simply an
ideal voltage source with a known magnitude and phase angle. Further,
the frequency of this source is assumed to be either 60 Hz or 50 Hz
depending on the system. For a three-phase network, the infinite bus is
modeled by a set of three independent voltage sources (offset by 120◦ )
connected in a wye formation. The network with an infinite bus replaced
with circuit elements is shown in Figure 1.2. The transmission line model
with R and L values already represents a set of circuit elements and
does not require translation. Note that this model of the transmission
line is greatly simplified to improve the readability of this tutorial.
A more detailed model (see [3]), at a minimum, should include shunt
capacitances and mutual impedances. Longer lines should use lumped
models. Still, the readers will learn to model mutual impedances while
developing the EMT model for an induction motor.
The last step is to convert the load component in Figure 1.2 into
an equivalent circuit before getting started with EMT-related steps.
Loads in power systems correspond to various devices ranging from
large induction motors to resistive heating loads. We will translate the
two load models into equivalent circuits in their respective subsections.
(3) Third, if the network is linear, the final solution for each time
instance is obtained via a recursive linear solve of the algebraic
equations for each time-tick.
Note that the equations for subsequent time steps are coupled
through terms obtained from numerical integration. So currents at
t = n + 1 will be functions of currents at t = n. We will see this in more
detail while constructing the companion models for various memory
elements. Also, note that linear equations are recursively solved to
traverse through simulation time by choosing a time-step (∆t). The
value of this time step depends on the local truncation error (LTE).
More details on the calculation of LTE can be found in [9]. The general
idea is to maintain a sufficient tradeoff between simulation speed (by
taking larger time steps) and accuracy (by taking smaller time steps).
Now we will learn how to solve the EMT problem from the viewpoint
of the equivalent circuit approach (ECA). To obtain the time-domain re-
sponse of the network with ECA, we apply two (2) circuit-simulation
tricks to enable efficient construction of the linearized nodal equations
(Yt Vt − Jt = 0) for each time step (t) in the transient simulation.
First, rather than defining the ordinary differential equation (ODE)
that captures the KCL constraint (sum of currents) at each node, we
construct specialized symbolic stamps for each component in the network
(e.g., resistance, inductance, etc.). Note that a stamp(s) here refers to
term(s) that are to be added to the solution matrix. We use these stamps
to implicitly construct the system matrix at each time tick. To do so, we
parse through each circuit element in the network (for each time tick),
and we add the stamps corresponding to this element in the solution
matrix. Once completed, the matrix (completed by adding stamps from
each component) will be equivalent to if we constructed the matrix by
adding linearized nodal equations in each row. In this approach, rather
than arduously constructing nodal equations for each node (imagine
a circuit with million nodes), we only have to symbolically construct
stamps for the number of types of circuit elements. Once that is done,
all we need to do is add the stamps for each circuit element into the
solution matrix.
90 Equivalent Circuit Approach for EMT Simulations
(2) Develop a specialized stamp for each element in the circuit (with
derivative elements replaced by their companion circuits).
Figure 1.6: Resistance stamps in the nodal matrix. Redrawn from CMU, ECE,
18-762 notes [9].
whereas the Ytlin , remain fixed. Because this circuit is linear, we do not
have Ytnlin .
Figure 1.7: Independent current source stamps in J vector. Redrawn from Pileggi,
CMU 18-762 notes [9].
Vm − Vn = VS (1.6)
Figure 1.8: Independent voltage source stamps. Redrawn from Pileggi, CMU- 18-762
notes [9].
in Figure 1.3 for each time tn+1 . To obtain the time-domain response
of the network, the set of linearized equations is recursively solved with
a sparse matrix solver (using LU factorization). Note that to obtain
the network’s response at time t = 0+ , we require the network states at
time tn = 0. For this particular network, these are needed to initiate the
terms in inductor stamps dependent on the prior time step. Not just
that, it also helps dictate the system state at which the time-domain
response begins.
1.1.6 Initialization
We can initialize the linear circuit through AC or DC analysis. In DC
analysis, we replace the sinusoidal voltage sources with DC voltage
sources. In AC analysis, we convert the inductors to an impedance at a
single frequency.
Here we will describe the DC analysis approach to initialization. Let
us assume the network is in the DC state between t = −∞ and t = 0.
At t = 0, it switches to the AC sinusoidal source, and let us assume the
switching is smooth (i.e., DC voltage and AC voltage at time t = 0 are
identical). To know the initial states of the circuit at t = 0, we perform
DC analysis, wherein the following condition holds true for memory
elements (inductors and capacitors):
di
L = 0 @DC (1.7)
dt
dv
C = 0 @DC (1.8)
dt
From these conditions in (1.7) and (1.8), we can infer that during the
DC state, the inductor LDC is short-circuited (VL = 0) and the capacitor
96 Equivalent Circuit Approach for EMT Simulations
Figure 1.9: Corresponding equivalent circuit during DC state. Note that the
sinusoidal voltage sources are set to a fixed DC value in the case of DC analysis.
Figure 1.12: 2-bus network with induction motor load after dq transformation.
The transformed Figure 1.12 has three components: (i) the infinite
bus represented by a set of wye-connected independent voltage sources,
(ii) the transmission line represented by a series RL circuit, and (iii) an
IM. We have already discussed the construction of stamps and compan-
ion circuits for infinite bus and transmission line elements (reiterating
that in this tutorial the transmission line model is greatly simplified,
see [3] for detailed models like pi model and Bergeron model). Now, we
will learn how to represent the IM physics with an equivalent circuit.
We will also learn how to replace the time derivative terms in the IM
equivalent circuit with an analogous companion circuit.
The generalized equations that represent the electrical component
of IM physics, independent of the reference frame choice in dq transfor-
mation, are expressed via the following KVL equations [5]:
In the expressions above, Lls and Llr represent the leakage induc-
tance of the stator circuit and rotor circuit, respectively. Lm is the
mutual inductance between the rotor and stator circuits. Rs and Rr
are the stator and rotor resistance, respectively. ψ represents the flux
component across each electrical sub-circuit. The nonlinearity in the
electrical part of the IM is due to the speed voltage terms (ψqr ωr , ψdr ωr ).
In addition to the IM electrical part equations in (1.12)–(1.19), the
mechanical IM part is represented by a single differential equation, the
swing equation (1.20):
(TE − TL − Dωr )
pωr = (1.20)
J
where, electrical torque TE is further described by interactions between
the IM currents in the electrical sub-circuit, which also introduces
nonlinearities in the IM model:
3
TE = Lm Np (Idr Iqs − Iqr Ids ) (1.21)
4
TE , the electrical torque, is given in N.m and J, the motor net inertia,
in kg · m2 . Np is the number of poles in the IM. The load torque TL is
generally represented as a polynomial function of rotor speed.
We can further simplify the electrical components’ expressions be-
cause we use the stationary reference frame for dq transformation. In
the stationary reference, θ = 0, β = −θr and pβ = −ωr . Furthermore,
pθ = ωs = 0. With these simplifications and reducing the expressions
in (1.12)–(1.19), the following form for the IM’s electrical part, in the
1.2. Induction Motor Load 101
where,
Ls = Lls + Lm (1.26)
Lr = Llr + Lm (1.27)
Vdr = 0 (1.28)
Vqr = 0 (1.29)
Note that the rotor windings are shorted in most IM designs, and hence
voltages Vdr and Vqr are set to 0.
Now to construct the equivalent circuit for the IM model, we map
the four KVL expressions in (1.22)–(1.25) and one KCL expression in
(1.20) to Figure 1.13.
One can observe in Figure 1.13 that aside from self-inductance (Ls
and Lr ), the IM equivalent circuit also includes time-derivative terms
˙ ω̇r ) for mutual inductance (Lm ) and rotor speed (ωr ).
(given by p or I/
We have previously learned how to approximate time-derivative terms
for self-inductance by constructing and stamping the corresponding
companion circuits. Here, we will derive the companion circuits for
combined self and mutual inductance elements (see blue elements in
Figure 1.14). We will use a simple two-coil example in Figure 1.15 to
develop the companion circuit for combined self- and mutual inductance.
Later in the section, we will learn how to construct the companion circuit
for time-derivative terms corresponding to rotor speed. We will finish
by discussing how the nonlinear elements in the IM equivalent circuit
are handled and subsequently added to the system matrix.
We construct the companion circuit for combined self and mutual
inductances to approximate its time-derivative behavior by a set of
algebraic equations. This way, we can approximately solve a set of
102 Equivalent Circuit Approach for EMT Simulations
the sum of the following difference equations, which are purely algebraic
terms:
2L1
V11 (tn+1 ) = (I1 (tn+1 ) − I1 (tn )) − V11 (tn ) (1.31)
∆t
2L12
V12 (tn+1 ) = (I2 (tn+1 ) − I2 (tn )) − V12 (tn ) (1.32)
∆t
104 Equivalent Circuit Approach for EMT Simulations
Therefore the total voltage induced in coil 1 (V1 (t) = V11 (t) + V12 (t)) is
given by:
2L1 2L12
V1 (tn+1 ) = (I1 (tn+1 ) − I1 (tn )) − V11 (tn ) + (I2 (tn+1 ) − I2 (tn )) − V12 (tn )
∆t ∆t
(1.33)
and after re-arranging the terms:
2L1 2L12 2L1 2L12
V1 (tn+1 ) = I1 (tn+1 ) + I2 (tn+1 ) − I1 (tn ) + I2 (tn ) + V12 (tn ) + V11 (tn )
∆t ∆t ∆t ∆t
(1.34)
The voltage at time tn+1 across the coil 1 is approximated using
(1.34) and is represented as an equivalent circuit in Figure 1.16. The
third term is only dependent on the historical values of the variables and
can be represented by an independent voltage source V1hist . Similarly, a
resistance REQ represents first term as it maps the linear relationship
between the voltage and current across the same branch and a current
controlled voltage source represents the second term, as it maps the
voltage contribution due to current in the second coil.
By replacing the time-derivative terms for self- and mutual-inductance
with the corresponding companion circuits in Figure 1.16, we can solve
the set of ODEs corresponding to the electrical part of IM, recursively
over time. But before, we must learn how to address the time-derivative
term in the mechanical part of the IM model. The variables in the
mechanical part impact the electrical part and vice-versa. Therefore
we need to solve the mechanical part concurrently with the electrical
portion of IM. The approach for solving the mechanical part is trivial.
On close observation, one can see the mechanical circuit of the IM is
analogous to a parallel RC electrical circuit with current sources, where
inertia J is analogous to capacitance C, TL is analogous to a constant
current source I, D is analogous to a conductance G, TE is analogous
1.2. Induction Motor Load 105
Figure 1.17: Capacitor trapezoidal companion circuit. Redrawn from Pileggi, 18-762
notes [9].
where:
Figure 1.18: Off-diagonal entries for modeling CCVS in IM’s Fqr electrical sub-
circuit.
Figure 1.19: Stamps for CCCS. Reconstructed from Pileggi, Carnegie Mellon ECE
18-762 notes [9].
Figure 1.20: Stamps for VCVS. Reconstructed from Pileggi, Carnegie Mellon ECE
18-762 notes [9].
With this approach, we only add five new variables and corresponding
rows for each instance of IM (instead of ∼20). The variables are Ids ,
Iqs , Idr , Iqr , and ωr .
Recall that before stamping the terms into the system matrix Y , we
have to perform two steps. First, we will replace the circuit elements
with time-derivative terms with corresponding equivalent companion
circuits. Second, we will replace the circuits with nonlinear terms with
their linearized approximation as shown for Fqr in (1.42). For instance,
the nonlinear symbolic stamps for Fqr loop constraint in (1.25) is added
to the Y matrix as shown in Figure 1.21.
Next, to obtain the transient response of the nonlinear IM network,
we will recursively solve the system matrix Y over time, and we will
perform iterations to solve the nonlinear terms. We will update the
linearized terms in each iteration. We will update the terms in companion
circuits only when we recursively move forward in time.
1.2. Induction Motor Load 111
1.2.4 Initialization
Next, we discuss how to initialize the IM network. In general, many
approaches are available to initialize the network and we will discuss
one such approach.
Remember because of dq-transformation on IM variables, two sub-
circuits evolve (see left and right of Figure 1.12). The sub-circuit on
the left without the IM equations is a linear circuit. AC analysis can be
used to obtain the initial condition for these, assuming a rated complex
current draw by IM (which models the Ia , Ib , and Ic in Figure 1.12).
A good guess for a complex current draw by IM can be obtained by
running power flow with IM modeled as a PQ load and calculating
the current from the solution (I = SIM ∗ /V ∗ ). Initialization of the IM
IM
components requires handling the nonlinearities due to speed-flux terms.
With the proper choice of the reference frame in dq-transformation,
time-invariant voltage sources (Vds and Vqs are constants) across the
IM can be obtained. We can then use DC analysis to obtain the initial
conditions for the IM circuit. The Vds , and Vqs voltages are DC-values
in the rotating reference frame. We can short the inductor and open
the capacitors to obtain the steady-state initial conditions with the
source voltages as DC values. The rated voltage at the IM terminals
for dq-transformation can be obtained from the power flow solution
VIM . In reality, with a slightly more involved procedure, we can get
exact initial conditions for the IM circuit by solving a set of nonlinear
equations representing the overall circuit iteratively using NR.
Generally, one must note that initializing large complex EMT net-
works is not trivial, and many commercial tool manuals [10], book
chapters [9], and research papers are devoted to the study of efficiently
initializing the network. In power systems, a common practice is to run
112 Equivalent Circuit Approach for EMT Simulations
load flow and then map the load flow solution from the positive sequence
frequency domain to three time-domain to initialize large power grid
EMT networks. However, with emerging inverter-based resources, this
approach may no longer work.
113
Notation
Parameters Description
DQ Transformation
114
115
Parameters Description
Tim McNamara and Naeem Turner-Bandele have both TA’ed the course
where this material was taught and they have spent a significant amount
of time ensuring that the derivations and explanations in this monograph
are precise and accurate. Tim also provided valuable feedback on the
structure and content. I also want to acknowledge my Ph.D. advisor
Larry Pileggi whose book, lecture slides, and guidance were critical in
compiling this monograph.
116
References
117
118 References