I have a robot which has (for simplicity) only one degree of freedom; it rotates about the z-axis (think like a crane), and has no slip.

The shaft encoder delivers data in 0.1° increments, so when measured at 30 Hz, there is usually a succession of identical values until the value jumps to the next 0.1°.

I have an IMU with a Gyroscope that I can place somewhere on the robot (not at the center of rotation).

I would like to update estimates of the current angle of rotation at greater than 30 Hz.

How would one go about fusing this very coarse encoder and IMU data? I'm assuming EKF filtering will be part of the answer.

I would be very satisfied with canonical literature on this topic as well.


When you have one fast-moving source and want to fuse it with a slow-moving source, a complimentary filter should be sufficient. Hopefully, it's a lot easier to understand than Kalman filters.

There are plenty of examples where they use a complimentary filter to combine accelerometer and Gyroscope. When you say the Z-Axis, I assume you mean vertical axis and can't use the accelerometer to work out gravity. It doesnt matter where you place the gyro, the angular velocity is independent of the origin

Gyro gives a measure of angular velocity, and from that, we calculate the position of the crane. However, there will be noise on that signal which will gradually cause the position to be wrong.

In a drone, the accelerometer can be used to get gravity direction i.e. down. However, when the drone is moving, we can't use it because it's measuring the acceleration due to the movement. You can think of that like the inaccuracy like the shaft encoder. Though it's not noisy like an accelerometer, it is inaccurate in the short term, but stable long term.

These two sensors/measures of turn can be turned into an angle and combined. The Gyro/fast-moving source will go through a high-pass filter and the stable/slow shaft encoder can go through a low-pass filter and then added.

I enjoyed watching this video from Brian Douglas about the topic.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.