What is a Complementary Filter?
A complementary filter blends fast gyro response with a slower gravity-based tilt reference. Its weights control drift correction, while motion acceleration and gravity's lack of yaw information constrain the estimate.
The key idea
Complementary filtering combines sensors whose error behavior differs across time scales. For robot tilt, gyro integration follows rapid angle changes, while an accelerometer provides a long-term reference inferred from gravity. The filter first predicts angle by integrating gyro rate, then blends that prediction with the gravity-based tilt estimate. The blend weights determine how quickly slow drift is corrected. The reference is only useful when its assumptions hold: strong motion acceleration can corrupt inferred gravity direction. Gravity also cannot determine yaw, so the same blend cannot remove yaw drift simply by increasing accelerometer influence.
What to remember
- Gyro prediction follows rapid angular motion.
- Gravity-based tilt contributes long-term drift correction.
- Motion acceleration and unobservable yaw limit the reference.
Check your understanding
Can an accelerometer's gravity reference correct yaw drift?
Show the explanation
No. Gravity does not distinguish rotations about the vertical axis.