State-Space Controller and Observer Design
State-space design moves beyond shaping transfer-function plots and directly assigns the dynamics of internal state equations. Nise's state-space design chapter develops controllability, pole placement, Ackermann's formula, observer design, observability, and integral control for steady-state error. This page also adds a short supplementary LQR overview because it is the standard modern extension of the same framework.
The state-space viewpoint is powerful because it separates what can be controlled from what can be measured. A plant may have states that are not directly sensed, so an observer estimates them. A plant may have modes that an input cannot influence, so pole placement cannot move them. These structural questions must be answered before choosing gains.
Definitions
For a single-input system
state feedback uses
or a scaled reference variant. The closed-loop state matrix is
The system is controllable if the input can move the state from any initial condition to any final condition in finite time. For an th-order single-input system, the controllability matrix is
The system is controllable if
The system is observable if the initial state can be determined from the input-output history. The observability matrix is
with observability requiring rank .
A full-order observer has the form
The estimation error evolves as
Key results
If is controllable, state feedback can assign the eigenvalues of arbitrarily, within real-coefficient conjugate-pair constraints. Ackermann's formula gives a direct single-input gain:
where is the desired characteristic polynomial.
If is observable, observer gain can assign eigenvalues of . Observer poles are usually placed faster than controller poles so estimation error decays quickly, but not so fast that measurement noise is excessively amplified.
Integral control can be added by augmenting the state with an integral of tracking error:
The augmented system can then be controlled with
This brings the steady-state error benefits of integral action into state-space design.
Supplementary LQR overview: Linear Quadratic Regulator design chooses to minimize
where penalizes state deviation and penalizes control effort. LQR does not place poles manually; it finds a gain from a trade-off. This is beyond Nise's main undergraduate development but is the standard next step after pole placement.
Pole placement provides exact algebraic control over eigenvalues, but it does not directly specify control effort or sensitivity. Placing poles very far left makes the nominal response fast, yet it can require large actuator commands and amplify measurement noise when implemented with an observer. The resulting system may saturate, excite neglected dynamics, or become fragile under parameter uncertainty. This is why pole locations are design variables, not trophies.
Reference tracking with state feedback usually needs an additional feedforward gain. The law drives the state to the origin. If the desired output is a nonzero constant reference, one may use and choose so the steady output equals . Integral augmentation is another approach, and it is more robust to constant disturbances or plant gain errors because it drives accumulated error toward zero.
The separation principle is the key reason observer-based control is manageable for linear systems. Under standard controllability and observability assumptions, the state-feedback gain and observer gain can be designed separately. The combined closed-loop poles are the controller poles together with the observer error poles. This does not mean the designs are independent in practice: fast observer poles can inject noise into the control input, and slow observer poles can make the controller act on poor estimates.
Observability depends on sensors, not only on the plant. A mechanical system with position measurement may be observable because velocity can be inferred from position history through the dynamics. A system with an unfortunate sensor location may hide an important vibration mode. Adding a sensor, changing the measured output, or estimating a disturbance as an augmented state can change the design problem fundamentally.
LQR adds a more systematic way to trade state error against input effort. Large entries in tell the design that certain states are expensive; large entries in tell it that control effort is expensive. The resulting poles often move in sensible ways without being hand assigned. LQR still requires engineering judgment: the weights must reflect units, safety limits, and performance priorities, and the resulting response must be checked just like a pole-placement design.
Integral augmentation changes controllability requirements. Adding an integral-of-error state creates a larger augmented matrix. The augmented pair must be controllable for arbitrary pole placement of the combined plant and integrator dynamics. If the plant has a zero at the origin or cannot influence the measured output in steady state, adding an integrator may not solve the tracking problem and can instead create instability.
Observer-based control should be validated with model error. If , , or differ from the real plant, the observer may converge to a biased estimate. Constant disturbances can be handled by augmenting the observer with disturbance states, but only when the augmented system remains observable. This is a common bridge from Nise's observer design to practical estimators and Kalman filters.
State-space design is also sensitive to scaling. A state measured in millimeters and another measured in radians per second may have very different numerical magnitudes. Poor scaling can make rank tests, pole placement, and LQR calculations ill-conditioned. Before blaming an algorithm, check units and consider nondimensionalization or physically meaningful scaling.
Simulation should include both the true state and the estimated state when observers are used. Plotting the estimation error directly reveals whether poor output response is caused by controller poles, observer transients, measurement noise, or model mismatch.
This plot is often the fastest diagnostic.
Visual
| Concept | Matrix test | Design implication |
|---|---|---|
| controllability | rank | state feedback can place poles |
| observability | rank | observer can estimate states |
| state feedback | eigenvalues of | controls plant dynamics |
| observer | eigenvalues of | controls estimation error |
| integral augmentation | add error-integral state | improves tracking accuracy |
Worked example 1: controllability and pole placement
Problem: For
find so the closed-loop poles are at and .
Method:
- Check controllability:
Thus
The determinant is
so the system is controllable.
- Closed-loop matrix:
- Characteristic polynomial:
- Desired polynomial:
- Match coefficients:
Checked answer: .
Worked example 2: observability and observer gain
Problem: For the same but with
find so observer error poles are at and .
Method:
- Observability matrix:
Thus
rank , so the system is observable.
- Observer error matrix:
- Characteristic polynomial:
Expand:
- Desired polynomial:
- Match:
Checked answer: .
Code
import numpy as np
from scipy.signal import place_poles
A = np.array([[0.0, 1.0], [-2.0, -3.0]])
B = np.array([[0.0], [1.0]])
C = np.array([[1.0, 0.0]])
Ctrb = np.column_stack([B, A @ B])
Obsv = np.vstack([C, C @ A])
print("controllability rank:", np.linalg.matrix_rank(Ctrb))
print("observability rank:", np.linalg.matrix_rank(Obsv))
K = place_poles(A, B, [-4, -5]).gain_matrix
L = place_poles(A.T, C.T, [-6, -7]).gain_matrix.T
print("K:", K)
print("controller poles:", np.linalg.eigvals(A - B @ K))
print("L:", L)
print("observer poles:", np.linalg.eigvals(A - L @ C))
Common pitfalls
- Attempting pole placement before checking controllability.
- Designing an observer before checking observability.
- Placing observer poles extremely fast and then amplifying sensor noise.
- Forgetting reference scaling. State feedback regulates to zero unless command tracking is added.
- Assuming all states are measured. If only output is available, use observer-based feedback.
- Treating LQR weights as magic tuning knobs without checking actuator limits and response.
Connections
- State-space modeling introduces , , , and .
- Routh-Hurwitz stability tests desired characteristic polynomials.
- Steady-state errors motivates integral augmentation.
- Digital control extends state feedback to sampled implementations.
- Autonomous driving control uses state feedback and observer ideas in applied systems.