S9 · Lesson 37 · Observability and state observers
When the outputs reveal every state, the observability matrix, the Luenberger observer and its error dynamics, choosing observer poles, duality with state feedback, and the separation principle for output feedback
State feedback needs every state, but sensors cost money and some states, like a motor's flux or a rotor's speed in a sensorless drive, can't be measured at all. The fix is to run a model of the plant alongside it, feed the model the same input, and correct the model continuously with the difference between the measured output and the model's prediction. David Luenberger described this observer in 1964. When the outputs carry enough information, a property called observability, the model's state converges to the real one, and feeding back the estimate works almost as well as feeding back the truth.
- An observer for a double integrator that measures only position: the plot shows the estimation errors after the velocity estimate starts off by 1.
- The error obeys : sets the observer's natural frequency () and its damping.
- The position error starts at zero but grows briefly before the observer pulls both back: the observer learns the velocity by watching the position drift.
Predict
A system has two decoupled states, and , and only is measured. Can an observer estimate ?
never affects y, so no processing of y can recover it. The observability matrix has rank 1. Because is stable the model's guess still converges, at the plant's own rate, but the observer can't speed that up. Such a system is detectable but not observable.
Name it
Observability
, is observable if the initial state can be found from the output and input over a finite time. The test:
The observer
The error obeys , independent of the input. If the system is observable, L can place the eigenvalues of A − LC anywhere. That's the dual of state feedback: placing eig(A − LC) is placing eig(), a state-feedback problem for the pair .
For a double integrator measuring position, the error polynomial is , so , .
Choosing observer poles
Faster observer poles make the estimate converge sooner but amplify measurement noise, since a large L trusts each new measurement heavily. A common choice puts them two to six times faster than the controller's. The Kalman filter (lesson 39) chooses L optimally from the noise levels.
The separation principle
Feed back the estimate, . With states the closed loop is block triangular:
so its eigenvalues are those of A − BK together with those of A − LC. The controller and the observer can be designed separately. (Separate design doesn't guarantee good robustness; lesson 39 comes back to this.)
Worked example
The servo of lesson 34, , measures only θ. Design an observer with = 200 rad/s and ζ = 0.7.
Show the solution
- Error dynamics. With :
- Its characteristic polynomial.
- Match the target. For = 200 rad/s and ζ = 0.7 the target is :
- Speed. The estimation error settles in about four times faster than the controller's poles at = 50.
Answer = 217.5 and = 26,406, and the estimation error settles in about 29 ms.
Worked example
With the state feedback of lesson 34 and this observer, what are the closed-loop poles?
Show the solution
- Separation principle. The closed-loop poles are the controller's and the observer's together:
- Characteristic polynomial. The fourth-order polynomial is
- Where the observer poles show. They don't appear in the response to the reference at all, since the estimation error isn't excited by r; they show up only after disturbances or a wrong initial estimate.
Answer −35 ± j35.7 from the controller and −140 ± j143 from the observer.
Worked example
A heater obeys , where d is an unknown, constant heat loss. Only x is measured. Design an observer that also estimates d, with error poles at = 1 rad/s, ζ = 0.7.
Show the solution
- Augment the state. Treat d as a state with :
- Error polynomial. With :
- Match the target. For = 1 rad/s and ζ = 0.7 the target is :
- Use the estimate. Feeding forward cancels the disturbance, which gives the loop integral action without an explicit integrator.
Answer = 1.3 and = 20.
Check
An observer for a double integrator measuring position needs error poles at = 20 rad/s, ζ = 0.6. What's ?
Check
A servo measures θ. What observer gain puts the error poles at = 100, ζ = 1?
Check
, . What's ?
Check
A controller places poles with = 10 and an observer places its poles with = 40. What's the constant term of the fourth-order closed-loop characteristic polynomial?
Check
About how long does an observer with error poles at = 200 rad/s and ζ = 0.5 take for its estimates to settle within 2%?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A double-integrator observer has = 8, = 100. Its velocity estimate starts 1 unit off and its position estimate is right. What's the position error at t = 0.2 s?
Check
A plant with a constant unknown d is measured through x. An observer estimates x and d with error poles at = 5 rad/s, ζ = 1.
(a)
What is ?
(b)
What is ?
Check
A double integrator measuring position gets an observer with error poles at = w, ζ = z.
Step 1
What is ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is ?
Step 3
About how long does the error take to settle to 2%?
Explain why
Why does an observer need the plant's input as well as its output?
The observer is a copy of the plant's model that runs in parallel and is corrected by the output error. If the copy didn't get the same input, it would drift away from the real plant every time the input changed, and the correction term would have to account for the input's whole effect through the output, which arrives late and filtered. Feeding the input in makes the model move exactly as the plant does, so the estimation error obeys with no input term at all. The correction then only has to remove the initial mismatch and the effects of disturbances and model errors.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.