Chen, W.K. “State Variables: Concept and Formulation” The Electrical Engineering Handbook Ed. Richard C. Dorf Boca Raton: CRC Press LLC, 2000 7 State Variables: Concept and Formulation 7.1 Introduction 7.2 State Equations in Normal Form 7.3 The Concept of State and State Variables and Normal Tree 7.4 Systematic Procedure in Writing State Equations 7.5 State Equations for Networks Described by Scalar Differential Equations 7.6 Extension to Time-Varying and Nonlinear Networks 7.1 Introduction An electrical network is describable by a system of algebraic and differential equations known as the primary system of equations obtained by applying the Kirchhoff’s current and voltage laws and the element v-i relations. In the case of linear networks, these equations can be transformed into a system of linear algebraic equations by means of the Laplace transformation, which is relatively simple to manipulate. The main drawback is that it contains a large number equations. To reduce this number, three secondary systems of equations are available: the nodal system, the cutset system, and the loop system. If a network has n nodes, b branches, and c components, there are n – c linearly independent equations in nodal or cutset analysis and b – n + c linearly independent equations in loop analysis. These equations can then be solved to yield the Laplace transformed solution. To obtain the final time-domain solution, we must take the inverse Laplace transformation. For most practical networks, the procedure is usually long and complicated and requires an excessive amount of computer time. As an alternative we can formulate the network equations in the time domain as a system of first-order differential equations, which describe the dynamic behavior of the network. Some advantages of representing the network equations in this form are the following. First, such a system has been widely studied in mathe- matics, and its solution, both analytic and numerical, is known and readily available. Second, the representation can easily and naturally be extended to time-varying and nonlinear networks. In fact, computer-aided solution of time-varying, nonlinear network problems is almost always accomplished using the state-variable approach. Finally, the first-order differential equations can easily be programmed for a digital computer or simulated on an analog computer. Even if it were not for the above reasons, the approach provides an alternative view of the physical behavior of the network. The term state is an abstract concept that may be represented in many ways. If we call the set of instantaneous values of all the branch currents and voltages as the state of the network, then the knowledge of the instantaneous values of all these variables determines this instantaneous state. Not all of these instantaneous values are required in order to determine the instantaneous state, however, because some can be calculated from the others. A set of data qualifies to be called the state of a system if it fulfills the following two requirements: 1.The state of any time, say, t 0 , and the input to the system from t 0 on determine uniquely the state at any time t > t 0 . Wai-Kai Chen University of Illinois, Chicago ? 2000 by CRC Press LLC 2.The state at time t and the inputs together with some of their derivatives at time t determine uniquely the value of any system variable at the time t. The state may be regarded as a vector, the components of which are state variables. Network variables that are candidates for the state variables are the branch currents and voltages. Our problem is to choose state variables in order to formulate the state equations. Like the nodal, cutset, or loop system of equations, the state equations are formulated from the primary system of equations. For our purposes, we shall focus our attention on how to obtain state equations for linear systems. 7.2 State Equations in Normal Form For a linear network containing k energy storage elements and h independent sources, our objective is to write a system of k first-order differential equations from the primary system of equations, as follows: (7.1) In matrix notation, Eq. (7.1) becomes (7.2) or, more compactly, (7.3) The real functions x 1 (t), x 2 (t), ..., x k (t) of the time t are called the state variables, and the k-vector x(t) formed by the state variables is known as the state vector. The h-vector u(t) formed by the h known forcing functions or excitations u j (t) is referred to as the input vector. The coefficient matrices A and B, depending only upon the network parameters, are of orders k ′ k and k ′ h, respectively. Equation (7.3) is usually called the state equation in normal form. The state variables x j may or may not be the desired output variables. We therefore must express the desired output variables in terms of the state variables and excitations. In general, if there are q output variables y j (t) (j = 1, 2, . .., q) and h input excitations, the output vector y(t) formed by the q output variables y j (t) can be expressed in terms of the state vector x(t) and the input vector u(t) by the matrix equation (7.4) ˙ () () (), ,,...,)xt axt but i k iij j k ij j h j =+ = == ?? 11 12 ( ˙() ˙() . . . ˙() . . . . . . . . . . . . . . . . . . . . . xt xt xt aa a aa a aa a k k k kk k 1 2 11 12 1 21 22 2 12 é ? ê ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú ú = é ? ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú é ? ê ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú ú + () () . . . () . . . . . . . . . . . . . . . . xt xt xt bb b bb b k h h 1 2 11 12 1 21 22 2 . . . . . () () . . . () bb b ut ut ut kk kh h 12 1 2 é ? ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú é ? ê ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú ú ˙ () () ()xAxButtt=+ yCxDu() () ()ttt=+ ? 2000 by CRC Press LLC where the known coefficient matrices C and D, depending only on the network parameters, are of orders q ′ k and q ′ h, respectively. Equation (7.4) is called the output equation. The state equation, Eq. (7.3), and the output equation, Eq. (7.4), together are known as the state equations. 7.3 The Concept of State and State Variables and Normal Tree Our immediate problem is to choose the network variables as the state variables in order to formulate the state equations. If we call the set of instantaneous values of all the branch currents and voltages the state of the network, then the knowledge of the instantaneous values of all these variables determines this instantaneous state. Not all of these instantaneous values are required in order to determine the instantaneous state, however, because some can be calculated from the others. For example, the instantaneous voltage of a resistor can be obtained from its instantaneous current through Ohm’s law. The question arises as to the minimum number of instantaneous values of branch voltages and currents that are sufficient to determine completely the instan- taneous state of the network. In a given network, a minimal set of its branch variables is said to be a complete set of state variables if their instantaneous values are sufficient to determine completely the instantaneous values of all the branch variables. For a linear time-invariant nondegenerate network, it is convenient to choose the capacitor voltages and inductor currents as the state variables. A nondegenerate network is one that contains neither a circuit composed only of capacitors and/or independent or dependent voltage sources nor a cutset composed only of inductors and/or independent or dependent current sources, where a cutset is a minimal subnetwork the removal of which cuts the original network into two connected pieces. Thus, not all the capacitor voltages and inductor currents of a degenerate network can be state variables. To help systematically select the state variables, we introduce the notion of normal tree. A tree of a connected network is a connected subnetwork that contains all the nodes but does not contain any circuit. A normal tree of a connected network is a tree that contains all the independent voltage sources, the maximum number of capacitors, the minimum number of inductors, and none of the independent current sources. This definition excludes the possibility of having unconnected networks. In the case of unconnected networks, we can consider the normal trees of the individual components. We remark that the representation of the state of a network is generally not unique, but the state of a network itself is. 7.4 Systematic Procedure in Writing State Equations In the following we present a systematic step-by-step procedure for writing the state equation for a network. They are a systematic way to eliminate the unwanted variables in the primary system of equations. 1.In a given network N, assign the voltage and current references of its branches. 2.In N select a normal tree T and choose as the state variables the capacitor voltages of T and the inductor currents of the cotree – T, the complement of T in N. 3.Assign each branch of T a voltage symbol, and assign each element of – T, called the link, a current symbol. 4.Using Kirchhoff’s current law, express each tree-branch current as a sum of cotree-link currents, and indicate it in N if necessary. 5.Using Kirchhoff’s voltage law, express each cotree-link voltage as a sum of tree-branch voltages, and indicate it in N if necessary. 6.Write the element v-i equations for the passive elements and separate these equations into two groups: a.Those element v-i equations for the tree-branch capacitors and the cotree-link inductors b.Those element v-i equations for all other passive elements 7.Eliminate the nonstate variables among the equations obtained in the preceding step. Nonstate variables are defined as those variables that are neither state variables nor known independent sources. 8.Rearrange the terms and write the resulting equations in normal form. We illustrate the preceding steps by the following examples. ? 2000 by CRC Press LLC Example 1 We write the state equations for the network N of Fig. 7.1 by following the eight steps outlined above. Step l The voltage and current references of the branches of the active network N are as indicated in Fig. 7.1. Step 2 Select a normal tree T consisting of the branches R 1 , C 3 , and v g . The subnetwork C 3 i 5 v g is another example of a normal tree. Step 3 The tree branches R 1 , C 3 , and v g are assigned the voltage symbols v 1 , v 3 , and v g ; and the cotree-links R 2 , L 4 , i 5 , and i g are assigned the current symbols i 2 , i 4 , i 3 , and i g , respectively. The controlled current source i 5 is given the current symbol i 3 because its current is controlled by the current of the branch C 3 , which is i 3 . Step 4 Applying Kirchhoff’s current law, the branch currents i 1 , i 3 , and i 7 can each be expressed as the sums of cotree- link currents: i 1 = i 4 + i g – i 3 (7.5a) i 3 = i 2 – i 4 (7.5b) i 7 = –i 2 (7.5c) Step 5 Applying Kirchhoff’s voltage law, the cotree-link voltages v 2 , v 4 , v 5 ,and v 6 can each be expressed as the sums of tree-branch voltages: v 2 = v g – v 3 (7.6a) v 4 = v 3 – v 1 (7.6b) FIGURE 7.1An active network used to illustrate the procedure for writing the state equations in normal form. ? 2000 by CRC Press LLC v 5 = v 1 (7.6c) v 6 = –v 1 (7.6d) Step 6 The element v-i equations for the tree-branch capacitor and the cotree-link inductor are found to be (7.7a) (7.7b) Likewise, the element v-i equations for other passive elements are obtained as (7.8a) (7.8b) Step 7 The state variables are the capacitor voltage v 3 and inductor current i 4 , and the known independent sources are i g and v g . To obtain the state equation, we must eliminate the nonstate variables v 1 and i 2 in Eq. (7.7). From Eqs. (7.5b) and (7.8) we express v 1 and i 2 in terms of the state variables and obtain (7.9a) (7.9b) Substituting these in Eq. (7.7) yields (7.10a) (7.10b) Step 8 Equations (7.10a) and (7.10b) are written in matrix form as Cv i i i 33324 ˙ –== Li v v v 44431 ˙ –== vRiRiii g11 14 3 ==+-() i v R vv R g 2 2 2 3 2 == - vRii v R v R g g 114 3 22 2=++- ? è ? ? ? ÷ i vv R g 2 3 2 = - Cv vv R i g 33 3 2 4 ˙ = - - Li R R vRiRi Rv R g g 44 1 2 3141 1 2 12 ˙ =- ? è ? ? ? ÷ --+ ? 2000 by CRC Press LLC (7.11) This is the state equation in normal form for the active network N of Fig. 7.1. Suppose that resistor voltage v 1 and capacitor current i 3 are the output variables. Then from Eqs. (7.5b) and (7.9) we obtain (7.12a) (7.12b) In matrix form, the output equation of the network becomes (7.13) Equations (7.11) and (7.13) together are the state equations of the active network of Fig. 7.1. 7.5 State Equations for Networks Described by Scalar Differential Equations In many situations we are faced with networks that are described by scalar differential equations of order higher than one. Our purpose here is to show that these networks can also be represented by the state equations in normal. Consider a network that can be described by the nth-order linear differential equation (7.14) Then its state equation can be obtained by defining (7.15) ˙ ˙ v i RC C L R RL R L v i RC R RL R L v i g g 3 4 23 3 4 1 24 1 4 3 4 23 1 24 1 4 11 1 2 1 0 é ? ê ê ù ? ú ú = -- -- é ? ê ê ê ê ê ù ? ú ú ú ú ú é ? ê ê ù ? ú ú + - é ? ê ê ê ê ê ù ? ú ú ú ú ú é ? ê ê ù ? ú ú v R R vRiRi v R g g 1 1 2 3141 2 2=++- ? è ? ? ? ÷ i v R i v R g 3 3 2 4 2 =- -+ v i R R R R v i R R R R v i g g 1 3 1 2 1 2 3 4 1 2 1 2 2 1 1 1 0 é ? ê ê ù ? ú ú = -- é ? ê ê ê ê ù ? ú ú ú ú é ? ê ê ù ? ú ú + - é ? ê ê ê ê ù ? ú ú ú ú é ? ê ê ù ? ú ú dy dt a dy dt a dy dt a dy dt ay bu n n n n n n nn +++++= - - - - -1 1 1 2 2 2 1 . . . xy xx xx nn 1 21 1 = = = - ˙ . . . ˙ ? 2000 by CRC Press LLC showing that the nth-order linear differential Eq. (7.14) is equivalent to (7.16) or, in matrix form, (7.17) More compactly, Eq. (7.17) can be written as (7.18) The coefficient matrix A is called the companion matrix of Eq. (7.14), and Eq. (7.17) is the state-equation representation of the network describable by the linear differential equation (7.14). Let us now consider the more general situation where the right-hand side of (7.14) includes derivatives of the input excitation u. In this case, the different equation takes the general form (7.19) Its state equation can be obtained by defining (7.20) ˙ ˙ . . . ˙ ˙ . . . xx xx xx xaxax axaxbu nn nnn n n 12 23 1 112 211 = = = =-----+ - -- ˙ ˙ ˙ ˙ x x x x aaa a n n nn n 1 2 1 12 1 010 0 001 0 000 1 × × × é ? ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú = ××× ××× × × × ××× × × × × ××× × × × × ××× × ××× - - - ×××- é ? ê ê ê ê ê ê ê ê ê ù ? ú - -- ú ú ú ú ú ú ú ú × × × é ? ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú + × × × é ? ê ê ê ê ê ê ê ê ê ê ù ? ú ú ú ú ú ú ú ú ú ú [] - x x x x b u n n 1 2 1 0 0 0 ˙ () () ()xAxButtt=+ dy dt a dy dt a dy dt a dy dt ay b du dt b du dt b du dt bu n n n n n n nn n n n n nn + + +?+ + = + +?+ + - - - - - - - - 1 1 1 2 2 2 1 01 1 1 1 xycu xxcu xxcu nnn 10 211 11 =- =- =- -- ˙ ˙ M ? 2000 by CRC Press LLC The general state equation becomes (7.21) where n > 1, (7.22) and (7.23) Finally, if y is the output variable, the output equation becomes (7.24) 7.6 Extension to Time-Varying and Nonlinear Networks A great advantage in the state-variable approach to network analysis is that it can easily be extended to time- varying and nonlinear networks, which are often not readily amenable to the conventional methods of analysis. In these cases, it is more convenient to choose the capacitor charges and inductor flux as the the state variables instead of capacitor voltages and inductor currents. In the case of a linear time-varying network, its state equations can be written the same as before except that now the coefficient matrices are time-dependent: (7.25a) (7.25b) Thus, with the state-variable approach, it is no more difficult to write the governing equations for a linear time- varying network than it is for a linear time-invariant network. Their solutions are, of course, a different matter. ˙ ˙ ˙ ˙ x x x xaaa a x x x x c c n nnnn n n 1 2 1 12 1 1 2 1 1 2 010 0 001 0 000 1 MMMMMMM - -- - é ? ê ê ê ê ê ê ù ? ú ú ú ú ú ú = ? ? ? ---?- é ? ê ê ê ê ê ê ù ? ú ú ú ú ú ú é ? ê ê ê ê ê ê ù ? ú ú ú ú ú ú + M c c u n n - é ? ê ê ê ê ê ê ù ? ú ú ú ú ú ú [] 1 cbab cbabac cbabacac cbabacac acac nn n n n n 1110 22201 33302112 30 11 22 2 2 11 =- =- ( ) - =- ( ) -- =- ( ) ----- -- - M L xybu 10 =- yt x x x bu n () = [] é ? ê ê ê ê ê ù ? ú ú ú ú ú + [][] 100 0 1 2 0 L M ˙ () ()() ()()xAxButtttt=+ yCxDu() ()() ()()ttttt=+ ? 2000 by CRC Press LLC For a nonlinear network, its state equation in normal form is describable by a coupled set of first-order differential equations: (7.26) If the function f satisfies the familiar Lipshitz condition with respect to x in a given domain, then for every set of initial conditions x 0 (t 0 ) and every input u there exists a unique solution x(t), the components of which are the state variables of the network. Defining Terms Companion matrix: The coefficient matrix in the state-equation representation of the network describable by a linear differential equation. Complete set of state variables:A minimal set of network variables, the instantaneous values of which are sufficient to determine completely the instantaneous values of all the network variables. Cotree: The complement of a tree in a network. Cutset: A minimal subnetwork, the removal of which cuts the original network into two connected pieces. Cutset system:A secondary system of equations using cutset voltages as variables. Input vector:A vector formed by the input variables to a network. Link:An element of a cotree. Loop system: A secondary system of equations using loop currents as variables. Nodal system:A secondary system of equations using nodal voltages as variables. Nondegenerate network: A network that contains neither a circuit composed only of capacitors and/or independent or dependent voltage sources nor a cutset composed only of inductors and/or independent or dependent current sources. Nonstate variables:Network variables that are neither state variables nor known independent sources. Normal tree:A tree that contains all the independent voltage sources, the maximum number of capacitors, the minimum number of inductors, and none of the independent current sources. Output equation:An equation expressing the output vector in terms of the state vector and the input vector. Output vector: A vector formed by the output variables of a network. Primary system of equations: A system of algebraic and differential equations obtained by applying the Kirchhoff’s current and voltage laws and the element v-i relations. Secondary system of equations:A system of algebraic and differential equations obtained from the primary system of equations by transformation of network variables. State: A set of data, the values of which at any time t, together with the input to the system at the time, determine uniquely the value of any network variable at the time t. State equation in normal form: A system of first-order differential equations that describes the dynamic behavior of a network and that is put into a standard form. State equations:Equations formed by the state equation and the output equation. State variables:Network variables used to describe the state. State vector: A vector formed by the state variables. Tree: A connected subnetwork that contains all the nodes of the original network but does not contain any circuit. Related Topics 3.1 Voltage and Current Laws?3.2 Node and Mesh Analysis?3.7 Two-Port Parameters and Transformations? 5.1 Diodes and Rectifiers?100.2 Dynamic Response References W. K. Chen, Linear Networks and Systems: Algorithms and Computer-Aided Implementations, Singapore: World Scientific Publishing, 1990. W. K. Chen, Active Network Analysis, Singapore: World Scientific Publishing, 1991. ˙ (,,)xfxu= t ? 2000 by CRC Press LLC L. O. Chua and P. M. Lin, Computer-Aided Analysis of Electronics Circuits: Algorithms & Computational Tech- niques, Englewood Cliffs, N.J.: Prentice-Hall, 1975. E. S. Kuh and R. A. Rohrer, “State-variables approach to network analysis,” Proc. IEEE, vol. 53, pp. 672–686, July 1965. Further Information An expository paper on the application of the state-variables technique to network analysis was originally written by E. S. Kuh and R. A. Rohrer (“State-variables approach to network analysis,” Proc. IEEE, vol. 53, pp. 672–686, July 1965). A computer-aided network analysis based on state-variables approach is extensively discussed in the book by Wai-Kai Chen, Linear Networks and Systems: Algorithms and Computer-Aided Imple- mentations (World Scientific Publishing Co., Singapore, 1990). The use of state variables in the analysis of electronics circuits and nonlinear networks is treated in the book by L. O. Chua and P. M. Lin, Computer-Aided Analysis of Electronics Circuits: Algorithms & Computational Techniques (Prentice-Hall, Englewood Cliffs, N.J., 1975). The application of state-variables technique to active network analysis is contained in the book by Wai- Kai Chen, Active Network Analysis (World Scientific Publishing Co., Singapore, 1991). ? 2000 by CRC Press LLC