Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Adaptive time integration

for electromagnetic models


with sinusoidal excitation
Galina Benderskaya
CST GmbH, Darmstadt, Germany
Herbert De Gersem
Katholieke Universiteit Leuven, Kortrijk, Belgium, and
Wolfgang Ackermann and Thomas Weiland
Technische Universita t Darmstadt,
Institut fu r Theorie Elektromagnetischer Felder, Darmstadt, Germany
Abstract
Purpose To provide a reliable numerical technique for the time integration of the electromagnetic
models with sinusoidal excitation.
Design/methodology/approach The numerical integration of an electrotechnical problem is
commonly carried out using adaptive time stepping. For one particular selected time step,
Runge-Kutta (RK) adaptive integration methods deliver two approximations to the solution with
different order of approximation. The difference between both is used to estimate the local error.
Findings Standard error-controlled RK time integration fails for electromagnetic problems with
sinusoidal excitation when the adaptive time step selection relies upon the comparison of a main
solution and an embedded solution where the difference of orders is one. This problem is overcome
when the embedded solution differs by two orders of approximations. Such embedded solution is
efciently constructed by putting appropriate order conditions on the coefcients of the Butcher table.
Originality/value Using the technique proposed in the paper, electromagnetic problems with
sinusoidal dynamics can also be effectively tackled.
Keywords Electromagnetism, Magnetic devices, Time study
Paper type Research paper
1. Introduction
The numerical integration of an electrotechnical problem is commonly carried out
using adaptive time stepping. This technique allows to reduce the computational time
considerably guaranteeing at the same time the achievement of a user-prescribed
tolerance for the local error (Gustafsson, 1994; Hairer et al., 1993; Hundsdorfer and
Vewer, 2003; Soderlind, 2002). Adaptive time integration based on Runge-Kutta (RK)
methods is a well developed and widely highlighted research subject (Gustafsson,
1994, Hairer et al., 1993, Hundsdorfer and Vewer, 2003; Soderlind, 2002). These
adaptive methods have been shown to be reliable and efcient also for very large
practical problems. For one particular selected time step, RK adaptive integration
methods deliver two approximations to the solution with different order of
approximation. The difference between both is used to estimate the local error
(Hairer et al., 1993).
The current issue and full text archive of this journal is available at
www.emeraldinsight.com/0332-1649.htm
COMPEL
27,1
122
COMPEL: The International Journal
for Computation and Mathematics in
Electrical and Electronic Engineering
Vol. 27 No. 1, 2008
pp. 122-132
qEmerald Group Publishing Limited
0332-1649
DOI 10.1108/03321640810836690
For some types of problems, the adaptive schemes commonly proposed in the
literature deliver rather surprising results: namely, at time spans, where obviously the
step size should be signicantly reduced, it is increased. When one would expect an
increase of the step size, it appears to be reduced.
One of the test examples given below is a plate capacitor, one plate of which is
supplied with the voltage V
1
(t) = 100 V sin(2pft), f = 50 Hz, whereas the other plate is
grounded (Figure 1). A suitable mathematical model for this example is the
electroquasistatic formulation
7

t
(17w) -s7w

= 0 (1)
given in terms of the electric scalar potential w, the conductivity s and the permittivity
1 which is further discretized by the nite integration technique (Clemens et al., 2004).
A transient simulation is carried out by a Singly Diagonally Implicit Runge-Kutta
(SDIRK) method delivering the main solution of order three and the embedded solution
of order two (Cameron, 1999). The solution for one degree of freedom as well as the
corresponding dynamics of the step size selection are shown in Figure 2. At time
instants
t =
1
4f

-
1
2f

n; n e N
the excitation signal reaches an extremal value and exhibits a rather fast change.
Though, the time step prediction increases the time step length. A similar behavior was
observed for other RK adaptive methods.
Figure 1.
Electroquasistatic model:
plate capacitor
V
1
(t)
Adaptive time
integration
123
A dedicated study was carried out to get more insight into the behavior of adaptive
time integration schemes. The results show that the described phenomena take place
when sinusoidal/cosinusoidal functions or their modications are integrated. Our only
nding in the literature that concerns this phenomenon was given in Wang et al. (2001):
However, in the case of sine and cosine drives . . . the xed-time approach will be more
efcient . . .
Sinusoidal excitations are of primordial importance for transient simulations of
electromagnetic devices. This paper is dedicated to the analysis of the unexpected
behavior described above and to the development of a class of adaptive time
integration scheme combined with a reliable time step prediction approach.
2. Adaptive RK methods
2.1 Index of a differential-algebraic equation
The most general form of a differential-algebraic equation (DAE) is given by
F(t; x; x
/
) = 0 (2)
where the Jacobian matrix F/x
/
may be singular. For system (2), the index along a
solution x(t) is the minimum number of differentiations of the system which would be
required to solve for x
/
uniquely in terms of x and t (i.e. to dene an ordinary
differential equation (ODE) for x). Thus, the index is dened with a help of the
overdetermined system
F(t; x; x
/
) = 0
dF
dt
(t; x; x
/
; x
//
) = 0
.
.
.
d
m
F
dt
m
(t; x; x
/
; . . . ; x
m-1
) = 0
(3)
as the smallest integer m so that x
/
in equation (3) can be solved for in terms of x and t.
In practical applications, differentiations of the system (2) as in equation (3) are
never computed. However, the notion of an index of a DAE is fundamental since it
plays a crucial role in selecting an appropriate time integrator.
Figure 2.
Simulation results for
SDIRK 3(2): (a) voltage
distribution for one of the
degrees of freedom;
(b) selected time steps
100
0
2.2
10
3
1.8
0.2
1
100
0 0.01 0.02
(a) (b)
0.03 0.04
t /s
t /s
0 0.01 0.02 0.03 0.04
t /s
j/V
COMPEL
27,1
124
2.2 DAEs of index 1
Electroquasistatic and magnetoquasistatic formulations applied to a eld model which
may be accomplished by a circuit lead to constant coefcient DAEs of the form
M
d
dt
x(t) -Kx(t) = r(t) (4)
where M and K are coefcient matrices, r is a right hand side vector, x is a vector of
unknowns (Nicolet and Delince 1996; Benderskaya et al., 2004). Time integrators for
such systems cover a substantial part of the joint research on numerical time
integration.
2.3 Classical time integration methods
The u-type discretization scheme, which is traditionally applied to solve equation (4),
reads:
1
Dt
M(x
n-1
2x
n
) -K(ux
n-1
- (1 2u)x
n
) = ur
n-1
- (1 2u)r
n
: (5)
The lower indices n and n - 1 correspond to the time instants t
n
and t
n-1
= t
n
- Dt,
respectively. Different choices of the parameter u lead to the following classical
methods of numerical integration: u = 1 gives the implicit Euler method, u = 1/2 gives
the Crank-Nicolson method, u = 2/3 gives the Galerkin method.
Although system (4) looks like a regular ODE system, in magnetoquasistatic
formulations the M matrix may be singular turning equation (4) into a DAE
formulation. In Benderskaya et al. (2004), it is shown that some of the classical u-type
methods suffer from stability problems when they are applied for the numerical
treatment of the DAE formulations of form (4). It was also proposed to use implicit
adaptive RK time-integration methods for simulating such electromagnetic problems.
2.4 Implicit RK methods
Using the initial condition x
0
at t
0
, the ith stage of a time step of an implicit RK method
is dened by
X
i
= x
0
-Dt

s
j=1
a
ij
X
/
j
: (6)
The RK method follows from substituting X
i
for x and X
/
i
for x
/
into system (4) for all
stages i = 1, . . . ,s. The solution of the corresponding system of equations leads to the
stage derivatives X
/
i
which are then inserted in
x
1
= x
0
-Dt

s
i=1
b
i
X
/
i
(7)
to obtain the solution at the next time instant. For each RK method, the coefcient
matrix A as well as the weight vector b are given by the Butcher table (Hairer et al.,
1993).
The order of the RK method is the real number p for which the Taylor series for
the exact solution x(t
0
- Dt) and the approximate solution x
1
coincide up to
Adaptive time
integration
125
(and including) the term Dt
p
, i.e.:
x(t
0
-Dt) 2x
1 L L # KDt
p-1
(8)
where Dt is a time step and K is some constant (Hairer et al., 1993). For an RK method
to be of one particular order, its coefcients have to satisfy so-called order conditions.
The number of the order conditions to be put on the coefcients of the Butcher table to
attain an RK-type integration scheme increases signicantly with the required order
(Table I) (Hairer et al., 1993).
2.5 Adaptive RK methods
Together, with the solution x
( p)
of order p delivered by a weight vector b, an embedded
solution x
(
^
p)
of a lower order p

is obtained by the application of an additional weight


vector b

. This allows to construct an error vector


y = x
( p)
2x
(
^
p)
(9)
which can be used for the adaptive determination of the time step length.
A suitable norm for measuring the error vector reads:
y L L
err
=
i
max
y
i

x
( p)
i
-1
( p)
x;i

; (10)
where 1
( p)
x;i
is an absolute error tolerance for the component x
( p)
i
(Benderskaya et al.,
2005). The DAE system (4) may describe a coupled formulation incorporating variables
having different physical nature which have, consequently, different units. Therefore,
it makes sense to choose different absolute tolerances for each solution component:
1
( p)
x;i
:= h
te[t
0
;t
i
]
max x
( p)
i
(t)


(11)
where he [10
22
, 10
21
]. The introduction of the absolute tolerances takes the history of
the integration process into account. This leads to the more effective realization of the
adaptive time stepping scheme.
The adaptive time stepping scheme comprises criteria allowing to decide whether
the last calculated integration step has to be repeated or a new simulation step can be
performed. According to the standard rule aiming at keeping the error estimate LyL
err
close to the user-specied tolerance 1
tol
, the solution is rejected if LyL
err
. m1
tol
holds
true and a new attempt is made with a smaller step size; otherwise the time step is
accepted. In this scheme, m is an accelerating factor usually taken as 1.2 (Gustafsson,
1994).
Order p 1 2 3 4 5 6 7 8 9 10
Order conditions 1 2 4 8 17 37 85 200 486 1,205
Number of order conditions for RK methods Table I.
COMPEL
27,1
126
Finally, the length of a next time step is calculated using a formula
Dt
n-1
= r
1
tol
LyL
err

1=(
^
p-1)
Dt
n
(12)
where r denotes a safety factor that is usually set to 0.9 (Lang, 1995).
3. Dedicated RK methods
To our knowledge, all adaptive RK methods developed and implemented up to the
present have in common that the difference between the order of the main solution and
the order of the embedded solution is equal to one, e.g. SDIRK 3(2) method (Cameron,
1999), Merson 5(4), Zonneveld 4(3) (Hairer et al., 1993). All of them are reported to
perform in an effective and reliable way without any exceptions. For problems with
sinusoidal dynamics this is, however, not the case as explained below.
The Taylor expansion of a sinusoidal function indicates the reason for the failure
mentioned in the introduction:
sin(vt) = sin(vt
0
) - cos(vt
0
)[v(t 2t
0
)] - -
sin
(n)
(vt
0
)
n!
[v(t 2t
0
)]
n
- R
n-1
(vt)
(13)
where R
(n-1)
(vt) is the reminder. From equation (13) it follows that, e.g. at the point
vt
0
= p/2 the expansion of the function of third order coincides with the expansion of
second order. For common adaptive time integrators implemented, e.g. with SDIRK
3(2), this means that at this very point or in its vicinity no or a negligible difference
between the lower and the higher order solutions is detected. As a consequence, the
integration will proceed with an enormously large time step.
This problem can be successfully overcome by constructing the RK methods where
the difference between the main and the embedded orders is more than one.
This technique is implemented for the SDIRK 3(2) method (Cameron, 1999) with the
A matrix:
1 2

=2 0 0 0

=2 1 2

=2 0 0
5 23

26 1 2

=2 0

=3 - 1=6

=6 21=3 1=6 1 2

=2

: (14)
The fourth and the second rows of the matrix are used as weight vectors to construct a
main and an embedded solution of order three and two, respectively. The abscissa
vector c is dened as:
c
i
=

i
j=1
a
ij
; i; j = 1; . . .4:
To obtain a weight vector delivering a rst order embedded solution, only one order
condition on the coefcients of the weight vector
Adaptive time
integration
127
~
b 5[
~
b
j
]; j = 1; . . . ; 4
has to be satised (Table I) (Hairer et al., 1993):

s
j=1
~
b
j
= 1: (15)
From Table I one can observe that two order conditions should be applied to obtain a
second order RK method. The rst one is condition (15) guaranteeing a rst order RK
method. Another order condition is

s
j=1
~
b
j
c
j
=
1
2
: (16)
Conditions (15) and (16) together allow to describe all the variety of possible RK
methods of order 2.
Now, we turn back again to our technique. Condition (15) allows us to obtain an RK
method of the rst order. However, to be sure that a weight vector delivering a second
order solution will not be obtained by accident, the following inequality has hold as
well:

s
j=1
~
b
j
c
j

1
2
: (17)
Solving together an algebraic system consisting of the equation (15) and inequality
(17), the following family of the weight vectors delivering a rst order solution is
obtained:
~
b
1
= a
~
b
3
= b

21
22

a
~
b
4
= g
~
b
2
= 1 2a 2b 2g 1 2a 2

21
22

a 2g

where a, b, g are parameters.


4. Simulation results
The already introduced test example shown in Figure 1 is simulated again with SDIRK
method having matrix A given by equation (14) and using an embedded solution of
order one instead of order two, i.e. SDIRK 3(1). The corresponding weight vector b

is
calculated using the technique proposed above and reads
~
b =
1
2
1
8
1
4
1
8

T
:
COMPEL
27,1
128
The solution of the higher order is delivered with the vector b which is equal to the
fourth row of matrix A given by equation (14).
From the results in Figure 3 one can conclude that the time marching process is now
adequate: at the time instants
t =
1
4f
-
1
2f
n; n e N
and in their vicinity very small time steps are performed. The asymmetry of the time
step selection dynamics (Figure 3(b)) is explained by the fact that the adaptive time
stepping scheme needs a certain time to recognize the behavior of the transient process
and also due to the limits put on the length of the time step.
Figure 4 shows the magnitude of the local error, i.e. the difference between the
higher and lower order solutions for one selected degree of freedom in case when the
simulation is carried out with SDIRK 3(2) method (Figure 4(a)) and with SDIRK 3(1)
method (Figure 4(b)). As one can conclude from the results, the SDIRK 3(1) method
detects the highest value for the error at the time points
t =
1
4f
-
1
2f
n; n e N
Figure 3.
Simulation results for
SDIRK 3(1): (a) voltage
distribution for one of the
degrees of freedom;
(b) selected time steps
100
0
100
j/V
0 0.01 0.02
(a) (b)
0.03 0.04
t /s
0 0.01 0.02 0.03 0.04
t /s
10
10
4
8
6
4
2
t /s
Figure 4.
Magnitude of the local
error: (a) simulation with
SDIRK 3(2) method;
(b) simulation with SDIRK
3(1) method
0
0.06
0.04
yi
0.02
0
0.18
0.12
yi
0.06
0
0.01 0.02
(a) (b)
0.03 0.04
t /s
0 0.01 0.02 0.03 0.04
t /s
Adaptive time
integration
129
and in their vicinity. The SDIRK 3(2) method, however, does not exhibit an adequate
behavior for this case.
With the user prescribed tolerance 1
tol
put to 10
23
, the total number of time steps
for SDIRK 3(2) method is 64, of which 17 steps are rejected. For SDIRK 3(1) 91 steps are
computed, but only six are rejected in case when 1
tol
is equal to 10
22
. This allows to
conclude, that in spite of the increase in the total number of time steps, the SDIRK 3(1)
method is more suitable for the simulations of models with sinusoidal excitation. The
usage of the bigger tolerance 1
tol
= 10
22
in the simulation with SDIRK 3(1) follows
from the necessity to avoid extremely small time steps since the magnitude of the error
(Figure 4), and since the value of LyL
err
, increase signicantly leading to the decrease of
Dt
n-1
(as in formula (12)).
As a second test example consider an electrical circuit shown in Figure 5 where the
resonance frequency is determined by the system itself and not by the excitation. The
following parameters are used in the simulation: u(t) = U(1 2 e
2t/t
), where U = 1 V
and t = 0.1 ms. The switch is initially closed and is opened at t
switch
= 5 s. The
parameters of the circuit elements are as follows: L = 1 mH, C = 10 mF and R = 1 mV.
The time span corresponding to the closed switch is simulated with a SDIRK
method having matrix A given by equation (14) and using an embedded method of
order two specied by the last row of matrix A. With the user specied tolerance 1
tol
put to 10
23
, the number of the accepted and rejected steps is 30 and 2, respectively. The
simulation results are shown in Figure 6(a). After 5 s, the switch is opened, and the
simulation is continued with the SDIRK 3(1) method, vector b

being the same as the


one we used in the rst test example. The obtained simulated current in the inductor is
shown in Figure 6(b). For this part of the simulation, 1
tol
is equal to 10
22
and the
number of the accepted/rejected steps is 40 and 8, respectively.
Figure 6.
Simulated current through
an inductor: (a) integration
is started with SDIRK 3(2);
(b) integration is continued
with SDIRK 3(1)
0
0
500
1,000
2.5
(a) (b)
5
5 5.0005 5.001
I/A
1,000
0
1,000
I/A
t /s t /s
Figure 5.
Second test problem:
electrical network
+

u(t)
s(t)
C
R
L
COMPEL
27,1
130
5. Conclusion
Error-controlled adaptive RK time integrators offer efcient and reliable time step
selection for electromagnetic problems with sinusoidal excitation when the difference
between the approximation orders of the main and the embedded solution is two. This
is not the case for standard time integrators with a difference of one as shown by the
examples. Standard error-controlled RK time integration fails for electromagnetic
problems with sinusoidal excitation when the adaptive time step selection relies upon
the comparison of a main solution and on embedded solution where the difference of
orders is one. This problem is overcome when the embedded solution differs by two
orders of approximations. Such embedded solution is efciently constructed by putting
appropriate order conditions on the coefcients of the Butcher table.
The problem highlighted in the paper is not specic only for the purely sinusoidal
functions. It is obviously that the described phenomenon also occurs for the excitation
functions that are approximately sinusoidal. Using the technique proposed in the
paper, such problems can also be effectively tackled.
References
Ascher, U.M. and Petzold, L. (1998), Computer Methods for Ordinary Differential Equations and
Differential-Algebraic Equations, SIAM, Philadelphia, PA.
Benderskaya, G., Clemens, M., De Gersem, H. and Weiland, T. (2005), Embedded Runge-Kutta
methods for eld-circuit coupled problems with switching elements, IEEE Transactions
on Magnetics, Vol. 41 No. 5, pp. 1612-5.
Benderskaya, G., De Gersem, H., Clemens, M. and Weiland, T. (2004), Transient eld-circuit
coupled formulation based on the FI-technique and a mixed circuit formulation,
COMPEL: The International Journal for Computation and Mathematics in Electrical and
Electronic Engineering, Vol. 23 No. 4, pp. 968-76.
Cameron, F. (1999), Low-order Runge-Kutta Methods for Differential-Algebraic Equations,
Tampere University of Technology, Tampere.
Clemens, M., Wilke, M., Benderskaya, G., De Gersem, H., Koch, W. and Weiland, T. (2004),
Transient electro-quasistatic adaptive simulation schemes, IEEE Transactions on
Magnetics, Vol. 40 No. 2, pp. 1294-7.
Gustafsson, K. (1994), Control-theoretic techniques for stepsize selection in implicit Runge-Kutta
methods, ACM Transactions on Mathematical Software, Vol. 20 No. 4, pp. 496-517.
Hairer, E., Nrsett, S.P. and Wanner, G. (1993), Solving Ordinary Differential Equations I. Nonstiff
Problems, Springer, Berlin.
Hundsdorfer, W. and Vewer, J. (2003), Numerical Solution of Time-dependent Advection-
diffusion-reaction Equations, Springer, Berlin.
Lang, J. (1995), Two-dimensional fully-adaptive solutions of reaction-diffusion equations,
Applied Numerical Mathematics, Vol. 18, pp. 223-40.
Nicolet, A. and Delince, F. (1996), Implicit Runge-Kutta methods for transient magnetic eld
computation, IEEE Transactions on Magnetics, Vol. 32 No. 3, pp. 1405-8.
Soderlind, G.S. (2002), Automatic control and adaptive time-stepping, Numerical Algorithms,
Vol. 31, pp. 281-310.
Wang, H., Taylor, S., Simkin, J., Biddlecombe, C. and Trowbridge, B. (2001), An adaptive-step
time integration method applied to transient magnetic eld problems, IEEE Transactions
on Magnetics, Vol. 37 No. 5, pp. 3478-81.
Adaptive time
integration
131
About the authors
Galina Benderskaya received the diploma degrees in Applied Mathematics and English
linguistics from the Ulyanovsk State University, Russia, in 1998. Since August 2002, she was
with the Institut fur Theorie Elektromagnetischer Felder at the Technische Universitat
Darmstadt, Germany, where in 2007 she received the PhD degree in electrical engineering. Since
April 2007, she is with the CST (Computer Simulation Technology) GmbH, Germany, working as
a Software Development Engineer. Galina Benderskaya is the corresponding author and can be
contacted at: Galina.Benderskaya@cst.com
Herbert De Gersem received the MSc and PhD degrees in electrical engineering from the
Katholieke Universiteit Leuven, Belgium, in 1994 and 2001. From 2001 till 2006, he was with the
Institut fur Theorie Elektromagnetischer Felder at the Technische Universitat Darmstadt,
Germany, working as Assistant Professor. Since October 2006, he is an Associate Professor at
the Katholieke Universiteit Leuven, Belgium. E-mail: Herbert.DeGersem@kuleuven-kortrijk.be
Wolfgang Ackermann received the diploma and PhD degrees in electrical engineering from the
Universitat Siegen, Germany, in 1995 and 2002. From 1995 till 1997 he worked for the
interdisciplinary research project Deep Sea Mining forming a cooperation between the electrical
and mechanical engineering faculties at the Universitat Siegen. Since October 2002, he is with the
Institut fur Theorie Elektromagnetischer Felder at the Technische Universitat Darmstadt, Germany,
working as an Assistant Professor. E-mail: ackermann@temf.tu-darmstadt.de
Thomas Weiland received the MSc and PhD degrees in electrical engineering from the
TH-Darmstadt, Germany, in 1975 and 1977. He worked at CERNin Geneva, Switzerland and DESY,
Hamburg, Germany where he became head of the Electromagnetic Field Group in 1982. Since 1989,
he is Full Professor and Director of the Institut fur Theorie Elektromagnetischer Felder at the
Technische Universitat Darmstadt. He is Founding President of the CSTGmbH, Germany. Weiland
holds the Leibniz prize of the German ResearchSociety, the Max Planck researchprize and the Philip
Morris research prize. E-mail: thomas.weiland@temf.tu-darmstadt.de
COMPEL
27,1
132
To purchase reprints of this article please e-mail: reprints@emeraldinsight.com
Or visit our web site for further details: www.emeraldinsight.com/reprints

You might also like