Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Kalman filter


sort by: page size:

Kalman filters.

Kalman filter!

Kalman filter for the win

Kalman filtering is very interesting. You are able to combine a bunch of inputs, of varying levels of uncertainty, along with a model of the system to arrive at an optimal estimation of the state.

Kalman filters (unless you get into really esoteric modifications) are just one tool and are related to stochastic processes. It's more like learning an algorithm than learning a whole field of math.

Kalman filters are the *optimal* solution to the problem of controlling a linear system driven by additive white Gaussian noise and a quadratic cost function.

The model is updated sequentially (online learning).

https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic%E2%80...


The wikipedia page for Kalman filter says it's also known as "linear quadratic estimation" so that might be a good place to start.

Kalman filters are used for changing entities. Say you have a moving object. You could measure (with some errors) its position every second and use that as an estimate of where it is. Or use your position measurements in combination with an estimation of the object's speed that you can get from previous measurements and estimate where the object is. The second method is the Kalman filter.

Wow, Kalman Filters are awesome. Time to dig deeper into the wikipedia rabbit hole!

That is not a Kalman filter :) A Kalman filter uses matrices, a physical model of the system its trying to filter data and lots of stuff I haven't found in that code

Going down the rabbit hole indeed... Kalman filters are Linear Quadratic Estimators (LQE) in control theory. Very rich field with very powerful techniques.

The Kalman filter algorithm is an EM algorithm.

Kalman filters. The explanations always start easy and then get too confusing.

Kalman filters are really neat. I wrote one when learning C a while ago and it is just cool what some matrix math can do with practical data. https://github.com/lacker/ikalman

Although I guess I should have been calling it a "Kálmán filter" this whole time.


There seems to be a lot of confusion about what Kalman filters are for in this thread. Perhaps that’s what happens when you seek a non-mathematical introduction to a mathematical topic but nevertheless I’m going to try and clear this up.

Specifically, the Kalman filter is a recursive way to estimate the state of a dynamical system. That is, specifically, the thing you want to estimate varies is a function of time. It doesn’t matter if that thing is the position and momentum of a robot or a stock price. What does matter are the following:

1. The dynamics are linear with additive Gaussian noise. That is, the next state is a linear function of the current state plus a sample from a Gaussian distribution. Optionally, if your system is controlled (i.e., there is a variable at each moment in time you can set exactly or at least with very high accuracy), the dynamics can include a linear function of that term as well.

2. The sensor feeding you data at each time step is a linear function of the state plus a second Gaussian noise variable independent of the first.

3. You know the dynamics and sensor specification. That is, you know the matrices specifying the linear functions as well as the mean and covariances of the noise models. For a mechanical system, this knowledge could be acquired using some combination of physics, controlled experimentation in a lab, reading data sheets, and good old fashioned tuning. For other systems, you apply a similarly appropriate methodology or guess.

4. The initial distribution of your state when you start running the filter is Gaussian and you know it’s mean and covariance (if you don’t know those, you can guess because given the filter runs for a long enough time they become irrelevant)

The Kalman filter takes in the parameters of the model described in (3) and gives you a new linear dynamical system that incorporates a new measurement at each time step and outputs the distribution of the current state. Since we assumed everything is linear and Gaussian, this will be a Gaussian distribution.

From a Bayesian perspective, the state estimate is the posterior distribution given your sensor data, model, and initial condition. From a frequentist / decision theory perspective, you get the least squares estimate of the state subject to the constraints imposed by your dynamics.

If your dynamics and sensor are not linear, you either need to linearize them, which produces the “extended Kalman filter” that gives you a “local” estimate of the state or you need another method. A common choice is a particle filter.

If your model is garbage, then model based methods like the Kalman filter will give you garbage. If your sensor is garbage (someone mentioned the case where it outputs a fixed number), the Kalman filter will just propagate your uncertainty about the initial condition through the dynamics.


That's not a kalman filter.

I was waiting for this headline. Someone edited his wikipedia article last week, but provided no source and no articles were published yet.

The Kalman filter is a fantastic tool. I use it and the particle filter regularly. Both are ubiquitous in robotics and cyber-physical systems and incredibly powerful tools.

Interestingly, Kalman wasn't able to publish it in a prestigious journal at the time and had to settle for a lesser known one.

EDIT: Forgot to finish my sentence...


Yes, but Kalman filter.

next

Legal | privacy