Kalman is not Superman's brother
Embeddedfm
Embedded is a show about engineering. We talk with a wide variety of educators, makers, entrepreneurs, and engineers.
We've got sensors and sensor fusion on our minds this week, so we thought we'd make sure you did too. What's sensor fusion? It's where you combine the values from multiple sensors, sometimes reading slightly different things, to generate a single prediction about the world. One classic example in embedded systems is inertial measurement where you take readings from accelerometers, gyroscopes, and magnetometers and combine them to determine the orientation of a device. Those sensors often come in a single part called an "IMU".
How is this accomplished? The usual way is through a mathematical tool called the Kalman Filter. A Kalman Filter handles potentially noisy data from multiple sensors and combines them to make a better prediction about the state of the world than could otherwise be made. You can think of it as a dynamic weighted average that adjusts based on how accurate its past predictions were.
Kalman filters are somewhat famously difficult to understand. Elecia wrote up a blog post with her cheat sheets on everything Kalman. Now this isn't a way to learn Kalman filters, but it is a great way to see everything involved and to refresh your memory once you understand them a bit better:
I’ve been reading the book?Probabilistic Robotics?by Thrun, Burgard, and Fox. It is good but a bit of a mathematical slog. I realized I needed to make notes, real notes that I would return to. Then I got a little carried away.
Chapter 2 was mainly a statistics refresher.
Chapter 3 was a bit more information dense, mainly about different forms of the?Kalman filter. It touched on the basic Kalman filter with an applied mindset last fall:
However in?Probabilistic Robotics, the authors compared the Kalman to the more basic Bayes filter. I decided comparing and contrasting the formulations would help me remember them. (Note if Bayes filter isn’t something that makes sense, maybe check out my post?A Narwhal’s Guide to Bayes’ Rule.)?
Whew! I hope this helps me remember how Kalmans go together. We’ve talked about the Kalman Filter on the podcast with Tony Rios in?43: A Lot of High-Falutin’ Math?and ways to intuitively understand it in?233: Always the Wrong Way. Each time I get a little closer to understanding and application.
Well, that’s as far as I’ve gotten in?Probabilistic Robotics. Peeking ahead, Chapter 4 is about “Nonparametric Filters” which I think means particle filters. I have no idea how to explain those other than knowing they are neat. If it makes sense, I’ll make more notes; I hope to draw a lot of itty-bitty point clouds.
What we're reading:
So, want to learn more about sensor fusion? Here are the tabs we've got open. It probably will help to refer back to Elecia's cheat sheet to see where things match up and sear the ideas into your brain:
领英推荐
Tutorials:
Another kind of filter has been growing in popularity called the "Complementary Filter". For IMUs it relies on the insight that gyros, accelerometers, and magnetometers have different noise characteristics, so much of the complexity of a Kalman filter can be replaced by strategic use of low- and high-pass filters:
Implementations:
The best way to learn is probably from multiple tutorials and implementations, and playing with code! Everyone has a different viewpoint and way of understanding.
Upcoming Show
This week's show will be just us, talking on a variety of topics. If you've got something you want us to cover let us know soon! Look for it Thursday the 17th.
Patreon
To join the Embedded?conversation?on Slack, support us on?Patreon.
Interested in sponsoring the newsletter or the show? Drop us a line at sponsorship at embedded.fm and let's talk! ??
Sign up?to our email newsletter here.
Systems Engineering | Model-Based Development (MBSE, MBD) | Requirements Management | Systems & Software Architecture | Real-Time Embedded Software Engineering | Verification & Validation | Agile | Lean | Training
1 年Interesting topic, and thanks for all the references. Love the title!