NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Understanding the Kalman filter with a simple radar example (kalmanfilter.net)
alex_be 3 hours ago [-]
Author here.

I recently updated the homepage of my Kalman Filter tutorial with a new example based on a simple radar tracking problem. The goal was to make the Kalman Filter understandable to anyone with basic knowledge of statistics and linear algebra, without requiring advanced mathematics.

The example starts with a radar measuring the distance to a moving object and gradually builds intuition around noisy measurements, prediction using a motion model, and how the Kalman Filter combines both. I also tried to keep the math minimal while still showing where the equations come from.

I would really appreciate feedback on clarity. Which parts are intuitive? Which parts are confusing? Is the math level appropriate?

If you have used Kalman Filters in practice, I would also be interested to hear whether this explanation aligns with your intuition.

magicalhippo 2 hours ago [-]
I just glossed through for now so might have missed it, but it seemed you pulled the process noise matrix Q out of a hat. I guess it's explained properly in the book but would be nice with some justification for why the entries are what they are.
alex_be 2 hours ago [-]
To keep the example focused and reasonably short, I treated Q matrix as given and concentrated on building intuition around prediction and update. But you're right that this can feel like it appears out of nowhere.

The derivation of the Q matrix is a separate topic and requires additional assumptions about the motion model and noise characteristics, which would have made the example significantly longer. I cover this topic in detail in the book.

I'll consider adding a brief explanation or reference to make that step clearer. Thanks for pointing this out.

magicalhippo 22 minutes ago [-]
Yeah I understand. I do think a brief explanation would help a lot though. As it sits it's not even entirely clear if the presented matrix is general or highly specific. I can easily see someone just use that as their Q matrix because that's what the Q matrix is, says so right there.
seanhunter 1 hours ago [-]
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 explanation of the filter (as a method for estimating the state of a system under uncertainty) was great but (unless I missed it) when you introduced the equations I wasn't clear that was the filter. I hope that makes sense.

alex_be 55 minutes ago [-]
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 that uses this model to estimate the current state and predict the future state.

I'll consider making that distinction more explicit when introducing the equations. Thanks for pointing this out.

renjimen 2 hours ago [-]
You lead with "Moreover, it is an optimal algorithm that minimizes state estimation uncertainty." By the end of the tutorial I understood what this meant, but "optimal algorithm" is a vague term I am unfamiliar with (despite using Kalman Filters in my work). It might help to expand on the term briefly before diving into the math, since IIUC it's the key characteristic of the method.
alex_be 1 hours ago [-]
That's a good point. "Optimal" in this context means that, under the standard assumptions (linear system, Gaussian noise, correct model), the Kalman Filter minimizes the estimation error covariance. In other words, it provides the minimum-variance estimate among all linear unbiased estimators.

You're right that the term can feel vague without that context. I’ll consider adding a short clarification earlier in the introduction to make this clearer before diving into the math. Thanks for the suggestion.

KellyCriterion 1 hours ago [-]
You could do a line extension of your product, like "Kalman Filter in Financial Markets" and sell additional copies :)
alex_be 47 minutes ago [-]
That's an interesting idea. The Kalman filter is definitely used in finance, often together with time-series models like ARMA. I've been thinking about writing something, although it's a bit outside my usual engineering focus.

The challenge would be to keep it intuitive and accessible without oversimplifying. Still, it could be an interesting direction to explore.

palata 1 hours ago [-]
joshu 1 hours ago [-]
i liked how https://www.bzarg.com/p/how-a-kalman-filter-works-in-picture... uses color visualization to explain
alex_be 42 minutes ago [-]
That's a good article. I also like the visual approach there. My goal here was a bit different. I walk through a concrete radar example step by step, and use multiple examples throughout the tutorial to build intuition and highlight common pitfalls.
smokel 2 hours ago [-]
This 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?

alex_be 38 minutes ago [-]
That's a fair question. My goal with the site was to make as much material available for free as possible, and the core linear Kalman filter content is indeed freely accessible.

The book goes further into topics like tuning, practical design considerations, common pitfalls, and additional examples. But there are definitely many good free resources out there, including the one you linked.

cwood-sdf 1 hours ago [-]
i haven't seen much from other kalman filter resources, but i can say that this book is incredibly detailed and i would highly recommend it

if you dont want to buy the book, most of the linear kalman filter stuff is available for free: https://kalmanfilter.net/kalman-filter-tutorial.html

lelandbatey 58 minutes ago [-]
Kalman 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 if you sample your very-noisy data at a much higher rate than if you were sampling at a "good enough" rate. The higher your sample rate, the better your results will be. In that way, a Kalman filter is something you want to design around, not a "fix all" for data you already have.
alex_be 35 minutes ago [-]
[dead]
unit149 10 minutes ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 20:27:15 GMT+0000 (Coordinated Universal Time) with Vercel.