You are on page 1of 12

Section 4.

9 Circuit Analysis Using MATLAB

P4.9-1

Solution: First, express the resistor currents in terms of the node voltages:

v1  v 2 v1  v 3
Apply KCL at node 1 to get 5    0.7 v1  0.2 v 2  0.5 v 3  5
5 2
v1  v 2 v2 v2  v3
Apply KCL at node 2 to get     0.2 v1  0.55 v 2  0.25 v 3  0
5 10 4
v2  v3 v1  v 3
Apply KCL at node 3 to get   3   0.5 v1  0.25 v 2  0.75 v 3  3
4 2
 0.7 0.2 0.5   v1   5 
In matrix form:  0.2 0.55 0.25 v    0 
   2  
 0.5 0.25 0.75   v 3   3

Solving using MATLAB: v1  28.1818 V, v 2  20 V and v 3  21.4545


P4.9-2

Solution:
The figure below shows the assumed direction of current entering or leaving nodes 1, 2 and 3
respectively.

KCL at node 1 gives:

v1  25 V v1  v3 v1  v2
  0
35  60  30 
1  v1  25 V v1  v3 v1  v2 
   0
5 7  12  6 
v1  25 V v1  v2 v1  v3
  0
7 6 12 
72v1  1800 V  84v1  84v2  42v1  42v3  0

198v1  84v2  42v3  1800  0


99v1  42v2  21v3  900  0 …… (1)

KCL at node 2 gives:

v1  v2 v v v
 2  2 3
30  35  50 
1  v2 v2  v3  v1  v2  
     0
5  7  10   6   
v2 v2  v3  v1  v2 
  0
7  10   6  
60v2  42v2  42v3  70v1  70v2  0

172v2  42v3  70v1  0


86v2  21v3  35v1  0 …… (2)
KCL at node 3 gives:

v1  v3 v2  v3 v3  20 V
 
60  50  20 
1  v1  v3 v2  v3  v3  20 V  
     0
5  12  10   4   
v1  v3 v2  v3  v3  20 V 
  0
12  10   4  
40v1  40v3  48v2  48v3  120v3  2400  0

40v1  208v3  48v2  2400  0


20v1  104v3  24v2  1200  0 …… (3)

Equations (1), (2), (3) for a system of linear equations, and can be solved to obtain the solution for v1 ,
v2 , and v3 as:

6070
v1   V
849
 7.14 V
385
v2   V
849
 0.45 V
8540
v3  V
849
 10.0 V

The negative sign highlights the fact that the direction of the associated current is to be reversed.
Therefore, the voltages at node 1, node 2 and node 3, with the assumed directions is, 7.14 V , 0.45 V
, and 10.0 V respectively.
P4.9-3

Solution: Label the label the mesh currents. Then, label the element currents in terms of the mesh
currents:

Notice that the 2 A source on the outside of the circuit is in mesh 3 and that the currents 2 A and i 3 have
the same direction. Consequently
i3  2 A
Apply KVL to mesh 1 to get
25  i1  i 3   9  i1  i 2   8 i1  0

In this equation 25  i1  i 3  is the voltage across the 25  resistor (+ on the left), 9  i1  i 2  is the
voltage across the 9  resistor (+ on top) and 8i1 is the voltage across the 8  resistor (+ on bottom).
Substituting i 3  2 A and doing a little algebra gives

42 i1  9 i 2  50
Next, apply KVL to mesh 2 to get
14  i 2  i 3   24  9  i1  i 2   0

In this equation 14  i 2  i 3  is the voltage across the 14  resistor (+ on the left), 24 is the voltage source
voltage and 9  i1  i 2  is the voltage across the 9  resistor (+ on top). Substituting i 3  2 A and doing
a little algebra gives
9 i1  23 i 2  24  14  2   4
The simultaneous equations can be written in matrix form

42 i1  9 i 2  50  42 9  i1  50
      
9 i1  23 i 2  4  9 23  i 2   4 
We can use MATLAB to solve the matrix equation:

 i1  1.3401
Then i    
 2  0.6983
That is, the mesh currents are i1  1.3401 A and i 2  0.6983 A .

P4.9-4

Solution: Label the label the mesh currents. Then, label the element currents in terms of the mesh
currents:
Notice that the 0.4 A source on the inside of the circuit is in both mesh 1 and mesh 3. Mesh current i1 is
directed in the same way as current source current but the mesh current i 3 is directed opposite to the
current source current. Consequently
i1  i 3  0.4 A
The current source is in both mesh 1 and mesh 3 so we apply KVL to the supermesh corresponding to
the current source (i.e. the perimeter of meshes 1 and 3). The result is

10 i 3  19  i1  i 2   10 i1  0

In this equation 10i 3 is the voltage across the horizontal 10  resistor (+ on the left), 19  i1  i 2  is the
voltage across the 19  resistor (+ on top) and 10i1 is the voltage across the vertical 10  resistor (+ on
bottom). Substituting i 3  i1  0.4 and doing a little algebra gives

39 i1  19 i 2  4

Next, apply KVL to mesh 2 to get


22 i 2  10  19  i1  i 2   0

In this equation 22i 2 is the voltage across the 22  resistor (+ on the left), 10 is the voltage source
voltage and 19  i1  i 2  is the voltage across the 19  resistor (+ on top). Doing a little algebra gives
19 i1  41i 2  10

To summarize, the circuit is represented by the simultaneous equations:


39 i1  19 i 2  4  39 19  i1   4 
      
19 i1  41i 2  10  19 41  i 2  10
Comparing these equations to the given equations shows
a11  39 , a12  19 , a 21  19 and a 22  41 .
P4.9-5

Solution: First, label the mesh currents and then label the element currents:

Notice the 2.4 A source in both mesh 2 and mesh 3. We have


i 3  i 2  2.4 A
Apply KVL to mesh 1 to get
40 i1  5  i 3  i1   5  i 2  i1   0  50 i1  5 i 2  5 i 3  0

Identify the supermesh corresponding to the 2.4 A current source:

Apply KVL to the supermesh to get


5  i 2  i1   5  i 3  i1   24  40 i 2  0   10 i1  45 i 2  5 i 3  24

Writing the mesh equations in matrix form gives


 0 1 1   i1   2.4 
 50 5 5 i    0 
  2  
 10 45 5  i 3   24
Solving using MATLAB:

That is, the mesh currents are i1  0.1 A, i 2  0.7 A and i 3  1.7 A.
The 24 V source supplies 24 i 3   241.7   40.8 W
The power supplied by the current source depends on vs, the voltage across the current source. Apply
KVL to mesh 3 to get
5  i 3  i1   24  v s  0  v s  5 1.7  0.1  24  32 V

The current source supplies 2.4 vs  2.4  32   76.8 W


P4.9-6

Solution: Determine the value of the mesh currents i1 and i 2 .

Replace series resistors with an equivalent resistor and series voltage sources with and equivalent
voltage source to get

Apply KVL to mesh 1 16 i1  8  i1  i 2   9  0  24 i1  8 i 2  9

Apply KVL to mesh 2 4 i 2  5 i1  8  i1  i 2   0   3 i1  12 i 2  0

 24 8  i1  9 
In matrix form  3 12  i   0
  2  
Solving using MATLAB

So the mesh currents are i1  0.4091 A and i 2  0.1023 A


P4.9-7

Solution: Determine the value of the node voltages, v1 and v2.

Replace parallel resistors with an equivalent resistor and parallel sources with and equivalent current
source to get

v1 v1  v 2
Apply KCL at node 1 2.5   0
4.44 2
v1  v 2 v2
Apply KCL at node 2  1.5 v1 
2 4
 1 1 1 
 4.44  2 
2   v1   2.5
   
1 1  v 2   0 
In matrix form
 1  1.5  
 2 2 4 
Solving using MATLAB

So the node voltages are v1  4.1111 V and v 2  10.9630 V

You might also like