Determine the voltages at the nodes in Fig. 3.5(a).
The circuit in this example has three nonreference nodes, unlike the previous example which has two nonreference nodes. We assign voltages to the three nodes as shown in Fig. 3.5(b) and label the currents.
At node 1,
3 = i_{1} + i_{x} ⇒ 3= \frac{v_{1} – v_{2} }{4} + \frac{v_{1} – v_{2} }{2}
Multiplying by 4 and rearranging terms, we get
3v_{1} – 2v_{2} – v_{3} – 12 (3.2.1)
At node 2,
i_{x} = i_{2} + i_{3} ⇒ \frac{v_{1} – v_{2}}{2} = \frac{v_{2} -v_{3}}{8} + \frac{v_{2} – 0 }{4}
Multiplying by 8 and rearranging terms, we get
-4 v_{1} + 7v_{2} – v_{3} = 0 (3.2.2)
At node 3,
i_{1} + i_{2} =2 i_{x} ⇒ \frac{v_{1} – v_{3}}{2} = \frac{v_{2} -v_{3}}{8} + \frac{2(v_{1} – v_{2} ) }{2}
Multiplying by 8, rearranging terms, and dividing by 3, we get
2v_{1} – 3v_{2} + v_{3} = 0 (3.2.3)
We have three simultaneous equations to solve to get the node voltages v_{1} , v_{2} and v_{3} We shall solve the equations in three ways.
■ METHOD 1 Using the elimination technique, we add Eqs. (3.2.1) and (3.2.3).
5v_{1} – 5v_{2} = 12
or
v_{1} – v_{2} = \frac{12}{5} = 2.4 (3.2.4)
Adding Eqs. (3.2.2) and (3.2.3) gives
-2v_{1} + 4v_{2} = 0 ⇒ v_{1} = 2v_{2} (3.2.5)
Substituting Eq. (3.2.5) into Eq. (3.2.4) yields
2v_{2} – v_{2} = 2.4 ⇒ v_{2} = 2.4 , v_{1} = 2v_{2} = 4.8 V
From Eq. (3.2.3), we get
v_{3} = 3v_{2} – 2v_{1} = 3v_{2} – 4v_{2} = -v_{2} = -2.4 V
Thus,
v_{1} = 4.8 V , v_{2} = 2.4 V , v_{3} = -2.4 V
■ METHOD 2 To use Cramer’s rule, we put Eqs. (3.2.1) to (3.2.3) in matrix form.
\begin{bmatrix} 3 & -2 & -1 \\ -4 & 7 & -1 \\ 2 & -3 & 1 \end{bmatrix} \begin{bmatrix}v_{1} \\ v_{2} \\ v_{3} \end{bmatrix} = \begin{bmatrix} 12 \\ 0 \\ 0 \end{bmatrix} (3.2.6)
From this, we obtain
v_{1} =\frac{Δ_{1}}{Δ} , v_{2} =\frac{Δ_{2}}{Δ} , v_{3} =\frac{Δ_{3}}{Δ}
where Δ, Δ_{1}, Δ_{2} and Δ_{3} are the determinants to be calculated as follows. As explained in Appendix A, to calculate the determinant of a 3 by 3 matrix, we repeat the first two rows and cross multiply.
Δ = \begin {vmatrix} 3 & -2 & -1 \\ -4 & 7 & -1 \\ 2 & -3 & 1 \end {vmatrix} =
=21 – 12 + 4 + 14 – 9 – 8 = 10
Similarly, we obtain
= 84 + 0 + 0 – 0 – 36 – 0 = 48
= 0 + 0 – 24 – 0 – 0 + 48 = 24
= 0 + 144 + 0 – 168 – 0 – 0 = -24
Thus, we find
v_{1}+ = \frac{Δ_{1}}{Δ}= \frac{48}{10} = 4.8 V , v_{2} =\frac{Δ_{2}}{Δ} =\frac{24}{10} = 2.4 V v_{3} = \frac{Δ_{3}}{Δ} = \frac{-24}{10} = -2.4 Vas we obtained with Method 1.
■ METHOD 3 We now use MATLAB to solve the matrix. Equation (3.2.6) can be written as
AV = B ⇒ V = A^{-1} B
where A is the 3 by 3 square matrix, B is the column vector, and V is a column vector comprised of v_{1} , v_{2} and v_{3} that we want to determine. We use MATLAB to determine V as follows:
>> A = [ 3 -2 -1 ; -4 7 -1 ; 2 -3 1] ;
>> B = [12 0 0]' ;
>> V = inv(A) * B
4.8000
V = 2.4000
-2.4000
Thus, v_{1} = 4.8 V, v_{2} = 2.4 V, and v_{3} = -2.4 V, as obtained previously.