This preview shows pages 1–6. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Attia, John Okyere. “DC Analysis.” Electronics and Circuit Analysis using MATLAB. Ed. John Okyere Attia Boca Raton: CRC Press LLC, 1999 © 1999 by CRC PRESS LLC CHAPTER FOUR DC ANALYSIS 4.1 NODAL ANALYSIS Kirchhoff’s current law states that for any electrical circuit, the algebraic sum of all the currents at any node in the circuit equals zero. In nodal analysis, if there are n nodes in a circuit, and we select a reference node, the other nodes can be numbered from V 1 through V n1 . With one node selected as the refer ence node, there will be n1 independent equations. If we assume that the ad mittance between nodes i and j is given as Y ij , we can write the nodal equa tions: Y 11 V 1 + Y 12 V 2 + … + Y 1m V m = ∑ I 1 Y 21 V 1 + Y 22 V 2 + … + Y 2m V m = ∑ I 2 Y m1 V 1 + Y m2 V 2 + … + Y mm V m = ∑ I m ( 4 . 1 ) where m = n  1 V 1 , V 2 and V m are voltages from nodes 1, 2 and so on ..., n with re spect to the reference node. ∑ I x is the algebraic sum of current sources at node x. Equation (4.1) can be expressed in matrix form as [ ][ ] [ ] Y V I = ( 4 . 2 ) The solution of the above equation is [ ] [ ] [ ] V Y I = − 1 ( 4 . 3 ) where © 1999 CRC Press LLC © 1999 CRC Press LLC [ ] Y − 1 is an inverse of [ ] Y . In MATLAB, we can compute [V] by using the command V inv Y I = ( ) * ( 4 . 4 ) where inv Y ( ) is the inverse of matrix Y The matrix left and right divisions can also be used to obtain the nodal volt ages. The following MATLAB commands can be used to find the matrix [V] V I Y = ( 4 . 5 ) or V Y I = \ ( 4 . 6 ) The solutions obtained from Equations (4.4) to (4.6) will be the same, pro vided the system is not illconditioned. The following two examples illustrate the use of MATLAB for solving nodal voltages of electrical circuits. Example 4.1 For the circuit shown below, find the nodal voltages V V 1 2 , and V 3 . 5 A 2 A 50 Ohms 40 Ohms 10 Ohms 20 Ohms V V V 1 2 3 Figure 4.1 Circuit with Nodal Voltages © 1999 CRC Press LLC © 1999 CRC Press LLC Solution Using KCL and assuming that the currents leaving a node are positive, we have For node 1, V V V V 1 2 1 3 10 20 5 − + − − = i.e., 015 01 0 05 5 1 2 3 . . . V V V − − = (4.7) At node 2, V V V V V 2 1 2 2 3 10 50 40 − + + − = i.e., − + − = 01 0145 0025 1 2 3 . . . V V V (4.8) At node 3, V V V V 3 1 3 2 20 40 2 − + − − = i.e., − − + = 005 0 025 0 075 2 1 2 3 . . . V V V (4.9) In matrix form, we have 015 01 0 05 01 0145 0 025 0 05 0 025 0 075 5 2 1 2 3 . . . . . . . . . − − − − − − = V V V (4.10) The MATLAB program for solving the nodal voltages is MATLAB Script diary ex4_1.dat % program computes the nodal voltages © 1999 CRC Press LLC © 1999 CRC Press LLC % given the admittance matrix Y and current vector I % Y is the admittance matrix and I is the current vector % initialize matrix y and vector I using YV=I form...
View
Full
Document
 Spring '09
 Oğuzkucur

Click to edit the document details