Algorithm Search⌘K

Techniqueintro

Feedforward control

Also called feedforward compensation, disturbance feedforward.

Adds a control term computed from the reference or from a measured disturbance, so the loop acts before an error appears.

Feedforward control adds to the feedback signal a term that is computed from a signal the controller knows in advance: a measured disturbance dd, or the reference rr. If dd acts on the output through PdP_d and the actuator acts through PP, the term uff=Fdu_{ff} = F d with F=−Pd/PF = -P_d/P cancels the effect of dd before any error appears. Feedback cannot do this, because it acts only on an error that has already happened. In practice FF is not exact or not realizable, so feedforward is always used together with feedback, which removes what is left. Feedforward does not change the poles of the closed loop, so it cannot destroy internal stability when FF is BIBO stable.

In plain words

A feedback controller waits until the output is wrong and then corrects it. If you can measure a disturbance when it happens, you can correct for it at once, before the output moves. For example, if more cold water flows into a tank, you can open the heater more at the same moment instead of waiting for the temperature to drop. The correction is computed from a model: how strongly the disturbance pushes the output, and how strongly the actuator pushes back. A perfect correction needs a perfect model and an actuator that is at least as fast as the disturbance. Neither is ever true, so feedback stays in the loop to clean up what the correction misses. Feedforward costs a sensor and a model, but it does not make the loop oscillate.

When it applies

  • A disturbance dd can be measured before or when it acts, and its effect PdP_d on the output is known with a fair model.
  • The actuator path PP is not slower than the disturbance path PdP_d, or a static correction is enough.
  • Feedback alone is too slow, for example because the plant has a long delay or because the loop gain is limited by robustness.
  • For the reference: the set point changes in known ways, and a model of the plant gives the input that makes the output follow it.

The template

  1. Model the two paths. Find P(s)P(s) from uu to yy and Pd(s)P_d(s) from dd to yy, for example by step tests.
  2. Compute the ideal compensator F=−Pd/PF = -P_d/P.
  3. Make it realizable.
    • If FF is improper, add a filter: a lead-lag −Pd/(P(Tfs+1)k)-P_d/(P (T_f s + 1)^k).
    • If PP has a longer delay than PdP_d, the ideal FF needs a prediction. Drop the difference of the delays.
    • If PP has a zero in the right half-plane, FF would have an unbounded response. Invert only the minimum phase part.
    • The simplest choice is the static gain F=−Pd(0)/P(0)F = -P_d(0)/P(0).
  4. Add it to the feedback. u=C(r−y)+Fdu = C (r - y) + F d. Keep integral action in CC for the model error and the disturbances that are not measured.
  5. Check the residual. Simulate a step of dd with the model error you expect.

Why it works (theorems). With S=1/(1+PC)S = 1/(1 + P C), the loop gives

y=(Pd+PF)S d.y = (P_d + P F) S \, d.

If F=−Pd/PF = -P_d/P, the effect of dd is zero for every CC. Otherwise feedback reduces the residual Pd+PFP_d + P F by the factor SS. The characteristic equation 1+PC=01 + P C = 0 does not contain FF, so a BIBO stable FF leaves the closed-loop poles and the internal stability unchanged. With a relative model error, Pd+PF=PdϵP_d + P F = P_d \epsilon when F=−Pd(1−ϵ)/PF = -P_d (1 - \epsilon)/P, so a 10 percent error in the gain of FF leaves 10 percent of the disturbance, before feedback.

Classic examples

Two lags. Let P=1/(s+1)2P = 1/(s + 1)^2, Pd=1/(s+1)P_d = 1/(s + 1), a unit step of dd, and the PI controller K=1K = 1, Ti=1T_i = 1, so PC=1/(s(s+1))P C = 1/(s(s + 1)). The ideal F=−(s+1)F = -(s + 1) is improper. Use the static F=−1F = -1 or the lead-lag F=−(s+1)/(0.1s+1)F = -(s + 1)/(0.1 s + 1).

Feedback only, by hand: y=1/(s2+s+1)⋅dy = 1/(s^2 + s + 1) \cdot d, so for a unit step

y(t)=23e−t/2sin⁡3t2,y(t) = \frac{2}{\sqrt 3} e^{-t/2} \sin\frac{\sqrt 3 t}{2},

with the peak e−π/(33)=0.5463e^{-\pi/(3\sqrt 3)} = 0.5463 at t=2π/(33)=1.209t = 2\pi/(3\sqrt 3) = 1.209 and the integral of the error equal to 1.

Feedforward only, by hand: with F=−1F = -1, Pd+PF=s/(s+1)2P_d + P F = s/(s + 1)^2 and y=te−ty = t e^{-t}, with the peak 1/e=0.3681/e = 0.368 at t=1t = 1. With the lead-lag, Pd+PF=0.1s/((s+1)(0.1s+1))P_d + P F = 0.1 s/((s + 1)(0.1 s + 1)) and y=(e−t−e−10t)/9y = (e^{-t} - e^{-10t})/9, with the peak 0.0774 at t=ln⁡10/9=0.256t = \ln 10/9 = 0.256 and the integral 0.1.

Measured with a simulation step of 0.001 s, with feedback:

structure peak of yy time of the peak IAE over 30 s
feedback only 0.5463 1.209 s 1.390
static feedforward and feedback 0.315 0.74 s 0.921
lead-lag feedforward and feedback 0.0761 0.241 s 0.130

The lead-lag reduces the peak by a factor of about 7 and the IAE by a factor of more than 10. Feedback lowers the peak of the lead-lag case only a little (from 0.0774 to 0.0761), because the residual is fast compared with the loop.

Reference feedforward. For a reference rr filtered by a model MM (a desired response), the term uff=(M/P)ru_{ff} = (M/P) r makes y=Mry = M r with an exact model, and the feedback acts only on Mr−yM r - y. This is a two-degree-of-freedom structure. It needs M/PM/P to be proper and BIBO stable, so MM must keep the delay and the zeros in the right half-plane of PP.

Variations

  • Static feedforward. A gain only, often with a ratio to a measured flow. It removes the steady effect of dd and some of the transient.
  • Dynamic feedforward. A lead-lag, or a full inverse with a filter, for the transient.
  • Feedforward to an inner loop. In a cascade, feed the disturbance to the inner set point, where the inner loop handles the actuator.
  • Gain scheduling of FF. If PP and PdP_d change with the operating point, schedule FF too.
  • Estimated disturbances. If dd is not measured, a disturbance observer can estimate it, and the estimate is fed forward. This adds feedback again, and the loop poles change.
  • Prediction. Model predictive control uses a model and known future references or disturbances to plan the input.

Pitfalls

  • Model error. Feedforward reduces a disturbance only as much as the model allows. Keep feedback with integral action.
  • Delay mismatch. If the actuator acts later than the disturbance, no causal FF cancels it. A static gain with the right sign still helps.
  • Inverse of a zero in the right half-plane. It makes FF have a growing response. Use the minimum phase part only.
  • Large lead. A large ratio of lead to lag in FF gives large peaks of uu and can saturate the actuator. A saturated actuator gives no cancellation; see anti-windup.
  • Noise on the measured disturbance. A dynamic FF with a high gain at high frequencies passes the noise to the actuator.
  • Sign and units. A wrong sign doubles the disturbance. Test with a small gain first.

Exercises

  1. Compute the ideal FF for P=1/(s+1)2P = 1/(s + 1)^2 and Pd=1/(s+1)P_d = 1/(s + 1). (Answer: F=−(s+1)F = -(s + 1), which is improper.)
  2. Without feedback and with F=−1F = -1, find the response to a unit step of dd. (Answer: y=te−ty = t e^{-t}, peak 1/e1/e at t=1t = 1.)
  3. With the lead-lag F=−(s+1)/(0.1s+1)F = -(s + 1)/(0.1 s + 1) and no feedback, find the integral of yy. (Answer: y=(e−t−e−10t)/9y = (e^{-t} - e^{-10t})/9, and the integral is (1−0.1)/9=0.1(1 - 0.1)/9 = 0.1.)
  4. Show that FF does not change the closed-loop poles. (Answer: y=(Pd+PF)Sd+Try = (P_d + P F) S d + T r, and FF does not appear in 1+PC1 + P C.)
  5. Let P=e−2s/(s+1)P = e^{-2s}/(s + 1) and Pd=e−s/(s+1)P_d = e^{-s}/(s + 1). What is the ideal FF, and what can you use instead? (Answer: F=−esF = -e^{s} needs a prediction of 1 s; use the static F=−1F = -1, which acts 1 s late.)

References

  1. Karl Johan Åström and Tore Hägglund, Advanced PID Control, ISA, 2006, the whole book (feedforward from measured disturbances and from the set point)
  2. Karl Johan Åström and Richard M. Murray, Feedback Systems, second edition, Princeton University Press, 2021, the whole book (feedforward and two-degree-of-freedom structures)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples