Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule

Similar presentations


Presentation on theme: "ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule"— Presentation transcript:

1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule
Herbert G. Mayer, PSU Status 10/4/2015

2 Syllabus Motivation Steps for Cramer’s Rule Cramer’s Rule: ∆
Cramer’s Rule: Numerator Ni Cramer’s Rule: Solve for xi Sample Problem

3 Motivation Circuit analysis involves solution of multiple (n) linear equations One way to solve is via algebraic substitution Which becomes tedious and highly error-prone, once n is interestingly large Engineering calculators often provide built-in solutions, a method internally using Cramer’s Rule Yet future engineers must understand the method first; then use a calculator  First learn to use determinants to solve n unknowns xi in a set of n linear equations, with i = 1..n Requirement: n independent equations for n independent unknowns xi

4 Cramer’s Rule Solving Unknowns xi
Δ is Characteristic Determinant, used in every equation, computing the denominator of xi Ni are the numerators for xi Then for each xi its equation is: xi = Ni / Δ x1 = N1 / Δ x2 = N2 / Δ x3 = N3 / Δ

5 Steps for Cramer’s Rule
To start, normalize! Order all equations by index i of the unknowns xi to be computed Requires a square matrix! If any unknown xi in equation j is not present, insert it with constant factor ci,j = 0 Compute the characteristic determinant ∆ for the denominator And then, for each unknown xi compute its associated numerator determinant Ni Finally solve for all xi xi = Ni / ∆

6 Steps for Cramer’s Rule
Counting of rows and columns starts at 1; not at 0! Not like the first index of C or C++ arrays! Unknowns xi are to be computed Constants in each row i that multiply each unknown xj in column j are shown as ci,j The right hand side of = forms a separate column vector of result values Ri

7 Equations for Cramer’s Rule, With n=3
The 3 unknowns xi to be computed are x1 x2 x3 x1 * c1,1 + x2 * c1,2 + x3 * c1,3 = R1 x1 * c2,1 + x2 * c2,2 + x3 * c2,3 = R2 x1 * c3,1 + x2 * c3,2 + x3 * c3,3 = R3

8 Cramer’s Rule: ∆ Write the characteristic determinant ∆ by listing only and all coefficients ci,j in the n rows and n columns Then write the single column for the vertical Results vector R |c1,1 c1,2 c1,3| | R1| ∆ = |c2,1 c2,2 c2,3| [R] = | R2| |c3,1 c3,2 c3,3| | R3|

9 Cramer’s Rule: ∆ Pick an arbitrary column, e.g. column 1, then remove one of its elements ci,1 i=1..n at a time, starting with row 1 Generate the next minor matrix, by eliminating the whole rowi and columnj, initially j = 1; etc. for all rows 1..n Multiply the remaining minor matrix by that constant ci,1 and by its sign; sign = (-1)row+col here = (-1)i+1 ∆ =c1,1 |c2,2 c2,3|-c2,1 |c1,2 c1,3|+c3,1 |c1,2 c1,3| |c3,2 c3,3| |c3,2 c3,3| |c2,2 c2,3| ∆ = + c1,1 * ( c2,2 * c3,3 - c3,2 * c2,3 ) - c2,1 * ( c1,2 * c3,3 - c3,2 * c1,3 ) + c3,1 * ( c1,2 * c2,3 - c2,2 * c1,3 )

10 Cramer’s Rule: Numerator Ni = N1
Starting with the Characteristic Determinant ∆ Replace ith column for computing xi, and replace that column by result vector [R]; so for x1 we generate: |R1 c1,2 c1,3| N1 = |R2 c2,2 c2,3| |R3 c3,2 c3,3|  N1 = R1 |c2,2 c2,3| - R2 |c1,2 c1,3| + R3 |c1,2 c1,3| |c3,2 c3,3| |c3,2 c3,3| |c2,2 c2,3| N1 = R1* ( c2,2 * c3,3 - c3,2* c2,3 ) - R2* ( c1,2 * c3,3 - c3,2* c1,3 ) + R3* ( c1,2 * c2,3 - c2,2* c1,3 )

11 Cramer’s Rule: Numerator N2
|c1,1 R1 c1,3| N2 = |c2,1 R2 c2,3| |c3,1 R3 c3,3| N2 = c1,1 |R2 c2,3| - c2,1 |R1 c1,3| + c3,1 |R1 c1,3| |R3 c3,3| |R3 c3,3| |R2 c2,3| N2 = c1,1 * ( R2 * c3,3 - R3* c2,3 ) - c2,1 * ( R1 * c3,3 - R3* c1,3 ) + c3,1 * ( R1 * c2,3 - R2* c1,3 )

12 Cramer’s Rule: Numerator N3
|c1,1 c1,2 R1| N3 = |c2,1 c2,2 R2| |c3,1 c3,2 R3| N3 = c1,1 | c2,2 R2 | - c2,1 |c1,2 R1 | + c3,1 |c1,2 R1 | | c3,2 R3 | |c3,2 R3| |c2,2 R2 | N3 = c1,1* ( R3 * c2,2 - R2* c3,2 ) - c2,1* ( R3 * c1,2 - R1* c3,2 ) + c3,1* ( R2 * c1,2 - R1* c2,2 )

13 Cramer’s Rule: Solve for xi
For each xi its equation is: xi = N i / ∆ x1 = N1 / ∆ x2 = N2 / ∆ x3 = N3 / ∆

14 Sample Problem, [1] Appendix A
Below are 3 sample equations for some fictitious circuit The 3 unknowns vi to be computed are v1 v2 v3 -9 * v * v * v1 = -33 -2 * v3 + 6 * v * v1 = 3 -8 * v * v * v2 = 50

15 Sample Problem, [1] Appendix A
All 3 equations normalized, i.e. sorted by index, for unknowns v1 v2 v3 21 * v1 - 9 * v * v3 = -33 -3 * v1 + 6 * v * v3 = 3 -8 * v1 - 4 * v * v3 = 50

16 Characteristic Determinant ∆
Now write result column and the characteristic determinant ∆ by listing the coefficients ci,j only | | | -33 | ∆ = | | [R]= | 3 | | | | 50 | ∆ = 2 | 6 -2 |-(-3)|-9 -12|-8|-9 -12| |-4 22 | |-4 22| | 6 -2 | ∆ = 21*(132-8) + 3*( ) - 8*(18+72) ∆ = 2,604 – = 1,146

17 Numerator N1 Replace column 1 with column vector [R] |-33 -9 -12|
| | N1 = | | | |  N1 = -33 |6 -2 | - 3 |-9 -12| + 50 | | |-4 22 | |-4 22| | | N1 = -33*(124) - 3*(-246) + 50*(18+72) N1 = 1,146

18 Students compute N2 in class!
Numerator N2 Replace column 2 with column vector [R] | | N2 = | | | |  N2 = 21 | 3 -2 | + 3 | | - 8 | | | | | | | | Students compute N2 in class!

19 Numerator N2 Replace column 2 with column vector [R] |21 -33 -12 |
| | N2 = | | | |  N2 = 21 | 3 -2 | + 3 | | - 8 | | | | | | | | N2 = 21*(166) + 3*(-126) - 8*(102) N2 = 3,486 – 378 – 816 = 2,292

20 Students compute N3 in class!
Numerator N3 Replace column 3 with column vector [R] | | N3 = | | | |  N3 = 21 | 6 3 | + 3 | | - 8| | | | | | | | Students compute N3 in class!

21 Numerator N3 Replace column 3 with column vector [R] |21 -9 -33 |
| | N3 = | | | |  N3 = 21 | 6 3 | + 3 | | - 8| | | | | | | | N3 = 21*(312) + 3*(-582) - 8*(171) N3 = 6,552 – 1,746 – 1,368 = 3,438

22 Cramer’s Rule: Solve for v1, v2, and v3
For all vi the results are: vi = N i / ∆ v1 = N1 / ∆ = 1,146 / 1,146 = 1 V v2 = N2 / ∆ = 2,292 / 1,146 = 2 V v3 = N3 / ∆ = 3,438 / 1,146 = 3 V

23 What if? What would the result be, if we had expanded the characteristic determinant ∆ along the 3rd column? Let’s see: | | ∆ = | | | | ∆ = -12 |-3 6 |-(-2)|21 -9 | +22 |21 -9| |-8 -4 | |-8 -4 | |-3 6| ∆ = -12*(12+48) + 2*(-84-72) + 22*(126-27) ∆ = -720 – ,178 = 1,146 <- same result!!

24 What if? One of the wonders of Cramer’s Rule: we may expand the characteristic determinant ∆ in whichever way we like, along any column, along any row! Result is consistently the same That is mathematical beauty!


Download ppt "ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule"

Similar presentations


Ads by Google