HW10 Solutions
HW10 Solutions
HW 10 Solutions
1. Controller and observer design
Consider the following plant:
s + 15
G(s) = .
(s + 1)(s + 2)(s + 4)
(a) Design a state feedback controller to yield a 16.3% overshoot and settling time of 4 s by choosing
the third desired closed-loop
h pole toi cancel the closed-loop zero.
Answer: (3 pts) K = 52 20 10
Using the usual equations, for 16.3% overshoot and settling time of 4 s we need ζ = 0.5 and
ωn = 2, so two desired closed-loop poles are at −1 ± j1.73. Placing the third pole at −15 yields
the following desired closed-loop equation:
(b) Design a Luenberger observer for the plant. The observer should respond 10 times faster than
the controlled closed-loop system. Place the two dominant poles 10 times further (in the real
and imaginary directions) than the dominant poles of the controlled system. Place the third
pole 10 times further from the origin than the real part of the dominant poles. You may find
Example 12.5 in Nise helpful.
h iT
Answer: (5 pts) L = 113 2386 39985.2
h iT
Alternate solutions: L = 14.8 −109 3229.5 (in phase-variable form) and
h iT
L = 3229.5 −109 14.8 (in controller canonical form)
We can use the place function in MATLAB to find L, but working out the problem by hand
starting with the phase-variable or controller canonical forms will lead to solving a system of
equations for li . On the other hand, if we write the system in observer canonical form, L will
be simple to get. We write the observer canonical form by finding the controller canonical form
then transposing matrices. The phase-variable form is
ẋ1 0 1 0 x1 0
=
ẋ2 0 0 1 x2 0 u,
+
ẋ3 −8 −14 −7 x3 1
h i x1
y = 15 1 0 x2 .
x3
1 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley
Renumber the phase variables xi in reverse order, then rearrange the equations in the usual
order to get the controller canonical form:
ẋ1 −7 −14 −8 x1 1
ẋ2 = 1 0 0 x2 + 0 u,
ẋ3 0 1 0 x3 0
h i x1
y = 0 1 15 x2 .
x3
The observer and controller canonical forms are related by Aob = ATco , Bob = Cco
T , C = BT .
ob co
Thus the observer canonical form is
ẋ1 −7 1 0 x1 0
ẋ2 −14 0 1 x2 1 u,
= +
ẋ3 −8 0 0 x3 15
h i x1
y = 1 0 0 x2 .
x3
with the A, B, C matrices from the plant above. Subtracting the state equations of the observer
and the plant we find x̃˙ = (A − LC)x̃, where x̃ = x − x̂ is the observer error. The characteristic
equation is
s3 + (7 + l1 )s2 + (14 + l2 )s + (8 + l3 ).
We place the two dominant poles 10 times further (in the real and imaginary directions) than
the dominant poles of the controlled system, and then place the third pole 10 times further
from the origin than the real part of the dominant poles. The desired characteristic equation is
(c) Why do we design the observer to respond faster than the controlled closed-loop system?
Answer: (1 pt) Since the controller uses the states estimated by the observer, if the observer
estimates converge to the actual values too slowly, then the controller will not work well on
the actual setup. We make the response of the observer faster than that of the controlled
closed-loop so that the controller receives the converged estimates virtually instantaneously.
2 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley
Answer: (1 pt) When we design a controller using state variable feedback, we need to know
the state variables. An observer is needed to estimate them when we do not have access to all
the states, for cost reasons, inaccurate method of measurement, or because we can’t measure
them due to the configuration of the setup.
3 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley
(b) Derive a state-feedback controller for the controllable states. You can use any transient require-
ments you like but the controller must stabilize this subsystem.
Answer: (1.5 pts) Since the rank of the controllability maxtrix is 2, there are 2 controllable
" #
0 1
states. Note that the A matrix is written in block diagonal form. Writing A1 = ,
2 −3
" #
5 0 h iT h iT h i h i
A2 = , B1 = 0 1 , B2 = 0 0 , C1 = 1 2 , and C2 = −8 1 , we can
−2 −1
decouple the system into two state-space systems. Clearly the first system is the controllable
one since B2 contains only zeros. Then we derive the state-feedback controller for the first
system: ẋ1 = A1 x1 + B1 u.
Here we choose
h a controller
i that yields 15% overshoot and settling time of 0.5 s for a step input,
giving K = 241.5 13 . The closed-loop characteristic equation is s2 + 16s + 239.5 = 0, which
has poles −8 ± j13.25, so this controller stabilizes the system. h i
Note, equivalently you may have control u = −Kx + r with K = k1 k2 0 0 for the entire
system ẋ = Ax + Bu, and but the block diagram will be different.
(c) What is going on? Draw a block diagram of the entire system including the controller.
Answer: (3 pts) With feedback u = −Kx + r:
4 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley
(d) Suppose the system is subject to initial condition x0 = [1 0 0 0]T . What should you see in the
response? What if x0 = [0 1 0 0]T , [0 0 1 0]T , or [0 0 0 1]T ?
Answer: (4 pts) We expect the response to be stable in all cases except when the initial
condition is [0 0 1 0]T .
Denote x0 = x(0) = [x1 (0) x2 (0)]T . Since we have a good controller for the first subsystem, the
response should be stabilized for any x1 (0). The second subsystem is uncontrolled so we look
Rτ
at the explicit solution using x2 (t) = eA2 t x2 (0) + 0 eA2 t B2 u(τ )dτ . Let x2 (0) = [a b]T . Then
the explicit solution is
11 2
y(t) = ae5t + (3b − a)e−t .
3 3
Hence the response is unstable whenever a 6= 0. For a = 0 and b 6= 0, the response will still
decay to zero with time constant 1.
(e) Simulate the responses for the above initial conditions. Discuss what you see.
Answer: (1 pt) We simulate the system using Simulink. The unforced responses with the
controller designed in part b are plotted below. Your responses may be different but only the
x0 = [0 0 1 0]T case is unstable.
5 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley
T T
x = [1 0 0 0] x = [0 1 0 0]
0 0
4 2
2
1.5
0
−2
1
−4
−6 0.5
−8
0
−10
−12
−0.5
−14
−16 −1
0 1 2 3 4 5 0 1 2 3 4 5
11 x0 = [0 0 1 0]T x0 = [0 0 0 1]T
x 10
0 1
0.9
−1
0.8
0.7
−2
0.6
−3 0.5
0.4
−4
0.3
0.2
−5
0.1
−6 0
0 1 2 3 4 5 0 1 2 3 4 5
Note, the controlled subsystem is much faster than so for initial condition x0 = [a b 0 d]T , the
response will decay slower when d 6= 0.
6 of 6