CHAPTER 37 / STATE FEEDBACK

State feedback design: Ackermann's formula and the integral servo

Matching coefficients by hand gets messy once a model has three states. This chapter turns pole placement into a procedure: move to controllable canonical form or use Ackermann's formula, then add an integrator so the output settles exactly on the target.

THE SHORT ANSWER

Ackermann's formula computes the state-feedback gain that places the closed-loop poles of a controllable single-input model: K = [0 … 0 1]M_c⁻¹φ(A), where M_c is the controllability matrix and φ is the desired characteristic polynomial. It gives the same K as matching coefficients in controllable canonical form. An integral servo adds the state ξ with ξ̇ = r − y and the term k_I·ξ, so the output settles exactly on the target despite constant loads or parameter errors.

K=[0⋯01]Mc−1φ(A),u=−Kx+kIξ,ξ˙=r−yK=\begin{bmatrix}0&\cdots&0&1\end{bmatrix}M_c^{-1}\varphi(A),\qquad u=-Kx+k_I\xi,\quad \dot\xi=r-y
WHAT YOU WILL LEARN

Compute a state-feedback gain for a third-order model both by coefficient matching and by Ackermann's formula, and design an integral servo that removes the steady error caused by a constant load.

The pole-placement chapter matched the coefficients of a second-order characteristic equation by hand, and the controllability test told us when that is possible at all. Here the same idea becomes a procedure that works for any number of states, and an integrator is added so that tracking no longer depends on an exact model.

Review the previous lesson: State feedback by pole placement
START WITH AN EXAMPLE

First, picture it

With two states, coefficient matching took a few lines: the position gain changed the constant term and the velocity gain changed the s term. With three states, a single gain usually shows up in several coefficients at once, and you end up solving simultaneous equations. There is one set of coordinates in which that never happens. In controllable canonical form the bottom row of A holds the coefficients of the characteristic polynomial and the input enters only that row, so each gain adds to exactly one coefficient. The plan is therefore to move into those coordinates, find each gain by a subtraction and move back. Ackermann's formula packs the three steps into one line. Placing poles leaves a practical question open: will the output stop exactly on the target if the model is slightly wrong? Feeding back the integral of the error makes the answer yes.

THE IDEA

Build the idea step by step

Start from ẋ = Ax + Bu with one input and the state feedback u = −Kx. The closed-loop matrix is A − BK, and pole placement asks for the K that makes det(sI − A + BK) equal a chosen polynomial φ(s). Every closed-loop polynomial can be reached exactly when the controllability matrix M_c = [B AB … Aⁿ⁻¹B] is invertible. In that case the coordinate change x = T·x̄ with T = M_c·W turns the model into controllable canonical form, where the gain is found coefficient by coefficient, and K = K̄T⁻¹ brings it back. Ackermann's formula gives the same K without forming T: K = [0 … 0 1]·M_c⁻¹·φ(A). For tracking, plain state feedback needs a reference gain N computed from the model, so a constant load or a wrong parameter leaves a steady error. Adding the state ξ with ξ̇ = r − y and the term k_I·ξ to the control law lets the error itself drive the controller; at any steady state ξ̇ = 0, which forces y = r.

Read the equations

u=−Kx,x˙=(A−BK)x,det⁡(sI−A+BK)=φ(s)=sn+αn−1sn−1+⋯+α0u=-Kx,\qquad \dot x=(A-BK)x,\qquad \det(sI-A+BK)=\varphi(s)=s^n+\alpha_{n-1}s^{n-1}+\cdots+\alpha_0

State feedback and the design condition. φ(s) is the characteristic polynomial you want, built from the chosen closed-loop poles.

Mc=[BAB⋯An−1B],det⁡Mc≠0M_c=\begin{bmatrix}B&AB&\cdots&A^{n-1}B\end{bmatrix},\qquad \det M_c\neq 0

The controllability matrix (written 𝒞 in the controllability chapter). For a single input it is square, and every set of closed-loop poles can be placed exactly when it is invertible.

Ac=[010001−a0−a1−a2],Bc=[001],Kˉ=[α0−a0α1−a1α2−a2]A_c=\begin{bmatrix}0&1&0\\0&0&1\\-a_0&-a_1&-a_2\end{bmatrix},\quad B_c=\begin{bmatrix}0\\0\\1\end{bmatrix},\qquad \bar K=\begin{bmatrix}\alpha_0-a_0&\alpha_1-a_1&\alpha_2-a_2\end{bmatrix}

In controllable canonical form each gain adds to one coefficient of the bottom row, so the gain is the desired coefficients minus the open-loop ones.

T=McW,W=[a1a21a210100],T−1AT=Ac,T−1B=Bc,K=KˉT−1T=M_cW,\quad W=\begin{bmatrix}a_1&a_2&1\\a_2&1&0\\1&0&0\end{bmatrix},\qquad T^{-1}AT=A_c,\quad T^{-1}B=B_c,\qquad K=\bar KT^{-1}

The transformation into controllable canonical form for three states. The coefficients a_i are those of det(sI − A). For two states W = [[a₁, 1], [1, 0]].

K=[0⋯01]Mc−1φ(A),φ(A)=An+αn−1An−1+⋯+α0IK=\begin{bmatrix}0&\cdots&0&1\end{bmatrix}M_c^{-1}\varphi(A),\qquad \varphi(A)=A^n+\alpha_{n-1}A^{n-1}+\cdots+\alpha_0I

Ackermann's formula. φ(A) is the desired polynomial evaluated with the matrix A in place of s.

qMc=[0⋯01],K=qAn+αn−1qAn−1+⋯+α1qA+α0qqM_c=\begin{bmatrix}0&\cdots&0&1\end{bmatrix},\qquad K=qA^n+\alpha_{n-1}qA^{n-1}+\cdots+\alpha_1qA+\alpha_0q

The same formula organised for hand work: find the single row q, then multiply rows by A instead of forming matrix powers.

u=−Kx+Nr,N=−1C(A−BK)−1Bu=-Kx+Nr,\qquad N=\frac{-1}{C(A-BK)^{-1}B}

Reference scaling for plain state feedback. It gives y = r at steady state only when the model is exact and no load acts.

[x˙ξ˙]=[A0−C0][xξ]+[B0]u+[01]r,u=−Kx+kIξ\begin{bmatrix}\dot x\\\dot\xi\end{bmatrix}=\begin{bmatrix}A&0\\-C&0\end{bmatrix}\begin{bmatrix}x\\\xi\end{bmatrix}+\begin{bmatrix}B\\0\end{bmatrix}u+\begin{bmatrix}0\\1\end{bmatrix}r,\qquad u=-Kx+k_I\xi

The type-1 servo. ξ integrates the tracking error, and the augmented model is designed like any other state-feedback problem with the gain [K, −k_I].

rank⁡[AB−C0]=n+1\operatorname{rank}\begin{bmatrix}A&B\\-C&0\end{bmatrix}=n+1

Together with controllability of (A, B), this makes the augmented model controllable. It fails exactly when the plant has a zero at s = 0.

What the symbols mean

x, u, y, rx,\ u,\ y,\ r
state, input, output and reference
A,B,CA,B,C
system, input and output matrices of the plant
K=[k1 ⋯ kn]K=[k_1\ \cdots\ k_n]
state-feedback gain, a row with one entry per state
φ(s), αi\varphi(s),\ \alpha_i
desired closed-loop characteristic polynomial and its coefficients
aia_i
coefficients of the open-loop polynomial det(sI − A)
McM_c
controllability matrix [B AB … Aⁿ⁻¹B]
T, WT,\ W
transformation to controllable canonical form, x = T·x̄, and its coefficient matrix
Ac, Bc, KˉA_c,\ B_c,\ \bar K
matrices and gain in controllable canonical coordinates
qq
last row of M_c⁻¹, found from qM_c = [0 … 0 1]
NN
reference gain of plain state feedback
ξ\xi
integral of the tracking error r − y
kIk_I
integral gain of the servo
A^, B^, K^\hat A,\ \hat B,\ \hat K
augmented matrices and augmented gain [K, −k_I]
dd
constant load entering at the input
nn
number of plant states

Both results assume a linear time-invariant model with a single input. Ackermann's formula needs M_c to be invertible, that is, a controllable model. The integral servo also needs the plant to have no zero at s = 0. Neither result knows about actuator limits, so check the force or voltage the gains ask for.

WORKED EXAMPLE

A third-order positioning drive, then an integral servo

  1. Part 1. A positioning drive in normalised units: x₁ is the angle, x₂ the speed and x₃ the drive torque. The input builds torque through a lag, torque accelerates the shaft against friction, and speed integrates to angle. The open-loop poles are 0, −1 and −2.

    A=[0100−1100−2],B=[001],det⁡(sI−A)=s3+3s2+2sA=\begin{bmatrix}0&1&0\\0&-1&1\\0&0&-2\end{bmatrix},\quad B=\begin{bmatrix}0\\0\\1\end{bmatrix},\qquad \det(sI-A)=s^3+3s^2+2s
  2. Specification: a dominant pair at −2 ± j2 (ζ = 0.707, ωn = 2.83 rad/s) and a third pole five times farther left, at −10.

    φ(s)=(s2+4s+8)(s+10)=s3+14s2+48s+80\varphi(s)=(s^2+4s+8)(s+10)=s^3+14s^2+48s+80
  3. Check controllability. The determinant is nonzero, so the poles can be placed anywhere.

    Mc=[BABA2B]=[00101−31−24],det⁡Mc=−1M_c=\begin{bmatrix}B&AB&A^2B\end{bmatrix}=\begin{bmatrix}0&0&1\\0&1&-3\\1&-2&4\end{bmatrix},\qquad \det M_c=-1
  4. Method 1, coefficient matching. Only the bottom row of A − BK changes. Expand the determinant along the first row.

    det⁡(sI−A+BK)=∣s−100s+1−1k1k2s+2+k3∣=s3+(3+k3)s2+(2+k2+k3)s+k1\det(sI-A+BK)=\begin{vmatrix}s&-1&0\\0&s+1&-1\\k_1&k_2&s+2+k_3\end{vmatrix}=s^3+(3+k_3)s^2+(2+k_2+k_3)s+k_1
  5. Match the coefficients from the top: k₃ first, then k₂, then k₁. Each gain appears in more than one place, which is exactly what makes this route slow for larger models.

    3+k3=14,2+k2+k3=48,k1=80 ⟹ K=[803511]3+k_3=14,\quad 2+k_2+k_3=48,\quad k_1=80\ \Longrightarrow\ K=\begin{bmatrix}80&35&11\end{bmatrix}
  6. Method 2, Ackermann. Solve qM_c = [0, 0, 1]: qB = 0 gives q₃ = 0, qAB = 0 gives q₂ = 0, and qA²B = 1 gives q₁ = 1.

    q=[100],qA=[010],qA2=[0−11],qA3=[01−3]q=\begin{bmatrix}1&0&0\end{bmatrix},\quad qA=\begin{bmatrix}0&1&0\end{bmatrix},\quad qA^2=\begin{bmatrix}0&-1&1\end{bmatrix},\quad qA^3=\begin{bmatrix}0&1&-3\end{bmatrix}
  7. Add the rows with the coefficients of φ. The result is the same K as method 1.

    K=qA3+14 qA2+48 qA+80 q=[801−14+48−3+14]=[803511]K=qA^3+14\,qA^2+48\,qA+80\,q=\begin{bmatrix}80&1-14+48&-3+14\end{bmatrix}=\begin{bmatrix}80&35&11\end{bmatrix}
  8. Cross-check through canonical form: with a₂ = 3, a₁ = 2, a₀ = 0, T = M_cW and K̄ = [80 − 0, 48 − 2, 14 − 3] = [80, 46, 11]; then K̄T⁻¹ = [80, 35, 11] again. The eigenvalues of A − BK are −2 ± j2 and −10, as specified.

    T=McW=[100010011],K=KˉT−1=[804611][1000100−11]=[803511]T=M_cW=\begin{bmatrix}1&0&0\\0&1&0\\0&1&1\end{bmatrix},\qquad K=\bar KT^{-1}=\begin{bmatrix}80&46&11\end{bmatrix}\begin{bmatrix}1&0&0\\0&1&0\\0&-1&1\end{bmatrix}=\begin{bmatrix}80&35&11\end{bmatrix}
  9. Part 2. Move to the lab's mass–spring–damper with position output, and first design plain state feedback for poles at −2 ± j2. Under a constant 0.5 N load and a 0.2 m target the mass settles at 0.2625 m: the error is d/(4 + k₁) = 0.0625 m.

    A=[01−4−0.8], B=[01], C=[10]:K=[43.2],N=8A=\begin{bmatrix}0&1\\-4&-0.8\end{bmatrix},\ B=\begin{bmatrix}0\\1\end{bmatrix},\ C=\begin{bmatrix}1&0\end{bmatrix}:\qquad K=\begin{bmatrix}4&3.2\end{bmatrix},\quad N=8
  10. Add the error integral. The rank test passes, so the augmented model is controllable. Substituting u = −Kx + k_Iξ gives a third-order characteristic polynomial.

    det⁡[010−4−0.81−100]=−1≠0,det⁡(sI−A^+B^K^)=s3+(0.8+k2)s2+(4+k1)s+kI\det\begin{bmatrix}0&1&0\\-4&-0.8&1\\-1&0&0\end{bmatrix}=-1\neq0,\qquad \det(sI-\hat A+\hat B\hat K)=s^3+(0.8+k_2)s^2+(4+k_1)s+k_I
  11. Keep the pair at −2 ± j2 and put the integrator pole at −4. Ackermann's formula on (Â, B̂) returns the same augmented gain [20, 7.2, −32].

    (s2+4s+8)(s+4)=s3+8s2+24s+32 ⟹ K=[207.2],kI=32(s^2+4s+8)(s+4)=s^3+8s^2+24s+32\ \Longrightarrow\ K=\begin{bmatrix}20&7.2\end{bmatrix},\quad k_I=32
  12. Steady state by hand: ξ̇ = 0 forces y = r = 0.2 m. The velocity equation at rest then fixes ξ, and the input settles at 0.3 N, so that input plus load balances the 0.8 N spring force.

    0=−(4+k1)r+kIξ+d ⟹ ξ=24(0.2)−0.532=0.134375,u=−k1r+kIξ=0.3 N0=-(4+k_1)r+k_I\xi+d\ \Longrightarrow\ \xi=\frac{24(0.2)-0.5}{32}=0.134375,\qquad u=-k_1r+k_I\xi=0.3\ \mathrm N
  13. Confirm by simulation (RK4, 1 ms steps, 10 s, starting at rest). With the 0.5 N load the servo ends at y = 0.2000000 m, with an error below 10⁻⁹ m, while plain state feedback ends at 0.2625 m. With a 5 N/m spring instead of the 4 N/m in the model, plain feedback ends at 0.1778 m and the servo again at 0.2000 m. Without any load the servo response peaks at 0.2055 m after 1.97 s (2.7 % overshoot) and stays within 2 % of the target after 2.30 s.

    Y(s)R(s)=32(s+4)(s2+4s+8),Y(0)R(0)=1\frac{Y(s)}{R(s)}=\frac{32}{(s+4)(s^2+4s+8)},\qquad \frac{Y(0)}{R(0)}=1
REFERENCE

Reference table

Ackermann's formula step by step for the third-order positioning drive
QuantityFormulaValue
Modelx˙=Ax+Bu\dot x=Ax+BuA=[0100−1100−2], B=[001]A=\begin{bmatrix}0&1&0\\0&-1&1\\0&0&-2\end{bmatrix},\ B=\begin{bmatrix}0\\0\\1\end{bmatrix}
Open-loop polynomialdet⁡(sI−A)\det(sI-A)s3+3s2+2ss^3+3s^2+2s
Desired polynomialφ(s)\varphi(s)(s2+4s+8)(s+10)=s3+14s2+48s+80(s^2+4s+8)(s+10)=s^3+14s^2+48s+80
Controllability matrixMc=[BABA2B]M_c=\begin{bmatrix}B&AB&A^2B\end{bmatrix}[00101−31−24], det⁡Mc=−1\begin{bmatrix}0&0&1\\0&1&-3\\1&-2&4\end{bmatrix},\ \det M_c=-1
Last row of M_c⁻¹qMc=[001]qM_c=\begin{bmatrix}0&0&1\end{bmatrix}q=[100]q=\begin{bmatrix}1&0&0\end{bmatrix}
Rows qAᵏqA, qA2, qA3qA,\ qA^2,\ qA^3[010], [0−11], [01−3]\begin{bmatrix}0&1&0\end{bmatrix},\ \begin{bmatrix}0&-1&1\end{bmatrix},\ \begin{bmatrix}0&1&-3\end{bmatrix}
GainK=qA3+14 qA2+48 qA+80 qK=qA^3+14\,qA^2+48\,qA+80\,q[803511]\begin{bmatrix}80&35&11\end{bmatrix}
Checkeig⁡(A−BK)\operatorname{eig}(A-BK)−2±j2, −10-2\pm j2,\ -10

The same K follows from coefficient matching or from the controllable canonical form. Always recompute the eigenvalues of A − BK after a design.

More detail and model assumptions
A CLOSER LOOK

Why controllable canonical form makes placement easy

In controllable canonical form, A_c has ones just above the diagonal and −a₀, −a₁, …, −aₙ₋₁ in its bottom row, and B_c = [0 … 0 1]ᵀ. The product B_c·K̄ is zero except for its bottom row, which is K̄ itself, so A_c − B_cK̄ is again a companion matrix whose bottom row is −(a₀ + k̄₁), −(a₁ + k̄₂), …, −(aₙ₋₁ + k̄ₙ). Its characteristic polynomial can be read off directly, and matching it with φ(s) = sⁿ + αₙ₋₁sⁿ⁻¹ + … + α₀ gives every gain by one subtraction: k̄ᵢ₊₁ = αᵢ − aᵢ.

Here the gains are numbered from the constant term upwards, in the same order as the states x̄₁, …, x̄ₙ. Books that number the canonical states the other way list the same gains in reverse order. Whatever the convention, confirm the result by computing det(sI − A + BK).

A CLOSER LOOK

Getting there: the transformation T = M_cW

For a controllable model, build W from the open-loop coefficients a₁, …, aₙ₋₁, with ones on the anti-diagonal and zeros below it. For three states W = [[a₁, a₂, 1], [a₂, 1, 0], [1, 0, 0]]; for two states W = [[a₁, 1], [1, 0]]. With T = M_cW the new coordinates x̄ = T⁻¹x satisfy T⁻¹AT = A_c and T⁻¹B = B_c. Because u = −K̄x̄ = −K̄T⁻¹x, the gain in the original coordinates is K = K̄T⁻¹.

This route needs the open-loop coefficients, one matrix product and one inverse, and it is dependable by hand up to three states. It also shows why controllability is required: if M_c is singular, T does not exist and there are no canonical coordinates to move into.

A CLOSER LOOK

Ackermann's formula and a shortcut for hand work

Write A = (A − BK) + BK and expand φ(A). The Cayley–Hamilton theorem makes φ(A − BK) = 0 when A − BK has the characteristic polynomial φ, and every remaining term is a block of M_c multiplied by some row vector. The row vector that multiplies Aⁿ⁻¹B turns out to be exactly K, so φ(A) = M_c·[ * ; … ; * ; K]. Multiplying on the left by the last row of M_c⁻¹ keeps only K. That is Ackermann's formula.

By hand you never need all of M_c⁻¹ or all of φ(A). Find the row q = [0 … 0 1]M_c⁻¹ by solving qM_c = [0 … 0 1], which is the n scalar conditions qB = 0, qAB = 0, …, qAⁿ⁻¹B = 1. Then compute the rows q, qA, qA², …, qAⁿ by multiplying a row by A again and again, and add them up: K = qAⁿ + αₙ₋₁qAⁿ⁻¹ + … + α₀q. When the input reaches x₁ only through a chain of n stages, each feeding the next with coefficient 1, as in this chapter's examples, q = [1, 0, …, 0] and K is just the first row of φ(A).

A CLOSER LOOK

Choosing where the poles go

Start from the specification. A dominant pair −ζωn ± jωn√(1 − ζ²) sets the overshoot and settling time, exactly as in the second-order specifications chapter. Place every other pole two to five times farther to the left, so that its part of the transient has died out before the dominant pair settles.

Gains grow with how far the poles are moved. In the worked example below, moving the third pole from −4 to −10 while keeping the pair at −2 ± j2 raises the angle gain from 32 to 80, so a unit angle error asks for 2.5 times the drive. Fast poles also amplify sensor noise and model error; the observer and LQR chapters give other ways to decide.

A CLOSER LOOK

Why state feedback alone leaves a steady error

With u = −Kx + Nr and a constant target, the loop settles where 0 = (A − BK)x_ss + BNr, so y_ss = −C(A − BK)⁻¹B·N·r. Choosing N = −1/(C(A − BK)⁻¹B) makes y_ss = r, but only for the model that was used to compute N.

Add a constant input load d, or change a parameter, and y_ss moves away from r, because nothing in the loop accumulates the error. For the lab's mass–spring–damper with poles at −2 ± j2 (K = [4, 3.2], N = 8) and a 0.2 m target, a 0.5 N load leaves the mass at 0.2625 m, and a spring of 5 N/m instead of 4 N/m leaves it at 0.1778 m.

A plant that already contains an integrator is a partial exception. If the integrated state x₁ is the output, use u = k₁(r − x₁) − k₂x₂ − … − kₙxₙ; then the reference error is zero without any N. A constant load at the input still leaves an offset of d/k₁. In the third-order example below, a load of 0.5 with k₁ = 80 moves the final angle by 0.00625.

A CLOSER LOOK

Adding an integrator: the type-1 servo

Define a new state ξ with ξ̇ = r − y = r − Cx, the integral of the tracking error. The augmented state [x; ξ] obeys a model of order n + 1 with  = [[A, 0], [−C, 0]] and B̂ = [B; 0], plus the reference entering the ξ equation. Use u = −Kx + k_Iξ, which is ordinary state feedback on the augmented state with the gain K̂ = [K, −k_I]. All the tools above, including Ackermann's formula, apply to (Â, B̂).

The steady-state argument is short. If the closed loop is stable and r and the load are constant, every state settles, so ξ̇ = 0 and therefore y = r. Nothing in that argument used the plant parameters, so the same holds for any parameter error that keeps the loop stable and for any constant load at the input.

The augmented model must be controllable. That requires (A, B) controllable and rank [[A, B], [−C, 0]] = n + 1, which says the plant has no zero at s = 0. The second condition has a physical reading: if the plant's DC gain is zero, no constant input can hold a nonzero constant output, so no controller can either.

A CLOSER LOOK

Choosing the augmented poles

The augmented loop has n + 1 poles. Keep the dominant pair from the specification and put the extra pole on the real axis, near the dominant real part or somewhat to its left. With this structure the reference reaches y only through the integrator, so Y(s)/R(s) = k_I/φ(s) has no zeros and its DC gain is exactly one.

If the extra pole is too slow, the output creeps the last part of the way along a slow exponential tail, because the integrator does that part of the work. If it is too fast, k_I and the other gains grow, the integrator reacts strongly to every transient and the actuator saturates sooner. When saturation is possible, add anti-windup as in the PID chapter: stop integrating while the actuator is clipped.

TRY IT

Connect the example to the lab

The state-feedback lab places the poles of the mass–spring–damper A = [[0, 1], [−4, −0.8]], B = [0, 1]ᵀ by matching coefficients, and Ackermann's formula gives the same gain. Here M_c = [[0, 1], [1, −0.8]], the last row of M_c⁻¹ is [1, 0], and so K is simply the first row of φ(A). For ωn = 2 rad/s and ζ = 0.7, φ(s) = s² + 2.8s + 4 and the first row of φ(A) is [0, 2], the K that the lab prints. The lab's reference gain N = ωn² is a model-based scaling, not the integral action of this chapter.

Compare Ackermann's gain with the lab's K
YOUR EXPERIMENT

Make a prediction before moving a control.

  1. PREDICTBefore opening the lab, use Ackermann's formula on A = [[0, 1], [−4, −0.8]], B = [0, 1]ᵀ to find K for ωn = 3 rad/s and ζ = 0.7, and the reference gain N. What first force does a 0.2 m target ask for?
  2. CHANGE ONE THINGPin the default run with ωn = 2 rad/s, then change only ωn to 3 rad/s. Keep ζ = 0.7, the 0.2 m target and true-state feedback.
  3. OBSERVERead K = [5, 3.4] and N = 9 in the model panel. The first requested force rises from 0.8 N to 1.8 N, and the final position error stays essentially zero.
  4. EXPLAINHere q = [1, 0], so K is the first row of φ(A) = A² + 4.2A + 9I, which is [5, 3.4]. The first force is N·r = 9 × 0.2 = 1.8 N. The final error is zero only because the simulated plant is exactly the design model: N comes from that model and the lab has no integrator. With a load or a different spring, the offset computed in this chapter would appear.
BE CAREFUL

When M_c is nearly singular, Ackermann's formula still returns numbers, but the gains become huge and rounding moves the poles away from where you asked. Check the rank of M_c before designing, and after every design recompute the eigenvalues of A − BK. The integral servo is not immune to actuator limits either. While the actuator clips, ξ keeps integrating and the output overshoots, which is the same integral windup you met in the PID chapters.

Check your understanding+

A plant contains an integrator, its output is that integrated state x₁, and you use u = k₁(r − x₁) − k₂x₂ − k₃x₃. Is the steady error to a step in r zero? Is it zero when a constant load d acts at the input?

The reference error is zero, because the plant's own integrator makes the closed-loop DC gain from r to y equal to one. The load still leaves an offset of d/k₁: no integrator sits between the load and the controller output. An integral servo removes both.
PRACTICE PROBLEMS

Solve these before opening the solutions

Work each problem on paper first. Open the answer to check yours, then the full solution if you need the steps, and mark how it went.

  1. The plant below is unstable. Check controllability, then use Ackermann's formula to place the closed-loop poles at −3 and −4.

    A=[1102],B=[01]A=\begin{bmatrix}1&1\\0&2\end{bmatrix},\qquad B=\begin{bmatrix}0\\1\end{bmatrix}
    Show answer

    AnswerK = [20, 10].

    K=[2010]K=\begin{bmatrix}20&10\end{bmatrix}
    Show full solution

    Solution

    1. A is triangular, so the open-loop poles are 1 and 2. The controllability matrix has a nonzero determinant.

      Mc=[BAB]=[0112],det⁡Mc=−1M_c=\begin{bmatrix}B&AB\end{bmatrix}=\begin{bmatrix}0&1\\1&2\end{bmatrix},\qquad \det M_c=-1
    2. Solve qM_c = [0, 1]: qB = q₂ = 0 and qAB = q₁ + 2q₂ = 1.

      q=[10],qA=[11],qA2=[13]q=\begin{bmatrix}1&0\end{bmatrix},\qquad qA=\begin{bmatrix}1&1\end{bmatrix},\qquad qA^2=\begin{bmatrix}1&3\end{bmatrix}
    3. The desired polynomial is (s + 3)(s + 4) = s² + 7s + 12. Combine the rows.

      K=qA2+7 qA+12 q=[1+7+123+7]=[2010]K=qA^2+7\,qA+12\,q=\begin{bmatrix}1+7+12&3+7\end{bmatrix}=\begin{bmatrix}20&10\end{bmatrix}
    4. Check: the trace of A − BK is −7 and its determinant is 12, the sum and product required by poles at −3 and −4.

      A−BK=[11−20−8],det⁡(sI−A+BK)=s2+7s+12A-BK=\begin{bmatrix}1&1\\-20&-8\end{bmatrix},\qquad \det(sI-A+BK)=s^2+7s+12
  2. Transform this model to controllable canonical form with T = M_cW, find the canonical gain K̄ for closed-loop poles at −4 ± j3, and convert it back to K.

    A=[−101−2],B=[10]A=\begin{bmatrix}-1&0\\1&-2\end{bmatrix},\qquad B=\begin{bmatrix}1\\0\end{bmatrix}
    Show answer

    AnswerK̄ = [23, 5] and K = [5, 13].

    Kˉ=[235],K=[513]\bar K=\begin{bmatrix}23&5\end{bmatrix},\qquad K=\begin{bmatrix}5&13\end{bmatrix}
    Show full solution

    Solution

    1. Open-loop polynomial: A is triangular with poles −1 and −2, so a₁ = 3 and a₀ = 2.

      det⁡(sI−A)=(s+1)(s+2)=s2+3s+2\det(sI-A)=(s+1)(s+2)=s^2+3s+2
    2. Build M_c, W and T, and invert T with the 2×2 rule.

      Mc=[1−101],W=[3110],T=McW=[2110],T−1=[011−2]M_c=\begin{bmatrix}1&-1\\0&1\end{bmatrix},\quad W=\begin{bmatrix}3&1\\1&0\end{bmatrix},\quad T=M_cW=\begin{bmatrix}2&1\\1&0\end{bmatrix},\quad T^{-1}=\begin{bmatrix}0&1\\1&-2\end{bmatrix}
    3. Check that the new coordinates really are canonical: the bottom row holds −a₀ and −a₁.

      T−1AT=[01−2−3],T−1B=[01]T^{-1}AT=\begin{bmatrix}0&1\\-2&-3\end{bmatrix},\qquad T^{-1}B=\begin{bmatrix}0\\1\end{bmatrix}
    4. The desired polynomial is (s + 4)² + 9 = s² + 8s + 25, so subtract coefficient by coefficient.

      Kˉ=[25−28−3]=[235]\bar K=\begin{bmatrix}25-2&8-3\end{bmatrix}=\begin{bmatrix}23&5\end{bmatrix}
    5. Return to the original coordinates and check: the trace of A − BK is −8 and its determinant 25.

      K=KˉT−1=[513],A−BK=[−6−131−2]K=\bar KT^{-1}=\begin{bmatrix}5&13\end{bmatrix},\qquad A-BK=\begin{bmatrix}-6&-13\\1&-2\end{bmatrix}
  3. For the model below, can state feedback place the closed-loop poles at −4 and −5? If not, which closed-loop polynomials can it produce?

    A=[01−2−3],B=[1−1]A=\begin{bmatrix}0&1\\-2&-3\end{bmatrix},\qquad B=\begin{bmatrix}1\\-1\end{bmatrix}
    Show answer

    AnswerNo. The mode at −2 is uncontrollable, so every closed-loop polynomial has the factor (s + 2). The other pole can be put anywhere, for example at −4 with k₁ − k₂ = 3.

    det⁡(sI−A+BK)=(s+2)(s+1+k1−k2)\det(sI-A+BK)=(s+2)(s+1+k_1-k_2)
    Show full solution

    Solution

    1. The two columns of M_c are opposite, so its rank is 1 and Ackermann's formula cannot be used.

      Mc=[1−1−11],rank⁡Mc=1M_c=\begin{bmatrix}1&-1\\-1&1\end{bmatrix},\qquad \operatorname{rank}M_c=1
    2. Find which mode is stuck. The open-loop eigenvalues are −1 and −2. The left eigenvector w of the eigenvalue −2, wA = −2w, is orthogonal to B, so the input never excites that mode.

      w=[11]:w(A+2I)=0,wB=1−1=0w=\begin{bmatrix}1&1\end{bmatrix}:\quad w(A+2I)=0,\qquad wB=1-1=0
    3. Compute the closed-loop polynomial for a general K. The trace is −3 − k₁ + k₂ and the determinant 2(1 + k₁ − k₂), and the polynomial factors.

      det⁡(sI−A+BK)=s2+(3+k1−k2)s+2(1+k1−k2)=(s+2)(s+1+k1−k2)\det(sI-A+BK)=s^2+(3+k_1-k_2)s+2(1+k_1-k_2)=(s+2)(s+1+k_1-k_2)
    4. Only the difference k₁ − k₂ matters. With k₁ − k₂ = 3, for example K = [3, 0], the poles are −2 and −4. The system is still stabilizable, because the mode that cannot be moved is already stable.

  4. A first-order plant ẋ = −x + 2(u − w), y = x, carries a constant load w. Design u = −kx + k_Iξ with ξ̇ = r − y for closed-loop poles at −2 ± j2. For r = 1 and w = 0.5, find the final values of y, ξ and u, and compare with u = −kx + Nr using the same k and N chosen for zero error without load.

    Show answer

    Answerk = 1.5 and k_I = 4. The servo ends at y = 1, ξ = 0.625 and u = 1; with N = 2 the plain law ends at y = 0.75.

    k=1.5,kI=4,yss=1,ξss=0.625,uss=1k=1.5,\quad k_I=4,\qquad y_{ss}=1,\quad \xi_{ss}=0.625,\quad u_{ss}=1
    Show full solution

    Solution

    1. Substitute the control law. The augmented closed loop is second order.

      [x˙ξ˙]=[−1−2k2kI−10][xξ]+[−2wr],det⁡=s2+(1+2k)s+2kI\begin{bmatrix}\dot x\\\dot\xi\end{bmatrix}=\begin{bmatrix}-1-2k&2k_I\\-1&0\end{bmatrix}\begin{bmatrix}x\\\xi\end{bmatrix}+\begin{bmatrix}-2w\\r\end{bmatrix},\qquad \det=s^2+(1+2k)s+2k_I
    2. Match s² + 4s + 8.

      1+2k=4 ⇒ k=1.5,2kI=8 ⇒ kI=41+2k=4\ \Rightarrow\ k=1.5,\qquad 2k_I=8\ \Rightarrow\ k_I=4
    3. At steady state ξ̇ = 0 gives y = 1, and ẋ = 0 gives u − w = 0.5, so u = 1. Then u = −1.5 + 4ξ fixes ξ.

      ξss=1+1.54=0.625\xi_{ss}=\frac{1+1.5}{4}=0.625
    4. Plain law: without load, y_ss = 2N/(1 + 2k) = N/2, so N = 2. With the load, ẋ = −4x + 2(2 − 0.5) = 0 gives y = 0.75, a 25 % error. A simulation of both loops over 10 s reproduces y = 1.0000 and y = 0.7500.

      yssplain=2(Nr−w)1+2k=2(2−0.5)4=0.75y_{ss}^{\text{plain}}=\frac{2(Nr-w)}{1+2k}=\frac{2(2-0.5)}{4}=0.75
  5. Exam level. For the plant below with output y = x₁: (a) check that an integral servo is possible; (b) find K and k_I that put all three closed-loop poles at −3; (c) a constant load w = 1 enters as ẋ₂ = −2x₁ − 3x₂ + u − w; find the final ξ and u for r = 1; (d) would the design still work if the sensor measured x₂ instead of x₁?

    A=[01−2−3],B=[01],C=[10]A=\begin{bmatrix}0&1\\-2&-3\end{bmatrix},\qquad B=\begin{bmatrix}0\\1\end{bmatrix},\qquad C=\begin{bmatrix}1&0\end{bmatrix}
    Show answer

    Answer(a) Yes. (b) K = [25, 6], k_I = 27. (c) ξ = 28/27 ≈ 1.037 and u = 3. (d) No: with C = [0, 1] the plant has a zero at s = 0 and the rank test fails.

    K=[256],kI=27,ξss=2827,uss=3K=\begin{bmatrix}25&6\end{bmatrix},\quad k_I=27,\qquad \xi_{ss}=\tfrac{28}{27},\quad u_{ss}=3
    Show full solution

    Solution

    1. (a) (A, B) is in companion form and therefore controllable, and the rank test matrix has determinant −1.

      det⁡[010−2−31−100]=−1≠0\det\begin{bmatrix}0&1&0\\-2&-3&1\\-1&0&0\end{bmatrix}=-1\neq0
    2. (b) Substitute u = −Kx + k_Iξ and match (s + 3)³ = s³ + 9s² + 27s + 27.

      s3+(3+k2)s2+(2+k1)s+kI ⟹ k2=6,k1=25,kI=27s^3+(3+k_2)s^2+(2+k_1)s+k_I\ \Longrightarrow\ k_2=6,\quad k_1=25,\quad k_I=27
    3. (c) At steady state y = x₁ = 1 and x₂ = 0. The x₂ equation at rest gives u = 2 + w = 3, and u = −25 + 27ξ then gives ξ. A 15 s simulation confirms y = 1.0000, ξ = 1.0370 and u = 3.0000.

      0=−2(1)−3(0)+u−1 ⇒ u=3,ξ=3+2527=2827≈1.0370=-2(1)-3(0)+u-1\ \Rightarrow\ u=3,\qquad \xi=\frac{3+25}{27}=\frac{28}{27}\approx1.037
    4. (d) With C = [0, 1] the test matrix is singular. The transfer function is s/(s² + 3s + 2), with a zero at the origin: a constant input produces a constant position and zero velocity, so no constant input can hold a nonzero velocity.

      det⁡[010−2−310−10]=0\det\begin{bmatrix}0&1&0\\-2&-3&1\\0&-1&0\end{bmatrix}=0

Mark each exercise after you check your answer. Marks stay in this browser.

KEY TERMS

Terms this lecture teaches

All terms in the glossary →
QUESTIONS STUDENTS ASK

Frequently asked questions

How do I use Ackermann's formula by hand?

Solve qM_c = [0 … 0 1] for the single row q, form qA, qA², …, qAⁿ by repeated row-times-matrix products, and add them with the coefficients of φ. For the third-order positioning drive with open-loop poles 0, −1 and −2, q = [1, 0, 0] and φ(s) = s³ + 14s² + 48s + 80 give K = [80, 35, 11].

What if the controllability matrix is singular or nearly singular?

If M_c is singular the formula has no inverse to use, and some closed-loop polynomials cannot be reached at all: an uncontrollable mode keeps its eigenvalue. If it is nearly singular the formula still returns numbers, but the gains become huge and rounding moves the poles, so check the rank first and recompute the eigenvalues of A − BK afterwards.

Why does state feedback with a reference gain N leave a steady-state error?

N is computed from the model, so it gives y = r only when the model is exact and no load acts; nothing in the loop accumulates the error. For the lab's mass–spring–damper with K = [4, 3.2] and N = 8, a constant 0.5 N load on a 0.2 m target leaves the mass at 0.2625 m.

Why does the integral servo remove the error, and when can it fail?

At any steady state ξ̇ = r − y = 0, so y = r whatever the plant parameters or constant input loads, as long as the loop stays stable. The augmented model must be controllable, which fails when the plant has a zero at s = 0, and while the actuator saturates ξ keeps integrating, so add anti-windup.

Where should I put the extra pole of an integral servo?

Keep the dominant pair from the specification and put the extra pole on the real axis near or somewhat left of the dominant real part. Too slow leaves a creeping tail; too fast inflates k_I and the other gains. For the lab's mass–spring–damper, poles at −2 ± j2 and −4 give K = [20, 7.2] and k_I = 32.

Why the next lesson follows

Every gain in this chapter multiplies a state, and the drive example needs speed and torque as well as angle. The next lecture builds a model-based estimate of the states a sensor does not measure.

YOUR PROGRESS

Finished the reading and the exercises? Mark the lecture as done to tick it on the syllabus. Progress stays in this browser.

EIGENROOM · https://eigenroom.com/theory/state-feedback-design · Updated 2026-11-15