Algorithm Search⌘K

Techniqueintro

State feedback

Also called full-state feedback, state-variable feedback.

Sets the input to u = -Kx + N r, a linear function of the measured state and the reference, which moves the closed-loop eigenvalues to those of A - BK.

State feedback is the basic design technique of state-space control. The plant is x˙=Ax+Bu\dot x = Ax + Bu, y=Cxy = Cx, with x∈Rnx \in \mathbb{R}^n, u∈Rmu \in \mathbb{R}^m, and the whole state is measured. The control law is

u=−Kx+Nr,u = -Kx + Nr,

with a gain K∈Rm×nK \in \mathbb{R}^{m \times n}, a reference rr and a feedforward gain NN. The closed loop is x˙=(A−BK)x+BNr\dot x = (A - BK)x + BNr. Its dynamics are set by the eigenvalues of A−BKA - BK, and the designer chooses KK to put them where they should be. In discrete time the plant is xk+1=Φxk+Γukx_{k+1} = \Phi x_k + \Gamma u_k with sampling period hh, and the closed-loop matrix is Φ−ΓK\Phi - \Gamma K. Its eigenvalues must lie inside the unit circle (a Schur matrix) instead of in the open left half plane (a Hurwitz matrix).

In plain words

A controller that sees the whole state of a machine, such as both the position and the speed of a cart, can react to each part with its own weight. The input is a weighted sum of the measured state values. With the right weights, the machine settles as fast and as smoothly as the designer wants, at least on paper. The weights cannot move behavior that the input cannot reach. In practice the full state is rarely measured, so an observer often gives an estimate in its place.

When it applies

  • Linear time-invariant model. The design uses AA and BB. For a nonlinear plant, use the linearization at an operating point; the result then holds only near that point.
  • The state is available. Every state variable is measured, or an observer such as the Luenberger observer estimates it. The separation principle says that the eigenvalues of the combined loop are those of A−BKA - BK and those of the observer.
  • Controllability. If (A,B)(A, B) is controllable, every set of nn eigenvalues that is closed under complex conjugation is the spectrum of A−BKA - BK for some real KK. This is the pole placement theorem. If (A,B)(A, B) is only stabilizable, the uncontrollable eigenvalues are stable but stay where they are. Otherwise no state feedback gives an asymptotically stable loop.

The template

  1. Write the model x˙=Ax+Bu\dot x = Ax + Bu, y=Cxy = Cx, and check that (A,B)(A, B) is controllable, for example with the Kalman rank condition.
  2. Choose the closed-loop behavior. Either choose nn eigenvalues from specifications such as the settling time and the damping (see step response specifications), or choose weights QQ and RR of a quadratic cost.
  3. Compute KK. For chosen eigenvalues this is the pole placement problem: use Ackermann's formula for one input and small nn, or robust pole placement for several inputs or larger nn. For a quadratic cost, use the infinite-horizon LQR.
  4. Choose NN so that the static gain from rr to yy is 1. For one input and one output, with A−BKA - BK Hurwitz,
N=1C(BK−A)−1B.N = \frac{1}{C(BK - A)^{-1}B}.

The denominator is the static gain of the loop without NN. It is 0 exactly when the plant has a zero at s=0s = 0, and then no NN exists.

  1. Check the result in simulation: the size of uu against the actuator limits, the effect of noise, and the effect of model error. If rr is constant but the model is not exact, NN does not remove the steady-state error. Add integral action for that.

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], a mass with position and speed. With K=[k1,k2]K = [k_1, k_2],

A−BK=[01−k1−k2],det⁡(sI−A+BK)=s2+k2s+k1.A - BK = \begin{bmatrix} 0 & 1 \\ -k_1 & -k_2 \end{bmatrix}, \qquad \det(sI - A + BK) = s^2 + k_2 s + k_1.

For the eigenvalues −1±i-1 \pm i the wanted polynomial is s2+2s+2s^2 + 2s + 2, so K=[2,2]K = [2, 2]. Then (A−BK)−1B=[−1/2,0]T(A - BK)^{-1}B = [-1/2, 0]^T, the static gain without NN is 1/21/2, and N=2N = 2. The law u=−2x1−2x2+2ru = -2x_1 - 2x_2 + 2r is a PD controller on the position error r−x1r - x_1.

A stable plant made faster. A=[01−2−3]A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}, B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, with eigenvalues −1-1 and −2-2. The closed loop has det⁡(sI−A+BK)=s2+(3+k2)s+(2+k1)\det(sI - A + BK) = s^2 + (3 + k_2)s + (2 + k_1). For the eigenvalues −4-4 and −5-5, the polynomial is s2+9s+20s^2 + 9s + 20, so K=[18,6]K = [18, 6].

LQR as a check. For the double integrator with Q=IQ = I and R=1R = 1, the algebraic Riccati equation has the solution P=[3113]P = \begin{bmatrix} \sqrt 3 & 1 \\ 1 & \sqrt 3 \end{bmatrix}, so K=BTP=[1,3]K = B^T P = [1, \sqrt 3]. The closed loop has s2+3 s+1s^2 + \sqrt 3\, s + 1, with damping ratio 3/2\sqrt 3/2. The gain comes from a cost, not from a list of eigenvalues, but it is still a state feedback.

A mode that does not move. A=[100−1]A = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}. Here A−BK=[10−k1−1−k2]A - BK = \begin{bmatrix} 1 & 0 \\ -k_1 & -1 - k_2 \end{bmatrix} has the eigenvalue 1 for every KK. The pair is not stabilizable, and no state feedback gives an asymptotically stable loop. If the first diagonal entry is −1-1 instead, the pair is stabilizable but still not controllable: the eigenvalue −1-1 stays, and only the second one moves.

Variations

  • Pole placement and LQR. The two common ways to choose KK; see above.
  • Discrete time. The same template with Φ−ΓK\Phi - \Gamma K. Putting all eigenvalues at 0 gives deadbeat control, which reaches the origin in at most nn steps.
  • Integral action. Augment the state with the integral of the error, and design the feedback for the augmented system: state feedback with integral action.
  • Observer-based feedback. Replace xx by an estimate x^\hat x from an observer. The separation principle keeps the eigenvalues; the robustness can change a lot. With noise models this is LQG control.
  • Static output feedback. u=−Kyu = -Ky uses only the outputs. Its eigenvalues cannot in general be placed freely, and the problem is much harder.
  • Two degrees of freedom. NrN r is the simplest feedforward. A two-degree-of-freedom design shapes the reference response separately from the feedback.

Pitfalls

  • Zeros do not move. For one input and one output, the transfer function from rr to yy is N b(s)/α(s)N\,b(s)/\alpha(s), where b(s)b(s) is the numerator of C(sI−A)−1BC(sI - A)^{-1}B and α(s)=det⁡(sI−A+BK)\alpha(s) = \det(sI - A + BK). State feedback changes the poles and keeps the zeros. A zero near a slow pole or in the right half plane still shapes the response.
  • Fast poles cost input. Eigenvalues far to the left need large gains. The input then saturates, and noise in the measured state is amplified. A rule of thumb: do not move a pole much further than needed, and look at the input in simulation.
  • N is not robust. The feedforward gain depends on the model. A small error in AA or BB can give a steady-state error for a step in rr, and a constant disturbance gives one too. Integral action removes it.
  • Uncontrollable modes. No KK moves them. Check controllability first, and with a numerical rank test that is reliable; see the Kalman decomposition.
  • Eigenvalues are not robustness. Two gains with the same eigenvalues can have very different sensitivity to model errors. With several inputs, use the freedom in KK as robust pole placement does.

Exercises

  1. For the double integrator, find KK for the eigenvalues −2-2 and −3-3. (Answer: s2+5s+6s^2 + 5s + 6, so K=[6,5]K = [6, 5] and N=6N = 6.)
  2. Show that for one input and one output the zeros of C(sI−A+BK)−1BC(sI - A + BK)^{-1}B are those of C(sI−A)−1BC(sI - A)^{-1}B. (Hint: write BB and A−BKA - BK in controllable canonical form; KK changes only the last row of the matrix.)
  3. For A=[01−2−3]A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}, B=[0,1]TB = [0, 1]^T, C=[1,0]C = [1, 0] and K=[18,6]K = [18, 6], compute NN. (Answer: the static gain of 1/(s2+9s+20)1/(s^2 + 9s + 20) is 1/201/20, so N=20N = 20.)
  4. The plant x˙=x+u\dot x = x + u in discrete time with h=1h = 1 has Φ=e\Phi = e and Γ=e−1\Gamma = e - 1. Find the deadbeat gain. (Answer: Φ−ΓK=0\Phi - \Gamma K = 0, so K=e/(e−1)K = e/(e - 1).)

References

  1. 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 sections Stabilization by State Feedback and State Feedback Design)
  2. Chi-Tsong Chen, Linear System Theory and Design, third edition, Oxford University Press, 1999, Section 8.2 (state feedback), Section 8.3 (regulation and tracking) and Section 8.6 (the multivariable case and the effect on transfer matrices)
  3. Gene F. Franklin, J. David Powell and Abbas Emami-Naeini, Feedback Control of Dynamic Systems, eighth edition, Pearson, 2019, Chapter 7, State-Space Design
  4. W. M. Wonham, On pole assignment in multi-input controllable linear systems, IEEE Transactions on Automatic Control 12(6), 660-665, 1967, the result that state feedback can assign every closed-loop spectrum if and only if the pair is controllable

Where this leads

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