MATLAB: Solving nonlinear system of equations with different variables

electricalequationsMATLABnonlinear

Hello
I would like to solve a nonlinear system of equations. Im new to matlab and therefore i dont have enough experience to get this problem solved by myself.
i have googled around a bit but unfortunately didnt got the hint that i needed. Therefore i write now here in this community.
I hope someone can help me.
Here is my problem:
function F = root2d(x)
F(1) = (R1*(C2+C3) + R2*(C1+C2) + R3*C3*(1-1 / ( R5 / (R4+R5))))-0.24792;
F(2) = (R1*R2*(C1*C2 + C1*C3 +C2*C3)+R1*R3*C2*C3 +R2*R3*(C1+C2)*C3*(1-1 / ( R5 / (R4+R5)) ))-0.7807;
F(3) = (R1*C1*R2*C2*R3*C3)-0.0948;
F(4) = ((R1*C1*R2*C2*R3*C3)/ ( R5 / (R4+R5)) )-0.948;
end
I would like to find solutions for
R1, R2, R3, C1, C2, C3
R4 and R5 are known. R4 is 1 and R5 is 9.
How do i have to solve this system?
I have tried it that way:
fun = @root2d;
x0 = [1,1,1,1];
x = fsolve(fun,x0)
function F = root2d(x)
F(1) = (R1*(C2+C3) + R2*(C1+C2) + R3*C3*(1-1 / ( R5 / (R4+R5))))-0.24792;
F(2) = (R1*R2*(C1*C2 + C1*C3 +C2*C3)+R1*R3*C2*C3 +R2*R3*(C1+C2)*C3*(1-1 / ( R5 / (R4+R5)) ))-0.7807;
F(3) = (R1*C1*R2*C2*R3*C3)-0.0948;
F(4) = ((R1*C1*R2*C2*R3*C3)/ ( R5 / (R4+R5)) )-0.948;
end
but it tells me that it was not able to find any solutions.
Thanks in advance.
Regards

Best Answer

You have 4 equations that you want to solve for 6 variables. There will either be no solutions or an infinite number of solutions.
In your case, there are no solutions.
If you solve the first three equations for R1, R2, R3, you can do that by expressing R2 as the roots of a degree 6 polynomial, and then expressing R1 and R3 in terms of that; for example,
R1 = (4740 - 50000*C1^3*R2^3 + (-100000*C2*R2^3 + 12396*R2^2)*C1^2 + (-50000*C2^2*R2^3 + 12396*C2*R2^2 - 39035*R2)*C1)*`/`(50000*C1*C2^2*R2^2)
However, when you then substitute the R1, R2, R3 solutions into the fourth equation, you get out -316/375 instead of an equation in multiple variables. Your equations are rank deficient and inconsistent.
Related Question