请教matlab如何求解动态优化问题,急
比如:
max j=p(tf)
s.t:一系列微分方程约束及常规约宿
如下:怎样求解出最优输入u,其中dy(1)表示y1对t得导数,其他同,thanks
um=0.02;
km=0.05;
ki=5;
yx=0.5;
yp=1.2;
v=0.004;
sin=200;
n=um*y(2)/(um+y(2)+y(2)*y(2)/ki);
dy = zeros(4,1); % a column vector
dy(1) = n*y(1)-(u/y(4))*y(1);
dy(2) = -n*y(1)/yx-v*y(1)/yp+(u/y(4))*(sin-y(2));
dy(3)=v*y(1)-(u/y(4))*y(3);
dy(4)=u;