当前位置 : 主页 > 编程语言 > python >

Matlab模拟四旋翼飞行器PID控制仿真

来源:互联网 收集:自由互联 发布时间:2022-06-18
1 简介 旋翼类无人机相对于固定翼无人机具有能够垂直起降,空中悬停等优点,而四旋翼无人机作为其中一个典型的代表,不仅结构简单还具有良好的带载能力,也易于操控,在军事领域,民用

1 简介

旋翼类无人机相对于固定翼无人机具有能够垂直起降,空中悬停等优点,而四旋翼无人机作为其中一个典型的代表,不仅结构简单还具有良好的带载能力,也易于操控,在军事领域,民用领域,都有着广泛的应用,常见的包括航天拍摄,灾害救援,物资运输等.飞行控制系统是四旋翼飞行器的关键,其中,如何控制飞行器的姿态,是整个飞行控制的核心问题.要保证四旋翼无人机在各种飞行环境下都具有良好的飞行状态,飞行控制算法极为重要.本文借助Matlab/Simulink仿真平台上,使用了PID控制系统对四旋翼无人机进行了仿真.

2 部分代码

%%%%%%%%%%%%%%% desired position %%%%%%%%%%%%%%%%%%%%%%
xdes = 10;
ydes = 18;
zdes = -20;
%%%%%%%%%%%%%%%structural parameters %%%%%%%%%%%%%%%%%%%
m = 0.5;
g = 9.8;
Ixx =0.114;
Iyy = 0.114;
Izz = 0.158;
yaw = 3/57.3;
L = 0.2;
%%%%%%%%%%%%%%%%%% save PID for x %%%%%%%%%%%%%%%%%%%%
kpx = 0.8;
kix = 1e-4;
kdx = 1.3;
%%%%%%%%%%%%%%%%%% save PID for y %%%%%%%%%%%%%%%%%%%%
kpy = 0.8;
kiy = 3e-4;
kdy = 1.3;
%%%%%%%%%%%%%%%%%% save PID for z %%%%%%%%%%%%%%%%%%%%
kpz = 1.2;
kiz = 1e-6;
kdz = 2;
%%%%%%%%%%%%%%%%%% save PD for phi %%%%%%%%%%%%%%%%%%%
kpphi = 2000;
kdphi = 4000;
%%%%%%%%%%%%%%%%%% save PD for theta %%%%%%%%%%%%%%%%%
kptheta = 2000;
kdtheta = 4000;
%%%%%%%%%%%%%%%%%% save PD for psi %%%%%%%%%%%%%%%%%%%
kppsi = 800;
kdpsi = 4000;
%%%%%%%%%%%%%%%%%%% save tsim %%%%%%%%%%%%%%%%%%%%%%%%%%
tsim = 20;

3 仿真结果

Matlab模拟四旋翼飞行器PID控制仿真_控制系统

Matlab模拟四旋翼飞行器PID控制仿真_控制系统_02

4 参考文献

[1]魏家辉, 姜春波, 陈浩,等. 基于Matlab的四旋翼无人机控制仿真[J]. 数码世界, 2018.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

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


Matlab模拟四旋翼飞行器PID控制仿真_matlab代码_03


【转自:美国cn2服务器 http://www.558idc.com/mg.html欢迎留下您的宝贵建议】
网友评论