matlab - 使用 fmincon (MATLAB) 和多次拍摄进行优化控制
问题描述
我有一个最优控制问题:
最小化(integral_from_t0_to_T of u^2)
服从:颂歌和边界
颂歌只是一个积分器:
function x_dot = state_dot(u)
% This defines the ODE equations of system
x_dot = [u(1),...
u(2),...
u(3),...
u(4),...
u(5),...
u(6)];
end
我的界限就像颂歌一样简单:
Q1_Min = -10*pi;
Q1_Max = 10*pi;
Q2_Min = deg2rad(-10);
Q2_Max = deg2rad(83);
Q3_Min = 0;
Q3_Max = 10.8-2.5;
Q4_Min = deg2rad(-10);
Q4_Max = deg2rad(170);
Q5_Min = 0;
Q5_Max = 3.4099;
Q6_Min = deg2rad(-60);
Q6_Max = deg2rad(60);
我也有输入的界限:
dQ1_Min = deg2rad(-6.5);
dQ1_Max = deg2rad(6.5); %7.609°/s
dQ2_Min = deg2rad(-2.5);
dQ2_Max = deg2rad(2.5); %3.876°/s
dQ3_Min = -0.25;
dQ3_Max = 0.25; %0.3104m/s
dQ4_Min = deg2rad(-8);
dQ4_Max = deg2rad(8); %9.074°/s
dQ5_Min = -0.2;
dQ5_Max = 0.2; %0.2708m/s
dQ6_Min = -deg2rad(10);
dQ6_Max = deg2rad(10);
我找到了一个多次拍摄的例子,并按照例子作者的方式完成了我的实现。您可以在以下位置查看示例的代码:
问题是, fmincon 总是收敛到一个不可行的点,我不知道为什么。我认为问题在于使用 RK4 进行多重拍摄。但重要的是要获得一个顺利的解决方案。我不知道问题出在哪里。ocp没那么复杂。你真的会帮我解决这个问题。您可以在以下位置查看我的代码:
解决方案
推荐阅读
- r - 我如何不让 R 覆盖其他值
- python - Pandas combine multiple column value
- java - firebase database to Custom list view problem
- reactjs - Axios cancel token outside useEffect
- php - 如何在curl中返回函数
- c# - 在控制器中调用模型
- python - 如何使用selenium在python中捕获所有href链接和循环
- pyspark - sparkmagic 可以在 ipython 之外使用吗?
- c - 使用转义序列将字符串转换为一个
- c# - PostgresSql 连接未通过 C# 在第一次请求时建立