ENEE 204
Sections 0201 –0205
Lecture #5 September 11, 2000
Syllabus, home work, etc..
[Link]/
or [Link]/courses/
HW#2 is Due: Friday, September 15th, 2000
UMCP ENEE 204 Fall 00, Lecture 4 1
Physical laws of nature are essential for circuit analysis
• Continuity of Current -> KCL
• Conservation of Energy -> KVL
UMCP ENEE 204 Fall 00, Lecture 4 2
Total current through a closed surface is zero.
Continuity of current
UMCP ENEE 204 Fall 00, Lecture 4 3
The algebraic sum of electric currents at any node
is equal to zero at every instant of time.
Kirchhoff’s Current Law ( KCL )
is due to continuity of current
i2(t)
∑ ik(t) = 0
i4(t)
i6(t) i5(t)
k
i7(t)
UMCP ENEE 204 Fall 00, Lecture 4 4
Reference directions are critical in Kirchhoff’s Current Law
i (t) - i (t) + i (t) - i (t) - i (t) = 0
2 4 5 6 7
Currents directed into the
node are taken with a
i2(t)
positive sign (+) i4(t)
i6(t) i5(t)
i7(t)
Currents directed out of the
node are taken with a
negative sign (-)
UMCP ENEE 204 Fall 00, Lecture 4 5
Conservation of Energy
Potential difference between two points is
independent of the path*.
→
V1 V2 ∫ E dl = 0
* For static potentials
UMCP ENEE 204 Fall 00, Lecture 4 6
The algebraic sum of branch voltages around any loop is
equal to zero at every instant of time.
Kirchhoff’s Voltage Law (KVL)
is due to conservation of energy
v1(t) v3(t)
∑ vk(t) = 0 vs(t)
II
v2(t) v4(t)
k I
III
v6(t) vr5(t)
→ → vl5 (t)
∫ E dl = 0 IV
v7(t)
UMCP ENEE 204 Fall 00, Lecture 4 7
KVL sign convention
Going around the loop in the clockwise direction
v1(t)
i1(t)
+ v1(t) (positive)
tracing direction
v6(t)
i6(t)
- v6(t) (negative)
tracing direction
UMCP ENEE 204 Fall 00, Lecture 4 8
You can practice writing down the circuit
equations by playing a game!
Step 1 Set reference directions
Step 2 Write down KCLs
Step 3 Write down KVLs
Click on a component to set or change voltage reference direction
Click on a wire to set or change current reference direction
Use passive element convention for all branches
UMCP ENEE 204 Fall 00, Lecture 4 9
How many equations do we need?
In order to find the unique solution to the problem
the number of linearly independent equations
has to be equal to the number of unknowns
UMCP ENEE 204 Fall 00, Lecture 4 10
How can we find a set of linearly independent equations?
If one equation can be derived from
some other equations in the set, the
equations are not linearly independent
If each equation in the set contains a variable
which is not used in other equations,
the equations are linearly independent.
UMCP ENEE 204 Fall 00, Lecture 4 11
n-1 linearly independent equations
from n nodes
KCL
A circuit with n nodes gives us n-1
linearly independent equations
UMCP ENEE 204 Fall 00, Lecture 4 12
All KVL equations for meshes are linearly independent
v1 + v s + v 5 - v6 = 0 v2 + v 3 + v 4 - vs = 0
v1(t) v2(t)
v6(t) vs is(t) v3(t)
v5(t) v4(t)
UMCP ENEE 204 Fall 00, Lecture 4 13
KVL gives us b - (n - 1)
linearly independent equations
A planar circuit with b branches and n nodes
has b - (n - 1) meshes - proof in the text
b=7
n=6
2 meshes
UMCP ENEE 204 Fall 00, Lecture 4 14
Terminal relations provide us with the rest of
the equations
b = # of branches
s = # of sources
b - s = # of passive elements
= # of terminal relations
We have an equation relating voltage and current
for every passive circuit element
R's give us algebraic equations
L's and C's give differential equations
UMCP ENEE 204 Fall 00, Lecture 4 15
There are two unknowns for every passive
element, and one unknown for a source
b = # of branches
b - s = # of passive elements
s = # of sources
For each passive element there is voltage and current
For each source there is only one unknown
Total number of unknowns is 2 (b - s) + s = 2b - s
UMCP ENEE 204 Fall 00, Lecture 4 16
KVL, KCL, and terminal relations provide the exact
number of linearly independent equations
n nodes
b branches, 2b - s unknowns,
s sources
# of equations = [n-1] + [b-(n-1)] + [b - s] = 2b - s
KCL KVL Terminal relations
UMCP ENEE 204 Fall 00, Lecture 4 17
The simplest way to get proper number of
linearly independent equations for a circuit:
KCL equations for n − 1 nodes
KVL equations for all meshes
Terminal relations for all passive elements
UMCP ENEE 204 Fall 00, Lecture 4 18
We will now analyze a simple circuit
R1
vs(t) C R2
UMCP ENEE 204 Fall 00, Lecture 4 19
First, we define the reference directions for
voltage and current
R1
i1
is
v1 i3
vs(t) C v3 v2 R2
i2
vs(t) is known and all the other voltages
and currents are unknown
UMCP ENEE 204 Fall 00, Lecture 4 20
There are three nodes in this circuit
R1
vs(t) C R2
UMCP ENEE 204 Fall 00, Lecture 4 21
We will get two linearly independent
equations from KCL
1. is - i1 = 0 2. i1 - i3 - i2 = 0
R1
i1
is
i3
vs(t) C R2
i2
UMCP ENEE 204 Fall 00, Lecture 4 22
Note: the third equation from KCL is not
linearly independent
1. is - i1 = 0 2. i1 - i3 - i2 = 0
R1
i1
is
i3
vs(t) C R2
i2
i2 + i3 - is = 0
UMCP ENEE 204 Fall 00, Lecture 4 23
The third equation contains no new
information about the circuit variables
1. i4 - i1 = 0
2. i1 - i3 - i2 = 0
- i2 - i3 + is = 0 i2 + i3 - is = 0
UMCP ENEE 204 Fall 00, Lecture 4 24
KVL gives us two equations
R1
v1
R2
vs(t) 3
C v3
4 v2
3. v1 + v3 - vs=0 4. - v3 + v2 = 0
UMCP ENEE 204 Fall 00, Lecture 4 25
We have three terminal relations
R1
i1
v1 i3
vs(t) C v3 v2 R2
i2
5. v1 = R1 i1 6. v2 = R2 i2 7. i3 = C dv3/dt
UMCP ENEE 204 Fall 00, Lecture 4 26
The number of linearly independent equations
is equal to the number of unknowns
1. is - i1 = 0 is
2. i1 - i3 - i2 = 0 i1
3. v1 + v3 - vs=0
i2
4. - v3 + v2 = 0
i3
5. v1 = R1 i1
v1
6. v2 = R2 i2
v2
7. i3 = C d v3/dt
v3
UMCP ENEE 204 Fall 00, Lecture 4 27
Now we have to solve the equations
We can eliminate all the currents from our equations
i1 - i3 - i2 = 0 v1 = R1 i1 v2 = R2 i2 i3 = C d v3/dt
i1= v1/ R1 i2= v2/ R2
v1/R1 - C d v3/dt - v2/R2 = 0
UMCP ENEE 204 Fall 00, Lecture 4 28
We now have three equations and three
unknowns
v1/R1 - C d v3/dt - v2/R2 = 0
v1 + v3 - vs=0
From KVL
- v3 + v2 = 0
UMCP ENEE 204 Fall 00, Lecture 4 29
We eliminating all the variables except for v3
v1/R1 - C d v3/dt - v2/R2 = 0
v1 + v3 - vs=0 v1 = vs - v3
- v3 + v2 = 0 v2 = v3
(vs - v3) /R1 - C dv3/dt - v3/R2 = 0
v3 (1/R1 +1/ R2)+ C dv3/dt = vs /R1
d v3/dt + v3 (1/ R1C +1/ R2C) = vs / R1C
UMCP ENEE 204 Fall 00, Lecture 4 30
Now we have one differential equation
with one unknown
d v3 1 1 1
+ v3 ( + )= v s (t )
dt R1C R2C R1C
This equation can be solved by
standard techniques which we will
be using routinely later in the semester.
UMCP ENEE 204 Fall 00, Lecture 4 31
One special case which is easy to solve
Consider vs = V0 e t/τ
Try a solution of the form v3 = A e t/τ
d v3 1 1 1
+ v3 ( + ) = v s (t )
dt R1C R2C R1C
1 1 1
Ae t/τ +
A e t/τ ( + )= V0 e t/τ
τ R1C R2C R1C
UMCP ENEE 204 Fall 00, Lecture 4 32
Use simple algebra
A e t/τ + A e t/τ ( 1 + 1 ) = 1 V0 e t/τ
τ R1C R2C R1C
A + A ( 1 + 1 ) = 1 V0
τ R1C R2C R1C
1 1 1 V0
A ( + ( + )) =
τ R1C R2C R1C
UMCP ENEE 204 Fall 00, Lecture 4 33
Solving for A
11 1 V0
A ( + ( + )) =
τ R1C R2C R1C
V0
R1C
A =
1 1 1
+ ( + )
τ R1C R2C
UMCP ENEE 204 Fall 00, Lecture 4 34
We now have v3
v3 = A e t/τ
V0 t/τ
e
R1C
v3 =
1 1 1
+ ( + )
τ R1C R2C
UMCP ENEE 204 Fall 00, Lecture 4 35
From v3 we can calculate all
the other variables
1. is - i1 = 0 is
2. i1 - i3 - i2 = 0
3. v1 + v3 - vs= 0 v1
4. - v3 + v2 = 0 v2
5. v1 = R1 i1 i1
6. v2 = R2 i2 i2
7. i3 = C d v3/dt i3
UMCP ENEE 204 Fall 00, Lecture 4 36
Another example; a resistive circuit
R5
R1 R2
R4 is(t) R3
UMCP ENEE 204 Fall 00, Lecture 4 37
Define the reference directions for voltage
and current
R5 i
5
v5
v 1 i1 v2 i2
R1 R2
R4 v4 vs is(t) R3 v 3
i4 i3
UMCP ENEE 204 Fall 00, Lecture 4 38
R5 i
KCL 5
v5
- i1 - i4 - i5 = 0
v 1 i1 v2 i2
i1 + is - i2 = 0
R1 R2
i5 + i2 - i3 = 0 R4 v4 vs is(t) R3 v 3
i4 i3
UMCP ENEE 204 Fall 00, Lecture 4 39
KVL i5
v5
v1 + vs - v4 = 0
v1 i v2 i2
v2 + v3 - vs = 0 1
R1 R2
v5 - v2 - v1=0
R4 v4 vs R3 v 3
is(t)
i4 i3
UMCP ENEE 204 Fall 00, Lecture 4 40
Terminal relations i5
v5
v1 i v2 i2
1
vk = Rk ik R1 R2
k = 1,2,3,4,5 R4 v4 vs R3 v 3
is(t)
i4 i3
UMCP ENEE 204 Fall 00, Lecture 4 41
Do we have the right number of equations?
- i1 - i4 - i5 = 0
v1 + vs - v4 = 0
vk = Rk ik
i1 + is - i2 = 0 v2 + v3 - vs = 0
k = 1,2,3,4,5
v5 - v2 - v1=0
i5 + i2 - i3 = 0
Unknowns: vk, ik, vs k = 1,2,3,4,5 Yes !
UMCP ENEE 204 Fall 00, Lecture 4 42
We can eliminate all the currents
- i1 - i4 - i5 = 0 - v 1 / R1 - v 4 / R4 - v 5 / R5 = 0
i1 + is - i2 = 0 v1/ R1 - v2 / R2 = - is
v 5 / R5 + v 2 / R2 - v 3 / R3 = 0
i5 + i2 - i3 = 0
vk = Rk ik
k = 1,2,3,4,5
UMCP ENEE 204 Fall 00, Lecture 4 43
Now we have a set of 6 equations and 6 unknowns
- v 1 / R1 - v 4 / R4 - v 5 / R5 = 0
v1/ R1 - v2 / R2 = - is
v 5 / R5 + v 2 / R2 - v 3 / R3 = 0
v1 + vs - v4 = 0
v2 + v3 - vs = 0
v5 - v2 - v1=0
UMCP ENEE 204 Fall 00, Lecture 4 44
These equations can be written down in a
more elegant form
−1 −1 −1
0 0 0
R1 R4 R5 v 0
1
1 −1 v
R 0 0 0 0 -i
R2 2 0
s
1
1 −1 1 3 =
v
0 0 0 v
0
R2 R3 R5 4
1 0 0 −1 0 1 v5 0
− 1 v 0
0 1 1 0 0
− −1 s
1 0 0 1 0
Solve the this matrixUMCP
equation with conventional
ENEE 204 Fall 00, Lecture 4
methods:
45
Gaussian elimination, Kramer’s method etc.
Numerical example
R5= 100Ω
R1 = 10Ω R2 = 20Ω
R4 = 10Ω R3 = 10Ω
is(t)= 5A
UMCP ENEE 204 Fall 00, Lecture 4 46
The equation for the voltages is:
-.1
0 0 -.1 -.01 0
v 0
v1
.1 -.05 0 0 0 0 2 -5
v 0
0 .05 -.1 0 .01 0 3 =
v4 0
1 −
0 0 1 0 1 v 0
5
0 1 1 0 0 − 1 v 0
− s
1 −1 0 0 1 0
UMCP ENEE 204 Fall 00, Lecture 4 47
Solving a set of simultaneous linear algebraic
equations is easy
Solve the this matrix equation with conventional methods:
Gaussian elimination, Kramer’s method etc...
My favorite way is using MATLAB.
The problem can be written as
r r
MV = K
r r
Where M is a matrix and V, K are vectors.
r r
The solution is: V = M\ K
UMCP ENEE 204 Fall 00, Lecture 4 48
In our case:
-.1
0 0 -.1 -.01 0
0
.1 -.05 0 0 0 0 -5
r 0
M= K =
0 .05 -.1 0 .01 0
0
1 0 0 −1 0 1 0
0 1 1 0 0 − 1 0
− −
1 1 0 0 1 0
UMCP ENEE 204 Fall 00, Lecture 4 49
And the answer is:
r r
V = M\ K
v 0.3571
1
v 39.2857
2
v3 = 20.5357
v
4 29.4643
v5 8.9286
v
s 59.8214
UMCP ENEE 204 Fall 00, Lecture 4 50
Testing the solution method; a simpler case
R5= 100Ω
R1 = 10Ω R2 = 10Ω
R4 = 10Ω R3 = 10Ω
is(t)= 5A
UMCP ENEE 204 Fall 00, Lecture 4 51
The answer is:
r r
V = M\ K
v -25V
1
v 25V
2
v3 = 25V
v
4 25V
v5 0V
v
s 50V
UMCP ENEE 204 Fall 00, Lecture 4 52