EMTP simul(10)

download EMTP simul(10)

of 14

Transcript of EMTP simul(10)

  • 7/27/2019 EMTP simul(10)

    1/14

    100 Power systems electromagnetic transients simulation

    Equation 5.1 can be expressed as:

    ik = etR/Lik1 +

    1 etR/L

    vk (5.2)

    Although the exponential form of the difference equation can be deduced from the

    difference equation developed by the numerical integrator substitution method, this

    approach is unsuitable for most transfer functions or electrical circuits, due to the

    difficulty in identifying the form of the exponential that has been truncated. The

    root-matching technique provides a rigorous method.

    Numerical integrator substitution provides a mapping from continuous to discrete

    time, or equivalently from the s to the z-domain. The integration rule used will influ-

    ence the mapping and hence the error. Table 5.1 shows the characteristics of forward

    rectangular, backward rectangular (implicit or backward Euler) and trapezoidal inte-

    grators, including the mapping of poles in the left-hand halfs-plane into the z-plane.If the continuous system is stable (has all its poles in the left-hand half s-plane) then

    under forward Euler the poles in the z-plane can lie outside the unit circle and hence

    an unstable discrete system can result. Both backward Euler and the trapezoidal rule

    give stable discrete systems, however stability gives no indication of the accuracy of

    the representation.

    The use of the trapezoidal integrator is equivalent to the bilinear transform (or

    Tustin method) for transforming from a continuous to a discrete system, the former

    being the time representation of the latter. To illustrate this point the bilinear transform

    will be next derived from the trapezoidal rule.In the s-plane the expression for integration is:

    Y(s)

    X(s)= 1

    s(5.3)

    In discrete time the trapezoidal rule is expressed as:

    yn = yn1 +t

    2(xn + xn1) (5.4)

    Transforming equation 5.4 to the z-plane gives:

    Y(z) = z1Y(z) + t2

    (X(z) + X(z)z1) (5.5)

    Rearranging gives for integration in the z-domain:

    Y(z)

    X(z)= t

    2

    (1 + z1)(1 z1) (5.6)

    Equating the two integration expressions (i.e. equations 5.3 and 5.6) gives the wellknown bilinear transform equation:

    s 2t

    (1 z1)(1 + z1) (5.7)

  • 7/27/2019 EMTP simul(10)

    2/14

    The root-matching method 101

    Table5.1

    Integratorcharacteristics

    Name

    Forw

    ardrectangular

    B

    ackwardrectangular

    Trapezoidal

    (forw

    ardEuler)

    (implicit/backwardEuler)

    Waveform

    u

    t

    t

    u

    u

    t

    Integrator

    yk=

    yk1+

    tfk1

    yk=

    yk1+

    tfk

    yk=

    yk1+

    t

    2(fk+

    fk1)

    Differentiator

    yk=

    yk+1

    yk

    t

    yk=

    yk

    yk1

    t

    yk=

    2 t

    (yk

    yk1)

    yk1

    Approximationtos

    s

    z

    1t

    s

    z

    1

    tz

    s

    2 t

    (z

    1)

    (z+

    1)

    stoz-plane

    j

    Forward

    rec

    tangular

    1

    j

    B

    ackward

    re

    ctangular

    1

    1

    j

    Trapezoidal

    rule

    1

    1

  • 7/27/2019 EMTP simul(10)

    3/14

    102 Power systems electromagnetic transients simulation

    Hence the trapezoidal rule and the bilinear transform give the same mapping between

    the s and z-planes and are therefore identical.

    Equation 5.7 can also be derived from an approximation of an exponential. The

    actual relationship between s and z is:

    z = est (5.8)

    Hence

    z1 = est (5.9)Expressing est as two exponential functions and then using the series approxima-tion gives:

    z1

    =est

    =

    est/2

    est/2

    (1 st/2)

    (1 + st/2)(5.10)

    Rearranging for s gives:

    s 2t

    (1 z1)

    (1 + z1) (5.11)

    which is identical to equation 5.7. Hence the trapezoidal rule (and many other inte-

    gration rules for that matter) can be considered as a truncated series approximation

    of the exact relationship between s and z.

    5.3 z-domain representation of difference equations

    Digital simulation requires the use of the z-domain, either in the form of a transfer

    function or as an equivalent difference equation.

    In the transfer function approach:

    H(z) = a0 + a1 z1 + a2 z2 + + am zm

    1 + b1 z1 + b2 z2 + + bm zm= Y(z)

    U(z)(5.12)

    or expressed as a two-sided recursion [2]a0 + a1 z1 + a2 z2 + + am zm

    U(z)

    =

    1 + b1 z1 + b2 z2 + + bm zm

    Y(z) (5.13)

    Equation 5.13 can be implemented directly and without any approximation as a Norton

    equivalent.

    Rearranging equation 5.13 gives:

    Y(z) =

    a0 + a1 z1 + a2 z2 + + am zm

    U(z)

    b1 z1 + b2 z2 + + bm zm

    Y(z) (5.14)

  • 7/27/2019 EMTP simul(10)

    4/14

    The root-matching method 103

    The corresponding difference equation is:

    y(kt) = (a0 u + a1 u1 + a2 u2 + + am um)

    (b

    1 y

    1 +b

    2 y

    2 + +b

    m y

    m)

    (5.15)The first term on the right side of equation 5.15 is the instantaneous term between

    input and output, while the other terms are history terms. Hence the conductance is

    a0 and the history term is:

    a1u1 + a2u2 + + amum b1y1 + b2y2 + + bmym (5.16)Whereas in the s-domain stability is ensured if poles are in the left-hand half-plane,

    the equivalent criterion in the z-plane is that the poles must reside inside the unit

    circle.

    In the transformation from the s to z-plane, as required by digital simulation, the

    poles and zeros must be transformed correctly and this is the purpose of the root-

    matching technique. In other words, to ensure that a difference equation is suitable

    to simulate a continuous process the poles, zeros and final value of the difference

    equation should match those of the actual system. If these conditions are met the

    difference equations are intrinsically stable, provided the actual system is stable,

    regardless of the step size. The difference equations generated by this method involve

    exponential functions, as the transform equation z1 = est is used rather thansome approximation to it.

    When integrator substitution is used to derive a difference equation, the polesand zeros usually are not inspected, and these can therefore be poorly positioned or

    there can even be extra poles and zeros. Because the poles and zeros of the difference

    equation do not match well those of the continuous system, there are situations when

    the difference equation is a poor representation of the continuous system.

    The steps followed in the application of the root-matching technique are:

    1. Determine the transfer function in the s-plane, H(s) and the position of its poles

    and zeros.

    2. Write the transfer function H(s) in the z-plane using the mapping z=

    est, thus

    ensuring the poles and zeros are in the correct place. Also add a constant to allow

    adjustment of the final value.

    3. Use the final value theorem to compute the final value ofH(s) for a unit step input.

    4. Determine the final value ofH(z) for unit step input and adjust the constant to be

    the correct value.

    5. Add extra zeros depending on the assumed input variation between solution points.

    6. Write the resulting z-domain equation in the form of a difference equation.

    The final value ofH(s) must not be zero to allow the final value matching constant

    in H(z) to be determined. When that happens the final value is matched for a different

    input. For example some systems respond to the derivative of the input and in such

    cases the final value for a unit ramp input is used.

    Appendix E (sections E.1 and E.2) illustrate the use of the above procedure with

    a single order lag function and a first order differential pole, respectively. Table 5.2

  • 7/27/2019 EMTP simul(10)

    5/14

    104 Power systems electromagnetic transients simulation

    Table 5.2 Exponential form of difference equation

    Transfer function Expression for Norton

    H(s) = G1 + s

    R = 1/kIHistory = et/ Itt

    k = G (1 et/)

    H(s) = G (1 + s )

    R = 1/kIHistory = k et/ Vtt

    k = G(1 et/)

    H(s) = G s1 + s

    R = 1/kIHistory = et/ Itt k Vtt

    k = G (1 et/)

    t

    H(s) = G (1 + s1)(1 + s2)

    R = 1/kIHistory = et/2 Itt k Vtt et/1

    k

    =

    G (1 et/1 )

    (1 et/2

    )

    H(s) = G 2n

    s2 + 2 ns + 2n

    R = 1/kIHistory = A Itt B It2t

    k = G (1 etp1) (1 etp2)= G (1 A + B)

    H(s) = G s2

    ns2 + 2 ns + 2n

    R = 1/kIHistory = k Vtt + A Itt B It2t

    k = G (1 et

    p1

    ) (1 et

    p2

    )t

    = G (1 A + B)t

    H(s) = G (s2 + 2 n + 2n)

    sn

    R = kIHistory = Itt

    A

    k Vtt +

    B

    k It2t

    k = G (1 etp1) (1 etp2)

    t

    = G (1 A + B)t

  • 7/27/2019 EMTP simul(10)

    6/14

    The root-matching method 105

    gives expressions of the exponential form of difference equation for various s-domain

    transfer functions.

    In Table 5.2, A and B are as follows:

    If two real roots ( > 1):

    A = 2e nt

    et n

    21 + et n

    21

    B = e2 nt

    If two repeated roots ( = 1):

    A = 2ent

    B=

    e2nt

    If complex roots ( < 1):

    A = 2e nt cos

    nt

    1 2

    B = e2 nt

    By using the input form shown in Figure 5.13(a) on page 113, the homogeneous

    solution of the difference equation matches the homogeneous solution of the dif-

    ferential equation exactly. It also generates a solution of the differential equationsresponse that is exact for the step function and a good approximation for an arbitrary

    forcing function.

    5.4 Implementation in EMTP algorithm

    The exponential form of the difference equation can be viewed as a Norton equivalent

    in just the same way as the difference equation developed by Dommels method, the

    only difference being the formula used for the derivation of the terms. Figure 5.1illustrates this by showing the Norton equivalents of a series RL branch devel-

    oped using Dommels method and the exponential form respectively. Until recently

    it has not been appreciated that the exponential form of the difference equation

    can be applied to the main electrical components as well as control equations, in

    time domain simulation. Both can be formed into Norton equivalents, entered in

    the conductance matrix and solved simultaneously with no time step delay in the

    implementation.

    To remove all the numerical oscillations when the time step is large compared to

    the time constant, the difference equations developed by root-matching techniquesmust be implemented for all series and parallel RL, RC , LC and RLC combinations.

    The network solution of Dommels method is:

    [G]v(t) = i(t) + IHistory (5.17)

  • 7/27/2019 EMTP simul(10)

    7/14

    106 Power systems electromagnetic transients simulation

    2LR+

    t

    IHistory =

    IHistory IHistory

    ikm (t) ikm (t)

    vkm (t)

    i(tt) + v (tt) IHistory= e tR / L

    i (tt)

    mm

    k k

    Dommels method Exponential form

    R

    (1e tR / L)

    (1tR/(2L))

    (1+tR/(2L)) (1+tR/(2L))

    (t/(2L))

    Figure 5.1 Norton equivalent forRL branch

    Structurally the root-matching algorithm is the same as Dommels, the only differ-

    ence being in the formula used for the derivation of the conductance and past history

    terms. Moreover, although the root-matching technique can also be applied to single

    L or C elements, there is no need for that, as in such cases the response is no longer

    of an exponential form. Hence Dommels algorithm is still used for converting indi-vidual L and C elements to a Norton equivalent. This allows difference equations,

    hence Norton equivalents, based on root-matching methods to be used in existing

    electromagnetic transient programs easily, yet giving unparalleled improvement in

    accuracy, particularly for large time steps.

    In the new algorithm, IHistory includes the history terms of both Dommels and the

    root-matching method. Similarly the conductance matrix, which contains the conduc-

    tance terms of the Norton equivalents, includes some terms from Dommels technique

    and others of the exponential form developed from the root-matching technique.

    The main characteristics of the exponential form that permit an efficientimplementation are:

    The exponential term is calculated and stored prior to entering the time step loop. During the time step loop only two multiplications and one addition are required

    to calculate the IHistory term. It is thus more efficient than NIS using the

    trapezoidal rule.

    Fewer previous time step variables are required. Only the previous time step currentis needed for an RL circuit, while Dommels method requires both current and

    voltage at the previous time-step.

    Three simple test cases are used to illustrate the algorithms capability [3]. The

    first case shown in Figure 5.2 relates to the switching of a series RL branch. Using

    a t = time step ( being the time constant of the circuit), Figure 5.3 showsthe current response derived from Dommels method, the exponential method and

  • 7/27/2019 EMTP simul(10)

    8/14

    The root-matching method 107

    Vdc =100V

    t=0.01s

    R =1.0

    L=0.05mH

    Figure 5.2 Switching test system

    Current(amps)

    0.0008 0.0011 0.0014 0.0017 0.002

    Time (s)

    Exponential form Dommels method Theoretical curve

    40.0

    60.0

    80.0

    100.0

    0.0

    20.0

    Figure 5.3 Step response of switching test system fort =

    continuous analysis (theoretical result). At this time step, Dommels method does not

    show numerical oscillations, but introduces considerable error. The results shown in

    Figure 5.4 correspond to a time step of t = 5 ( = 50s). Dommels methodnow exhibits numerical oscillations due to truncation errors, whereas the exponential

    form gives the correct answer at each solution point. Increasing the time step to

  • 7/27/2019 EMTP simul(10)

    9/14

    108 Power systems electromagnetic transients simulation

    0.0

    20.0

    40.0

    60.0

    80.0

    100.0

    120.0

    Current(amps)

    Time (s)

    Exponential form Dommels method Theoretical curve

    0.0005 0.001375 0.00225 0.003125 0.004

    Figure 5.4 Step response of switching test system fort = 5

    Current(amps)

    Time (s)

    Exponential form Dommels method Theoretical curve

    0.0

    20.0

    40.0

    60.0

    80.0

    100.0

    120.0

    0 0.001 0.002 0.003 0.004

    Figure 5.5 Step response of switching test system fort = 10

    t = 10 results in much greater numerical oscillation for Dommels method, whilethe exponential form continues to give the exact answer (Figure 5.5).

    The second test circuit, shown in Figure 5.6, consists of a RLC circuit with a

    resonant frequency of 10 kHz, excited by a 5 kHz current source. Figures 5.7 and 5.8

  • 7/27/2019 EMTP simul(10)

    10/14

    The root-matching method 109

    Sine-wave excitation

    5 kHz or 10 kHzLC

    f=2

    1

    L= 0.2533mH

    R = 1

    C= 1F

    =10kHz

    Figure 5.6 Resonance test system

    Voltage(volts)

    0.0001 0.0004 0.0007 0.001

    Time (s)

    Exponential form Dommels method

    0

    10

    20

    30

    40

    50

    60

    Figure 5.7 Comparison between exponential form and Dommels method to a 5 kHzexcitation for resonance test system. t = 25 s

    show the voltage response using 25s and 10s time steps, respectively. Consid-erable deviation from the expected sinusoidal waveform is evident for Dommels

    method. Figure 5.9 shows the comparison when the excitation contains a 10 kHz

    component of 1 A peak for a time-step of 10s. At that frequency the inductance and

    capacitance cancel out and the exponential form gives the correct response, i.e. a 2 V

    peak-to-peak 10 kHz sinusoid on top of the d.c. component (shown in Figure 5.10),

    whereas Dommels method oscillates. The inductor current leads the capacitor voltage

    by 90 degrees. Therefore, when initialising the current to zero the capacitor voltage

    should be at its maximum negative value. If the capacitor voltage is also initialised to

    zero a d.c. component of voltage (|V

    | =I/C) is effectively added, which is equiv-

    alent to an additional charge on the capacitor to change its voltage from maximum

    negative to zero.

    A third test circuit is used to demonstrate the numerical problem of current chop-

    ping in inductive circuits. A common example is the modelling of power electronic

  • 7/27/2019 EMTP simul(10)

    11/14

    110 Power systems electromagnetic transients simulation

    Voltage(volts)

    0.0001 0.0004 0.0007 0.001

    Time (s)

    Exponential form Dommels method

    0

    14

    28

    42

    56

    70

    Figure 5.8 Comparison between exponential form and Dommels method to a 5 kHzexcitation for resonance test system. t = 10 s

    V

    oltage(volts)

    Time (s)

    Exponential form Dommels method

    5

    5

    15

    25

    35

    0.0001 0.0004 0.0007 0.001

    Figure 5.9 Comparison between exponential form and Dommels method to 10 kHz

    excitation for resonance test system

  • 7/27/2019 EMTP simul(10)

    12/14

    The root-matching method 111

    Voltage(volts)

    0.0001 0.0004 0.0007 0.00114.4

    14.8

    15.2

    15.6

    16

    16.4

    Time (s)

    Exponential form

    Figure 5.10 Response of resonance test system to 10 kHz excitation, blow-up ofexponential forms response

    100V

    (RMS)VLOAD

    = 50s

    L=0.05mH

    R = 1

    Figure 5.11 Diode test system

    devices such as diodes and thyristors. Although the changes of state are constrained to

    occur at multiples of the step length, the current falls to zero between these points [4];

    thus the change occurs at the time point immediately after and hence effectively turn-

    ing the device off with a slight negative current. To demonstrate this effect Figure 5.11

    uses a simple system where an a.c. voltage source supplies power to an RL load via a

    diode. Figure 5.12(a) shows the load voltage for the exponential form and Dommels

    method using a time-step of 500s. This clearly shows the superiority of the expo-

    nential form of difference equation. The numerical oscillation at switch-off depends

    on how close to a time point the current drops to zero, and hence the size of negative

    current at the switching point. The negative current at switching is clearly evident in

    the load current waveform shown in Figure 5.12(b).

  • 7/27/2019 EMTP simul(10)

    13/14

    112 Power systems electromagnetic transients simulation

    Voltage(volts)

    Time (s)

    Current(amps)

    Time (s)

    40

    10

    20

    50

    80

    110

    140(a)

    (b)

    0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

    Exponential Form Dommels method

    Exponential form Dommels method

    40

    0

    40

    80

    120

    160

    0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

    Figure 5.12 Response to diode test system (a) Voltage (b) Current

    These three test circuits clearly demonstrate the accuracy and stability of the

    exponential form of the difference equation regardless of the time step.

    5.5 Family of exponential forms of the difference equation

    In the root-matching technique used to derive the exponential form of a difference

    equation the poles and zeros of the s-domain function are matched in the z-domain

  • 7/27/2019 EMTP simul(10)

    14/14

    The root-matching method 113

    u (t) u (t) u (t) u (t)

    t t t t

    (a) (b) (c) (d)

    Figure 5.13 Input as function of time

    u 1y

    R

    L

    G

    R

    R

    1+ sL

    1

    Gs

    G

    1 +s

    1 +s

    H(s) =I(s)

    V(s)H(s) =

    ==

    Figure 5.14 Control or electrical system as first order lag

    function. Extra zeros are added based on the assumed discretisation on the input,

    which is continuous [5]. Figure 5.13 shows some of the possible discretisations

    and these result in a family of exponential forms of the difference equation. The

    root-matching technique is equally applicable to equations representing control or

    electrical systems [6]. For each of the discretisation types, with reference to the first

    order lag function shown in Figure 5.14, the use of the root-matching technique

    expressed as a rational function in z1 produces the following exponential formdifference equations.

    Input type (a):

    y(z)

    u(z)= b/a(1 e

    at)(1 z1eat)

    Input type (b):

    y(z)

    u(z) =b/a(1

    eat)z1

    (1 z1eat)Input type (c):

    y(z)

    u(z)= b/(2a)(1 e

    at)(1 + z1)(1 z1eat)