Hacker News new | ask | show | jobs
by nh2 981 days ago
I am still confused by this too:

Lots of typical "industry applications" given for Kalman Filters involve moving objects, like air planes, rockets, and so on.

But all these objects generally rotate in some way, rotation is non-linear, and Kalman Filters cannot deal well with nonlinearities. Thus Kalman Filters struggle with rotation, and I haven't really found any good resources that handle this.

Do all these applications just skip over the fact that real-world objects can have a rotation/spin, or do they all use more sophisticated filters as suggested in e.g. [1]?

[1] https://math.stackexchange.com/questions/2621677/extended-ka...

2 comments

The "Integrating Generic Sensor Fusion Algorithms with Sound State Representations through Encapsulation of Manifolds" paper linked from your [1] is indeed the current state of the art. It shows how to use the EKF or UKF for rotation.

The naive Kalman filter is only suited for linear problems; extended and unscented Kalman filters (EKF/UKF) are necessary for anything non-linear (including rotation). In any case, they build on the basic KF, so you have to understand that first.

That paper [1] is from 2010. What did "industry" use before that for pysically moving objects?

If this is the current state of the art, are there generally-available/open-source libraries existing that implement this and practitioners use for this?

The only one I could find is https://github.com/kartikmohta/manifold_cdkf, which currently has 8 Github stars.

I also found an approach mentioned in [2] that is to just treat a single rotation angle as linear, and then wrap it around at 180 degrees in between state updates with additional conditional logic. Is this what people did in practice before? I cannot find substantial info on this.

How did people use KF on physical objects before 2010?

[2]: https://old.reddit.com/r/ControlTheory/comments/d2yrjq/kalma...

> If this is the current state of the art, are there generally-available/open-source libraries existing that implement this and practitioners use for this?

The authors of [1] do discuss and link to their own library in section 5.

However, in my experience, most people implement the math themselves rather than use any libraries (beyond e.g. Eigen).

> How did people use KF on physical objects before 2010?

The Multiplicative EKF (MEKF) was used since 1969 according to [3]. It's a hacky approximation of [1]. [1] is really just a generalization/unification of lots of application-specific hacks that were used before, including the MEKF.

[3]: https://ntrs.nasa.gov/api/citations/20040037784/downloads/20...

I’d suggest looking at the related work in that paper as they list prior methods.
I'm asking what people actually use in production. It is part of a thread that started with

> All People I have interacted with have never seen Kalman Filters outside Academica. Do anyone here have industry experience where Kalman Filters is actually used in prod?

Looking at prior academic work in an academic paper won't help answer this question.

This is where the extended Kalman filter comes in (basically just a KF with linearization). I imagine you could also do a KF to include manifold constraints (e.g., rotations) more explicitly but I have never had the need.

If you model your rotation as a quaternion, there is a way to linearize the update process of the quaternion and use a KF. This can work very well and is what most quadrotors I’ve worked with do. However, care is needed to ensure the result gives a valid updated rotation and that you implement the disgustingly messy equations correctly.