You are on page 1of 9

IEEE Transactions o n Power Systems, Vol. 4, No.

2, May 1989

139

SUPPRESSION OF NUMERICAL OSCILLATIONS IN THE EMTP

Jose R. Marti. Member, IEEE


The University of Aritish Columbia Vancouver, B.C.. Canada

.liming Lin. Member, IEEE

Electric Power Research I n s t i t u t e Beijing. Chlna

Abstract - The integration scheme i n t h e EJectromagnetic Transients Program EMTP has been modified t o solve t h e problem of sustained numerical oscillations that. can occur when t h e trapezoidal r u l e has t o a c t as a differentiator. These oscillations appear, f o r instance, on t h e volt.ae;e across an inductance a f t e r current interruption. The technique presented i n t h i s paper prevents t h e s e oscillations by providing c r i t i c a l damping of t h e discontinuity within one A t of t h e simulation. The critical damplne adjustment (CDA) is achieved by means of two At/2 integration s t e p s using t h e backward Euler rule. With t h e CDA scheme t h e trapezoidal r u l e can still be used throughout the e n t i r e siaulatiori without t h e problem at discontinuities. Thc! effectiveness of the new scheme is i l l u s t r a t e d with simulat.ion results. Keywords -d i s c r e t e -time systems, numerical oscillations, integration rules, EMTP solution.

The major disadvantage of adding a r t i f i c i a l damping e i t h e r through t h e integration r u l e o r e x t e r n a l resistances, is t h a t t h e rest of the normal system response is d i s t o r t e d by t h e phase e r r o r s introduced by t h e damping. Other schemes have been proposed t h a t t r y t o control t h e i r r e g u l a r oscillal.ions locally, without a f f e c t i n g t h e rest of tho simulation (e.g., 121). These schemes a r e based on rr!ad.iustments of i n i t i a l c:onditions and interpo1at.ions. These techniques, however, are relatively complicated t o implement f o r a general c l a s s of network components. The c r i t i c a l damping adjustment (CDA) procedure presented .in t h i s paper belongs t o t h i s l a s t group in t h e sense t.hat it eliminates the numerical oscillations locally. The main djfference, however. is t h a t i t is not based on interpolation or re-initialization, but on t h e property of the backward Lnler rule t o provide t o t a l damping of t h e overshoot at. t h e discontinuity in e x a c t l y two integration s t e p s ( c r i t i c a l damping). Due t o its simplicity, t h e mtrdifications required t o implement t h e CDA procedure a r e very straightforward, not only f o r simple e1ement.s l i k e inductances and capacitances. but a l s o f o r more complicated models l i k e frequency dependent transmission l i n e s and non -1jnc:ar elements. Tht: CDA procedure h a s been implemented and t e s t e d i n t h e U C B version of t h e EMTP with a minimum of modjfications t o t h e overall solution scheme. I t is a l s o currently being implemented in t h e l a r g e r production code of t h e DCG/EPRI EMTP.
fl-

1 INTRODUCTION One important f a c t o r f o r t h e widespread use of t h e electromagnetic t r a n s i e n t s program EMTP [ l ] has probably been its choice of i n t e g r a t i o n scheme. The trapezoidal r u l e is used i n t h e EMTP t o convert the d i f f e r e n t i a l equations of t h e network c0mponent.s i n t o simple algebraic relationships involving voltage, current, and known past values. The accuracy of a disc:ret.e- system solution dependS on t h e s t e p size A t and on the integration rule. The s t e p s i z e determines t h e maximum frequencies t h a t can hct simula tcd. and the integration r u l e determines the distortion a t different frequencies. Thct maximum frequency t h a t can hr: simulated is independent of the integration rule and i s determined by t h e samplinl: rat(!. This is t h e Nyquist frequency Kiven by fN = 1/{2At), The distortion introdiicod by the integration r u l e gets worse as WI! approach the Nyquist frequency.
A s i t is shown i n t h i s paper, t h e trapezoidal r u l e has very good c h a r a c t e r i s t i c s i n terms of low distortion and numerical s t a b i l i t y . Moreover. t h e trapezoidal r u l e is A-stable, which means t h a t run-off i n s t a b i l i t y cannot occur. For some types of simulations. however, the ruJe may havv t o work as a pure differentiator, e.g., voltage on an inductance a f t e r current interrupt ion. o r currt!nt in a capacit a n w a f t er a voltage is switched on. Under these conditions, sustained (though bounded) numc!ric:al asci I lalions n i ~ : u i ~ T h i s problem . has been reported in (21, 131. and 141. One suggested solution has been t o add damping t o t h e s y s t m in order t o force the oscillations t o decay. Damping can be provided hy t.ht! intrigriitioii riilc i t s e l f . e . g . , with b c k w n r d tlnler. Gear. o r some combination of rules with a n e t damping e f f e c t ((41. 151. [GI). Damping can a l s o be provided c*xt.ernaIly, hy adding f i c t i t i o u s resistances i n parallel with the inductances and in s e r i e s with the capacltances (131. 141).

Thjs ptaper explains t h e reasons f o r supporting t h e continued use of t h e trapezoidal rule a s t h e basic integration r u l e i n t h e EMTP and how t o solve t h e prohlem of sustained numerical oscillations a t discontinuities with the ncw c r i t i c a l damping adjustment schemc:.

2 SOLUTION SCHEME I N THE EMTP


The solution scheme i n the EMTP (11 is based on t h e tliscrt!t.lsatiori of firs1 order diff't!rerl:lal c!quations by means of the trapezoidal rule of integration. For instance, l-he difft:rrmt ial c:qnation f o r an inductanw
U (t ) =

L d i -) (t dt

becomes tht: difference equation

This equaljon conductance

relates i ( t ) t o v(t)

Ih~urq:h

,311

t~~uivalrnl

GL-Trop

=-

At 2 1.

(3)

58 SN 732-0 A p a p e r recommended and approved by t h o I E E E Pourer System E n g i n e e r i n g Committee o f t h e I E E E Power E n g i n e e r i n g S o c i e t y o r p r e s e n t a t i o n a t t h e LEEE/PES 1988 Sunnmer ).leetin::, Portland, nregon, J u l y 24 - 29, 1988. X a n u s c r i p t s u h i t t e d .January 29, 1988; made a v a i l a b l e f o r p r i n t i n g May 27, 1988.

and an equivalent current source

h , r r a p ( t )= t ( f

- At)+ ---v(t-

/I t 2L

A t )*

0885-8950/89/0500-0739$01.WO1989 IEEE

740
Equation (2) can then be rewritten as
3 EVALUATION OF INTEGRATION RULES

3 1 ACCURACY .
Source h ( t ) a t time t is known from t h e previous hist.ory of t h e system (solution at t h e previous time s t e p ( t - - A t ) i n t h i s case). Similar discrete-time relationships can be found f o r o t h e r network components (including distributed-parameter transmission lines). A l l t h e network components can then be combined i n a matrix equation of t h e form The accuracy of an integration r u l e can be assessed by considering its frequency response. Applying t h e Z -transform's basic property

% ( f (t - k d t ) ) = z - " ( f ( t ) )
t o difference eq. (2) f o r t h e trapezoidal rule,

(10)

where [GI represents t h e equivalent node conductances, [v(t)] t h e node voltages, [ i s ( t ) j t h e source currents, and [h(t)] t h e history terms. If eq. ( 3 ) is discretized using backward Euler's r u l e instead of trapezoidal. t h e resulting differtm:e equation is

from which

i(t) - i(t - A t ) = -i U ( t ) ,

At

(7)

Taking voltage as input and current as output, H(z) i s t h e t r a n s f e r function of t h e d i s c r e t e time system. The response t o a sinusoidal e x c i t a t i o n v ( t ) = eJot is given by

which s t i l l has t h o same general form of eq. (5). The differences a r e i n t h e valuf. of t h e cquivalent conductance

i(t)= t f ( z ) e ' w ' ,


with z = &At. The t r a n s f o r functions foi. t h e Table I a r e showri I n Table 2. integration rules of

as compared t o eq. (3), and i n t h e value source

of

t h e current TABLE 2 I)iscrcAtt. time t r a n s f e r functions ~ ( z ) = & ) A t ) (z f o r t h e integration r u l e s of Tablt~ 1. TRANSFER FUNCTION H(r)

a s compared t o eq. (4). Other integration r u l e s can also be used t o d i s c r e t i z e eq. (1) and still a r r i v e at t h e rc?lationships i r i eqs. (5) and ( 6 ) . Table 1 siimmarizfis t h e r6!sulting difference equations f o r some tradit.iona1 integration rules.

.__I__-

Trapezoidal

Rackward Euler

/At\
I

t
TABLE 1 Difference equations f o r an inductance f o r several integration rules.
RULE

DIFFERENCE EOIJATION

1 I

Trapezoidal

i(t)-i(t-dt)At i ( t ) - i ( t - A t )= - --u(t) 1.

Backward Euler

To waluatt: t h o accuracy of t h e rules, t h e j r frequc!ncy


rt~sporisrr as i n t e g r a t o r s i n t h e discreti!- timo system H(z) i s

Gear Second
Order

4 1 i(t)--l(t- At)+-i(t-2At)

-3L

----U

cc~mparttd with the trxact frcxluwicy response of an int f!erator i n t h e continuous- time systcm: H(s) : l/(sL) for s = j o . The : corresponding frequency response H S djfferentia t ors is simply t h e inverse of that as integrators: HC1ifferelltj a t o r 1/f'integrator . Fii:urc* 1 shows t h e accuracy as a function of frequcvxy f o r thci integration rules iri Table 2. The froquoncy axis is latiellcd i n per unit of l/At. (fpu : f ( W ) - A t ) up t o thc! Nyquist frf!queric:y 1/(2A t ) = 0.5 i n por unit. The plots i n Fig. ](a) show t h a t trapezoidal and backward Euler give fairly a c c u r a t e magnitude responses for frequencies up t o about one--fifth of t h e Nyquist frequency. Gear's rule is s l i g h t l y less accurate while Simpson's r u l e gives t h e most accurate of t h e responses shown i n t h i s figure. In addition. Sinpson produces no phase distortion. SJmpson's rule. howcver, is not s t a b l e as a d i f f e r e n t i a t o r and, therefore, cannot be used f o r the implicit solution scheme of t h e EMTP.

In s e l e c t i n g a n intop;rat.ion r u l e f o r t.he EMTP, careful att.erititin must be given t o t h e general -purpose nat.ure of thc. program. hie t.o t h e l a r g e variet.y of possihlf~ nc-twork c:onditions that thc! program must be able t.o simulattt, t h e chosen intel:ration scheme must have very good overall charact.c!ristics Iri twms of efficiency (that is, accuracy a t relativrtlg l a r g e A t ' s ) and stabi1it.y.

741 Accuracy of Integration Rules Magnitude Response TABLE 3 Distortion in t h e nature of c i r c u i t components duft o discrutjzation . Circuit Element Slmpson Trapezoidal Disc r e t i z a t ion Backward Buler Dis(:ret i m t ion

2 1.8 1.6
-

__

I I
I

I I
L L Q ( u ) =L--

t a n (w dt/2)
(wdt/2)

0.2

Om4

1
0 0.05 0.1 0.15 0.2 0.25 0 3 0.35 0.4 0.45 0.5 .

1
Frequency i n p e r u n i t of (l/A t ) (a) Accuracy of Integration Rules Phase Response

R
EQ

=-

2L
At

3.2 EFFICIENCY
For an overall a c c u r a t e simulation, hoth magnitude and phase e r r o r s have t o be kept small, with the phase e r r o r s being more c r i t i c a l f o r t h e c o r r e c t simulation of peak values. Due t o t h e i r phase distortion, t o obtain a c c u r a t e simulation r e s u l t s with e i t h e r t h e backward Euler r u l e o r Gear rule requires a much smaller time s t e p A t than with t h e trapezoidal r u l e (about one order of magnitude smaller). The computer time f o r a t r a n s i e n t s simulation with the EMTP would therefore increase accordingly. Slmilar considerations apply to o t h e r non-symmetric integration rules.

::;
Trapoioldal 8lmpsom (Phase WrOr
0)

0.05 0.1 0.15 0.2 0.25 0 3 0.35 0.4 0.45 .

Frequency i n p e r u n i t of ( l / A t) (b) Fig. 1. Frequency response f o r several i n t e g r a t i o n rules. (a) Magnitnde. (b) Phase. 3 3 STABILITY AND DYNAMIC BEHAVIOUR . Tho response of a discrete-time system is given by a sequence of values y l , y z , ..., yk a t time s t e p s 1, 2, ..., k (actual time t = k. A t ) . A s in the case of a continuous-time system, t h e t o t a l response consists of two parts: t h e forced response due t o the applied e x c i t a t i o n and the dynamic response due t o t h e change of s t a t e (solution of t h e associated homogeneous equation). The general form of the dynamic response is

The magnitude e r r o r s i n t h e frequency response of the i n t e g r a t i o n rille produce a change in t h e value of t h e c i r c n i t elerncint. For instance. a constant inductance 1 , becomes a frequency dependent LEQ(U ) a f t e r applying t h e trapemitla1 o r backward Euler rules. The d i s t o r t i o n in t h e nature of an inductance o r a capacitance produced by t h e trapezoidal and backward Euler r u l e s is summarized i n Table 3. The backward Euler r u l e has a good magnitude response and a l s o very s t r o n g s t a b i l i t y properties. But, a s shown i n Fig. l(h). it. produces a s t r o n g frequency-dependent phase distortion. Due t o t h e i n c o r r e c t phase relationship between d i f f e r e n t frequency components, sharp peaks i n a simulation can be missed and a r t i f i c i a l ones can be created. This is a l s o t h e case with Gear's second order r u l e and a l l non -symmetric rules. The phase e r r o r s produced by non--symmetric r u l e s d i s t o r t t h e nat.ure of t h e c i r c u i t element by introducing an a r t i f i c i a l r e s i s t a n c e i n t h e discrete-time representation of an inductance or a capacitance. This is shown i n Table 3 f o r t h e backward Euler rule.

y t = c , p : + c,pk,+ c , p : +
(For a derivation of reference [Y).)

..

t h i s equation, s e e f o r instance

In terms of t h e z-domain t r a n s f e r function H(z) of t h e d i s c r e t e system, t h e p ' s in eq. (12) a r e t h e roots of t h e denominator, o r poles, of t h i s function. The s t a b i l i t y condition is t h a t ( p i J G 1 for each of t h e poles. Table 4 shows the poles and zeroes f o r the integration r u l e s of Table 2. The roots of t h e denominator determine t h e s t a b i l i t y of t h e r u l e a s an integrator. The r o o t s of the numerator (zeroes of H(z)) determine t h e s t a b i l i t y of t h e r u l e a s a d l f f e r e n t i a t o r . In the case of an inductance, f o r instance, t h e d i s c r e t i z a t i o n rule is a c t i n g as an i n t e g r a t o r when voltage is the input and c u r r e n t is t h e output. The r u l e is a c t i n g a s a d i f f e r e n t i a t o r when c u r r e n t is injected and voltage is t o be determined. (Analogous considerations apply t o a capacitance.)

TABLE 4

Stahili t y p r n p w t i e s of tho integration rult:s i n Tahle 2.

2.0

___-Integrator
1.4

p
f,'

(stable)
(r;tilblc)
(stable)

p= - 1 p=0 p,=0
p 2 =: 0

(stable)'

1.2 1.o
0.8

_ _ _ _ I -

Gear Sr*cond Ordw

p,- I
p2

(stable)'

0.6

0.33(stnble)

(stable)'

0.4 0.2
0.0

Simpson

p,= I

(stable)

p 2 = - 1 (stable)'

time

x (At)

Rounded oscillations

C r

i F%--L- - ]

Thc. conceut o f s t a b i l i t v as f%tahlisherl bv ID , :, I 6 1 i.; " ,. cnricerned only with nrimr:rical run- o f f of thc! rlyndmic r w p o n s e (eq. (12)) and n o t with how thv solution t t w l s towards t h e fnrccd response. In t h e cas(\ of t r q w z o i d a l R S R differentiator. root p-=--I wen though t h v trwnsic!nl , dynamic period "tends" towards t h e forc:c.!tl rc'spnnsf: on thfa v w a g e , it does so wit.h sustained oscillations. This is illristratfttl in Fig. 3(b). In t h e case o f hackward Elllor as a di ffi!rf!ritiator, rnot p=O, cnnvergencr t o tho forc:ed rwponso occitrs i n j u s t two time s t e p s of c r i t i c a l d m p i n g (Pig. 3 ( c ) ) .

3.0

2.0 -

1.0

0.0

4 STEP FUNCTION RESPONSE

The response of a system t o a s t e p input j s indicative of its dynamic behaviour as I t adapts i t s e l f from one operating st.ate to another. Figure 3 shows the voltage response of the s e r i e s R, I, branch of Fig. 2 (R can be zero) to a s t e p current input. P a r t (a) i n Fig. 3 is the e x a c t continuous-time response: p a r t (b) shows t h e solution using t h e trapezoidal rule; and p a r t ( c ) shows t h e solution using the backward Euler rule.

-1.0 -2.0

4 (At)
0

time

2.8

Pig. 2.

R - L branch f o r s t e p responses i n Fig. 3.

The responses i n Fig. 3 show how trapezoidal o s c i l l a t e s about t h e c o r r e c t solution, while Backward Euler reaches t h e c o r r e c t f i n a l value i n t.wo tjme steps. For the branch of trapezoidal is given by Fig. 2, the recursive solution

for
0.0

4
0

( 2 + P m i ( t ) (2-Pnt)i(t-,t) U ( t) = -U ( t - A t ) + (dt/L) (Atll.)


with p
=

(13)

time
(c)

x (At)

U/L.

The solution for backward Euler is given by

Fig. 3.

St.c:p rt:sponsr?s. (a) Exact. (h) Trapezoidal rule. ((:) Rackwartl Eiiler riilc!.

Comparing eqs. (13) and (14), it can be observed t h a t , a s opposed t o trapezoidal, backward Euler does not c a r r y on the voltatce from t h e previous time s t e p and. therefore. it is not sensitive t o voltage jumps i n the solution.

The behaviour drscr ihrxl above for t h e voltagf: response of a serifss K-I. hr;rnch t o a s t e p currttnt inpiit applif!s as well t o the current response of a parallel U C br;rnch ( R [:an be infinito) t o a s t e p voltage input.

143
5

NEW SOLUTION SCHEME

-.

SIX

The c r i t i c a l damping adjust.merit. scheme (CDA) developctd i n t h i s work u s e s t h e trapezoidal r u l e f o r t h e normal p a r t of the sirnulatlon and temporarily changes t o t h c backward Euler r u l e t o go over discontinuities. The CDA scheme proceeds a s follows:
a)

The simulation is s t a r t e d with t.he trapezoidal r u l e and with a time s t e p of At. When a discontinuity is encoiintered (e.g. switching operations, change of slope i n non--linear elements, s t e p inputs), t h e i n t e g r a t i o n r u l e is changed t o backward Euler and t h e s t e p width is changed t o At/2. The system is then solved with backward Eirler f o r t h e two At/2 time s t e p s t h a t follow t h e int.roduction of t h e new condition. Fig. 5. Circuit f o r t h e simulation i n Fig. 8.

b)

c ) The simulation resumes w i t h t h e trapezoidal rule. The two backward Euler half -steps a r e s u f f i c i e n t t.o critically dampen the oscillation provoked by the disc0ntinuit.y. The r e s u l t s after t h e f i r s t backward Euler, half-step determine t h e i n i t i a l conditions f o r t h e follnwing hackward Euler half--step and a r e not p a r t of t h e output, which is given a t each f u l l At. Therefore, no overshoot appears i n the solution. The scheme produces identical output r e s u l t s as those obtained using only t h e trapezoidal rule, but without the superimposed oscillations at discont.innit1es.

Fig. 6.

Circuit f o r t h e simulation i n Fig. 9.


UITHUUT STRBILILRTION PROCEDURE S c a k 10'*1*001

NUllSl9.OAl

vollapcz.

3.00

6 SIMULATION RESULTS

Examples of simulations with t h e EMTP before and a f t e r adding t h e c r i t i c a l damping adjustment procedure are shown i n Figs. 7 t o 9 f o r t h e test c a s e s in Figs. 4 t o 6. Test Case 1: The simulation in Fig. 7 shows t h e voltage a c r o s s a non--1lnear inductance (Fig. 4) modelled by two piecewise s t r a i g h t - l i n e segments. The simulation s t a r t s from a c i n i t i a l conditions.
ONE
TWO

2.00

1.00

0.00

-1.00

THR

-2.00

4
I
Fig. 4. Test C a s e 2:

B
f

-3.00
0.00

.
0.10

0.20

0 30

lime

10**1-011

VOIIagLS.

NUllSl3.ORl UITH STABILILRTION PRUCEUURE Scalr 10**1+001

3.00
I

Circuit f o r t h e simulation i n Fig. 7.

Figure 7(a) shows t h e numerical o s c i l l a t i o n s produced by t h e change of slope in the nonlinear inductance. The o s c i l l a t i o n s do not subside but add t o t h e previous ones each time t h e inductance changes slopes. Figure 7(b) shows t h e cleaned--up waveform obtained with t h e CDA scheme.

The simulation shown i n Ffg. 8 corresponds t o t h e opening of a c i r c u i t breaker in-between two transmission l i n e s (Fig. 5). The transmission l i n e s were simulated by n equivalent c i r c u i t s . Test C a s e 3 This case, shown i n Fig. 9, corresponds t o t h e opening of a transmission l i n e simulated with t h e frequency dependence l i n e model of [7]. The c i r c u i t is shown i n Fig. 6.
0 00 0 10
TllC

0 20
10**1-011

0 30

0 40

Fig. 7.

Voltage across non- l i n e a r inductance. (a) Trapezoidal alone. (h) With CDA.

744
NUflS14,DRT

Voltages.

UIIHOUT S T A B I L I Z R T I O N PROCEDURE Scalc IO"l.001

1.00

u.no

1 I

- 1 00

-2

no
no

SIX
-3
I ONE I ONC

1 SIX

-200

!... ,...., ...,...., ...,


, ,

oon

0.02

o 04

006

. . ( . . . . ,, . . . , . . . . , n n8 o in 0 12 o 14 n 16 n 18 iIlew - r - n i i
. ,

.,..I
o 20

-4

no

N U n S T d O U l UITH S T A B I L I I R T I U N PROCEOURE

om

0.02

o 04

on6

0 OB Tile

n in
10.'1-011

0.12

u.14

n 16

1 8

o 20

Fig. 8.

Line opening ( n circuits). (a) Trapezoidal alone. (ti) With CDA.

Fig. 9.

Line opening (frequency dependence Trapezoitlal alone. (h) With CDA.

model).

(a)

7 IMPLEMENTATION OF THE CDA SCHEME I N THE EMTP

It can be observed from t h e simulat.ions presented that t h e CDA procedure completely eliminates t h e numerical oscillations of t h e t r a d i t i o n a l scheme without d i s t o r t i n g t h e waveshapes before o r a f t e r t h e discontinuities.
If i n t h e examples above t h e simulations a r e performed using the backward Euler r u l e instead of the trapezoidal r u l e n v w t h e e n t i r e simulation, t h e sustained oscillations will also he diminated. However, t h e At's required i n order t o achieve similar accilracies as those achieved with t h e CDA scheme a r e a t l e a s t one order of magnitude smaller.

The general modifications required c r i t i c a l damping adjust.mcnt scheme i n follows.

t o implement. t h c t h e EMTP a r e a s

As described i n Section 5, t h e net.work solution i a i s f i r s t c a r r i e d on normally using t h e trapezoidal rille of integration.

Assume now t h a t a t time s t e p t - t l some switches a r e requested t o change s t a t e s ( t o open or t o close). The network topology is then t o change from s t a t e I t o s t a t e 11. The sequencf: of events procedure is a s follows:
(i)
iri

As it. has been shown, t h e CDA scheme is very effective i n eliminating numerical oscillations while maintaining t tic, advantages of t h e trapezoldal rule. In addition, t h e procedure is very easy t o incorporate int.o t h e present solution scheme of t h e EMTP. This aspect is discussed in the next section.

t h e implemeritation of t h e CDA

The system solution i s f(1unt1 normally a t t..imc? st.ep t = t l with t h e network in configuration I (before t h e change i n t h e position o f t h e swit.(:hes). From eq. (6),

IG I [

11 = [ i s ( t ) J
1

[ t~ I ( t I ) I T

(15)

where the elements in the conductance matrix [(+I are represented according t o t h e trapezoidal r u l e (eq. (3)).

145
The network topology is now modified according to t h e new position of t h e switches (state 11). Matrix [GI,] is b u i l t and triangularized. The system is solved a t time t l + A t / 2 using t h e backward Euler rule. The representation of t h e network components i n t h e [GI matrix using backward Euler with a s t e p s i z e At/2 is i d e n t i c a l t o t h e representation using trapezoidal with a s t e p size A t (compare, f o r example, eq. (8) f o r At/2 with eq. (3) f o r A t ) . scheme i n t.he EMTP is very e f f i c i e n t and straightforwarcl. Simulation resiilts were presented that. show t h e effectiveness of t h e new scheme. ACKNOWLEDGMENT The authors express t h e i r acknowledgment t o the Canadian Electrical Association (CEA) who on behalf of t h e EMTP Development Coordination Group (DCG) and t h e E l e c t r i c Power Research I n s t i t u t e (EPRI) are g.iving t h e i r financial support f o r t h e Implemc:ntation of t h e CDA algorithm in t h e DCG/EPRI version of t h e EMTP. Our g r a t i t u d e a l s o t o Ilr. Hermanri W Dommel who has actively participated i n t h e . process of development and implementation of these ideas. REFERENCES

(16) The only required change f o r t h e solution with backward Euler is i n t h e form of t h e history term [hBE]. Compare, f o r instance, eqs. (9) and (4). With backward Euler, only the previous c u r r e n t appears in h(t), but not t h e previous voltage.
(iv) The system is solved a t ( t l + A t ) with backward Euler. (v) The simulation proceeds a t t1+2At, t1+3At, ... with t h e trapezoidal rule u n t i l another switching operation occurs.

H.W. Dommel, "Digital computer solution of e1ectromagnr:tic t r a n s i e n t s i n s i n g l e and multiphase networks." IEEE Trans. Power Apparatus and Systems, Vol. PAS-88. No. 4, pp. 388--399, Apr. 3969.

In t h e preceding description, a change in t h e switches position was taken a s an example of a sudden change i n the system t h a t requires c r i t i c a l damping adjiistment. Other events t h a t can produce overshoots have t o be considered a s well. The following events have been considered:

R. Kulicke, "Simiilatiorisprogramm NETOMAC: Ilifferenzen-leitwf!rtverfahren hei kontinuierl ichen und diskontinu i e r l ichttn Systemen (Simulation program NETOMAC: Difference conductance method for continuous and discontinuous systems)," Siemens Forschungs - und Entwicklungsberichte - Siemens Research and I)em?lopmerit Reports, Vol. 10, No. 5, pp. 299-302, 1981.
V. Rraridwajn, "Damping of numerical noise in t h e EMTP solution," EKrP Newsletter, Vol. 2. No. 3, pp. 10-19,Feb. 1982.

(1) Switches, including a l s o i n t h i s group o t h e r components t h a t open or close a c i r c u i t , a s f o r example diodes.


(2) Lightning a r r e s t e r s with gap discharge o r quenching.

(3) Sources t h a t s t a r t or s t o p durlng t h e t r a n s i e n t solution.

(4) Moving from one region t o another in a nonlinear inductance represented by piecewise l i n e a r segments. A s already indicated, only t h e history vectors have t o be modified during t h e c r i t i c a l damping adjustment period. Adjustments have been implemented f o r t h e following elements:
(1) Linear lumped inductances and capacitances.

F.1,. Alvarado, H.H. I a s s e t e r , and .J.J. Sanchez, "Testing of trapezoidal int.egration wit.h damping f o r t h e solution of power t r a n s i e n t problems,'' IEEE Trans. Power Apparatus and Systems, Vol. PAS--102, No. 12, pp. 3783.3790. Dec. 1983. . [5J R.A. Rohrer and H Nosrati, "Passivity considerations i n s t a b i l i t y s t u d i e s of numerical i n t e g r a t i o n algorithms." IEEE Trans. Circuits and Systrms, Vol. CAS-28, No. 9, pp. 857 866, Sep. 2981.

(2) Non-linear and piecewise l i n e a r inductances.


(3) Constant

distributed parameters transmission lines. History vectors a r e interpolated a t half the time s t e p .

[SI J.R. Marti, "Numerical i n t e g r a t i o n rules and frequency -de pendencr l i n e models." EMTP Newsletter, Vol. 5, No. 3. pp. 27-39, J U l 1985.
J.R. Marti, transmission tioris," IEEE PAS-101, No.

(4) Frequency dependent l i n e models ([7] and [SI). In order f o r the system's [GI matrix t o remain unchanged during t h e backward Ruler half s t e p s , t h e trapezoidal r u l e must be used f o r t h e integration c o e f f i c i e n t s in these models. (Error analysis considerations [6] had already dictated t h e convenience of replacing t h e recursive convolution c o e f f i c i e n t s of t h e original implementation of t h e s e models by trapezoidal coefficients.)
The e x t r a computer t i n e added by t h e s t a b i l i z a t i o n scheme is very small i n most cases. For t h i s reason, the CDA procedure is applied whenever a topological change occurs in t h e network. To attempt t o i s o l a t e those events that actually trigger t h e o s c i l l a t i o n s would l a r g e l y complicate t h e solution code of t h e program and, in t h e end, would probably r e s u l t i n longer simulation times.

"Accurate model 1i ng of frequency-. dependent l i n e s i n electromagnetic: t r a n s i e n t sirnula-Trans. Power Apparatus and Syst.ems, Vol. 1, pp. 147--157, .Jan. 1982.

I,. Marti, "Simulation of t r a n s i e n t s i n underground cables with frequency-dependent modal transformation matrices," IEEE-PES Winter Meeting, Feb. 1987.
R.A. Gabel and R.A. Roberts, Signals and Linear Systems, 2nd ed. (New York: Wiley, 1980), pp. 24-25.

.lost? R. Martf (M'71) was born i n Spain i n 1948. H e received a M.E. degree from Rensselaer Polytechnic I n s t i t u t e
i n 1974 and a Ph.D. degree i n Electrical Engineering from the University of British Columbia i n 1981. He worked f o r Industry from 1970 t o 1972. In 1974-77 and 1981-84 he taught power system analysis a t Central University of Venezuela. Since 1984 he has worked on EMTP development a t the University of British Columbia.

8 CONCLUSIONS
This paper has discussed t h e advantages of w i n g the t r a p e m i d a l rule of i n t e g r a t i o n a s t h e main i n t e g r a t i o n scheme i n t h e EMTP, and how t o ovt!rcome i t s drawbacks as a d i f f e r e n t j a t o r during switching conditions. The problem of siist ained numerical o s c i l l a t i o n s during switching conditions is solved by a procedure of c r i t i c a l &amping adjustment through two half-size i n t e g r a t i o n s t e p s using t.he backward Euler rule. This procedure does not require re--in.it i a l i z a t i o n or interpolation of t h r soliition. Also, s i n c e t h e representation of t h e network components in the system [GI matrix f o r one f u l l s t e p of trapezoidal is t h e same as for half a st.ep of backward Eiiler, t h e imp1ement.ation of t h e new

.liming. Lin (M'88) was born i n Fujlan. China i n 1941. H e graduated i n E l e c t r i c a l Engineering from Tsinghua University, Beijing. China i n 1964. In 1964 he joined the Electric Power Research Institute, Beijing, China. From 1964-82 he worked i n t h e High Voltage Division in switching surges, and from 1982-86 i n the Power Systems Division i n power system analysis. Since 1986 he has been a t the University of British Columbia as a Visiting Scholar working on EMTP modelling techniques.

146

Discussion
Adam Semlyen (University of Toronto): I would like to congratulate the authors for their very interesting and useful paper. It gives a simple and practical approach for getting rid of the numerical oscillations which are. often encountered in simulations using the trapezoidal rule. The authors have correctly identified the cause of these oscillations, namely the fact that the trapezoidal rule uses the average of the new and the old value of the calculated variable and, therefore, if the old value was too small then the new value may result too large (or vice versa). This situation may arise at a discontinuity of the input and the oscillations will have little damping if the time step is large compared to the smallest time constant. The backward Euler approach has no such drawback and the authors use it for two half-steps to avoid the bothersome numerical transients provoked at discontinuities. Luckily, no refactorization is needed, since the conductance matrix for the half-step backward Euler integration is the same as for the trapezoidal rule. The way the problem is presented in the paper may give the impression to the reader that numerical oscillations observed with the trapezoidal rule are primarily related to numerical differentiation. In fact, the derivative does not have to appear as part of the input. It is simply needed to justify the use of the trapezoidal rule. If, for instance, in the equation

rnugnifude ofwh. we obtain from (9), using a series expansion of z =el* with a sufficient number of retained terms,

Thus the error decreases quadratically with wh and even faster if oz is also small - the situation identified as unfavorable from the point of view of numerical oscillations. However, if m-1- the e m r is still decreasing
with the square of oh. It is interesting to note that this robust behavior of the standard trapezoidal rule is not preserved with certain modified versions which do not gwe numerical oscillations at small time step. Consider, for instance, the version which has been used in recursive convolutions [A] for the calculation of transients on transmission lines with the E M F . It could be called Input-Only Trapezoidal Integration, for the following reason. It uses the analytical solution of (3) over one step

and replaces only the input U@) in the integrand by a linear function. Thcn the integration can be performed by parts (see [A] and page 370 of [B]). It yields
= e -h
h

xo+guo+hu

(12)

di L- =-Ri+v dt
the input is v, numerical oscillations will still occur if L is small. If one could remove the derivative when L-10 but would still use the trapezoidal rule (why should one since Ri""'=vnLw would do?), equation (1) would yield i mv+iold ,,newfv oid Rp=(2a) 2 2 or, for v=COnst,

where

h
The corrcsponding transfer function is
Hlnpur-only

h
g+hz

= Z_e-hi.T

(14)

and the error can be calculated from

This clearly gives an oscillatory process and is not due to any derivative.
The oscillatory behavior of the trapezoidal rule is thus related to the small time constant of the circuit. In the differential equation

zx =-x

+U

(3)

, We now note that if k ~ z then x k + i of (1 1) will not depend on X k and thcrc will be no numerical oscillations. In this case, the error calculated from (15) will decrease quadratically with o h , as with standard trapezoidal integration,

which is sufficiently general yet simple enough for the purpose of analysis, numerical oscillations appear if the time step h>z. The additional question that arises is the influence of the magnitude of the time constant z on the error of integration. The following proof will show that the error remains small, independent of the value of z, provided that wh-1 where o is the frequency of the periodic input u = e J o l . The updating formula for (3), with trapezoidal integration over one step, is

(oh?
E;npu-only

=--- 4

However, if z > h the error may become significant. Clearly, then, the standard trapezoidal rule possesses unique properties of robustness (accuracy for any value of z if o h is chosen small enough) and, therefore, the solution of the problem of numerical oscillations is of great practical importance.

l-a x = -xo l+a


where

+--(u+uo)

I+a

(4)

h a =i L
?-

I would much appreciate having the authors' comments. I would also like to add that, in my opinion, the authors' method of inserting two half-steps of backward Euler at critical points in the trapezoidal simulation may be of value in other simulation programs in power systems or other fields.
[.41 A. Semlyen and A. Dabuleanu. "Fast and Accurate Switching Transient Calculations on Transmission Lines with Ground Return Using Recursive Convolutions", IEEE Transactions on Power Apparatus and Systems, Vol. PAS-94, MarcNApril 1975, No. 2, pp. 561-571

(5)

In the frequency domain, with z = j w h as in the paper, (4) becomes

and the transfer function becomes

[BI
Its accurate value, resulting from the direct frequency domain solution of (31, is

L.O. Chua and P.-M. Lin, "Computer-Aided Analysis of Electronic


Circuits", Prentice-Hall, 1975 Manuscript received August 3, 1988.

Hacc =
The relative error is

l+jm

J.R. Mart1 and J. Lin:

(9) If we now assume that o h a l , without making any assumption about the

The authors thank Professor Semlven f o r h i s kind comments and thorough observations. Professor Sernlyen is c o r r e c t i n pointing out t h a t numerical oscillations with t h e trapezoidal rule can occur i n s i t u a t i o n s o t h e r than pure differentiation. In order t o simplify t h e introductjon of t h e main concepts, and t o comply with space limitations, t h e authors concentrated i n t h e paper on the behaviour of pure

141
i n t e g r a t o r s and d i f f e r e n t i a t o r s (v = L(dl/dt), i = (l/c)/vdt). In t h e course of our research, however, t h e more general c a s e of terms of t h e form t o t h e solution behested by t h e driving voltage w i l l still occur, s i n c e < 1, but with ripples around t h e mean value.

\-nI

s+p'
where s = jo , was thoroughly analyzed. These basic f i r s t order terms can r e s u l t , f o r example, from expanding a t r a n s f e r function of the form

k -

The amplitude of t h e s e oscillations w i l l depend on t h e mismatch between t h e i n i t i a l c u r r e n t and t h e value imposed by t h e voltage. The o s c i l l a t i o n s a l s o become l a r g e r a s p A t becomes .. l a r g e r , i e , p A t >> 2. In t h e limit case when L-0, p A t + - . a n d Eq. (C.3) becomes Eq. (2b) i n t h e discussion. In t h i s l i m i t case, t h e o s c i l l a t i o n s become undanpened, since

[e] +-I .
2-pdl

where m 3 n and the corner points, zi, pi. are positive, simple. and d i s t i n c t [7]. Examples of this type of t r a n s f e r functions a r e the admittance of a group of R + L branches connected i n p a r a l l e l and t h e impedance of a group of R//C blocks i n

The problems described above a r e not encountered with backward Euler's rule, since in this c a s e t h e recursion c o e f f i c i e n t f o r the old c u r r e n t is always less than one and positive (Eq. (C.4)). In f a c t , i n the l i m i t c a s e L-0, Eq. (C.4) reduces t o ( l / R ) v(t), the c o r r e c t solution.

series.
If a v o l t a g e v(t) is applied t o an R + L branch ( Y = (l/L)/(s+R/L)), t h e discrete-time recursive solution for t h e c u r r e n t is given by: a ) With the trapezoidal rule:

d e s p i t e trapezoidal's shortcomings a t discontinuities, t h e rule remains very accurate, independently of t h e time constant r ( ? = U p ) , a s long a s o A t c c l , t h a t is, a s long a s w e s t a y s u f f i c i e n t l y below the Nyquist frequency: f<<1/(2A t). Professor Semlyen's comments regarding the behaviour of t h e convolution rule were a l s o corroborated i n our own work. This rule is less accurate than t h e trapezoidal r u l e and it can lead t o numerical problems for very small values of pAt (or r > h i n t h e discussion). I t was a c t u a l l y the numerical i n s t a b i l i t y problem f o r small values of pA t t h a t prompted t h e s u b s t i t u t i o n of convolution by trapezoidal i n the frequency dependence l i n e model of [7] i n DCG/EPRI's EMTP. As mentioned. t h i s change a l s o improved t h e accuracy of the model.

As pointed out i n t h e discussion.

where p

R/L.

b) With t h e backward Euler rule: i(t)=(1

+PW

I(t-At)+-

At/ L
'

(1 + p A t )

I t is seen i n Eq. (C.3) t h a t f o r pAt > 2, t h e recursion c o e f f i c i e n t f o r t h e old c u r r e n t becomes negative. Convergence

W r e i t e r a t e our thanks t o h o f e s s o r Semlyen for his e comments and f o r giving us t h e opportunity t o expand on the material presented i n t h e paper.
Manuscripc r e c e i v e d October 11, 1988.

You might also like