You are on page 1of 7

E XPLOITING M ULTIPLE T IME S CALE P ROPERTIES F OR FAST S IMULATION

A LGORITHMS

Markus Pöller Martin Schmieg


DIgSILENT GmbH
Buchenstr. 10
72810 Gomaringen, Germany
e-mail: Markus.Poller@digsilent.de
keywords: simulation of transients - multirate algorithm - adaptive step size

A BSTRACT EMT programs (e.g. [1]) however, would generally be able


to cover the whole range of transients in power systems, but
Adaptive step size algorithms are presented making use of because the instantaneous values of voltages and currents
the muliple time scale character of power systems. The pa- are sinusoidal in steady state, the simulation step size must
per analyzes methods using multiple step sizes simultane- remain so small, that longer term transients cannot be ana-
ously (multirate methods) and methods adapting the inte- lyzed in a reasonable amount of calculation time.
gration step size in time. The resulting algorithm covers Existing solutions for these problems are:
transients of all time ranges, from electromagnetic to elec-
tromechanical phenomena.  Exchanging the dynamic network model by a steady
state model after fast transients have decayed. But the
sudden change of network models can cause parasitic
1. I NTRODUCTION excitations of the overall system because the network
models never match completely, even if fast transients
Transients in power systems are characterized by eigenval- have decayed.
ues which are lying in different order of magnitude. Hence,
the electrical power system is a multiple time scale system  Describing the electrical grid equations in a rotating
and the resulting differential equations are stiff. reference frame leading to a constant course of volt-
Simulation algorithms can profit by the following two as- ages and currents in a balanced steady state. The in-
pects of multiple time scale behavior: tegration step size can here be increased up to several
milliseconds [2].
 The damping of fast transients is (normally) much
higher than for slow transients. But this method is only efficient in balanced situations
and is not able to deal with zero sequence components
 State variables can be chosen in such a way that only at all.
a subset of them is influenced by fast movements. The
overall system can then be decomposed into different In the center of interest of this paper are transients, ranging
subsystems characterizing transients ranging in differ- from about 100 microseconds up to one minute, particularly
ent time scales. in unbalanced system configurations.
Our approach consists of
In this paper, the power system is seen as a two scale system
characterized by the following types of transients:  Using an individual integration step size for each sub-
system: Multirate algorithm
 Electromechanical transients, slow subsystem
 Modifying existing integration methods in such a way,
 Electromagnetic transients, fast subsystem that the sinusoidal steady state of the electrical grid is
always represented correctly, independent of the inte-
In commonly used simulation tools for transient stability, gration step size, including unbalanced systems. Such
a large time scale approximation is used by considering a a method has been presented in [3] and is further de-
steady state representation of the electrical grid. veloped in this paper.
Voltages and currents are here expressed by complex pha-
sors. Capacitances and inductivities are then described by The first part of the paper describes the general structure
their complex steady state equations. of a multirate algorithm including a discussion of problems
But with this representation, it’s not possible to analyze associated with it and their solutions.
electromagnetic transients, even decaying DC-components In the second part we present an adaptive step size algo-
of currents cannot be taken into account. rithm based on the integration method described in [3].
Finally, examples demonstrate the precision and efficiency The complete transformation matrix T has a block diago-
of the described simulation methods. nal structure in which each 3  3 block corresponds to the
transformation matrix of (3).
2. M ULTIPLE T IME S CALE S YSTEMS
3. M ULTIRATE A LGORITHM
If a subset of state variables is only weakly influenced by
fast transients, the overall system can be split into subsys-
tems characterizing transients of different time ranges. An Slow subsystem: hs
analytical method to perform this decomposition is the sin-
gular perturbation analysis [4]. x~ s (t)
The results of a two time scale analysis can be resumed as
follows: Interpolation Sampling: hs

 Small time scale analysis: Large eigenvalues are char-


acterized only by the fast subsystem. State variables Sampling: hf Anti alias filter
of the slow subsystem can be considered as input vari-
ables to the fast subsystem.
T T ;1
 Large time scale analysis: Considering that fast tran-
sients have decayed, slow transients can be calculated x~ f (t + h)
by considering the slow subsystem together with the
steady state behavior of the fast subsystem. Fast subsystem: hf

Describing the electrical grid in a steady reference frame or


original abc-phase coordinates and the slow subsystem in
Figure 1: Coupling of subsystems in a multi-rate algorithm
a rotating reference frame, the transformation of reference
Multirate algorithms are very useful for real time applica-
frames has additionally be taken into account.
tions, because they reduce the calculation time per time step
Consequently, the overall system can be defined by the fol-
considerably.
lowing set of differential equations:
Because state variables of the slow subsystem are almost
x_ s = f (xs  T ;1 xf ) free of fast transients, a high integration step size can be
(1)
0 = g (xf  x_ f  T xs ) used for the slow subsystem compared to the fast subsys-
tem. Implementations of multirate algorithms are described
The state variables xs together with the function f are in [5] or in [3].
building the slow subsystem. In power systems, the vari- Using different rates, the variables being exchanged have to
ables xs can be rotor fluxes, machine speed, angles but also be resampled. Therefore, interfaces are required performing
controller state variables. the necessary interface operations.
Because the electrical grid is normally described by an im- The structure of a multirate algorithm, including interpola-
plicit system of differential equations, the implicit formula- tion and anti alias filtering is shown in fig. 1.
tion has been chosen for the fast subsystem. The state vari- Particularly the low-pass filter which has to prevent aliasing
ables xf are e.g. the instantaneous values of line currents, caused by high frequencies in x f is introducing additional
voltages across capacitances or stator fluxes of machines. errors because causal low pass filters, like moving average
The transformation-matrix T describes the transformation filters, always have a lagging phase characteristic.
between abc co-ordinates and a rotating reference frame Because interpolation is used for feeding slow state vari-
(dq0). In case of a three phase variable the transformation ables to the fast subsystem, the next value of a slow state
can be described as follows: variable xs (t + hs ) must always be known before the fast
subsystem can be evaluated. Therefore, the differential
uabc = T 33 udq0 (2) equations describing the slow subsystem must be solved by
an explicit numerical integration algorithm.
with
2 3
;cos #  ;;sin #  1 4. A DAPTIVE S TEP S IZE
T 33 = 4cos ;# ; 23  ; sin ;# ; 23  15 (3)
cos # ; 43 ; sin # ; 43 1 In algorithms using a three phase instantaneous value rep-
The angle # is defined by:
resentation for modelling the electrical grid, the integration
step size is very limited, even if fast transients have de-
# = !r t cayed.
The problem here is the precision of the numerical integra-
The angular frequency ! r is the frequency of the rotating tion method used for discretizing the fast subsystem. Be-
reference frame. cause of the transformation matrix T in (1), the steady state
of the fast subsystem is characterized by a sinusoidal course Equation (11) shows that the Adams-Bashforth method is
of all fast state variables xf to which the integration step of the same order as the trapezoidal rule.
size has to be adapted. Instead of evaluating directly (7), the difference of predic-
The next sections present a method which allows to increase tor and the actual calculated solution can now be used for
the integration step size up to values which are commonly approximating " l :
used for analyzing electromechanical transients (h  2f1n ).
"^l = k(xP ; x) (12)
4.1 Linear Integration Methods with:
Linear integration methods are widely used in power system
simulation programs for analyzing electromagnetic tran- xP (t + h) ; x(t + h) = b1 x_ (t + h) +
sients (fast subsystem). Particularly the trapezoidal rule (b0 ; c0 )x_ (t) ; c;1 x_ (t ; h) (13)
which is defined by
The difference of predictor and corrector is equal to the dif-
x(t + h) = x(t) + b0x_ (t) + b1 x_ (t + h) (4) ference of their local truncation errors (5)-(10):

xP (t + h) ; x(t + h) = "lP ; "lC  h2 ...x (t)


3
with b0 = b1 = h=2 is used in many programs (e.g. [1]). (14)
The local truncation error, an expression describing the er-
ror introduced by one simulation step, can be used for esti- The comparison of (14) with (7) shows that a good approx-
mating the precision of the numerical method. imation for the local truncation error of the trapezoidal rule
For numerical integration methods according to (4), the lo- can be obtained with

k = 16
cal truncation error is defined as follows (see e.g. [6]):

"l = x(t + h) ; x(t) ; b0 x_ (t) ; b1 x_ (t + h) (5)

For b0 = b1 = h=2, equation (5) is:


In case of pure sinusoidal wave forms: the local truncation
error can be estimated as follows:
" = x(t + h) ; x(t) ; h x_ (t) ; h x_ (t + h)
l 2 2 (6) x(t) = x0 cos(!t + '0 )
Approximating x(t) by a Taylor series leads to an approxi- h3 ...x (t) = h3 !3 x sin(!t + ' )
mated value for " l : j"l j 
12 12 n 0 0

"l  ; h12 ...x (t)


3
The maximum integration step size, even in a perfect, har-
(7)
monics free, steady state of the system would be
r
h < 3 12"xmax !1
For evaluating (7) during a simulation, the calculation of
x (t) needs to be performed at each time step. This could
...
0
(15)
be done by approximating the derivatives with difference
formulas but then, the evaluation of more history values is if "max was the maximum allowed truncation error.
required and additional imprecisions are introduced.
A more convenient way of estimating " l is the use of a pre- 4.2 Adaptation to Periodic Steady State
dictor formula of the same order as the implicit integration The analysis of the local truncation error has shown that the
method. error introduced by discretizing a continuous time system is
A predictor formula of the same order as the trapezoidal highly frequency dependant.
rule is the Adams-Bashforth method of second order. It is The trapezoidal rule works perfect in case of constant sig-
defined by: nals, and still very good for low frequencies.
x(t + h) = x(t) + c0 x_ (t) + c;1 x_ (t ; h) (8)
But if the steady state of a system is characterized by sinu-
soidal state variables, the maximum integration step size is
with very limited, even in steady state.

c0 = 3 h2
Hence, an integration method is required having a minimum
error around the steady state frequency.

c = ;h
(9) In [3], an integration method has been introduced comply-
;1 2
ing with this requirement. The method is defined by setting
in (4):
 
b0 = b1 = !1 tan !n2h
It’s local truncation error is:
(16)
"l = x(t + h) ; x(t) ; c0 x_ (t) ; c;1 x_ (t ; h) (10) n
Using a Taylor approximation, " l can be approximated by: Unhappily, error estimation is here much more difficult than
for classical integration methods because the local trunca-
"  5 h x(t)
3
tion error cannot be approximated by a Taylor series any
l 12 (11)
more.
But an adaptive step size algorithm can only be imple- 4.3 Predictor-Corrector Scheme
mented if an error estimation is possible. A precise anal-
The local error of the classical trapezoidal rule could be ap-
ysis of the local truncation error according to (5) in the fre-
proximated with the help of a predictor.
Hence, for estimating " l of the modified trapezoidal rule, a
quency domain is therefore required:
; !h j!h 
"l (!) = e ; 1 ; b0 j! ; b1 j!e x(j!) (17) predictor scheme must be found having a local error func-
| {z } tion similiar to el (! ) according to (17).
el (!) This leads to a modified Adams-Bashforth method whose
Equation (17) can be seen as a linear system with the trans- zeros have to be placed at ! = 0 and ! = ! n as well.
fer function el (! ) which is called local error function, the Transforming (10) into frequency domain leads to the fol-
input x(! ) and " (! ) as output. lowing conditions for the coefficients c 0 and c1 :
l
The local error function of the normal trapezoidal rule with e(!n ) = ej! h ; 1 ; c0 j!n ; c;1 j!n e;j!
n nh=0
b0 = b1 = h=2 has a triple zero around ! = 0 and can e(;!n ) = e;j! h ; 1 + c0 j!n + c;1 j!n ej! n nh
=0
hence be called a Butterworth Method (see Fig. 2).
(18)
1 ...
.. The resulting coefficients are:
...  
c;1 = ; ! sin(! h) = ; ! tan !2n h
1 ; cos(!n h) 1
.
0:8
..
...
....
...
"
.
0:6 ....
...
..
n n n (19)
e(!) . .
.....
c0 = cos( !n h ) ; cos(2!n h)
0:4 ....
.....
.......
... ..
........
...........
.......... !n sin(!n h)
0:2 ....
...
.. . ........
.........
....
....
...........
......... .................. The local truncation error can now be approximated by the
............ .......................
0 ........................................................................................................................... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
difference of a predictor solution x P (t + h) obtained with
0 50 100 150 200 250 the modified Adams Bashforth method according to (19)
f [Hz] ! and the actual solution x(t + h) calculated by the modified
............................................. h = 2ms trapezoidal rule.
.................................... h = 1ms e^(!) = k jxP ; xj = k j(eP (!) ; e(!)j
.... .... .... .... .... .... h = 0:5ms (20)

Figure 2: Magnitude of the local error function of the trape- Figure 4 shows the magnitudes of the exact and the approx-
zoidal rule imated local error function.
It can be seen that the approximated error is a very good
estimate for the local error function, at least in the frequency
In contrast to Butterworth methods, the modified trape- band of interest. If ncessary, it could further be improved by
zoidal rule according to (16) has zeros at ! = 0 and adjusting the factor k in (20).
! = !n , independant of the integration step size (see fig.
3). 0:4 .
.. ..
.
..
... . ..
Hence, this method is perfectly adapted to the steady state 0:3 .. .

"
. .
.. ..
of instantaneous values of voltages and currents. Because .. .....
0:2
..
... ...
of the zero at ! = 0, also slowly decaying DC components e(!) .. ..
.... ...
.
0:1
.
. ..
are analyzed with high precision even in case of large inte- .......
................................................................. ......
...
...
................. .... .. ....... ......... .
gration step sizes. 0 ........... ..........

0 25 50 75 100
1 ...
..
.. ..
..
...
f [Hz] !
....
0:8
...
..
..
.
..
...
. ............................................. e(!)
" 0:6 .
...
...
.. .... .... .... .... .... .... e^(!)
.. ...
.. ...
e(!) 0:4 ..
.
...
...
...
..
Figure 4: Estimated and exact local error function of modi-
...
..
.. . ...
.... ....
.. fied trapezoidal rule (h = 4ms,k = 1=6
0:2 ...
.
.
. ..
.......
.....
..
.. .
... .
... ....
... .... .
. . ...... .... ....
......................... .... ............ .... .... .... ....
0 .................................................................................. ................... ............... ........... ....... ....... ....... ....... ...... ....... ....... .......
0 50 100 150 200 250 4.4 Numerical Oscillations
f [Hz] ! Another requirement for the numerical integration method
............................................. h = 4ms is A-stability. Only together with an A-stable method, the
.................................... h = 2ms integration step size can be increased independent of the
.... .... .... .... .... .... h = 1ms
....... ....... ....... ....... h = 0:5ms eigenvalues of the electrical network.
The easiest way of analyzing the stability of implicit, lin-
Figure 3: Magnitude of local error function of modified ear integration methods is their description as a mapping of
trapezoidal rule complex frequencies.
Methods according to (4) are performing the following 5. E XAMPLES
mapping of complex frequenies:

z = 11 + b0 p For demonstrating some applications of the described meth-


(21) ods, an unbalanced fault is simulated in a power system
;b p1 similar to the IEEE 9-bus bar system [7] with various al-
The condition for A-stability of methods according to (4) is gorithms.
(e.g. [3]): All machines are voltage controlled but no governor models
have been connected in order to obtain considerable speed
b1  b0 (22) deviations.
The modified trapezoidal rule is therefore A-stable if h lies The machine models are of eight order (including zero se-
in one of the following ranges quence). Lines are modelled by several -elements con-
nected in series.
h
!n 2 2 k k + 2   The simulated event is a double phase to ground fault on
line 5-7 at 50% distance with a duration of 300ms. The
   
1
h2 k  k+ 1 1 fault is cleared by switching off the faulted line.
fn 2 fn (k integer) (23)
5.1 Multirate Algorithm
Numerical oscillations occur if real eigenvalus p i of the
original system are mapped on oscillatory eigenvalues z i Annex 1 shows voltage phasor and speed for the simulated
of the corresponding discrete time system. event. The step sizes are h f = 0:05ms and hs = 10ms.
These numerical oscillations can always occur if integration Because the anti-alias filter cannot damp perfectly the neg-
methods according to (4) are used. The important thing is, ative sequence component, the electrical torque is subsam-
that these numerical oscillations are well damped so that pled. However, according to large time scale approxima-
they are decaying quickly whenever they occur. tions, only the average value of speed is of intereset. If a
The sensitivity of an integration method to numerical oscil- higher precision is required the ratio h s =hf has to be de-
lations can be analyzed using (21) by: creased.
But the influence of these effects to voltage is only minor as
lim 1 + b0 ( + j!) = ; bb0
!;1 1 ; b1 ( + j!
(24) the magnitude of the voltage phasor in fig. 6 shows clearly.
1

In case of integration methods with b 0 = b1 = b : 5.2 Adaptive Step Size Algorithm

lim 1 + b( + j!) = ;1
The same fault has been simulated using the adaptive step
!;1 1 ; b( + j! )
(25) size algorithm. Annex 2 shows that the simulation with step
size adaptation is in great accordance to a normal EMT-
Very large eigenvalues are therefore mapped near to z = simulation.
;1. Using Annex 3 shows results of the same simulation run but in a

;1 = ej
larger time scale.
Even if there is a considerable speed deviation and hence a
it can be seen that z = ;1 corresponds to an oscillatory detuning of the integration method, the integration step size
mode at f = 21h . can be increased up to h = 6:4ms, without any consider-
For the practical use of the modified integration method, it able drawback to the precision of the numerically calculated
is absolutely necessary that these numerical oscillations are state variables.
well damped which requires:
b0 < 1 C ONCLUSION
b1 Two methods have been presented which are increasing
In order to comply with this condition, a damped modified the performance of simulation programs for power systems
trapezoidal rule can be defined by: considerably.

b1 = !1 tan 1 ; 2 !n h
The multirate method uses different integration step sizes
for different state variables. It can be applied for linear and
n
b0 = !1 tan 2 !n h
(26) nonlinear systems under the condition that the state vari-
ables of the slow subsystem are only weakly influenced by
n fast transients. The described decomposition is leading to
Equation (26) complies with the condition b 1 > b0 for 0 < such a form in almost all cases.
< 1 and is hence damping numerical oscillations. The second method adapts the integration step size in time.
In order to match the precision requirements at ! = ! n , By modifying the trapzoidal rule, the integration step size
has to be placed very near to 1. The local error function is can be increased up to h = 10ms if voltages and currents
then not equal zero at nominal frequency but it has still a are reaching their sinusoidal steady state. Limitations are
very low value. here systems with a considerable high amount of harmonics
2.0000 1.0800

1.0400
1.000
1.0000

0.000 0.960

0.920
-1.0000
0.880

-2.0000 0.840
0.000 0.050 0.100 0.150 0.200 [s] 0.250 0.000 0.050 0.100 0.150 0.200 [s] 0.250
G 1: Electrical torque in p.u. G 1: Voltage phasor in p.u./EMT
G 1: Filtered and resampled electrical torque G 1: Voltage phasor in p.u./multirate

1.0125 30.000

1.0100
20.000

1.0075
10.000
1.0050
0.000
1.0025

-10.000
1.0000

0.998 -20.000
0.000 0.050 0.100 0.150 0.200 [s] 0.250 0.000 0.050 0.100 0.150 0.200 [s] 0.250
G 1: Speed in p.u./EMT G 1: Current, phase A in kA/EMT
G 1: Speed in p.u./multirate G 1: Current, phase A in kA/multirate

2 Phase to Ground Fault, Tf=200ms Generator G1 Date: 3/12/99


DIgSILENT Multirate Algorithm Annex: 1 /1

which are limiting the maximum integration step size. [6] J. Stoer and R. Bulirsch, Numerische Mathematik 2.
The adaptive step size method is particularly well suited for Springer-Verlag, 1990.
applications in which mutual influences between the electri-
cal grid and the electromechanical system have to be taken [7] P. M. Anderson, B. L. Agrawal, and J. E. Van Ness,
into account. Subsynchronous resonances or self excitation Subsynchronous Resonance in Power Systems. IEEE
of induction machines belong to these applications. Here, a Press, 1990.
steady state grid model cannot be used and traditional EMT-
programs are leading to huge calculation times even if there
are only slow transients to be analyzed.

R EFERENCES
[1] H. W. Dommel, “EMTP theory book,” tech. rep., Uni-
versity of British Colombia, 1986.

[2] U. Linnert, “Neue Differenzenleitwertverfahren zur


Simulation dynamischer Ausgleichsvorgänge mit
grossen Schrittweiten,” Archiv für Elektrotechnik,
vol. 76, no. 1, 1992.

[3] M. Pöller and M. E. Schmieg, “The efficient simula-


tion of multiple time scale systems,” Proceedings of the
IPST’97, 1997.

[4] J. H. Chow, Time Scale Modeling of Dynamic


Networks with Applications to Power Systems.
Berlin/Heidelberg/New York: Springer-Verlag, 1982.

[5] M. L. Crow and G. Chen, “The multirate method


for simulation of power system dynamics,” IEEE
Transaction on Power Systems, vol. 9, August 1994.
1.1500
1.1000
1.0500
1.000
0.950
0.900
0.850
0.000 0.050 0.100 0.150 0.200 [s] 0.250
G 1: Voltage phasor/EMT
G 1: Voltage phasor/adaptive step size

30.000
20.000
10.000
0.000
-10.000
-20.000
0.000 0.050 0.100 0.150 0.200 [s] 0.250
G 1: Current, phase A in kA/EMT
G 1: Current, phase A in kA/adaptive step size

0.003
0.002
0.002
0.001
0.001
0.000
0.000 0.050 0.100 0.150 0.200 [s] 0.250
Results: Integration step size
Results: Integration-Error EMT

2 Phase to Ground Fault, Tf=200ms Generator G1 Date: 3/12/99


DIgSILENT Adaptive step size algorithm Annex: 2 /1

1.1500 1.0160

1.1000
1.0120

1.0500
1.0080
1.0000
1.0040
0.950

1.0000
0.900

0.850 0.996
0.000 1.2500 2.5000 3.7500 [s] 5.0000 0.000 1.2500 2.5000 3.7500 [s] 5.0000
G 1: Voltage Phasor, Magnitude in p.u. G 1: Speed in p.u.

0.010 4.0000

0.008 3.0000

0.006 2.0000

0.004 1.0000

0.002 0.000

0.000 -1.0000
0.000 1.2500 2.5000 3.7500 [s] 5.0000 0.000 1.2500 2.5000 3.7500 [s] 5.0000
Results: Integration-Step Size EMT G 1: Excitation voltage in p.u.
Results: Integration-Error EMT

2 Phase to Ground Fault Tf=200ms


Electromechanical TransientsDate: 3/12/99
DIgSILENT Adaptive step size algorithm Annex: 3 /1

You might also like