Solving Problem of Mesh Analysis On MATLAB
Solving Problem of Mesh Analysis On MATLAB
PROBLEM
The circuit has five resistors R1 = 5, R2 = 100, R3 = 200, R4= 150, R5 = 250(all of the values are in
KΩ) and two voltages v1 = 100, v2 = 50. The current i1, i1, i3, i4, i5 flows in the circuit. Find their
values.
For loop A
KVL ; v1 + v2 + v3 = 0
-v1 + R1i1 + R4i4 = 0
For loop B
KVL; v3 + v4 + v5 = 0
-R4i4 + R2i2 + R5i5 = 0
For loop C
KVL; v5 + v6 + v2 = 0
-R5i5 + R3i3 + v2 = 0
Conservation of charge is
i1 = i2 + i4 1
i2 = i3 + I5 2
NOW KVL of loop A is
R1i1 + R4i4 = -v1 3
From eq 1 we know that
i4 = i1 -i2
put in eq 3
(R1 + R4)i1 – R4i2 = v1 4
Also put the value of i4 in KVL of loop B
-R4 ( i1 -i2 ) + R2i2 + R5 ( i2 – i3 ) = 0
-R4i1 + r4i2 + R2i2 + R5i2 + R5i3 = 0
-R4i1 + ( R4 + R2 + R5 )i2 – R5i3 = 0 5
Now put I5 = i2 – i3 in KVL of loop C
R5i5 – R3i3 = -v2
R5 ( i2 – i3 ) + R3i3 = v2
R5i2 + R5i3 + R3i3 = v2
R5i2 – ( R3 + R5 )i3 = v2 6
SOLUTION
R = [5,100,200,150,250]*1000;
v1 = 100; v2 = 50;
b=[v1; 0; v2];
current = A\b;
1.0e-03 *
0.9544
0.3195
0.0664
CONCLUSION