Left Half-Plane
feedforward · preview control

Preview

Draw your racing line on today's road. Pick a speed and how far ahead the steering looks. The car has a lag it does not tell you about, and gates that the centre line misses.

world —runs today 0best today —centre line, no preview —
Where you stand today

Cost is in seconds: lap time, plus three for every second off the road, plus two per missed gate. The steering is a feedback controller on your line plus a feedforward term from the line's curvature a distance L ahead. With L = 0 the feedforward arrives late by exactly the lag; the faint ghost drives your line that way. Lateral grip is finite, so a tight line at high speed slides wide. The second rung is the centre line with the two knobs at their best for today, so beating it takes a line of your own. Your hand-drawn line is the controller here.

The trick

Use the width of the road, and look ahead

Tyres have a limit. The lateral acceleration v²κ must stay under it or the car slides, and here it slides wide and loses time off the road. The centre line has the road's curvature; a good line uses the width of the road to make the curvature smaller, cutting each apex and running wide on the exit, which is why racing drivers do not drive down the middle and why your hand can beat the geometry. Then look ahead: the faint ghost drives your line with L = 0, and every corner it enters a beat late is the hidden lag made visible. A smooth line is a feasible line, and the right look-ahead is about speed times lag.

Cards
Feedback is always late, a lag makes it later, and gain does not fix it.latency
e−sτ: gain 1, phase −ωτ ⇒ the phase margin is spent once ωc τ ≈ φma delay costs phase at every frequency, and nothing in the gains gives it back

A controller that reacts to error can act only once the error exists; that is the price of feedback, worth paying because feedback needs to know little about the world. Put a lag between command and effect and the reaction lands later still. The lag has unit gain, so a magnitude plot never shows it; only the phase does, and a loop whose crossover sits near 1/τ oscillates however you tune it.

Numbers from this series: the steering lag here is 100–250 ms, and at speed a beat is a metre of gravel; in Stable is Still, 10–40 ms of actuator delay is what makes Riccati beatable; in the lab the balancing LQR falls at about 40 ms and no stiffness saves it. Two things beat a delay: knowing the future (preview, this game) or predicting the present from the past (a Smith predictor; Time Machine).

Where this game · Stable is Still · the lab's latency knob
Deeper Åström & Murray, Feedback Systems, ch. 14, fundamental limits · O. J. M. Smith, 1957

The future you can see is worth more than any gain on the present.feedforward
a = kp(r − y) + kd(ṙ − ẏ) + v² r″(x + L), L ≈ v τfeedback on the error, plus the acceleration the line will demand one lag from now

Two degrees of freedom: feedback for what you do not know, feedforward for what you do. A curve of curvature κ at speed v needs lateral acceleration v²κ, so command it before the error appears. Preview control reads the reference a little into the future, so a command that takes τ to act is issued τ early; in distance that is speed times lag, which is why the slider's sweet spot moves with the speed.

Feedforward is only as good as the model it is computed from: with the wrong lag the preview arrives early or late, and with a wrong plant the inverse is wrong. When the plant cannot be inverted at all, because a zero sits in the wrong half-plane, the remedy is to cancel its phase instead of its gain, which is Plotter. Walking robots preview footsteps, machine tools preview toolpaths, cars preview the map.

Where this game · Plotter and Echo
Deeper Tomizuka & Whitney, Optimal discrete finite preview problems, 1975 · Kajita et al., preview control of the ZMP, 2003 · Åström & Murray ch. 8 and 12, two-degree-of-freedom design

References
  1. M. Tomizuka and D. E. Whitney, "Optimal discrete finite preview problems (why and how is future information important?)," ASME Journal of Dynamic Systems, Measurement, and Control, vol. 97, no. 4, pp. 319–325, 1975.
  2. T. B. Sheridan, "Three models of preview control," IEEE Transactions on Human Factors in Electronics, vol. HFE-7, no. 2, pp. 91–102, 1966.
  3. O. J. M. Smith, "Closer control of loops with dead time," Chemical Engineering Progress, vol. 53, no. 5, pp. 217–219, 1957.
  4. D. H. Weir and D. T. McRuer, "Dynamics of driver vehicle steering control," Automatica, vol. 6, no. 1, pp. 87–104, 1970.
  5. E. Donges, "A two-level model of driver steering behavior," Human Factors, vol. 20, no. 6, pp. 691–707, 1978.
  6. M. F. Land and D. N. Lee, "Where we look when we steer," Nature, vol. 369, pp. 742–744, 1994.
  7. R. C. Coulter, "Implementation of the pure pursuit path tracking algorithm," Technical Report CMU-RI-TR-92-01, Robotics Institute, Carnegie Mellon University, 1992.