This video shows the the implementation of the Kalman Filter in action to measure the angle of the sensor.
At the start of the video, if you focus on the angle output by the gyrometer, you will realise that it is slowly increasing. This is largely due to the inaccuracies in the calibration, and also partly due to the inaccuracies that comes with discrete time integration. This phenomenon is called the "drift" of the gyrometer, and it makes the raw data from the gyrometer unsuitable for use measuring angles.
On the other hand, notice that when I moved the board, the accelerometer gives quite noisy reading (line in red) with many spikes. This is one problem with the accelerometer that makes it unsuitable for angle measurement.
In order to alleviate this problem, we can use the Kalman Filter to combine the "good parts" of both sensors. As you can see from the video, the Kalman Filter output does not drift like the gyrometer output, and it does not jump as much as the accelerometer output as well.
In addition to this, the implementation of the filter is rather simple as well. I have included a thorough explanation of the Kalman Filter, and also a Pendulum Simulation Kalman Filter Implementation example using python in my blog so if you want to know more about the Kalman Filter, please visit [ Ссылка ]
----------------------------------------
ThePoorEngineer
Woking Hard to be Lazy
----------------------------------------
Ещё видео!