Hi, I am trying to make a program that solves power electronics equations for me to save a lot of time. Anyways, I have equations containing trigonometric functions and when I'm solving them, I get the message that MATLAB cannot find an explicit solution. I'm guessing it's because there are multiple answers (maybe infinite) to my equation, but as a matter of fact, I only need the first answer after 0. I already assumed t > 0 and now I would like to have the nearest positive solution to 0 possible. A sample of my code is below in which vGS, iD and vD are all functions of t and the rest are constants.
if true % syms t %Temps
assume (t > 0)syms vGS(t) %Tension Gate-Source du MOSFET en fonction du temps
syms iD(t) %Courant de Drain du MOSFET en fonction du temps
syms vD(t) %Tension Drain du MOSFET en fonction du temps
syms VDp %Tension de Drain du MOSFET de l'étape précédente
syms IDp %Courant de Drain du MOSFET de l'étape précédente
%
%vGS(t) = (VT+VF)-VF*exp(-t/T3)*(cos(w3*t)+(sin(w3*t)/(w3*T3)));iD(t) = gfs*VF-gfs*VF*exp(-t/T3)*(cos(w3*t)+sin(w3*t)/(w3*T3));vD(t) = V_D-gfs*w3*Ll*VF*exp(-t/T3)*(1+(1/((w3^2)*(T3^2))))*sin(w3*t);solt = double(solve(iD(t) == I0, t));solt1 = double(solve(vD(t) == iD(t)*RDS_ON, t));if(solt < solt1) Time2 = solt; VDp = vD(solt);else Time2 = solt1; IDp = iD(solt1);endend
Best Answer