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

news2025/7/9 11:45:49

✅作者简介:热爱科研的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电子书和数学建模资料

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/18261.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Linux安装RabbitMQ步骤分享

1、Erlnag安装 1.1、 安装Erlang版本要求 Erlang安装需要对应各自的版本 RabbitMQ Erlang Version Requirements — RabbitMQ 1.2、 Erlang安装 1、目录准备 cd /usr/local/src/ mkdir rabbitmq cd rabbitmq2、添加仓库地址 为了减少安装的错误 我们使用仓库安装 ,类似于m…

【算法篇-数论】快速幂

快速幂1. 利用快速幂优化的时间复杂度2. 快速幂方法及代码3.总结文章参考自 B站董晓算法 1. 利用快速幂优化的时间复杂度 所谓的快速幂就是快速计算底数的n次幂暴力求幂的话时间复杂度为O(n) 利用快速幂可以做到 时间复杂度为 O(log2n) 2. 快速幂方法…

操作系统4小时速成:I/O管理,spooling脱机技术,设备分配,分配数据结构,IO调度,IO子系统,IO控制方式,IO分类

操作系统4小时速成:I/O管理,spooling脱机技术,设备分配,分配数据结构,IO调度,IO子系统,IO控制方式,IO分类 2022找工作是学历、能力和运气的超强结合体,遇到寒冬&#xf…

一、什么是 MQ

MQ的概念 MQ (Message Queue)消息队列,是在消息传输过程中存储消息的容器。多用于分布式系统之间的通信。 队列是基础数据结构中 “先进先出” 的一种数据结构。 消息对列,指把要传输的数据消息放在队列中,用队列机制…

SpringBoot:速成总结+实战——员工管理系统

这篇文章先是总结SpringBoot,当然我很多源码都没有仔细的去抠,而且这样一个成熟的框架想都不用想就知道源码很复杂,先学框架怎么用。接着就用SpringBoot完成一个较为简单的项目:员工管理系统。 目录端口号被占用怎么办什么是Sprin…

Hadoop总结——Hadoop基础

一、Hadoop是什么 Hadoop是一个由Apache基金会所开发的分布式系统基础架构 主要解决,海量数据的存储和海量数据的分析计算问题 广义上来说,Hadoop通常是指一个更广泛的概念——Hadoop生态圈 二、Hadoop发展历史 1)Lucene--Doug Cutting开…

python中深拷贝和浅拷贝的区别

文章目录值的引用浅拷贝可变数据类型与不可变数据类型不可变数据类型可变数据类型深拷贝深拷贝浅拷贝总结若将需要注释若干行,则将这些行选中,然后按住 ctrl / 键就可以了,再按一次,即可取消多行注释若要批量缩进,那么…

磷脂酰丝氨酸 猪脑(phosphatidylserine,PS)试剂级;丝氨酸磷脂

磷脂酰丝氨酸(phosphatidylserine,PS)又称丝氨酸磷脂,二酰甘油酰磷酸丝氨酸,简称PS,是一类普遍存在的磷脂,通常位于细胞膜的内层,磷酯化合物中的磷酸甘油酯类,是细胞膜组…

QGIS创建要素与属性

QGIS之矢量操作——创建要素与属性 创建要素 打开常用的工具条:View—Toolbar 这样常用的工具条就加载进来了 新建矢量图层,并设置字段等等: 创建属性,选中你的矢量图层,右键选择Toggle_Editing(或者点击…

SpringBoot项目上线运维

文章目录一.高级属性配置1.1 简介1.2 临时属性设置1.3 配置文件的四级分类1.4 自定义配置文件二.多环境开发2.2 多环境开发(yaml版)2.3 多环境开发多文件版(yaml版)2.4 多环境开发(Properties版)2.5 多环境…

这次把怎么做好一个PPT讲清-画图篇

文章目录概述布尔运算PPT幻灯片中如何设置形状对象格式每一个图形既是一个形状,又是一个文本框如何用PPT来实现三维3D效果,附参数设置详解怎么用ppt画三维立体图?**PPT做3D可动样机****PPT做3D[动态图标]****PPT做3D插画**如何使用[PPT绘图]&#xff1f…

图像处理:图像清晰度评价

目录 0、实现效果 1、概述 2、模糊度分类 1、运动模糊 2、压缩模糊 3、高斯模糊 3、清晰度量化指标 Brenner 能量梯度函数(Energy of Gradient) ​编辑 Roberts Laplace SMD(灰度方差)函数 SMD2 (灰度方差乘积)函数 …

JUC学习笔记——并发工具线程池

在本系列内容中我们会对JUC做一个系统的学习,本片将会介绍JUC的并发工具线程池 我们会分为以下几部分进行介绍: 线程池介绍自定义线程池模式之Worker ThreadJDK线程池Tomcat线程池Fork/Join 线程池介绍 我们在这一小节简单介绍一下线程池 线程池简介…

Linux基础教程:9、linux进程管理(2)

前面我们讲到fork创建子进程,那么这一期我们接着讲创建进程之后如何调试以及插入其他进程、特殊进程、和进程如何退出; 同样我们写了一个C语言程序,但是在这个程序中是有两个进程,我们调试的时候只会选择一个进程调试&#xff0c…

了解ixgbe网卡驱动— 驱动注册(纯代码分享)

1 ixgbe 网卡注册驱动 和大部分设备驱动一样,网卡驱动是作为一个 module 注册到 kernel 的 通过 module_init() -> ixgbe_init_module() -> pci_register_driver() 注册 ixgbe_driver 通过 module_exit() -> ixgbe_exit_module() -> pci_unregister_dr…

【仿牛客网笔记】项目进阶,构建安全高效的企业服务——置顶、加精、删除

添加依赖,去掉版本 实现置顶、加精的修改,删除 首先开发数据访问层,因为是对帖子的操作所以无论是置顶、加精最终是要修改帖子,先打开DiscussPostMapper增加修改的操作,一个修改类型,一个修改状态。 打…

[iOS]MonkeyDev安装

MonkeyDev官方安装文档:https://github.com/AloneMonkey/MonkeyDev/wiki/%E5%AE%89%E8%A3%85 1.安装HomeBrew 终端输入指令 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 选择源后安装 更多安装方式可以参…

HTML+CSS+JS大作业:网站设计——家具装修公司(12页 bootstrap, 响应式)

⛵ 源码获取 文末联系 ✈ Web前端开发技术 描述 网页设计题材,DIVCSS 布局制作,HTMLCSS网页设计期末课程大作业 | 公司官网网站 | 企业官网 | 酒店官网 | 等网站的设计与制 | HTML期末大学生网页设计作业,Web大学生网页 HTML:结构 CSS&#…

如何使用VMware12PRO安装Mac OS

VMware安装参考我的这篇文章http://t.csdn.cn/kZ3oh (有VMware安装包) 准备的工具 unlocker链接: https://pan.baidu.com/s/1a1akxL_-JjNu70HJqJORZw?pwd9sjk 提取码: 9sjk Mac OS10.11CDR镜像链接: https://pan.baidu.com/s/1LIz0qFIL0Jg2M83oGqiDW…

RepVGG:让VGG风格的ConvNet再次伟大起来

引言 经典的卷积神经网络(ConvNet)VGG [31]在图像识别中取得了巨大的成功,其简单的架构由conv、ReLU和池化的堆栈组成。随着Inception [33,34,32,19]、ResNet [12]和DenseNet [17]的出现,许多研…