Systematic Circuit Analysis (T&R Chap 3) Node-voltage analysis Using the voltages of the each node relative to a ground node, write down a set of consistent linear equations for these voltages Solve this set of equations using, say, Cramer’s Rule Mesh current analysis Using the loop currents in the circuit, write down a set of consistent linear equations for these variables. Solve. This introduces us to procedures for systematically describing circuit variables and solving for them MAE140 Linear Circuits 40 Nodal Analysis Node voltages Pick one node as the ground node Label all other nodes and assign voltages vA, vB, …, vN B vB and currents with each branch i1, …, iM + Recognize that the voltage across a branch v1 v5 + is the difference between the end node + v3 A vA voltages + + Thus v3=vB-vC with the direction v4 v2 as indicated C vC Write down the KCL relations at each node Write down the branch i-v relations to express branch currents in terms of node voltages Accommodate current sources Obtain a set of linear equations for the node voltages MAE140 Linear Circuits 41 Nodal Analysis – Example 3-1 p.72 vA Apply KCL R1 i0 Node A: i0-i1-i2=0 Node B:i1-i3+i5=0 Node C: i2-i4-i5=0 iS1 vB i3=G3vB i4=G4vC i5=iS2 R2 vC i4 i3 R3 Write the element/branch eqns i0=iS0 i1=G1(vA-vB) i2=G2(vA-vC) i5 i1 iS2 i2 R4 Reference node Substitute to get node voltage equations Node A: (G1+G2)vA-G1vB-G2vC=iS1 Node B: -G1vA+(G1+G3)vB=is2 Node C: -G2vA+(G2+G4)vC=-iS2 & G1 +G2 $ 'G1 $ % 'G2 'G1 'G2 #& v A # G1 +G3 0 !$ v B ! = !$ ! 0 G2 +G4 "% vC " & iS 1 # $ iS 2 ! $ 'i ! % S2 " Solve for vA, vB, vC then i0, i1, i2, i3, i4, i5 MAE140 Linear Circuits 42 Systematic Nodal Analysis & G1 +G2 'G1 'G2 #& v A # $ 'G1 G1 +G3 0 !$ v B ! = $ !$ ! ' G 0 G + G % 2 2 4 "% vC " & iS 1 # $ iS 2 ! $ 'i ! % S2 " R1 i0 iS1 vA i5 vB i1 iS2 i2 R2 vC i4 i3 R3 R4 Writing node equations by inspection Reference node Note that the matrix equation looks just like Gv=i for matrix G and vector v and i G is symmetric (and non-negative definite) Diagonal (i,i) elements: sum of all conductances connected to node i Off-diagonal (i,j) elements: -conductance between nodes i and j Right-hand side: current sources entering node i There is no equation for the ground node – the column sums give the conductance to ground MAE140 Linear Circuits 43 Nodal Analysis Example 3-2 p.74 R/2 Node A: Conductances G/2B+2GC=2.5G Source currents entering= iS vA 2R iS vB R/2 2R vC R Node B: Conductances G/2A+G/2C+2Gground=3G Source currents entering= 0 Node C: Conductances 2GA+G/2B+Gground=3.5G Source currents entering= 0 & 2.5G ' 0.5G ' 2G #& v A # & iS # $ !$ ! $ ! 3G ' 0.5G !$ vB ! = $ 0 ! $ ' 0.5G $ ' 2G ' 0.5G 3.5G !$ v ! $ 0 ! % "% C " % " MAE140 Linear Circuits 44 Nodal Analysis – some points to watch 1. The formulation given is based on KCL with the sum of currents leaving the node 0=itotal=GAtoB(vA-vB) +GAtoC(vA-vC)+…+ GAtoGroundvA+ileavingA This yields 0=(GAtoB+…+GAtoGround)vA-GAtoBvB-GAtoCvC…-ienteringA (GAtoB+…+GAtoGround)vA-GAtoBvB-GAtoCvC…=ienteringA 2. If in doubt about the sign of the current source, go back to this basic KCL formulation 3. This formulation works for independent current source For dependent current sources (introduced later) use your wits MAE140 Linear Circuits 45 Nodal Analysis Exercise 3-2 p. 72 2KΩ vA vB + iS1 1KΩ iS2 500Ω vO _ & 1.5 (10 '3 $ $ ' 0.5 (10 '3 % ' 0.5 (10 '3 #!& v A # & iS1 # ! $ !=$ '3 ! v 2.5 (10 "% B " % ' iS 2 " Solve this using standard linear equation solvers Cramer’s rule Gaussian elimination Matlab MAE140 Linear Circuits 46 Nodal Analysis with Voltage Sources Current through voltage source is not computable from voltage across it. We need some tricks! They actually help us simplify things Method 1 – source transformation vA RS vA Rest of the circuit + _ vS vB ! vS RS Rest of the circuit RS vB Then use standard nodal analysis – one less node! MAE140 Linear Circuits 47 Nodal Analysis with Voltage Sources 2 Method 2 – grounding one node vA + _ vS vB Rest of the circuit This removes the vB variable – simpler analysis But can be done once per circuit MAE140 Linear Circuits 48 Nodal Analysis with Voltage Sources 3 supernode Method 3 Create a supernode Act as if A and B were one node KCL still works for this node Sum of currents entering supernode box is 0 Write KCL at all N-3 other nodes N-2 nodes less Ground node using vA and vB as usual Write one supernode KCL Add the constraint vA-vB=vS vA + _ vS vB Rest of the circuit These three methods allow us to deal with all cases MAE140 Linear Circuits 49 Nodal Analysis Example 3-4 p. 76 R1 +_ v S1 vA R2 + v0 _ R3 vS2 +_ ! vS 1 R1 R1 vS 2 R2 + R2 R3 v0 _ This is method 1 – transform the voltage sources Applicable since voltage sources appear in series with Rs Now use nodal analysis with one node, A (G1 + G2 + G3 )v A = G1vS1 + G2vS 2 G1vS1 + G2vS 2 vA = G1 + G2 + G3 MAE140 Linear Circuits 50 Nodal Analysis Example 3-5 p. 77 iin R/2 Rin vA 2R _ vS + vB R/2 2R vC What is the circuit input resistance viewed through vS? R v A = vS !0.5Gv A +3GvB !0.5GvC =0 ! 2Gv A ! 0.5Gv B + 3.5vC = 0 Rewrite in terms of vS, vB, vC This is method 2 2.75vS 6.25vS , vC = 10.25 10.25 v !v v !v 11.75vS iin = S B + S C = 2R R / 2 10.25 R 10.25 R Rin = = 0.872 R 11.75 3Gv B − 0.5GvC = 0.5Gv S − 0.5Gv + 3.5Gv = 2Gv B C S vB = Solve MAE140 Linear Circuits 51 Nodal Analysis Example 3-6 p. 78 vA i2 i1 R2 R1 supernode + vB _ vS1 i3 v C i4 R3 + + vO _ vS2 R4 reference Method 3 – supernodes KCL for supernode: i1 + i2 + i3 + i4 = 0 Or, using element equations G1v A + G2 (v A ! v B ) + G3 (vC ! v B ) + G4 vC = 0 Now use v B = vS 2 (G1 + G3 )v A + (G3 + G4 )vC = (G2 + G3 )v S 2 Other constituent relation MAE140 Linear Circuits v A ! vC = v S1 Two equations in two unknowns 52 Summary of Nodal Analysis 1. Simplify the cct by combining elements in series or parallel 2. Select as reference node the one with most voltage sources connected 3. Label node voltages and supernode voltages – do not label the nodes directly connected to the reference 4. Use KCL to write node equations. Express element currents in terms of node voltages and ICSs 5. Write expressions relating node voltages and IVSs 6. Substitute from Step 5 into equations from Step 4 Write the equations in standard form 7. Solve using Cramer, gaussian elimination or matlab MAE140 Linear Circuits 53 Solving sets of linear equations & 5 ' 2 ' 3 #& x1 # & 4 # $ !$ ! $ ! $ ' 5 7 ' 2 !$ x2 ! = $ ' 10 ! $ ' 3 ' 3 8 !$ x ! $ 6 ! % "% 3 " % " Cramer’s Rule Thomas & Rosa Appendix B pp. A-2 to A-11 5 ! 2 !3 7 !2 ! 2 !3 ! 2 !3 # = !5 7 ! 2 = 5 ! ( !5) + ( !3) !3 8 !3 8 7 !2 !3 !3 8 =5( 7"8!( !3)"( !2) )+5( ( !2)"8!( !3)"( !3) )!3( ( !2)"( !2) !7"( !3) ) = 250 ! 125 ! 75 = 50 4 ! 2 !3 7 !2 ! 2 !3 ! 2 !3 #1 = !10 7 ! 2 = 4 ! ( !10) +6 !3 8 !3 8 7 !2 6 !3 8 !1 100 x1 = = =2 ! 50 = 4( 7"8!( !3)"( !2) )+10( ( !2)"8!( !3)"( !3) )+ 6( ( !2)"( !2) !7"( !3) ) = 200 ! 250 + 150 = 100 MAE140 Linear Circuits 54 Solving sets of linear equations (contd) 5 4 !3 !10 ! 2 4 !3 4 !3 " 2 = !5 !10 ! 2 = 5 ! ( !5) + ( !3) 6 8 6 8 !10 ! 2 !3 6 8 = !340 + 250 +114 = 24 5 !2 ! 24 x2 = 2 = =0.48 ! 50 4 7 !10 !2 4 !2 4 " 3 = !5 7 !10 = 5 ! ( !5) + ( !3) !3 6 !3 6 7 !10 !3 !3 6 =60 !0 + 24 =84 !3 84 x3 = = = 1.68 ! 50 Notes: This Cramer is not as much fun as Cosmo Kramer in Seinfeld I do not know of any tricks for symmetric matrices MAE140 Linear Circuits 55 Solving Linear Equations – gaussian elimination & 5 '2 '3 #& x1 # & 4 # $ '5 7 '2 !$ x2 !=$ '10 ! $ '3 % '3 8 !$ x ! $ "% 3 " % row2+row1 row3+row1×3/5 & # $ 5 ' 2 '3 4 ! $ 0 5 '5 ' 6 ! $ ' 21 31 42 ! $0 ! % 5 5 5" row3÷10 & # $ 5 ' 2 '3 4 ! $ 0 5 '5 ' 6 ! $ 84 ! $0 0 1 ! % 50 " MAE140 Linear Circuits 6 Augment matrix ! " & 5 ' 2 '3 4 # $ ! $ '5 7 ' 2 '10 ! $ '3 '3 8 6 !" % row3×5 & 5 ' 2 '3 4 # $ ! $ 0 5 '5 ' 6 ! $ 0 ' 21 31 42 ! % " Row operations only row3+row2×21/5 & # $ 5 ' 2 '3 4 ! $ 0 5 '5 ' 6 ! $ 84 ! $ 0 0 10 ! % 5" (row2+row3×5) ÷5 (row1+row2 ×2 + row3×3) ÷5 & # 4 ! $ 5 ' 2 '3 $ 0 1 0 24 ! 50 ! $ $ 0 0 1 84 ! % 50 " & 100 # $1 0 0 50 ! $ 0 1 0 24 ! 50 ! $ $ 0 0 1 84 ! % 50 " 56 Solving Linear Equations - matlab A=[5 –2 –3; -5 7 –2; -3 –3 8] A = 5 –2 –3 -5 7 –2 -3 –3 8 inv(A)*B ans = 2.0000 0.4800 1.6800 B=[4;-10;6] A\B B = 4 -10 6 ans = 2.0000 0.4800 1.6800 inv(A) ans = 1.0000 0.9200 0.7200 0.5000 0.6200 0.4200 MAE140 Linear Circuits 0.5000 0.5000 0.5000 57 Mesh Current Analysis Dual of Nodal Voltage Analysis with KCL Mesh Current Analysis with KVL Mesh = loop enclosing no elements Restricted to Planar Ccts – no crossovers (unless you are really clever) Key Idea: If element K is contained in both mesh i and mesh j then its current is ik=ii-ij where we have taken the reference directions as appropriate Same old tricks you already know R1 + v1 + + v3 v0 + vS1 - iA - R2 + v2 R3 iB - + v4 + vS2 - - Mesh A: v0-v1-v3=0 Mesh B: v3-v2-v4=0 (R1+R3)iA-R3iB=vS1 -R3iA+(R2+R3)iB=-vS2 MAE140 Linear Circuits v1=R1iA v2=R2iB v3=R3(iA-iB) v0=vS1 v4=vS2 & R1 + R3 ' R3 #& i A # = & vS1 # $ 'R !$ i ! $ 'v ! R + R % 3 2 3 "% B " % S 2 " 58 Mesh Analysis by inspection Ri = vS Matrix of Resistances R Diagonal ii elements: sum of resistances around loop Off-diagonal ij elements: - resistance shared by loops i and j Vector of currents i As defined by you on your mesh diagram Voltage source vector vS Sum of voltage sources assisting the current in your mesh If this is hard to fathom, go back to the basic KVL to sort these directions out vS1 + iC R2 R3 + vS2 - R1 iA iB MAE140 Linear Circuits + R4 - & R1 + R2 $ $ 0 v0 $ 'R % 2 0 R3 + R4 ' R3 ' R2 #& i A # & ' vS 2 # !$ ! $ ! ' R3 !$ iB ! = $ vS 2 ! R2 + R3 !"$% iC !" $% ' vS1 !" 59 Mesh Equations with Current Sources Duals of tricks for nodal analysis with voltage sources 1. Source transformation to equivalent T&R Example 3-8 p. 91 3KΩ 3KΩ 5KΩ iO 2KΩ 5V + - 4KΩ 2mA 1KΩ & 6000 ' 2000 #& i A # & 5 # $ !$ ! = $ ! % ' 2000 11000 "% iB " % ' 8 " MAE140 Linear Circuits + 5V - 5KΩ iO 2KΩ iA iB 4KΩ + 8V - 1KΩ iA=0.6290 mA iB=-0.6129 mA iO=iA-iB=1.2419 mA 60 Mesh Analysis with ICSs – method 2 Current source belongs to a single mesh 5KΩ 3KΩ iO 5V + - 2KΩ iA 4KΩ iC iB 2mA Same example 1KΩ 6000i A ! 2000iB = 5 ! 2000i A + 11000iB ! 4000iC = 0 iC = !2 mA Same equations! Same solution MAE140 Linear Circuits 61 Mesh Analysis with ICSs – Method 3 Supermeshes – easier than supernodes Current source in more than one mesh and/or not in parallel with a resistance 1. Create a supermesh by eliminating the whole branch involved 2. Resolve the individual currents last Supermesh R1 R2 iB iS2 iS1 iA R 3 iC Excluded branch + vO R4 MAE140 Linear Circuits - R1 (iB !i A ) + R2iB + R4iC + R3 (iC !i A ) =0 i A = iS1 iB !iC =iS 2 62 Summary of Mesh Analysis 1. Check if cct is planar or transformable to planar 2. Identify meshes, mesh currents & supermeshes 3. Simplify the cct where possible by combining elements in series or parallel 4. Write KVL for each mesh 5. Include expressions for ICSs 6. Solve for the mesh currents MAE140 Linear Circuits 63 Linearity & Superposition Linear cct – modeled by linear elements and independent sources Linear functions f(Kx)=Kf(x) Additivity: f(x+y)=f(x)+f(y) Superposition –follows from linearity/additivity Homogeneity: Linear cct response to multiple sources is the sum of the responses to each source 1. “Turn off” all independent sources except one and compute cct variables 2. Repeat for each independent source in turn 3. Total value of all cct variables is the sum of the values from all the individual sources MAE140 Linear Circuits 64 Superposition + Turning off sources vS + _ Voltage source Turned off when i v=0 for all i i v v i + a short circuit i v - Current source Turned off when v i i=0 for all v an open circuit i + iS v v - We have already used this in Thévenin and Norton equiv i i + v MAE140 Linear Circuits - v 65 Where are we now? Finished resistive ccts with ICS and IVS Two analysis techniques – nodal voltage and mesh current Preference depends on simplicity of the case at hand The aim has been to develop generalizable techniques for access to analytical tools like matlab Where to now? Active ccts with resistive elements – transistors, op-amps Life starts to get interesting – design introduced Capacitance and inductance – dynamic ccts Frequency response – s-domain analysis Filters MAE140 Linear Circuits 66