针对履带式机器人的实时姿态测量,单独采用陀螺仪或加速度计和磁强计求解存在精度低,易受外界干扰等问题,对多传感器信息融合算法进行研究,采用四元数表征机器人的姿态,通过卡尔曼滤波算法对各传感器信息进行融合。系统状态方程由陀螺仪数据通过四阶龙格-库塔法构建,提高求解的精度;观测方程由加速度计与磁强计数据通过分离式四元数法构建,节省硬件计算时间。以STM32控制器为核心设计姿态测量系统,实验结果表明,该系统可有效融合各传感器信息,所得俯仰角和橫滚角误差在±1°以内,航向角误差在±2°以内,满足机器人对姿态精度的要求。
In view that the real-time attitude calculation of caterpillar robot solved by using the gyroscope or accelerometer and magnetometer separately has the problem of low accuracy and is susceptible to interference,the multi-sensor data fusion algorithm was researched.The attitude of the robot was represented by quaternion.The sensor information was fused using Kalman filtering algorithm.The state equation was built through gyroscope data combining the fourth order Runge-Kutta method for improving calculation accuracy,and the observation equation was built by accelerometer and magnetometer data using factored quaternion algorithm(FQA)for saving hardware calculation time.The attitude measurement system was established using STM32 controller.Experimental results show that the system can effectively finish the fusion of multi-sensor information.The errors of pitch and roll are within ±1°and the error of yaw is within ±2°,which met the accuracy requirement of the robot's attitude.