banner
News center
Our joint efforts will produce a satisfying outcome.

Kalman Filters Without The Math

Jul 31, 2023

If you program using values that represent anything in the real world, you have probably at least heard of the Kalman filter. The filter allows you to take multiple value estimates and process them into a better estimate. For example, if you have a robot that has an idea of where it is via GPS, dead reckoning, and an optical system, Kalman filter can help you better estimate your true position even though all of those sources have some error or noise. As you might expect, a lot of math is involved, but [Pravesh] has an excellent intuitive treatment based around code that even has a collaborative Jupyter notebook for you to follow along.

We have always had an easier time following code than math, so we applaud these kinds of posts. Even if you want to dig into the math, having basic intuition about what the math means first makes it so much more approachable.

Of course, in the end, there is some math, but nothing complicated unless you count the Wikipedia screenshot showing the “real” math put there to show you what you are missing. The example is a boat with dead reckoning data influenced by random wind and tides and GPS measurements that also have some errors and are sometimes unavailable, just like in real life.

Of course, a simple average of measurements can help, but it can also throw off a good reading. The Kalman techniques use weights of the sources to mitigate this so that seemingly more reliable sources contribute more to the final answer than less reliable ones.

If you prefer a robotic example, we’ve had them, too. If you want something simple and, perhaps, less capable, there are other ways to clean up noisy data.