solving more than 3 or more equations

how do you solve 3 or more non linear equations in in matlab? I am working on fractional order PIDs .
can it be done by solve, fsolve?
I have tried by 'solve' operator,but its not giving appropriate results.plz help? Or you can give some alternate methods.
Also note that 'y' is the differentiation of y2 wrt 'w'.
syms kp ki w l c alp T E
A0=1+0.4*(10^(0.5))*cos(0.5*pi/2);
B0=0.4*(10^(0.5))*sin(0.5*pi/2);
A=-ki*10^(-l)*sin(l*pi/2);
B=(kp+ki*10^(-l)*cos(l*pi/2));
p=((A0)^2 +(B0)^2)^-0.5;
c=((A)^2 +(B)^2)^0.5;
y1=p*c;
y2=atan(A/B)-atan(B0/A0);
y=((ki*l*sin((pi*l)/2))/(w^(l + 1)*(kp + (ki*cos((pi*l)/2))/w^l)) - (ki^2*l*cos((pi*l)/2)*sin((pi*l)/2))/(w^(l + 1)*w^l*(kp + (ki*cos((l*pi)/2))/w^l)^2))/((ki^2/w^(2*l)*sin((pi*l)/2)^2)/(kp + (ki*cos((l*pi)/2))/w^l)^2 + 1) - (1/(25*((2^(1/2)*w^(1/2))/5 + 1)^2) - 2^(1/2)/(10*w^(1/2)*((2^(1/2)*w^(1/2))/5 + 1)))/((2*w)/(25*((2^(1/2)*w^(1/2))/5 + 1)^2) + 1);
y3=subs(y,w,10);
[l,ki,kp]=solve(y3==0,y2==-1.92,y1==1,[l,ki,kp])

Antworten (1)

Walter Roberson
Walter Roberson am 11 Nov. 2019

0 Stimmen

Reduce the system to two equations by solving the y2 condition for ki using solve() with returnconditions true (mostly to avoid a warning)
Now take that ki and substitute it into y3 and simplify. Call that e3. The kp variable simplifies away with that kp, leaving e3 as an expression in one variable. If you fplot you can see that it is either periodic or quasi periodic. At even integers it is discontinuous. You can vpasolve e3 specifying various starting points such as 7. If you start too close 0 there will be no solution.
You can now substitute ki and l into y1 and vpasolve, possibly with bounds.
It is plausible that you can proceed in a single vpasolve step by specifying bounds for all three variables, or at least for l, avoiding 0, possibly avoiding crossing even integers.

1 Kommentar

Neelanjan Pal
Neelanjan Pal am 11 Nov. 2019
how is kp vanishing? Can you please write the code for me?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 11 Nov. 2019

Kommentiert:

am 11 Nov. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by