You are on page 1of 6

IEEE Transactions on Power Systems, Vol. 11, No.

4,November 1996

1951

Automated State Model Generation Algorithm for Power Circuits and Systems
0. Wasynczuk, Senior Member School of Electrical and Computer Engineering FWdue University West Lafayette, Indiana 47906
Abstract A new approach of automatically generating statespace models of power circuits and systems is presented. In this approach, the compasite system state equations are established algorithmically given the standard node incidence matrix and elementary branch data (e.g. resktances, inductances, back emf's). The resulting state equations can be solved using a variety of numerical techniques or commercially available cpmputer simulation programs. An example system consisting of a three-phase generator and rectifier load is used to illustrate this approach. Experimentalverification is also provided.
I. INTRODUCTION There are numerous computer programs that can be used to calculate the transient behavior of power circuits and systems; EMlT [l],Spice [2], Saber [3], Simulink 141, and ACSL [5], to name a few. Although each program has unique features, they generally fall into one of two broad categories. In the first category, it is assumed that the system is described by a set of state equations. The state equations can be programmed using syntax similar to conventional procedural languages or implemented graphically using icons for integrators, summers, and multipliers, for example. The state equations are solved numerically using one of a number of well-established numerical algorithms which are supported by the cornputer program. Regardless of the algorithm selected, the analyst must establish the differential equations of the given system prior to implementation. In the second category, the system is described by its circuit elements. In particular, the pertinent branch parameters and the circuit topology are entered as inputs. Difference equations are developed for each branch which relate the branch current and voltage at a given instant of time to their values at previous instants of time. These difference equations are based upon a particular integration algorithm such as Euler, trapezoidal or Gear's [6]. The difference equations for each branch are then combined algebraically, based upon the circuit topology, to form a set of difference equations for the overall system [6]. This approach can be extended to permit system specification through

S. D. Sudhoff, Member School of Electrical and Computer Engineering University of Missouri, Rolla R o b , Missouri, 65401
state models and/or transfer functions to model the control systems associated with power circuits. A significant advantage of the latter approach is that it relieves the analyst from deriving the state equations of complex circuits, which can be a tedious task.A significant disadvantage is that the composite system state equations are never established; consequently, the numerous analytical tools which are available for the characterization and analysis of state-space models cannot be used. In this paper, an algorithmic method of developing the state equations of complex power circuits and systems is set forth. In this method, the system is described by the pertinent branch parameters and the circuit topology; however, unlike existing algorithms, the difference equations are not implemented at the branch level. Instead, the composite system state equations are established, which can subsequentlybe solved using a variety of wellestablished techniques, Since the state equations of the interconnected system are available in this approach, linearization and eigensystem analysis can be performed at the system level. This approach can be applied to the simulation and analysis of transmission and distribution systems, power electronic and drive systems including FACTS devices, and has been successfully applied to several systems including the simulation of a large 6-phase permanent-magnet generator designed for ship propulsion [7]. In this paper, the algorithm is set forth and its use is demonstrated in the simulation of a laboratory synchronous machinerectifier system. The computer implementationof this system is described and computer studies are used to illustrate system performance. These computer studies are verified experimentally by comparing the simulated system response to the measured response. II. MATHEMATICAL BACKGROUND For future reference, it is useful to review some basic concepts from circuit theory. In this regard, it is instructive to consider the example circuit depicted in Fig. 1. The node incidence matrix Aa is established by numbering the nodes and branches of the circuit. Each column corresponds to a branch and contains exactly two nonzero elemenus, one equal to 1, the other to -1. If the positive (negative) terminal of thejth branch is connected to node i, aij = 1 (aij = -1 ). For the circuit depicted in Fig. 1, 1 2 3 4 5 r l 1 1 0 01.

96 WM 259-2 PWRS A paper recommended and approved by the IEEE Power System Engineering Committee of the IEEE Power Engineering Society for presentation at the 1996 IEEWES Winter Meeting, January 2125, 1996, Baltimore, MD. Manuscript submitted August 1, 1995; made available for printing November 30, 1995.

0885-8950/96/$05.000 1996 IEEE

Authorized licensed use limited to: MAPUA INSTITUTE OF TECHNOLOGY. Downloaded on February 11, 2010 at 23:43 from IEEE Xplore. Restrictions apply.

1952

Thus
i,, =
~

= [-dix = B,i, T

(9)

T where B, relates the branch currents i,, to the independent

U4

- b -

+ d

branch currents i, . It can be proven that B, satisfies [8] Bbvbr = 0 (10) Substituting (5) into (9), it can be shown that for the example system
r
-7

Fig. 1 Example circuit.

If i,, is the vector of branch currents, then the ith element of the

is the net sum of currents leaving node i . By Kirchoff's current law (KCL),
,ibr = 0 Any matrix
(2)

vector A,$,

-11010 Bb = 1-1 0 1 0 11

It is easily verified that each row of Bbvbr = 0 yields Kirchoff's voltage law (KVL)for the two smaller loops in Fig. 1; consequently, B, represents the basic loop matrix [6].
1 1 STATE MODEL GENERATION 1. In the preceding development, assumptions were not made in regard to the volt-ampere (VI)characteristics of the branches. However, in subsequent derivations it is useful to assume that each branch of the study system is a variation of the branch model depicted in Fig. 2.

& which is obtained by adding/subtracting one

row from another in A, also satisfies (2).After performing row manipulations, and possibly reordering columns (branches), it is possible to express
A, =

The subscripts in (3) denote the dimensions of the indicated partitions; b is the number of branches, and n is the number of nodes. An algorithm for performing the required matrix manipulations is described in [6]. the example system, For

& in the following canonical form


An-l,b-n+l

In-l,n-l O1,n-1

O1,b-n+ 1

(3)

'i

state= 0

r,

Li

e,

C,

ii
Fig. 2 Branch model.

(4)

Comparing with (3),

(5)
The matrix A is defined by deleting the null row of (3). From (2),it can be shown that

If the switch is closed (state = l), the branch is herein referred to as an active branch. If the switch is open (state = 0), the branch is inactive. The VI characteristics of each active branch may be expressed 1 ui = riii + p (Liii) + P i - (ii + j i ) + ei (12) P where ui is the branch voltage, ri is the branch resistance, Li is the branch inductance, Pi = l / C i is the reciprocal of the branch capacitance, ei is a source voltage, and j i is a source
current. The source voltage and current can be constants, func-

Aibr = 0 (6) where ibr is the vector of (possibly reordered) branch currents. In partitioned form,

r. i
(7)
where i, is a vector of independent branch currents and i are
Y

dependent in the sense that they can be calculated from i, using


KCL. Expanding (7) and rearranging

tions of time, or functions of other variables. Throughout this paper, p is used to denote differentiation and l / p integration with respect to time. Ideal resistive, inductive, or capacitive branches may be modelled by setting all other branch parameters and sources to zero. More than one branch parameter may be nonzero. For example, ri and L, may be used to model the effective series resistance @SR) and inductance @SL) of a nonideal capacitor. Although the branch VI characteristics assumed in (12) may not be suitable for representing all systems, it is use-

(8)

Authorized licensed use limited to: MAPUA INSTITUTE OF TECHNOLOGY. Downloaded on February 11, 2010 at 23:43 from IEEE Xplore. Restrictions apply.

1953

ful for a wide variety of systems of practical interest. Assembling the active branch equations into a single matrix equation yields (13) Vbr = ',rib, + p (Lbribr) + Pbrgbr + ebr where 1 (14) Q, = (ibr &,,I +

configurations, L can be singular whereupon the resulting , state equations are somewhat different in form. However, this is beyond the scope of this paper and will be the subject of a future paper. Expressions for the branch currents and voltages can be readily determined s W n g with (9) and (15). Performing straightforwardalgebraic manipulations and substitutions,
7

In (13), r,, is a diagonal resistance matrix whose diagonal entries correspond to the active branch resistances and L,, is a branch inductance matrix whose diagonal entries correspond d the branch self-inductances. Mutual-inductances between branches are easily represented by setting the appropriate off-diagonal envies of L to the mutual inductance. Finally, P,, is , ,

Equation (20) is of the form y = C x + D u where active branch currents and voltages are outputs, while the source currents and voltages are inputs. In typical systems, only a few elements of U will be nonzero. The state and output matrices are readily calculated in terms of the branch matrices and the basic currents and s, as i,/p. Also,a matrix M may be defined loop matrix B, . In systems containing thyristors and/or diodes, it is necessuch that mij = 1 if thejth capacitor is in the ith branch and 0 sary to calculate the voltages of the inactive (nonconducting) T diodes or thyristors to determine whether a change in switching otherwise. Thus, P,,q,, = P,,Ma, and q, = M qbr. state should occur. For example, if the voltage across a nonconEquation (13) may then be expressed ducting diode becomes positive, that diode becomes active indicating a change in circuit topology. In order to calculate the (15) , V = ',,i*, + P (L,,',,) + P,,Ma, + ebr inactive branth voltages, it is convenient to assume that all nonT Premultiplyingby B, and using (9) to replace i,, with B, i, , conducting valves (inactive branches) have equal off-state resistance. An augmented node incidence matrix is formed by 0 = Bb r r Bb i x +B,p LbrBbix +BbPbrMqc+Bbebr including inactive as well as active branches, and the correb T , sponding augmented basic loop matrix is determined. The augT T = BbrbrBb + BbLb,Bb + B, (pLbr)Brix + i, pi, mented branch voltage vector vu (consisting of active and the branch potential coefficient matrix whose diagonal entries, if nonzero, represent the reciprocal capacitances of the corresponding branches. The branch coefficient matrices are typically sparse. It is convenient to define a vector i, as a vector of capacitor

B,P,,Ma, + B,e,,
Equivalently, 0 = r$i,

(16) (17)

+ L,pi, + (pL,) i, + P,q, + Bbeb,

inactive branch voltages) may be calculated in terms of active branch voltages using V = T, , v, (21) where the constant matrix T is defined as

, where expressions for r ,L, , pL, ,and P, are readily established by comparing (16) and (17). Since

a, = MT qbr,

Here, B, is the basic loop matrix of the augmented network and

T pq, = MTpqb,. From (14) and replacing i,, with B, i, ,

roffis a diagonal matrix whose'diagonal entries are zero if the


correspondingbranch is active and equal to an arbitrary off-state resistance if the branch is inactive. The value of T is independent of the off-state resistance.
IV. COMPUTER IMPLEMENTATION

pa, = M B,i,+M j,, Equations (17) and (18) can be rearranged to form the state equations with q, and i, as state variables. Assuming L is , invertible, which is typically the case, the state equations may be expressed

T T

which is of the form px = Ax + Bu . In certain special circuit

The equations and procedures set forth in the previous section were implemented using a commercially available computer language which was designed to simulate systems modeled in state-space form [5]. The general structure of the implementation is depicted in Fig. 3. Based upon the circuit topology and switching state, the node incidence matrix A, is formed and the basic loop matrix B, is calculated as described

Authorized licensed use limited to: MAPUA INSTITUTE OF TECHNOLOGY. Downloaded on February 11, 2010 at 23:43 from IEEE Xplore. Restrictions apply.

1954

/"............................................. ................ ... .................... ........... .. . ..... .... . .... 'r System Dependent \

V. DESCRIFTION OF EXAMPLE SYSTEM The proposed approach was verified experimentally by applying it to a hardware test system which includes a 3.7 kW synchronous machine connected to a rectifier load. A schematic diagram of the test system is shown in Fig. 4 where bmnches and nodes are numbered. The synchronous machine parameters, as determined by standstill frequency response testing, are summarized in Table 1. The synchronous machine includes three stator windings, a field winding, and is assumed to include three damper windings on each axis. The voltage and flux linkage equations may be expressed [9]

Fig. 3 Block diagram of computer implementation.

where
fabcs = [ f a s f b s f c a T

previously. In addition, the mapping from active to augmented branch voltages T is determined using the augmented node incidence matrix. These matrices are calculated once at the outset of a study and whenever a change in switching state occurs. These matrices and the elementary branch data are supplied to a state model generator which performs the computations needed to calculate the state and output matrices in (19) and (20). The state model is solved numerically using standard procedures available in the selected simulation language. The specific integration algorithm (Euler, Runge-Kutta, Gears, etc.), the order, and the time step (or the time-step boundary in variable time-step algorithms) are selected by the user using simple commands and can be changed during the study. The integration algorithm in Fig. 3 is an integral part of the computer program and does not involve programming on the part of the user. The state matrix generator and the calculation of Bb and T is performed by subroutines which are easily linked to the computer program and are independent of the system studied. The calculated branch voltages and currents are continuously monitored to determine if a change in switching state should occur. If a change in state is indicated, the integration algorithm automatically reduces the time-step to determine the switching time to a precision, selected by the user, which may be much smaller than the original time step. If a change in switching state occurs, the matrices B, and
T are recalculated. In addition, it is necessary to calculate the initial conditions of the new state vector based upon the branch currents and voltages at the end of the preceding switching state. These boundary calculations are straightforward and are based upon the assumed continuity of inductive branch currents and capacitive branch voltages. The system configuration is defined using standard circuit descriptions (branch lists, node lists) and the elementary branch data (resistances, inductances, capacitances, etc.) which are easily entered or changed. The given structure greatly simplifies development and implementation of simulations since the system configuration is programmed from a circuit description. The corresponding state model is generated automatically.

Here, f can be U , i, or h and primes are used to indicate that the rotor variables are referred to the stator by the appropriate turns ratio. The stator resistance matrix is rs13, . The rotor resistance matrix r is diagonal with diagonal entries corresponding to the i appropriate field or damper winding resistance. The flux linkage equations may be expressed

The stator inductance mat& is of the form

where, for example (28) The corresponding rate-of-change of inductance may be expressed pzasas = ~ , 2 ~ ~ s i n 2 e , . (29) Expressions for the remaining stator self- and mutual-inductances are given in [9] and will not be repeated here due to space considerations.
VI. DESCRIFTION OF COMPUTER &"LEMENTATION

Lasas = LlS+ L A- LBcos26,.

The given system was implemented using ACSL E51. The computer implementation of the example system includes one statement per branch. Thyristor or diodes are specified by a statement of the form
THYRISTOR{b#, p#, n#, r, L, Fire)

Here b# denotes the branch number, p# denotes the node number of the positive terminal, n# is the node number of the nega-

Authorized licensed use limited to: MAPUA INSTITUTE OF TECHNOLOGY. Downloaded on February 11, 2010 at 23:43 from IEEE Xplore. Restrictions apply.

idc
4 .

1955

b10
'I

n3

== vdc
-

U ,

+
n6

,,n4

Fig. 4 Example system.

r8= 382 mR

L,, = 1.12 mH Lmq= 24.9 mH Lmd= 39.3 mH

computer directives which load the appropriate value of resistance, inductance, rate-of-change of inductance, and potential coefficient into the corresponding branch matrices rbr, Lbr,
p L b r , and Pbr whereupon the state matrices and rates-of-

= 1.19 kR

Irid3= 1.58

ILikdZ 4.91 I riq2 1.06 R I Lh,, 3.5 1 lL,iM3 I 447 ILikq3 26.2 I
=

mH

mH

= 4.52 mH rkq3=

ma

mH

change of state variables are established using (19) and (20). Integration of the state equations is programmed in ACSL by the following statement
x
=

INTEG(px, xic)

rkd=112 rnn

Lifd= mH 1.53

G-

Ns -0.0269

4Poles

tive terminal, r and L denote the resistance and inductance, respectively, and F i r e represents a gating signal (0 or 1). For diode b l (Fig. 4) with zero inductance and resistance,
THYRISTOR(1, 2, 5,
0, 0, 1)

The user may specify the desired integration algorithm, time step, and data logging interval using simple run-time commands. The switching logic may be implemented by statements of the form
IF((State(i) .EQ.1) .AND. (ibr(i).LT.O)) Turnoff (i)

Inductive or capacitive branches are specified by statements of the form


BRANCH(b#, p#, n#, r, L, pL, P c a p , e , j )

where b#, p#, n# denote branch and node numbers, r, L, pL, and Pcap denote the branch parameters, and e and j are the source voltage and current, respectively. The phase a winding (Fig. 4) is specified by
BRANCH(7, 2, 1, rs, Lasas, plasas, 0, 0, 0 )

The procedure Turnoff (i) sets the state of branch i to 0 and signals a change in topology so that the topology-dependent matrices are recalculated. The turn-on logic may be implemented by a similar statement
IF((State(i) .EQ.O) .AND. (va(i).GT.O) .AND. (Fire(i).EQ.l)) Turnon(i)

Here, Lasas is a variable which is defined by (28) and pLas a s by (29). For capacitive branches (branch lo), the corresponding statement is
BRANCH(10, 5,
6, rdc, Ldc, 0, Pcap, 0, -idc)

Mutual inductances may be specified by statements of the form


MUTUAL(b#, b#, L, pL)

For the mutual inductance between the as and bs windings,


MUTUAL (7.
8,

Lasbs, p l a s b s )

The ACSL macro processor expands these statements into

where va is the augmented branch voltage vector. VII. VERIFICATION A step load change was simulated and implemented in the laboratory for verification purposes. Initially, the system is operating in the steady state with a base load resistance of 21 IR connected to the dc output terminals. A second load resistance of 4.04 IR is then connected in parallel with the original load. The simulated response is depicted in Figs. 5 and 6. The measured response is depicted in Fig. 7 The measured . response (Fig. 7) was recorded using a Tektronix 2212 digital oscilloscope and AM503A current probe system. The digitized data was imported into ACSL so that the measured response can be plotted on the same scale as the simulated response.

Authorized licensed use limited to: MAPUA INSTITUTE OF TECHNOLOGY. Downloaded on February 11, 2010 at 23:43 from IEEE Xplore. Restrictions apply.

1956

Comparing the simulated dc and field currents (Fig. 5) with the measured currents (Fig. 7) reveals excellent agreement. Verification studies involving other systems have also been conducted with excellent comparison. This information will be reported in future papers.

2o

2ol
0.751
I

40ms

0-75

40ms

0.0

Fig. 7 Measured dc and field currents.

0.0
Fig. 5 Simulated dc and field currents.

2o 1

-20 _I

50 7

-50
Fig. 6 Simulated ac current and voltage.

VIII. SUMMARY

A new method of simulating power circuits and systems is described. In this method, the state equations of the interconnected network are established from pertinent branch parameters

part by the Missouri Research Board. x. REFERENCES [1 H. W. Dommel, Digital Computer Solution of Electromag1 netic Transients in Single- and MultiphaseNetworks, ZEEE Transactions on Power Apparatus and Systems, Vol. PAS88, Apr. 1969,pp. 388-396 [2] L. W. Nagel and D. 0. Pederson, Simulation Program with Integrated Circuit Emphasis, University of California Electronics Research Laboratory, Memorandum ERL-M382, Apr. 12,1973. 131 Analogy, Inc., Introduction to the Saber Simulator, Beaverton Oregon, 1991. [4] The Math Works, Inc., Simulink Dynamic System Simulation Software-UsersManual, Natick, Massachusetts, 1993. [SI Mitchell and Gauthier Associates, Advanced Continuous Simulation Language Reference Manual, Concord, Massachusetts, 1991. [6] L. 0. Chua, P-M Lin, Computer Aided Analysis of Electronic Circuits Algorithm and Computational Techniques, Prentice-Hall, Englewood Cliffs, New Jersey, 1975. [7] P. C. Krause, S. D. Sudhoff, and 0. Wasynczuk, IPS Propulsion Component/SystemModel Development, Contract N00024-93-C-4180 with Naval Sea Systems Command, Preliminary Report, Apr. 1994, Interim Report, Sept. 1994.. [8] N. Balabanian and T. Bickart, Electrical Network Theory, J. Wiley, New York, 1969. [9] P. C. Krause, 0.Wasynczuk, and S. D. Sudhoff, Analysis of
Electric Machinery, IEEE Press, Piscataway, NJ, 1995.
Oleg Wasynczuk ( M 76, SM88) was born in Chicago, lllinois on June 26, 1954. He received the B.S.E.E. degree from Bradley University in 1976 an the M.S. and Ph.D. degrees from Purdue University in 1977 and 1979, respectively. Since 1979, he has been at Purdue where he is presently a Professor of Electrical and Computer Engineering. Dr. Wasynczuk is a member of Eta Kappa Nu, Tau Beta Pi and Phi Kappa Phi and is a Senior member of the IEEE Power Engineering Society.
Scott D. Sudhoff was born in Columbus, Indiana on May 17,1966. He received the B.S.E.E, M.S.E.E, and Ph.D. degrees from Purdue University in 1988, 1989, and 1991, respectively. He is currently an Assistant Professor at the University of Missouri - Rolla

and the circuit topology. The resulting equations may be solved using any one of a number of numerical techniques or computer programs. Unlike existing approaches in which the composite system state equations are not available, the given approach lends itself to the wealth of analytical tools that are available for the analysis of state-spacemodels including linearization, modal analysis, and singular perturbations. IX. ACKNOWLEDGMENTS This work was supported by Purdue University and P. C. Krause and Associates. The laboratory studies were conducted at the University of Missouri - Rolla using facilities supported in

You might also like