Download presentation
Presentation is loading. Please wait.
1
1 Nodal Analysis Discussion D2.3 September 2006 Chapter 2 Section 2-7
2
2 Nodal Analysis Interested in finding the NODE VOLTAGES, which are taken as the variables to be determined For simplicity we start with circuits containing only current sources
3
3 Nodal Analysis Steps 1.Select one of the n nodes as a reference node (that we define to be zero voltage, or ground). Assign voltages v 1, v 2, … v n-1 to the remaining n-1 nodes. These voltages are referenced with respect to the reference node. 2.Apply KCL to each of the n-1 non-reference nodes. Use Ohm’s law to express the branch currents in terms of the node voltages. 3.Solve the resulting simultaneous equations to obtain the node voltages v 1, v 2, … v n-1.
4
4 Example Select a reference node as ground. Assign voltages v 1, v 2, and v 3 to the remaining 3 nodes.
5
5 Example Apply KCL to each of the 3 non-reference nodes (sum of currents leaving node is zero). Node 1: Node 2: Node 3:
6
6 Example Now express i 1, i 2, …i 5 in terms of v 1, v 2, v 3 (the node voltages). Note that current flows from a higher to a lower potential.
7
7 Node 1: Node 2: Node 3:
8
8 In MATLAB, if then is a row matrix of the five conductances
9
9 Node 1: Node 2: Node 3:
10
10 These three equations can be written in matrix form as
11
11 is an (n –1) x (n –1) symmetric conductance matrix is a 1 x (n-1) vector of node voltages is a vector of currents representing “known” currents
12
12 Writing the Nodal Equations by Inspection The matrix G is symmetric, G kj = G jk and all of the off-diagonal terms are negative or zero. The k i (the i th component of the vector k) = the algebraic sum of the independent currents connected to node i, with currents entering the node taken as positive. The G kj terms are the negative sum of the conductances connected to BOTH node k and node j. The G kk terms are the sum of all conductances connected to node k.
13
13 MATLAB Solution of Nodal Equations
14
14 v1v1 v2v2 v3v3 Test with numbers
15
15 MATLAB Run v1v1 v2v2 v3v3
16
16 PSpice Simulation MATLAB:
17
17 Let's write a general MATLAB program to solve this problem Inputs: Find all voltages and currents
18
18 function nodal1(r,k) % PowerPoint nodal example % Discussion D2.3 % r is a 1 x 5 vector of resistances % k is a 3 x 1 vector of known currents entering the three nodes % nodal1(r,k) % g = 1./ r G = [g(1)+g(2) -g(2) 0; -g(2) g(2)+g(3)+g(4) -g(4); 0 -g(4) g(4)+g(5)] k v = inv(G)*k i(1) = v(1)*g(1); i(2) = (v(1) - v(2))*g(2); i(3) = v(2)*g(3); i(4) = (v(2) - v(3))*g(4); i(5) = v(3)*g(5); i kab = [i(1)+i(2) i(5)-i(4)]
19
19 Do same problem as before nodal1(r,k)
20
20 MATLAB Run
21
21 Nodal Analysis for Circuits Containing Voltage Sources That Can’t be Transformed to Current Sources Case 1. If a voltage source is connected between the reference node and a nonreference node, set the voltage at the nonreference node equal to the voltage of the source. Case 2. If a voltage source is connected between two nonreference nodes, assume temporarily that the current through the voltage source is known and write the equations by inspection.
22
22 Example Assume temporarily that i 2 is known and write the equations by inspection.
23
23 There appears to be 4 unknowns (v 1, v 2, v 3, and i 2 ) and only 3 equations. However, from the circuit or so we can replace v 1 (we could also replace v 2 ) and write
24
24 Writing the above equation with the unknowns (v 2, v 3, i 2 ) on the LHS yields
25
25 v1v1 v2v2 v3v3 Test with numbers Noting that
26
26 v1v1 v2v2 v3v3 Test with numbers Unknowns:
27
27 MATLAB Run V V A v1v1 v2v2 v3v3 v2v2 v3v3 i2i2
28
28 PSpice Simulation MATLAB: v2v2 v3v3 i2i2
29
29 Let's write a general MATLAB program to solve this problem Inputs: Find all voltages and currents
30
30 function nodal2(g,V0,is) % PowerPoint nodal-2 example % Discussion D2.3 % g is a 1 x 4 vector of conductances % V0 = the known dc voltage source % is = the known dc current source % nodal2(g,V0,Is) % G = [g(1) 0 1; g(2)+g(3) -g(3) -1; -g(3) g(3)+g(4) 0] k = [-2+g(1)*V0; 0; is] vvi = inv(G)*k v = zeros(1,3); v(2) = vvi(1); v(3) = vvi(2); v(1) = v(2)-V0; v i(1) = v(1)*g(1); i(2) = vvi(3); i(3) = v(2)*g(2); i(4) = (v(2) - v(3))*g(3); i(5) = v(3)*g(4); i kab = [i(1)+i(2) i(5)-i(4)]
31
31 Do same problem as before nodal2(g,V0,is)
32
32 MATLAB Run
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.