Earlier quoted context omitted.
Firstly I think the clarity in general is good. The one piece I think you could do with explaining early on is which pieces of what you are describing are the model of the system and which pieces are the Kalman filter. I was following along as you built the markov model of the state matrix etc and then you called those equations the Kalman filter, but I didn't think we had built a Kalman filter yet. Your early explan…
You’re pointing out a real conceptual issue: where the system model ends and where the Kalman filter begins. In Kalman filter theory there are two different components: - The system model - The Kalman filter (the algorithm) The state transition and measurement equations belong to the system model. They describe the physics of the system and can vary from one application to another. The Kalman filter is the algorithm…
Understanding the Kalman filter with a simple radar example
21–30 of 71 posts
Re: Understanding the Kalman filter with a simple radar example
#22Earlier quoted context omitted.
You’re pointing out a real conceptual issue: where the system model ends and where the Kalman filter begins. In Kalman filter theory there are two different components: - The system model - The Kalman filter (the algorithm) The state transition and measurement equations belong to the system model. They describe the physics of the system and can vary from one application to another. The Kalman filter is the algorithm…
[flagged]
Re: Understanding the Kalman filter with a simple radar example
#23Earlier quoted context omitted.
You’re pointing out a real conceptual issue: where the system model ends and where the Kalman filter begins. In Kalman filter theory there are two different components: - The system model - The Kalman filter (the algorithm) The state transition and measurement equations belong to the system model. They describe the physics of the system and can vary from one application to another. The Kalman filter is the algorithm…
[flagged]
Re: Understanding the Kalman filter with a simple radar example
#24This seems to be an ad for a fairly expensive book on a topic that is described in detail in many (free) resources. See for example: https://rlabbe.github.io/Kalman-and-Bayesian-Filters-in-Pyth... Is there something in this particular resource that makes it worth buying?
Re: Understanding the Kalman filter with a simple radar example
#251. understand weighted least squares and how you can update an initial estimate (prior mean and variance) with a new measurement and its uncertainty (i.e. inverse variance weighted least squares)
2. this works because the true mean hasn't changed between measurements. What if it did?
3. KF uses a model of how the mean changes to predict what it should be now based on the past, including an inflation factor on the uncertainty since predictions aren't perfect
4. after the prediction, it becomes the same problem as (1) except you use the predicted values as the initial estimate
There are some details about the measurement matrix (when your measurement is a linear combination of the true value -- the state) and the Kalman gain, but these all come from the least squares formulation.
Least squares is the key and you can prove it's optimal under certain assumptions (e.g. Bayesian MMSE).
Re: Understanding the Kalman filter with a simple radar example
#26Kalman filters are very cool, but when applying them you've got to know that they're not magic. I struggled to apply Kalman Filters for a toy project about ten years ago, because the thing I didn't internalize is that Kalman filters excel at offsetting low-quality data by sampling at a higher rate. You can "retroactively" apply a Kalman filter to a dataset and see some improvement, but you'll only get amazing results…
Re: Understanding the Kalman filter with a simple radar example
#27This seems to be an ad for a fairly expensive book on a topic that is described in detail in many (free) resources. See for example: https://rlabbe.github.io/Kalman-and-Bayesian-Filters-in-Pyth... Is there something in this particular resource that makes it worth buying?
Re: Understanding the Kalman filter with a simple radar example
#28Earlier quoted context omitted.
[flagged]
The tutorial actually predates ChatGPT by quite a few years (first published in 2017). Today, I do sometimes use ChatGPT to fix grammar, but I am responsible for the content and it is always mine.
> Don't post generated comments or AI-edited comments. HN is for conversation between humans.
Re: Understanding the Kalman filter with a simple radar example
#29I really loved this one: https://www.bzarg.com/p/how-a-kalman-filter-works-in-picture...
Basically, a Kalman filter is part of a larger class of "estimators", which take the input data, and run additional processing on top of it to figure out the true measurement.
The very basic estimator a low pass filter is also an "estimator" - it rejects high frequency noise, and gives you essentially a moving average. But is a static filter that assumes that your process has noise of a certain frequency, and anything below that is actual changes in the measured variable.
You can make the estimator better. Say you have some idea of how the process variable should behave.For a very simple case, say you are measuring temperature, and you have a current measurement, and you know that change in temperature is related to current being put through a winding. You can capture that relationship in a model of the process, which runs along side the measurement of the actual temperature. Now you have the noisy temperature reading, the predicted reading (which acts like a mean), and you can compute the covariance of the noise, which then you can use to tune the parameter of low pass filter. So if your noise changes in frequency for some reason, the filter will adjust and take care of it.
The Kalman filter is an enhanced version of above, with the added feature of capturing correlation between process variables and using the measurement to update variables that are not directly measurement. For example, if position and velocity are correlated, a refined measurement on the position from gps, will also correct a refined measurement on velocity even if you are not measuring velocity (since you are computing velocity based of an internal model)
The reason it can be kind of confusing is because it basically operates in the matrix linear space, by design to work with other tools that let you do further analysis. So with restriction to linear algebra, you have to assume gaussian noise profile, and estimate process dependence as a covariance measure.
But Kalman filter isnt the end/all be all for noise rejection. You can do any sort of estimation in non linear ways. For example, I designed an automated braking system for an aircraft that tracks a certain brake force command, by commanding a servo to basically press on a brake pedal. Instead of a Kalman filter, I basically ran tests on the system and got a 4d map of (position, pressure, servo_velocity)-> new_pressure, which then I inverted to get the required velocity for target new pressure. So the process estimation was basically commanding the servo to move at a certain speed, getting the pressure, then using position, existing pressure, and pressure error to compute a new velocity, and so on.
Re: Understanding the Kalman filter with a simple radar example
#30Kalman filters are very cool, but when applying them you've got to know that they're not magic. I struggled to apply Kalman Filters for a toy project about ten years ago, because the thing I didn't internalize is that Kalman filters excel at offsetting low-quality data by sampling at a higher rate. You can "retroactively" apply a Kalman filter to a dataset and see some improvement, but you'll only get amazing results…
Yeah, I try to err on the side of not using them unless the accuracy obtained through more robust methods is just a no-go, because there are so many ways they can suddenly and irrecoverably fail if some sensor randomly produces something weird that wasn't accounted for. Which happens all the time in practice.