You are on page 1of 7

Symbolic analysis of electronic circuits based on a

tree enumeration technique

M. Sharif-Bakhtiar
M. AN Ahmad

Indexing terms: Electronic circuits, Symbolic analysis, Unistor graphs

For the two-port network of Fig. 1 the transfer func-


Abstract: A topological method for symbolic tion H(s) = V0(s)/Iin(s) can be written as
analysis of electronic circuits is presented. The
method is based on the derivation of the tree pro- A12(s) - A12.(s)
H(s) = (1)
ducts of unistor graphs. A straightforward pro-
cedure to produce all directed trees of a unistor where An and A o s are the determinant and cofactors of
graph in independent groups is given. The the network node-admittance matrix Yn, respectively.
network cofactor is obtained by calculating the
network determinant of a modified unistor graph. Ii h
A computer program based on the given method 1 2
written for PCs is also described. +

V H(s) v2=v
) 1

V 21
1 Introduction Fig. 1 Two-port network with transfer function H(s) = V0(s)/Iin(s)
Network transfer function in its symbolic form can be
used as an effective tool in the analysis and design of Using the Binet-Cauchy theorem it can be shown that
electronic circuits [1, 2]. For this reason several attempts [12]
to produce computer programs for the derivation of the An = Y, e/complete-tree product of tree j) (2)
symbolic transfer function of electronic networks have
been made [3, 4]. The methods for generating the sym- and
bolic transfer function of a network may be categorised
into five different groups as: all complete 2-trees

(i) Matrix manipulation [5] x complete 2-tree f . J product (3)


(ii) Parameter extraction [6]
(iii) Numerical interpolation [7] where e, and et = ± 1 and r is the reference node.
(iv) Flow graph techniques [8] Application of eqns. 2 and 3 requires the time-
(v) Tree enumeration [9] consuming enumeration of all complete trees and com-
plete 2-trees of the graph. Sign permutation must also be
Amongst these, topological algorithms based on tree enu- done for each enumerated complete tree or 2-tree. Sign
meration are considered to suffer from excessive require- permutation can be avoided by the application of unistor
ments for computer time and memory [10]. However, graphs [13], where for a unistor graph eqns. 2 and 3 can
this is also the case with the algorithms based on matrix be written as
manipulation and eigenvalue methods when the circuit
includes more than a few nodes. This is due to the great An = X (directed tree admittance product) (4)
all directed trees
number of terms that have to be manipulated. Recent
work on matrix manipulation techniques [11] has shown and
that, to extend the usefulness of these techniques to larger
electronic networks, application of methods such as hier-
archical decomposition and the use of other topological
[ directed 2-tree (
/.
\J r
methods is unavoidable. admittance product (5)
In this paper it is shown that topological methods
based on tree enumeration can be efficiently used for To use eqns. 4 and 5 for calculating network determinant
symbolic analysis of fairly large electronic networks and cofactors, an efficient algorithm to enumerate all
without the need for excessive computer time and directed trees and 2-trees is given in the following
memory. Section.
2 Generation of all directed trees of a unistor
Paper 9083G (E10), first received 10th February and in revised form 6th graph
July 1992
The authors are with the Department of Electrical Engineering, Sharif The algorithm presented for enumeration of the directed
University of Technology, PO Box 11365-8639, Azadi Ave, Tehran, trees of a given graph has two basic properties:
Iran (i) Generation of directed trees in independent groups
68 IEE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993
(ii) Automatic generation of directed trees without the Property 3: Let bt be a branch of G incident to the refer-
need to examine the direction of the branches for each ence node, then
enumerated tree.
Tj=T{bi,0} + biT{0,bi} (11)
To explain the algorithm a few basic definitions are given Note that the expression for T has a grouping property.
first. The two groups of trees, i.e. T{fc,-, 0} and T{0, b,}, can be
independently generated. 7} can then be derived by
Definition 1: Graph G{A, B} is obtained from G by grouping the two sets of trees using property 3.
removing the branches of subgraph A and contracting
the branches of B. Collection of all trees of G{A, B} is Theorem 1: Given a directed graph G, there exists a set
denoted by T{A, B}. of PS graphs each obtained from G by removing some
branches or contracting some others, such that the trees
Definition 2: A 'series operation' in a graph is referred to of G are the sum of the trees of these PS graphs.
the contraction of a branch from two series branches. The proof of this theorem directly results from the
above properties ans is similar to that given in Reference
Definition 3: A 'parallel operation' is referred to the 14 for undirected graphs.
removal of one branch from two parallel branches. Thus, directed trees of a given graph can be obtained
in independent groups by the following steps:
Definition 4: A 'parallel-series graph' (PS graph) is a Step 1: Apply parallel-series operation to reduce the
graph which can be reduced to a single branch by apply- number of branches and nodes of the graph G. In appli-
ing a sequence of parallel and series operations. cation of series operation it must be noted that this oper-
ation does not apply to two series unistors when the
With the application of the properties of directed trees reference node is the common node between the two uni-
[13], the proof of the following properties is trivial. stors.
Step 2: When no further parallel-series operation is
Property 1: Let bt be a directed branch of a graph G with possible, remove (and contract) a branch incident to the
the directed trees T, and add another directed branch bj reference node to produce two independent but smaller
in series with b{ to form G} in which bx is connected to graphs.
nodes i and k, and bj is connected to nodes j and k. The Step 3: For the smaller subgraphs produced in Step 2
directed trees 7} of graph G} can then be derived from T proceed to Step 1 until all subgraphs are reduced to a
as follows: single branch.
Case 1:ft,and bj are incident to nodes i and j respec- Step 4: Starting from each remaining single branch, by
tively. Then following the reverse process of parallel-series operations
performed to reduce the graph, an independent set of
bj)T{bi,0} (6) trees of the given graph can be constructed using proper-
Case 2: b{ and bj are both incident to node k. Then Gj ties 1, 2 and 3.
has no directed tree, i.e. 7} = 0.
The successive parallel-series operations performed for
Case 3: bj is incident to node k and the direction of bt
the reduction of the original graph or subgraphs are
is from node k toward node i. Then
stored in a table called a PS table. The PS table contains
Tj = biT{bi,0}+bibjT{0,bi} (7) all the information needed to rebuild the original graph
Case 4: bt is incident to node k and the direction of bj from the remaining single branches. It also serves as a
is from node k toward node j . Then guideline to construct trees of the graph and contains all
the information about the trees in a small memory space.
= bjT{bt,0}+btbjT{0,bt} (8) Trees of a given graph will be generated from the PS
table only when the final expression of the tree products
Property 2: Let b{ be a branch of G, and add another is needed. The size of each group of trees can also be
branch bj in parallel with bt to form graph Gj. The controlled by the application of property 3 when con-
directed trees 7} can than be derived from T as follows: structing the PS table.
Case 1: bt and bj are of the same direction. Then
Tj=T{bi,0}+(bi + bJ)T{0,bi} (9) 2.1 Example 1
For the unistor graph shown in Fig. 2 the PS table and
Case 2: b( and bj are of opposite directions. Then corresponding parallel-series operations are shown in
Tj = T{bt, 0} + bt T{0, bt} + bj T'{0, bt) (10) Table 1 and Fig. 3, respectively. Table 2 shows the evolu-
where T" is the set of trees that could not be directed
trees due to the direction of bt. These trees constitute
directed trees in combination with bj.
Properties 1 and 2 suffice for the tree enumeration of a
PS graph. The number of branches in a PS graph can be
reduced by applying a parallel or series operation. The
order of a PS graph can also be reduced by applying the
series operation. Consecutive application of parallel and
series operations reduces a PS graph to a single branch.
Starting from this remaining single branch, the original
PS graph can be reconstructed by following the reverse
sequence of parallel-series operations. Using properties 1
and 2 the directed trees of the PS graph can be also enu-
merated when reconstructing the original graph. Fig. 2 Unistor graph of example 1

1EE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993 69


tion of the directed trees by following the PS table from sponding to the network determinant. This is the price
bottom to the top. The directed trees are produced in that is paid for calculating the directed trees in a straight-
two independent groups. One group corresponds to the forward procedure without having to either perform any
test to assure the completeness of the trees or to calculate
the sign permutation for each tree.

Table 2: Tree evolution of graph in Fig. 2


row 1 row 6
PS table row V Comments
First group:
5 a+b (0) property 2, case 1
4 ab+bd (a) property 1, case 1
3 ab+bd + ae (0) property 2, case 2
2 abf + bdf + aef (0) property 1, case 4
1 abf + bdf + aef (0) property 3
row 7 Second group:
10 b (0) property 2, case 2
9 a+b (0) property 2, case 1
8 ab + bd (0) property 1, case 3
7 ab+ae+bd + de (0) property 2, case 1
6 abc + aec + bdc + dec ( 0 ) property 3
T = {abf + bdf + aef) + (abc + aec + bdc + dec)

Once generated, the admittance product terms, corres-


ponding to each directed tree, are grouped in terms of the
power of the s terms. The search for cancellation is then
performed in each group independently. This results in a
considerably less computer time compared with the com-
row 10
puter time that is needed for sign permutation.

4 Calculation of network cofactors

The application of eqn. 5 to calculate the cofactor A,-,- of a


Fig. 3 Graph reduction sequence corresponding to PS table of Table 1 given network requires the derivation of all directed
2-trees of the network. The following theorems show that
graph with the unistor c removed and the other group the problem of calculating AfJ- can be reduced to the enu-
corresponds to the graph with the unistor c contracted. meration of the directed trees of a properly modified
graph.
3 Calculation of the network determinant
Definition 5: A unistor connected to nodes i and j with
Once all the directed trees of a network have been gener- the direction toward node; is denoted by yu.
ated, the network determinant can be calculated using
eqn. 4. It should be noted that, owing to the unistor Theorem 2: In a unistor graph (GJ with node j as the
models chosen for the circuit elements, redundant terms output, disconnecting any unistor yki from the input node
with opposite signs may be generated. These terms must i and connecting it to the reference node (graph G2) does
be cancelled when sorting the polynomial of s corre- not change the cofactor A y .

Proof: Fig. Aa shows a general unistor graph GY with


Table 1 : PS table of unistor graph in Fig. 2
unistor yki incident to the input node i. Let us take the
Row First Second Operation Branch Branches network functions of G2 shown in Fig. Ab as
branch branch deleted producing
r YL- (12)
c — c —
e f f —
d e e e(d)
a d d e(d) (13)
a b b e(d)
End of first group then, for the unistor graph G l5
6 c — c
7 6 e e —
8 6 d d — (14)
9 a b b —
10 6 f f fib)
End of second group (15)
End of PS table
R Removed Solving eqns. 14 and 15 for Vj/Iin results in
S Series
P Parallel (16)
C Contracted Un A - A t t y H
70 IEE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993
Comparing eqn. 16 with eqn. 12 proves that the cofactors Proof: Fig. 5 shows the unistor graph G2 which is derived
A(J- for Gx and G2 are the same. from Gl by replacing yjt with yjr = yjt. If the network
function for G2 is taken as

(17)
=

then the voltage at node; of Gx can be written as

(18)

The network function for G^ can be calculated from eqn.


18 as

AIL (19)
/,„ A- Auyn
which proves that the cofactor A y remains unchanged.
y = y
kr ki

Theorem 4: The cofactor Ao- of the unistor graph Gx is


Fig. 4 Unistor graph the same as the network determinant calculated from
a General unistor graph with node i as input graph G 2 , where graph G2 is derived from graph G^ by
b Unistor graph G, with unistor yki connected to reference node
the following operations:
(i) For unistors incident to the input node, change the
terminating node from node i to the reference node.
(ii) Remove all unistors connected to the output node ;
whose direction is away from node;.
(iii) For each unistor connected to node j , add a
unistor with the same weight from node ; to the reference
node.
Fig. 5 General unistor graph with node j as output and with unistor yJt
(iv) Negate the weight of the unistors connected to
connected to reference node node i, and then reduce the order of the graph by con-
necting node i to node;.
Theorem 3: In a unistor graph (GJ and for a unistor yjt,
where / is any internal node in G l5 replacing yjt with a
unistor yjr = yu results in a new graph G2 whose cofactor Proof: Fig. 6a shows a general unistor graph Gx with
Atj is the same as the cofactor Au of Gv nodes i and ; as the input and output nodes, respectively.

for all y jk 's

c d
Fig. 6 Unistor graph
a General unistor graph G,
b Unistor graph G, with all unistors incident to input node and all unistors with direction away from output node connected to reference node
c Graph G2 with input source equal to — Vjyi and with voltage source connected to output
d Modified graph for calculating cofactor A y

IEE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993 71


Let us assume the network function of Gj to be Considering the direction of yik s the directed trees of G2
can be grouped as
(20)
/._ T = (yikl + yik2 + ••• + y i k l ) { ( y i k l , y i k 2 , • •.,)>,*„),0} (23)
By application of theorems 1 and 2 to Gl5 the unistor Thus, the network determinant of G2 can be written as
graph G2 shown in Fig. 6b is obtained in which yjr is a
unistor whose value is the sum of the value of all unistors A" = (^ k l +3', f t 2 + ---+}; lkn )A"' (24)
incident to the reference node from node j . The network where, A'" is the directed-tree product of G2 when yik s are
function of G2 can be written as Vj/Iin = A y /A' where, removed.
A' = yjr A" because yjr exists in all directed trees of G 2 . Application of eqn. 24 to eqn. 22 yields
The total current injected to node) can then be written as

(25)
(21)
Eqn. 25 shows that the network determinant of G2 when
From eqn. 21 the impedance seen at the output node of yjr is removed and a current equal to
G2 when yjr is removed and a current equal to — JjCViki + yik2 + • • • + yik) is injected to node i is the
- V £ y i k l + yik2 + ••• + yikn) is injected t o node i, as cofactor of Gv
shown in Fig. 6c, can be calculated as The KCL equation at node i proves that the current
injected into each internal node kp is equal to -Vjyik .
(22) By connecting node i to node j and negating the value of
the unistors yik s the current injected to the internal nodes

circuit component equivalent unistor model

1/R f I 1/R

0
©
cs/ \ cs
CD

1/LS i M/LS
-o-
X

"pq pq

Fig. 7 LJnistor models for basic circuit components

72 IEE PR0CEED1NGS-G, Vol. 140, No. 1, FEBRUARY 1993


kp does not change. However, to keep the output equa- The computer time for the derivation of the symbolic
tions unchanged a unistor yjr = (yikl + yik2 + ••• + yikn) transfer function of the second-order active filter shown
has to be connected to the output node. Therefore, the in Fig. 8 was 29 s. The amplifier shown in Fig. 9a was
output impedance of a network (G3) derived from G2 by chosen as another example. The transfer function of this
the above operation (Fig. 6d) is the output impedance of circuit using the transistor hybrid-II model shown in Fig.
G2 given in eqn. 25, i.e. the network determinant of G3 is 9b with all circuit components taken as parameter was
equal to the cofactor Atj of Gv derived in 63 s.

4 Computer program 5 Conclusions


A computer program for the derivation of the symbolic A topological method for the derivation of the symbolic
transfer function of electronic circuits was written based transfer function of electronic circuits has been presented.
on the algorithm described in the preceding Sections. The Unistor graphs were used for tree enumeration to avoid
input to this program is a net list similar to that of sign permutation for each individual tree. An algorithmic
SPICE. Active elements are first replaced by their corres- method to enumerate directed trees, without the need to
ponding small signal model. A unistor network is then inspect the direction of the branches of each enumerated
generated by replacing each circuit component with its tree, has been also given. The application of a unistor
equivalent unistor model. Fig. 7 shows unistor models for model for circuit components produces multiple terms
basic circuit components. The network determinant and with opposite signs in the transfer function that are can-
the desired cofactor are consequently calculated from the celled out when the final sorting of the coefficients is per-
unistor graph. formed.
The program was written for an IBM compatible per- A method to calculate the cofactors of a given network
sonal computer based on an 80386 microprocessor with by calculating a network determinant from a properly
2MB of RAM and a clock frequency of 26 MHz. Analysis modified unistor graph was described and the rules to
of different electronic circuits with this program proved produce the modified unistor graph were also given.
that the symbolic transfer function of fairly large elec- The performance of the program written for a PC,
tronic circuits can be calculated in a fairly short time and based on the given algorithm, proves the effectiveness of
the algorithm efficiency is not restricted to a particular the algorithm for symbolic analysis of electronic circuits.
class of circuit topology.

Fig. 8 Second-order active filter

6 References
1 GIELEN, G.E., WALSCHARTS, H.C.C., and SANSEN, W.M.C.:
'Analog circuit design optimization based on symbolic simulation
and simulated annealing', IEEE J. Solid State Circuits, 1990, 25, (3),
pp. 707-713
2 YOKOMOTO, C.F.: 'A simple bookkeeping scheme for computing
sensitivities of symbolic transfer functions', IEEE Trans., 1974,
CAS-21, (5), pp. 606-608
3 LIBERATORE, A., and MANETTI, S.: 'SAPEC — a personal
computer program for the symbolic analysis of electrical circuits'.
Proceedings of ISCAS, 1988, pp. 897-900
4 LIN, P.M., and ALDERSON, G.E.: 'SNAP — a computer program
for generating symbolic network functions'. School of Electrical
Engineering, Purdue University, Lafayette, IN., Tech. Rep. TR-EE
70-16, 1970
5 TSAI, M.K., and SHENOI, B.A.: 'Generation of symbolic network
functions using computer software techniques', IEEE Trans., 1977,
CAS-24, pp. 344-346
6 ALDERSON, G.E., and LIN, P.M.: 'Computer generation of sym-
bolic network functions — a new theory and implementation', IEEE
Trans., 1973, CT-20, (1), pp. 48-56
Fig. 9 Circuit with bipolar transistors to test program performance 7 FIDLER, J.K., and SEWELL, J.I.: 'Symbolic analysis for computer
a Wide-band amplifer with compensation capacitor Cc aided circuit design — the interpolative approach', IEEE Trans.,
b Small signal model of transistors 1973, CT-20, (6), pp. 738-741

IEE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993 73


8 STARZYK, J.A, and KONCZYKOWSKA, A.: 'Flowgraph 'ISAAC: A symbolic simulator for analog integrated circuits', IEEE
analysis of large electronic networks', IEEE Trans., 1986, CAS-33, J. Solid State Circuits, 1989, 24, (6), pp. 1587-1597
(3), pp. 302-315 12 SESHU, S., and REED, M.B.: 'Linear graphs and electrical net-
9 CHOW, J.T., and WILSON, A.N. Jr.: 'A micro computer-oriented works'(Addison-Wesley, MA, 1961)
algorithm for symbolic network analysis'. Proceedings of ISCAS, 13 MAYEDA, W.: 'Graph theory' (John Wiley, New York, 1972)
1985, pp. 575-577 14 HASHEMIAN, R., and BAKHTIAR, M.S.: 'Generation of all pos-
10 McCALLA, W.J., and PEDERSON, P.O.: 'Elements of computer sible trees of a graph in independent groups', Computer-aided design,
aided analysis', IEEE Trans., 1971, CT-18, pp. 14-26 1975, 7, (3), pp. 157-159
11 GIELEN, G.E., WALSCHARTS, H.C.C., and SANSEN, W.M.C.:

74 IEE PROCEEDINGS-G, Vol. 140, No. 1, FEBRUARY 1993

You might also like