solving scale linear systems (example system) lecture 13 ma/cs 471 fall 2003
TRANSCRIPT
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).
Circuit Problem
1
4
3
2 1
5
6
7
30V +-
Problem: Find the current running through each closed loop
Circuit Problem
1
4
3
2 1
5
6
7
30V +-
Notation
DC Battery
Resistor(resistance in ohms)
Resistance free wire
Circuit Problem
1
4
3
2 1
5
6
7
30V
Find the current (in amperes) traveling in the shown closed loops
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.
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
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
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:
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:
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
Solution (by Matlab)
1
4
3
2 1
5
6
7
30V8.19
A
2.74A
5.46A
1.97A
1.08ASolution:
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