← Notes · 21 November 2026 · 4 min read

How much grip can a controller count on?

A real-time MPC can drive a car close to the tyres' limit, as long as it knows where that limit is. On a wet road it doesn't. Six seconds of driving data give a grip value that is guaranteed, and that is enough to finish the lap.

My real-time MPC for a car plans every 20 ms with a tyre model and solves its optimisation problem in about a millisecond. One number in that model matters more than any other: the road friction. On a dry road it is about 1.0. On a wet one it might be 0.6, and nobody tells the controller.

If the controller keeps planning with 1.0 on a road that gives 0.6, it brakes too late and corners too fast. In my simulation of exactly that case, the car spun after 344 m.

The obvious fix, and why it isn’t enough

You could measure tyre forces for a while and fit a curve. But a fitted curve is an estimate, and it can come out a little too high. At the limit, “a little too high” is precisely what spins the car. What the controller needs is a value it can rely on: a lower bound on the grip that is true, not just likely.

Six seconds of data

Before driving the lap, the car does a short steering manoeuvre on an open pad and logs slip angle against lateral force, with sensor noise of ±0.02. The tyre curve is unknown, but two things about its shape are known from physics: how steep it can be at most (the tyre’s stiffness), and how fast the force can fall once the tyre slides past its peak.

My toolbox ddma turns those two bounds and the noisy samples into a band that contains every tyre curve consistent with the data. The certified grip is the largest force the band guarantees. It comes out at 0.57, for a true value of 0.6. It is never above the true value, which I tested on roads with friction 0.4, 0.6 and 0.8.

The lap

Two NMPCs on a road with friction 0.6

Planning with the certified 0.57, the car finishes the lap in 72.6 s. A controller that magically knows the true friction finishes in 71.1 s. The guarantee costs 2 % of lap time, and the car never spins.

The same recipe, three times

The real-time MPC project uses this idea on all three of its platforms, each time for the one quantity that decides whether the plan is feasible:

  • Car: the road friction, as above.
  • Quadrotor: the thrust of a damaged rotor. From a one-second hop, ddma certifies 3.48 N for a rotor that can really give 3.5 N, and the drone keeps flying a figure-8 at 10 m/s where planning with the rated thrust crashes it.
  • Robot arm: joint friction. A model learned from a 6 s calibration motion, with a certified worst-case error of 0.3–0.7 N m per joint, brings the tracking error to 0.05 mm, the same as a controller that knows the true friction.

The lesson

A safety margin doesn’t have to be a hand-tuned “be careful” factor. It can come from data, with a guarantee, and cost only a few percent of performance.

Code and full results: vehicle-nmpc, quadrotor-nmpc, arm-nmpc.