APP下载

基于四元数的PID改进型互补滤波算法

2018-09-05朱科风周庆华王广鹏王乐林思宇

智能计算机与应用 2018年3期

朱科风 周庆华 王广鹏 王乐 林思宇

文章编号: 2095-2163(2018)03-0127-05中图分类号: 文献标志码: A

摘要: 关键词: (School of Physics & Electronic Science, Changsha University of Science & Technology, Changsha 410114, China)

Abstract: The traditional complementary filter algorithm which realizes the data fusion of multi sensors and compensates the integration error of the gyroscope has the advantage of easier calculation. But it also has some defects, such as large data fluctuation and calculating error. In this paper, the differentiation element is introduced to solve the problem of data fluctuation. An improved algorithm is proposed with PID controller to weaken data fluctuation. The experimental results show that the algorithm in this paper has the advantage of less computation and small data fluctuation. It can achieve stable state very quickly and track quadcopter effectively.

Key words:

基金项目:

作者简介:

通讯作者:

收稿日期: 引言

科技的不断发展使得中小型四轴飞行器(以下简称四轴)的续航能力越来越强,四轴的垂直起落、空中悬停、灵活转向等特点也使得其在民用和军事领域都得到了广泛的应用[1]。而四轴的姿态获取是能稳定控制四轴飞行的关键。

四轴的姿态获取指的是获取四轴相对于面的角位置,获取方式主要依赖于惯性测量传感器,其中包括陀螺仪、加速度计以及磁力计。但是能搭载在四轴上的传感器往往精度不高,主要表现在陀螺仪的动态特性会因积分运算而产生累积误差,且误差随时间增大;加速度计与磁力计的静态特性容易受到噪声影响[2]。在硬件条件受限的情况下,对姿态解算算法的研究成为了一个热点,例如:由Madgwick提出的梯度下降法解决了数据融合,避免了地磁补偿前对当地地磁场角度的测量,但是在高速运动情况下偏航角响应存在延迟,会导致姿态解算出错[3]。Mahony互补滤波算法通过加速度计与磁力计测量的姿态数据来补偿陀螺仪的积分误差[4],运算量小,但精度不高。本文采用经PID控制器改进的互补滤波算法,使姿态解算响应更快,稳定性更强,更有利于四轴的控制。

1姿态描述

为了对四轴的姿态进行描述,需要建立相应的2个不同的坐标系。飞行器的姿态是参考地面来描述的,需要以当地地理位置为参照,以东、北、天方位为X、Y、Z轴建立导航坐标系N[5]。……

登录APP查看全文