摘要
在控制器STM32所设定的采样周期内通过DLPF分别采集MPU6050传感器的陀螺仪和加速度计关于x、y、z三个方向的原始数据。再将采集到的加速度计和陀螺仪原始数据通过转化运算得到加速度数据,角速度数据。然后再运用滑动中值滤对加速度数据进行处理得到较为稳定的加速度数据。接着运用反三角函数将加速度数据转化为两轮自平衡成车所需要俯仰角Pitch。最后再通过Kalman滤波器对角度测量值和角速度漂移值的噪声进行过滤得到更为真实的角度值和角速度值。
The raw data of the gyro and the accelerometer of the MPU6050 sensor in the three directions of x,y,and z are respectively collected by the DLPF in the sampling period set by the controller STM32.The collected accelerometer and gyroscope raw data are then converted into acceleration data and angular velocity data.Then,the sliding median filter is used to process the acceleration data to obtain relatively stable acceleration data.Then use the inverse trigonometric function to convert the acceleration data into used to filter the noise of the angle and angular velocity value. the pitch angle required for the two-wheel self-balancing.Finally,the Kalman filter is measurement and the angular velocity drift value to obtain a more realistic angle value
出处
《工业控制计算机》
2018年第11期11-13,共3页
Industrial Control Computer