You are on page 1of 5

312 IEEE TRANSACTIONS ON EDUCATION, VOL.

38, NO, 4, NOVEMBER 1995

Node and Mesh Analysis by Inspection


James G. Gottling, Member, IEEE

Abstract--This paper shows how to write node or mesh analysis Wilson’s 171 matrix solution for operational amplifier circuits,
linear circuit equations by inspection of the circuit schematic but is more general as it includes all four types of controlled
diagram and obtains two different matrix solutions of these sources, op amps, and mutually coupled inductances. Also,
equations. The linear circuit can have resistances or impedances,
controlled sources, ideal operational amplifiers, or mutually cou- using the inspection matrices and the independent source
pled coils. The first matrix solution finds the node-voltage or matrix, we find a solution for a vector of output variables other
mesh-current vector in terms of matrix operations with the than the node-voltage or mesh-current vector. This solution is
inspection matrices. Also, this method gives a matrix solution appropriate for identification of Thtvenin or Norton equivalent
for any arbitrary output vector in terms of the node-voltage circuits, two-port parameters, or state-variable matrix param-
or mesh-current solution vector, the independent-source vector,
and the inspection matrices. The second matrix solution method eters. An altemative, second matrix solution writes a single
finds the solution for a vector consisting of all node voltages or matrix equation for the circuit, which gives a solution vector
mesh currents, dependent sources, controlling variables, and any consisting of all node voltages (or mesh currents), dependent
output variable@)using a single matrix equation. Matrix methods sources, controlling variables, and any output variables.
of circuit analysts are now appropriate for student use because Matrix analysis computer programs such as MATLAB [8]
of the existence of calculators capable of solving large matrices
and the availability of inexpensive math programs for personal and calculators capable of solving large matrices, give numeri-
computers. cal solutions of these equations for specific values. The circuit
inspection method builds on the foundation that students have
in learning the node and mesh methods and leads to matrix
I. INTRODUCTION representation of circuit solutions.

S TUDENTS leam to write Kirchhoff current law (KCL)


node equations and Kirchhoff voltage law (KVL) mesh
equations. Many introductory circuit theory textbooks [ 11-[6]
11. NODALANALYSIS
To identify nodal KCL equations by inspection, first find
show that the node (mesh) analysis conductance (resistance) the number of independent KCL equations using
matrix of a circuit having no dependent sources is symmetric,
and inspection of the circuit gives the matrix components di- No. of independent KCL equations = ( n - 1) - n,, (1)
rectly. In the node (mesh) analysis method, diagonal elements where n is the number of nodes and n,, is the number
consist of the sum of conductances (resistances) affected by of independent and dependent voltage sources, exclusive of
the node voltage (mesh current). Negative mutual terms enter any voltage sources completing a loop. A loop formed by a
into off-diagonal positions and account for current (voltage) collection of voltage sources has to satisfy KVL. However,
components in the equations due to adjacent node voltages the current in such a loop is indeterminate. Remove voltage
(mesh currents). Independent current (voltage) sources enter sources completing loops. Likewise, a cut set consisting of
directly into the excitation matrix on the right-hand side of current sources has to satisfy KCL, but this cut set creates a
the matrix formulation. Independent ground-connected voltage separate circuit having indeterminate node voltages. Node or
(perimeter current) sources in node (mesh) equations give mesh analysis can not solve indeterminate circuits.
no difficulty, since these identify node voltages (mesh cur- Next, identify the solution vector of independent node
rents) where KCL (KVL) equations usually are unnecessary. voltages V,. This vector contains the number of independent
Independent floating voltage (internal current) sources also node voltages given by (1). The node voltages may appear
enter directly into the matrix equations using the supemode in any appropriate order in the solution vector. Each ground-
(supermesh) method. The effect of voltage-controlled current connected voltage source sets a node voltage, so these nodes
(current-controlledvoltage) sources in node (mesh) analysis is are not members of the solution set. Also, floating voltage
simple, but the remaining types of dependent sources do not sources establish constraints between neighboring node volt-
enter the node (mesh) equations in a simple and direct way. ages. These constraints reduce the number of independent node
In this paper we show how to write node or mesh analysis voltages in the solution vector. Selection of a single node
matrix equations for a linear circuit by inspection of the circuit voltage to retain as the supemode voltage from among a set
and derive a general matrix solution for the node-voltage or the of node voltages at a supemode is arbitrary but affects the
mesh-current vector. This matrix solution has a form similar to form of the equations. This choice may depend on output
Manuscript received December 14, 1992; revised June 23, 1993. considerations. To facilitate the inspection method, mark the
The author was with the Department of Electrical Engineering, Ohio State nodes with solution-set node voltages or voltage sources.
University, Columbus, OH 43210 USA. He is now retired in Sunapee, NH Now, write the general nodal analysis KCL matrix equation
03782 USA.
IEEE Log Number 9413586. Bnnvn f And% = &Xs (2)
0018-9359/95$04.00 0 1995 IEEE

Authorized licensed use limited to: INACAP. Downloaded on June 16,2020 at 18:08:06 UTC from IEEE Xplore. Restrictions apply.
GOTFLING: NODE AND MESH ANALYSIS BY INSPECTION 313

where V , is the node voltage solution vector, X d is the vector


of dependent sources, and X . is the vector of independent
sources. To have conductance matrix Gnn show the usual
symmetry, write the KCL node equations in the same order as
that of the node voltage components in the solution vector and
add currents having direction away from each node. In some
cases, these equations may be supernode equations. Matrix En,
accounts for current terms in the KCL node equations due to
circuit conductances. Matrix A n d accounts for contributions to
the KCL equations due to dependent sources, and matrix A,, -
I
inserts current components due to the source vector Xs.
Fig. 1. Example of general nodal analysis ( i s = 2.5 A, vs = 150 V,
Assuming a linear dependence of the vector of dependent R, = 2 Q. R~ = 5 G , R, = 4 Q, f = 0.5 MA, h = 8 VIA),
sources X d on the vector of controlling variables X , gives

Xd = d d c X c . (3) 111. NODEANALYSISEXAMPLE


Usually the controlled-source matrix Ad, is both square and To see how to write (2), (3), and (4) by inspection, consider
diagonal, but neither condition is necessary. A dependent the circuit in Fig. 1, which shows a circuit with two dependent
source can depend on two or more controlling variables or sources. For this circuit (1) gives
two or more dependent sources can have the same controlling
variable. ( n - 1 ) - n,, = (4- 1 ) - 2 = 1 (9)
Finally, the controlling-variable vector X, depends linearly
on the dependent-source vector, the node-voltage vector, and SO the solution vector VTIis a 1 X 1 matrix (a scalar) having the
the independent-source vector, so that component U N . For this example (2) is KCL at the U N node

+ +AcsXs.
Xc = &dXd
The individual equations in (4) are KVL or KCL equations
(4)
-+-
[ i b ic] [ V N ] + [ - ~ 1/&] 'Dl
[WDl]
that identify the controlling variables in terms of the various
node voltages and dependent or independent sources.
=[o ~ + ~ ] [ ~ ] . (10)
Substitution of (4) into (3) and solving for X d gives
The dependent source relationship (3) is
Xd = ( I d - &cdc&l&c(dcnvm +AcsXs) (5)
where I d is an identity matrix with order equal to the number
of dependent sources in X d . Alternately, substitution of (3)
[Ui0g1l ] = 0[' h01 [i~
iD]
(11)

into(4)7 for X C , and substitution back into (3) gives and the controlling variables depend on the dependent sources,
Xd = ddc(Ic - + &X,)
dcdddc)-l(d,nV, (6) node voltage, and independent sources according to
where I, is an identity matrix with order equal to the number
of controlling variables in X,. Equations (6) and (5) are [: I =
1
[o
l/Ra
1/&] [:I [1/Rb]['"j

[:;,I
+

equivalent, since
( I d - .Adc.Acd)-lAdc = &(I, - A c d A d c ) - ' . (7) + ['0 -1VR.I
-I/& (12)

Finally, substitution of (5) into (2) and collecting coefficients which is (4).
gives the general node voltage equations In (10) the -1 entry in A n d accounts for the current in
{Gnn +And(Id - AdcAcd)-lAdcAcn)Vn the KCL equation at the U N node due to dependent source
Z D ~ alone. The 1/Rb entry accounts for the current at the U N
= { d n s - .And(ld - .qdc.Acd)-lAdcAcs}Xs- (8)
node due to dependent voltage source U D l alone. In (12) the
If the circuit contains only one dependent source then the equation for controlling variable io is KCL for the ground
matrix factor I d - AdcAcdbecomes a scalar and in feedback node, while Ohm's law and the node voltage difference across
theory is the return difference. Therefore, we call this quantity resistance R b gives i ~ Each
. matrix entry in (12) is the ratio
the return difference matrix. The return difference matrix of io or i~ to a dependent source, the node voltage U N ,
plays a less significant role here than in feedback theory, or one of the independent sources, with all other terms set
because d c d is null whenever the controlling variable is to zero. Use of the inspection method with nodal analysis
not directly dependent on any of the dependent sources. requires thinking about current components due to each cause
Node voltage solution variables often intervene between the separately. Another point to remember is that controlling (4)
dependent sources and their controlling variables. If a circuit usually is not unique. For example, in (12) current ig equals
has one or more dependent sources, then the inverse of the the current to the left through resistance Rb, but ZB also is the
return difference matrix has to exist for the circuit to have a sum of i ~ and1 the current to the left through resistance R,.
solution. This alternate formulation of i~ changes the components in

Authorized licensed use limited to: INACAP. Downloaded on June 16,2020 at 18:08:06 UTC from IEEE Xplore. Restrictions apply.
3 14 IEEE TRANSACTIONS ON EDUCATION, VOL. 38, NO. 4, NOVEMBER 1995

is=[l 0 2.51; the solution set. Also, any internal current source establishes
VS=[O 1 1501; a constraint between neighboring mesh currents and defines
xs=[isys];
ra=2;
a supermesh. These constraints reduce the number of mesh
rb=5; currents in the solution vector. The choice of the mesh current
r-4; to retain as the supermesh current from among the set of
L0.5; mesh currents constituting a supermesh is arbitrary but affects
h=8;
gnn=[l/rb+l/rc] the form of the equations. The choice may depend on output
and=[-1 llrb] considerations. Mark your mesh current choices on the circuit
ans=[O l/rb+l/rc] diagram and show how mesh currents not in the solution set
adc=[f 0; 0 h]
acd=[1 1/ra; 0 1/rb] depend on solution-set mesh currents and current sources.
acn=[O; l/rb] Next, write the KVL mesh analysis equations
a-[ 1 - 1ha; 0 -1/rb]
b=and’( (eye(2)-adc*acd)Wc)
vn=(gnn+b’acn)\(ans-b’acs)’xs
Fig. 2. MATLAB M-File list to solve circuit example using node analysis. where I, is the mesh current solution vector, Xd is the vector
of dependent sources, and Xs is the vector of independent
sources. To have resistance matrix R, show the usual
the second row of each matrix in (12), but the node-voltage
symmetry, write the KVL mesh equations in the same order as
vector has the same solution.
the order of the mesh current components in the solution vector
Fig. 2 shows a MATLAB M-file that gives the solution for
and add voltage drops in the path direction that corresponds
matrix equations (10) to (12) when the source vector is
to the mesh current direction. In some cases these KVL
1 0 2.5 equations may be supermesh equations. Matrix R, accounts
xs = [0 1 ,501 for voltage terms in the KVL mesh equations due to circuit
resistances. The d m d matrix gives the voltage terms due to
with the parameter values shown in Fig. 1. The MATLAB
any dependent sources, and the A,, matrix accounts for terms
solution is
due to independent sources. However, the controlled sources
[WN]= [0.8 0.6 921 V. (14) depend on the controlling variables

The first two components of the solution are the values of the
transfer functions giving node voltage U N in terms of is and
us. The last solution value is the node voltage when is is and the controlling variables depend on the mesh-current vec-
2.5 A and vs is 150 V. Using superposition and the first two tor, dependent-source vector, and independent-source vector
solution values, this last value is
Xc = AcdXd + AcmIm + AcsXs. (19)
U N = 0.8 x 2.5 + 0.6 x 150 = 92 V. (15)
As for nodal analysis, the general mesh current equations are
The left-division backslash symbol \ in the last two lines of
Fig. 2 gives the matrix product of the inverse of the matrix on
the left and the matrix on the right, without actual evaluation
of the inverse matrix. Matrix eye(2) is an identity matrix of
order 2. The solution of the node-voltage equations in the last V. MESHANALYSIS
EXAMPLE
two lines of Fig. 2 can be written as a MATLAB function,
using the “size” function to set the dimension of the identity To illustrate the inspection method using mesh analysis
matrix. consider Fig. 3 , which shows the same circuit as in Fig. 1
but with mesh currents defined for analysis. For this circuit
(16) gives
IV. MESHANALYSIS
As for nodal analysis, identify the number of independent b - (n - 1) -nis = 7 - ( 4 - 1) - 2 1 2 . (21)
KVL equations using
The mesh solution vector I, is a 2 x 1 column matrix having
No. of independent KVL equations = b - (n - 1) - nis. (16) components i ~ and1 i ~ 2 .Equations (17) to (19) for this
circuit are
Here, b is the number of branches in the circuit and ais is
the number of independent and dependent current sources.
For convenience, define all mesh currents using a clockwise
direction of rotation. Identify the solution vector of mesh
currents I,. This vector contains as many components as the
number of independent mesh currents given by (16). These
= [~ ~ l ] [:]
components may be in any appropriate order. A mesh current
passing through a current source on the perimeter of the
circuit equals the current in the source, so is not a member of

Authorized licensed use limited to: INACAP. Downloaded on June 16,2020 at 18:08:06 UTC from IEEE Xplore. Restrictions apply.
GO'ITLING NODE AND MESH ANALYSIS BY INSPECTION 315

vDl=hig is=[l 0 2.51;


vs=[O 1 1501;
xs=[is;vs);
-2;
rb-5;
r-4;
f=0.5;
h=8;
r"=[ra+rb+rc -rtjrc; -rb-rc rb+rc]
amd=[n: 0; -rc -11
ams=[ra -1; 0 01
a h [ f 0; 0 h]
acd=[l 0; 0 01
I acm=[l 0; -1 11
- aCs=[O 0; 0 01
b=amd*((eye(2)-adc'acd)\adc)
Fig. 3. Example of general mesh analysis (is = 2.5 A, os = 150 V, im=(r"+b'acm)\(ams-b*acs)*xs
R, = 2 R,R b = 5 R,R , = 4 R,f = 0.5 M A , h 8 VIA).
Fig. 4. MATLAB M-File list to solve circuit example using mesh analysis.

and
VII. SINGLE-MATRIX
SOLUTION
The node voltage (8), mesh current (20), and general solu-
(24) tions (28) have a single-matrix expression. For example, write
(2, 3, 4), and (27) as
In (22), the first equation is a supermesh KVL equation.
From Fig. 3, dependent source 201 circulates from left to right
through resistance R,, producing a voltage drop R , i ~ lin the
Onnvn + OX, 4-OXO = d,,Xs
dndXd (29)
supermesh equation and an equal voltage rise in the second OVn + I X , - ddcXc + OX, = 0 (30)
mesh equation. Dependent source V D 1 causes a voltage rise in -dcnVn - &dXd + I X c + 0x0 = AcSXs (31)
the second mesh equation. These observations account for the -&nVn - dodXd + OX, 1x0 = AoSXs. (32)
entries in the d m d matrix of (22). In (24) the equations for
and i~ are the defining equations for these branch currents in These have the single matrix equation
terms of mesh currents i ~ 1 , i M 2 and
, dependent source i ~ l .
To facilitate identification of components, it is useful to think
of mesh current 2 ~ as 1 circulating on the entire supermesh
while control source io1 circulates through i ~ l R,,, and WS.
The MATLAB M-file shown in Fig. 4 gives a solution of
the mesh (22) to (24), with the same source matrix as in the This solution displays the circuit parameters in simple form,
example above. In this case the mesh current solution vector is avoids the complexity of the solution (28), and allows use of

]:f[ [
-0.0667
= -0.3333
0.0333 4.8333 A .
0.1667 24.1667 ] (25)
the adjoint system method [9].

Calculation of node voltage UN when is equals 2.5 A and VS VIII. CONCLUSION


equals 150 V gives
Node or mesh analysis matrix equations for a circuit are
VN +
= V S - h(iM2 - iM1) R b ( i ~ 2- i M 1 ) written directly by inspection of the circuit. Conductance or
= 150 - (8 - 5)(24.1667 - 4.8333) = 92.0 V. (26) resistance component matrices show the usual self and mutual
terms and exhibit diagonal symmetry. The effects of dependent
or independent sources in the circuit enter by inspection
VI. OUTPUTVECTOR of the circuit as separate terms in the matrix formulation.
Node voltages or mesh currents may not be the solution Matrix solutions of these general formulations place in evi-
variables of interest. Output variables as a group constitute an dence the existence of a return difference matrix. Evaluation
output vector X,. For the nodal analysis method of an arbitrary solution vector using matrix methods with
matrix computer calculation programs is easily done. The
+
Xo = AiodXd S d n v n AosXs. + (27) output matrix method is convenient for evaluation of two-port
Substitution of (5) into (27) gives the output vector parameters, ThCvenin or Norton equivalent circuit parame-
ters, or for determination of state-variable circuit parameters.
+
Xo = [ d o n Aiod(1- Adcdcd)-'Adcdcn]Vn With personal computers and matrix analysis programs now
+
[dos +
& d ( I - .Adcdcd)-'.Adc&]& (28) economically reasonable for students, greater emphasis on
matrix analysis methods in the circuit analysis cumculum is
in terms of the node-voltage vector and the independent-source appropriate. Matrix computer circuit analysis, computer circuit
vector. A similar result applies for the mesh analysis method. simulation, and normal circuit analysis methods work well

Authorized licensed use limited to: INACAP. Downloaded on June 16,2020 at 18:08:06 UTC from IEEE Xplore. Restrictions apply.
316 IEEE TRANSACTIONS ON EDUCATION, VOL. 38, NO. 4, NOVEMBER 1995

together to enhance student’s perception of circuit behavior. [8] The Srudent Edition ofMATLAB. Englewood Cliffs, NJ: Prentice-Hall,
1992.
‘se Of approaches to circuit theory [9] J. Vlach and K. Singhal, Computer Methods for Circuit Analysis and
helps prepare students for their further studies and professional Design. New York: Van Nostrand Reinhold, 1983, pp. 171-261.
careers.

REFERENCES

E. A. Guillemin, Introductory Circuit Theory. New York: Wiley, 1953,


pp. 71-86. James G. Gottling (M61) was bom in Baltimore, MD, on December 11,
P. R. Belanger, E. L. Adler, and N.C. Rumin, Infroduction to Circuits 1932. He received the B.Sc. degree in mechanical engineering in 1954
wirh Electronics. New York: Holt, Rinehart and Winston, 1985, pp, from Lehigh University, Bethlehem, PA, and the S.M. and Sc.D. degrees
48-62. in electrical engineering from the Massachusetts Institute of Technology,
L. 0. Chua, C. A. Desoer, and E. S. Kuh, Linear and Nonlinear Circuits. Cambridge, MA.
New York McGraw-Hill, 1987, pp. 213-220. He is an Emeritus Professor of Electrical Engineering at The Ohio State
C. R. Paul, Analysis offinear Circuits. New York: McGraw-Hill, 1989, University, Columbus, OH, and is Director of the Electronics Materials and
pp. 165-183. Devices Laboratory in the Department of Electrical Engineering. He received
D. R. Cunningham and J. A. Stuller, Basic Circuif Analysis. Boston, the Department of Electrical Engineering Distinguished Teaching Award in
M A Houghton-Mifflin, 1991, pp. 139-141, 159-160. 1966 and 1977, the College of Engineering MacQuigg Award in 1994, and
D. E. Johnson, J. R. Johnson, and J. L. Hilbum, Electric Circuif Analysis. The Ohio State University Alumni Award for Distinguished Teaching in 1967.
Englewood Cliffs, NJ: Prentice-Hall, 1992, pp. 78-101. His research interests include computer simulation of electronic circuits and
G. Wilson, “A systematic procedure for the analysis of circuits contain- analysis methods for electronic circuits. He is the author of Electronics:
ing operational amplifiers,” IEEE Trans. Educ., vol. E-26, pp. 99-103, Models, Analysis, and Systems, Marcel Dekker, 1982.
Aug. 1983. Mr. Gottling is a member of the Ohio State University Teaching Academy.

Authorized licensed use limited to: INACAP. Downloaded on June 16,2020 at 18:08:06 UTC from IEEE Xplore. Restrictions apply.

You might also like