Write three linear simultaneous equations, one from each loop
Show older comments
Hello, I need help with this particular problem
Write three linear simultaneous equations, one from each loop and then solve for i1, i2 and i3 using methods we used in problem 1. Develop a Solution and upload the code. Take R1= 500 ohms, R2=1 Kohms (1000 ohms), R3= 1.2 Kohms, R4= 2.5 kohms, R5=1.5 kohms. V1 = 50 V. Hint: Following the lower left-hand loop results in our first equation: -V1 + R2 (i1-i2) + R4 (i1-i3) = 0 Following the upper loop results in our second equation: Ri2 + R3 (i2-i3) + R2 (i2- i1)= 0
Finally, following the lower right-hand loop results in the last equation: R3 (i3- i2) + R5i3 + R4 (i3- i1) = 0 Since we know all the resistances (the R values) and the voltage, we have three equations and three unknowns. Now we need to rearrange the equations so that they are in a form to which we can apply a matrix solution. In other words, we need to isolate the i’s Develop a MATLAB® Solution The MATLAB® code
This is my attempt but it says Unrecognized function or variable 'i1'
R1=500;R2=1000;R3=1200;R4=2500;R5=1500;
V1=50
-V1 + R2 (i1-i2) + R4 (i1-i3) == 0;
Ri2 + R3 (i2-i3) + R2 (i2- i1) = 0;
2 Comments
Catalytic
on 2 May 2022
The message is right. It is undefined. Also, you only have 2 equations. The assignment asks you to develop 3.
Guadalupe Perea
on 2 May 2022
Answers (2)
Matt J
on 3 May 2022
syms i1 i2 i3
eqn1 = -V1 + R2 (i1-i2) + R4 (i1-i3) == 0;
eqn2 = Ri2 + R3 (i2-i3) + R2 (i2- i1)== 0;
eqn3 = ...
solve([eqn1,eqn2,eqn3])
Image Analyst
on 3 May 2022
Edited: Image Analyst
on 3 May 2022
You need to develop an equation of the form Ax=y, or R*I = V. You know the R, you know the V and the i are the unknowns. So then you can do I = V/R to get the i's (currents).
R1=500;R2=1000;R3=1200;R4=2500;R5=1500;
V1=50
-V1 + R2 (i1-i2) + R4 (i1-i3) = 0;
Ri2 + R3 (i2-i3) + R2 (i2- i1) = 0;
R3 (i3- i2) + R5i3 + R4 (i3- i1) = 0
Now, multiply out everything and regroup/rearrange terms so that for each equation you have something of the form
a11 * i1 + a12 * i2 + a13 * i3 = V1
a21 * i1 + a22 * i2 + a23 * i3 = V2
a31 * i1 + a32 * i2 + a33 * i3 = V3
with the r and i on one side and the V on the other side (hint, two of the V are zero!).
For example it looks like
- a11 (the coefficient of i1 in the first equation) is (R2 + R4) once you multiply everything out,
- a12 is -R2, and
- a13 is -R4.
Construct the other coefficients of the i's for the other 2 equations.
Now construct the A matrix, plugging in the a's that you found:
A = [a11, a12, a13;
a21, a22, a23;
a31, a32, a33];
and
V = [V1; V2; V3]
Then solve for I using I = V/A, or maybe it's I=V\A (I don't recall), to get the least squares solution for I. I will be a 3 element vector with [i1; i2; i3]
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!