# Drone-Trajectory-and-Path-Planning-Simulation
<i>This project is part of Coursework for COMP0128-Robotic Control Theory and Systems at University College London. Copyrights under [Dr. Francisco Vasconcelos](https://www.ucl.ac.uk/surgical-robot-vision/francisco-vasconcelos)</i>
<br>
![image](https://github.com/Sk4587/Drone-Trajectory-and-Path-Planning-Simulation/assets/46374770/174e3595-d43a-48c9-bb40-6f2b55240289)
To run the code, in Matlab command window run
```sh
Sim_Quadcopter3
```
### Task
Implement a simulation of a quadcopter, following the non-linear model in [Quadcopter Dynamics Simulation and Control](https://andrew.gibiansky.com/blog/physics/quadcopter-dynamics/)
Assume the entire state of the quadcopter can be measured by sensors with 100% accuracy. Also, assume that the input ϒi to each propeller is limited to +/-1.5. Using the quadcopter simulator from question 1, implement a full-state feedback controller that makes the drone perform the following trajectory:
1. Starts at (0,0,0)
1. Moves up to (0,0,5)
1. Stays at (0,0,5) for 5 seconds.
1. Moves to (0,2.5,5)
1. Moves along a circular trajectory with radius 2.5 on a vertical plane with constant x=0, passing through the points (0,0,7.5), (0,-2.5,5), (0,0,2.5) and back to (0,2.5,5).
1. Moves to (2.5,2.5,2.5)
1. Lands at (2.5,2.5,0) safely by moving down at a constant speed of 0.1 m/s.
More details about the task are given [here](https://github.com/Sk4587/Drone-Trajectory-and-Path-Planning-Simulation/blob/main/QuadcopterCoursework.pdf)
### Approach
To implement the full-state feedback system, I first checked the reachability of the discretised A and B matrices I got from Question 1 using the MATLAB ‘ctrb’ function. The system is fully reachable.
<br>
I used the pole placement method to design the controller to get the feedback K matrix. The Eigenvalues are chosen such that the eigenvalues corresponding to the Quadcopter’s position and angular orientation are closer to 1 (dominant poles), and all the other values are around 0.8.
<br>
The fsf controller is based on the linear approximation of the system. The new input corresponding to the reference is given as
<br>
$$u= -fsf_k*(current state-reference state) +u0$$
<br>
This input is then given to the non-linear model, and the input is accounted for the deviation of equilibrium u0.
<br>
The drone will follow the required trajectory by updating the reference state at each point.
<br>
I use a slightly higher threshold at the circular trajectory to get a smoother and faster curve.
<br>
<br>
To land the drone safely from (2.5,2.5,2.5) to (2.5,2.5,0) at a constant speed of 0.1, I updated the reference state as (2.5,2.5, Current Z position -0.11, 0,0,-0.11, zeros(6)) so that the reference is updated smoothly, thereby controlling the velocity.
![image](https://github.com/Sk4587/Drone-Trajectory-and-Path-Planning-Simulation/assets/46374770/96bd8289-22b0-4eae-ab6d-09c8e533c454)
没有合适的资源?快使用搜索试试~ 我知道了~
无人机轨迹与路径规划matlab仿真.zip
共7个文件
m:2个
png:2个
md:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 91 浏览量
2024-02-13
16:24:25
上传
评论
收藏 2.12MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a,内含运行结果,不会运行可私信 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
无人机轨迹与路径规划matlab仿真.zip (7个子文件)
无人机轨迹与路径规划matlab仿真
Drone-Trajectory-and-Path-Planning-Simulation-main
3.png 49KB
Sim_Quadcopter3.m 5KB
Quadcopter3.m 12KB
QuadcopterCoursework.pdf 242KB
drone1.mat 1.84MB
README.md 3KB
2.png 18KB
共 7 条
- 1
资源评论
- weixin_530025222024-05-11非常有用的资源,可以直接使用,对我很有用,果断支持!
Matlab科研辅导帮
- 粉丝: 2w+
- 资源: 7553
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功