基于matlab的庞特里亚金最小值(PMP)代码
基于matlab的庞特里亚金最小值(PMP)代码clear all% State equationssyms x1 x2 p1 p2 u;Dx1 = x2;Dx2 = -x2 + u;% Cost function inside the integralsyms g;g = 0.5*u^2;% Hamiltoniansyms p1 p2 H;H = g + p1*Dx1 + p2*Dx2;% Costate equationsDp1 = -diff(H,x1);Dp2 = -
原创
2021-10-11 15:41:56 ·
2540 阅读 ·
4 评论