1 简介
本文基于对四轴飞行器的飞行原理,分析了其做各种飞行动作时的力学原理.在假设理想状态下通过坐标转换建立了动力学模型并进行进一步简化.最后采用增量式PID算法设计控制系统,在Simulink上搭建模型进行仿真,并对仿真结果分析.
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;
-
-
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
3 仿真结果
4 参考文献
[1]黄伟. 四轴飞行器的动态特性及MATLAB仿真[J]. 福建质量管理, 2018, 000(019):298.