You are on page 1of 9

EE 561: Digital Control Systems

Problem Set 4
Due on Mon. 4th Nov. in class Fall 2013

• Problem 1 [30 Points]


A certain system with state x is described by the state matrices
   
−2 0 3  
F= , G= , H = 1 0 , J = 0,
−2 1 1
(a) Compute the eigenvalues and eigenvectors of the matrix F. Write down a diagonal matrix
Λ and a matrix V such that F = VΛV−1 . (Hint: recall ‘eigendecomposition’ from your
Linear Algebra course.)
For eigenvalues of F,
det(F − λI) = 0,
=⇒ λ1 = 1, λ2 = −2.
Let v1 = [v11 v12 ]T and v2 = [v21 v22 ]T be the corresponding eigenvectors.
For v1 ,
(F − λ1 I)v1 = 0,
    
−3 0 v11 0
= ,
−2 0 v12 0

=⇒ v11 = 0, and let v12 = k1 .


For v2 ,
(F − λ2 I)v2 = 0,
    
0 0 v21 0
= ,
−2 3 v22 0
−2v21 + 3v22 = 0.
3
Let v22 = k2 , =⇒ v21 = k2
2
Using k1 = 1 and k2 = 2, we get v1 = [0 1]T and v2 = [3 2]T .
Now,    
λ1 0 1 0
Λ= = ,
0 λ2 0 −2
and,  
  0 3
V= e1 e2 = .
1 2
(b) Using the results from (a), find out the transformation T so that if x = Tz, the state
matrices describing the dynamics of z are in Modal Canonical form.

T = V.

(c) Compute the new matrices A, B, C, and D.


 
−1 −1 1 0
A=T FT = V FV = ,
0 −2
B = T−1 G = [−1 1]T ,
C = HT = [0 3],
D = J = 0.
(d) Compare the matrices A and Λ.
Both are same because
F = TAT−1 = VΛV−1 .

(e) Plot the step-response of the system using the following commands in Matlab
>>sys = ss(A, B, C, D)
>>step(sys)

Figure 1: Step response for 1(e).

(f) Write down the total solution x(t) of the system.


Z t
x(t) = eA(t−t0 ) x(t0 ) + eA(t−τ ) Bu(τ )dτ. (1)
t0

(g) Discretize the total solution with sampling period T to convert the state-equations into
the following form
xk+1 = Φxk + Γuk ,
yk = Hxk ,
where Φ and Γ need to be computed.
Let x(t0 ) = x(kT ) and x(t) = x((k + 1)T ). Substituting these into (1), assuming u(t) =
u(kT ) between kT and (k + 1)T , and setting η = kT + T − τ , we get
Z T
x((k + 1)T ) = eAT x(kT ) + eAη dηBu(kT ),
0
Z T
xk+1 = eAT xk + eAη dηBuk .
0

Comparing this result with


xk+1 = Φxk + Γuk ,
we can deduce that
eT
 
AT 0
Φ=e = ,
0 e−2T
T
eη |T0
Z     T  
Aη 0 −1 e −1 0 −1
Γ= e dηB = = ,
0 0 −0.5e−2η |T0 1 0 −0.5(e−2T − 1) 1
1 − eT
 
=⇒ Γ = .
0.5(1 − e−2T )
(h) Find out the discretized transfer function H(z) of the system.

1.5(1 − e−2T )
H(z) = C(zI − Φ)−1 Γ = .
z − e−2T

(i) Plot the step-response of the discretized system with T = 0.01 s. You can use the Matlab
function c2d(sys,T) to discretize the system.

Figure 2: Discrete step response for 1(i).

(j) Compare the step-response obtained in (i) with the one obtained in (e). Comment on
any similarities and/or differences.
Step-responses are very similar without any observable differences, because T << time
constant. However, discrete-time step response is slightly faster.

• Problem 2 [20 Points]


Transfer function of a plant is given by

10
G(s) = .
(s + 1)(s + 2)

(a) Using ‘comparing the coefficients’ method, design a state feedback (controller) for this
plant to yield a 15% overshoot with a settling time of 0.5 s.

4.6 4.6
σ= = = 9.2.
ts 0.5
σ 9.2
ωn = = = 18.4.
ζ 0.5
We can now write down the characteristic equations as

s2 + 2ζωn s + ωn2 ,
= s2 + 18.4s + 338.56.

First, we write the state-space matrices in Control canonical form as


   
−3 −2 1  
A= , B= , C = 0 10 , D = 0,
1 0 0

Then, let K = [k1 k2 ]. For this K, det(sI − (A − BK)) = s2 + s(3 + k1 ) + 2 + k2 . By


matching its coefficients with the coefficients of the characteristic equation found above,
we calculate k1 = 15.4 and k2 = 336.56.
(b) Repeat (a) using Ackermann’s control formula for pole placement.
 −1  
−1 −1 1 −3 1 3
C = [B AB] = = .
0 1 0 1
 
2 290.36 −30.8
α(A) = A + 18.4A + 338.56I = .
15.4 336.56
In Ackermann’s control formula for a second order system,

K = [0 1]C −1 α(A) = [15.4 336.56].

(c) Plot the step-response of the system and verify that the required specifications have been
successfully met.

Figure 3: Step response for 2(c).

In the graph, we can observe that the oscillations take roughly 0.5 s to settle.
Whereas percentage overshoot = 0.03435−0.02954
0.02954 × 100 = 16.28% ' 15%.

• Problem 3 [10 Points]


Determine whether the system with state x and described by the state matrices
   
−2 −1 −3 2  
F =  0 −2 1  , G =  1  , H = 4 6 8 , J = 0,
−7 −8 −9 2

is observable. Verify your answer using the following commands in Matlab


>>ObsMat = obsv(F, H)
>>Rank = rank(ObsMat)
The observability matrix
  
H 4 6 8
O =  HF  =  −64 −80 −78  .
HF2 674 848 814

det(O) = −1576 6= 0. Hence, the system is observable.


Matlab command gives the rank of the observability matrix as 3. This means that the observ-
ability matrix is full rank, hence the system is observable.
• Problem 4 [10 Points]
The plant’s transfer function of a model for the body’s blood glucose level is given below,

407(s + 0.916)
G(s) = .
(s + 1.27)(s + 2.69)

Design an observer for this plant to meet the specifications ζ = 0.7 and ωn = 100 for the
closed-loop system.
The characteristic equation,

s2 + 2ζωn s + ωn2
= s2 + 140s + 10000.

From
407(s + 0.916) 407s + 372.812
G(s) = = 2 ,
(s + 1.27)(s + 2.69) s + 3.96s + 3.4163
we can write down the state-space matrices for the Control canonical form as
   
−3.96 −3.4163 1  
A= , B= , C = 407 372.812 , D = 0.
1 0 0

Now, let L = [l1 l2 ]T , and


 −1  −1  
−1 C 407 3728 −0.0003431 −0.0009199
O = = = .
CA −1238.9 −1390.4 0.0003057 0.0001004
 
9457.9 −464.8
α(A) = A2 + 140A + 10000I = .
136 9996.6
Using Ackermann’s observer formula for a second order system,

L = α(A)O−1 [0 1]T = [0.0326 − 0.1395]T .

• Problem 5 [30 Points]


The plant for the antenna azimuth position control system is given below,

1325
G(s) = .
s(s + 1.71)(s + 100)

A controller needs to be designed to meet certain design specifications. And because the state
variables of the plant are not accessible, an observer also needs to be designed to estimate the
states.

(a) Write down the state matrices A, B, C, and D for the plant.
From
1325 1325
G(s) = = 3 ,
s(s + 1.71)(s + 100) s + 101.71s2 + 171s
we can write down the state-space matrices for the Control canonical form as
   
−101.71 −171 0 1  
A= 1 0 0  , B =  0  , C = 0 0 1325 , D = 0.
0 1 0 0
(b) Draw a block diagram of the complete control system including plant, controller and
observer.

Figure 4: Block diagram for 5(b).

(c) Determine the controllability of the system. Show your working clearly.
 
1 −101.71 10174
C = [B AB A2 B] =  0 1 −101.71  .
0 0 1
det(C) = 1×1×1 = 1, because the matrix is triangular. Hence, the system is controllable.

(d) If the system is controllable, design a controller to yield a 10% overshoot and a settling
time of 1 s. Place the third pole 10 times as far from the imaginary axis as the second-
order dominant pole.

− √ πζ
Overshoot = e 1−ζ 2 = 0.1,
=⇒ ζ ' 0.6,
4.6
and ωn = = 7.67.
ts ζ
The characteristic equation with two poles is
s2 + 2ζωn s + ωn2 ,
= s2 + 9.2s + 58.8,
which has poles at −4.6 ± 6.14j. By placing the third pole at −4.6 × 10 = −46, the final
characteristic equation becomes
(s + 46)(s2 + 9.2s + 58.8),
= s3 + 55.2s2 + 482s + 2704.8.
Now, let K = [k1 k2 k3 ].
k1 = α1 − a1 = 55.2 − 101.71 = −46.51,
k2 = α2 − a2 = 482 − 171 = 311,
k3 = α3 − a3 = 2704.8 − 0 = 2704.8.
(e) Determine the observability of the system. Show your working clearly.
   
C 0 0 1325
O =  CA  =  0 1325 0 .
CA2 1325 0 0
det(O) = −13253 6= 0. Hence, the system is observable.
(f) If the system is observable, design an observer whose transient response has 10% overshoot
and a natural frequency 10 times as great as the natural frequency of the response in (d).
Place the third pole 10 times as far from the imaginary axis as the observer’s second-order
dominant pole.
For 10% overshoot, ζ ' 0.6.
ωn = 10 × 7.67 = 76.7.
The characteristic equation with two poles is

s2 + 2ζωn s + ωn2 ,
= s2 + 92s + 5883,

which has poles at −46 ± 61.4j. By placing the third pole at −46 × 10 = −460, the final
characteristic equation becomes

(s + 460)(s2 + 92s + 5883),


= s3 + 552s2 + 48203s + 2706180.

Let L = [l1 l2 l3 ]T .
 −1  
0 0 1325 0 0 0.0007547
O−1 = 0 1325 0  = 0 0.0007547 0 .
1325 0 0 0.0007547 0 0
 
2402100 −381800 0
α(A) = A3 + 552A2 + 48203A + 2706180I =  2200 2629200 0 .
500 48000 2706200
Using Ackermann’s observer formula for a third order system,

L = α(A)O−1 [0 0 1]T = [1813 1.7 0.3]T .

(g) Using Matlab, plot the step-response of the system using zero initial conditions. Also
plot the estimated output ŷ on the same graph.
With u = r − Kx̂, the plant’s state equations are

ẋ = Ax − BKx̂ + Br, (2)


y = Cx − DKx̂ + Dr, (3)

and the observer’s state equations are


ˆ = (A − BK)x̂ + Br + L(y − ŷ),
ẋ (4)
ŷ = (C − DK)x̂ + Dr. (5)

With zero initial conditions, x = x̂, which implies y = ŷ for all t > 0. Now, Anew =
A − BK, Bnew = B, Cnew = C − DK, and Dnew = D. Using these state matrices, the
step response plotted is shown in Fig. 5.
Figure 5: Step response for 5(g).

(h) Now plot the step-response of the system assuming the initial condition x1 = 0.006 at
t = 0. Also plot the estimated output ŷ on the same graph using zero initial conditions.
Let x − x̂ = ex , and y − ŷ = ey .
Eq. (3) − eq. (5),

y − ŷ = C(x − x̂),
=⇒ ey = Cex .

Eq. (2) − eq. (4),


ˆ = A(x − x̂) − L(y − ŷ) = (A − LC)(x − x̂),
ẋ − ẋ

ėx = (A − LC)ex .
For capturing the error dynamics, let’s form a new system with

Ae = A − LC, Be = 0, Ce = C, and D = 0.

Solving this new system for ey with initial condition ex (0) = [0.006 0 0]T , and adding
it to ŷ (the solution in (g)), we can recover y because y = ŷ + ey .

Figure 6: Step response for 5(h).

Magnified plot near origin is shown below.


Figure 7: Magnified plot for 5(h).

(i) How long does it take for the output error to decay below 1%?
The error remains less than 1% for all t > 0.

You might also like