Pierre's Blog

IMU 101

/ Project

IMU 101

What is IMU?

source: https://www.ceva-dsp.com/ourblog/what-is-an-imu-sensor/

為什麼需要濾波?

加速度計會產生高頻振蕩的噪音訊號,又陀螺儀是將角速度對時間積分產生角度,故易產生誤差

source: https://stackoverflow.com/questions/1586658/combine-gyroscope-and-accelerometer-data

互補濾波

Complementary filter

定時對加速度採樣的角度取平均值 + 短時間內採用陀螺儀得到的角度

加速度計要濾掉高頻訊號,陀螺儀要濾掉低頻訊號


https://stackoverflow.com/questions/1586658/combine-gyroscope-and-accelerometer-data

angle’=α(angle+gyro×dt)+(1α)×(Xa)

卡爾曼濾波

Kalman filter

基本模型-真實狀態

xk=Fxk1+Buk+wkwkN(0, Qk)

基本模型-觀測

zk=Hxk+vkvkN(0,Rk)

預測

x^k=Fx^k1+Bθ˙k

修正

Kk=PkHT(HPkHT+R)1x^k=x^k+Kk(zkHx^k)Pk=(IKkH)Pk

實作

裝置&流程

測試結果 Part 1

測試結果 Part 2

Pitch Row

Reference

Welch, G. and Bishop, G. (2006). An Introduction to the Kalman Filter, Department of Computer Science University of North Carolina at Chapel Hill
Lauszus. (2012). A practical approach to Kalman filter and how to implement it, TKJ Electronics