Principle of Passive Electrical Circuit Modeling - Graph Theory

Download as pdf
Download as pdf
You are on page 1of 12
3 Principles of Passive Electrical Circuit Modeling Preview In this chapter, we shall discuss issues relating to the modeling of simple passive electrical circuits consisting of sources, resistors, ca- pacitors, and inductors only. The traditional approach to this type of system is through either mesh equations or node equations. How- ever, the resulting models are not in a state-space form and they can- not easily be converted into a state-space form thereafter. We shall also discuss another technique that allows us to derive a state-space model directly and we shall see why this approach is not commonly used. Very often, the resulting equations contain either algebraic loops or structural singularities. 3.1 Introduction A good selection of textbooks deal with passive electrical circuits and simulations thereof (3.1,3.2,3.4,3.5]. The most commonly used mod- eling principles are to express the circuit equations either through a special selection of mesh equations (expressed in terms of so-called loop currents using Kirchhoff’s voltage law) or through a special selection of node equations (expressed in terms of so-called cutset voltages using Kirchhoff’s current law). Let me explain the basic idea behind these two methods by means of the example shown in Fig.3.1. 52 Chepter 9: Principles of Passive Electrical Circuit Modeling Figure 3.1. Example of a passive circuit. We have two elements that can store energy (the capacitor C and the inductor L), and we thus expect to obtain two state equations in the end. 3.2 Mesh Equations Let me first discuss how the loop current approach (mesh equations, Kirchhoff’s voltage law) can be used to generate a mathematical model for this circuit. Figure 3.2 shows the same circuit after the circuit has been “colored” by introducing a “tree.” R, 3L lO Tz Figure 3.2. Passive circuit after selection of a tree. The “tree_branches” of the tree are those branches of the circuit that have been marked by bold lines (i.e., the branches containing the resistor 2, and the capacitor C). Let me define what a tree is. A tree consists of a set of connected tree_branches such that the tree-branches alone don’t form closed loops and such 3.2 Mesh Equations 53 that any addition of another branch to the tree would create a closed loop consisting of tree.branches only. The remain- ing branches of the circuit structure are called the links of the circuit. A considerable freedom exists in the selection of tree_-branches. How- ever, some rules must be observed. (1) Mesh equations cannot tolerate any independent current sources. Node equations cannot tolerate any independent voltage sources. If the circuit contains the wrong type of sources, they must be converted to equivalent sources of the other type. Figure 3.3 shows the conversion of independent sources. Js ds Zz & Io Z| Up=Zlo vol Figure 3.3. Conversion of independent sources. Furthermore, if the “wrong” sources are ideal sources (i.e., they have zero impedance associated with them), they must first be moved into other branches until the problem disappears. (2) In the case of mesh equations, all voltage sources should be placed in links. In the case of node equations, all current sources should be placed in branches. In this way, they will appear only once in the resulting set of equations. Using the following notation: tq, i= number of cireuit nodes my = number of circuit branches m = number of links mes number of tree_branches % number of ideal current sources oq = number of ideal voltage sources gj = number of mesh equations Nee = number of node equations we can compute the number of tree_branches n,, and the number of links 7; as follows: 54 Chapter 3: Principles of Passive Electrical Circuit Modeling Neb = My — 1 (3.14) m= my — my (3.18) and therefore, we can compute the number of equations that are needed for the two methods as: Nee = — Ou (3.2a) taj =m ~ 04 (3.28) We usually select the technique that lets us get away with the smaller number of equations. In our example, we have an ideal independent voltage source, thus mesh equations may be more convenient, i.e., we operate on Kirch- hoff’s voltage law rather than using Kirchhoff’s current law. It is useful to replace all passive circuit elements by impedances as shown in Fig.3.4 (ie., we convert the circuit from the time domain to the frequency domain). 2, =Ry 2 Zy © ce % Zy=sl Ze Zg=1/sC Figure 3.4. Frequency-domain representation using impedances. Now, we introduce so-called loop currents, one for each link of the circuit. A loop is a generalized mesh. Except for the one link that it represents, it consists of tree-branches only. Figure 3.5 depicts the three loops of our circuit. Once the tree has been selected, the loops are fully determined. Notice that the short-circuit at the lower right corner of Fig.3.5 is drawn for convenience only and does not qualify as a link. The loop currents j;, j2, and js are identical to the link currents i,, i2, and is of Fig.3.6. The tree-branch currents i, and is are the directed sums of the loop currents that traverse the two tree_branches. 3.2 Mesh Equations 55 Figure 3.5. Circuit with tree and loop currents. Uo = 21 * (jx — 52) + Ze * (jn — 2 — Gs) (3.3) O0= 2h + jr+ 2 *(j2—- 51) + Ze *(j2+5s— i) (3.38) 0= 22% js+Zo%(ist+h—is) (3.3e) ‘The terms can be reordered as follows: Uo = (Z1 + Zc) * 1 — (21 + 2c) * ia - Ze * 5a (3-4a) 0=-~(2.4+2Zc)*At(Z+Zot+Zr)*i2+Zo%js (3.46) 0=-Ze * ji +Ze* int (Z2+ Zc) * is (3.4¢) which can be expressed using a matrix notation as: U0 A+Ze -(Z + Zc) Ze a 0 }=|(-(A+2c) A+Zot+%Z, Ze “la (3.5) 0 fe Ze Z2+Zce}] \is which can be abbreviated as: €o = Zim * jt (3.6) e, denotes the source voltage vector, Zm denotes the mesh impedance matriz, and j; denotes the loop current vector. Somewhat more systematically, we can achieve the same result by starting off with two other matrices, namely, the mesh-incidence ma- trix and the branch-impedance matrix. The mesh-incidence matriz ®, which in some texts is also called the fundamental loop matria, is defined as a matrix that describes the circuit topology by coding the 56 Chapter 3: Principles of Passive Electrical Circuit Modeling direction of the loop currents in the branches. Figure 3.6 illustrates the procedure. Figure 3.6. Circuit topology used for the mesh-incidence matrix. This allows us to generate the following mesh-incidence matrix: il i2 i i4 65 glf/i oo 1 1 S=52(0 1 0 -1 -1 (3.7) jp o1 o -1 which contains +1 entries where the direction of a loop current cor- responds with the direction of the branch current, it contains -1 entries where the loop current and the branch current have opposite directions, and it contains 0 entries for branches in which the loop current is not present. ‘The branch-impedance matriz Z, is defined as a diagonal matrix containing the individual branch impedances along the main diago- nal: 12 8 @ 8 d/o 0 0 o 0 {0 2 0 0 0 %=i3]0 0 RB 0 0 (3.8) aio 0 oR 0 wé\o 0 0 0 I/sc which we sometimes abbreviate as: Zy = diag(0, sL, Ra, Ri,1/sC) (3.9) We can now write all equations in a compact matrix form. Let us start with Kirchhoff’s voltage law: 3.2 Mesh Equations 57 B-uy= (3.10) where uy denotes the vector of voltages across each of the circuit branches. This can then be expressed as: up = Ze sig + uy (3.11) where i, denotes the vector of currents through each of the circuit branches and u, denotes the vector of voltage sources in the circuit branches. We can now transform the vector of branch currents into the vector of loop currents as follows: iy = BT ej (3.12) Plugging the last three equations into each other, we find: BD, 87 «j, (3.13) A comparison to Eq.(3.6) yields: Zn = B+ Dy BT (3.142) e, = -B-u,y (3.140) ‘We can now evaluate all loop currents at once by computing: ht =Zmo*-eg (3-15) which we shall often abbreviate as: b= 2m\ee (3.16) using the slash operator (“/”) to denote matrix division from the right and the backslash operator (“\”) to denote matrix division from the left. This is the notation used in MATLAB and CTRL-C. We can then immediately find all branch currents using Eq.(3.12) and finally we can find all branch voltages using Eq.(3.11). Notice, however, that the evaluation of Eq.(3.16) is more tricky than it seems at first sight since it involves the symbolic inversion of a polynomial matrix. Neither MATLAB nor CTRL-C can handle this type of matrix inversion. 58 Chapter 3: Principles of Passive Electrical Circuit Modeling 3.3 Node Equations Let me next discuss the alternative approach using node equations and Kirchhoff’s current law. Since we now have a source of the “wrong” type, we first need to convert the circuit. Figure 3.7 shows how this is done. ( oh © (b) () Figure 3.7. Conversion of the voltage source. Since the “wrong” source is ideal, we start by moving the source into other branches. This is easily accomplished by compensating the source with an equivalent source of reverse polarity as shown in Figs.3.7a-b. Figure 3.7b is equivalent to the original circuit in every respect except for the potential at the additional top node. Now, ‘we can convert the voltage sources to equivalent current sources as shown in Fig.3.7c. This circuit is again equivalent to the previous ones ezcept for the internal characteristics of the sources. Conse- quently, the voltage across and the current through the inductor L and the resistor R, are no longer the same as before. In fact, the inductor has been short-circuited altogether. Since these “modifica- tions” affect about half of our original circuit, this approach may not be sensible for the given problem. However, if we wish to determine the voltage across the capacitor only, this approach works perfectly well. Instead of continuing with this example, let me demonstrate this technique by means of a slightly different example. Figure 3.8 shows another passive circuit. 3.3 Node Equations 59 Figure 3.8. Another passive circuit. Figure 3.9 demonstrates the steps needed to prepare the circuit for the formulation of node equations using Kirchhoff’s current law. ¥,=1/R Yo=1/Ry Yo=sC (a) (b) Figure 3.9. Preparation of the circuit for node equations. Figure 3.9a shows the selection of the tree, which now should con- tain the current source. Every node of the circuit must be reached by the tree. It is usually a good idea to build the tree as a star with the center at the ground node (reference node). For this purpose, it is often necessary to introduce additional fictitious tree_-branches (tree_branches with zero admittance). Figure 3.9b shows the conver- sion of the circuit from the time domain to the frequency domain, now using admittances rather than impedances. ‘Then we introduce so-called cutset potentials, one for each tree-branch of the circuit. A cutset is a generalized node. Except for the one tree-branch that it represents, it cuts through links only. Figure 3.10a depicts the two cutsets of our circuit. Once the tree has been selected, the cutsets are fully determined. The cutset potentials 60 Chapter 3: Principles of Passive Electrical Circuit Modeling e; and 2 are identical to the node potentials at the nodes in which the tree_branches end. If every tree-branch connects one node of the circuit with the reference node (as in our example), the cutset po- tentials are also identical to the voltages across the tree-branches and uz of Fig.3.10b. The link voltages ug, us, and us are the directed sums of the cutset potentials that cut through the three links. lame Io | “| 1) P= (b) Figure 3.10. Introducing cutset voltages. Figure 3.10a shows the introduction of cutset voltages and their po- larities. Figure 3.10b places direction conventions on all branch volt- ages. Using the circuit as shown in Fig.3.10a, we can immediately pro- ceed to generate circuit equations by applying Kirchhoff’s current law to every cutset of the tree: Ip = Vi * (e1 -€2) + Yo ven (3.17a) O=Y¥, +e2+¥%i + (e2—e1) + ¥a ve2 (3.178) which can be reordered as: Jo = (Yi +¥o)*#e1-Yiver (3.18a) 0=-Y ee + (Ki +¥o+¥r) +e2 (3.186) This can further be written in a matrix notation as: Io) _ ("+¥e —‘ _(% 9 (8) = (8 YH+K+¥n) er (8) 3.3 Node Equations 61 which can be abbreviated as: Je Yn ven (3.20) where j, denotes the source current vector, Y, denotes the node admittance matriz, and ey denotes the cutset potential vector. ‘As before, we can achieve the same result more systematically by starting off with two other matrices, namely, the node-incidence ma- trix and the branch-admittance matrix. The node-incidence matriz , which is sometimes also called the fundamental cutset matriz, is defined as a matrix that describes the circuit topology by recording the direction of the cutset voltages relative to the direction of the branch voltages. This procedure is illustrated in Fig.3.10b, which allows us to generate the following node-incidence matrix: ul u2 ud ud ub ea(1 oo 1 1 0 2 ( o 1-10 1 ) (an) ‘The node~incidence matrix contains +1 entries where the direction of a cutset voltage corresponds with the direction of the branch voltage, it contains —1 elements where the cutset voltage and the branch voltage have opposite directions and it contains 0 entries for branches in which the cutset is not present. ‘The branch-admittance matric ¥, is defined as a diagonal ma- trix containing the individual branch admittances along the main diagonal: Y, = ding(0, 1/sL,1/Ri, sC,1/R2) (3.22) We can again write all equations in a compact matrix form. Let us start with Kirchhoff’s current law: Bei (3.23) where i, denotes the vector of currents through each of the circuit branches. This can then be expressed as: ip = Yp- un tig (3.24) where uy denotes the vector of voltages across each of the circuit branches and i, denotes the vector of current sources in the circuit branches. We can now transform the vector of branch voltages into the vector of cutset potentials as follows: 62 Chapter 3: Principles of Passive Electrical Circuit Modeling uw = 7 -en, (3.25) Plugging the last three equations into each other, we find: BY, 27 -ey = Bi, (3.26) A comparison to Eq.(3.20) yields: Y, = 2-Y,-97 (3.27a) do = -B -ig (3.278) We can now evaluate all cutset potentials at once by computing: ew = Ya\ic (3.28) ‘We can then immediately find all branch voltages using Eq.(3.25) and finally we can find all branch currents using Eq.(3.24). Notice, however, that the evaluation of Eq.(3.28) is more tricky than it seems since it again involves the symbolic inversion of a polynomial matrix. 3.4 Disadvantages of Mesh and Node Equations ‘We have not yet answered the question how these techniques can help us to derive a set of first-order differential equations, i.e., our state-space model. Let us return once more to the original circuit example and the set of equations as formulated in Eqs.(3.3a-c). In order to derive a state-space description, we need to transform these equations back to the time domain: «aya i fy, 2 Uo= Blin -ha)t+ Gf (i - 52 — 5a)dr (3.292) c J3 . . 1 . . . =r eRe —i)+ f ja tia f)dr (3.298) 3 t _ 1 poe ue = Rist G f (ia + 52 — ji)dr (3.29¢) °

You might also like