EMTP simul(27)

  • Upload
    kjfen

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

  • 7/27/2019 EMTP simul(27)

    1/14

  • 7/27/2019 EMTP simul(27)

    2/14

    Structure of the PSCAD/EMTDC program 339

    The main component models used in EMTDC, i.e. transmission lines, syn-

    chronous generators and transformers, as well as control and switching modelling

    techniques, have already been discussed in previous chapters.

    Due to the popularity of the WINDOWS operating system on personal comput-

    ers, a complete rewrite of the successful UNIX version was performed, resulting in

    PSCAD version 3. New features include:

    The function of DRAFT and RUNTIME has been combined so that plots are put

    on the circuit schematic (as shown in Figure A.8).

    The new graphical user interface also supports: hierarchical design of circuit pages

    and localised data generation only for modified pages, single-line diagram data

    entry, direct plotting of all simulation voltages, currents and control signals, without

    writing to output files and more flexible multiple-run control.

    A MATLAB to PSCAD/EMTDC interface has been developed. The interfaceenables controls or devices to be developed in MATLAB, and then connected in

    any sequence to EMTDC components. Full access to the MATLAB toolboxes will

    be supported, as well as the full range of MATLAB 2D and 3D plotting commands.

    EMTDC V3 includes ideal switches with zero resistance, ideal voltage sources,

    improved storage methods and faster switching operations. Fortran 90/95 will be

    given greater support.

    A new solution algorithm (the root-matching technique) is implemented for control

    circuits which eliminates the errors due to trapezoidal integration but which is still

    numerically stable.

    Figure A.8 PSCAD Version 3 interface

  • 7/27/2019 EMTP simul(27)

    3/14

    340 Power systems electromagnetic transients simulation

    New transmission-line and cable models using the phase domain (as opposed to

    modal domain) techniques coupled with more efficient curve fitting algorithms

    have been implemented, although the old models are available for compatibility

    purposes.

    To date an equivalent for the very powerful MULTIPLOT post-processing program

    is not available, necessitating exporting to MATLAB for processing and plotting.

    PSCAD version 2 had many branch quantities that were accessed using the node

    numbers of its terminals (e.g. CDC, EDC, GDC, CCDC, etc.). These have been

    replaced by arrays (GEQ, CBR, EBR, CCBR, etc.) that are indexed by branch num-

    bers. For example CBR(10,2) is the 10th branch in subsystem 2. This allows an

    infinite number of branches in parallel whereas version 2 only allowed three switched

    branches in parallel. Version 2 had a time delay in the plotting of current through indi-

    vidual parallel switches (only in plotting but not in calculations). This was because themain algorithm only computed the current through all the switches in parallel, and the

    allocation of current in individual switches was calculated from a subroutine called

    from DSDYN. Old version 2 code can still run on version 3, as interface functions

    have been developed that scan through all branches until a branch with the correct

    sending and receiving nodes is located. Version 2 code that modifies the conductance

    matrix GDC directly needs to be manually changed to GEQ.

    Version 4 of PSCAD/EMTDC is at present being developed. In version 3 a circuit

    can be split into subpages using page components on the main page. If there are

    ten page components on the main page connected by transmission lines or cables,

    then there will be ten subsystems regardless of the number of subpages branching

    off other pages. Version 4 has a new single line diagram capability as well as a new

    transmission line and cable interface consisting of one object, instead of the three

    currently used (sending end, receiving end and line constants information page). The

    main page will show multiple pages with transmission lines directly connected to

    electrical connections on the subpage components. PSCAD will optimally determine

    the subsystem splitting and will form subsystems wherever possible.

    A.1 References

    1 WOODFORD, D. A., INO, T., MATHUR, R. M., GOLE, A. M. and WIERCKX, R.:

    Validation of digital simulation of HVdc transients by field tests, IEE Conference

    Publication on AC and DC power transmission, 1985, 255, pp. 37781

    2 WOODFORD, D. A., GOLE, A. M. and MENZIES, R. W.: Digital simulation of

    DC links and AC machines, IEEE Transactions on Power Apparatus and Systems,

    1983, 102 (6), pp. 161623

    3 KUFFEL, P., KENT, K. and IRWIN, G. D.: The implementation and effectiveness

    of linear interpolation within digital simulation, Electrical Power and EnergySystems, 1997, 19 (4), pp. 2214

    4 Manitoba HVdc Research Centre: PSCAD/EMTDC power systems simulation

    software tutorial manual, 1994

  • 7/27/2019 EMTP simul(27)

    4/14

    AppendixB

    System identification techniques

    B.1 s-domain identification (frequency domain)

    The rational function in s to be fitted to the frequency domain data is:

    H(s) =a0 + a1s

    1 + a2s2 + + ans

    N

    1 + b1s1 + b2s2 + + bnsn(B.1)

    where N n.

    The frequency response of equation B.1 is:

    H(j) =

    Nk=0(ak (j)

    k )nk=0(bk (j)

    k )(B.2)

    where b0 = 1.

    Letting the sample data be c(j)+ jd(j), and equating it to equation B.2 yields

    c(j) + jd(j) =a0 a2

    2k + a4

    4k + ja1k a3

    3k a5

    5k

    1 b22k + b44k

    + j

    b1k b33k b5

    5k

    (B.3)

    or

    (c(j) + jd(j))

    1 b22k + b4

    4k

    + j

    b1k b3

    3k b5

    5k

    =

    a0 a22k + a4

    4k

    + j

    a1k a3

    3k a5

    5k

    (B.4)

    Splitting into real and imaginary parts yields:

    dk

    (j) b1

    k

    b3

    3

    k b

    55

    k + c(j) b

    22

    k+ b

    44

    k

    a0 a22k + a4

    4k

    = c(j)

    dk (j)

    b22k + b4

    4k

    + c(j)

    b1k b3

    3k b5

    5k

    a1k a33k a5

    5k

    = d(j)

  • 7/27/2019 EMTP simul(27)

    5/14

    342 Power systems electromagnetic transients simulation

    This must hold for each sample point and therefore assembling into a matrix equation

    gives

    d(j1)1 c(j1)21 d(j1)

    31 t1 1 0

    21 0

    41 t2

    d(j2)2 c(j2)22 d(j2)32 t1 1 0

    22 0

    42 t2

    ......

    .... . .

    ......

    ......

    ......

    . . ....

    d(jk)k c(jk )2k d(jk )

    3k t1 1 0

    2k 0

    4k t2

    c(j1)1 d(j1)21 c(j1)

    31 t3 0 1 0

    31 0 t4

    c(j2)2 d(j2)22 c(j2)

    32 t3 0 2 0

    32 0 t4

    ......

    .... . .

    ......

    ......

    ......

    . . ....

    c(jk )k d(jk )2k c(jk )

    3k t3 0 k 0

    3k 0 t4

    b1b2...

    bna0a1...

    an

    =

    c(j1)

    c(j2)...

    c(jk )d(j1)d(j2)

    ...d(jk )

    (B.5)

    where the terms t1, t2, t3, and t4 are

    t1 =

    sin

    l

    2

    lk d(jk ) + cos

    l

    2

    lk c (j k )

    t2 = cos

    l

    2

    lk

    t3 =

    cos

    l

    2

    lk d(j k ) + sin

    l

    2

    lk c (j k )

    t4 = sin

    l

    2

    lk

    l = column number

    k = row or sample number.

    Equation B.5 is of the form:

    [A11] [A12]

    [A21] [A22]

    a

    b

    =

    C

    D

    (B.6)

    where

    aT = (a0, a1, a2, a3, . . . , an)

    bT = (b1, b2, b3, . . . , bn)CT = (c(j1), c(j2), c(j3) , . . . , c(jk ))

    DT = (d(j1), d(j2), d(j3) , . . . , d(jk ))

    Equation B.6 is solved for the required coefficients (as and bs).

  • 7/27/2019 EMTP simul(27)

    6/14

    System identification techniques 343

    B.2 z-domain identification (frequency domain)

    The rational function in the z-domain to be fitted is:

    H(z) =a0 + a1z1 + a2z2 + + anzn

    1 + b1z1 + b2z2 + + bnzn(B.7)

    Evaluating the frequency response of the rational function in the z-domain and

    equating it to the sample data (c(j) + jd(j)) yields

    c(j) + jd(j) =

    nk=0

    ak e

    kjt

    1 +n

    k=1

    bk ekjt

    (B.8)

    Multiplying both sides by the denominator and rearranging gives:

    c(j) jd(j) =

    nk=1

    (bk (c(j) + jd(j)) ak )e

    kjt

    + a0

    Splitting into real and imaginary components gives:

    nk=1

    ((bk c(j) ak ) cos(kt) bk d(j) sin(kt)) a0 = c(j) (B.9)

    for the real part and

    nk=1

    ((bk c(j) ak ) sin(kt) + bk d(j) cos(kt)) = d(j) (B.10)

    for the imaginary part.

    Grouping in terms of the coefficients that are to be solved for (ak and bk ) yields:

    nk=1

    (bk (c(j) cos(kt) + d(j) sin(kt)) ak cos(kt)) a0 = c(j)

    (B.11)

    nk=1

    (bk (d(j) cos(kt) c(j) sin(kt)) + ak sin(kt)) = d(j)

    (B.12)

    This must hold for all sample points. Combining these equations for each sample

    point in matrix form gives the following matrix equation to be solved:[A11] [A12]

    [A21] [A22]

    a

    b

    =

    C

    D

    (B.13)

  • 7/27/2019 EMTP simul(27)

    7/14

    344 Power systems electromagnetic transients simulation

    where

    aT = (a0, a1, a2, a3, . . . , an)

    bT = (b1, b2, b3, . . . , bn)

    C

    T =(

    c(j1),

    c(j2),

    c(j3) , . . . ,

    c(jm))DT = (d(j1), d(j2), d(j3) , . . . , d(jm))

    This is the same equation as for the s-domain fitting, except that the matrix [A]

    (called the design matrix) comprises four different submatrices [A11], [A12], [A21],

    and [A22], i.e.

    A11 =

    1 cos(1t ) cos(n1t)1 cos(2t) cos(n2t)

    ......

    . . ....

    1 cos(mt) cos(nmt )

    A21 =

    0 sin(1t) sin(n1t)

    0 sin(2t ) sin(n2t)...

    .... . .

    ...

    0 sin(mt) sin(nmt)

    A12 =

    R11 R12 R1nR21 R22 R2n

    ......

    . . ....

    Rm1 Rm2 Rmn

    A22 =

    S11 S12 S1nS21 S22 S2n

    ......

    . . ....

    Sm1 Sm2 Smn

    where

    Rik = c(ki ) cos(ki t) + d(ki ) sin(ki t)

    Sik = d(ki ) cos(ki t ) c(ki ) sin(ki t)

    n = order of the rational function

    m = number of frequency sample points.

    As the number of sample points exceeds the number of unknown coefficients

    singular value decomposition is used to solve equation B.13.

    The least squares approach smears out the fitting error over the frequency spec-

    trum. This is undesirable as it is important to obtain accurately the steady-state

  • 7/27/2019 EMTP simul(27)

    8/14

    System identification techniques 345

    condition. Adding weighting factors allows this to be achieved. The power frequency

    is typically given a weighting of 100 (the other frequencies are weighted 1.0).

    Adding weighting factors results in equations B.11 and B.12 becoming:

    c(j)w(j) =

    nk=1

    (w(j)bk (c(j) cos(kt) + d(j) sin(kt))

    ak w(j) sin(kt)) w(j)a0 (B.14)

    d(j)w(j) =

    nk=1

    (w(j)bk (d(j) cos(kt) c(j) sin(kt))

    ak w(j) sin(kt)) (B.15)

    B.3 z-domain identification (time domain)

    When the sampled data consists of samples in time rather than frequency, a rational

    function in the z-domain can be identified, provided the system has been excited by a

    waveform that contains the frequency components at which the matching is required.

    This is achieved by a multi-sine injection.Given a rational function of the form of equation B.7, if admittance is being fitted

    then

    I(z)

    1 + b1z1 + b2z

    2 + + bnzn

    =

    a0 + a1z

    1 + a2z2 + + anz

    n

    V (z) (B.16)

    or

    I(z) = I(z)

    b1z1 + b2z

    2 + + bnzn

    +

    a0 + a1z

    1 + a2z2 + + anz

    n

    V (z) (B.17)

    Taking the inverse z-transform gives:

    i(t) =

    nk=1

    bk i(t kt) +

    nk=0

    ak v(t kt) (B.18)

  • 7/27/2019 EMTP simul(27)

    9/14

    346 Power systems electromagnetic transients simulation

    and in matrix form

    v(t1) v(t1 t) v(t1 2t) v(t1 nt) i(t1 t) i(t1 2t ) i(t1 nt)

    v(t2) v(t2 t) v(t2 2t) v(t2 nt) i(t2 t) i(t2 2t) i(t2 nt)

    ... ... ... ... ... ... ...

    v(tk ) v(tk t) v(tk 2t) v(tk nt) i(tk t) i(tk 2t ) i(tk nt)

    a0a1...

    anb1b2...

    bn

    =

    i(t1)

    i(t2)

    ..

    .

    i(tk )

    (B.19)

    where

    k = time sample number

    n = order of the rational function (k > p, i.e. over-sampled).

    The time step must be chosen sufficiently small to avoid aliasing, i.e. t =

    1/ (K1fmax), where K1 > 2 (Nyquist criteria) and fmax is the highest frequency

    injected. For instance if K1 = 10 and t = 50s there will be 4000 samples

    points per cycle (20 ms for 50 Hz). This equivalent is easily extended to multi-port

    equivalents [1]. For an m-port equivalent there will be m(m + 1)/2 rational functions

    to be fitted.

    B.4 Prony analysis

    Prony analysis identifies a rational function that will have a prescribed time-domain

    response [2]. Given the rational function:

    H(z) =Y(z)

    U(z)=

    a0 + a1z1 + a2z

    2 + + anzN

    1 + b1z1 + b2z2 + + bdzn(B.20)

    the impulse response ofh(k) is related to H(z) by the z-transform, i.e.

    H(z) =

    k=0

    h(k)z1 (B.21)

    which can be written as

    Y(z)

    1 + b1z1 + b2z

    2 + + bdzn

    = U(z)

    a0 + a1z1 + a2z

    2 + + anzN

    (B.22)

  • 7/27/2019 EMTP simul(27)

    10/14

    System identification techniques 347

    This is the z-domain equivalent of a convolution in the time domain. Using the first

    L terms of the impulse response the convolution can be expressed as:

    h0 0 0 0h1 h0 0 0

    h2 h1 h0 0...

    ......

    . . ....

    hn hn1 hn2 h0hn+1 hn hn1 h1

    ......

    .... . .

    ...

    hL hL1 hL2 hLn

    1

    b1b2...

    bn

    =

    a0a1

    ...

    aN0

    0...

    0

    (B.23)

    Partitioning gives: a

    0

    =

    [H1]

    [h1] | [H2]

    1

    b

    (B.24)

    The dimensions of the vectors and matrices are:

    a (N + 1) vector

    b (n + 1) vector

    [H1] (N + 1) (n + 1) matrix

    [h1] vector of last (L N ) terms of impulse response

    [H2] (L N ) (n) matrix.

    The b coefficients are determined by using the sample points more than n time

    steps after the input has been removed. When this occurs the output is no longer

    a function of the input (equation B.22) but only depends on the b coefficients and

    previous output values (lower partition of equation B.24), i.e.

    0 = [h1] + [H2] b

    or

    [h1] = [H2]b (B.25)

    Once the b coefficients are determined the a coefficients are obtained from the

    upper partition of equation B.24, i.e.

    b = [H1]a

    When L = N + n then H2 is square and, if non-singular, a unique solution for b is

    obtained. IfH2 is singular many solutions exist, in which case h(k) can be generated

    by a lower order system.

    When m > n + N the system is over-determined and the task is to find a and bcoefficients that give the best fit (minimise the error). This can be obtained solving

    equation B.25 using the SVD or normal equation approach, i.e.

    [H2]T[h1] = [H2]

    T[H2]b

  • 7/27/2019 EMTP simul(27)

    11/14

    348 Power systems electromagnetic transients simulation

    B.5 Recursive least-squares curve-fitting algorithm

    A least-squares curve fitting algorithm is described here to extract the fundamental

    frequency data based on a least squared error technique. We assume a sinusoidal signal

    with a frequency of radians/sec and a phase shift of relative to some arbitrary

    time T0, i.e.

    y(t) = A sin(t ) (B.26)

    where = T0.

    This can be rewritten as

    y(t) = A sin(t) cos(T0) A cos(t) sin(T0) (B.27)

    Letting C1

    = A cos(T0

    ) and C2

    = A sin(T0

    ) and representing sin(t) and cos(t)

    by functions F1(t) and F2(t) respectively, then:

    y(t) = C1F1(t) + C2F2(t ) (B.28)

    F1(t) and F2(t ) are known if the fundamental frequency is known. However, the

    amplitude and phase of the fundamental frequency need to be found, so equation B.28

    has to be solved for C1 and C2. If the signal y(t) is distorted, then its deviation from

    a sinusoid can be described by an error function E, i.e.

    x(t) = y(t) + E (B.29)

    For a least squares method of curve fitting, the size of the error function is measured

    by the sum of the individual residual squared values, such that:

    E =

    ni=1

    {xi yi }2 (B.30)

    where xi = x(t0 + it) and yi = y(t0 + it). From equation B.28

    E =

    ni=1

    {xi C1F1(ti ) C2F2(ti )}2 (B.31)

    where the residual value r at each discrete step is defined as:

    ri = xi C1F1(ti ) C2F2(ti ) (B.32)

    In matrix form:

    r1r2...

    rn

    =

    x1x2...

    xn

    F1(t1) F2(t1)F1(t2) F2(t2)

    ......

    F1(tn) F2(tn)

    C1C2

    (B.33)

  • 7/27/2019 EMTP simul(27)

    12/14

    System identification techniques 349

    or r

    =

    X

    F

    C

    (B.34)

    The error component can be described in terms of the residual matrix as follows:

    E = [r]T[r] = r21 + r22 + + r

    2n

    = [[X] [F][C]]T[[X] [F][C]]

    = [X]T[X] [C]T[F]T[X] [X]T[F][C] + [C]T[F]T[F][C] (B.35)

    This error then needs to be minimised, i.e.

    E

    C= 2[F]T[X] + 2[F]T[F][C] = 0

    [F]T [F][C] = [F]T[X]

    [C] = [[F]T[F]]1[F]T[X]

    (B.36)

    If[A] = [F]T[F] and [B] = [F]T[X] then:

    [C] = [A]1[B] (B.37)

    Therefore

    [A] =

    F1F2

    F1 F2

    =

    F1F1(ti ) F1F2(ti )

    F2F1(ti ) F2F2(ti )

    =

    a11 a12a21 a22

    Elements of matrix [A] can then be derived as follows:

    a11n =

    F1(t1)...

    F1(tn)

    T

    F1(t1)...

    F1(tn)

    =

    n1i=1

    F21 (ti ) + F2

    1 (tn)

    = a11n1 + F2

    1 (tn) (B.38)

    etc.

    Similarly:

    [B] =

    F1(ti )x(ti )

    F2(ti )x(ti )

    =

    b1b2

    and

    b1n

    = b1n1

    + F1

    (tn

    )x(tn

    ) (B.39)

    b2n = b2n1 + F2(tn)x(tn) (B.40)

    From these matrix element equations, C1 and C2 can be calculated recursively using

    sequential data.

  • 7/27/2019 EMTP simul(27)

    13/14

    350 Power systems electromagnetic transients simulation

    B.6 References

    1 ABUR, A. and SINGH, H.: Time domain modeling of external systems for elec-

    tromagnetic transients programs, IEEE Transactions on Power Systems, 1993,

    8 (2), pp. 67177

    2 PARK, T. W. and BURRUS, C. S.: Digital filter design (John Wiley Interscience,

    New York, 1987)

  • 7/27/2019 EMTP simul(27)

    14/14

    Appendix C

    Numerical integration

    C.1 Review of classical methods

    Numerical integration is needed to calculate the solution x(t + t) at time t + t

    from knowledge of previous time points. The local truncation error (LTE) is the error

    introduced by the solution at x(t + t) assuming that the previous time points are

    exact. Thus the total error in the solution x(t + t) is determined by LTE and the

    build-up of error at previous time points (i.e. its propagation through the solution).

    The stability characteristics of the integration algorithm are a function of how thiserror propagates.

    A numerical integration algorithm is either explicit or implicit. In an explicit

    integration algorithm the integral of a function f, from t to t + t, is obtained

    without using f (t + t). An example of explicit integration is the forward Euler

    method:

    x(t + t) = x(t) + t f(x(t),t) (C.1)

    In an implicit integration algorithm f (x(t+ t),t+ t) is required to calculate

    the solution at x(t + t ). Examples are, the backward Euler method, i.e.

    x(t + t) = x(t) + t f (x(t + t),t+ t) (C.2)

    and the trapezoidal rule, i.e.

    x(t + t) = x(t) +t

    2[f(x(t),t) + f (x(t+ t),t+ t)] (C.3)

    There are various ways of developing numerical integration algorithms, such as

    manipulation of Taylor series expansions or the use of numerical solution by poly-

    nomial approximation. Among the wealth of material from the literature, only a few

    of the classical numerical integration algorithms have been selected for presentation

    here [1][3].