非线性微分代数方程仿真问题
楼主 · 1 楼
实际时间到300s才无解,x(3)到0.5以下,可是我的仿真结果却是2s就结束了,请大家帮忙!
M=[1 0 0 0;0 1 0 0;0 0 0 0;0 0 0 0];options=odeset;options.Mass=M;
x0=[0;0;0.9072006179055;-0.444419209901099];
[t,x]=ode15s(@fun3,[0,300],x0,options);plot(t,x)
function dx=fun3(t,x)
dx=[ -1/60*x(1)+(1-x(3)^2);
-1/60*x(2)+0.3*(1-x(3)^2);
2.11*x(3)*sin(x(4))+(x(1)+x(3)^2);
-2.11*x(3)*cos(x(4))+(x(2)+0.3*x(3)^2)+2*x(3)^2-0.2*x(3)^2];
M=[1 0 0 0;0 1 0 0;0 0 0 0;0 0 0 0];options=odeset;options.Mass=M;
x0=[0;0;0.9072006179055;-0.444419209901099];
[t,x]=ode15s(@fun3,[0,300],x0,options);plot(t,x)
function dx=fun3(t,x)
dx=[ -1/60*x(1)+(1-x(3)^2);
-1/60*x(2)+0.3*(1-x(3)^2);
2.11*x(3)*sin(x(4))+(x(1)+x(3)^2);
-2.11*x(3)*cos(x(4))+(x(2)+0.3*x(3)^2)+2*x(3)^2-0.2*x(3)^2];
2 楼
好