1.3 AUTOMATIC EQUATION FORMULATION

The representation of the circuit equations in a computer program reflects the way in which G and i are stored. Let us, for the moment, use a two dimensional array for G and a one dimensional array for i. The question is how to transform the network description given by the user into these two arrays. If the circuit description is thought of as a list of network elements with topological and parametric data, we need a method of equation formulation which introduces the contribution of each element into the matrix equation (1.4d) one after the other, automatically. At the start of the formulation process, both G and i will have zero values.

Let us find the contribution of a conductive branch. In Fig. 1.5 a typical branch is depicted. The contribution of this branch to the KCL equations is shown in (1.8) where Sk and Sj are sums of all the currents other than the conductance current leaving nodes k and j, respectively.

(1.8)

Fig. 1.5 Resistive branch.

It may be convenient, when nodal equations are formulated to follow the order of the node numbering. Hence, the KCL equation for the first node is formulated first and so on. The equations are then said to be ordered. It is also customary to renumber the variables when the equations are reordered so that the equation number is equal to the variable number. This is indicated in Fig. 1.5b where the equation for the kth node is ordered kth, and the equation for the jth node is ordered jth.

According to (1.8) the contribution of conductor Gkj to the system of equations is as follows: it adds the value Gkj to the kth column of the kth equation and to the jth column of the jth equation, and it subtracts the value Gkj from the jth column of the kth equation, and from the kth column of the jth equation. This is shown in Table 1.1, which is frequently referred to as the element's stamp.

Table 1.1 A conductance stamp

In this table, the rows represent equation numbers, and the columns variables. RHS is the right-hand side of (1.4d).

In a similar way the stamp corresponding to the current source connected between nodes k and j may be obtained as shown in Table 1.2. The current orientation is as shown in Fig. 1.2b.

In both Table 1.1 and Table 1.2, if k or j are zero i.e. if one of the branch terminals is grounded the corresponding equation is deleted and the variable omitted. In both cases only one item is left for updating the matrix or RHS vector.

Table 1.2 A current source stamp

As an illustration of this method the nodal admittance matrix and the RHS vector of the circuit in Fig. 1.4 will be generated. The contribution of the circuit elements will be introduced in the following order: J1, G1, G2/E1, and G3.

Initial Matrix

Stamp for J1

Stamp for G1

Stamp for G2/E1

Stamp for G3

Final Matrix

Fig. 1.6 The process of equation formulation using element stamps.

It is left as an exercise for the reader to develop the stamp of the composite branch of Fig. 1.3 which is used in the third stamp of Fig. 1.6.

From this we can conclude that the use of stamps is an effective automatic method for equation formulation.

The process is shown in Fig. 1.6. The matrix and RHS vector are given corresponding to the state before the introduction of each branch stamp, followed by the respective branch stamp.

Contents

1.2 Nodal analysis

1.4 Modified nodal analysis