【无人机】基于RRT算法实现四旋翼无人机的安全和最小能量轨迹规划附matlab代码和报告

简介: 【无人机】基于RRT算法实现四旋翼无人机的安全和最小能量轨迹规划附matlab代码和报告

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法  神经网络预测雷达通信 无线传感器

信号处理图像处理路径规划元胞自动机无人机 电力系统

⛄ 内容介绍

The main goal of this work is to find a solution to one of the major limitations that characterizes the Unmanned Aerial Vehicles, namely the reduced flight endurance. In fact, this is typically between 15 and 30 minutes, depending on the model, and different applications were proposed in the literature to alleviate this problem like weight reduction and the improvement of power-to-weight ratio of the brushless DC motors.In this work, this problem linked to the limited power of the UAVs’ batteries is faced proposing a novel algorithm-level solution: a flatness based trajectory planning strategy is proposed for a quadrotor unmanned aerial vehicle. A feasible trajectory is a trajectory that lies inside the admissible state domain and that does not violate the input constraints. If system constraints are not considered, the trajectory may be unfeasible, and the defined mission may not be accomplished.The purpose of this work is to implement a safe and minimum energy trajectory since the energy-optimal paths for a rotorcraft has received much less attention in the aerial robotics literature. The safety concept was developed under two perspectives: the first is about the internal mechanisms of the UAV, in fact the input bounds are realistically interpreted as the actuators limits, because when they are hit the actuators cannot deliver the actuation inputs desired by the controller. The second point of view is about the environment where the UAV has to move: if we consider an empty and unbounded environment, the safety is always accomplished, but if we consider boundaries and obstacles in the environment, then a method to generate a path that does not provide collisions is needed.Indeed, we can define three main objectives for our trajectory planning problem: internal safety, external safety and minimum energy. For these three tasks, we adopted different solutions and then we integrate them in a unique final system able to satisfy all of them. In the next sections, we will show all the steps that lead to the final solution.

⛄ 部分代码

clear

close all


syms tend

tic


%Set start and final point in the usage function which runs the rrt method and returns the path

obstacle = 'no_obstacles.txt';

p = 0.2;


path = RRT(obstacle);


%Test repeated points

dim=size(path);

path_temp=[];

for row=1:dim(1)

   if row ~= dim(1)

       if (norm(path(row,:) - path(row+1,:))) > 2.2

           disp((norm(path(row,:) - path(row+1,:))))

           path_temp = [path_temp ; path(row,:)];

       else

           continue

       end

   else

       path_temp = [path_temp ; path(row,:)];

   end

       

end


path=path_temp;

disp(path)

len_row = size(path);

stringa = ['Total iterations : ', num2str(len_row(1)-1)];

disp(stringa)


%Start optimization process for each section of the path

list_time=[];


%Optimization problem parameters

lb =0.01;

A = [];

b=[];

Aeq= [];

beq=[];

x0 = 2.5;

ub=18;

%Options parameters

options = optimoptions('fmincon','Display','iter','Algorithm','active-set');



%%%%%%%%%%%%%%%%%%%%%%% DEFINE TEST PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%%%%


options.MaxFunctionEvaluations =30;

options.ConstraintTolerance =1e-10;

options.StepTolerance =0;

opt_CT = options.ConstraintTolerance;

opt_ST = options.StepTolerance;

opt_MFE = options.MaxFunctionEvaluations;



%Flag:0 inizio; 1 mezzo; 2 fine

passaggio=0;

fin2=size(path);

fin = fin2(1)-1;

for i=1:(len_row(1)-1)

   switch i

       case 1

           passaggio = 0;

       case (len_row(1)-1)

           passaggio = 2;

       otherwise

           passaggio = 1;

   end

   if (i == 1) && (i ==(fin))

       passaggio = 3;

   end

   disp(['Iteration number :',num2str(i)])

   disp(passaggio)

   init_point2 = path(i,:);

   init_point = [init_point2(1) init_point2(2) init_point2(3) 0];

   final_point2 = path(i+1,:);

   final_point = [final_point2(1) final_point2(2) final_point2(3) 0];

   fun = @(tf) double(Function_obj(tf,init_point,final_point,passaggio));

   nonlcon = @(tf) Function_cond(tf,init_point,final_point,p,passaggio);

   disp('Computing...')

   tf = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options);

   list_time = [ list_time tf];

   disp(list_time)%19.06

end

tempo_ex =toc;

disp(list_time)


%Build the trajectory point by point

Build_trajectory(path,list_time,p,opt_CT,opt_ST,obstacle);

final_energy = 0;

final_time = sum(list_time);


%Compute total time and energy

for w=1:size(path)-1

   switch w

       case 1

           passaggio = 0;

       case size(path)-1

           passaggio = 2;

       otherwise

           passaggio = 1;

   end

   if (w == 1) && (w ==(fin))

       passaggio = 3;

   end

   init_point2 = path(w,:);

   init_point = [init_point2(1) init_point2(2) init_point2(3) 0];

   final_point2 = path(w+1,:);

   final_point = [final_point2(1) final_point2(2) final_point2(3) 0];

   energy = Function_obj(list_time(w),init_point,final_point,passaggio);

   disp(energy)

   final_energy = final_energy + energy;

end

disp(' Time of the optimization execution')

disp(tempo_ex)

disp('Total time of the trajectory')

disp(final_time)

disp('Total energy employeed')

disp(final_energy)

⛄ 运行结果

⛄ 参考文献

Chamseddine, Abbas & Zhang, Youmin & Rabbath, Camille & Join, Cédric & Theilliol, Didier. (2012).

Flatness-Based Trajectory Planning/Replanning for a Quadrotor Unmanned Aerial Vehicle. IEEE

Transactions on Aerospace Electronic Systems. 48. 2832-2848. 10.1109/TAES.2012.6324664.

Sudhakara, Priyanka & Ganapathy, V. & Sundaran, Karthika. (2017).

Optimal trajectory planning

based on bidirectional spline-RRT

for wheeled mobile robot. 10.1109/SSPS.2017.8071566.

Omerdic, Edin & Roberts, Geoff. (2004). Thruster fault diagnosis and accommodation for open

frame underwater vehicles. Control Engineering Practice. 12. 1575-1598.

10.1016/j.conengprac.2003.12.014.

Fabio Morbidi, Roel Cano, David Lara. Minimum-Energy Path Generation for a Quadrotor UAV. IEEE

International Conference on Robotics and Automation, May 2016, Stockholm, Sweden.

Abdilla, Analiza & Richards, Arthur & Burrow, S.G.. (2015). Power and endurance modelling of

battery-powered rotorcraft. 675-680. 10.1109/IROS.2015.7353445.

Jongerden, Marijn & Haverkort, Boudewijn. (2009). Which battery model to use?. IET Software. 3.

445-457.

DuToit Ryan, Holt Matt, Lyle Megan, Biaz Saad. UAV Collision Avoidance Using RRT* and LOS

Maximization Technical Report #CSSE12 – 03.

⛄ Matlab代码关注

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料


相关文章
|
5月前
|
安全
【2023高教社杯】D题 圈养湖羊的空间利用率 问题分析、数学模型及MATLAB代码
本文介绍了2023年高教社杯数学建模竞赛D题的圈养湖羊空间利用率问题,包括问题分析、数学模型建立和MATLAB代码实现,旨在优化养殖场的生产计划和空间利用效率。
259 6
【2023高教社杯】D题 圈养湖羊的空间利用率 问题分析、数学模型及MATLAB代码
|
5月前
|
存储 算法 搜索推荐
【2022年华为杯数学建模】B题 方形件组批优化问题 方案及MATLAB代码实现
本文提供了2022年华为杯数学建模竞赛B题的详细方案和MATLAB代码实现,包括方形件组批优化问题和排样优化问题,以及相关数学模型的建立和求解方法。
153 3
【2022年华为杯数学建模】B题 方形件组批优化问题 方案及MATLAB代码实现
|
5月前
|
数据采集 存储 移动开发
【2023五一杯数学建模】 B题 快递需求分析问题 建模方案及MATLAB实现代码
本文介绍了2023年五一杯数学建模竞赛B题的解题方法,详细阐述了如何通过数学建模和MATLAB编程来分析快递需求、预测运输数量、优化运输成本,并估计固定和非固定需求,提供了完整的建模方案和代码实现。
125 0
【2023五一杯数学建模】 B题 快递需求分析问题 建模方案及MATLAB实现代码
|
6天前
|
算法 数据安全/隐私保护 计算机视觉
基于Retinex算法的图像去雾matlab仿真
本项目展示了基于Retinex算法的图像去雾技术。完整程序运行效果无水印,使用Matlab2022a开发。核心代码包含详细中文注释和操作步骤视频。Retinex理论由Edwin Land提出,旨在分离图像的光照和反射分量,增强图像对比度、颜色和细节,尤其在雾天条件下表现优异,有效解决图像去雾问题。
|
6天前
|
算法 数据可视化 安全
基于DWA优化算法的机器人路径规划matlab仿真
本项目基于DWA优化算法实现机器人路径规划的MATLAB仿真,适用于动态环境下的自主导航。使用MATLAB2022A版本运行,展示路径规划和预测结果。核心代码通过散点图和轨迹图可视化路径点及预测路径。DWA算法通过定义速度空间、采样候选动作并评估其优劣(目标方向性、障碍物距离、速度一致性),实时调整机器人运动参数,确保安全避障并接近目标。
101 68
|
16天前
|
算法 数据安全/隐私保护
室内障碍物射线追踪算法matlab模拟仿真
### 简介 本项目展示了室内障碍物射线追踪算法在无线通信中的应用。通过Matlab 2022a实现,包含完整程序运行效果(无水印),支持增加发射点和室内墙壁设置。核心代码配有详细中文注释及操作视频。该算法基于几何光学原理,模拟信号在复杂室内环境中的传播路径与强度,涵盖场景建模、射线发射、传播及接收点场强计算等步骤,为无线网络规划提供重要依据。
|
28天前
|
机器学习/深度学习 算法
基于改进遗传优化的BP神经网络金融序列预测算法matlab仿真
本项目基于改进遗传优化的BP神经网络进行金融序列预测,使用MATLAB2022A实现。通过对比BP神经网络、遗传优化BP神经网络及改进遗传优化BP神经网络,展示了三者的误差和预测曲线差异。核心程序结合遗传算法(GA)与BP神经网络,利用GA优化BP网络的初始权重和阈值,提高预测精度。GA通过选择、交叉、变异操作迭代优化,防止局部收敛,增强模型对金融市场复杂性和不确定性的适应能力。
168 80
|
17天前
|
机器学习/深度学习 数据采集 算法
基于GA遗传优化的CNN-GRU-SAM网络时间序列回归预测算法matlab仿真
本项目基于MATLAB2022a实现时间序列预测,采用CNN-GRU-SAM网络结构。卷积层提取局部特征,GRU层处理长期依赖,自注意力机制捕捉全局特征。完整代码含中文注释和操作视频,运行效果无水印展示。算法通过数据归一化、种群初始化、适应度计算、个体更新等步骤优化网络参数,最终输出预测结果。适用于金融市场、气象预报等领域。
基于GA遗传优化的CNN-GRU-SAM网络时间序列回归预测算法matlab仿真
|
17天前
|
算法
基于龙格库塔算法的锅炉单相受热管建模与matlab数值仿真
本设计基于龙格库塔算法对锅炉单相受热管进行建模与MATLAB数值仿真,简化为喷水减温器和末级过热器组合,考虑均匀传热及静态烟气处理。使用MATLAB2022A版本运行,展示自编与内置四阶龙格库塔法的精度对比及误差分析。模型涉及热传递和流体动力学原理,适用于优化锅炉效率。
|
15天前
|
移动开发 算法 计算机视觉
基于分块贝叶斯非局部均值优化(OBNLM)的图像去噪算法matlab仿真
本项目基于分块贝叶斯非局部均值优化(OBNLM)算法实现图像去噪,使用MATLAB2022A进行仿真。通过调整块大小和窗口大小等参数,研究其对去噪效果的影响。OBNLM结合了经典NLM算法与贝叶斯统计理论,利用块匹配和概率模型优化相似块的加权融合,提高去噪效率和保真度。实验展示了不同参数设置下的去噪结果,验证了算法的有效性。

热门文章

最新文章