Download presentation

Presentation is loading. Please wait.

1
**Discussion D2.4a September 2006 Chapter 2 Section 2-8**

Mesh Analysis Discussion D2.4a September 2006 Chapter 2 Section 2-8

2
**Mesh Analysis Mesh analysis applies KVL to find unknown currents.**

It is only applicable to planar circuits (a circuit that can be drawn on a plane with no branches crossing each other). A mesh is a loop that does not contain any other loops. The current through a mesh is known as the mesh current. Assume for simplicity that the circuit contains only voltage sources.

3
Mesh Analysis Steps Assign mesh currents i1, i2, i3, … il, to the l meshes, Apply KVL to each of the l meshes and use Ohm’s law to express the voltages in terms of the mesh currents, Solve the l resulting simultaneous equations to find the mesh currents.

4
**Example 7 4 10 Number of nodes, n = Number of loops, l =**

Number of branches, b = 10

5
**Example The l loop currents are i = [i1 i2 i3 i4]**

The n-1 node voltages are vn = [vn1 vn2 vn3 vn4 vn5 vn6] The b branch currents are ib = [ib1 ib2 ib3 ib4 ib5 ib6 ib7 ib8 ib9 ib10]

6
**Example We will solve mesh equations for the l loop currents**

i = [i1 i2 i3 i4] Then we can calculate the b branch currents from

7
Example We can also solve for the n-1 node voltages from the loop currents (or branch currents)

8
**Example Solving mesh equations for the l loop currents**

i = [i1 i2 i3 i4] Apply KVL to each mesh Mesh 1: Mesh 2: Mesh 3: Mesh 4:

9
Mesh 1: Mesh 2: Mesh 3: Mesh 4: Express the voltage in terms of the mesh currents: Mesh 1: Mesh 2: Mesh 3: Mesh 4:

10
Mesh 1: Mesh 2: Mesh 3: Mesh 4: Mesh 1: Mesh 2: Mesh 3: Mesh 4:

11
Mesh 1: Mesh 2: Mesh 3: Mesh 4:

12
**is an l x l symmetric resistance matrix**

is a l x 1 vector of mesh currents is a l x 1 vector of voltages representing “known” voltages

13
**Writing the Mesh Equations by Inspection**

The matrix R is symmetric, Rkj = Rjk and all of the off-diagonal terms are negative or zero. The Rkk terms are the sum of all resistances in mesh k. The Rkj terms are the negative sum of the resistances common to BOTH mesh k and mesh j. The ki (the ith component of the vector k) = the algebraic sum of the independent voltages in mesh i, with voltage rises taken as positive.

14
**MATLAB Solution of Mesh Equations**

15
Test with numbers

16
Test with numbers

17
MATLAB Run

18
PSpice Simulation MATLAB:

19
**Let's write a general MATLAB program to solve this problem**

Inputs: Vs1, Vs2 Find all voltages and currents

20
function mesh1(r,Vs1,Vs2) % PowerPoint mesh-1 example % Discussion D2.4 % r is a 1 x 8 vector of resistances % Vs1 and Vs2 = the known dc voltage sources % mesh1(r,Vs1,Vs2) % R = [r(1)+r(5)+r(7) -r(7) -r(5) 0; -r(7) r(2)+r(6)+r(7) 0 -r(6); -r(5) 0 r(3)+r(5) 0; 0 -r(6) 0 r(4)+r(6)+r(8)] k = [Vs2; 0; -Vs1; Vs1] i = inv(R)*k vn = zeros(1,6); vn(1) = -i(3)*r(3); vn(2) = Vs2-i(3)*r(3); vn(3) = Vs1+(i(1)-i(2))*r(7); vn(4) = i(4)*(r(4)+r(8)); vn(5) = i(4)*r(8); vn(6) = Vs1; vn ib = zeros(1,10); ib(1) = -i(3); ib(2) = i(1); ib(3) = i(1); ib(4) = i(2); ib(5) = i(4); ib(6) = i(4); ib(7) = i(3)-i(1); ib(8) = i(2)-i(4); ib(9) = i(1)-i(2); ib(10) = i(3)-i(4); ib

21
MATLAB Run

22
**What happens if we have independent current sources in the circuit?**

Assume temporarily that the voltage across each current source is known and write the mesh equations in the same way we did for circuits with only independent voltage sources. Express the current of each independent current source in terms of the mesh currents and replace one of the mesh currents in the equations. Rewrite the equations with all unknown mesh currents and voltages on the left hand side of the equality and all known voltages on the r.h.s of the equality.

23
Example Write mesh equations by inspection.

25
MATLAB Run i1 A i2 A va V

26
PSpice Simulation va + - i2 i1 i1 MATLAB: i2 va

27
**Let's write a general MATLAB program to solve this problem**

Inputs: Find all voltages and currents Note that

28
**Example The l loop currents are i = [i1 i2 i3]**

The n-1 node voltages are vn = [vn1 vn2 vn3] The b branch currents are ib = [ib1 ib2 ib3 ib4 ib5 ib6]

29
**Example We will solve mesh equations**

for the loop currents and unknown voltage va iiv = [i1 i2 va] Then we can calculate the n-1 node voltages from

30
Example We can also calculate the b branch currents from

31
Expand matrix with

32
**These can be written in matrix form as**

33
function mesh2(r,Vs1,Is1) % PowerPoint mesh-2 example % Discussion D2.4 % r is a 1 x 4 vector of resistances % Vs1 is a known dc voltage source % Is1 is a known dc current source % mesh2(r,Vs1,Is1) R = [r(1)+r(3) -r(3) 0; -r(3) r(2)+r(3)+r(4) 0; -r(1) -r(2) 1] k = [Vs1-r(1)*Is1; -r(2)*Is1; (r(1)+r(2))*Is1] iiv = inv(R)*k i(1) = iiv(1); i(2) = iiv(2); i vn = zeros(1,3); vn(1) = Vs1; vn(2) = i(2)*r(4); vn(3) = (i(1)-i(2))*r(3); vn ib = zeros(1,6); ib(1) = i(1); ib(2) = -Is1; ib(3) = i(2); ib(4) = i(1)+Is1; ib(5) = -i(2)-Is1; ib(6) = i(1)-i(2); ib

34
**Do same problem as before**

mesh2(r,Vs1,Is1)

35
MATLAB Run

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google