Exam RT2 2017 Winter

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Examination

Control Systems Theory and Design


03.03.2017

Problem 1 (25 Marks)

Given are two electrical circuits in Fig. 1.

L1 R1 R3

L2
va R2 vb vc vd
R4

Figure 1: Two electrical circuits

Vb (s) Vd (s)
a) Calculate the transfer functions G1 (s) = and G2 (s) = with
Va (s) Vc (s)

L1 = L2 = 1 H, R1 = 2 Ω, R2 = R3 = 1 Ω,

and where R4 is kept as a variable.

Hint: Physical units can be omitted.

b) Now assume that the two electrical circuits are connected in series (vb = vc ). Write
Vd (s)
down a state space representation of G3 (s) = in controller canonical form as
Va (s)
a function of R4 .

c) Can you find a value R4 for which

i) observability is lost?
ii) controllability is lost?

Give reasons.

Hint: Consider the transfer function G3 (s).

d) Is there a similarity transformation to transform the model in (b) into observer


canonical form for every value of R4 ? Give reasons.

e) Is the system G3 (s) stable for any value of R4 > 0? Give reasons.

1
f) You get a Matlab function for constructing a state space model in controller canon-
ical form for a given transfer function G, but something went wrong with the code.
Bring the following lines in a correct order such that the Matlab function works
appropriately.

Hint: The transfer function G can be biproper.

1 function [ sys ] = con_can( G )


2 A = [zeros(nd-1,1), eye(nd-1);-fliplr(den_)];
3 [num,den] = tfdata(G,'v');
4 end
5 if num(1)==0
6 else
7 B = [zeros(nd-1,1);1];
8 num_ = num(2:end)./den(1); den_ = den(2:end)./den(1); D = 0;
9 D = num(1); num_ = num(2:end)./den(1); den_ = ...
den(2:end)./den(1); num_ = num_-den_ * num(1);
10 nd = length(den)-1;
11 sys = ss(A,B,C,D);
12 C = fliplr(num_);
13 end

2
Problem 2 (25 Marks)

Task (c) is independent of tasks (a) and (b).


Given is the following state space model

   
1 2 0
ẋ = x+ u + bn nx
0 −3 1 (1)
 
y = 1 0 x + ny ,

where nx , ny represent zero-mean white process and measurement noise, respectively. The
goal is to design an observer-based state feedback controller that meets certain closed-loop
requirements.

a) i) Find pole locations such that the closed-loop has a damping coefficient ζ = 0.8
and a 1% settling time in its step response of ts = 1.15 s.
ii) Compute a state feedback gain that places the poles at the locations from
(a)(i).
 ⊤
b) An observer gain is chosen as L = 2 0 .

i) Is this a reasonable choice? Give reasons.


ii) With this choice of L, describe qualitatively how the estimation error x̃ evolves
as t → ∞, given x̃(0) 6= 0. Give reasons.
iii) Write down MATLAB code to find the observer gain L that places the poles of
the observer at a reasonable location, given that the feedback poles are located
at your solution from (a)(i). If no solution was found, assume the poles of
A + BF are located at s1,2 = −2 ± j1. Assume A, B, C are in the workspace.

Part (c) is on the next page.

3
c) Refer to Figure 2, where G(s) is the transfer
 function
 corresponding to the model
in (1), and a new state feedback gain F = −10 −5 is considered.

r u y
v G(s)


Observer

Figure 2: Observer-based state feedback control with reference pre-filter

i) Assume initially that v = 1, calculate the static gain from r → y.


Hint: The closed-loop state space model is given by
      
ẋ A + BF −BF x B
= + r,
x̃˙ 0 A + LC x̃ 0
 
  x
y= C 0 .

ii) Calculate the value of v that achieves perfect tracking assuming there are no
model uncertainties or disturbances.

4
Problem 3 (25 Marks)

Task (c) is independent of tasks (a) and (b).


Given the following block diagram and transfer functions:

G(s)
y1
G2 (s)

u
G1 (s)

y2
G3 (s)

Figure 3: Block diagram of the considered system.

 
G11 (s)    
G1 (s) = G2 (s) = G21 (s) G22 (s) G3 (s) = G31 (s) G32 (s) (2)
G12 (s)

where each Gij (s), i = 1, 2, 3, j = 1, 2 is a SISO transfer function.

a) i) What is the dimension of G(s)?


ii) Calculate G(s) in terms of the indivual transfer functions Gij (s).

b) Assume the loop is closed around G(s) as shown in Figure 4.

d1 d2

r e u y
K(s) G(s)

Figure 4: Closed-loop system.

i) What are the dimensions of r, u, y, d1, d2 and K(s)?


ii) Calculate the transfer function from d2 to y in terms of K(s) and G(s).
iii) Calculate the transfer function from d1 to u in terms or K(s) and G(s).

5
c) Given the following state space realization of G(s) in Figure 3

ẋ = Ax + Bu
(3)
 
y1
= Cx,
y2

assume the whole state vector is available for measurement. An LQ optimal state
feedback controller is to be designed such that:

• Tracking of reference signals only in output y1 is achieved. Step references


should be tracked with zero steady state error, even in the presence of small
uncertainties.
• Step disturbances entering at plant’s input are rejected with zero steady state
error.

i) Draw a block diagram of the closed-loop system fulfilling the above mentioned
conditions and draw a box around the controller.
ii) Complete the following MATLAB code to compute the state feedback gains.
Assume A, B and C from (3) are in the workspace.

1 n = size(A,1);
2 no = size(C,1);
3 ni = size(B,2);
4 ...

6
Problem 4 (25 Marks)

Hint: Tasks (a) and (b) can be solved independently.

a) Consider the following state space model of a continuous-time transfer function G(s)

ẋ = Ax + Bu,
(4)
y = Cx,

where
   
1 2 0  
A= , B= , C= 1 0 . (5)
−0.5 −1 1

i) Find the discrete-time transfer function Gd (z) using exact discretisation and a
sampling time of T = 1 sec.
ii) How many sampling zeros does the transfer function Gd (z) have? Give reasons.

Hint: The numerator of G(s) is constant.


iii) Now assume G(s) were discretised using Tustin approximation. How many
sampling zeros would the transfer function have? Give reasons.
iv) The system H(s) is given as H(s) = G(s)e−s . Give the transfer funtion of
Hd (z) using exact discretisation and a sampling time of T = 1 sec.
v) How does the impulse response y(k) of Gd (z) behave when k goes to infinity?
Give reasons.
vi) Give Matlab code for designing a stabilising state feedback controller for a
discrete-time state space model of (4). Assume that (A,B,C) of (5) is given in
the workspace.

b) Consider the feedback loop given in Fig. 5.

r y
K G(z)

Figure 5: Feedback loop

i) Sketch the root loci for the following discrete-time transfer functions.
z − 0.5 z + 0.1
Ga (z) = Gb (z) =
z + 0.5 (z + 0.5)2

ii) Are the feedback loops with G(z) = Ga (z) and G(z) = Gb (z) stable for all
values of K > 0? Give reasons.

Hint: This question can be answered without calculation.

7
Formulas

∞ ZT
AT
X (AT )n 1
Φ=e = = I + AT + A2 T 2 + . . . , Γ= eAτ B dτ
n=0
n! 2
0

F = −pTa−1 C −1 with
 
p = ān−1 − an−1 ān−2 − an−2 . . . ā0 − a0 and
 
1 an−1 an−2 . . . a1
0 1 an−1 . . . a2 
Ta =  .. .. ..  , where ai are the open-loop transfer function coefficients
 
..
. . . .
0 0 0 ... 1

4.6
s1,2 = −σ ± jωd , ts = , ζ = sin(θ), θ = tan−1 (σ/ωd )
σ
 −1  
−1 a b 1 d −b
A = =
c d det(A) −c a

Controller canonical form


bm sm + bm−1 sm−1 + · · · + b1 s + b0
G(s) =
sn + an−1 sn−1 + · · · + a1 s + a0
      
ẋ1 0 1 0 ··· 0 x1 0
 ẋ2   0 0 1 0   x2  0
 ..   .. .   ..   .. 
      
 . = . . . .  +  u
. .   .  .

  
ẋn−1   0 0 0 ··· 1   xn−1  0
ẋn −a0 −a1 −a2 · · · −an−1 xn 1
 
x1
   x2 

y = b0 b1 · · · bn−1  .. 

.
xn

R
Kirchhoff’s loop rule
v0 vR L
vL
v0 = vR + vL

Figure 6: Kirchhoff’s loop rule

Current-voltage relation

L iL R iR
diL vR = R iR
vL = L
dt
vL vR
Solution
Control Systems Theory and Design
03.03.2017

Ohne Gewähr No guarantee

Solution to Problem 1
1 s + R4
a) G1 (s) = , G2 (s) =
3+s s + R4 + 1
s + R4
b) G3 (s) =
s2 + (4 + R4 s + 3(1 + R4 ))
   
0 1 0
ẋ = x+ u
−3(1 + R4 ) −(4 + R4 ) 1
 
y = R4 1 x

c) i) Observability is lost at R4 = 3, since there is a pole-zero cancellation.


ii) Controller canonical form is always controllable.

d) There is no similarity transformation for all R4 , since observability is lost at R4 = 3.

e) The poles are p1 = −3 and p2 = 1 + R4 , so the system is stable for all R4 > 0.

f) lines in correct order: 1, 3, 10, 5, 8, 6, 9, 4, 2 , 7, 12 , 11, 13

1
Solution to Problem 2
a) i) Using the provided formulas:
4.6 σ
σ= =4 θ = arcsin(ζ) = 0.9273 ωd = =3
ts tan θ
→ s1,2 = −4 ± 3j
ii) One way to solve pole placement problems is using the Bass-Gura formula:
Open loop polynomial (s + 3)(s − 1) = s2 + 2s − 3
Closed loop polynomial (from (a)(i)) (s + 4 + 3j)(s + 4 − 3j) = s2 + 8s + 25
   
p = 8 − 2 25 + 3 = 6 28

   
1 2 0 2 
Ta = C = b Ab =
0 1 1 −3
  
  1 −2 1.5 1  
F = − 6 28 = − 17 6
0 1 0.5 0

b) i)    
1 2 2   3 2
A + LC = 1 0 = ,
0 −3 0 0 −3
the eigenvalue λ = 3 indicates that the observer is unstable, therefore an
unreasonable choice.
ii) x̃ → ∞ as t → ∞ because A + LC is unstable.

iii)
1 p = 5*[-4+3i -4-3i];
2 L = -place(A',C',p)'

c) i) As can be seen in the hint, the estimation error x̃ is uncontrollable from input
r, this means that x̃ will get canceled out and the closed-loop transfer function
is therefore given by

Gcl (s) = C(sI − (A + BF ))−1 B


the static gain is given by Gcl (0)

 −1 0
       
  1 2 0  1
Gcl (0) = 1 0 − − −10 −5 =
0 −3 1 1 6
ii) Perfect tracking of step references means the static gain from r → y must be
1, the prefilter must then be chosen as v = Gcl1(0) = 6

2
Solution to Problem 3
a) i) G(s) is a 2 × 1 transfer function matrix, i.e. 2 outputs and 1 input.
ii)   
  G11
 G21 G22 G12 
   
G2 G1 G21 G11 + G22 G12
G(s) = = 

 G11  = G31 G11 + G32 G12
  
G3 G1
G31 G32
G12

b) i) r, y, d2 ∈ R2 , u, d1 ∈ R1 , K is a 1 × 2 transfer function matrix


ii)
y = d2 − GKy → Gyd2 = (I + GK)−1
iii)
u = d1 − KGu → Gud1 = (I + KG)−1

r 1 u y
s FI G(s)

x

 
1 0

c) i)

ii)
1 n = size(A,1);
2 no = size(C,1);
3 ni = size(B,2);
4 Cint = C(1,:);
5 nint = size(Cint,1)
6 Aaug = [A zeros(n,nint); -Cint zeros(nint)];
7 Baug = [B;zeros(nint ,ni)];
8 Faug = -lqr(Aaug,Baug,eye(n+nint),eye(ni));
9 F = Faug(:,1:n)
10 Fi = Faug(:,n+1:end)

3
Solution to Problem 4
   
2 2 1 z+1
a) i) Φ = ,Γ= , Gd (z) =
−0.5 0 0.5 (z − 1)2
ii) n = 2, m = 0, there are n − m − 1 = 1 sampling zeros
iii) n = 2, m = 0, there are n − m = 2 sampling zeros
z+1
iv) Hd (z) = z −1 Gd (z) =
z(z − 1)2
v) The system is marginally stable (two poles at p1,2 = 1 ): impulse response goes
to infiniy
vi) Phi = eye(2)+A; Gamma = [1; 0.5]; F = -dlqr(Phi, Gamma, C’*C,1);

b) i) see Fig. 1
ii) Ga (s) is stable for all K > 0: root locus always inside the unit disc; Gb (s) is
only stable for small K: one pole goes to −∞ for large K

1 1

0.5 0.5
z1 = −0.1
Im{z}

Im{z}

0 0
p1 = −0.5 z1 = 0.5
p1,2 = −0.5
−0.5 −0.5

−1 −1
−1 −0.5 0 0.5 1 −2 −1.5 −1 −0.5 0 0.5 1
Re{z} Re{z}

Figure 1: Root loci of Ga (s) and Gb (s)

You might also like