基于扩展卡尔曼的多旋翼飞行器的姿态解算

 2022-03-12 03:03

论文总字数:29898字

摘 要

本文为解决姿态测量传感器在动加速度情况下,加速度计数据会有偏差的问题,建立基于多旋翼飞行器的模型,采用扩展卡尔曼数据融合算法来解决该问题,并且使用MPU9250传感器结合STM32F407单片机,进行嵌入式编程,验证了模型的好坏。

由于加速度计测量的物体加速度包括质心运动的动加速度和物体自身转动导致的加速度,因此飞行器在飞行过程中采用加速度计测量的姿态角不仅包括飞行器本身的姿态角导致的加速度变化,还有飞行过程的动加速度,此时按照静止情况下解算后的姿态角会出现误差。本文对多旋翼飞行器建立物理模型,将动加速度和计算姿态角的加速度分离开,得到由于姿态角变化导致的加速度,再将去除误差后的加速度代入扩展卡尔曼数据融合算法中,用Matlab仿真,仿真结果表示该模型有效的提高了姿态角解算的精度。同时,由于忽略了空气阻力对加速度计的影响,解算出的观测矩阵和不加模型的矩阵计算量相同,从而在工程应用上也利于实现。

最后,本系统根据理论推导后改进的扩展卡尔曼算法,结合MPU9250九轴姿态测量传感器的传感器数据,利用STM32F407单片机进行嵌入式编程,解算后的姿态角传入PC上位机,在上位机上实时显示了姿态角的变化。

关键词:扩展卡尔曼滤波、多旋翼飞行器、动加速度、姿态解算、加速度计、数据融合。

THE ATTITUDE ALGORITHM OF MULTI-ROTOR AIRCRAFT BASED ON EXTENDED KALMAN

Abstract

This paper establishes the multirotor model based on entended Kalman data fusion algorithm to solve the question that the attitude measurement sensor is biased in the case of dynamic acceleration. And I make embedded programming using MPU9250 sensor combined with STM32F407 to verify the quality of the model.

Since the accelerometer measurements includes mass motion dynamic acceleration and the object itself rotational acceleration, the attitude angle of aircraft using the acceleration measured includes the changes in acceleration caused by the attitude angle, as well as dynamic acceleration during flight. In such cases, the attitude angle solved in static case have error. In this paper, the establishment of multi-rotor aircraft physical model separates the dynamic acceleration and the acceleration of the attitude angles to get the acceleration caused by the changes of the attitude angles. And then the Matlab simulation of the acceleration romoved the error and the EKF indicates that the model can effectively improve the attitude angle accuracy of the solution. At the same time, ignoring the effect of air resistance, the calcutation of the measurement matrix is same with the matrix without the mode, thereby also conducive to engineering applications.

Finally, the present system combines MPU9250 9-axis attitude measurement sensor data with STM32F407 microcontroller embedded to programming based on improved EKF after theoretical derivation. And then the solved attitude incomes host computer and you can watch the attitude angle changes in the PC.

KEYWORDS: Extended Kalman Filter, Multi-rotor, Dynamic Acceleration, Attitude Solution, Accelerometer, Data Fusion.

目录

摘要 I

Abstract III

第1章 绪论 - 1 -

1.1 引言 - 1 -

1.2 研究现状 - 2 -

1.2.1 国外研究现状 - 2 -

1.2.2 国内研究现状 - 3 -

1.3 本文的研究目的和主要研究内容 - 4 -

第2章 姿态测量系统相关理论介绍 - 7 -

2.1 引言 - 7 -

2.2 姿态数学描述方法 - 7 -

2.2.1 四元数理论 - 7 -

2.2.2 欧拉角理论 - 8 -

2.3 姿态解算滤波算法 - 9 -

2.3.1 卡尔曼滤波器 - 9 -

2.3.2 扩展卡尔曼滤波器 - 11 -

2.4 三轴加速度计测量姿态角原理介绍 - 13 -

2.5 小结 - 14 -

第3章 多旋翼飞行器姿态解算的建模 - 15 -

3.1 引言 - 15 -

3.2 欧拉角和四元数在飞行器上的应用 - 15 -

3.2.1 用欧拉角对坐标系进行建模 - 15 -

3.2.2 用四元数对机体进行坐标系建模 - 16 -

3.2.3 欧拉角和四元数的转换 - 17 -

3.3 扩展卡尔曼滤波器数据融合算法 - 18 -

3.3.1 传感器数据分析 - 19 -

3.3.2 基于扩展卡尔曼的数据融合算法 - 20 -

3.3.3 Matlab仿真结果 - 22 -

3.4 加入模型的扩展卡尔曼滤波算法 - 25 -

3.4.1 建立物理模型 - 25 -

3.4.2 Matlab仿真结果 - 27 -

3.5 小结 - 29 -

第4章 姿态解算模块的嵌入式设计 - 31 -

4.1 系统总体设计 - 31 -

4.2 传感器模块 - 33 -

4.2.1 MPU9250硬件介绍 - 33 -

4.2.2 SPI协议介绍 - 33 -

4.2.3 MPU9250的初始化和读写 - 34 -

4.3 姿态解算模块 - 36 -

4.3.1 单片机性能介绍 - 36 -

4.3.2 姿态解算设计 - 36 -

4.4 上位机模块 - 37 -

4.4.1 下位机串口部分 - 37 -

4.4.2 上位机部分 - 38 -

4.5 小结 - 39 -

第5章 总结与展望 - 41 -

5.1 工作总结 - 41 -

5.2 前景与展望 - 41 -

参考文献 - 43 -

致谢 - 45 -

绪论

引言

美国航空航天学会(AIAA)给出了无人机的定义:一种设计或改装过的,不搭载飞行员,依靠飞行控制器进行控制,或者在没有飞行控制器参与的前提下,依靠系在自动飞行驾驶系统进行控制的飞行器。尽管在定义上无人机和微型无人机并没有什么严格的区分,但是按照美国防卫部分的定义,微型无人机在尺寸(长度、宽度、高度)上一般在15cm以下[1]

从空气动力学、结构和尺寸来对无人机进行分类,可以分成以下四类。

  1. 固定翼无人机,如图1-1(a),就像无人驾驶飞机(带机翼)一样,需要跑道起降或者弹射起飞。这些无人机一般具有较长的续航能力且巡航速度较高。
  2. 水平旋翼无人机,如图1-1(b),也成为旋翼无人机或垂直起降(VTOL)无人机,这种飞行器能够悬停在空中并且具有较好的机动性。这些性能在执行需要机器人作业的任务时非常有用,特别是在民用领域。
  3. 小型飞船,如图1-1(c),例如热气球和飞艇。这些飞行器比空气轻,续航能力长,巡航速度低,常常尺寸大。
  4. 微型扑翼无人机。如图1-1(d),这些飞行器是从鸟类或者昆虫启发而来的,具有柔软或者可变形的小型翼翅。

剩余内容已隐藏,请支付后下载全文,论文总字数:29898字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;