Matrix Inversion

Objective:

In this exercise students will use matrix inversion to solve the set of linear equations for the currents obtained when applying Kirchhoff's rules to a multi-loop circuit.

Explanation of the method:

Applying Kirchhoff’s rules to a circuit, we obtain a set of linear equations for the currents.  Consider the circuit shown in the diagram below.

For junction A we have I1-I2-I3=0.
For the upper loop we have V1-V2-I1R1-I2R2=0.
For the lower loop we have V2-I3R3+I2R2=0.

This yields the following three equations (with all quantities in SI units).

A11I1+A12 I2 +A13I3=B1  with  A11=1, A12=-1, A13=-1, B1=0.

A21I1+A22 I2 +A23I3=B2  with  A21=0.02, A22=0.05, A23=0, B2=2.

A31I1+A32 I2 +A33I3=B3  with  A31=0, A32=-0.05, A33=0.2, B3=10.

This set of linear equations may be written a matrix equation

AI=B,   or  ,  or  .

Such a matrix equation is solved by inverting the matrix, I=A-1B.

Here he inverted matrix A-1 is given by  

.

To find the inverted matrix students can use the matrix inversion operation of Microsoft Excel.

Example: Invert the matrix A given above

Into cells A1 through C3 enter the elements of the matrix A.

Highlight cells E1 through G3 and type the formula =MINVERSE(A1:C3).  Hit CTRL+ShIFT+ENTER to enter the formula.  Excel will show the elements of the inverted matrix.

(An array formula can perform multiple calculations and then return either a single result or multiple results. Array formulas act on two or more sets of values known as array arguments. Each array argument must have the same number of rows and columns. You create array formulas in the same way that you create other formulas, except you press CTRL+SHIFT+ENTER to enter the formula.)

You can now find the currents I1 through I3 by entering the elements of B into cells I1 through I3 and using the matrix multiplication operation of Excel.  Highlight cells K1 through K3 and type the formula =MMULT(E1:G3,I1:I3).  Hit CTRL+ShIFT+ENTER to enter the formula.  Excel will show the currents I1 through I3 in cells K1 through K3.  You will find I1=66.7, I2=13.3, I3=53.3.

The exercise:

Consider the circuit show in the figure below.  Set R1 = 2 W, R2 = 4 W, R3 = 6 W, R4 = 8 W, e1 = 3 V, e2 = 9 V, e3 = 12 V, 

(a)  Use Kirchhoff’s rules for junction A and loops 1, 2, and 3 to obtain 4 equations for 4 currents.  Write these equations in matrix form.  Use Excel to invert the matrix and solve for the currents.

(b)  Change the sign of  e3 and repeat the calculations in part (a).

(c)   Set e1 = e2 = 0 and repeat the calculations in part (a).

Note:  Changing the values of the emfs in parts (b) and (c) does not change the elements of the matrix A or A-1 but changes the elements of B.

To earn extra credit , answers questions (a) through (c).  Save your Excel document (your name_exm6.xls) and attach it and your answers to an e-mail message to mbreinig@utk.edu.