0% found this document useful (0 votes)
44 views6 pages

HW10 Solutions

This document provides solutions to homework problems related to controller and observer design. It includes designing a state feedback controller and Luenberger observer for a given plant. It also discusses controllability and observability of a system based on which control inputs and state measurements are necessary.

Uploaded by

otieno.paul20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views6 pages

HW10 Solutions

This document provides solutions to homework problems related to controller and observer design. It includes designing a state feedback controller and Luenberger observer for a given plant. It also discusses controllability and observability of a system based on which control inputs and state measurements are necessary.

Uploaded by

otieno.paul20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley

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

First write G(s) = YU (s)


(s)
in phase-variable form, then substitute the state feedback. The char-
acteristic equation is
s3 + (7 + k3 )s2 + (14 + k2 )s + (8 + k1 ).

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:

s3 + 17s2 + 34s + 60.


h i
Matching the coefficients gives the feedback gains K = 52 20 10 .

(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

We want to design an observer of the form

x̂˙ = Ax̂ + Bu + L(y − ŷ),


ŷ = C x̂,

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

(s + 100)(s2 + 20s + 400) = s3 + 120s2 + 2400s + 40000.


h iT
Matching coefficients we find L = 113 2386 39992 .

(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.

(d) Why is an observer sometimes needed?

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.

2. Controllability and observability


Consider the following system
   
8 −5 2 0 5 0 1
1 0 0 0  −2 0 0
ẋ =  x +   u,
   
0 −3 −6 0 0 0 0
0 −3 4 0 0 0 0

where x = [α β φ ω]T and u = [x y θ]T .


(a) You carelessly left your setup outside last night and it was struck by lightning during the storm.
One of the actuators for a control input was damaged. Which actuator, if damaged, would have
to be replaced? What if two actuators were damaged? That is, which control variables are
necessary for complete control of the system and which are not?
Answer: (3 pts) We need to be able to control either x or θ for complete control. If one
actuator is damaged, we can still control the system. If both x or θ are not available, then we
cannot control the system. We see this by checking the controllability of the system in each
case, computing the controllability matrix by using only the column(s) of B that correspond
the the control variable(s) available.
(b) Your professor is in a funding rut and wants you to lend out as many of your sensors as
possible to your lab mates. Which sensor(s) do you need to keep? That is, what is the minimal
combination of states which must be measured for observability?
Answer: (2 pts) Luckily for your lab mates, we only need one sensor, the sensor for ω. We
see this by checking the observability of the system in each case, computing the observability
matrix by using only the row(s) of C that correspond the the state variable(s) available. In
the cases with only one state variable, the system is still completely observable only when the
available state is ω.

3 of 6
EE C128 / ME C134 Fall 2014 HW 10 Solutions UC Berkeley

3. Fun with controllability


Consider the following system
   
0 1 0 0 0
2 −3 0 0 1
  
ẋ =   x +   u,

0 0 5 0 0
0 0 −2 −1 0
h i
y = 1 2 −8 1 x.

(a) Is the system completely controllable?


Answer: (0.5 pt) No
The controllability matrix is  
0 1 −3 11
1 −3 11 −39
CM =  ,
 
0 0 0 0 
0 0 0 0
which has rank 2.

(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

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

You might also like