solving scale linear systems (example system) lecture 13 ma/cs 471 fall 2003

13
Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Upload: darrell-barnett

Post on 26-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Solving Scale Linear Systems (Example system)

Lecture 13

MA/CS 471

Fall 2003

Page 2: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

First – Brief Reintroduction to Linear Systems

• First we will use an example physical system to construct a set of 5 couple linear equations in 5 unknowns.

• We will seek a solution using Matlab

• Later we will consider generalizations to larger systems (with correspondingly more unknowns to find).

Page 3: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Circuit Problem

1

4

3

2 1

5

6

7

30V +-

Problem: Find the current running through each closed loop

Page 4: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Circuit Problem

1

4

3

2 1

5

6

7

30V +-

Notation

DC Battery

Resistor(resistance in ohms)

Resistance free wire

Page 5: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Circuit Problem

1

4

3

2 1

5

6

7

30V

Find the current (in amperes) traveling in the shown closed loops

Page 6: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Kirchoff’s Second Law

• Kirchoff's 2nd Law states that for any closed loop path around a circuit the sum of the voltage gains and voltage drops equals zero. In the circuit shown, there is a voltage gain for each electron traveling through the voltage source and a voltage drop across the resistor.

Page 7: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Loop 1 Balance

I 1

I 2

I 3

1

4

3

2 1

5

6

7

30V

Consider LOOP 1

The gain is 30V. The loop 1 loss (by Ohm’s law) is:The gain due to current from loop 2 is:The gain due to current from loop 3 is: Kirchoff’s 2nd law states gain=loss, =>

1 1 3 2I 2 3I 3 2I

32 130 1 32 23 III

Page 8: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

All Loop Balances

2 3 1

1 4 2

1 3

2 5 4

4 5

Loop 1: 30 3 2 1 3 2

Loop 2: 3 7 3 4 7

Loop 3: 2 2 1

Loop 4: 7 6 6 7

Loop 5: 6 5 6

V I I I

I I I

I I

I I I

I I

1

4

3

2 1

5

6

7

30V 1

2

3

4

5

Page 9: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Rearranging Linear System

1 2 3

1 2 4

1 3

2 4 5

4 5

1 3 2 3 2 30

3 3 4 7 7 0

2 2 1 0

7 6 7 6 0

6 5 6 0

I I I V

I I I

I I

I I I

I I

Divide through by Ohms:

1 2 3

1 2 4

1 3

2 4 5

4 5

1 3 2 3 2 30

3 3 4 7 7 0

2 2 1 0

7 6 7 6 0

6 5 6 0

I I I A

I I I

I I

I I I

I I

Arranging unknownLoop currents on lefthand side and known voltage sources on right hand side:

Page 10: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Final System

1 2 3

1 2 4

1 3

2 4 5

4 5

6 3 2 30

3 14 7 0

2 3 0

7 13 6 0

6 11 0

I I I A

I I I

I I

I I I

I I

Simplifying the coefficients:

1

2

3

4

5

6 3 2 0 0 30

3 14 0 7 0 0

2 0 3 0 0 0

0 7 0 13 6 0

0 0 0 6 11 0

I A

I

I

I

I

Matrix form:

Page 11: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Final Form

• Negating both sides:

• This is the enemy.• We will create systems with a large

number of degrees of freedom later on.

1

2

3

4

5

6 3 2 0 0 30

3 14 0 7 0 0

2 0 3 0 0 0

0 7 0 13 6 0

0 0 0 6 11 0

I A

I

I

I

I

Page 12: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Solution (by Matlab)

1

4

3

2 1

5

6

7

30V8.19

A

2.74A

5.46A

1.97A

1.08ASolution:

Page 13: Solving Scale Linear Systems (Example system) Lecture 13 MA/CS 471 Fall 2003

Homework/Lab workQ1) a) Create a non-trivial circuit with 15 sub loops. Use a range of

resistor values between 1 and 10.b) Using a sparse matrix (see MA375/Lecture 8 intro), solve for

loop currents with Matlabc) Draw a diagram indicating current along each segment of

circuit (to two significant figures). d) Verify Kerchoff’s first law (look it up) by checking the sum of

currents at three of the wire intersections.e) Count the number of non-zeros of your 15x15 matrix and report

the amount of fill (i.e. number of non-zeros/225)f) Include print out of matlab window used for matrix solution.

Q2) Review:a) LU factorization

b) condition number of a matrix