Live data from Hacker News

Rudolf Kálmán Has Died

hungarytoday.hu

51–60 of 74 posts

Re: Rudolf Kálmán Has Died

#51

Edit: This is wrong. This is a particle filter, another type of Bayesian filter. I can't delete now, so please downvote to hide. I made a Kalman Filter visualization[1] last year to learn more about them. It's amazing to see how good a result you can get from very poor sensor data. In the visualization, a lawnmower (green dot) is tracked (blue circle) using triangulation. The distance sensors have very low accuracy (…

Never mind it not being a Kálmán filter; it's cool anyway. What is the cloud of small dots? Edit: Oh, they are samples from the hypothesis space, I suppose.

They are probably the "particles", a bunch of different guesses made by the filter process.

Re: Rudolf Kálmán Has Died

#52

Just last week I needed to smooth out a display reading on an oven controller. The RTD was being read way too fast so I'd get a lot of flicker between values due to ADC resolution. In the back of my head I remembered one word: Kalman. This line of code fixed it right up: static float display_temp = 0; display_temp += 0.04 * (adc_temp - display_temp);

Despite some saying this is not a Kalman filter I'd argue that it is, although a quite simple stationary Kalman filter. I'm not saying calling it a low-pass filter or IIR is wrong, but that there is not a clear distinction in this case. Hear me out: The general model for a linear system is: x(t+1) = A * x(t) + B * u(t) + v1(t) y(t) = C * x(t) + D * u(t) + v2(t) Generally, x (state), y (measurement) and u (input) are…

Even a constant could be a Kálmán filter. ;-)

Re: Rudolf Kálmán Has Died

#53

Edit: This is wrong. This is a particle filter, another type of Bayesian filter. I can't delete now, so please downvote to hide. I made a Kalman Filter visualization[1] last year to learn more about them. It's amazing to see how good a result you can get from very poor sensor data. In the visualization, a lawnmower (green dot) is tracked (blue circle) using triangulation. The distance sensors have very low accuracy (…

Never mind it not being a Kálmán filter; it's cool anyway. What is the cloud of small dots? Edit: Oh, they are samples from the hypothesis space, I suppose.

I agree it's still fun.

Kalman filters work by the assumption that everything is distributed by a gaussian. However the given example shows a case where we have very non-gaussian distributions, namely the input to the system is estimates of the distance of the lawn mower to the towers, which means it's a sort of annular distribution with a big whole in the middle (these are shown in the visualization). Contrast this to a gaussian which is a solid blob: a gaussian would be a poor approximation to the information provided by a distance to a point.

But without the assumption that the distribution is gaussian, the math is intractable, in particular how do you even represent an arbitrary probability distribution over possible positions? One option is to discretize space and give a 'heat map' of probabilities. This works but limits spatial resolution and grows to be a huge amount of work and memory for higher dimensional state spaces(1). The small dots are the alternative approach and are the eponymous 'particles'. Here we estimate the probability distribution by a collection of possible states, each being one point, and each state is weighted by how probable it is. Then a new piece of information applied (another round of distance data from the three points) to each of those points. This updates the probability of each point being 'correct'. Then a new batch of points is randomly selected by adding some noise to the current batch and preferentially choosing the higher probability points. This is why they jump around at each time step.

The advantage here is that most possible states are ridiculously unlikely but particles tend to group around the likely points, so we spend our time looking near the likely places and not around the unlikely places. If you discretized space, the vast bulk of the space will just be epsilon probability and doing you no good. And the particles have arbitrary precision without needing to increase the amount of points used. Plus we can work with non gaussian distributions. Otherwise it's 'just' another way of approximating a Bayesian update but under different assumptions and tradeoffs compared to a kalman filter. If you've got nearly gaussian distributions kalman filters are simpler and faster and more memory efficient, so they're very popular for embedded systems.

(1) Actually we're probably dealing with a 4 dimensional state space already making a discretized approach essentially already impossible. There are two space dimensions plus two for the velocity of the mower.

Re: Rudolf Kálmán Has Died

#55

Earlier quoted context omitted.

You can do better by having the 0.04 parameter follow an exponential decay as well. Start at 1.0 and have it decay to 0.04 or even 0.01 over time. That would make it more like a real Kalman filter for such a simple measurement. You'll get fast convergence to an initial value and then very smooth response after that. A classic example is a fuel gauge where you want to reject low frequency sloshing but have a rapid sta…

Something that Toyota apparently doesn't do; their fuel gauges take over a minute to react fully when you turn on the car after filling the tank.

How about a mechanical low-pass filter?: A vertical tube connected to the tank via a tiny hole would not be affected much by sloshing, but would slowly drift towards having the same level of fuel as the tank has on average.

Re: Rudolf Kálmán Has Died

#58
post #41

Earlier quoted context omitted.

If you're really trying to find a cooler name than the obvious low-pass IIR filter, you could call it an "alpha filter", which is equivalent to a position only (no derivatives) Kalman filter in steady-state, using a precomputed gain (called alpha, here equal to 0.04). The alpha-beta filter is the position/velocity version, and is commonly seen in settings where less is known about the system dynamics, or there's not…

Are alpha-beta (or alpha) filters a subset of Kalman Filters? I ask because I don't know enough about the Kalman Filter. But it seems that the parent post could also be accurate. I imagine many implementations of the Kalman Filter take advantage of the local use case, and don't necessarily have to carry a fully generalised Kalman filter.

One of the defining characteristics of the Kalman filter is that it computes a gain (called the Kalman gain) that is a function of the state covariance and the measurement covariance. Alpha-beta filters use constants, so I'd say no, they are not a subset.

Re: Rudolf Kálmán Has Died

#60
> "emigrated to the United States in 1943"

It's always sad hearing about great minds who fled Europe shortly before or during World War II. It's a reminder of all the great minds whom we lost in the last war, and of how destructive war is to technological and human progress.

Post reply on HN