Sei sulla pagina 1di 17

Graph theory for circuit analysis

Arunachalam V
APSG, SENSE

Why do circuit represented as graph?

When we do circuit analysis using computers, we need to express this


circuit in a standard form for input to the program.
Whether the circuit is input via a GUI or as a text file, at some level the
circuit will be represented as a graph, with elements as edges and nodes
as nodes.
For example, when entering a circuit into PSpice via a text file, we number
each node, and specify each element (edge) in the circuit with its value and
endpoints.
The graph provides connectivity information. To actually solve the circuit
using this graph, the types of elements forming the edges would need to be
provided.

Circuit represented as a graph


Set of vertices / nodes
V 1, 2, 3, 4, 5

Set of edges with orientation


E 12,13, 41, 24, 25, 23, 35,54

Without orientation
E a, b, c, d , e, f , g , h

b
a
c

f
d

e
h

Topological terms

Topological terms that we already know and have been using correctly are:
Node: A point at which two or more elements have a common connection.
Path: A set of elements that may be traversed in order without passing
through the same node twice.
Branch: A single path, containing one simple element, which connects one
node to any other node.
Loop: A closed path.
Mesh: A loop which does not contain any other loops within it.
Planar circuit: A circuit which may be drawn on a plane surface in such a
way that no branch passes over or under any other branch.
Non-planar circuit: Any circuit which is not planar.

Incidence matrix, B

We can encode KCL by using the language of matrices. For this purpose,
we define the incidence matrix, B of the graph G = (V, E) (whose edges
have been given an arbitrary orientation) as a matrix whose rows are
indexed by vertices and columns by edges.
The entry of B corresponding to row (vertex, v) and column (edge, e) is
simply taken to be bv,e as defined above.
For instance, in the first example, we have
E 12,13, 41, 24, 25, 23, 35,54
b
E a, b, c, d , e, f , g , h
a
c

f
d

e
h

1 1 1 0 0
1 0 0 1 1

B 0 1 0 0 0

0 0 1 1 0
0 0 0 0 1
a
b
c d
e

0 No connectivity
1 connected, current flows from that node to other
-1 connected, current flows from other node to that node

0 1
1 0 0 2
1 1 0 3

0 0 1 4
0 1 1 5
f
g h

Encoding KCL
The current vector for this graph is
The KCL is
For a node 1,

i i a , ib , i c , i d , i e , i f , i g , i h T

Bi 0
i a ib i c 0

For the node voltage analysis, we need to consider a node as reference


node.
Therefore, we need to delete a row in the B matrix, which results as
reduced incidence matrix, Bv (v is the reference node).

Cycle Matrix, A
b
a
c

E 12,13, 41, 24, 25, 23, 35,54

f
d

E a, b, c, d , e, f , g , h

h
Cycle 1241,1231,123541,13541, 2542, 2352,12541, 23542
The entry of A corresponding to row (loops, l) and column (edge, e) is simply
taken to be bv,e as defined above.
1 0 1 1
1 1 0 0

A 1 0 1 0

. .
. .
. .
. .
a b
c d

0 0 0 0 1241
0 1 0 0 1231
0 1 1 1 123541

. . . . .
. . . . .
e f g h

Encoding KVL
T
The voltage vector for this graph is v v a , v b , v c , v d , v e , v f , v g , v h

The KVL is

Av 0

For a loop 1241,

va vd vc 0

For the mesh current analysis, we need to consider only meshes and not
other loops.
Therefore, we need to delete a rows in the A matrix which represents
other than meshes, which results as reduced incidence matrix, Am (m
are the meshs).

Tree and Co-tree


b
a

f
c

g
h

E a, b, c, d , e, f , g , h

A tree is defined as any set of edges in a graph that touches every node
without forming any closed paths.
Tree c, d , e, g
Also known as Hamiltonian path!
Each tree has a co-tree, which is the set of edges not in the tree.
Co tree a, b, f , h

Cut Set
b
a

f
c

g
h

A cut set is a minimal set of edges that, when broken, breaks the graph
into two completely separate parts (two groups of nodes.
Minimal means that a cut set cannot contain another smaller cut set
that would break the graph into the same two parts.

Fundamental Cut Set


b
a

f
c

g
h

Suppose I am given a tree.


A fundamental cut set w.r.t. that tree is a cut set that only contains one
branch of the tree (14).
There may be many fundamental cut sets w.r.t. a given tree.

Finding Fundamental Cut Sets


Systematically
1. Redraw the graph with the tree in a straight line.
2. For each tree edge, form its fundamental cut set as follows:
2a) that tree edge is a member of this fundamental cut set
2b) cut that edgewhat two groups of nodes are separated?
2c) the fundamental cut set also contains all edges in the co-tree
that connect these two groups.

a
b
4

1
d

How these can be used in circuit


analysis

1.
2.

3.

Identifying a tree for a circuit, and all of the fundamental cut sets that
go with it, can be used in nodal analysis.
Here are the steps simulation software may take to perform nodal
analysis:
From user input, make a connectivity matrix (graph) and record the
circuit element on each edge.
Choose a tree using the following guidelines:
a) Place an edge in the tree if it contains a voltage source, or if the
voltage over the edge controls a dependent source.
b) Place an edge in the co-tree if it contains a current source, or if
the current in the edge controls a dependent source.
Find all of the fundamental cut sets for this tree.
n nodes yields n-1 fundamental cut sets

How these can be used in circuit


analysis
4.

Each fundamental cut set breaks the circuit into two pieces: two supernodes. Write a KCL equation for one super-node in each fundamental cut
set (in terms of node voltages).
The KCL equations for the two super-nodes formed by a fundamental cut set will be the
same.
This is where the circuit element info comes into play.
This yields n-1 equations in n node voltage variables.

5.

Set one node voltage to zero volts (ground) and solve .

All of this can be done computationally.


Graph algorithms
Linear equation solution

This algorithm shows why nodal analysis always works: you get (n-1)
independent linear equations in n-1 unknowns.
The fundamental cut sets ensure independence of the equations - unless the
circuit has impossible elements.
Each fundamental cut set contains a unique element (edge) from the tree. So each KCL
equation provides new info.
The elements themselves could destroy the independence (redundant dependent source,
shorted voltage source) but this wont happen in real life circuits.

Find the node voltages using the graph


method.
0.75 IX
10
20
120 V

IX

40

Next Class

PROBLEM SOLVING ON GRAPH THEORY

Potrebbero piacerti anche