Left Half-Plane
repetitive control · iterative learning · the internal model principle

Echo

A read head follows a groove on a turntable that was mounted a little off centre and warped a little more, so the groove wobbles under the head the same way every lap. Feedback takes most of the wobble and leaves the rest, lap after lap, identical. A controller that remembers last lap's error and adds a share of it, a little early, kills it in four. You tune what it remembers: how much, how smoothly, how early.

world —runs today 0best today —the textbook —
Where you stand today

The head is a small mass behind a drive with a lag, under a PD controller sampled at a kilohertz, and the turntable turns twice a second, so a lap is five hundred samples. The memory is a table of five hundred corrections to the setpoint, one per point of the turn. Each lap, every entry becomes the average of itself and its neighbours over the smoothing window, plus the gain times the error last lap saw lead milliseconds later at that point. Cost is the mean absolute error over ten laps, in microns, lap one included, so learning fast counts. The textbook is a half share, a window of five milliseconds each way, and ten milliseconds of lead. Hidden today: the groove's shape, and a drive whose lag and gain are not the model's, which moves the lead the memory wants.

The trick

A memory the length of one lap

Feedback answers an error after it appears, and against a wobble that repeats, that is a beat late every lap, forever. But if the error repeats, last lap is a forecast. Keep one lap of corrections, add to each a share of the error that showed up there last time, and the correction converges to whatever cancels the wobble, without ever knowing its shape: only its period. That is repetitive control, a delay line of one period in a loop, and it is the internal model principle made of memory. The two catches are the two other knobs. The plant answers late, so a correction must be issued early, and the lead is a guess at that lateness; get it wrong at some harmonic and that harmonic grows instead of dying, lap by lap, which is the echo running backwards. And a memory learns everything periodic, noise that happened to line up included, so it is smoothed, and the smoothing sets which harmonics it can still learn. Run the textbook and watch the rows fade; then move the lead, and watch a row come back.

Cards
To reject a signal forever, the controller must contain a model of the signal.internal-model-principle
a step needs 1/s, a sine needs 1/(s² + ω²), a period T needs 1/(1 − e−sT): infinitely many poles, at every harmonicFrancis & Wonham 1976: perfect asymptotic rejection requires the disturbance's generator inside the loop

An integrator is a model of a constant; put one in the loop and constant disturbances vanish, which is why PID has an I. A periodic disturbance is generated by a delay of one period in positive feedback, and the same principle says: put that in the loop. Its poles sit on the unit circle at every harmonic of the period, so the loop has infinite gain at each of them, and each of them is cancelled exactly, whatever its amplitude and phase.

The price is written in the same equation. Infinite gain at infinitely many frequencies is a loop that cannot be stabilised for a plant with any phase lag, so a real repetitive controller filters the memory (the smoothing here), which turns the infinite gains into large finite ones below a cutoff and gives up the harmonics above it. Perfect rejection of what you keep; nothing for what you drop.

Where this game's memory · the I in every PID · feedforward, the same idea for a known signal
Deeper Francis & Wonham, The internal model principle of control theory, 1976 · Åström & Murray, Feedback Systems, ch. 8

A delay line of one period, a gain, a lead and a filter, and a periodic error dies.repetitive-control
rj+1(n) = Q[rj](n) + k ej(n + m), stable if |Q(ejω)| · |1 − k ejωm T(ejω)| < 1 for all ωthe plug-in repetitive controller in lap form: T is the closed loop from setpoint to head, m the lead; the lead should undo T's phase

Write the controller lap by lap and it is a fixed-point iteration: each lap's correction is last lap's, filtered, plus a share of last lap's error read a little ahead. It converges where the loop gain of that iteration is under one at every frequency, and the loop gain is 1 − k ejωmT: near zero where the lead cancels the closed loop's phase and the gain is right, larger than one where the phase error passes ninety degrees, which happens first at high harmonics. The filter Q shrinks the gain there, at the cost of not learning those harmonics at all.

Born in 1981 to cancel ripple in a proton synchrotron's magnet supply, then disk drives, then every machine that repeats: the runout of a spindle, the cogging of a motor, the once-per-revolution error of a lathe. It needs the period and nothing else, and it fails when the period drifts, which is where Echo's cousin, iterative learning control, starts each lap fresh from the same start instead.

Where this game · Plotter, the same author's feedforward · Identify, for the period
Deeper Inoue, Nakano & Iwai, 1981 · Hara, Yamamoto, Omata & Nakano, Repetitive control system, 1988 · Tomizuka, Tsao & Chew, Analysis and synthesis of discrete-time repetitive controllers, 1989

Do it again, and each time add what you learned: a plant that repeats a task can learn the task.iterative-learning
uj+1 = Q(uj + L ej), monotone convergence if ‖Q(1 − L P)‖ < 1Arimoto 1984: the feedforward for the next trial is this trial's, plus a learning filter L on this trial's error; P is the plant over one trial

Iterative learning control is repetitive control's cousin for tasks with a start and an end: a robot arm laying the same weld, a wafer stage stepping the same step. Each trial starts from rest, the whole error signal of the trial is recorded, and the feedforward for the next trial is updated from it, with the freedom to filter non-causally, since the next trial has not happened yet. Convergence is a contraction over trials, the same condition as here with the lap replaced by the trial.

The idea is older than its name: practice. What makes it control theory is the contraction condition, which says how much of the error to feed back and which frequencies to give up, so that the practice converges instead of wandering. Learning in this series otherwise means a policy and a reward; this is learning with a model of nothing but repetition.

Where this game, in lap form · Land, where each landing is a trial
Deeper Arimoto, Kawamura & Miyazaki, Bettering operation of robots by learning, 1984 · Bristow, Tharayil & Alleyne, A survey of iterative learning control, 2006 · Moore, Iterative Learning Control for Deterministic Systems, 1993

References
  1. B. A. Francis and W. M. Wonham, "The internal model principle of control theory," Automatica, vol. 12, no. 5, pp. 457–465, 1976.
  2. T. Inoue, M. Nakano, and S. Iwai, "High accuracy control of a proton synchrotron magnet power supply," in Proc. 8th IFAC World Congress, pp. 3137–3142, 1981.
  3. S. Hara, Y. Yamamoto, T. Omata, and M. Nakano, "Repetitive control system: A new type servo system for periodic exogenous signals," IEEE Transactions on Automatic Control, vol. 33, no. 7, pp. 659–668, 1988.
  4. M. Tomizuka, T.-C. Tsao, and K.-K. Chew, "Analysis and synthesis of discrete-time repetitive controllers," ASME Journal of Dynamic Systems, Measurement, and Control, vol. 111, no. 3, pp. 353–358, 1989.
  5. K.-K. Chew and M. Tomizuka, "Digital control of repetitive errors in disk drive systems," IEEE Control Systems Magazine, vol. 10, no. 1, pp. 16–20, 1990.
  6. S. Arimoto, S. Kawamura, and F. Miyazaki, "Bettering operation of robots by learning," Journal of Robotic Systems, vol. 1, no. 2, pp. 123–140, 1984.
  7. K. L. Moore, Iterative Learning Control for Deterministic Systems. Springer, 1993.
  8. R. W. Longman, "Iterative learning control and repetitive control for engineering practice," International Journal of Control, vol. 73, no. 10, pp. 930–954, 2000.
  9. D. A. Bristow, M. Tharayil, and A. G. Alleyne, "A survey of iterative learning control," IEEE Control Systems Magazine, vol. 26, no. 3, pp. 96–114, 2006.