You are on page 1of 14

86

Power systems electromagnetic transients simulation


(a) 100 90 80 70 Simulated step Current (amps) 60 50 40 30 20 10 0 0 0.5 1 1.5 2 Time (ms) 2.5 3 3.5 4 103 Actual step i simulated i exact

(b)

110 100 90 80 70 Simulated step i simulated 60 50 40 30 20 10 0 0 0.5 1 1.5 2 Time (ms) 2.5 3 3.5 4 103 i exact Actual step

Current (amps)

Figure 4.18

Step response of an RL branch for step lengths of: (a) t = /10 and (b) t =

Numerical integrator substitution


(a) 120 i exact Actual step 100

87

80 Current (amps)

Simulated step i simulated

60

40

20

0.5

1.5

2 Time (ms)

2.5

3.5

4 103

(b)

120

i exact Actual step

100

80 Current (amps)

Simulated step

i simulated

60

40

20

0.5

1.5 2 Time (ms)

2.5

3.5

4 103

Figure 4.19

Step response of an RL branch for step lengths of: (a) t = 5 and (b) t = 10

88

Power systems electromagnetic transients simulation

The following data is used for this test system: t = 50 s, R = 1.0 , L = 0.05 mH and RSwitch = 1010 (OFF) 1010 (ON) and V1 = 100 V. Initially IHistory = 0
1.000000000 1.000000000 1.000000000 1.500000000 v 0.000000000 .1000000000E 09 2 v3 = 0.000000000 0.000000000 v1

The multiplier is 0.999999999900000. After forward reduction using this multiplier the G matrix becomes:
1.000000000 0.000000000 1.000000000 0.5000000001 v .1000000000E 09 2 0.000000000 v3 = .9999999999E 10 0.000000000 v1

Moving the known voltage v1 to the right-hand side gives


1.000000000 0.000000000 1.000000000 0.5000000001 v2 v3 = .1000000000E 09 0.000000000 v .9999999999E 10 1 0.000000000

Back substitution gives: i = 9.9999999970E 009 or essentially zero in the off state. When the switch is closed the G matrix is updated and the equation becomes:
0.1000000000E +11 1.000000000 1.000000000 1.500000000 v .1000000000E +11 2 0.000000000 v3 = 0.000000000 0.000000000 v1 v 0.000000000 .1000000000E +11 2 v3 = 0.000000000 .9999999999 v1

After forward reduction:


0.1000000000E +11 1.000000000 1.000000000 1.500000000

Moving the known voltage v1 to the right-hand side gives


1.000000000 0.000000000 1.000000000 1.500000000 v2 v3 = = 0.000000000 0.000000000 .1000000000E +11 .9999999999 v1

0.1000000000E +13 99.99999999

Hence back-substitution gives: iL = 33.333 A v2 = 66.667 V v3 = 33.333 V

4.5

Non-linear or time varying parameters

The most common types of non-linear elements that need representing are inductances under magnetic saturation for transformers and reactors and resistances of

Numerical integrator substitution

89

surge arresters. Non-linear effects in synchronous machines are handled directly in the machine equations. As usually there are only a few non-linear elements, modication of the linear solution method is adopted rather than performing a less efcient non-linear solution method for the entire network. In the past, three approaches have been used, i.e. current source representation (with one time step delay) compensation methods piecewise linear (switch representation).

4.5.1

Current source representation

A current source can be used to model the total current drawn by a non-linear component, however by necessity this current has to be calculated from information at previous time steps. Therefore it does not have an instantaneous term and appears as an open circuit to voltages at the present time step. This approach can result in instabilities and therefore is not recommended. To remove the instability a large ctitious Norton resistance would be needed, as well as the use of a correction source. Moreover there is a one time step delay in the correction source. Another option is to split the non-linear component into a linear component and non-linear source. For example a non-linear inductor is modelled as a linear inductor in parallel with a current source representing the saturation effect, as shown in Figure 4.20.

4.5.2

Compensation method

The compensation method can be applied provided there is only one non-linear element (it is, in general, an iterative procedure if more than one non-linear element is


0 2 k ikm (t)

(vk (t) vm (t)) iCompensation m

ikm

iCompensation Linear inductor

Figure 4.20

Piecewise linear inductor represented by current source

90

Power systems electromagnetic transients simulation

present). The compensation theorem states that a non-linear branch can be excluded from the network and be represented as a current source instead. Invoking the superposition theorem, the total network solution is equal to the value v0 (t) found with the non-linear branch omitted, plus the contribution produced by the non-linear branch. v(t) = v0 (t) RThevenin ikm (t) (4.51)

where RThevenin is the Thevenin resistance of the network without a non-linear branch connected between nodes k and m. is the open circuit voltage of the network, i.e. the voltage between nodes v0 (t) k and m without a non-linear branch connected. The Thevenin resistance, RThevenin , is a property of the linear network, and is calculated by taking the difference between the mth and k th columns of [GU U ]1 . This is achieved by solving [GU U ]v(t) = IU with IU set to zero except 1.0 in the mth and 1.0 in the k th components. This can be interpreted as nding the terminal voltage when connecting a current source (of magnitude 1) between nodes k and m. The Thevenin resistance is pre-computed once, before entering the time step loop and only needs recomputing whenever switches open or close. Once the Thevenin resistance has been determined the procedure at each time step is thus: (i) Compute the node voltages v0 (t) with the non-linear branch omitted. From this information extract the open circuit voltage between nodes k and m. (ii) Solve the following two scalar equations simultaneously for ikm : vkm (t) = vkm0 (t) RThevenin ikm vkm (t) = f (ikm , dikm /dt, t, . . .) (4.52) (4.53)

This is depicted pictorially in Figure 4.21. If equation 4.53 is given as an analytic expression then a NewtonRaphson solution is used. When equation 4.53 is dened point-by-point as a piecewise linear curve then a search procedure is used to nd the intersection of the two curves. (iii) The nal solution is obtained by superimposing the response to the current source ikm using equation 4.51. Superposition is permissible provided the rest of the network is linear. The subsystem concept permits processing more than one non-linear branch, provided there is only one non-linear branch per subsystem. If the non-linear branch is dened by vkm = f (ikm ) or vkm = R(t) ikm the solution is straightforward. In the case of a non-linear inductor: = f (ikm ), where the ux is the integral of the voltage with time, i.e. (t) = (t t) +
t t t

v(u) du

(4.54)

Numerical integrator substitution


vkm vkm (t ) = f (t,ikm,dikm /dt,)

91

vkm (t ) = vkm0 (t ) RThevenin ikm

ikm

Figure 4.21

Pictorial view of simultaneous solution of two equations

The use of the trapezoidal rule gives: (t) = where History = (t t) + t v(t 2 t v(t) + History (t 2 t) (4.55)

Numerical problems can occur with non-linear elements if t is too large. The non-linear characteristics are effectively sampled and the characteristics between the sampled points do not enter the solution. This can result in articial negative damping or hysteresis as depicted in Figure 4.22.

4.5.3

Piecewise linear method

The piecewise linear inductor characteristic, depicted in Figure 4.23, can be represented as a linear inductor in series with a voltage source. The inductance is changed (switched) when moving from one segment of the characteristic to the next. Although this model is easily implemented, numerical problems can occur as the need to change to the next segment is only recognised after the point exceeds the current segment (unless interpolation is used for this type of discontinuity). This is a switched model in that when the segment changes the branch conductance changes, hence the system conductance matrix must be modied. A non-linear function can be modelled using a combination of piecewise linear representation and current source. The piecewise linear characteristics can be modelled with switched representation, and a current source used to correct for the difference between the piecewise linear characteristic and the actual.

92

Power systems electromagnetic transients simulation


vkm

ikm

Figure 4.22

Articial negative damping


k
km m

ikm

Figure 4.23

Piecewise linear inductor

4.6

Subsystems

Transmission lines and cables in the system being simulated introduce decoupling into the conductance matrix. This is because the transmission line model injects current at one terminal as a function of the voltage at the other at previous time steps. There is no instantaneous term (represented by a conductance in the equivalent models) that links one terminal to the other. Hence in the present time step, there is no dependency on the electrical conditions at the distant terminals of the line. This results in a block

Numerical integrator substitution diagonal structure of the systems conductance matrix, i.e. [Y1 ] 0 0 0 [Y2 ] Y = 0 0 0 [Y3 ]

93

Each decoupled block in this matrix is a subsystem, and can be solved at each time step independently of all other subsystems. The same effect can be approximated by introducing an interface into a coupled network. Care must be taken in choosing the interface point(s) to ensure that the interface variables must be sufciently stable from one time point to the next, as one time step old values are fed across the interface. Capacitor voltages and inductor currents are the ideal choice for this purpose as neither can change instantaneously. Figure 4.24(a) illustrates coupled systems that are to be separated into subsystems. Each subsystem in Figure 4.24(b) is represented in the other by a linear equivalent. The Norton equivalent is constructed using information from the previous time step, looking into subsystem (2) from bus (A). The shunt connected at (A) is considered to be part of (1). The Norton admittance is: YN = YA + the Norton current: IN = IA (t
(a) IA subsystem 1 Y1 YA A IBA YB Z B

(YB + Y2 ) Z (1/Z + YB + Y2 ) t) + VA (t t)YA

(4.56)

(4.57)

subsystem 2 Y2

(b) A B

subsystem 1 YN

IN

ZTh VTh

subsystem 2

Figure 4.24

Separation of two coupled subsystems by means of linearised equivalent sources

94

Power systems electromagnetic transients simulation

the Thevenin impedance: ZTh = and the voltage source: VTh = VB (t t) + ZT h IBA (t t) (4.59) 1 YB Z + 1/(Y1 + YA ) Z + 1/(Y1 + YA ) + 1/YB (4.58)

The shunts (YN and ZT h ) represent the instantaneous (or impulse) response of each subsystem as seen from the interface busbar. If YA is a capacitor bank, Z is a series inductor, and YB is small, then YN ZTh YA and YN = IBA (t t) (the inductor current) Z and VTh = VA (t t) (the capacitor voltage)

When simulating HVDC systems, it can frequently be arranged that the subsystems containing each end of the link are small, so that only a small conductance matrix need be re-factored after every switching. Even if the link is not terminated at transmission lines or cables, a subsystem boundary can still be created by introducing a one time-step delay at the commutating bus. This technique was used in the EMTDC V2 B6P110 converter model, but not in version 3 because it can result in instabilities. A d.c. link subdivided into subsystems is illustrated in Figure 4.25. Controlled sources can be used to interface subsystems with component models solved by another algorithm, e.g. components using numerical integration substitution on a state variable formulation. Synchronous machine and early non-switch-based
(a) AC system 1 AC system 2

(b) AC system 1 AC system 2

Subsystem 1

Subsystem 2

Subsystem 3

Subsystem 4

Figure 4.25

Interfacing for HVDC link

Numerical integrator substitution

95

SVC models use a state variable formulation in PSCAD/EMTDC and appear to their parent subsystems as controlled sources. When interfacing subsystems, best results are obtained if the voltage and current at the point of connection are stabilised, and if each component/model is represented in the other as a linearised equivalent around the solution at the previous time step. In the case of synchronous machines, a suitable linearising equivalent is the subtransient reactance, which should be connected in shunt with the machine current injection. An RC circuit is applied to the machine interface as this adds damping to the high frequencies, which normally cause model instabilities, without affecting the low frequency characteristics and losses.

4.7

Sparsity and optimal ordering

The connectivity of power systems produces a conductance matrix [G] which is large and sparse. By exploiting the sparsity, memory storage is reduced and signicant solution speed improvement results. Storing only the non-zero elements reduces memory requirements and multiplying only by non-zero elements increases speed. It takes a computer just as long to multiply a number by zero as by any other number. Finding the solution of a system of simultaneous linear equations ([G]V = I ) using the inverse is very inefcient as, although the conductance matrix is sparse, the inverse is full. A better approach is the triangular decomposition of a matrix, which allows repeated direct solutions without repeating the triangulation (provided the [G] matrix does not change). The amount of ll-in that occurs during the triangulation is a function of the node ordering and can be minimised using optimal ordering [7]. To illustrate the effect of node ordering consider the simple circuit shown in Figure 4.26. Without optimal ordering the [G] matrix has the structure: X X X X X X X 0 0 0 X 0 X 0 0 X 0 0 X 0 X 0 0 0 X After processing the rst row the structure is: 1 X X X 0 X X X 0 X X X 0 X X X 0 X X X X X X X X

When completely triangular the upper triangular structure is full 1 X X X X 0 1 X X X 0 0 1 X X 0 0 0 1 X 0 0 0 0 1

96

Power systems electromagnetic transients simulation


2 Z2 1 Z3 3

Z5 Z1 5

Z4

Figure 4.26

Example of sparse network

If instead node 1 is ordered last then the [G] matrix has the structure: X 0 0 0 X 0 X 0 0 X 0 0 X 0 X 0 0 0 X X X X X X X After processing the rst row the structure is: 1 0 0 0 0 X 0 0 0 0 X 0 0 0 0 X 0 X X X X X X X X

When triangulation is complete the upper triangular matrix now has less ll-in. 1 0 0 0 X 0 1 0 0 X 0 0 1 0 X 0 0 0 1 X 0 0 0 0 1 This illustration uses the standard textbook approach of eliminating elements below the diagonal on a column basis; instead, a mathematically equivalent row-by-row elimination is normally performed that has programming advantages [5]. Moreover symmetry in the [G] matrix allows only half of it to be stored. Three ordering schemes have been published [8] and are now commonly used in transient programs. There is a tradeoff between the programming complexity, computation effort and level of

Numerical integrator substitution

97

optimality achieved by these methods, and the best scheme depends on the network topology, size and number of direct solutions required.

4.8

Numerical errors and instabilities

The trapezoidal rule contains a truncation error which normally manifests itself as chatter or simply as an error in the waveforms when the time step is large. This is particularly true if cutsets of inductors and current sources, or loops of capacitors and voltage sources exist. Whenever discontinuities occur (switching of devices, or modication of non-linear component parameters, ) care is needed as these can initiate chatter problems or instabilities. Two separate problems are associated with discontinuities. The rst is the error in making changes at the next time point after the discontinuity, for example current chopping in inductive circuits due to turning OFF a device at the next time point after the current has gone to zero, or proceeding on a segment of a piecewise linear characteristic one step beyond the knee point. Even if the discontinuity is not stepped over, chatter can occur due to error in the trapezoidal rule. These issues, as they apply to power electronic circuits, are dealt with further in Chapter 9. Other instabilities can occur because of time step delays inherent in the model. For example this could be due to an interface between a synchronous machine model and the main algorithm, or from feedback paths in control systems (Chapter 8). Instabilities can also occur in modelling non-linear devices due to the sampled nature of the simulation as outlined in section 4.5. Finally bangbang instability can occur due to the interaction of power electronic device non-linearity and non-linear devices such as surge arresters. In this case the state of one inuences the other and nding the appropriate state can be difcult.

4.9

Summary

The main features making numerical integration substitution a popular method for the solution of electromagnetic transients are: simplicity, general applicability and computing efciency. Its simplicity derives from the conversion of the individual power system elements (i.e. resistance, inductance and capacitance) and the transmission lines into Norton equivalents easily solvable by nodal analysis. The Norton current source represents the component past History terms and the Norton impedance consists of a pure conductance dependent on the step length. By selecting the appropriate integration step, numerical integration substitution is applicable to all transient phenomena and to systems of any size. In some cases, however, the inherent truncation error of the trapezoidal method may lead to oscillations; improved numerical techniques to overcome this problem will be discussed in Chapters 5 and 9. Efcient solutions are possible by the use of a constant integration step length throughout the study, which permits performing a single conductance matrix

98

Power systems electromagnetic transients simulation

triangular factorisation before entering the time step loop. Further efciency is achieved by exploiting the large sparsity of the conductance matrix. An important concept is the use of subsystems, each of which, at a given time step, can be solved independently of the others. The main advantage of subsystems is the performance improvement when multiple time-steps/interpolation algorithms are used. Interpolating back to discontinuities is performed only on one subsystem. Subsystems also allow parallel processing hence real-time applications as well as interfacing different solution algorithms. If sparsity techniques are not used (early EMTDC versions) then subsystems also greatly improve the performance.

4.10

References

1 DOMMEL, H. W.: Digital computer solution of electromagnetic transients in single- and multi-phase networks, IEEE Transactions on Power Apparatus and Systems, 1969, 88 (2), pp. 73441 2 DOMMEL, H. W.: Nonlinear and time-varying elements in digital simulation of electromagnetic transients, IEEE Transactions on Power Apparatus and Systems, 1971, 90 (6), pp. 25617 3 DOMMEL, H. W.: Techniques for analyzing electromagnetic transients, IEEE Computer Applications in Power, 1997, 10 (3), pp. 1821 4 BRANIN, F. H.: Computer methods of network analysis, Proceedings of IEEE, 1967, 55, pp. 17871801 5 DOMMEL, H. W.: Electromagnetic transients program reference manual: EMTP theory book (Bonneville Power Administration, Portland, OR, August 1986). 6 DOMMEL, H. W.: A method for solving transient phenomena in multiphase systems, Proc. 2nd Power System Computation Conference, Stockholm, 1966, Rept. 5.8 7 SATO, N. and TINNEY, W. F.: Techniques for exploiting the sparsity of the network admittance matrix, Transactions on Power Apparatus and Systems, 1963, 82, pp. 94450 8 TINNEY, W. F. and WALKER, J. W.: Direct solutions of sparse network equations by optimally ordered triangular factorization, Proceedings of IEEE, 1967, 55, pp. 18019

Chapter 5

The root-matching method

5.1

Introduction

The integration methods based on a truncated Taylors series are prone to numerical oscillations when simulating step responses. An interesting alternative to numerical integration substitution that has already proved its effectiveness in the control area, is the exponential form of the difference equation. The implementation of this method requires the use of root-matching techniques and is better known by that name. The purpose of the root-matching method is to transfer correctly the poles and zeros from the s -plane to the z-plane, an important requirement for reliable digital simulation, to ensure that the difference equation is suitable to simulate the continuous process correctly. This chapter describes the use of root-matching techniques in electromagnetic transient simulation and compares its performance with that of the conventional numerical integrator substitution method described in Chapter 4.

5.2

Exponential form of the difference equation

The application of the numerical integrator substitution method, and the trapezoidal rule, to a series RL branch produces the following difference equation for the branch: ik = (1 (1 + tR/(2L)) t/(2L) i k 1 + (vk + vk 1 ) tR/(2L)) (1 + tR/(2L)) (5.1)

Careful inspection of equation 5.1 shows that the rst term is a rst order approximation of ex , where x = tR/L and the second term is a rst order approximation of (1 ex )/2 [1]. This suggests that the use of the exponential expressions in the difference equation should eliminate the truncation error and thus provide accurate and stable solutions regardless of the time step.

You might also like