Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 11/14/2014 For use at Changchun University of Technology CCUT.

Similar presentations


Presentation on theme: "1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 11/14/2014 For use at Changchun University of Technology CCUT."— Presentation transcript:

1 1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 11/14/2014 For use at Changchun University of Technology CCUT

2 2 Syllabus Motivation Motivation Steps for Cramer’s Rule Steps for Cramer’s Rule Cramer’s Rule: ∆ Cramer’s Rule: ∆ Cramer’s Rule: Numerator N i Cramer’s Rule: Numerator N i Cramer’s Rule: Solve for x i Cramer’s Rule: Solve for x i Sample Problem Sample Problem

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

4 4 Cramer’s Rule Solving Unknowns x i ∆ is the Characteristic Determinant, used in every equation in the denominator of x i N i are the numerators for x i Then for each x i its equation is: x i = N i / ∆ x 1 =N 1 / ∆ x 2 =N 2 / ∆ x 3 =N 3 / ∆

5 5 Steps for Cramer’s Rule To start, normalize: Order all equations by index of the unknowns x i to be computed Requires and ends up being a square matrix! If any unknown x i does not occur in an equation, insert it with constant factor c i,j = 0 Compute the characteristic determinant ∆ for the denominator And then, for each unknown x i compute its associated numerator determinant N i Finally solve for all x i x i =N i / ∆

6 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! The unknowns x i are to be computed Constants in each row i that multiply each unknown x j in column j are shown as c i,j The right hand side of = forms a separate column vector of result values R i

7 7 Equations for Cramer’s Rule, With n=3 x 1 * c 1,1 + x 2 * c 1,2 + x 3 * c 1,3 =R 1 x 1 * c 2,1 + x 2 * c 2,2 + x 3 * c 2,3 =R 2 x 1 * c 3,1 + x 2 * c 3,2 + x 3 * c 3,3 =R 3 The 3 unknowns x i to be computed are x 1 x 2 x 3

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

9 9 Cramer’s Rule: ∆ Pick an arbitrary column, e.g. column 1, then remove one of its elements c i,1 i=1..n at a time, starting with row 1 Generate the next minor matrix, by eliminating the whole row i and column j, initially j = 1; etc. for all rows 1..n Multiply the remaining minor matrix by that constant c i,1 and by its sign; sign = (-1) row+col here = (-1) i+1 ∆ = c1,1|c2,2c2,3| - c2,1|c1,2 c1,3| + c3,1|c1,2 c1,3| |c3,2c3,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 10 Cramer’s Rule: Numerator N i = N 1 Starting with characteristic Determinant ∆ Replace i th column for computing x i, and replace that column by result vector [R]; so for x 1 we generate: |R 1 c 1,2 c 1,3 | N 1 =|R 2 c 2,2 c 2,3 | |R 3 c 3,2 c 3,3 | N 1 = R 1 |c 2,2 c 2,3 | - R 2 |c 1,2 c 1,3 | + R 3 |c 1,2 c 1,3 | |c 3,2 c 3,3 | |c 3,2 c 3,3 ||c 2,2 c 2,3 | N 1 = R 1 *( c 2,2 * c 3,3 - c 3,2 * c 2,3 ) - R 2 *( c 1,2 * c 3,3 - c 3,2 * c 1,3 ) + R 3 *( c 1,2 * c 2,3 – c 2,2 * c 1,3 )

11 11 Cramer’s Rule: Numerator N 2 |c 1,1 R 1 c 1,3 | N 2 =|c 2,1 R 2 c 2,3 | |c 3,1 R 3 c 3,3 | N 2 =c 1,1 |R 2 c 2,3 | - c 2,1 |R 1 c 1,3 | + c 3,1 |R 1 c 1,3 | |R 3 c 3,3 | |R 3 c 3,3 | |R 2 c 2,3 | N 2 =c 1,1 * ( R 2 * c 3,3 - R 3 * c 2,3 ) - c 2,1 * ( R 1 * c 3,3 - R 3 * c 1,3 ) + c 3,1 * ( R 1 * c 2,3 - R 2 * c 1,3 )

12 12 Cramer’s Rule: Numerator N 3 |c 1,1 c 1,2 R 1 | N 3 =|c 2,1 c 2,2 R 2 | |c 3,1 c 3,2 R 3 | N 3 =c 1,1 | c 2,2 R 2 | - c 2,1 |c 1,2 R 1 | + c 3,1 |c 1,2 R 1 | | c 3,2 R 3 ||c 3,2 R 3 ||c 2,2 R 2 | N 3 =c 1,1 * ( R 3 * c 2,2 - R 2 * c 3,2 ) - c 2,1 * ( R 3 * c 1,2 - R 1 * c 3,2 ) + c 3,1 * ( R 2 * c 1,2 - R 1 * c 2,2 )

13 13 Cramer’s Rule: Solve for x i For each x i its equation is: x i = N i / ∆ x 1 =N 1 / ∆ x 2 =N 2 / ∆ x 3 =N 3 / ∆

14 14 Sample Problem, [1] Appendix A 21 * v 1 - 9 * v 2 - 12 * v 3 =-33 -3 * v 1 + 6 * v 2 - 2 * v 3 = 3 -8 * v 1 - 4 * v 2 + 22 * v 3 = 50 Below are 3 sample equations for some circuit The 3 unknowns v i to be computed are v 1 v 2 v 3

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

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

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

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

19 19 Cramer’s Rule: Solve for v 1, v 2, and v 3 For all v i the results are: v i =N i / ∆ v 1 =N 1 / ∆=1,146 / 1,146 = 1 V v 2 =N 2 / ∆=2,292 / 1,146 = 2 V v 3 =N 3 / ∆=3,438 / 1,146 = 3 V

20 20 What if? What would the result be, if we had expanded the characteristic determinant ∆ along the 3 rd column? Let’s see: |21-9-12| ∆ =|-3 6 -2| |-8-4 22| ∆ = -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 – 312 + 2,178= 1,146 <- same result!!

21 21 What if? One of the beauties 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 "1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 11/14/2014 For use at Changchun University of Technology CCUT."

Similar presentations


Ads by Google