针对四旋翼无人机飞行姿态测量易受干扰、姿态解算和姿态控制输出误差大等问题,以飞行姿态稳定控制为目标,设计了一种基于STM32系列微控制器的X型四旋翼无人机。采用以双处理器、双陀螺仪和双加速度计为主的硬件架构,实时采集无人机飞行姿态信息,并结合基于四元数的互补滤波算法和串级PID控制算法对姿态信息分别进行解算和控制输出。实验结果显示:小角度扰动下,双陀螺仪和双加速度计姿态测量精度高,合理设置双环PID参数后,姿态角输出误差小。结果表明:双传感器硬件架构在姿态测量中的抗干扰性更强,设计的X型四旋翼无人机飞行性能较好,达到飞行姿态稳定控制的目的。研究结果对后续飞行控制系统的深入研究具有一定的指导作用。
For the flight attitude control of unmanned quadrotor,there still exist some issues on accurate measurement,calculation and output.To acquire a stable flight attitude control,an Xtype unmanned quadrotor was designed based on STM32 microprocessor.Dual processors,dual gyroscopes and dual accelerometers were integrated into the hardware architecture.Real time flight attitude information was collected.Quaternion complementary filter algorithm and cascade PID control algorithm were adopted in attitude calculation and output.The experiment results showed that the structure of dual gyroscopes and dual accelerometers had higher measurement accuracy under little angle disturbance,and the attitude angle got a smaller output error with appropriate parameter settings of cascade PID.The results demonstrate that dual sensors can perform stronger noise immunity in attitude measurement,and the designed X-type unmanned quadrotor has good flying performance and can achieve the purpose of flight attitude stability control,which provides guidance for further study on flight control system.