TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How a Kalman filter works, in pictures

194 pointsby gballanalmost 5 years ago

15 comments

pgtalmost 5 years ago
I built a smart volume control system out of distributed Kalman filters + classic PID control to track the EBU-128 loudness envelope of an unknown sound source and attenuate the music gain to keep it at a comfortable level: <a href="https:&#x2F;&#x2F;wallfly.webflow.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wallfly.webflow.io&#x2F;</a><p>The challenge comes when dealing with silence, or breaks in a song: if you detect silence, should the volume go up or down? Of course, the dynamics make the music and should not change, but you don&#x27;t know that without access to the source signal. So you add latency to the PID controller, but then you get overshoot (classic time&#x2F;accuracy trade-off).<p>To do perfect control you need access to the source signal, or lookahead, but you can still do a pretty good job without the source signal by capping the signal gain, i.e. only attenuate and never add amplify. Still compresses the signal, though.<p>There are some clever tricks used in radar systems that you can use to estimate the noise in a room, like coherence: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Coherence_(signal_processing)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Coherence_(signal_processing)</a>.<p>In an LTI (linear time-invariant system), coherence can compare the acceleration of both input and output signals to calculate the power (but not the contents) of external signals that entered the system.<p>Coherence, is in my opinion, underused in industry.
mjburgessalmost 5 years ago
The use of color to impart additional semantics in mathematical equations, at least to this degree, is not something I have considered before.<p>This is going to change a lot in how I communicate with math.
评论 #23949014 未加载
评论 #23947627 未加载
评论 #23965430 未加载
评论 #23950544 未加载
评论 #23947783 未加载
评论 #23950026 未加载
评论 #23948173 未加载
xaedesalmost 5 years ago
When implementing Kalman filters a common issue is that the covariance matrix P retards to be not positive semi-definite due to numerical errors. When this happens the Kalman filter may result REALLY weird results.<p>There is an easy fix for this that is rarely mentioned, except one runs into this issue and googles it: After updating (prediction and observation) P just ensure its positive semi-definiteness by averaging with its transpose:<p>P := (P+transpose(P))&#x2F;2
评论 #23950722 未加载
timeinputalmost 5 years ago
I recommend this article frequently when someone is looking to learn about Kalman filters. It&#x27;s got some nice I intuition building descriptions. I also like <a href="https:&#x2F;&#x2F;github.com&#x2F;rlabbe&#x2F;Kalman-and-Bayesian-Filters-in-Python" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rlabbe&#x2F;Kalman-and-Bayesian-Filters-in-Pyt...</a>
The_rationalistalmost 5 years ago
The latest innovative mainstream use of a Kalman filter that I&#x27;m aware of is from a Microsoft contribution to chromium, for better tracking the mouse: <a href="https:&#x2F;&#x2F;chromium-review.googlesource.com&#x2F;c&#x2F;chromium&#x2F;src&#x2F;+&#x2F;1822657" rel="nofollow">https:&#x2F;&#x2F;chromium-review.googlesource.com&#x2F;c&#x2F;chromium&#x2F;src&#x2F;+&#x2F;18...</a>
xchipalmost 5 years ago
Nice, I wrote an article too that helps develop an intuition without much math<p><a href="https:&#x2F;&#x2F;aguaviva.github.io&#x2F;KalmanFilter&#x2F;KalmanFilter.html" rel="nofollow">https:&#x2F;&#x2F;aguaviva.github.io&#x2F;KalmanFilter&#x2F;KalmanFilter.html</a>
评论 #23950429 未加载
评论 #23947604 未加载
评论 #23947875 未加载
msadowskialmost 5 years ago
If you want to learn Kalman Filter in depth then I can recommend the open source interactive book Kalman and Bayesian Filters in Python <a href="https:&#x2F;&#x2F;github.com&#x2F;rlabbe&#x2F;Kalman-and-Bayesian-Filters-in-Python" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rlabbe&#x2F;Kalman-and-Bayesian-Filters-in-Pyt...</a>
isattyalmost 5 years ago
When I used to develop Kalman filters, visualizing the covariances was the best way to understand&#x2F;debug the setup. Two great libraries that I used were eigen3 (for the filter) and point cloud library (<a href="https:&#x2F;&#x2F;pointclouds.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pointclouds.org&#x2F;</a>) for visuals.
bionhowardalmost 5 years ago
Yes, and I love the pictures, but I wish they had a key attached, with the simple English name of each variable in the equation, because it’s no fun to hunt around a long article for the definition of a one letter variable. Common problem on Arxiv
ogogmadalmost 5 years ago
See my recent submission on particle filters for an alternative to Kalman filters: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23948245" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23948245</a>
carrolldunhamalmost 5 years ago
One thing the textbooks and explainers never seem to think to do is start with the one-dimensional case. All the confronting looking matrix equations reduce to an intuitive, even obvious set of arithmetic operations.
评论 #23947285 未加载
SturgeonsLawalmost 5 years ago
I enjoy these sorts of articles, but man no matter how many times I read one the mathematical equations just look like hieroglyphics to me
评论 #23947415 未加载
ezconnectalmost 5 years ago
This video series helped me finally understand how to use Kalman Filters. <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CaCcOwJPytQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=CaCcOwJPytQ</a>
bl0balmost 5 years ago
Great article. I&#x27;ve been trying to grok the Kalman filter for a while now, definitely seems to have clicked a little more this time. BTW if the author sees this the link at the bottom &#x27;Some credit and referral should be given to...&#x27; seems to be broken.
doomroboalmost 5 years ago
(2015)