Back to feed

Why Kalman Filters Work So Well: One Right Estimate from Two Wrong Sources

Apollo's Moon-bound computer blended physics predictions with star sightings; this video carries the same idea through bell curves, gain, and the predict-update loop, from the phone in your pocket to electric cars.

Imported to Nodesdaily: (UTC+03:00)
Watch on YouTube — zFmO_b05jU4
Reading options

Device speech is unavailable in this browser.

Concept lens

Choose a technical term in this view to read its general definition, teaching example and use in the article.

No terms from our glossary were found in this view. The glossary does not cover every term yet.

In 1968, three astronauts rode toward the Moon steered by an onboard machine holding merely a few kilobytes of working memory. For the whole trip that machine had to keep track of the craft's exact position, using two approaches: physics and measurement. The physics was simple; if your earlier position and velocity are known, you can compute where you ought to be now. But the tiniest error carries into the next calculation, errors accumulate, and the estimate slowly drifts away from the true position. According to NASA's Apollo navigation account, corrections from star sightings were what kept this drift in check.

The second way was the measurement itself: the astronauts sighted stars through a sextant and used those observations to correct the estimate. These readings never suffered cumulative drift and stayed anchored to reality; but every sighting carried its own noise, so the readings jumped around from one to the next. The navigation software combined the two sources, and the result beat either one alone. The same idea runs in the phone in your pocket today: a motion model is blended with GPS measurements so the blue dot on the map holds steady even when the signal turns noisy. This technique is the Kalman filter.

First, name what is being estimated: the state

To see why combining two sources that are each wrong in different ways gives a more reliable result, first name the thing actually being estimated: the state , the set of numbers describing the system right now. For a car on a road the state may be as simple as its position; in a more realistic case it could also include velocity and acceleration. The catch is that this state can never be observed perfectly; there are always the same two flawed sources, one from a model of how the system moves and one from a sensor measuring it.

Each source fails in its own way. The model gives a smooth prediction, but every prediction error carries forward; the longer it is relied on, the further it can drift, and reality never pulls it back. The sensor never loses touch with reality, yet each reading carries noise, so the estimate trembles with every new measurement. Trusting only the sensor means a jumping estimate, trusting only the model means a drifting one. Simply averaging the two at a fixed 50/50 split only makes sense when both sources are equally reliable; in practice that is almost never true.

The bell curve and the 6-meter surprise

The fix is a weight reflecting how much each source deserves to be trusted right now. To build it, the filter tracks not only its best estimate but also how uncertain that estimate is: belief is represented not by a single number but by a bell curve , where the center is the best guess and the spread, called the variance, says how unsure we are. The thought experiment goes like this: from previous position, speed, and elapsed time, the model predicts the car is at 100 meters with variance 4, so the estimate is usually within about 2 meters of truth. At the same moment GPS reports 106 meters but is sloppier, with variance 12, so its readings are typically off by three or four meters. The two estimates disagree by 6 meters; the gap between predicted and measured is called the innovation , or more simply the surprise.

How much of that 6-meter surprise should be believed? The Kalman filter answers with a number called the Kalman gain : the gain is the prediction variance divided by the total variance of both sources, so 4 over 4 plus 12 equals 1/4. The filter moves a quarter of the way from prediction toward measurement; a quarter of 6 meters is 1.5, so rather than leaping the full span from 100 to 106, the refreshed estimate settles at 101.5 meters. It stays close to the prediction because this time the prediction was the reliable one. According to the equation summary on kalmanfilter.net, this predict-update ordering forms the filter's five core equations. Where it gets more interesting is the uncertainty: after the update the new variance is 3, smaller than the prediction's 4 and far smaller than the GPS's 12. So combining a fairly good source with a worse one produced an estimate better than the good source alone. The reason is that the gain is chosen to minimize the remaining variance: if prediction and sensor errors are independent, the combined variance can be written directly, raising the gain shrinks the prediction contribution while growing the sensor one, and somewhere between lies the point of minimum total variance. Setting the slope to zero yields exactly the expression used before. The update also takes a tidy reciprocal form: the reciprocal of the fresh variance is the sum of the reciprocals of the prediction and sensor variances. Since a reciprocal of variance is called precision, precisions simply add, and one quarter plus one twelfth makes one third.

The predict-update loop and the self-made equilibrium

The gain behaves exactly as wanted: with a perfect sensor its variance is zero, the gain becomes one, and everything moves to the measurement; with an extremely noisy sensor the gain approaches zero and the reading is mostly ignored. But the car keeps moving after one measurement, so the filter repeats this process while its own uncertainty evolves. In the prediction step the model carries the estimate forward; a car at 20 m/s is predicted 20 meters down the road a second later, while uncertainty grows because the model is never perfect, adding extra variance called process noise at every step, one unit per second in this example. Then a measurement arrives and the update step computes the gain, shifts the estimate partway from prediction toward measurement, and tightens the variance again; the bell curve widens on prediction and is pulled back in on measurement. To see how that settles over time, start the filter with a terrible first guess at variance 100, an admission of near-total ignorance. At the first update the gain comes out around 9/10, so the filter leans on GPS, exactly right while the model is still deeply uncertain, and variance falls to around 11. Next step the gain drops to roughly 1/2, then a little over 1/3, settling near 1/4 after about 10 steps; variance then moves between 4 after prediction and 3 after update, the same numbers as the earlier example, which was no hand-picked weight but the filter in its steady state. The point that matters: nobody told the filter to trust GPS by one quarter; that weight emerged from the process and sensor noise themselves.

The covariance matrix: estimating what is never measured

So far only one number was estimated; real systems have several quantities changing together, including some the sensors never measure directly. Take the same car but estimate both position and velocity while GPS keeps reporting only position: the state now holds two numbers and uncertainty needs more than a single variance. Instead a small table called the covariance matrix is used; diagonal entries give the uncertainty in position and velocity individually, while off-diagonal entries say how errors in the two are related. That link appears naturally in prediction: position advances by velocity, so a high velocity estimate pushes the predicted position too far ahead, the two errors become coupled, and the filter tracks the coupling. When fresh GPS arrives the connection pays off: if the car reads behind prediction, the filter not only pulls position back but also lowers the velocity estimate, knowing position and velocity errors move together, though GPS never measured velocity at all. The equations grow heavier with matrices; the logic stays identical.

Real systems and where the filter breaks

This matrix form runs in far more realistic systems: Apollo's navigation tracked position and velocity in three dimensions while star sightings revealed only pieces of that state; a phone fuses slow GPS updates with far faster accelerometer and gyroscope readings. According to a smartphone navigation study published by MDPI, adapted filters fusing different-rate gyro and accelerometer data markedly improve position continuity on Android phones. An Athens technical university evaluation archived by NIH in PMC rigorously measures phone GNSS and IMU sensor performance. Electric vehicles can estimate battery charge, never directly measurable, with the same general idea; according to a parameter-adaptive extended Kalman study published by Nature, adaptive filters harden charge estimation on lithium-ion batteries.

All of that works while the filter's assumptions hold; once they start breaking, the basic Kalman filter runs into trouble. The first major assumption is that the system is linear , meaning prediction and measurement follow straight-line relationships; a bell curve passing through a linear system stays a bell curve, keeping uncertainty math manageable. Real systems are not always so convenient: a turning vehicle or a range-and-angle radar involves curved relationships, and the basic filter no longer applies directly. One common fix is the extended Kalman filter , treating the curved system as locally straight near the present estimate; a second route is the unscented Kalman filter , sending carefully chosen points through the nonlinearity to estimate how the distribution changes. Where uncertainty cannot be held in one bell curve at all, particle filters carry the idea further and represent the distribution as a large cloud of samples. According to MathWorks and its van der Pol oscillator example, unscented Kalman and particle filters keep estimation alive on such curved systems.

There is another way the filter can fail: being handed the wrong noise levels. Told the model is far more reliable than it is, the predicted variance ends up understated, the gain sinks, and the filter begins to disregard readings that ought to have corrected it. The estimate can then drift from reality while the filter grows ever more confident it is right, which is why choosing realistic process and sensor noise values is such a central part of deploying one in practice. Beneath all the matrices and variants the Kalman filter keeps doing the same thing: tracking its current convictions, the doubt attached to them, and the trust each fresh datum deserves, then using that uncertainty to decide what weight each source deserves. That is how two imperfect sources of information yield an estimate more reliable than either alone.

Visualization: nodesdaily AI

Key moments

  1. 1968 Apollo opening: physics math versus star sightings
  2. Drift versus noise: two flawed sources
  3. The state concept and the phone GPS analogy
  4. Representing uncertainty with bell curves
  5. Car example: 100-meter prediction, 106-meter GPS
  6. Gain math: 1/4 and the 101.5-meter estimate
  7. Precisions add: variance falls from 4 to 3
  8. Predict-update loop and process noise
  9. From a terrible first guess to steady state in 10 steps
  10. Covariance matrix estimates velocity never measured
  11. Real systems: Apollo, phones, EV batteries
  12. Limits: EKF, UKF, particle filters, wrong-noise trap

AI commentary

"The story carries one thought experiment on the same car example from start to finish, giving every formula flesh with numbers, so even the abstract variance-gain link turns intuitive. The only thin layer is the historical background, but the logic of the method comes across flawlessly."

AI assessment

The strongest counterargument here bounds the optimality claim: the Kalman filter is the best estimate only when the system is truly linear and the noises truly Gaussian. The turning-car and radar examples show how fragile that is; the extended version can diverge on linearization error, the unscented version is sensitive to point selection, and particle filters face a brutal trade between sample count and compute cost. The elegant 1/4 calculation in the video is therefore not a promise but a result that holds when the assumptions do.

What is left out matters too. The historical layer is thin: the 1968 computer goes unnamed as the Apollo Guidance Computer, the filter's name source Rudolf Kalman is never mentioned, nor is Stanley Schmidt, who carried it into real-time flight. The derivation itself is skipped as well: the gain is said to minimize variance but the slope calculation is never shown, and the matrix equations never appear. None of that would fit a 15-minute format; but anyone turning the formulas into code will still need an equation reference such as kalmanfilter.net.

The narrator's position is educator, not seller. The Synthetic Mind is a math storytelling channel; the video carries no product, sponsored tool, or inflated futurism, only a subscription ask. That neutrality builds trust; yet leaning on a single narrative source has risks, especially on practical calls such as EKF versus UKF, where viewers should seek a second opinion.

The practical takeaway fits in three sentences. With a noisy sensor, a smooth but drifting model, and a rough idea of both noise levels, the Kalman filter is the first tool to try; inventing the noise levels turns the filter into a self-assured liar. On nonlinear systems try EKF first, then move to UKF and particle filters once a single bell curve stops sufficing. And the next time the blue dot on your phone refuses to jump, you will know precisions were being added behind the curtain.

Sources

7 links; no other published story cites them. Stories sharing a link do not confirm each other; a source's origin is not inferred from how often it is cited.

kalman filter · state estimation · apollo · sensor fusion · gps · covariance

Follow the topic

Before this story

A short reading order from earlier stories linked to this event by an editor.

Evidence and sources

Review permitted source passages, versions and origins.

KAYNAKLARLA OKU

Bu haberi açalım.

Hesap kontrol ediliyor…