State feedback and pole placement
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
Measure every state, multiply each one by a gain and feed it back, and you rewrite the system's A matrix, and with it the poles. Follow one 2 kg cart that rings with 53% overshoot: choose new poles at −4 ± j4, solve two gains by matching coefficients (K = [14 12]), add a reference gain so it lands on target, and watch the poles slide and the ringing disappear.
The cart as matrices
Our plant is the cart from State-space models: 2 kg on a spring and damper, pushed by a force u. Its state x is position x₁ and velocity x₂, and it obeys ẋ = Ax + Bu.
x = [x1, x2] position (m), velocity (m/s)
x' = A x + B u
A = [[ 0, 1],
[-25, -2]]
B = [0, 0.5]
2 kg · spring 50 N/m · damper 4 N·s/mاقرأ الدرس خطوة بخطوة
The cart as matrices
Our plant is the cart from State-space models: 2 kg on a spring and damper, pushed by a force u. Its state x is position x₁ and velocity x₂, and it obeys ẋ = Ax + Bu.
x = [x1, x2] position (m), velocity (m/s) x' = A x + B u A = [[ 0, 1], [-25, -2]] B = [0, 0.5] 2 kg · spring 50 N/m · damper 4 N·s/mIt rings
Push it with a steady 10 N and it overshoots by 53% and rings for 3.9 s. The reason is in A: its eigenvalues, the poles, sit at −1 ± j4.90, close to the imaginary axis.
det(sI - A) = s^2 + 2s + 25 poles -1 ± j4.90 (damping ratio 0.2) step, u = 10 N peak 0.305 m (+53 %) within 2 % after 3.9 sMeasure the whole state
State feedback needs every state variable, not just the output. Sensors read the position x₁ and the velocity x₂, and each one travels back along its own wire to a gain.
frozen at t = 0.4 s of the open-loop push x1 = 0.225 m x2 = 0.63 m/s Full-state feedback: every state is measured (or estimated) at every instant.The feedback law
Multiply each state by a gain and subtract the sum from the input: u = −k₁x₁ − k₂x₂, or u = −Kx. The row K = [k₁ k₂] holds the only two numbers we get to choose.
u = -K x = -(k1*x1 + k2*x2) K = [k1, k2] one gain per state k1 how hard to pull back per metre k2 how hard to brake per m/sFeedback rewrites A
Put u = −Kx into ẋ = Ax + Bu and you get ẋ = (A − BK)x. The loop acts like a new plant with matrix A − BK, so its poles are the eigenvalues of A − BK, not of A.
x' = A x + B(-K x) = (A - B K) x A - B K = [[ 0, 1], [-25 - 0.5 k1, -2 - 0.5 k2]] new poles = eigenvalues of A - B KOne gain, one coefficient
Here det(sI − (A − BK)) = s² + (2 + 0.5k₂)s + (25 + 0.5k₁). The velocity gain sets the damping term and the position gain sets the stiffness term: two gains, two coefficients.
det(sI - (A - BK)) = s^2 + (2 + 0.5 k2) s + (25 + 0.5 k1) damping stiffness k2 = 0, k1 = 0 -> s^2 + 2s + 25 (the cart alone)Choose where poles go
We want little ringing and a quick finish, so we pick poles at −4 ± j4: damping ratio 0.71, about 4.3% overshoot. Those two poles mean the polynomial (s + 4)² + 16 = s² + 8s + 32.
wanted poles -4 ± j4 damping ratio 0.71 natural frequency 5.66 rad/s (s + 4 - 4j)(s + 4 + 4j) = s^2 + 8s + 32 further left = faster decay less height = less ringingMatch and solve
Match coefficients: 2 + 0.5k₂ = 8 gives k₂ = 12, and 25 + 0.5k₁ = 32 gives k₁ = 14. As the gains grow from zero, the poles slide from −1 ± j4.90 to −4 ± j4.
# pole placement by matching coefficients A = [[0, 1], [-25, -2]] b = 0.5 # B = [0, b] a1, a0 = 8, 32 # want s^2 + 8s + 32 k2 = (a1 + A[1][1]) / b # 2 + 0.5*k2 = 8 k1 = (a0 + A[1][0]) / b # 25 + 0.5*k1 = 32 print(k1, k2) # 14.0 12.0Why it works here
Matching works because the cart is controllable: [B AB] = [0 0.5; 0.5 −1] has determinant −0.25, not zero. Then K can put the poles anywhere, as long as complex poles come in conjugate pairs.
controllability matrix [B AB] = [[0.0, 0.5], [0.5, -1.0]] det = -0.25 (not zero: full rank) full rank -> any pole set is reachable rank short -> some poles cannot moveAim at a target
u = −Kx only pulls the cart to zero. To aim at r = 0.2 m, add a reference gain: u = N̄r − Kx. N̄ = 64 makes the cart settle at r; with N̄ = 1 it would stop at 3.1 mm.
x1 / r at steady state = 0.5 * Nbar / 32 Nbar = 32 / 0.5 = 64 -> x1 -> r exactly Nbar = 1 -> x1 -> 3.1 mm u = 64 r - 14 x1 - 12 x2The placed loop
Ask for 0.2 m. The cart rises, overshoots by 4.3% to 0.209 m, and stays within 2% after 1.1 s. Open loop overshot 53% and took 3.9 s. Same cart, new poles.
# simulate u = 64*r - 14*x1 - 12*x2 x1 = x2 = peak = 0.0 r, dt = 0.2, 1e-4 for n in range(40000): # 4 s u = 64 * r - 14 * x1 - 12 * x2 x1, x2 = x1 + dt * x2, x2 + dt * (-25 * x1 - 2 * x2 + 0.5 * u) peak = max(peak, x1) print(round(peak, 3)) # 0.209The price is force
The loop starts with 12.8 N, eases to 5.5 N to brake the cart, then settles at 10 N, the force the spring needs. Poles further left need bigger gains and more force than the motor may have.
u(0) 12.8 N (64 * 0.2) smallest 5.5 N at 0.24 s (braking) steady 10 N (50 N/m * 0.2 m) faster poles -> bigger K -> bigger u
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01With state feedback u = −Kx on ẋ = Ax + Bu, which matrix's eigenvalues are the closed-loop poles?
Substituting u = −Kx gives ẋ = Ax − BKx = (A − BK)x, so the loop behaves like a system with matrix A − BK.
02For the cart, det(sI − (A − BK)) = s² + (2 + 0.5k₂)s + (25 + 0.5k₁). Which gains give poles at −5 ± j5, that is s² + 10s + 50?
2 + 0.5k₂ = 10 gives k₂ = 16, and 25 + 0.5k₁ = 50 gives k₁ = 50.
03Why can state feedback move every pole of the cart?
Pole placement works for any pole set (complex poles in conjugate pairs) exactly when the pair (A, B) is controllable, which for one input means det[B AB] ≠ 0.
04With u = −Kx + N̄r and K = [14 12], the cart's steady position is r·N̄/64. What does N̄ = 64 do?
N̄ sits outside the loop, so the poles stay at −4 ± j4. It only scales the input so the steady state equals r; with N̄ = 1 the cart would stop at 3.1 mm.
05What is the usual price of placing the poles much further to the left?
Faster poles need bigger K, and u = −Kx grows with K. Here the placed loop already starts at 12.8 N; a real motor has a limit.
المسرد
- State feedback
- A control law that uses every state variable: u = −Kx (plus a reference term). Here x = [position, velocity].
- Gain matrix K
- The row of numbers [k₁ k₂] that multiplies the state. Choosing K chooses the closed-loop poles.
- Pole placement
- Choosing where the closed-loop poles should be, then solving for the K that puts them there.
- Characteristic polynomial
- det(sI − M) for a system matrix M. Its roots are the poles; with feedback, M = A − BK.
- Controllability
- A plant is controllable when the input can steer every state. For one input, det[B AB …] ≠ 0, and then any pole set can be placed.
- Reference gain N̄
- A gain on the target r that makes the output settle exactly on r. It does not move the poles.
- Ackermann's formula
- A closed-form way to compute K for any controllable single-input system; for phase-variable form it reduces to matching coefficients.
الملاحظات والمصادر
- The cart is the same illustrative 2 kg cart as in State-space models. Every curve, pole and number in the figure is computed from its exact solution, and the Python on each step prints what the step says.
- For a plant in phase-variable form, matching coefficients is the whole method. For any controllable single-input plant, Ackermann's formula gives the same K directly, and python-control's place(A, B, p) computes it numerically; with one input the answer is unique.
- Here both states are measured. When only the position can be measured, an observer (estimator) rebuilds the velocity from the measurements; observability, from Controllability and observability, says when that is possible.
- The Python is plain Python 3. The simulation steps the state equation with Euler's method every 0.1 ms, close enough to the exact curve to print the same peak to three decimals.
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (ch. 12, design via state space)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (ch. 10, control systems design in state space)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson (ch. 7, state-space design)
- MIT OpenCourseWare 16.30 Feedback Control Systems, lecture notes 10-12 and 16 (controllability, full-state feedback, pole placement, reference inputs)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- python-control documentation: control.place
اختبار يتاح بعد الخطوة الأخيرة.