The electrical circuit shown consists of resistors and volta
Solution
Equations:
1st loop:
-i5R10 + V1 - i5R4 + i2R4 - i5R8 + i4R8 = 0
i2(-R1) + i4(-R8) + i5(R4+R8+R10) = V1 --- (1)
2nd loop:
-i1R1 -i1R3 + i3R3 - i2R2 + i2R5 - V1 = 0
V1 = i1(-R1-R2-R3) + i3R3 + i2R5
3rd loop:
-i2R2 + i1R2 - i2R5 + i3R5 - i2R6 + i4R6 - i2R4 + i5R4 = 0
i2(-R2-R5-R6-R4) + i1R2 + 13R5 + i5R4 + i4R6 = 0 --(3)
4th loop:
i1R3 + i3(-R3-R7-R5) + i4R7 + i2R5 = V2 --(4)
Overall loop:
i1(-R1) + i4(-R9) + i5(-R10) = V2 - V3
Using these equations, and values from above, using the following matlab code:
%entering r coefficients using above equations
r = [0 -14 0 -15 33;
-46 8 10 0 0;
20 -58 8 16 14;
10 8 -28 10 0;
-16 0 0 -6 -4];
%constant coefficients
V = [40, 40, 0, 30, -6]\';
% i =inverse(r)*V
i = r\\V;
display(\'Values of currents:\')
I1=i(1)
I2=i(2)
I3=i(3)
I4=i(4)
I5=i(5)
