APP下载

基于四元数的四轴飞行器姿态控制

2018-08-21荆学东潘翔

现代电子技术 2018年16期

荆学东 潘翔

摘 要: 为了实现四轴飞行器的姿态控制,建立四轴飞行器四元数运动学方程,给出了四元数微分方程的解析解和數值解,在此基础上求解出欧拉角。四轴飞行器采用串级PID控制算法,以欧拉角作为系统外环,补偿后的角速度作为系统内环。通过Matlab/Simulink仿真,对比单级PID控制效果,验证了算法的可靠性。最后,搭建了飞行器试验平台,在STM32飞控板上编程实现算法。实验证明,该控制系统较单级PID具有响应速度快,超调量小等优点,基本满足室外飞行要求。

关键词: 四轴飞行器; 四元数法; PID控制算法; 串级PID; 姿态控制; 微分方程

中图分类号: TN967.6?34; TP273 文献标识码: A 文章编号: 1004?373X(2018)16?0116?04

Abstract: A quaternion kinematic equation for the quadrotor aircraft is established, the analytical solution and numerical solution of the quaternion differential equation are given, and the Euler angle is solved on this basis, so as to realize attitude control of the quadrotor aircraft. The cascade PID control algorithm is used for the quadrotor aircraft, taking the Euler angle as the outer ring of the system and angular velocity after compensation as the inner ring of the system. The reliability of the algorithm is verified by using the Matlab/Simulink simulation to compare the effects of single?level PID control and cascade PID control. The aircraft test platform is established. The algorithm is implemented by means of programming on the STM32 flight control board. The experimental results show that in comparison with the single?level PID, the control system has the advantages of faster response speed and less overshoot, which can basically meet the requirements of outdoor flight.

Keywords: quadrotor aircraft; quaternion method; PID control algorithm; cascade PID; attitude control; differential equation

四轴飞行器与普通的飞行器相比具有结构简单、故障率低及单位体积能够产生更大升力等优点,在军事、民用和科技领域发挥着越来越重要的作用,非常适合在狭小空间内执行任务。因此四旋翼飞行器具有广阔的应用前景,吸引了众多科研人员,成为国内外新的研究热点。

本文通过建立四轴飞行器四元数运动学方程,得到该方程的数值解,再将四元数转换为欧拉角,避免了欧拉角法运算量大、存在奇异点的问题。在控制算法方面,采用串级PID控制,增加了系统的可靠性和鲁棒性。通过Matlab/Simulink仿真,并搭建四轴飞行器实验平台,验证了算法的正确性。

1 姿态描述与姿态角表示

1.1 四轴飞行器姿态描述

为了更好地描述四轴飞行器的姿态,建立如图1所示的坐标系,分别为参考坐标系n系、机体坐标系b系。……

登录APP查看全文