【无人水面舰艇】使用模型预测控制对 USV 进行自主控制(Matlab实现)

“在代码的海洋里,有无尽的知识等待你去发现。我就是那艘领航的船,带你乘风破浪,驶向代码的彼岸。

 💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现

💥1 概述

无人水面舰艇(Unmanned Surface Vehicles, USVs)在海洋研究、环境保护、安全巡逻和军事侦察等领域展现出巨大的应用潜力。为了实现高效、精确的自主导航,模型预测控制(Model Predictive Control, MPC)成为一种极具吸引力的控制策略。MPC 通过预测未来的系统行为,优化当前的控制输入,以达到既定的控制目标,同时考虑系统的约束条件,如最大速度、转向角限制等。MPC 是一种基于模型的控制方法,它在每个采样时刻,基于当前状态和预测模型,求解一个有限时间内的优化问题,以确定未来一段时间内的控制序列。该序列的第一个元素被应用于系统,随后状态更新,优化过程在下一采样时刻重复。MPC 的核心优势在于能够直接处理系统约束,同时优化长期性能,这使得它特别适合于 USV 的自主控制,因为 USV 需要在遵守操作边界的同时,执行复杂的任务。使用模型预测控制对 USV 进行自主控制,为实现复杂任务规划和执行提供了强大的工具。通过整合先进的预测模型和优化算法,MPC 能够使 USV 在面对动态环境和约束条件时,展现卓越的自主导航能力和任务执行效率。随着控制理论、传感器技术和计算能力的不断进步,MPC 在 USV 控制领域的应用将变得更加成熟和广泛。

📚2 运行结果

主函数部分代码:

%Clean the workspace and close the open figures
clear
close all

%Boat and simulation parameters
m = 37;         %Mass of the boat
D = 0.7;        %Distance between the motors and the center of mass
I = 0.1;        %Moment of inertia      (arbitrary value, should be identified)
k = 0.1;        %Viscosity coefficient  (arbitrary value, should be identified)
ky = 0.1;       %Viscosity coefficient on the y axis (arbitrary value, should be identified)
Tfinal = 150;   %Total simulation time
Te = 0.1;       %Sampling period

%Vectors used to hold simulation data
x = zeros(9, ceil(Tfinal/Te));          %State vector
u = zeros(2, ceil(Tfinal/Te));          %Input vector
delta_u = zeros(2, ceil(Tfinal/Te));    %Input increment vector
a = zeros(3, ceil(Tfinal/Te));          %State vector
a_ref = zeros(1, ceil(Tfinal/Te));
i = 1;                                  %Loop index



%Ordered list of waypoints
x_list = [2 4 32 40 25 10 2]';  %X coordinates of the waypoints
y_list = [2 15 17 7 0 -5 2]';   %Y coordinates of the waypoints
a_list = zeros(7,1);            %Angle of the boat between two successive waypoints
current_obj = 2;                %As the boat starts in the first waypoint, the current objective is the next
                                %ie. the second waypoint

%Compute all the angles between two successive waypoints
%The angles returned are between -pi and pi
for j=1:7
   a_list(mod(j,7)+1,1) = angle(complex(x_list(mod(j,7)+1)-x_list(j), y_list(mod(j,7)+1)-y_list(j)));
   
   if a_list(j,1) < 0
      a_list(j,1) = a_list(j,1);
   end
end

%Objectives list containing X,Y and Theta coordinates
r_list = [x_list y_list a_list];
nb_obj = size(r_list,1);                %Number of objectives

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

[1]肖咏昕,向先波,孔典,等.面向无人艇对接回收的STag标记视觉导引技术[J/OL].中国舰船研究:1-9[2024-07-18].https://doi.org/10.19693/j.issn.1673-3185.03549.

[2]葛泉波,薛子建,张明川,等.基于VMD-WHHO-BLS的无人船位姿预测[J/OL].控制理论与应用:1-13[2024-07-18].http://kns.cnki.net/kcms/detail/44.1240.TP.20240607.1013.034.html.

🌈4 Matlab代码实现

图片

  • 24
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值