
How a Kalman filter works, in pictures (2015) - panic
http://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/
======
JamesBarney
For anyone who read this blog post and thought "Wow that's interesting, but I
don't understand half of this. I need a whole youtube series to explain this
to me."

Well we're in luck.
[https://www.youtube.com/watch?v=CaCcOwJPytQ](https://www.youtube.com/watch?v=CaCcOwJPytQ).

It's a great set of 55 video lectures on Kalman filtering. (I'm only on number
5 but so far they've been great)

~~~
icholy
Unfortunately those lectures are not complete.

~~~
jessaustin
Well there are at least 42 videos, so that's fairly complete. Nearly a
semester already...

------
wdfx
Good work putting the colour highlighting on the formulae. It does make them
easier to follow for someone who is not a complete wizard with algebra.
Without this little formatting touch I would find the article to be mostly a
sea of symbols that I would likely skim over and still not properly
understand.

~~~
sudoscript
I wish more math papers did this. It's a nightmare for someone who doesn't
read equations all day for a living.

------
messel
For those familiar with least squares estimation, there's a good answer here
that relates it with the Kalman filter
[http://dsp.stackexchange.com/a/2398](http://dsp.stackexchange.com/a/2398)

It's a little simpler to derive the least squares smoothing function
[http://stats.stackexchange.com/a/138342](http://stats.stackexchange.com/a/138342)

------
amelius
Pardon my ignorance, I'm just wondering about some context, since the Kalman
filter was invented in the 60s. Are Kalman filters still highly relevant, or
are they (in practice and/or in theory) obsoleted by other techniques, such as
general ML?

~~~
tnecniv
Yes, they are a staple of modern robotics and other fields. If the Kalman
filter assumptions about the system hold (linear model, Gaussian noise), the
Kalman filter is an optimal filter and you can't do better. There are also
more complicated variants like the extended Kalman filter and the unscented
Kalman that can do better when the assumptions of the Kalman filter are not
accurate.

It's also worth noting that the Kalman filter follows the EM pattern of many
ML / statistical models.

~~~
sudoscript
In practical robotics, how often do the assumptions hold? Is it really usually
true that the variables have only a linear relationship?

~~~
tnecniv
People are generally happy with the Gaussian noise assumption. In some cases,
there are acceptable linearizations of the dynamical model. One example is
linearizing the quadrotor dynamics about the hover state (no roll or pitch).
This approximation works well enough for basic flying, but you won't be able
to pull off any flashy maneuvers because any hard bank will move you too far
away from the linearization point for it to hold. A better choice would be a
more complicated KF (I've used an error-state KF in the past).

The real draw of these filters, though, is that they are very fast. In my
experience, most of the compute time every update cycle is spent on sensing
because your sensors dump a ton of data that you need to process as part of
your CV / SLAM / whatever pipeline (the outputs of these then go into your
KF). The dream is to get a 10ms update loop so your control algorithms can do
a good job, but this is easier said than done.

------
agustamir
My ML professor once took hidden markov model and arrived at equations of a
kalman filter. That just completely blew my mind, I could never think the
concepts from estimation theory machine learning could be related so
beautifully.

~~~
tnecniv
The Kalman filter algorithm is an EM algorithm.

~~~
agustamir
At that point, I did not have an idea of the family of techniques that these
belonged to.

------
tomkat0789
This is really great! I kept encountering Kalman filters in my research during
graduate school, but they didn't directly affect my research so I never made
the time to understand them. What a fantastic explanation!

I'm also a huge fan of the use of colors to understand all the different
concepts at work. Yesterday I actually asked the secretary of my department to
get my an 8 pack of multicolored pens for this exact purpose (red, blue, and
black aren't enough!).

------
sn41
That was a really coherent explanation. The coloring was helpful, also the way
in which the details were introduced one by one.

