I'm trying to obtain a the transfer function of a circuit but keep getting "Unable to find explicit solution"

1 次查看(过去 30 天)
I'm trying to solve a group of equations to find the transfer function of a circuit, nontheless I get the banner of "Unable to find explicit solution" and Empty sym: 0-by-1. If I remove the "ReturnConditions=true" then I do get a solution but I'm not sure if it is the correct one. its just that I tried solving a more easy circuit and the "ReturnConditions=true" was necesary in that case.
I planned on solving an even more complex one so I wanted to know if I was doing something wrong.
syms R0 R1 R2 R3 R4 R5 C1 C2 C3 Vin I1 I2 I3 I4 Vout s H
eq1= Vin==I1*R0+I1/(C2*s)-I2/(C2*s)+I1*R3-I3*R3+I1/(C1*s)-I4/(C1*s);
eq2=0==I2*R1+I2/(C3*s)-I4/(C3*s)+I2*R4-I3*R4+I2/(C2*s)-I1/(C2*s);
eq3=0==I3*R3-I1*R3+I3*R4-I2*R4+I3*R5-I4*R5;
eq4=0==I4*R2+I4/(C1*s)-I1/(C1*s)+I4*R5-I3*R5+I4/(C3*s)-I2/(C3*s);
eq5=Vout==I4*R2;
eq6=H==Vout/Vin;
result=solve([eq1,eq2,eq3,eq4,eq5,eq6],[Vin,I1,I2,I3,I4,Vout,H],ReturnConditions=true);
H=collect(result.H,s)
  1 个评论
Anders
Anders 2024-8-27
I faced a similar issue while solving circuit equations in MATLAB. Removing the "ReturnConditions=true" helped, but I wasn't sure if the solution was accurate. For more complex circuits, MATLAB's solver sometimes struggles with explicit solutions. When seeking help with MATLAB assignments, I reached out to www.matlabassignmentexperts.com. Their team provided quick and precise guidance that resolved the problem efficiently. If you're dealing with MATLAB-related challenges, I highly recommend their services. You can contact them via WhatsApp at +1 (315) 557-6473 or email at info@matlabassignmentexperts.com. They’re reliable and offer great support for any MATLAB assignment difficulties.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2024-8-27
编辑:Walter Roberson 2024-8-27
Under the assumption that all of the R values are greater than 0, and all of the C values are greater than 0, and s is greater than zero, then you can demonstrate that the back-substitutions are always true -- the sum of strictly positive values must be greater than 0.
If, however, any of your C values are zero, or s is zero, then you have division by 0 in your equations, and that becomes unsolvable.
syms R0 R1 R2 R3 R4 R5 C1 C2 C3 Vin I1 I2 I3 I4 Vout s H
assume(C1 > 0)
assume(C2 > 0)
assume(C3 > 0)
assume(R1 > 0)
assume(R2 > 0)
assume(R3 > 0)
assume(s > 0)
eq1 = Vin == I1*R0+I1/(C2*s)-I2/(C2*s)+I1*R3-I3*R3+I1/(C1*s)-I4/(C1*s);
eq2 = 0 == I2*R1+I2/(C3*s)-I4/(C3*s)+I2*R4-I3*R4+I2/(C2*s)-I1/(C2*s);
eq3 = 0 == I3*R3-I1*R3+I3*R4-I2*R4+I3*R5-I4*R5;
eq4 = 0 == I4*R2+I4/(C1*s)-I1/(C1*s)+I4*R5-I3*R5+I4/(C3*s)-I2/(C3*s);
eq5 = Vout == I4*R2;
eq6 = H == Vout/Vin;
result = solve([eq1,eq2,eq3,eq4,eq5,eq6],[Vin,I1,I2,I3,I4,Vout,H],ReturnConditions=false);
H = collect(result.H,s)
H = 
backsubs = subs([eq1,eq2,eq3,eq4,eq5,eq6], result)
backsubs = 
simplify(backsubs(1))
ans = 
simplify(backsubs(2))
ans = 
simplify(backsubs(3))
ans = 

更多回答(1 个)

Piyush Kumar
Piyush Kumar 2024-8-27
The solve function can provide complete information about all solutions of an equation. It can also provide information under which conditions these solutions are valid. To obtain this information, we set the option ReturnConditions to true. Check this link that describes how to "Solve Parametric Equations in ReturnConditions Mode".
"If I remove the "ReturnConditions=true" then I do get a solution but I'm not sure if it is the correct one....." - I think the option should not affect the output of solve function.
To verify the solution, substitute the solution into the equation using subs. The same link has some examples. You can check them too.

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by