1 mesh analysis discussion d2.4a september 2006 chapter 2 section 2-8

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

Post on 20-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

1

Mesh Analysis

Discussion D2.4aSeptember 2006

Chapter 2Section 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

1. Assign mesh currents i1, i2, i3, … il, to the l meshes,

2. Apply KVL to each of the l meshes and use Ohm’s law to express the voltages in terms of the mesh currents,

3. Solve the l resulting simultaneous equations to find the mesh currents.

4

Example

Number of nodes, n =

Number of branches, b =

Number of loops, l =

1l b n

7

10

4

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

5

Example

The n-1 node voltages arevn = [vn1 vn2 vn3 vn4 vn5 vn6]

The b branch currents areib = [ib1 ib2 ib3 ib4 ib5 ib6 ib7 ib8 ib9 ib10]

The l loop currents arei = [i1 i2 i3 i4]

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

6

Example

Then we can calculate the b branch currents from

We will solve mesh equationsfor the l loop currentsi = [i1 i2 i3 i4]

1 3ib i

2 3 1ib ib i

4 2ib i

5 6 4ib ib i 7 3 1ib i i

8 2 4ib i i

9 1 2ib i i

10 3 4ib i i

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

7

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

1 3 3vn i r

22 3 3svn V i r

4 4 4 8vn i r r

13 1 2 7svn V i i r DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

5 4 8vn i r

16 svn V

8

Example

Apply KVL to each mesh

2 1 7 5 0sV v v v

2 6 7 0v v v

15 3 0sv V v

Mesh 1:

Mesh 2:

Mesh 3:

14 8 6 0sv v V v Mesh 4:

Solving mesh equationsfor the l loop currentsi = [i1 i2 i3 i4]

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

9

2 1 7 5 0sV v v v

2 6 7 0v v v

15 3 0sv V v

Mesh 1:

Mesh 2:

Mesh 3:

14 8 6 0sv v V v Mesh 4:

2 1 1 1 2 7 1 3 5( ) ( ) 0sV i r i i r i i r

2 2 2 4 6 2 1 7( ) ( ) 0i r i i r i i r

13 1 5 3 3( ) 0si i r V i r

Mesh 1:

Mesh 2:

Mesh 3:

14 4 4 8 4 2 6( ) 0si r i r V i i r Mesh 4:

Express the voltage in terms of the mesh currents:

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

10

Mesh 1:

Mesh 2:

Mesh 3:

Mesh 4:

Mesh 1:

Mesh 2:

Mesh 3:

Mesh 4:

21 5 7 1 7 2 5 3( ) sr r r i r i r i V

7 1 2 6 7 2 6 4( ) 0r i r r r i r i

15 1 3 5 3( ) sr i r r i V

16 2 4 6 8 4( ) sr i r r r i V

2 1 1 1 2 7 1 3 5( ) ( ) 0sV i r i i r i i r

2 2 2 4 6 2 1 7( ) ( ) 0i r i i r i i r

13 1 5 3 3( ) 0si i r V i r

14 4 4 8 4 2 6( ) 0si r i r V i i r

11

Mesh 1:

Mesh 2:

Mesh 3:

Mesh 4:

2

1

1

1 5 7 7 5 1

7 2 6 7 6 2

5 3 5 3

6 4 6 8 4

0

00

0 0

0 0

s

s

s

Vr r r r r i

r r r r r i

Vr r r i

r r r r i V

21 5 7 1 7 2 5 3( ) sr r r i r i r i V

7 1 2 6 7 2 6 4( ) 0r i r r r i r i

15 1 3 5 3( ) sr i r r i V

16 2 4 6 8 4( ) sr i r r r i V

12

Ri = k

R

k

iis 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

2

1

1

1 5 7 7 5 1

7 2 6 7 6 2

5 3 5 3

6 4 6 8 4

0

00

0 0

0 0

s

s

s

Vr r r r r i

r r r r r i

Vr r r i

r r r r i V

13

•The matrix R is symmetric, Rkj = Rjk and all of the off-diagonal terms are negative or zero.

Writing the Mesh Equations by Inspection

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.

The Rkj terms are the negative sum of the resistances common to BOTH mesh k and mesh j.

The Rkk terms are the sum of all resistances in mesh k.

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

2

1

1

1 5 7 7 5 1

7 2 6 7 6 2

5 3 5 3

6 4 6 8 4

0

00

0 0

0 0

s

s

s

Vr r r r r i

r r r r r i

Vr r r i

r r r r i V

14

MATLAB Solution of Mesh Equations

1i R k

Ri = k

2

1

1

1 5 7 7 5 1

7 2 6 7 6 2

5 3 5 3

6 4 6 8 4

0

00

0 0

0 0

s

s

s

Vr r r r r i

r r r r r i

Vr r r i

r r r r i V

15

Test with numbers

1

2

3

4

2 4 1 4 1 0 4

4 3 2 4 0 2 0

1 0 3 1 0 2

0 2 0 2 4 1 2

i

i

i

i

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1

4

2

4

1

3

32

2V

4V 1i2i

3i4i

16

Test with numbers

1

2

3

4

2 4 1 4 1 0 4

4 3 2 4 0 2 0

1 0 3 1 0 2

0 2 0 2 4 1 2

i

i

i

i

1

2

3

4

7 4 1 0 4

4 9 0 2 0

1 0 4 0 2

0 2 0 7 2

i

i

i

i

Ri = k

17

MATLAB Run

1

2

3

4

2 4 1 4 1 0 4

4 3 2 4 0 2 0

1 0 3 1 0 2

0 2 0 2 4 1 2

i

i

i

i

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1

4

2

4

1

3

32

2V

4V 1i2i

3i4i

18

PSpice Simulation

MATLAB:

19

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

1 2 3 4 5 6 7 8[ ]r r r r r r r r r

Inputs:

Find all voltages and currentsDC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

2

1

1

1 5 7 7 5 1

7 2 6 7 6 2

5 3 5 3

6 4 6 8 4

0

00

0 0

0 0

s

s

s

Vr r r r r i

r r r r r i

Vr r r i

r r r r i V

Vs1, Vs2

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)*kvn = 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;vnib = 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

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

21

MATLAB Run

DC

DC

1r

3r5r

7r

2r

6r

8r

4r

1v 2v

3v 4v

5v6v

7v

8v

+ +

+ +

++

+

+

-

-- -

-

-

-

-

1sV

2sV 1i 2i

3i 4i

2vn 3vn

4vn

5vn

6vn1vn

1ib

9ib

4ib3ib

2ib

8ib7ib10ib

5ib

6ib

22

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

1. 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.

2. Express the current of each independent current source in terms of the mesh currents and replace one of the mesh currents in the equations.

3. 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.

1

2

3

1 3 3 1 10

3 3 2 4 2 0

1 2 2 1 a

i

i

i v

DC 10V

1

3A

+ v -a

1i 2i

3i3 3i

24

1

2

4 3 0 7

3 9 0 6

1 2 1 9a

i

i

v

1

2

4 3 1 10

3 9 2 0

1 2 3 3 a

i

i

v

25

MATLAB Run

AAV

i1i2va

1

2

4 3 0 7

3 9 0 6

1 2 1 9a

i

i

v

DC 10V

1

3A

+ v -a

1i 2i

3i

26

PSpice Simulation

MATLAB:i1

va

i2

i1

va

i2

+ -

27

DC

+ v -a

1i 2i

3i1r

1sI

1vn2vn

3vn

5ib

1ib

2ib

4ib

6ib

3ib

1sV

2r

4r3r

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

1 3 3 1 1 1

3 2 3 4 2 2

1 2 1 2 3

0s

a

r r r r i V

r r r r r i

r r r r i v

1 2 3 4[ ]r r r r r

Inputs:

Find all voltages and currents

Note that

1 1, s sV I

13 si I

28

Example

The n-1 node voltages arevn = [vn1 vn2 vn3]

The b branch currents areib = [ib1 ib2 ib3 ib4 ib5 ib6]

The l loop currents arei = [i1 i2 i3]

DC

+ v -a

1i 2i

3i1r

1sI

1vn2vn

3vn

5ib

1ib

2ib

4ib

6ib

3ib

1sV

2r

4r3r

29

Example

Then we can calculate the n-1 node voltages from

We will solve mesh equationsfor the loop currents and unknown voltage va

iiv = [i1 i2 va]

DC

+ v -a

1i 2i

3i1r

1sI

1vn2vn

3vn

5ib

1ib

2ib

4ib

6ib

3ib

1sV

2r

4r3r

11 svn V

2 2 4vn i r

3 1 2 3vn i i r

30

ExampleWe can also calculate the b branch currents from

1 1ib i

12 sib I

3 2ib i

6 1 2ib i i

14 1 sib i I

DC

+ v -a

1i 2i

3i1r

1sI

1vn2vn

3vn

5ib

1ib

2ib

4ib

6ib

3ib

1sV

2r

4r3r

15 2 sib i I

31

1 11 3 1 3 2 1( ) s sr r i r i r I V

13 1 2 3 4 2 2( ) 0sr i r r r i r I

11 1 2 2 1 2( ) s ar i r i r r I v

1 3 3 1 1 1

3 2 3 4 2 2

1 2 1 2 3

0s

a

r r r r i V

r r r r r i

r r r r i v

Expand matrix with13 si I

32

1 11 3 1 3 2 1( ) s sr r i r i r I V

13 1 2 3 4 2 2( ) 0sr i r r r i r I

11 1 2 2 1 2( ) s ar i r i r r I v

These can be written in matrix form as

1

1

1

1 11 3 3 1

3 2 3 4 2 2

1 2 1 2

0

0

1

s s

s

a s

V r Ir r r i

r r r r i r I

r r v r r I

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)*ki(1) = iiv(1);i(2) = iiv(2);ivn = zeros(1,3);vn(1) = Vs1;vn(2) = i(2)*r(4);vn(3) = (i(1)-i(2))*r(3);vnib = 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

DC

+ v -a

1i 2i

3i1r

1sI

1vn2vn

3vn

5ib

1ib

2ib

4ib

6ib

3ib

1sV

2r

4r3r

34

Do same problem as before

[1 2 3 4]r

1 10Vs

mesh2(r,Vs1,Is1)

1 3Is

DC 10V

1

3A

+ v -a

1i 2i

3i

35

MATLAB Run