1
$\begingroup$

A complementary filter (CF) uses orientation obtained calculated from gyroscope, accelerometer and magnetometer to find a more accurate measurement of orientation.

However, when my sensor is accelerating linearly, the orientation from trigonometric equations using accelerometer readings is not correct. These equations seem to work only when the linear acceleration is 0. It seems that it is useless to apply accelerometer orientation in the Complementary Filter in this case.

Magnetometer on the other hand gives only the heading angle and the roll angle and not the pitch.

Is there any way of using CF to find orientation for a linearly accelerating vehicle? Or is CF intended only for cases when linear acceleration is 0?

$\endgroup$
1
  • $\begingroup$ Have you looked At kalman or madgwick? $\endgroup$ Apr 18, 2020 at 14:50

1 Answer 1

2
$\begingroup$

The point of a complementary filter is combine the low-pass parts of some measurements (e.g. accelerometer) with the high-pass parts of other measurements (e.g. gyro). If the accelerometer perfectly reflected the direction of gravity you wouldn't need the gyroscope part.

So practical applications that successfully use complementary filters with an accelerometer have an average acceleration close to zero over the relevant time scale. Cars, quadrotors, etc all meet this requirement. Note that as your gyroscope quality improves, and you adjust the filter accordingly, you can tolerate longer and longer periods of significant acceleration.

Also, accelerometers are not required for complementary filters. Any directional measurement will work. For example, if a plane were to track a known feature on the ground that could work as well.

$\endgroup$
2
  • $\begingroup$ I tried using the CF for the KITTI dataset to find the roll and pitch estimate from body frame acceleration and gyroscope readings. The dataset also has roll and pitch values obtained using strapdown inertial system which I used to see how well CF performs. However the result was very inaccurate. The gyroscope readings alone gave a much closer estimate of roll and pitch. $\endgroup$
    – vinayakdan
    Apr 18, 2020 at 16:01
  • $\begingroup$ I suspect that means you need to adjust the tuning of your filter to have a lower crossover threshold between the low-pass on accel vs high-pass on gyro $\endgroup$
    – ryan0270
    Apr 18, 2020 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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