Exam RT2 2017 Winter
Exam RT2 2017 Winter
L1 R1 R3
L2
va R2 vb vc vd
R4
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 Ω,
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 .
i) observability is lost?
ii) controllability is lost?
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.
2
Problem 2 (25 Marks)
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 .
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)
x̂
Observer
ii) Calculate the value of v that achieves perfect tracking assuming there are no
model uncertainties or disturbances.
4
Problem 3 (25 Marks)
G(s)
y1
G2 (s)
u
G1 (s)
y2
G3 (s)
G11 (s)
G1 (s) = G2 (s) = G21 (s) G22 (s) G3 (s) = G31 (s) G32 (s) (2)
G12 (s)
d1 d2
r e u y
K(s) 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:
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)
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.
r y
K G(z)
−
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.
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
R
Kirchhoff’s loop rule
v0 vR L
vL
v0 = vR + vL
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
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
e) The poles are p1 = −3 and p2 = 1 + R4 , so the system is stable for all R4 > 0.
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
−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
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}