- A linear sensor is a matrix: z = Hx. Doubling the state doubles the reading, and readings add.
- A range sensor (radar, sonar, ultrasound, radio beacon) measures distance r = √(x² + y²). That is nonlinear: no matrix H gives it.
- A Gaussian pushed through a curve is no longer a Gaussian: it bends and gets lopsided.
- Its mean shifts: the average distance is not the distance of the average position. The shift is worst close to the sensor, where the curve bends most.
A GPS reads position, a radar reads distance
In lesson 3 the sensor gave us the position directly. The matrix H picked the position out of the state: z = Hx. Every step of the matrix filter relied on that.
Now put a radar on a post at the origin. It sends out a pulse, times the echo and reports one number: the range r, the straight-line distance to the robot.
It does not say where the robot is, only how far. All the points at the same distance form a circle around the radar, like the ground a dog on a leash can reach.
Three different places, one reading.
Why no matrix H can do this
A matrix sensor has two habits. Readings add: H(a + b) = Ha + Hb. And they scale: H(2a) = 2Ha, and H(−a) = −Ha. Distance breaks both.
So there is no H. The square root makes the sensor nonlinear: plot r against x (with y held fixed) and you get a bend, not a straight line. Our filter equations, built on z = Hx, have nothing to plug in.
A Gaussian through a curve bends
The filter does not know the robot's position exactly. It holds a Gaussian: a best guess plus a cloud of possible positions around it. What does that cloud look like after the radar?
Take each possible position and work out its distance. Far from the radar, the cloud is small compared with the distance. Across the cloud, the circles of equal distance look almost like straight lines. So the distances come out close to a Gaussian, centred close to the distance of the best guess.
Close to the radar, the cloud reaches right past it. A straight-line sensor would say the reading drops 1 m for every metre you move toward the radar, and keeps dropping past it, below zero. The real radar can't: a point 0.5 m past the radar reads +0.5 m, not −0.5 m. Points off to the side also read farther than a straight line says, because the circles curve. All these errors go the same way, up. So the bell becomes lopsided, and its mean is pushed away from the radar.
The mean shifts
This is the trap. The tempting shortcut is "the robot is probably at (x̂, ŷ) (the hat means "estimate"), so the radar should read about √(x̂² + ŷ²)". But the average distance is bigger than the distance of the average position. For a round cloud with standard deviation σ in x and in y, at distance r, the gap is about σ²/(2r) (a known approximation; no need to derive it). It is tiny far away and large up close.
In the lab, 400 possible positions go through the radar. The "linear guess" is what a straight-line sensor would give: a bell at the shortcut distance with the same spread σ as the position. A round cloud with standard deviation σ in x and in y gives a range spread of about σ; slide 3 shows why. Far away, at (6, 8), the true distances and the linear guess almost match: the lab prints an average of 10.07 m against 10 m. Bring the robot to 1 m from the radar and they fall apart.
Keep reading with the full course
Finish lesson 4 and you will be able to: track a robot from range-only radars with an EKF.
Still locked here:
- The rest of this explanation
- 3 more examples with step-by-step solutions
- Five extra members-only problems with worked solutions
$20 once, lifetime access. Lessons 1 and 2 stay free.
Examples
Example 1 · A GPS is linear
A GPS reads the position (x, y) with some noise. As a matrix: H = 1001.
Show solutionHide solution
Readings double and flip sign exactly with the state. That is what "linear" means.
Example 2 · A radar is not
The radar at the origin reads r = √(x² + y²).
Show solutionHide solution
One failure is enough: no matrix H gives these readings.

Questions and comments
Stuck on something, or found a mistake? Ask here and I'll answer. You sign in with GitHub.