Kirchhoff\'s voltage law states that the sum of the voltage around a closed circ
ID: 3810683 • Letter: K
Question
Kirchhoff's voltage law states that the sum of the voltage around a closed circuit is zero. Given the following circuit and using the mesh method we can assign four current values for each mesh resulting in the following set of equations. V_1 - R_1 i_1 - R_3 (i_1 - i_3) - R_2 (i_1 - i_2) = 0 -R_s i_2 - R_2 (i_2 - i_1) - R_4 (i_2 - i_3) - R_3 (i_2 - i_4) = 0 -V_2 - R_6 (i_3 - i_4) - R_4 (i_3 - i_2) - R_3 (i_3 - i_1) = 0 V_3 - R_8 i_4 - R_7 (i_4 - i_2) - R_6 (i_4 - i_3) = 0 a) Rewrite the above equations in matrix form. b) Use MATLAB to solve the system of equations for the four currents using both left division and the rref function. V_1 = 20 V, V_2 =12 V, V_3 = 40 V R_1 = 18 Ohm, R_2 = 10 ohm, R_3 = 16 Ohm R_4 = 6 Ohm, R_5 = 15 Ohm, R_6 = 8 Ohm R_7 = 12 Ohm, R_8 = 14 OhmExplanation / Answer
V1 - R1* (i1-i3)-R2*(i1-i2)=0
-R5i2-R2(i2-i1)-R4(i2-i3)-R7(i2-i4)=0
-V2-R6(i3-i4)-R4(i3-i2)-R3(i3-i1)=0
V3-R8i4-R7(i4-i2)-R6(i4-i3)=0
V1= 20, V2=12, V3=40 V
R1..R8 = 18,10,16,
6,15, 8,
12,14
Above equations can be written as
V1 - R1* (i1-i3)-R2*(i1-i2)=0
V1-R1i1+R1i3-R2i1+R2i2=0
(R1+R2)i1-R1i3-R2i2=V1
28i1-10i2-18i3=20
-R5i2-R2(i2-i1)-R4(i2-i3)-R7(i2-i4)=0
-R5i2-R2i2+R2i1-R4i2+R4i3-R7i2+R7i4=0
R2i1-(R2+R4+R5+R7)i2+R4i3+R7i4=0
10i1-43i2+6i3+12i4=0
-V2-R6(i3-i4)-R4(i3-i2)-R3(i3-i1)=0
-V2-R6i3+R6i4-R4i3+R4i2-R3i3+R3i1=0
R3i1+R4i2-(R3+R4+R6)i3+R6i4=V2
16i1+6i2-30i3+8i4=12
V3-R8i4-R7(i4-i2)-R6(i4-i3)=0
V3-R8i4-R7i4+R7i2-R6i4+R6i3=0
R8i4+R7i4-R7i2+R6i4-R6i3=V3
-R7i2-R6i3+(R6+R7+R8)i4=V3
0i1-12i2-8i3+34i4=40
28i1-10i2-18i3+0i4=20
10i1-43i2+6i3+12i4=0
16i1+6i2-30i3+8i4=12
0i1-12i2-8i3+34i4=40
Now it is in AX= B form
Let's write A and B matrices
A=
28 -10 -18 0
10 -43 6 12
16 6 -30 8
0 -12 -8 34
B=
20
0
12
40
MatLab Code:
A = [28 -10 -18 0; 10 -43 6 12; 16 6 -30 8;0 -12 -8 34]
B= [20; 0; 12; 40]
X = linsolve(A,B)
Output:
A =
28 -10 -18 0
10 -43 6 12
16 6 -30 8
0 -12 -8 34
B =
20
0
12
40
X =
2.1490
1.2664
1.5282
1.9830
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.