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