NEURON VISION← All reviews

About this review

Every sensor lies a little. A Kalman filter blends what a robot expects with what it measures, weighted by trust. Eight slides: the loop, the gain, a worked number, and where robots use it.

Source: Explainer · Kalman filters for robotics

Transcript

Welcome. This is Kalman filters, explained for robots. Every sensor lies a little. A Kalman filter blends what the robot expects with what it measures, and trusts each one by how reliable it is. It has guided robots, aircraft and spacecraft for more than sixty years.

Here is the problem. G P S jumps by metres, updates slowly, and disappears indoors. Wheel odometry is smooth, but every slip adds error that never goes away. An I M U gives hundreds of readings a second, but adding up its noise makes the position wander. No single source is fast, smooth and trustworthy at once.

Here is the core idea. The blue curve is the prediction, where the model says the robot should be. It is wide, because motion is imperfect. The orange curve is the sensor reading. It is sharper. The green curve is the fused estimate. It lands nearer the sharper source, and it is narrower than both.

The filter works in a loop. First it predicts. It pushes the estimate forward using the motion command, and doubt grows. Then it updates. It compares with the sensor reading and corrects, and doubt shrinks. It remembers only two things, the latest estimate and how unsure it is. No history is needed.

How much should the robot trust the sensor? That is the Kalman gain, called K. It equals the robot's own uncertainty, divided by that uncertainty plus the sensor noise. If the sensor is noisy, K is near zero. If the robot is lost, K is near one. The gain is computed fresh on every tick.

Let's use real numbers. The prediction says ten metres, with variance four. G P S says twelve metres, with variance one. The gain is four divided by five, which is zero point eight. The correction is zero point eight times two metres, so the new estimate is eleven point six metres. The variance drops to zero point eight, smaller than both.

Robots use this everywhere. Warehouse robots fuse wheels, lidar and G P S to find their position. In slam, the robot and the landmarks share one state, so seeing a landmark again corrects the whole map. Drones blend an I M U, a barometer and G P S. Arms, self driving cars and spacecraft use it too. Apollo navigation famously did.

The filter has limits. The pure version assumes straight line motion and bell curve noise, so turning robots need extended, unscented or particle filters. Wrong noise settings make it overconfident or sluggish. And the cost grows fast with the state size. Double the state, and the work grows eight times. The next deck is about exactly that.

Related reviews

Robotics · Explainer

All reviews

Explainer · Robotics · Kalman filters

Kalman filters: how a robot knows where it is

Every sensor lies a little. A Kalman filter blends what the robot expects with what it measures, and trusts each in proportion to how reliable it is. It has steered robots, aircraft and spacecraft for more than sixty years.

orange dots: noisy sensor readingsdashed: where the robot really wentgreen: Kalman estimate
Noisy sensorTrue pathKalman estimate
01 · The problem

Sensors lie, motors drift

GPS

Knows roughly where you are on Earth, but jumps by metres, updates slowly, and vanishes indoors or in a tunnel.

Wheel odometry

Smooth and fast, but every slip adds error that never goes away. The longer the drive, the further it drifts.

IMU

Accelerometer and gyroscope, hundreds of readings a second. Adding up their noise makes the position wander.

No single source is fast, smooth and trustworthy at once. Fusing them with the right weights is the whole job of a Kalman filter.
02 · The core idea

Two guesses, one better guess

Prediction10.0 m, wide Measurement12.0 m, sharper Fused: 11.6 mnarrowest of all 6810121416

Prediction

Where the model says the robot should be. Wide, because motion is imperfect.

Measurement

Where the sensor says it is. Sharper here, but noisy.

Fused estimate

Lands nearer the sharper source and is narrower than both.

03 · The loop

Predict, then update, forever

1 · Predictpush the state forward, uncertainty grows 2 · Updateblend in the sensor, uncertainty shrinks belief + doubtnew belief becomes the next starting point Motion commandwheels turn, arm moves Sensor readingGPS, lidar, camera, IMU
04 · The Kalman gain

How much to trust the sensor

K = P / (P + R)new estimate = old estimate + K × (measurement − old estimate)
P: how unsure the robot is of itselfR: how noisy the sensor is
Sensor is noisy
K near 0
Evenly matched
K = 0.5
Robot is lost
K near 1

The bars are illustrative. Gain is not a setting you pick: it is computed fresh every tick from the two uncertainties.

05 · One worked number

A one-dimensional robot, one tick

10.0 m
prediction, variance 4
12.0 m
GPS reading, variance 1
K = 0.8
4 ÷ (4 + 1)
11.6 m
result, variance 0.8
The answer is closer to the sharper source, and more certain than either. That is the curve on slide 3.
06 · In robotics

Where robots use it

Localization

Wheels, lidar and GPS fused into one pose for a warehouse or delivery robot.

SLAM

Robot and landmarks live in one state, so seeing a landmark again corrects the whole map. The classic EKF-SLAM.

Drones

IMU, barometer and GPS blended to keep attitude and position steady in flight.

Robot arms

Joint encoders and force sensors fused to track where the hand really is.

Self-driving

Tracking other cars and pedestrians frame after frame, smoothing detector jitter.

Spacecraft

Rudolf Kálmán published the filter in 1960. Apollo navigation famously used it.