Presentation is loading. Please wait.

Presentation is loading. Please wait.

EGR 2201 Unit 3 Nodal Analysis

Similar presentations


Presentation on theme: "EGR 2201 Unit 3 Nodal Analysis"— Presentation transcript:

1 EGR 2201 Unit 3 Nodal Analysis
Read Alexander & Sadiku, Appendix A and Sections 3.1 to 3.3. Homework #3 and Lab #3 due next week. Quiz next week. Handouts: Quiz 2, Unit 3 practice sheets.

2 A Systematic Approach With the laws from Chapter 2 (Ohm’s law, KCL, KVL, …), we can analyze a wide variety of circuits containing resistors and sources. However, those laws do not constitute a systematic method for analyzing circuits. Different people may apply the laws in different orders. We want a systematic, step-by-step method. Nodal analysis is one such method. Mesh analysis, which we’ll study next week, is another one.

3 Simultaneous Linear Equations
Nodal analysis and mesh analysis both involve writing down a set of linear equations, based on an inspection of the circuit you’re analyzing, and then solving those equations simultaneously. In your math classes you have studied how to solve simultaneous linear equations, so let’s start with a review of the math.

4 Math Review: Solving Simultaneous Linear Equations
Recall that a linear equation in one variable has a unique solution. Example: The linear equation x = 8 has a unique solution, namely x = 4. In contrast, a linear equation in two variables does not have a unique solution. Example: The linear equation x  4y = 7 does not have a unique solution.

5 Simultaneous Linear Equations
Although a single linear equation in two variables doesn’t have a unique solution, a pair of independent linear equations in two variables does have a unique solution. Example: The pair of equations x  4y = 7 and x + 8y = 26 has a unique solution, namely x = 5 and y = 2. Write example from slide to left of screen and solve it by substitution. Then do practice question 1.

6 3x  y  2z = 1 x + 6y  3z = 0 2x  3y + 6z = 6
Generalizing More generally, for any positive integer n, a set of n independent linear equations in n variables does have a unique solution. Example of a set of three equations in three variables: 3x  y  2z = 1 x + 6y  3z = 0 2x  3y + 6z = 6 How do we find the solution? Write example from slide to right of screen.

7 Many Methods for Solving Simultaneous Equations
Mathematicians have found many ways of attacking this problem: Substitution Gaussian elimination Cramer’s rule Matrix inversion

8 How Many Equations Do You Have?
In theory, there’s no limit to the size of the problems that you can attack with the methods listed on the previous slide. Example: Eight equations in eight variables. But from a practical standpoint, all of these methods are cumbersome if you have more than three equations in three variables. In such cases, you can use a powerful calculator (such as a TI-89) or software (such as MATLAB).

9 Matrices We’ll focus on the methods that use Cramer’s rule and matrix inversion. Both of these methods rely on matrices and determinants, so let’s do a quick review of those topics. The textbook’s Appendix A also gives a nice review.

10 Subscripted Variables
When working with matrices, we generally prefer to use variable names like x1, x2, x3,… rather than x, y, z,…. Rewriting our earlier set of two equations in two variables: 3x1  4x2 = 7 2x1 + 8x2 = 26 Rewrite left-hand example in this form.

11 A 2-by-2 Matrix Equation Suppose we have two equations in two variables: a11x1 + a12x2 = b1 a21x1 + a22x2 = b2 We can write this in matrix form as or A X = B Rewrite left-hand example in this form.

12 Example of a 2-by-2 Matrix Equation
Using our two equations in two variables from earlier: 3x1  4x2 = 7 2x1 + 8x2 = 26 We can write this in matrix form as or A X = B Do practice questions 2 and 3.

13 Solution Using Cramer’s Rule
Cramer’s rule says that the solution of the matrix equation A X = B is given by: where  is the determinant of A, and i is the determinant of the matrix formed by replacing the ith column of A by B.

14 Determinant of a 2-by-2 Matrix
Suppose we have a 2-by-2 matrix A: This matrix’s determinant  is given by:  = a11a22  a12a21 Finding the determinant gets much harder as the system of equations gets bigger.

15 Example of the Determinant of a 2-by-2 Matrix
In the earlier example, our 2-by-2 matrix A was: This matrix’s determinant  is equal to 32, since :  = 3×8  (4×2) = 24  (8) = 32 Do practice question 4a.

16 Example of Solution Using Cramer’s Rule
Continuing with our 2-by-2 example: We’ve just seen that  = 32 for the matrix above. Also, 1 is the determinant of So 1 = 160. And 2 is the determinant of So 2 = 64. Do practice question 4b and 4c.

17 Example of Solution Using Cramer’s Rule (Continued)
We’ve found that, for our example,  = 32, 1 = 160, and 2 = 64. Therefore, Cramer’s rule tells us that This agrees with our earlier solution. Do practice question 4d.

18 A 3-by-3 Matrix Equation a11x1 + a12x2 + a13x3 = b1
Suppose we have three equations in three variables: a11x1 + a12x2 + a13x3 = b1 a21x1 + a22x2 + a23x3 = b2 a31x1 + a32x2 + a33x3 = b3 We can write this in matrix form as or A X = B

19 Example of a 3-by-3 Matrix Equation
Consider the following three equations in three variables: 3x1  x2  2x3 = 1 x1 + 6x2  3x3 = 0 2x1  3x2 + 6x3 = 6 We can write this in matrix form as or A X = B This is the right-hand example from earlier.

20 Determinant of a 3-by-3 Matrix
Suppose we have a 3-by-3 matrix A: This matrix’s determinant is given by: a11a22a33 + a21a32a13 + a31a12a23  a13a22a31  a23a32a11  a33a12a21 See page A-2 for a way to remember this. We could use Cramer’s rule to solve our 3-by-3 set of equations, but we won’t.

21 How Much of This Do You Need to Know?
On exams, I’ll expect you to be able to use Cramer’s rule or matrix inversion to solve a problem involving two equations in two variables—in other words, involving a 2-by-2 matrix. You’ll need to show every step in the solution. But for more complicated exam problems, you can use a calculator or MATLAB to solve the equations.

22 Solution Using Matrix Inversion
Suppose again that we have the matrix equation A X = B We can solve for X by rewriting this equation as X = A-1 B where A-1 is a matrix called the inverse of A. The question now is: How do we find this inverse matrix A-1?

23 Inverse of a 2-by-2 Matrix
Suppose we have a matrix A given by This matrix’s inverse is given by where |A| is the determinant of A.

24 Example of the Inverse of a 2-by-2 Matrix
In the earlier example, our 2-by-2 matrix A was: And we found that this matrix’s determinant |A| is equal to 32. Therefore this matrix’s inverse is Do practice question 5a.

25 Example of Solution Using Matrix Inversion
Now that we’ve found A-1, we write X = A-1 B, or (That’s because 0.25 × × 26 = 5  × × 26 = 2) So x1 = 5 and x2 = 2, in agreement with our earlier solutions. Do practice question 5b.

26 Inverse of a 3-by-3 Matrix?
If you have three equations in three variables, you’ll need to find the inverse of at 3-by-3 matrix. This gets a little ugly. See page A-6 in the textbook. If you have four (or more) equations in four (or more) variables, don’t try it by hand. Use a calculator or MATLAB.

27 A Quick Introduction to MATLAB
The main window is the Command Window, in which you type commands at the >> prompt. Examples: >> 3+5 >> 3+5^2 >> (3+5)^2 >> a=3 >> b=5 >> c=a+b^2 >> sqrt(c)

28 A Few MATLAB Tips You can’t move up to a previous line to re-execute a command, but you can use the up-arrow and down-arrow keys to retrieve old commands. The clc command clears the command window. MATLAB has many built-in math functions, including: Function Description sqrt(x) Square root exp(x) Exponential (ex) abs(x) Absolute value log(x) Natural logarithm log10(x) Base-10 logarithm cos(x) Cosine (x in radians) cosd(x) Cosine (x in degrees)

29 Solving Our 2-by-2 Example with MATLAB
First, define the coefficient matrix A and the vector of constants B: >> A = [3 -4; 2 8] >> B = [7; 26] Second, multiply A’s inverse times B: >> X = inv(A)*B Do practice question 6.

30 Solving Our 3-by-3 Example with MATLAB
First, define the coefficient matrix A and the vector of constants B: >> A = [ ; ; ] >> B = [1; 0; 6] Second, multiply A’s inverse times B: >> X = inv(A)*B

31 Simplifying Before You Can Use MATLAB
Often you’ll have a set of equations that you must simplify using basic algebra to put it into a form that you can enter in MATLAB. Example: This simplifies to: 𝑥 1 −10+ 𝑥 𝑥 1 − 𝑥 2 2 =0 𝑥 2 − 𝑥 𝑥 −2=0 Do practice question 7. This ends our math review. 17𝑥 1 −5 𝑥 2 =100 −5 𝑥 1 +6 𝑥 2 =20

32 Nodal Analysis We’ve finished our review of the math. Now let’s see how to use the math to analyze circuits. Nodal analysis, which is based on Kirchhoff’s current law (KCL), is a process for finding the voltages at the nodes in a circuit. Once we’ve found these node voltages, we can use KVL to find any other voltages in the circuit and use Ohm’s law to find any currents in the circuit.

33 Reference Node To perform nodal analysis on a circuit, we must first select one of the circuit’s nodes to be the reference node. This means that we’ll only talk about voltages that are relative to this node. Thinking in terms of a multimeter, this means that we’ll keep the meter’s black lead at the reference node when making any voltage measurements. See the next two slides for a picture….

34 Voltage Measurements without a Reference Node
In Lab #1 you built this three-node circuit and then measured several voltages: vab, vac, vbc, vba, vcb, and vca. Recall that to measure any of these voltages, you touched the meter’s red lead to the node named first and the black lead to the node named second. Example: To measure vac, you touched the meter’s red lead to node a and the black lead to node c.

35 Voltage Measurements with a Reference Node
When doing nodal analysis, we’ll single out one node as the reference node and then measure all voltages relative to that node. Example: Suppose that in this circuit, we select node c as the reference node. Then we’ll keep the meter’s black lead on node c for all voltage measurements. We can therefore drop the letter c from the names of the voltages. Instead of writing vac, we’ll just write va. And instead of vbc, we’ll write vb.

36 Schematic Symbol for the Reference Node
In schematic diagrams, the symbol identifies the reference node. So if we’ve selected node c in the previous circuit as the reference node, we can redraw the circuit as shown here. (And we no longer label the reference node with a letter.)

37 “Datum Node” and “Ground”
Two other names for the reference node are datum node and ground. “Ground” is a confusing term that is used in several different ways, including “chassis ground” and “earth ground.” Also, there are several different ground symbols, which different authors use in different ways. We’ll always use this one.

38 How to Select the Reference Node?
In many of the textbook’s problems, the authors have already selected a reference node and identified it with the symbol. If not, you should select the node connected to the most branches as your reference node. This is often the lowest node in the diagram, as in the two cases below.

39 Steps in Performing Nodal Analysis on a Circuit with No Voltage Sources
Given a circuit with n nodes, with no voltage sources, follow these steps: Select a node as the reference node. Assign voltages v1, v2, …, vn-1 to the remaining n-1 nodes. These voltages are relative to the reference node. Apply KCL to each of the n-1 non-reference nodes. Use Ohm’s law to express the branch currents in terms of node voltages. Then simplify the equations. Solve the resulting n-1 simultaneous equations to obtain the unknown node voltages. At our next class we’ll generalize the procedure so that it applies to circuits containing voltage sources as well.

40 Example: Step 1 (Identify the Nodes)
Consider this circuit from the book’s Example 3.1. Step 1 has already been performed for us, since the reference node is identified and the other two nodes are labeled 1 and 2. We’ll call the voltages at these nodes v1 and v2. Do practice question.

41 Example: Step 2 (Apply KCL & Ohm’s Law) Part 1 of 4
Voltages and currents (with assumed directions) are labeled here. If one or more of our assumed current directions are wrong, that’s no problem. The math will still work out just fine. Do practice question 8a.

42 Example: Step 2 (Apply KCL & Ohm’s Law) Part 2 of 4
Apply KCL at node 1: i1 = i2 + i3 Apply KCL at node 2: i2 + i4 = i1 + i5 Note that we already know the values of some currents (i1 and i4), but not of the others. Do practice question 8b.

43 Example: Step 2 (Apply KCL & Ohm’s Law) Part 3 of 4
Trickiest part! Rewrite the KCL equations using Ohm’s law and the known currents. At node 1: i1=i2+i3 becomes 5= 𝑣 1 − 𝑣 𝑣 1 −0 2 At node 2: i2+i4=i1+i5 becomes 𝑣 1 − 𝑣 =5+ 𝑣 2 −0 6 Do practice question 8c.

44 Example: Step 2 (Apply KCL & Ohm’s Law) Part 4 of 4
Second-trickiest part! Next we use algebra to simplify our equations. At node 1: 5= 𝑣 1 − 𝑣 𝑣 1 − becomes 3 𝑣 1 − 𝑣 2 =20 At node 2: 𝑣 1 − 𝑣 =5+ 𝑣 2 −0 6 becomes −3 𝑣 1 +5 𝑣 2 =60 We now have our two equations in two variables. Do practice question 8d.

45 Example: Step 3 (Solve) 3 𝑣 1 − 𝑣 2 =20 −3 𝑣 1 +5 𝑣 2 =60 is
Next we use any of our methods—substitution, Cramer’s rule, matrix inversion, MATLAB—to solve our two equations in two variables. Using MATLAB, the solution to 3 𝑣 1 − 𝑣 2 =20 −3 𝑣 1 +5 𝑣 2 = is v1 = V and v2 = 20 V Do practice question 8e.

46 Example: Extending the Analysis
Nodal analysis has given us the values of the node voltages v1 and v2. We can find all other voltages and currents in the circuit once we know these node voltages. Example: Knowing that v1 = V and v2 = 20 V, how would we find i2? Do practice question 8f.

47 Review: Steps in Performing Nodal Analysis on a Circuit with No Voltage Sources
Given a circuit with n nodes, with no voltage sources, follow these steps: Select a node as the reference node. Assign voltages v1, v2, …, vn-1 to the remaining n-1 nodes. These voltages are relative to the reference node. Apply KCL to each of the n-1 non-reference nodes. Use Ohm’s law to express the branch currents in terms of node voltages. Then simplify the equations. Solve the resulting n-1 simultaneous equations to obtain the unknown node voltages.

48 Online Alternative to MATLAB
WolframAlpha (wolframalpha.com) is a powerful free online math tool. An earlier example using MATLAB: >> A = [3 -4; 2 8] >> B = [7; 26] >> X = inv(A)*B Same example using WolframAlpha: inv({{3, -4},{2, 8}})*{{7},{26}}

49 Free Downloadable Alternative to MATLAB
GNU Octave ( is a free open-source math tool that looks and behaves very much like MATLAB.

50 What About Circuits with Voltage Sources?
As described above, our procedure applies only to circuits without voltage sources. But it’s not hard to extend the procedure to circuits with voltage sources. The way you handle a voltage source depends on whether the source is connected to the reference node….

51 Is the Voltage Source Connected to the Reference Node?
Case 2. Voltage sources not connected to the reference node, like this one, are handled another way. This circuit has both cases, but you might just have one or the other. Case 1. Voltage sources connected to the reference node, like this one, are handled one way.

52 Case 1: A Voltage Source That Is Connected to the Reference Node
A voltage source connected to the reference node is easy to handle, because it immediately reveals the voltage at one of the non-reference nodes. Example: In the circuit shown, we can immediately see that v1 = 10 V. Do practice question 9.

53 Case 2: A Voltage Source That Is Not Connected to the Reference Node
A voltage source not connected to the reference node is trickier. To handle it, we treat the voltage source and its two nodes (along with any elements in parallel with the voltage source), as a supernode.

54 How to Handle a Supernode
We apply KCL and KVL to the supernode to get two equations. Example: In the circuit shown, KCL gives i1 + i4 = i2 + i3 And KVL gives v2 = 5 + v3

55 We Still Get Enough Equations
If this circuit did not have a super- node, we would get one equation by applying KCL to node 2 and another by applying KCL to node 3. With the supernode, we get one equation by applying KCL to the supernode and another by applying KVL to the supernode. Do practice question 10.


Download ppt "EGR 2201 Unit 3 Nodal Analysis"

Similar presentations


Ads by Google