supression of numerical oscillations in the emtp

9
IEEE Transactions on Power Systems, Vol. 4, No. 2, May 1989 SUPPRESSION OF NUMERICAL OSCILLATIONS IN THE EMTP Jose R. Marti. Member, IEEE The University of Aritish Columbia Vancouver, B.C.. Canada Abstract - The integration scheme in the EJectromagnetic Transients Program EMTP has been modified to solve the problem of sustained numerical oscillations that. can occur when the trapezoidal rule has to act as a differentiator. These oscillations appear, for instance, on the volt.ae;e across an inductance after current interruption. The technique presented in this paper prevents these oscillations by providing critical damping of the discontinuity within one At of the simulation. The critical damplne adjustment (CDA) is achieved by means of two At/2 integration steps using the backward Euler rule. With the CDA scheme the trapezoidal rule can still be used throughout the entire siaulatiori without the problem at discontinuities. Thc! effectiveness of the new scheme is illustrated with simulat.ion results. Keywords -- discrete -time systems, numerical oscillations, integration rules, EMTP solution. 1 INTRODUCTION One important factor for the widespread use of the electromagnetic transients program EMTP [l] has probably been its choice of integration scheme. The trapezoidal rule is used in the EMTP to convert the differential equations of the network c0mponent.s into simple algebraic relationships involving voltage, current, and known past values. The accuracy of a disc:ret.e- system solution dependS on the step size At and on the integration rule. The step size determines the maximum frequencies that can hct simula tcd. and the integration rule determines the distortion at different frequencies. Thct maximum frequency that can hr: simulated is independent of the integration rule and is determined by the samplinl: rat(!. This is the Nyquist frequency Kiven by fN = 1/{2At), The distortion introdiicod by the integration rule gets worse as WI! approach the Nyquist frequency. As it is shown in this paper, the trapezoidal rule has very good characteristics in terms of low distortion and numerical stability. Moreover. the trapezoidal rule is A-stable, which means that run-off instability cannot occur. For some types of simulations. however, the ruJe may havv to work as a pure differentiator, e.g., voltage on an inductance after current interrupt ion. or currt!nt in a capacit anw aft er a voltage is switched on. Under these conditions, sustained (though bounded) numc!ric:al asci I lalions ni~:ui~. This problem has been reported in (21, 131. and 141. One suggested solution has been to add damping to the systm in order to force the oscillations to decay. Damping can be provided hy t.ht! intrigriitioii riilc itself. e.g., with bckwnrd tlnler. Gear. or some combination of rules with a net damping effect ((41. 151. [GI). Damping can also be provided c*xt.ernaIly, hy adding fictitious resistances in parallel with the inductances and in series with the capacltances (131. 141). 58 SN 732-0 by tho IEEE Pourer System Engineering Committee of the IEEE Power Engineering Society €or presentat ion at the LEEE/PES 1988 Sunnmer ).leetin::, Portland, nregon, July 24 - 29, 1988. Xanuscript suhitted .January 29, 1988; made available for printing May 27, 1988. A paper recommended and approved .liming Lin. Member, IEEE Electric Power Research Institute Beijing. Chlna 139 The major disadvantage of adding artificial damping either through the integration rule or external resistances, is that the rest of the normal system response is distorted by the phase errors introduced by the damping. Other schemes have been proposed that try to control the irregular oscillal.ions locally, without affecting the rest of tho simulation (e.g., 121). These schemes are based on rr!ad.iustments of initial c:onditions and interpo1at.ions. These techniques, however, are relatively complicated to implement for a general class of network components. The critical damping adjustment (CDA) procedure presented .in this paper belongs to this last group in the sense t.hat it eliminates the numerical oscillations locally. The main djfference, however. is that it is not based on interpolation or re-initialization, but on the property of the backward Lnler rule to provide total damping of the overshoot at. the discontinuity in exactly two integration steps (critical damping). Due to its simplicity, the mtrdifications required to implement the CDA procedure are very straightforward, not only for simple e1ement.s like inductances and capacitances. but also for more complicated models like frequency dependent transmission lines and non -1jnc:ar elements. Tht: CDA procedure has been implemented and tested in the UBC version of the EMTP with a minimum of modjfications to the overall solution scheme. It is also currently being implemented in the larger production code of t h e DCG/EPRI EMTP. fl- Thjs ptaper explains the reasons for supporting the continued use of the trapezoidal rule as the basic integration rule in the EMTP and how to solve the prohlem of sustained numerical oscillations at discontinuities with the ncw critical damping adjustment schemc:. 2 SOLUTION SCHEME IN THE EMTP The solution scheme in the EMTP (11 is based on the 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 for an inductanw U( t ) = L di(t) - dt becomes tht: difference equation This equaljon relates i(t) to v(t) Ih~urq:h ,311 t~~uivalrnl conductance At 2 1. GL-Trop = - and an equivalent current source /I t 2 L h, rrap(t) = t(f - At)+ ---v(t- At) * (3) 0885-8950/89/0500-0739$01 .WO1989 IEEE

Upload: engelx1x2x3

Post on 20-Feb-2015

73 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Supression of Numerical Oscillations in the EMTP

IEEE Transactions o n Power Systems, Vol. 4, No. 2, May 1989

SUPPRESSION OF NUMERICAL OSCILLATIONS IN THE EMTP

Jose R. Marti. Member, IEEE

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

Abstract - The integration scheme i n t h e EJectromagnetic Transients Program EMTP has been modified t o solve the problem of sustained numerical oscil lations that. can occur when the trapezoidal ru le has t o a c t as a differentiator. These oscil lations 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 these oscil lations by providing c r i t i c a l damping of the 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 teps using t h e backward Euler rule. With t h e CDA scheme t h e trapezoidal ru le can still be used throughout the en t i re siaulatiori without t h e problem at discontinuities. Thc! effectiveness of the new scheme is i l lus t ra ted with simulat.ion results. Keywords -- discre te -time systems, numerical oscil lations, integration rules, EMTP solution.

1 INTRODUCTION

One important fac tor f o r t h e widespread use of t h e electromagnetic t rans ien ts program EMTP [l] has probably been its choice of in tegra t ion scheme. The trapezoidal r u l e is used i n the EMTP t o convert the d i f fe ren t ia l equations of t h e network c0mponent.s in to simple algebraic relationships involving voltage, current, and known past values.

The accuracy of a disc:ret.e- system solution dependS on the s t e p size A t and on the integration rule. The s t e p s ize determines t h e maximum frequencies t h a t can hct simula tcd. and the integration ru le 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 the Nyquist frequency Kiven by fN = 1/{2At), The distortion introdiicod by the integration ru le 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 charac te r i s t ics in terms of low distortion and numerical s tab i l i ty . Moreover. t h e trapezoidal ru le is A-stable, which means tha t run-off ins tab i l i ty 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 af t er a voltage is switched on. Under these conditions, sustained (though bounded) numc!ric:al asci I lal ions 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 the s y s t m in order t o force the oscil lations t o decay. Damping can be provided hy t.ht! intrigriitioii riilc i t se l f . e .g . , with bckwnrd tlnler. Gear. o r some combination of rules with a ne t damping ef fec t ((41. 151. [GI). Damping can a lso be provided c*xt.ernaIly, hy adding f ic t i t ious resistances i n parallel with the inductances and in s e r i e s with the capacltances (131. 141).

58 SN 732-0 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 on a t t h e LEEE/PES 1988 Sunnmer ).leetin::, P o r t l a n d , 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.

A paper recommended and approved

.liming Lin. Member, IEEE

Electric Power Research Ins t i tu te Beijing. Chlna

139

The major disadvantage of adding a r t i f i c i a l damping e i ther through t h e integration ru le or ex terna l resistances, is t h a t the rest of the normal system response is dis tor ted 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 the i r regular oscillal.ions locally, without a f fec t ing the rest of tho simulation (e.g., 121). These schemes a r e based on rr!ad.iustments of in i t ia l c:onditions and interpo1at.ions. These techniques, however, are relatively complicated t o implement f o r a general c lass of network components.

The c r i t i ca l damping adjustment (CDA) procedure presented .in t h i s paper belongs t o t h i s las t group in t h e sense t.hat it eliminates the numerical oscil lations locally. The main djfference, however. is t h a t i t is not based on interpolation or re-init ialization, but on the property of the backward Lnler rule t o provide to ta l damping of the overshoot at. t h e discontinuity in exac t ly two integration s teps (c r i t i ca l damping).

Due t o its simplicity, the mtrdifications required t o implement the CDA procedure a r e very straightforward, not only f o r simple e1ement.s l ike inductances and capacitances. but a l so f o r more complicated models l ike frequency dependent transmission l ines and non -1jnc:ar elements. Tht: CDA procedure has been implemented and t e s t e d in the UBC version of t h e EMTP with a minimum of modjfications t o the overall solution scheme. I t is a l so currently being implemented in t h e la rger production code of t h e DCG/EPRI EMTP. fl-

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

2 SOLUTION SCHEME I N THE EMTP

The solution scheme in the EMTP (11 is based on the 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 r e l a t e s i ( t ) t o v( t ) Ih~urq:h ,311 t ~ ~ u i v a l r n l conductance

At 2 1. G L - T r o p = -

and an equivalent current source

/I t 2 L h, r r a p ( t ) = t ( f - A t ) + - - - v ( t - A t ) *

(3)

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

Page 2: Supression of Numerical Oscillations in the EMTP

740

Equation (2) can then be rewrit ten as 3 EVALUATION OF INTEGRATION RULES

3.1 ACCURACY

The accuracy of an integration r u l e can be assessed by

Applying t h e Z -transform's basic property

considering its frequency response. Source h( t ) at 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 - -At) i n t h i s case).

Similar discrete-time relationships can be found f o r o ther 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

where [GI represents t h e equivalent node conductances, [v(t)] t h e node voltages, [ i s ( t ) j the source currents, and [h(t)] t h e history terms.

If eq. ( 3 ) is discretized using backward Euler's rule instead of trapezoidal. t h e result ing differtm:e equation is

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

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

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

a s compared t o eq. (4).

Other integration ru les can also be used t o d iscre t ize eq. (1) and still a r r ive 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.

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

RULE DIFFERENCE EOIJATION 1 I I

Trapezoidal i ( t ) - i ( t - d t ) -

Backward Euler

At i ( t ) - i ( t - A t ) = - - - u ( t )

1. I Gear Second 4 1

i ( t ) - - l ( t - A t ) + - i ( t - 2 A t ) - ----U 3 3 L 1 Order I

In se lec t ing a n intop;rat.ion ru le 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 la rge variet.y of possihlf~ nc-twork c:onditions that thc! program must be able t.o simulattt, the chosen intel:ration scheme must have very good overall charact.c!ristics Iri twms of efficiency (that is, accuracy at relativrtlg l a r g e A t ' s ) and stabi1it.y.

% ( f ( t - k d t ) ) = z - " ( f ( t ) ) (10)

t o difference eq. (2) f o r t h e trapezoidal rule,

from which

Taking voltage as input and current as output, H(z) i s t h e t ransfer function of t h e d iscre te time system. The response t o a sinusoidal exc i ta t ion v( t ) = eJot is given by

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

with z = &At.

Table I a r e showri In Table 2. The t ransfor functions foi. the integration ru les of

TABLE 2 I)iscrcAtt. time t ransfer functions ~ ( z ) (z = & ) A t ) f o r the integration ru les of Tablt~ 1.

TRANSFER FUNCTION H(r) .__I__-

Trapezoidal

Rackward Euler /A t \

t I

To waluatt : tho accuracy of the rules, t h e j r frequc!ncy rt~sporisrr as in tegra tors i n t h e discreti!- timo system H(z) i s cc~mparttd with the trxact frcxluwicy response of an int f!erator i n the continuous- time systcm: H(s) :: l/(sL) for s = jo . The corresponding frequency response HS djfferentia t ors is simply t h e inverse of that as integrators: HC1ifferellt jator

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 in per unit of l/At. (fpu : f ( W ) - A t ) up t o thc! Nyquist frf!queric:y 1/(2A t ) = 0.5 in por unit.

The plots in Fig. ](a) show t h a t trapezoidal and backward Euler give fa i r ly accura te magnitude responses f o r frequencies up t o about one--fifth of the Nyquist frequency. Gear's rule is s l igh t ly less accurate while Simpson's ru le gives t h e most accurate of t h e responses shown i n t h i s f igure. In addition. Sinpson produces no phase distortion. SJmpson's rule. howcver, is not s tab le as a d i f fe ren t ia tor and, therefore, cannot be used f o r the implicit solution scheme of t h e EMTP.

Page 3: Supression of Numerical Oscillations in the EMTP

741

Circuit Element

Accuracy of Integration Rules Magnitude Response

2

1.8 - 1.6 - Slmpson

Trapezoidal Dis- Backward Buler Dis- (:re t i m t ion __ cret iza t ion

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 Frequency i n pe r un i t of (l/A t )

(a)

Accuracy of Integration Rules Phase Response

Trapoioldal :: ; 8lmpsom (Phase WrOr 0 )

0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

Frequency in p e r uni t of ( l /A t)

(b)

Fig. 1. Frequency response fo r several integrat ion rules. (a) Magnitnde. (b) Phase.

The magnitude e r ro r s i n the frequency response of the integrat ion rille produce a change in the value of the c i r cn i t elerncint. For instance. a constant inductance 1, becomes a frequency dependent LEQ(U ) a f t e r applying the trapemitla1 or backward Euler rules. The dis tor t ion in the nature of an inductance or a capacitance produced by the trapezoidal and backward Euler rules is summarized i n Table 3.

The backward Euler ru l e has a good magnitude response and also very s t rong s t ab i l i t y properties. But, a s shown in Fig. l(h). it. produces a s t rong frequency-dependent phase distortion. Due t o the incorrect phase relationship between different frequency components, sharp peaks in a simulation can be missed and a r t i f i c i a l ones can be created. This is also the case with Gear's second order rule and a l l non -symmetric rules.

The phase e r ro r s produced by non--symmetric rules d i s to r t the nat.ure of t he c i r cu i t element by introducing an a r t i f i c i a l res is tance i n the discrete-time representation of an inductance or a capacitance. This is shown i n Table 3 fo r t he backward Euler rule.

TABLE 3 Distortion in the nature of c i r cu i t components duf- t o discrutjzation .

I I I I I

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

L L Q ( u ) = L--

2L 1 R = - E Q A t

3.2 EFFICIENCY

For an overall accurate simulation, hoth magnitude and phase e r ro r s have to be kept small, with the phase e r ro r s being more c r i t i ca l for t he correct simulation of peak values. Due t o the i r phase distortion, t o obtain accurate simulation r e su l t s with ei ther t he backward Euler rule o r Gear rule requires a much smaller time s t ep A t than with the trapezoidal rule (about one order of magnitude smaller). The computer time for a t ransients simulation with the EMTP would therefore increase accordingly. Slmilar considerations apply to other non-symmetric integration rules.

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 eps 1, 2, ..., k (actual time t = k. A t ) . A s in the case of a continuous-time system, the to t a l response consists of two parts: the forced response due to the applied exci ta t ion and the dynamic response due t o the change of s t a t e (solution of the associated homogeneous equation). The general form of the dynamic response is

y t = c , p : + c,pk,+ c , p : + .. (For a derivation of t h i s equation, see fo r instance reference [Y).)

In terms of the z-domain t ransfer function H(z) of the discrete system, the p ' s in eq. (12) a re the roots of the denominator, o r poles, of t h i s function. The s t ab i l i t y condition is tha t ( p i J G 1 for each of t h e poles. Table 4 shows the poles and zeroes for the integration rules of Table 2. The roots of t he denominator determine the s t ab i l i t y of the rule a s an integrator. The roots of the numerator (zeroes of H(z)) determine the s t ab i l i t y of the ru l e a s a dlfferent ia tor . In the case of an inductance, for instance, t he discret izat ion rule is act ing as an integrator when voltage is the input and current is the output. The rule is act ing a s a different ia tor when current is injected and voltage is to be determined. (Analogous considerations apply t o a capacitance.)

Page 4: Supression of Numerical Oscillations in the EMTP

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

Gear Sr*cond Ordw

Simpson

___-- Integrator

p = 1 ( s t a b l e )

f,' I ( r ; t i lb l c )

p , - I ( s t a b l e )

p 2 0 . 3 3 ( s t n b l e )

p , = I ( s t a b l e )

p 2 = - 1 ( s t a b l e ) '

p = - 1 ( s t a b l e ) ' ____-I---

p = 0

p , = 0 ( s t a b l e ) '

p 2 =: 0 ( s tab le ) '

Rounded oscil lations Cr iLF-%-------]

Thc. conceut of s tab i l i tv as f%tahlisherl bv I D : I6 1 i.; " , . , , cnricerned only with nrimr:rical run- o f f of t h c ! rlyndmic rwponse (eq. (12)) and n o t with how thv solution t t w l s towards the fnrccd response. In t h e cas(\ of t rqwzoida l R S

R differentiator. root p-=--I , wen though t h v trwnsic!nl dynamic period "tends" towards the forc:c.!tl rc'spnnsf: on thf- avwage , it does so wit.h sustained oscil lations. This is illristratfttl in Fig. 3(b). In the case o f hackward Ell lor as a di ffi!rf!rit iator, rnot p=O, cnnvergencr t o tho forc:ed rwponso occitrs i n j u s t two time s teps of c r i t i ca l dmping (Pig. 3 ( c ) ) .

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 se 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. Par t (a) in Fig. 3 is the exac t continuous-time response: p a r t (b) shows t h e solution using the trapezoidal rule; and par t ( c ) shows the solution using the backward Euler rule.

Pig. 2. R - L branch f o r s t e p responses in Fig. 3.

The responses i n Fig. 3 show how trapezoidal osc i l la tes about the c o r r e c t solution, while Backward Euler reaches the cor rec t f ina l value in t.wo tjme steps.

trapezoidal is given by For the branch of Fig. 2, the recursive solution for

( 2 + P m i ( t ) ( 2 - P n t ) i ( t - , t ) U ( t ) = - U ( t - A t ) +

8 (13) ( d t / L ) ( A t l l . )

with p = U/L.

The solution for backward Euler is given by

Comparing eqs. (13) and (14), it can be observed tha t , a s opposed to trapezoidal, backward Euler does not car ry on the voltatce from the previous time s t e p and. therefore. it is not sensit ive t o voltage jumps i n the solution.

2.0 I 1

1.4

1.2

1 .o 0.8

0.6

0.4

0.2

0.0

0 1 2 3 4 x (At) time

3.0 -

2.0 -

1.0 -

0.0 4

-1.0 - 1

-2.0 4 0 I 2 3 4 x (At) time

2.8

0.0 4 1

0 1 2 3 4 x (At) time

( c )

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

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.

Page 5: Supression of Numerical Oscillations in the EMTP

5 NEW SOLUTION SCHEME

The c r i t i ca l damping adjust.merit. scheme (CDA) developctd in th i s work u s e s t he trapezoidal ru l e fo r the normal par t of the sirnulatlon and temporarily changes t o thc backward Euler ru l e t o go over discontinuities. The CDA scheme proceeds a s follows:

a) The simulation is s t a r t ed with t.he trapezoidal ru l e and with a time s t ep of At.

b) When a discontinuity is encoiintered (e.g. switching operations, change of slope in non--linear elements, s t ep inputs), t he integrat ion ru l e is changed t o backward Euler and the s t e p width is changed t o At/2. The system is then solved with backward Eirler fo r t he two At/2 time s t eps t h a t follow the int.roduction of the new condition.

c) The simulation resumes w i t h t he trapezoidal rule.

The two backward Euler half -steps a re suff ic ient t.o c r i t i ca l ly dampen the osci l la t ion provoked by the disc0ntinuit.y. The r e su l t s after t h e f i r s t backward Euler, half-step determine t h e in i t i a l conditions fo r t he follnwing hackward Euler half--step and a r e not pa r t of the output, which is given a t each fu l l At. Therefore, no overshoot appears in the solution. The scheme produces identical output r e su l t s as those obtained using only t h e trapezoidal rule, but without the superimposed osci l la t ions a t discont.innit1es.

143

- . SIX

6 SIMULATION RESULTS

Examples of simulations with the EMTP before and a f t e r adding the c r i t i ca l damping adjustment procedure are shown in Figs. 7 t o 9 fo r t he test cases in Figs. 4 t o 6.

Test Case 1:

The simulation in Fig. 7 shows the voltage across a non--1lnear inductance (Fig. 4) modelled by two piecewise s t ra ight- l ine segments. The simulation s t a r t s from ac in i t i a l conditions.

ONE TWO THR P 4 B I f

Fig. 4. Circuit fo r t he simulation in Fig. 7.

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

Test C a s e 2:

The simulation shown in Ffg. 8 corresponds t o the opening of a c i r cu i t breaker in-between two transmission l ines (Fig. 5). The transmission l i nes were simulated by n equivalent c i rcui ts .

Test Case 3

This case, shown in Fig. 9, corresponds t o the opening of a transmission l i ne simulated with the frequency dependence l i ne model of [7]. The c i r cu i t is shown in Fig. 6.

Fig. 5. Circuit fo r t he simulation in Fig. 8.

Fig. 6. Circuit for t he simulation i n Fig. 9.

NUllSl9.OAl UITHUUT STRBILILRTION PROCEDURE vollapcz. S c a k 10'*1*001

3.00

2.00

1.00

0.00

-1.00

-2.00

-3.00 . . . 0.00 0.10 0.20 0 30

lime 10**1-011

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

3.00 I

0 00 0 10 0 20 0 30 0 4 0

T l l C 10**1-011

Fig. 7. Voltage across non- l inear inductance. (a) Trapezoidal alone. (h) With CDA.

Page 6: Supression of Numerical Oscillations in the EMTP

7 44

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

-1 I SIX

1 S I X

-200 ! . . . , . . . . , , . . . , . . . . , , . . . , . , . . ( . . . . , , . . . , . . . . , . , . . I o o n 0.02 o 04 0 0 6 n n8 o in 0 12 o 1 4 n 16 n 18 o 20

iIle w - r - n i i

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

o m 0.02 o 0 4 on6 0 OB n in 0.12 u.14 n 16 o 18 o 20 T i l e 10.'1-011

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

It can be observed from the simulat.ions presented that the CDA procedure completely eliminates t h e numerical oscil lations of t h e t rad i t iona l scheme without d i s tor t ing the waveshapes before o r a f t e r t h e discontinuities.

If i n t h e examples above the simulations a r e performed using the backward Euler ru le instead of the trapezoidal ru le n v w the e n t i r e simulation, t h e sustained oscil lations will also he diminated. However, the At 's required in order t o achieve similar accilracies as those achieved with t h e CDA scheme a r e at l e a s t one order of magnitude smaller.

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

1.00

u.no

- 1 00

-2 no

- 3 no

- 4 no

I ONE

I ONC

Fig. 9. Line opening (frequency dependence model). (a) Trapezoitlal alone. (h) With CDA.

7 IMPLEMENTATION OF THE CDA SCHEME I N THE EMTP

The general modifications required t o implement. thc c r i t i ca l damping adjust.mcnt scheme in t h e EMTP a r e a s follows.

As described in Section 5, the net.work solution is a i f i r s t car r ied on normally using the 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 to change s t a t e s ( to 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 iri the implemeritation of t h e CDA procedure is a s follows:

(i) 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 the change in the position o f the swit.(:hes). From eq. (6),

I G I [ t 11 = [ i s ( t 1 ) J + [ t~ T I ( t I ) I 8 (15)

where the elements in the conductance matrix [(+I are represented according t o the trapezoidal ru le (eq. (3)).

Page 7: Supression of Numerical Oscillations in the EMTP

The network topology is now modified according to the new position of the switches (state 11). Matrix [GI,] is bui 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 the network components i n the [GI matrix using backward Euler with a s t e p s ize At/2 is ident ical t o the representation using trapezoidal with a s t e p size A t (compare, fo r example, eq. (8) for At/2 with eq. (3) for A t ) .

(16) The only required change for the solution with backward Euler is i n the form of the history term [hBE]. Compare, fo r instance, eqs. (9) and (4). With backward Euler, only the previous current 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 the trapezoidal rule unt i l another switching operation occurs.

In the preceding description, a change in the 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 ca l damping adjiistment. Other events t ha t can produce overshoots have t o be considered a s well.

(1) Switches, including also in th i s group other components t h a t open or close a circui t , a s fo r example diodes.

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

(3) Sources tha t s t a r t or s top durlng the t ransient solution.

(4) Moving from one region t o another in a nonlinear inductance represented by piecewise l inear segments.

A s already indicated, only the history vectors have t o be modified during the c r i t i ca l damping adjustment period. Adjustments have been implemented for the following elements:

(1) Linear lumped inductances and capacitances.

(2) Non-linear and piecewise l inear inductances.

(3) Constant distributed parameters transmission lines. History vectors a re interpolated a t half the time step.

(4) Frequency dependent l ine models ([7] and [SI). In order for the system's [GI matrix to remain unchanged during the backward Ruler half s teps , the trapezoidal ru l e must be used for the integration coeff ic ients in these models. (Error analysis considerations [6] had already dictated the convenience of replacing the recursive convolution coeff ic ients of t h e original implementation of these models by trapezoidal coefficients.)

The ex t r a computer t i n e added by the s tabi l izat ion scheme is very small in most cases. For th i s reason, the CDA procedure is applied whenever a topological change occurs in the network. To attempt t o isolate those events t ha t actual ly t r i gge r t he osci l la t ions would largely complicate the solution code of the program and, in the end, would probably r e su l t i n longer simulation times.

The following events have been considered:

8 CONCLUSIONS

This paper has discussed the advantages of w i n g the t rapemidal rule of integrat ion a s the main integrat ion scheme in the EMTP, and how t o ovt!rcome i t s drawbacks as a different ja tor during switching conditions. The problem of siist ained numerical osci l la t ions during switching conditions is solved by a procedure of c r i t i ca l &amping adjustment through two half-size integrat ion s t eps using t.he backward Euler rule. This procedure does not require re--in.i t ia l iza - t ion or interpolation of t h r soliition. Also, s ince the representation of t he network components in the system [GI matrix fo r one fu l l s t ep of trapezoidal is t h e same as for half a st.ep of backward Eiiler, the imp1ement.ation of t he new

145

scheme i n t.he EMTP is very eff ic ient and straightforwarcl. Simulation resiilts were presented that. show the effectiveness of t he new scheme.

ACKNOWLEDGMENT

The authors express the i r acknowledgment t o the Canadian Electrical Association (CEA) who on behalf of t h e EMTP Development Coordination Group (DCG) and the Electr ic Power Research Inst i tute (EPRI) are g.iving the i r financial support for the Implemc:ntation of the CDA algorithm in the DCG/EPRI version of the EMTP. Our grat i tude also t o Ilr. Hermanri W. Dommel who has actively participated in the process of development and implementation of these ideas.

REFERENCES

H.W. Dommel, "Digital computer solution of e1ectromagnr:tic t ransients in s ingle and multiphase networks." IEEE Trans. Power Apparatus and Systems, Vol. PAS-88. No. 4, pp. 388--399, Apr. 3969.

R. Kulicke, "Simiilatiorisprogramm NETOMAC: Ilifferenzen-- leitwf!rtverfahren hei kontinuierl ichen und diskontin- uier 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 the EMTP solution," EKrP Newsletter, Vol. 2. No. 3, pp. 10-19, Feb. 1982.

F.1,. Alvarado, H.H. I a s se t e r , and .J.J. Sanchez, "Testing of trapezoidal int.egration wit.h damping fo r t he solution of power t ransient 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 in s t ab i l i t y s tudies of numerical integrat ion algorithms." IEEE Trans. Circuits and Systrms, Vol. CAS-28, No. 9, pp. 857 866, Sep. 2981.

pendencr l ine models." EMTP Newsletter, Vol. 5, No. 3. pp. [SI J.R. Marti, "Numerical integrat ion rules and frequency -de

27-39, J U l 1985.

J .R. Marti, "Accurate model 1 i ng of frequency-. dependent transmission l ines in electromagnetic: t ransient sirnula-- tioris," IEEE Trans. Power Apparatus and Syst.ems, Vol. PAS-101, No. 1, pp. 147--157, .Jan. 1982.

I,. Marti, "Simulation of t ransients in 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 in 1948. He received a M.E. degree from Rensselaer Polytechnic Inst i tute i n 1974 and a Ph.D. degree i n Electrical Engineering from the University of British Columbia in 1981. He worked fo 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.

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

Page 8: Supression of Numerical Oscillations in the EMTP

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 pro- voked 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 ver- sions which do not gwe numerical oscillations at small time step. Con- sider, for instance, the version which has been used in recursive convolu- tions [A] for the calculation of transients on transmission lines with the E M F . It could be called Input-Only Trapezoidal Integration, for the fol- lowing 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

xo+guo+hu (12) = e -h h

where di dt

L- =-Ri+v

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 tra- pezoidal rule (why should one since Ri""'=vnLw would do?), equation (1) would yield

i mv+iold ,,newfv oid

(2a) R p = - 2 2

or, for v=COnst,

h h The corrcsponding transfer function is

g+hz Hlnpur-only = 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 small time constant of the circuit. In the differential equation The oscillatory behavior of the trapezoidal rule is thus related to

zx = -x +U (3) which is sufficiently general yet simple enough for the purpose of analysis, numerical oscillations appear if the time step h>z. The addi- tional 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=eJol .

The updating formula for (3), with trapezoidal integration over one step, is

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 oh , as with standard tra- pezoidal integration,

(oh? E;npu-only =--- 4

However, if z>h the error may become significant.

Clearly, then, the standard trapezoidal rule possesses unique pro- perties of robustness (accuracy for any value of z if o h is chosen small enough) and, therefore, the solution of the problem of numerical oscilla- tions is of great practical importance.

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 simula- tion may be of value in other simulation programs in power systems or other fields.

l-a a l + a I + a

x = -xo +--(u+uo) (4)

where

h a= - ?- (5) i L

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

[BI

J.R.

A. Semlyen and A. Dabuleanu. "Fast and Accurate Switching Tran- sient Calculations on Transmission Lines with Ground Return Using Recursive Convolutions", IEEE Transactions on Power Apparatus and Systems, Vol. PAS-94, MarcNApril 1975, No. 2,

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

pp. 561-571

Manuscript received August 3, 1988.

and the transfer function becomes

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

Hacc = l+jm Mart1 and J. Lin: The authors thank Professor Semlven

The relative error is f o r his kind comments and thorough observations. Professor Sernlyen is correc t in pointing out t h a t numerical oscil lations with t h e trapezoidal rule can occur i n s i tua t ions o ther than pure differentiation. In order t o simplify t h e introductjon of the main concepts, and t o comply with space limitations, t h e authors concentrated in the paper on the behaviour of pure

(9)

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

Page 9: Supression of Numerical Oscillations in the EMTP

141

t o t h e solution behested by the driving voltage w i l l still occur, s ince In-\ < 1, but with ripples around the mean value.

The amplitude of these oscillations w i l l depend on the mismatch between t h e in i t i a l current and the value imposed by the voltage. The osci l la t ions also become l a rge r a s pAt becomes larger , i.e., pAt >> 2.

In t h e limit case when L-0, pAt+- .and Eq. (C.3) becomes Eq. (2b) in t h e discussion. In th i s l i m i t case, t h e osci l la t ions

2 - p d l become undanpened, since [e] + - I .

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

As pointed out in the discussion. despi te trapezoidal's shortcomings a t discontinuities, t he rule remains very accurate, independently of the time constant r ( ?=Up) , a s long a s o A t c c l , t h a t is, a s long a s w e s tay suff ic ient ly below the Nyquist frequency: f<<1/(2A t).

Professor Semlyen's comments regarding the behaviour of t he convolution rule were also corroborated i n our own work. This rule is less accurate than the trapezoidal ru l e and it can lead t o numerical problems for very small values of pAt (or r > h in t h e discussion). I t was actual ly the numerical instabi l i ty problem for small values of pA t t h a t prompted the subst i tut ion of convolution by trapezoidal i n the frequency dependence l i n e model of [7] in DCG/EPRI's EMTP. As mentioned. t h i s change also improved the accuracy of the model.

We r e i t e r a t e our thanks t o h o f e s s o r Semlyen for his comments and fo r giving us t he opportunity t o expand on the material presented in the paper.

Manuscripc r e c e i v e d October 11, 1988.

in t eg ra to r s and different ia tors (v = L(dl/dt), i = (l/c)/vdt). In t h e course of our research, however, t he more general case of terms of t h e form

k - s + p '

where s = jo , was thoroughly analyzed. These basic f i r s t order terms can resul t , fo r example, from expanding a t ransfer function of the form

where m 3 n and the corner points, zi, pi. are positive, simple. and d i s t inc t [7]. Examples of this type of t r ans fe r functions a r e the admittance of a group of R + L branches connected in pa ra l l e l and the impedance of a group of R//C blocks in series.

If a vol tage v(t) is applied t o an R + L branch ( Y = (l/L)/(s+R/L)), t h e discrete-time recursive solution for the current is given by:

a ) With the trapezoidal rule:

where p = R/L.

b) With the backward Euler rule:

A t / L I ( t - A t ) + - i ( t ) = -

( 1 +PW ( 1 + p A t ) '

I t is seen i n Eq. (C.3) t h a t fo r pAt > 2, the recursion coeff ic ient fo r the old current becomes negative. Convergence