1、 共 17 页 第 1 页 装 订 线 四轴飞行器定速巡航系统设计 摘要 四轴飞行器作为低空低成本的遥感平台,在各个领域应用广泛。相比其他类 型的飞行器,四轴飞行器硬件结构简单紧凑,而软件复杂。本文介绍四轴飞行器的一 个实现方案,重点讲软件算法,包括加速度计校正、姿态计算和姿态控制三部分。校 正加速度计采用最小二乘法。计算姿态采用姿态插值法、梯度下降法或互补滤波法, 需要对比这三种方法然后选出一种来应用。控制姿态采用欧拉角控制或四元数控制。 最后比较各种方法的效果,并附上 C 语言的算法实现代码。 关键词 四轴飞行器;姿态;控制 共 17 页 第 2 页 装 订 线 Four aircraft
2、 cruise control system design Abstract Quadcopter is a low-cost low altitude remote sensing platforms,Which widely used in various fields.Compared to other types of aircraft,the quadcopter has simpler hardware,result in more complex software.This paper describes an implementation of the quadcopter,i
3、ncluding the calibration of accelerometer,estimation of attitude,and controlof attitude.It used the Least Squares Method to calibration the accelerometer.It uses Attitude Interpolation Method,Gradient Descent Method or Complementary Filter Method to estimation attitude.It uses Euler angles or quater
4、nion to control the attitude.Finally,there are comparisons of the methods.The C-language implementation of the methods is appended. Key words Quadcopter;Attitude;Control 共 17 页 第 3 页 装 订 线 目 录 1. 引言 4 2. 飞行器的构成 4 2.1 硬件构成 4 2.1.1 机械构成 . 4 2.1.2 电气构成 . 5 2.2 软件构成 7 2.2.1.上位机 7 2.2.2. 下位机 . 7 3. 飞行器原理
5、 7 3.1.坐标系统 7 3.2. 姿态的表示和运算 8 3.3.动力学原理 9 4. 姿态测量 . 10 4.1.传感器校正 . 10 4.1.1.陀螺仪 . 10 4.1.2.加速度计和电子罗盘 . 10 4.2.数据融合 . 11 4.2.1.概述 . 11 4.2.2.姿态插值法 . 11 4.2.3.梯度下降法 . 12 4.2.4.互补滤波法 . 13 5.姿态控制 14 5.1 欧拉角控制 . 14 5.2.四元数控制 . 15 6. 算法效果 . 15 6.1 加速度计校正 . 15 6.2 姿态计算 . 15 7. 结论及存在的问题 . 16 参考文献: 17 共 17 页 第 4 页 装 订 线 1. 引言 四轴飞行器最开始是由军方研发的一种新式飞行器。随着 MEMS 传感器、单片机、 电机和电池技术的发展和普及,四轴飞行器成为航模界的新锐力量。到今天,四轴飞 行器已经应用到各个领域,如军事打击、公安追捕、灾害搜救、农林业调查、输电线 巡查、广告宣传航拍、航模玩具等,已经成为重要的遥感平台。 以农业调查为例,传统的调查方式为到现场抽样调查或用航空航遥感。抽样的方