Analysis of Mesh Circuit Using Linear Algebra

Similar documents
Outline. Week 5: Circuits. Course Notes: 3.5. Goals: Use linear algebra to determine voltage drops and branch currents.

Engineering Fundamentals and Problem Solving, 6e

Direct Current Circuits. February 18, 2014 Physics for Scientists & Engineers 2, Chapter 26 1

Module 2. DC Circuit. Version 2 EE IIT, Kharagpur

Lecture #3. Review: Power

Kirchhoff's Laws and Circuit Analysis (EC 2)

ECE 1311: Electric Circuits. Chapter 2: Basic laws

COOKBOOK KVL AND KCL A COMPLETE GUIDE

Chapter 2. Engr228 Circuit Analysis. Dr Curtis Nelson

mywbut.com Mesh Analysis

Numerical Methods - Numerical Linear Algebra

Series & Parallel Resistors 3/17/2015 1

Numerical Linear Algebra

INTRODUCTION TO ELECTRONICS

(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

Discussion Question 6A

6. MESH ANALYSIS 6.1 INTRODUCTION

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note 11

Network Analysis V. Mesh Equations Three Loops

Physics for Scientists & Engineers 2

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

PHYSICS 171. Experiment 3. Kirchhoff's Laws. Three resistors (Nominally: 1 Kilohm, 2 Kilohm, 3 Kilohm).

Linear Algebra Math 221

30.5. Iterative Methods for Systems of Equations. Introduction. Prerequisites. Learning Outcomes

Numerical Linear Algebra

Voltage Dividers, Nodal, and Mesh Analysis

UNIVERSITY OF ALABAMA Department of Physics and Astronomy. PH / LeClair Fall Circuits Exercises

Analysis of a single-loop circuit using the KVL method

Designing Information Devices and Systems II Fall 2016 Murat Arcak and Michel Maharbiz Homework 0. This homework is due August 29th, 2016, at Noon.

Review of Circuit Analysis

DEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix to upper-triangular

ECE KIRCHHOFF'S LAWS - INVESTIGATION 8 KIRCHHOFF'S VOLTAGE LAW

Applied Linear Algebra in Geoscience Using MATLAB

1.2 Row Echelon Form EXAMPLE 1

Notes on Electricity (Circuits)

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

1 Number Systems and Errors 1

Math 307 Learning Goals

CHAPTER D.C. CIRCUITS

Power lines. Why do birds sitting on a high-voltage power line survive?

POLYTECHNIC UNIVERSITY Electrical Engineering Department. EE SOPHOMORE LABORATORY Experiment 2 DC circuits and network theorems

QUIZ 1 SOLUTION. One way of labeling voltages and currents is shown below.

Chapter 28. Direct Current Circuits

Simple Resistive Circuits

DC STEADY STATE CIRCUIT ANALYSIS

EE40 KVL KCL. Prof. Nathan Cheung 09/01/2009. Reading: Hambley Chapter 1

Matrix decompositions

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Multiloop DC Circuits (Kirchhoff s Rules)

Agenda for Today. Elements of Physics II. Resistance Resistors Series Parallel Ohm s law Electric Circuits. Current Kirchoff s laws

ELECTRICAL THEORY. Ideal Basic Circuit Element

Version 001 CIRCUITS holland (1290) 1

Math 307 Learning Goals. March 23, 2010

AM 205: lecture 6. Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4

Sirindhorn International Institute of Technology Thammasat University at Rangsit

AM 205: lecture 6. Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization

Preamble. Circuit Analysis II. Mesh Analysis. When circuits get really complex methods learned so far will still work,

LABORATORY 4 ELECTRIC CIRCUITS I. Objectives

Matrix Factorization Reading: Lay 2.5

Electric Circuits I. Nodal Analysis. Dr. Firas Obeidat

Electric Current. Note: Current has polarity. EECS 42, Spring 2005 Week 2a 1

E40M Charge, Current, Voltage and Electrical Circuits KCL, KVL, Power & Energy Flow. M. Horowitz, J. Plummer, R. Howe 1

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

A LINEAR SYSTEMS OF EQUATIONS. By : Dewi Rachmatin

52 VOLTAGE, CURRENT, RESISTANCE, AND POWER

Phy301- Circuit Theory

Electric Circuits. June 12, 2013

Direct Current Circuits

JFET Homework. Nov. 4, 2007, rev. Nov. 12, 2015

Definition (T -invariant subspace) Example. Example

ENGG 225. David Ng. Winter January 9, Circuits, Currents, and Voltages... 5

Lecture Notes on DC Network Theory

Introduction to Applied Linear Algebra with MATLAB

Electric Current & DC Circuits

Matrix decompositions

THERE MUST BE 50 WAYS TO FIND YOUR VALUES: AN EXPLORATION OF CIRCUIT ANALYSIS TECHNIQUES FROM OHM S LAW TO EQUIVALENT CIRCUITS

ELECTRICITY. Electric Circuit. What do you already know about it? Do Smarty Demo 5/30/2010. Electric Current. Voltage? Resistance? Current?

Direct-Current Circuits

Getting Started with Communications Engineering

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Iterative Methods. Splitting Methods

Notes on Electricity (Circuits)

Section 5.6. LU and LDU Factorizations

Electricity & Magnetism

MATH 3511 Lecture 1. Solving Linear Systems 1

Module 1, Add on math lesson Simultaneous Equations. Teacher. 45 minutes

Introduction to Mathematical Programming

Lecture 12. Linear systems of equations II. a 13. a 12. a 14. a a 22. a 23. a 34 a 41. a 32. a 33. a 42. a 43. a 44)

Chapter 21 Electric Current and Direct- Current Circuits

Chapter 18. Direct Current Circuits

Physics 1214 Chapter 19: Current, Resistance, and Direct-Current Circuits

Introduction to Scientific Computing

DC Circuit Analysis + 1 R 3 = 1 R R 2

Homework 1 solutions

Chapter 10 Sinusoidal Steady State Analysis Chapter Objectives:

Applied Linear Algebra in Geoscience Using MATLAB

EE292: Fundamentals of ECE

Algebra C Numerical Linear Algebra Sample Exam Problems

Transcription:

Analysis of Mesh Circuit Using Linear Algebra Submitted By: Md. Anowar Hossain Researcher No: 75654 Submitted To: Dr. Yacine Benhadid 1

Abstract An interesting application of linear algebra can be found in electrical engineering and specifically electrical networks. I have found that linear algebra is a useful tool in analyzing electric circuits in terms of organization and saving time. In this report, I have included examples how to analyze a circuit using linear algebra and solved it by using Gaussian Elimination, LU Decomposition and SOR (Successive Over Relaxation) method and determined Eigenvalues and Eigenvectors using Shifted Inverse Power method, Deflation method and Jacobi method. Background A simple electric circuit consists of voltage sources, wire with current running through it, and various types of resistors that cause a voltage drop in the circuit. In order to tell how much the voltage drops across a resistor, one must use Ohm s law. This law simply states that V = IR Where, V = Voltage across the resistor (volts), I = Current through the resistor (amperes) and R = Resistance of the resistor (ohms). When analyzing an electric circuit, there are many techniques that may be used. One simple technique uses the idea of Kirchhoff s voltage law (KVL). Kirchhoff s voltage law states that the algebraic sum of the voltages around any closed path in a circuit is identically zero for all time. In order to use Kirchhoff s voltage law, the method of mesh current analysis must be used to examine the circuit. In order to analyze the circuit, Kirchhoff s voltage law must be applied to each mesh. It is important to note that if a resistor is shared by two meshes, the voltage across this resistor is (current in mesh being analyzed current in other mesh) x (resistance).

After summing the voltages around a circuit with 5 meshes, there will be 5 equations with 5 unknowns. One way to solve this would be to solve each equation in terms of one variable and then substitute into the others. This method would work, but would be far too time consuming. This is where linear algebra comes in. Using Ohm s law, each equation can be written in the form RI = V (similar to Ax = b). Putting these equations into matrices and solve for each current by using the matrix equation RI = V. By solving the augmented matrix, values of I 1, I 2, I 3, I 4 and I 5 can be found. The matrix equation can be very useful when large circuits with many loops are to be analyzed. In order to analyze the simple circuit below (find the amount of current flowing in each loop), the technique of mesh analysis will be combined with the use of linear algebra. Model Circuit

The equations in the model are given by: Mesh 1: I 1 R 1 + (I 1 I 2 ) R 6 + (I 1 I 4 ) R 7 = V Mesh 2: (I 2 - I 1 ) R 6 + I 2 R 2 + (I 2 - I 3 ) R 5 = 0 Mesh 3: I 3 R 3 + I 3 R 4 + (I 3 I 2 ) R 5 = 0 Mesh 4: (I 4 I 1 ) R 7 + (I 4 I 5 ) R 4 + I 4 R 10 + I 4 R 8 = 0 Mesh 5: (I 5 I 4 ) R 4 + I 5 R 11 = 0 V = 120V, R1 = 2, R2 = 5, R3 = 2, R4 = 4, R5 = 3, R6 = 1 R7 = 3 R8 = 6 R9 = 5 R10 = 2 R11 = 8 Step 1: The first step in solving this problem is to write the sum of voltages around each loop. (In this case, I arbitrarily choose current direction as clockwise). The voltage sums of each loop must equal zero, thus giving the following equations: Mesh 1: 6I 1 I 2 + 0I 3 3I 4 + 0I 5 = 120 Mesh 2: -I 1 + 9I 2-3I 3 + 0I 4 + 0I 5 = 0 Mesh 3: 0I 1 3I 2 + 9I 3 + 0I 4 + 0I 5 = 0 Mesh 4: -3I 1 + 0I 2 + 0I 3 + 15I 4-4I 5 = 0 Mesh 5: 0I 1 + 0I 2 + 0I 3 5I 4 + 13I 5 = 0 Step 2: Putting the five equations into matrix form Ax = b. In this case, values of resistance will make up the coefficient matrix, current will be the unknown x, and voltages will be the product of resistances and currents. The three equations from above will have the form RI = V. Once the mesh equations are put into matrices, they will look like: 6-1 0-3 0 I 1 120-1 9-3 0 0 I 2 0 0-3 9 0 0 I 3 = 0-3 0 0 15-4 I 4 0 0 0 0-5 13 I 5 0

Solving the system using Gaussian Elimination: 6-1 0-3 0 120-1 9-3 0 0 0 Ab = 0-3 9 0 0 0-3 0 0 15-4 0 0 0 0-5 13 0 >> Ab=[6-1 0-3 0 120;-1 9-3 0 0 0;0-3 9 0 0 0;-3 0 0 15-4 0;0 0 0-5 13 0]; >> gauss(ab) Which gives upper triangular matrix, 6.0000-1.0000 0-3.0000 0 120.0000 0 8.8333-3.0000-0.5000 0 20.0000 M = 0 0 7.9811-0.1698 0 6.7925 0 0 0 13.4681-4.0000 61.2766 0 0 0 0 11.5150 22.7488 Using backward substitution, gives the solution: I 1 = 23.0484 A, I 2 = 2.8811 A, I 3 = 0.9604 A, I 4 = 5.1365 A, I 5 = 1.9756 A

Solving the system using LU Decomposition 6-1 0-3 0-1 9-3 0 0 A = 0-3 9 0 0-3 0 0 15-4 0 0 0-5 13 >>A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >>LU(A) 1.0000 0 0 0 0-0.1667 1.0000 0 0 0 0-0.3396 1.0000 0 0 = L -0.5000-0.0566-0.0213 1.0000 0 0 0 0-0.3712 1.0000 6.0000-1.0000 0-3.0000 0 0 8.8333-3.0000-0.5000 0 0 0 7.9811-0.1698 0 = U 0 0 0 13.4681-4.0000 0 0 0 0 11.5150

Using Ly=b and Ux=y 1.0000 0 0 0 0 y 1 120-0.1667 1.0000 0 0 0 y 2 0 0-0.3396 1.0000 0 0 y 3 = 0-0.5000-0.0566-0.0213 1.0000 0 y 4 0 0 0 0-0.3712 1.0000 y 5 0 >>b=[120;0;0;0;0]; >>y=inv(l)*b Gives the solution, y 1 = 120 y 2 = 20 y 3 = 6.7925 y 4 = 61.2766 y 5 = 22.7488 6.0000-1.0000 0-3.0000 0 I 1 120 0 8.8333-3.0000-0.5000 0 I 2 20 0 0 7.9811-0.1698 0 I 3 = 6.7925 0 0 0 13.4681-4.0000 I 4 61.2766 0 0 0 0 11.5150 I 5 22.7488

>>I=inv(U)*y Gives the solution, I 1 = 23.0484 A I 2 = 2.8811 A I 3 = 0.9604 A I 4 = 5.1365 A I 5 = 1.9756 A Solving the System using SOR method 6-1 0-3 0-1 9-3 0 0 A = 0-3 9 0 0-3 0 0 15-4 0 0 0-5 13 120 b = 0 0 0 0 >> A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> b=[120;0;0;0;0]; >> N=100; >> sor(a, b, N) It gives the solution on 7 iterations (W = 1.0628)- I 1 = 23.0484 A I 2 = 2.8811 A I 3 = 0.9604 A I 4 = 5.1365 A I 5 = 1.9756 A

Finding Eigenvalues and Eigenvectors: Eigenvalues of matrix A are: 19.0196 4.4967 6.2619 10.1315 12.0903 Power Method: Using an initial vector x 0 = [1,1,1,1,1] T, the approximation of the dominant Eigenvalue of matrix A after 20 iterations is 19.0196 and the corresponding eigenvector is [-0.1760, 0.0193, -0.0058, 0.7572, -0.6288] T >> A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> x=[1,1,1,1,1]'; >> tol=1e-10; >> maxiter=20; >> [lambda,v,relerr,niter] = Powermethod(A,x,tol,maxiter) Inverse Power Method: Using an initial vector x 0 = [0,1,2,3,4] T, the approximation of the dominant Eigenvalue of matrix A -1 after 10 iterations is 4.4980 and the corresponding eigenvector is [0.8294, 0.3550, 0.2453, 0.3055, 0.1805] T. >> A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> x=[0,1,2,3,4]'; >> tol=1e-10; >> maxiter=10; >> [lambda,v,relerr,niter] = InvPowerMethod(A,x,tol,maxiter) Shifted Inverse Power Method: Using an initial vector x 0 = [1,1,1,1,1] T and µ=6, the approximation of the dominant Eigenvalue of matrix B -1 = (A-µI) -1 after 15 iterations is 19.0196 and the corresponding eigenvector is [-0.1759, 0.0193, -0.0058, 0.7571, - 0.6289] T.

Matlab command: >>A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> s=19; >> x=[1,1,1,1,1]'; >> tol=1e-10; >> maxiter=15; >> [lambda,v,relerr,niter] = ShiftInvPowerMethod(A,s,x,tol,maxiter) Jacobi Method: Jacobi method gives the matrix 4.4956 0.0402-0.0066-0.0230 0.1396 0.0174 12.0898 0.0865 0.0414 0.0041 D = -0.0026 0.0745 6.2630 0.0001-0.0001 0.2906 0.1229-0.1803 19.0188-0.0084-0.0455 0.0218 0.0946-0.9131 10.1328 Its diagonal elements are: 4.4956 12.0898 6.2630 19.0188 10.1328 Which are the Eigenvalues of the original matrix A. >>A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> JOBM(A)

Deflation Method: Using the largest Eigenvalue 19.0196 and the corresponding Eigenvector x 1 = [-0.1760, 0.0193, -0.0058, 0.7572, -0.6288] T, Deflation method gives the following Eigenvalues: 19.0196 4.4979 6.2617 12.0905 10.1335 and the corresponding eigenvectors are: [-0.1759, 0.0193, -0.0058, 0.7571, -0.6289] T [0.8414, 0.3359, 0.2238, 0.3097, 0.1821] T [-0.3386, 0.6168, 0.6759, -0.1761, -0.1306] T [-0.3264, -0.0478, 0.1269, 0.4655, 0.8114] T [-0.1259, 0.7074, -0.6867, 0.0198, 0.1088] T >> A=[6-1 0-3 0;-1 9-3 0 0;0-3 9 0 0;-3 0 0 15-4;0 0 0-5 13]; >> Lamda=19.0196; >> XA=[-0.1760, 0.0193, -0.0058, 0.7572, -0.6288]'; >> DEFLATED(A,Lamda,XA) >>[v,d]=eig(a) Evaluation I think that having knowledge of matrices and linear algebra is extremely valuable in many fields of study. This project was a good chance to find out how useful linear algebra is in many different areas of math and science. The reason I choose only to discuss linear algebra in relation to Kirchhoff s voltage law and mesh current analysis is because I became extremely familiar with mesh current analysis. I wanted to see how linear algebra could relate to and expand my knowledge of a subject I already knew about. I thought this would be more valuable to me, than to learn about a completely new topic that I knew nothing of, and then write a report on that.