Algorithm Search⌘K

Techniquecore

State feedback with integral action

Also called augmented integrator design, servo state feedback.

Adds the integral of the tracking error as an extra state and places the poles of the augmented system, so constant errors go to zero.

State feedback u=−Kx+Nru = -Kx + Nr gives zero steady-state error for a constant reference only when the model is exact and no disturbance acts. State feedback with integral action removes this weakness. It adds the integral of the tracking error as a new state, x˙i=r−y\dot x_i = r - y, and feeds back the augmented state:

u=−Kx−Kixi.u = -Kx - K_i x_i.

If the closed loop is asymptotically stable, every state converges for a constant reference and a constant disturbance, so x˙i→0\dot x_i \to 0 and y→ry \to r. This holds even when the model used for the design is wrong, as long as the loop stays asymptotically stable. The design is pole placement or LQR for the augmented pair. It is the state-space form of integral action in a PID controller, and the simplest case of the internal model principle.

In plain words

A controller that only looks at the present state can leave a small, steady error, for example when a constant load pushes against it or when the model is a little wrong. Integral action keeps a running total of the error. As long as any error is left, the total keeps growing and pushes the input harder. The loop can only come to rest when the error is exactly zero. State feedback with integral action treats this running total as one more state and chooses all the feedback weights together, so that the whole loop, the integrator included, settles as the designer wants.

When it applies

  • The plant is x˙=Ax+Bu+Ed\dot x = Ax + Bu + Ed, y=Cxy = Cx, with x∈Rnx \in \mathbb{R}^n, u∈Rmu \in \mathbb{R}^m, y∈Rpy \in \mathbb{R}^p, and the reference rr and the disturbance dd are constant or change slowly.
  • The state is measured or estimated, for example by a Luenberger observer. The integrator state xix_i is computed by the controller, so it is always known.
  • The augmented pair must be controllable, or at least stabilizable. With
Aa=[A0−C0],Ba=[B0],A_a = \begin{bmatrix} A & 0 \\ -C & 0 \end{bmatrix}, \qquad B_a = \begin{bmatrix} B \\ 0 \end{bmatrix},

(Aa,Ba)(A_a, B_a) is controllable if and only if (A,B)(A, B) is controllable and

rank⁡[ABC0]=n+p.\operatorname{rank}\begin{bmatrix} A & B \\ C & 0 \end{bmatrix} = n + p.

Proof. Use the PBH test on [λI−Aa,Ba]=[λI−A0BCλI0][\lambda I - A_a, B_a] = \begin{bmatrix} \lambda I - A & 0 & B \\ C & \lambda I & 0 \end{bmatrix}. For λ≠0\lambda \ne 0 the block λI\lambda I is invertible, so the rank is n+pn + p exactly when [λI−A,B][\lambda I - A, B] has rank nn. For λ=0\lambda = 0 the middle columns are zero, and the rank is that of [−ABC0]\begin{bmatrix} -A & B \\ C & 0 \end{bmatrix}, which equals the rank of [ABC0]\begin{bmatrix} A & B \\ C & 0 \end{bmatrix}. At λ=0\lambda = 0 the condition rank⁡[−A,B]=n\operatorname{rank}[-A, B] = n follows from the rank n+pn + p of the larger matrix. □\square

The rank condition needs m≥pm \ge p: at least as many inputs as controlled outputs. For a square plant (m=pm = p) it says that s=0s = 0 is not a transmission zero, so the plant has a nonzero static gain in every direction. Davison (1976) gave this condition, and the general one for other reference signals, for the robust servomechanism problem.

The template

  1. Check that (A,B)(A, B) is controllable and that rank⁡[ABC0]=n+p\operatorname{rank}\begin{bmatrix} A & B \\ C & 0 \end{bmatrix} = n + p.
  2. Form AaA_a and BaB_a.
  3. Choose n+pn + p closed-loop eigenvalues, or weights QQ and RR for the augmented state, and compute Ka=[K,Ki]K_a = [K, K_i] by pole placement or by the infinite-horizon LQR for (Aa,Ba)(A_a, B_a).
  4. Implement x˙i=r−y\dot x_i = r - y and u=−Kx−Kixiu = -Kx - K_i x_i. In discrete time with period hh, use xi,k+1=xi,k+h(rk−yk)x_{i,k+1} = x_{i,k} + h(r_k - y_k) and design with the discretized augmented model.
  5. Add anti-windup if the input can saturate.
  6. Optionally add a feedforward u=−Kx−Kixi+Nru = -Kx - K_i x_i + Nr. It does not change the eigenvalues or the steady state, but it adds a zero and makes the response to rr faster.

Why the error goes to zero. With u=−Kaxau = -K_a x_a, the closed loop is x˙a=(Aa−BaKa)xa+[0I]r+[E0]d\dot x_a = (A_a - B_a K_a)x_a + \begin{bmatrix} 0 \\ I \end{bmatrix} r + \begin{bmatrix} E \\ 0 \end{bmatrix} d. If Aa−BaKaA_a - B_a K_a is Hurwitz and rr and dd are constant, xa(t)x_a(t) converges to the unique equilibrium. At the equilibrium x˙i=r−Cx=0\dot x_i = r - Cx = 0. The argument uses only the stability of the true closed loop, not the values of AA, BB or EE. So a model error that keeps the loop asymptotically stable leaves the steady-state error at 0.

Classic examples

Double integrator. A=[0100]A = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, C=[1,0]C = [1, 0], with the disturbance on the input, E=BE = B. The rank condition holds: [ABC0]=[010001100]\begin{bmatrix} A & B \\ C & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{bmatrix} is a permutation matrix. With Ka=[k1,k2,ki]K_a = [k_1, k_2, k_i],

det⁡(sI−Aa+BaKa)=det⁡[s−10k1s+k2ki10s]=s3+k2s2+k1s−ki.\det(sI - A_a + B_a K_a) = \det\begin{bmatrix} s & -1 & 0 \\ k_1 & s + k_2 & k_i \\ 1 & 0 & s \end{bmatrix} = s^3 + k_2 s^2 + k_1 s - k_i.

For the triple eigenvalue −2-2 the wanted polynomial is (s+2)3=s3+6s2+12s+8(s + 2)^3 = s^3 + 6s^2 + 12s + 8, so K=[12,6]K = [12, 6] and Ki=−8K_i = -8. The law is

u=−12y−6y˙+8∫0t(r−y) dτ,u = -12y - 6\dot y + 8\int_0^t (r - y)\,d\tau,

a PID controller with the derivative on the measurement. The transfer function from rr to yy is 8/(s+2)38/(s + 2)^3, with static gain 1 and no overshoot. The transfer function from dd to yy is s/(s+2)3s/(s + 2)^3, which is 0 at s=0s = 0. A unit step in dd gives y(t)=12t2e−2ty(t) = \tfrac12 t^2 e^{-2t}, with the largest value e−2/2≈0.068e^{-2}/2 \approx 0.068 at t=1t = 1, and then y→0y \to 0. In the steady state with r=1r = 1 and dd constant, xi=(12−d)/8x_i = (12 - d)/8: the integrator holds exactly the input that cancels dd.

Without the integrator. For the same plant, u=−12x1−6x2+12ru = -12x_1 - 6x_2 + 12r has static gain 1, but a constant dd leaves y=r+d/12y = r + d/12. The integrator removes this offset.

A plant where integral action fails. A=[01−2−3]A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}, B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, C=[0,1]C = [0, 1], so G(s)=s/((s+1)(s+2))G(s) = s/((s + 1)(s + 2)). Then [ABC0]=[010−2−31010]\begin{bmatrix} A & B \\ C & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 \\ -2 & -3 & 1 \\ 0 & 1 & 0 \end{bmatrix} has two equal rows and rank 2 < 3. The plant has a zero at s=0s = 0 and static gain 0, so no constant input holds yy at a nonzero constant, and the augmented pair is not controllable.

Variations

  • LQR with integral action. Use the infinite-horizon LQR for (Aa,Ba)(A_a, B_a) with a weight on xix_i. This is often called LQI.
  • Observer-based form. Estimate xx with an observer and keep the exact xix_i. By the separation principle, the eigenvalues are those of Aa−BaKaA_a - B_a K_a and those of the observer.
  • Other reference signals. Replace the integrator by a model of the signal, for example a double integrator for ramps or an oscillator for sinusoids of a known frequency. This is the servocompensator of Davison and the output regulation problem. The rank condition is then required at each eigenvalue of the signal model.
  • Disturbance estimation instead. Augment the observer with a constant disturbance state and cancel the estimate. This also gives zero offset and is the state-space form of a disturbance observer.
  • Discrete time. Use the sum of the errors. With all eigenvalues of the augmented loop at 0 one gets a deadbeat servo.

Pitfalls

  • Windup. When the input saturates, the integrator keeps integrating and causes a large overshoot. Use anti-windup, for example by stopping the integration while the input is saturated.
  • The rank condition. With fewer inputs than outputs, or with a zero at s=0s = 0, no integral design exists. Choose fewer controlled outputs, or change the actuators.
  • Sensor offset. The integrator drives the measured output to rr. A constant bias in the sensor then becomes an error in the true output, and integral action cannot see it.
  • The extra pole. The augmented loop has pp more eigenvalues. If they are placed too slowly, the error goes to zero slowly. If they are placed too fast, the input is large.
  • Only constant signals. An integrator removes the steady-state error for constant rr and dd. A ramp leaves a constant error, and a sinusoid leaves a sinusoidal error, unless the signal model is extended.

Exercises

  1. For the double integrator above, place all three eigenvalues at −1-1. (Answer: (s+1)3=s3+3s2+3s+1(s + 1)^3 = s^3 + 3s^2 + 3s + 1, so K=[3,3]K = [3, 3] and Ki=−1K_i = -1.)
  2. Show that the steady state of the double integrator example has x2=0x_2 = 0, x1=rx_1 = r and xi=(12−d)/8x_i = (12 - d)/8.
  3. For x˙=−x+u\dot x = -x + u, y=xy = x, design u=−kx−kixiu = -kx - k_i x_i with both closed-loop eigenvalues at −2-2. (Answer: det⁡=s2+(1+k)s−ki\det = s^2 + (1 + k)s - k_i, so k=3k = 3 and ki=−4k_i = -4.)
  4. Show that for m<pm < p the rank of [ABC0]\begin{bmatrix} A & B \\ C & 0 \end{bmatrix} is less than n+pn + p. (Hint: count the columns.)

References

  1. E. J. Davison, The robust control of a servomechanism problem for linear time-invariant multivariable systems, IEEE Transactions on Automatic Control 21(1), 25-34, 1976, the existence conditions of the robust servomechanism problem, with the rank condition at the eigenvalues of the exosystem
  2. Karl J. Åström and Richard M. Murray, Feedback Systems, An Introduction for Scientists and Engineers, second edition, Princeton University Press, 2021, Chapter 7, State Feedback (the section Integral Action)
  3. Chi-Tsong Chen, Linear System Theory and Design, third edition, Oxford University Press, 1999, Section 8.3, Regulation and Tracking, with the robust tracking and disturbance rejection design of Section 8.3.1
  4. Gene F. Franklin, J. David Powell and Abbas Emami-Naeini, Feedback Control of Dynamic Systems, eighth edition, Pearson, 2019, Chapter 7, State-Space Design (integral control and robust tracking)

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