0% found this document useful (0 votes)
6 views

DC Solved Problems

Solved Problems digital control UPC Gtiae

Uploaded by

angela.figueras
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

DC Solved Problems

Solved Problems digital control UPC Gtiae

Uploaded by

angela.figueras
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Digital Control (240754)

GTIAE
Academic year 2024-2025
Complementary Material

Proposed Problems with Solutions

1. Given a continuous-time plant Gp (s) = e−sTs in series with a zero-order holder, find the impulse
response of the holder+plant set in discrete time with sampling period Ts . From the impulse response,
find the discrete equivalent of the plant, G(z).

Solution:
The zoh+plant transfer function is

1 − e−sTs −sTs
G(s) = Gm0 (s)Gp (s) = e .
s
The impulse response will be found from the inverse of Laplace

g(t) = u(t − Ts ) − u(t − 2Ts ),

which, in discrete-time domain, will be

g(k) = u(k − 1) − u(k − 2).

Performing the z-transform yields

z−1
 
z z z
G(z) = z −1 − z −2 = = z −1 .
z−1 z−1 z−1 z2

It can be seen that this same result is reached by tables looking for the discrete-time equivalent
of the plant as  −sTs 
−1 e z−1 z
z −1 = z −1 .

G(z) = 1 − z Z =
s z z−1

2. The impulse response of a discrete-time system is given by the sequence

1, if 0 ≤ k ≤ 3

y(k) =
0, otherwise.

Determine the system transfer function and its unitary-step response.

Solution:
Given that the transfer function of a system corresponds with the z-transform of its unitary-
step response, and the z-transform is defined as ∞ −k , the system transfer function
P
k=0 y(k)z
is
1 1 1 z3 + z2 + z + 1
G(z) = 1 + + 2 + 3 =
z z z z3

Digital Control Complementary Material 1 / 20


In order to obtain the unitary-step response, the equivalent difference equation for such a
transfer function should be written. Multiplying both the numerator and denominator with
z −3 yields
Y (z) 1 + z −1 + z −2 + z −3
= ,
U (z) 1
and then
y(k) = u(k) + u(k − 1) + u(k − 2) + u(k − 3),
being {y(k)} the output sequence and {u(k)} the system’s input sequence. In case the input
was an unitary step us , then y(k) = {1, 2, 3, 4, 4, , . . .}, y(k) = 4 ∀k ≥ 3. Alternatively, it
is possible to get the same result since the unitary step can be written as an infinite sum of
unitary impulses and using the linear nature of the system.

3. Given a plant in continuous time G(s) = s+a ,


1
a ∈ R+ , if the discrete equivalent of zero order holder
−aTs
+ plant equals G(z) = a1 z−e
1−e
−aTs , determine the steady-state error when a unitary-step setpoint is
applied using a proportional digital controller, C(z) = kc , and negative unitary feedback. Does this
error match with the resultant error when a proportional analogue controller were used, C(s) = kc ?
Why?

Solution:
Since the plant in open loop is of type 0 nature, the steady-state error is
1 1 a
ess = = 1 =
1 + kc Kp 1+ a
a + kc

taking into account that Kp = limz→1 kc G(z) = a.


kc
Such an error will exist and will have
sense for closed-loop stable systems, i.e.,
1−e−aTs
kc a1 z−e kc −aTs

kc G(z) −aTs
a 1 − e
W (z) = = 1−e−aTs
= .
1 + kc G(z) 1 + kc a1 z−e−aTs z − e−aTs + kac (1 − e−aTs )

The closed-loop system pole is


kc
p = e−aTs − 1 − e−aTs ,

a
and the syste will be stable for Ts ikc such that

kc
|p| = e−aTs − 1 − e−aTs < 1.

a

On the other hand, the error of the analogue control system will be
1 1 a
ess = = 1 =
1 + kc Kp 1+ a
a + kc

taking into account that Kp = limz→0 G(0) = kac . It can be seen that the error is the same as
that of the digital control system. This is because the error is not affected by the sampling
period but only by the type of system and the applied reference.

Digital Control Complementary Material 2 / 20


4. Consider the sequence
g(k) = {0, 0, 1, 0, −a, 0, a2 , 0, −a3 , 0, . . . },
with a ∈ R+ , which correspond with the impulse response of a discrete-time system that is causal
and of second order.

(a) Which is the system transfer function G(z)? (1 point)


(b) What is the final value of the system’s output response for a step input of amplitude α, for
α ∈ R? (1 point)

Solution:

(a) Since the first and second samples are null, G(z) will have relative degree equals 2, then
its structure could be
k
G(z) = 2 .
z + mz + n
By performing the division of polynomials, it yields

k z 2 + mz + n
−k − kmz −1 − knz −2
kz −2 − kmz −3 + k(m2 − n)z −4 + . . .
−kmz −1 − knz −2
+kmz −1 + km2 z −2 + kmnz −3
k(m2 − n)z −2 + kmnz −3
−k(m2 − n)z −2 + km(m2 − n)z −3 − kn(m2 − n)z −4
km(2n − m2 )z −3 − kn(m2 − n)z −4
Therefore, considering the sequence g(k),

• from its third sample , kz −1 = 1, and then k = 1;


• from its fourth sample, −kmz −3 = 0, and then m = 0;
• from its fifth sample, k(m2 − n) = −a, and then n = a.

Finally,
1
G(z) = .
+a z2
Alternatively, notice that by looking at the sequence and considering that it is an impulse
response, it can be seen that R = 4, which implies that the poles of G(z) have θ = π2 .
This fact in turn implies that
k
G(z) =
(z + jm)(z − jm)
k
= 2 ,
z + m2
requiring less coefficients to be computed and hence less quotient terms in the division
of polynomials.

(b) There are three cases:

Digital Control Complementary Material 3 / 20


• If 0 < a < 1, then G(z) is stable and y(∞) for an α-step response is

y(∞) = lim (1 − z −1 )Y (z)


z→1
αz
= lim (1 − z −1 )G(z)
z→1 z−1
= αG(1)
α
= .
1+a

• If a = 1, then G(z) is marginally stable and its α-step response is bounded but
does not converge to any final value.
• If a > 1, then G(z) is unstable and its α-step response will diverge.

5. Consider the following state-space realization of a given system:


x(k + 1) = ax(k) + bu(k)
y(k) = x(k),
for a, b ∈ R.
(a) Determine the values of a and b that make the system marginally stable. Briefly justify the
answer. (0.5 points)
(b) Compute G(z). (0.5 points)
Now, consider the system in a closed-loop scheme with a proportional controller kc = 1 and unitary
negative feedback.
(c) Determine the values of a and b that make null the steady-state error of the system facing
unitary-step inputs. (0.5 points)
(d) Determine the values of a and b such that the steady-state error of the system for unitary-step
inputs both exist and was different from zero. Explicitly compute such an error in function of
a and b. (1 point)

Solution:

(a) Since the stability of a linear system only depends on its structure, stability will depend
on the module of a. For marginal stability, |a| = 1 and b ∈ R.
(b) The corresponding transfer function is
G(z) = (zI − a)−1 b
b
= .
z−a
(c) In order to have null steady-state error facing step inputs, L(z) ≜ kc G(z) should be of
type 1 or, equivalently, the system must have an eigenvalue in 1. Moreover, the resultant
closed-loop system should be stable, i.e., its closed-loop poles/eigenvalues must have
module lower than 1. Hence, a = 1 and, given the characteristic polynomial
1 + L(z) = 0
z−1+b=0 → |1 − b| < 1,

Digital Control Complementary Material 4 / 20


which implies that 0 < b < 2.

(d) In contrast with the previous point, here |a| < 1. Moreover, again the closed-loop
system should be stable and then

1 + L(z) = 0
z−a+b=0 → |a − b| < 1,

which implies that b − 1 < a < b. Regarding the amount of the steady-state error,

Kp = lim G(z)
z→1
b
= ,
1−a
and hence
1
ess = b
1 + 1−a
1−a
= .
1−a+b

6. It is known that the response to a unitary impulse input of a plant in discrete time is g(k) = pk ,
p ∈ R. Find the transfer function G(z). Discuss the stability of the system as a function of the value
of p.

Solution:
The transfer function can be found from the definition of the z-transform
∞ ∞
X X 1 z
G(z) = g(k)z −k = pk z −k = −1
= .
1 − pz z−p
k=0 k=0

According to the value of p, three cases can be given related to the stability of G(z):

• Case 1: if |p| < 1, G(z) will be stable.

• Case 2: if |p| = 1, G(z) will be marginally stable.

• Case 3: if |p| > 1, G(z) will be unstable

7. Consider six discrete-time system transfer functions, Gi (z), i ∈ 1, . . . , 6, with sampling time Ts and
with the following poles:

G1 (z) : 0.5 cos π4 ± j0.5 sin π4 ; G4 (z) : cos π4 ± j sin π4


G2 (z) : 0.7 cos π6 ± j0.7 sin π6 ; G5 (z) : ±j, amb multiplicitat 2
G3 (z) : 0.5; G6 (z) : −1

Answer reasonably the following questions regarding their impulse response:

(a) Which two systems have the response with the shortest settling time, ts ?
(b) Which systems have oscillating responses?
(c) Which system has the response with the highest oscillation frequency?

Digital Control Complementary Material 5 / 20


(d) Determine for each system whether it is stable, marginally stable or unstable.
(e) Which two systems have the response with the highest number of samples per oscillation period,
R?

Solution:
The poles in polar form z = ρ∠θ are

G1 (z) : 0, 5∠ ± π4
G2 (z) : 0, 7∠ ± π6
G3 (z) : 0, 5
G4 (z) : 1∠ ± π4
G5 (z) : 1∠ ± π2 , with multiplicity 2.
G6 (z) : 1∠ ± π

(a) The setting time is proportional to the time constant of the system τ = lnTsρ . Conse-
quently, the smaller ρ (for the same value of Ts ), the shorter the setting time, ts . There-
fore, G1 (z) and G3 (z) are the systems with a shorter ts . Its value is ts,min (±2%) = ln 0.5 .
−4T

(b) The response will be oscillating if the poles are complex conjugate or real negatives,
with an oscillation frequency ω = Tθs . Therefore, all systems except G3 (z) will show
oscillating responses.

(c) G6 (z) is the system with a higher frequency, since the frequency is proportional to
the angle of the poles and that of G6 (z) is the biggest. The maximum frequency is
ωmax = Tπs .

(d) G1 (z), G2 (z) and G3 (z) are stable since the module of their poles is lower than 1; G4 (z)
and G6 (z) are marginally stable since the module of their poles is 1 with multiplicity 1;
G5 (z) is unstable since the module of its poles is 1 but with multiplicity greater than 1.

(e) The number of samples per response period is R = 2π θ . Therefore, from the systems with
oscillating response, G2 (z) is the one that has a higher value of R (R = 12), followed by
G1 (z) and G4 (z), with R = 8.

8. Let T (z) be the closed-loop transfer function of a discrete-time control system with negative unitary
feedback and L(z) = (z−p1 )(z−p
k
2)
the corresponding open-loop transfer function with: a) real and
different p1 and p2 ; b) p1 and p2 conjugate complexes. Justify (using the root locus concepts) if in
each of the above assumptions, for any value of k, it can be satisfied that:
(a) T (z) is always stable.
(b) T (z) always has an oscillating response.
(c) T (z) always has a non-oscillating response.
(d) The number of samples per oscillation period, R, of the response of T (z) is always the same.

Solution:
The root locus has two branches that start at p1 and p2 and end at infinity (since L(z) has
no zeros), following asymptotes at ± π2 .
(a) T (z) cannot always be stable (regardless of the values of p1 and p2 ) since, when the
relative degree greater than 1, by values of k large enough, the poles will have a module
greater than 1 (so there are branches that end up at +∞).

Digital Control Complementary Material 6 / 20


(b) case b) The response will always be oscillating because ∀k the branches take complex
values that cause an oscillating response; case a) The response can always be oscillating
if the multiplicity point is real negative, since in this case, before the branches take
complex values, one of the two will have taken only negative real values which also
cause an oscillating response.

9. Convert the following single-input single-output difference equation into a discrete-time state-space
form:

y(k) + a1 y(k − 1) + a2 y(k − 2) + a3 y(k − 3) = b1 u(k − 1) + b2 u(k − 2) + b3 u(k − 3).

Solution:
The conversion is performed by first recognizing that the transfer function of this system is

b1 z 2 + b2 z + b3 Y (z)
G(z) = 3 2
= .
z + a1 z + a2 z + a3 U (z)

Break up transfer function into two parts. Gp (z) = V (z)/U (z) contains all of the poles

1 V (z)
Gp (z) = = ⇒ v(k + 3) + a1 v(k + 2) + a2 v(k + 1) + a3 v(k) = u(k)
z3 + a1 z2 + a2 z + a3 U (z)

Choose current and advanced versions of v[k] as state (this is a choice: there are other equally
valid choices)
x(k) = [v(k + 2) v(k + 1) v(k)]T .
Then,
      
v(k + 3) −a1 −a2 −a3 v(k + 2) 1
x(k + 1) = v(k + 2) =
   1 0 0   v(k + 1) + 0  u(k).
 
v(k + 1) 0 1 0 v(k) 0

Now, adding zeros, G(z) = (b1 z 2 + b2 z + b3 )Gp (z). Equivalently, Y (z) = (b1 z 2 + b2 z + b3 )V (z),
or y(k) = b1 v(k + 2) + b2 v(k + 1) + b3 v(k). In summary, the state-space model will be
   
−a1 −a2 −a3 1
x(k + 1) =  1 0 0  x(k) +  0  u(k)
0 1 0 0
 
  0
y(k) = b1 b2 b3 x(k) + u(k).
0

10. Consider the following scalar system in continuous-time domain:

ẋ(t) = −2x(t) + u(t), y(t) = x(t).

It is desired to obtain a discrete-time model of the system sampled with period Ts , and assuming a
zero-order holder at its input. Which would be the equivalent expressions considering a) approxi-
mated discretization, and b) exact discretization?

Digital Control Complementary Material 7 / 20


Solution:

(a) The approximate discretisation from Euler’s formula yields

x(k + 1) = (1 − 2Ts )x(k) + Ts u(k).

(b) the exact discretisation via the use of the complex exponential function z = esTs yields

1 − e−2Ts
x(k + 1) = e−2Ts x(k) + u(k).
2

11. Given a discrete-time state space realization of a dynamical system with matrices
   
0.8 0 1
, C = 0.352 −0.182 , and D = 0,
 
A= , B=
0 0.3 1

find the the corresponding transfer function.

Solution:
First, find (zI − A) as follows:
     
z 0 0.8 0 z − 0.8 0
− =
0 z 0 0.3 0 z − 0.3

and by applying the corresponding equivalence

CAdj(zI − A)B Ccoff(zI − A)T B


G(z) = C(zI − A)−1 B + D = +D = +D
det(zI − A) det(zI − A)

the transfer function may be found as


  
z − 0.8 0 1
[0.352 − 0.182]Adj
0 z − 0.3 1
G(z) =  
z − 0.8 0
det
0 z − 0.3
  
z − 0.3 0 1
[0.352 − 0.182]
0 z − 0.8 1
=
(z − 0.8)(z − 0.3)
 
z − 0.3
[0.352 − 0.182]
z − 0.8
=
(z − 0.8)(z − 0.3)
0.352(z − 0.3) − 0.182(z − 0.8)
=
(z − 0.8)(z − 0.3)

and then the transfer function would be


0.17z + 0.04
G(z) = .
(z − 0.8)(z − 0.3)

Digital Control Complementary Material 8 / 20


12. Consider a mass-spring-damper system with the configuration shown in Figure 1, with m = 1 kg,
b = 2 Ns/m and h = 10 N/m.
<latexit sha1_base64="EqZrCXUQOtAdDeSCTgl2uGmAtvA=">AAAB4nicbZDLTgJBEEVr8IX4Ql266UhMXJEZo9El0Y1LSOSRwIT0NDXQoeeR7hoTQvgBXRl15yf5A/6NDc5Cwbs6Xfd2UreCVElDrvvlFNbWNza3itulnd29/YPy4VHLJJkW2BSJSnQn4AaVjLFJkhR2Uo08ChS2g/Hd3G8/ojYyiR9okqIf8WEsQyk42VEj7ZcrbtVdiK2Cl0MFctX75c/eIBFZhDEJxY3pem5K/pRrkkLhrNTLDKZcjPkQuxZjHqHxp4tFZ+wsTDSjEbLF+3d2yiNjJlFgMxGnkVn25sP/vG5G4Y0/lXGaEcbCRqwXZopRwuZ92UBqFKQmFrjQ0m7JxIhrLshepWTre8tlV6F1UfWuqm7jslK7zQ9RhBM4hXPw4BpqcA91aIIAhGd4g3dn4Dw5L87rT7Tg5H+O4Y+cj2/Qm4qN</latexit>

F
<latexit sha1_base64="uVLY+Jg/jxq7XbDFQgP00TcDyZk=">AAAB4nicbZDLTgJBEEVr8IX4Ql266UhMXJEZo9El0cS4hESEBCakp6mBDj2PdNeYEMIP6MqoOz/JH/BvbHAWCt7V6bq3k7oVpEoact0vp7Cyura+UdwsbW3v7O6V9w8eTJJpgU2RqES3A25QyRibJElhO9XIo0BhKxjdzPzWI2ojk/iexin6ER/EMpSCkx01bnvlilt152LL4OVQgVz1Xvmz209EFmFMQnFjOp6bkj/hmqRQOC11M4MpFyM+wI7FmEdo/Ml80Sk7CRPNaIhs/v6dnfDImHEU2EzEaWgWvdnwP6+TUXjlT2ScZoSxsBHrhZlilLBZX9aXGgWpsQUutLRbMjHkmguyVynZ+t5i2WV4OKt6F1W3cV6pXeeHKMIRHMMpeHAJNbiDOjRBAMIzvMG703eenBfn9SdacPI/h/BHzsc3ke+KYw==</latexit>

di
<latexit sha1_base64="Uce2MN1nMPYX1wtsJr6nMJKshN4=">AAAB5HicbZDLTgJBEEVr8IX4Ql266UhMXJEZo9El0Y1LjPJIgJCepgY69DzSXWNCJvyBroy684v8Af/GBmeh4F2drns7qVt+oqQh1/1yCiura+sbxc3S1vbO7l55/6Bp4lQLbIhYxbrtc4NKRtggSQrbiUYe+gpb/vhm5rceURsZRw80SbAX8mEkAyk42dH9oC/75Ypbdediy+DlUIFc9X75szuIRRpiREJxYzqem1Av45qkUDgtdVODCRdjPsSOxYiHaHrZfNUpOwlizWiEbP7+nc14aMwk9G0m5DQyi95s+J/XSSm46mUySlLCSNiI9YJUMYrZrDEbSI2C1MQCF1raLZkYcc0F2buUbH1vsewyNM+q3kXVvTuv1K7zQxThCI7hFDy4hBrcQh0aIGAIz/AG707gPDkvzutPtODkfw7hj5yPbzQmi10=</latexit>

h
<latexit sha1_base64="2l3tKUAS5U2xhgvOERIvdBqaRWI=">AAAB4nicbZDNSsNAFIVv6l+tf1WXbgaL4Kokouiy6MZlC/YH2lAm05tm6GQSZiZCCX0BXYm685F8Ad/Gac1CW8/qm3vOwD03SAXXxnW/nNLa+sbmVnm7srO7t39QPTzq6CRTDNssEYnqBVSj4BLbhhuBvVQhjQOB3WByN/e7j6g0T+SDmabox3QsecgZNXbUiobVmlt3FyKr4BVQg0LNYfVzMEpYFqM0TFCt+56bGj+nynAmcFYZZBpTyiZ0jH2Lksao/Xyx6IychYkiJkKyeP/O5jTWehoHNhNTE+llbz78z+tnJrzxcy7TzKBkNmK9MBPEJGTel4y4QmbE1AJlitstCYuooszYq1RsfW+57Cp0LureVd1tXdYat8UhynACp3AOHlxDA+6hCW1ggPAMb/DujJwn58V5/YmWnOLPMfyR8/ENxKuKhQ==</latexit>

Figure 1: Mass-spring-damper system

It is desired to control the position p (in m) of such a system in order to arrive any desired position pd
(also in m) with a dynamics whose overshoot s do not surpass 10%, taking at most 1.5 s to reach that
desired position (ts ). Moreover, the mass m is subject to a disturbance force di (in N) of constant
magnitude that breaks its movement caused by the effect of the input force F (in N). Try different
positions in a way of a stair desired signal. Obtain the completely-defined expression of the control
law as well as the output dynamic feedback regulator C(z).

Solution:
First, the model of the continuous-time system is determined by using the second Newton’s
Law as
d2 p(t) dp(t)
F (t) = m +b + h p(t).
dt2 dt
dp(t)
Defining u(t) = F (t), y(t) = p(t) and as state variables x1 (t) = p(t) and x2 (t) = dt , the
state-space equations are written as

dx1 (t)
= x2 (t),
dt
dx2 (t) h b 1
= − x1 (t) − x2 (t) + u(t),
dt m m m
y(t) = x1 (t),

that, in matrix form and replacing numerical values yields


Ac B
  z
 }| {   z }|c {

ẋ1 (t) 0 1 x1 (t) 0
= + u(t)
ẋ2 (t) −10 −2 x2 (t) 1
 
  x1 (t)
y(t) = 1 0 .
x2 (t)

Now, using exact discretization and supposing a sampling time Ts = 0.2 s, it yields
 
0.8298 0.1541
A = eAc T = ,
−1.5410 0.5216
 
−1 0.0170
B = Ac (A − I)Bc = .
0.1541

Digital Control Complementary Material 9 / 20


Remark on exact discretization:R In order to compute matrix B for the discrete-time
T
domain, the use of the expression 0 eAc τ dτ requires its decomposition into a (possible
infinite) power series, which may arise numerical and accuracy problems. If Ac is nonsingular,
such a time series can be written as A−1 c (e
Ac T − I), being I an identity matrix of suitable

dimensions. □

Hence, the discrete-time realization is then


      
x1 (k + 1) 0.8298 0.1541 x1 (k) 0.0170
= + u(k)
x2 (k + 1) −1.5410 0.5216 x2 (k) 0.1541
 
  x1 (t)
y(k) = 1 0 .
x2 (t)

Now, in order to design the controller, the value of the desired eigenvalues for (A − Bk) is
needed. The given specifications in continuous time are ts = 1.5 s and Mp = s/100 = 0.1.
Hence,
− √ πξ ln Mp
Mp = e 1−ξ2
⇒ ξ = −p → ξ = 0.5912,
(ln Mp )2 + π 2
4 4
ts = ⇒ ωn = → ωn = 4.511.
ξωn ξMp
Therefore, the continuous-time desired eigenvalues (poles) are

pi = −ξωn ± jωn 1 − ωn = −2.666 − j3.6383,

which determine the following discrete-time desired eigenvalues:

λdi = epi Ts = 0.4380 ± j0.3902.

Controller design: In order to start designing the state-feedback gain, the controllability of
the discrete-time system should be verified. Hence,
 
  0.0170 0.0379
C = B AB = ,
0.1541 0.0542

whose determinant is not null (full-rank matrix) so the system is completely controllable
and the design can be performed. Then, using eigenvalue (pole) placement approach, the
characteristic polynomials are computed as follows:
• Desired characteristic polynomial: using the obtained λdi , the following polynomial is
stated:
dd (λ) = λ2 − 0.8761λ + 0.3442 = 0.

• Characteristic polynomial: from the system structure, it yields

|λI − A + Bk| = λ2 + (−1.3514 + 0.1541k2 + 0.0170k1 ) λ


+ 0.6703 − 0.1541k2 + 0.0149k1 .

Then, solving the system

0.6703 − 0.1541k2 + 0.0149k1 = 0.3441


−1.3514 + 0.1541k2 + 0.0170k1 = −0.8761,

Digital Control Complementary Material 10 / 20


the following state-feedback gain is obtained:
   
k = k1 k2 = 4.6770 2.5687 .

Finally, the feed-forward matrix k∗ is given as

k∗ = (C(I − A + Bk)−1 B)−1 = 14.6802.

The complete expression of the control law for this system (assuming full-state vector avail-
ability) is  
  x1 (k)
u(k) = − 4.6770 2.5687 + 14.6802 yd (k).
x2 (k)
Observer design: Now, an observer including the model of the disturbance should be de-
signed. Keep in mind that this procedure can be pushed ahead independently from the
controller design given the Separation Principle. First, the realization of di (k) should be de-
termined. Since that disturbance is constant, it will considered here of unitary magnitude.
Then, the temporal model obeys a Heaviside function (unitary step), whose z-transform is
z
Di (z) = z−1 . The corresponding realization of this transfer function yields Ad = 1 and Cd = 1.
Note that Bd is not relevant since a disturbance is a non-manipulated system input. From
this disturbance realization together with the original plant, an augmented plant is stated as
Ā B̄
z
 }| { z }| {
A BCd B
x̄(k + 1) = x̄(k) + u(k)
0 Ad 0
   
0.8298 0.1541 0.0170 0.0170
=  −1.5410 0.5216 0.1541  x̄(k) +  0.1541  u(k)
0 0 1 0
 
ȳ(k) = 1 0 0 x̄(k).
| {z }

Next, the observability of the augmented plant should be verified. For doing so, the observ-
ability matrix    
C 1 0 0
O =  CA  =  0.8298 0.1541 0.0170 
CA2 0.4512 0.2083 0.0549
has full rank and, therefore, the augmented system is completely observable, as expected.
The observer design procedure can be performed. For such a design, the desired eigenvalues
of the observer are defined five times faster than those from the controller. The remainder
eigenvalues are designed to be as fast as possible, then placed at 0 (as deadbeat observers).
With this information, the characteristic polynomials are stated as follows:
• Desired characteristic polynomial: considering the desired eigenvalues as λdi /5 and the
rest at 0, it yields
λ3 − 0.1752λ2 + 0.0138λ = 0.

• Characteristic polynomial: from the augmented system structure, it yields

|λI − A + LC| = λ3 + (−2.3514 + ℓ1 ) λ2


+ (2.0217 − 1.5216 ℓ1 + 0.1541 ℓ2 + 0.0170 ℓ3 ) λ
− 0.6703 + 0.5216 ℓ1 − 0.1541 ℓ2 + 0.0149 ℓ3 .

Digital Control Complementary Material 11 / 20


Then, solving the system

−2.3514 + ℓ1 = −0.1752,
2.0217 − 1.5216 ℓ1 + 0.1541 ℓ2 + 0.0170 ℓ3 = 0.0138,
−0.6703 + 0.5216 ℓ1 − 0.1541 ℓ2 + 0.0149 ℓ3 = 0,

the following augmented-observer gain is obtained:


   
ℓ1 2.1763
L =  ℓ2  =  5.5544  .
ℓ3 26.2984

The equation of the augmented observer is written as


     
−1.3464 0.1541 0.0170 0.0170 2.1763
ˆ(k + 1) =  −7.0953 0.5216 0.1541  x̄
x̄ ˆ(k) +  0.1541  u(k) +  5.5544  ȳ(k).
−26.2984 0 1 0 26.2984

Considering all the previous designs, the dynamic output-feedback regulator is computed as

50.75z 2 − 69.25z + 30.81


C(z) = k̄(zI − Ā + LC̄ + B̄ k̄)−1 L = ,
z 3 + 0.3003z 2 − 0.6169z − 0.6834

where k̄ = k Cd .
 

Complementary Material for Problem 12:


Figure 2 shows diverse signals form the closed loop scheme designed in Exercise 12. The response of
the closed-loop system is show in Figure 2(a). It is possible to see the effect of the disturbance di (k)
from k = 4 s on. Notice that both transient regimes (after the effect of F and after the effect of di )
have the same desired specifications, i.e., 10% of overshoot and settling time of about 1.5 s. In Figure
2(b), the control signal is shown. Notice its automatic adjustment once the disturbance affects the
system in order to maintain the desired output value (disturbance rejection). Figure 2(c) shows the
estimation of the augmented-system states: position (x̄1 ), velocity (x̄2 ) and the disturbance-related
state (x̄3 ). Finally, Figure 2(d) shows the behaviour of the closed-loop controlled system when
different position references are given. Moreover, a short Matlab code that implements most of the
steps presented before is also added below.

1 % ================================================
2 % Digital Control (240754) - UPC-ETSEIB
3 %
4 % Exercise 9: Mass-spring-damper system
5 % Author: C. Ocampo-Martinez
6 % Copyright 2020
7 % ================================================
8
9 clear all
10 close all
11 clc
12
13 % System parameters
14 m = 1;
15 b = 2;
16 h = 10;

Digital Control Complementary Material 12 / 20


15
1.2

0.8 10
position (m)

control
0.6

0.4 5

0.2

0 0
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
time (s) time (s)

(a) Reference-disturbance response (b) Control input signal


2.5 4.5

position 4
2 velocity
disturbance 3.5

1.5 3

position (m)
2.5
states

1
2

0.5 1.5

1
0
0.5

-0.5 0
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
time (s) time (s)

(c) State estimates (d) System response for different position references and
disturbance in k = 4 s

Figure 2: Closed-loop system response related to Exercise 12

17
18 % Continuous-time matrices
19 Ac = [0 1; -h/m -b/m];
20 Bc = [0; 1/m];
21 C = [1 0];
22 D = 0;
23
24 % Sampling time
25 Ts = 0.2;
26
27 sysc = ss(Ac,Bc,C,D);
28
29 % Exact sampling
30 A = expm(Ac*Ts);
31 B = Ac\(A-eye(2))*Bc;
32 sysd = ss(A,B,C,D,Ts);
33 G = ss(A,B,C,D,Ts);
34 n = length(A);
35
36 % Controllability/observability tests
37 CM = ctrb(A,B);
38 det(CM);
39 OM = obsv(A,C);
40 det(OM);

Digital Control Complementary Material 13 / 20


41
42 % Controller design
43 poles_d = [0.438-1i*0.3902, 0.438+1i*0.3902 ];
44 K = place(A,B,poles_d);
45 eig(A-B*K);
46
47 % Observer design (with no disturbance)
48 poles_o = (1/5)*poles_d;
49 L = place(A',C',poles_o)';
50
51 % Disturbance realization (step)
52 num=[1 0];
53 den=[1 -1];
54 DD = tf(num, den,Ts);
55 [Ad,Bd,Cd,Dd] = tf2ss(num,den);
56 nd = length(Ad);
57
58 % Augmented-system matrices
59 Ab = [A B*Cd;zeros(nd,n) Ad];
60 Bb = [B;zeros(nd,1)];
61 Cb = [C zeros(1,nd)];
62 Db = 0;
63 init_cond_ap = [0;0;0];
64 Gb = ss(Ab,Bb,Cb,Db,Ts);
65 OMb = obsv(Ab,Cb);
66
67 % Observer design (with disturbance)
68 poles_ob = [(1/5)*poles_d 0];
69 Lb = place(Ab',Cb',poles_ob)';
70
71 % Observer matrices
72 Ao = Ab - Lb*Cb;
73 Bo = [Bb Lb];
74 Co = eye(length(Ao));
75 Do = zeros((nd+n),2);
76 Go = ss(Ao,Bo,Co,Do,Ts);
77 init_cond_ao = [0;0;0];
78
79 % Disturbance visualization (for Simulink implementation)
80 Cdd = [zeros(1,n) Cd];
81
82 % Dynamic output-feedback controller
83 Kb = [K Cd];
84 CC = -reg(Gb,Kb,Lb);
85 CC_s = tf(CC);
86 pole(CC);
87
88 % Feedforward Gain (precompensation)
89 cl = ss(Ab-Bb*Kb,Bb,Cb,Db,Ts);
90 Kstar = 1/dcgain(cl);
91
92 % Closed-loop TF computation
93 LL = CC*G; % Open-loop TF
94 T = feedback(LL,1);
95 pole(T)

13. It is desired to control the system of Figure 3, where a ∈ R is known and constant. To do so, it
is possible to choose among two inputs (u1 and u2 ) and two outputs (y1 and y2 ), BUT it is only
possible to use one input and one output at the same time.
Under these conditions,
Digital Control Complementary Material 14 / 20
+ +
<latexit sha1_base64="562mJs3SD3pyBexdFHju0eHqW84=">AAAB4nicbZDLSgNBEEVr4ivGV9Slm8YgCEKYEVGXQTcuEzAmkAyhp1OTNOl50F0jhJAf0JWoOz/JH/Bv7MRZaOJdna57G+pWkCppyHW/nMLK6tr6RnGztLW9s7tX3j94MEmmBTZFohLdDrhBJWNskiSF7VQjjwKFrWB0O/Nbj6iNTOJ7GqfoR3wQy1AKTnbUOOuVK27VnYstg5dDBXLVe+XPbj8RWYQxCcWN6XhuSv6Ea5JC4bTUzQymXIz4ADsWYx6h8SfzRafsJEw0oyGy+ft3dsIjY8ZRYDMRp6FZ9GbD/7xORuG1P5FxmhHGwkasF2aKUcJmfVlfahSkxha40NJuycSQay7IXqVk63uLZZfh4bzqXVbdxkWldpMfoghHcAyn4MEV1OAO6tAEAQjP8AbvTt95cl6c159owcn/HMIfOR/fafmKSQ==</latexit> <latexit sha1_base64="562mJs3SD3pyBexdFHju0eHqW84=">AAAB4nicbZDLSgNBEEVr4ivGV9Slm8YgCEKYEVGXQTcuEzAmkAyhp1OTNOl50F0jhJAf0JWoOz/JH/Bv7MRZaOJdna57G+pWkCppyHW/nMLK6tr6RnGztLW9s7tX3j94MEmmBTZFohLdDrhBJWNskiSF7VQjjwKFrWB0O/Nbj6iNTOJ7GqfoR3wQy1AKTnbUOOuVK27VnYstg5dDBXLVe+XPbj8RWYQxCcWN6XhuSv6Ea5JC4bTUzQymXIz4ADsWYx6h8SfzRafsJEw0oyGy+ft3dsIjY8ZRYDMRp6FZ9GbD/7xORuG1P5FxmhHGwkasF2aKUcJmfVlfahSkxha40NJuycSQay7IXqVk63uLZZfh4bzqXVbdxkWldpMfoghHcAyn4MEV1OAO6tAEAQjP8AbvTt95cl6c159owcn/HMIfOR/fafmKSQ==</latexit>

u1
<latexit sha1_base64="f1T1e2NTvWj2rbteQuZ4xHW0+rs=">AAAB5HicbZDLTgJBEEVr8IX4Ql266UhMXJEZY9Ql0Y1LjPJIgJCepgY69DzSXWNCJvyBroy684v8Af/GBmeh4F2drns7qVt+oqQh1/1yCiura+sbxc3S1vbO7l55/6Bp4lQLbIhYxbrtc4NKRtggSQrbiUYe+gpb/vhm5rceURsZRw80SbAX8mEkAyk42dF92vf65Ypbdediy+DlUIFc9X75szuIRRpiREJxYzqem1Av45qkUDgtdVODCRdjPsSOxYiHaHrZfNUpOwlizWiEbP7+nc14aMwk9G0m5DQyi95s+J/XSSm46mUySlLCSNiI9YJUMYrZrDEbSI2C1MQCF1raLZkYcc0F2buUbH1vsewyNM+q3kXVvTuv1K7zQxThCI7hFDy4hBrcQh0aIGAIz/AG707gPDkvzutPtODkfw7hj5yPb/pbizc=</latexit>

<latexit sha1_base64="HQETMpVY04CiBIVO2Xx2/mm/Fz8=">AAAB9HicbZDLTgIxFIY7eEO8Dbp000hM3DjpEKMsiW5cYiKXBAjplDPQ0Lmk7WBwMm+iK6PufBJfwLex4CwU/Fdfz/83Oef3YsGVJuTLKqytb2xuFbdLO7t7+wd2+bClokQyaLJIRLLjUQWCh9DUXAvoxBJo4Aloe5Obud+eglQ8Cu/1LIZ+QEch9zmj2owGdrnnS8pS4lSz9PGcOLVsYFeIQxbCq+DmUEG5GgP7szeMWBJAqJmgSnVdEut+SqXmTEBW6iUKYsomdARdgyENQPXTxeoZPvUjifUY8OL9O5vSQKlZ4JlMQPVYLXvz4X9eN9F+rZ/yME40hMxEjOcnAusIzxvAQy6BaTEzQJnkZkvMxtS0oE1PJXO+u3zsKrSqjnvpkLuLSv06L6KIjtEJOkMuukJ1dIsaqIkYekDP6A29W1PryXqxXn+iBSv/c4T+yPr4BqT4kKQ=</latexit>

0.2 y1
<latexit sha1_base64="ImuDjspMCUCUnU09nkKpO2AcUec=">AAAB5HicbZC9TsMwFIVvyl8pfwVGFosKialKEALGChbGIuiP1EaV4960Vu0ksh2kKOobwISAjSfiBXgb3JIBWs70+Z5j6Z4bJIJr47pfTmlldW19o7xZ2dre2d2r7h+0dZwqhi0Wi1h1A6pR8AhbhhuB3UQhlYHATjC5mfmdR1Sax9GDyRL0JR1FPOSMGju6zwbeoFpz6+5cZBm8AmpQqDmofvaHMUslRoYJqnXPcxPj51QZzgROK/1UY0LZhI6wZzGiErWfz1edkpMwVsSMkczfv7M5lVpnMrAZSc1YL3qz4X9eLzXhlZ/zKEkNRsxGrBemgpiYzBqTIVfIjMgsUKa43ZKwMVWUGXuXiq3vLZZdhvZZ3buou3fntcZ1cYgyHMExnIIHl9CAW2hCCxiM4Bne4N0JnSfnxXn9iZac4s8h/JHz8Q0Aaos7</latexit>

z 0.8
+
<latexit sha1_base64="562mJs3SD3pyBexdFHju0eHqW84=">AAAB4nicbZDLSgNBEEVr4ivGV9Slm8YgCEKYEVGXQTcuEzAmkAyhp1OTNOl50F0jhJAf0JWoOz/JH/Bv7MRZaOJdna57G+pWkCppyHW/nMLK6tr6RnGztLW9s7tX3j94MEmmBTZFohLdDrhBJWNskiSF7VQjjwKFrWB0O/Nbj6iNTOJ7GqfoR3wQy1AKTnbUOOuVK27VnYstg5dDBXLVe+XPbj8RWYQxCcWN6XhuSv6Ea5JC4bTUzQymXIz4ADsWYx6h8SfzRafsJEw0oyGy+ft3dsIjY8ZRYDMRp6FZ9GbD/7xORuG1P5FxmhHGwkasF2aKUcJmfVlfahSkxha40NJuycSQay7IXqVk63uLZZfh4bzqXVbdxkWldpMfoghHcAyn4MEV1OAO6tAEAQjP8AbvTt95cl6c159owcn/HMIfOR/fafmKSQ==</latexit>

<latexit sha1_base64="zhd37zAp4n9o8EbCVcHiidIoi9A=">AAAB4nicbZDLTgJBEEVr8IX4Ql266UhM3EhmjFGXRDcuIREhgQnpaWqgQ88j3TUmhPADujLqzk/yB/wbG5yFgnd1uu7tpG4FqZKGXPfLKaysrq1vFDdLW9s7u3vl/YMHk2RaYFMkKtHtgBtUMsYmSVLYTjXyKFDYCka3M7/1iNrIJL6ncYp+xAexDKXgZEeNs1654lbdudgyeDlUIFe9V/7s9hORRRiTUNyYjuem5E+4JikUTkvdzGDKxYgPsGMx5hEafzJfdMpOwkQzGiKbv39nJzwyZhwFNhNxGppFbzb8z+tkFF77ExmnGWEsbMR6YaYYJWzWl/WlRkFqbIELLe2WTAy55oLsVUq2vrdYdhkezqveZdVtXFRqN/khinAEx3AKHlxBDe6gDk0QgPAMb/Du9J0n58V5/YkWnPzPIfyR8/ENbPWKSw==</latexit>

+
<latexit sha1_base64="562mJs3SD3pyBexdFHju0eHqW84=">AAAB4nicbZDLSgNBEEVr4ivGV9Slm8YgCEKYEVGXQTcuEzAmkAyhp1OTNOl50F0jhJAf0JWoOz/JH/Bv7MRZaOJdna57G+pWkCppyHW/nMLK6tr6RnGztLW9s7tX3j94MEmmBTZFohLdDrhBJWNskiSF7VQjjwKFrWB0O/Nbj6iNTOJ7GqfoR3wQy1AKTnbUOOuVK27VnYstg5dDBXLVe+XPbj8RWYQxCcWN6XhuSv6Ea5JC4bTUzQymXIz4ADsWYx6h8SfzRafsJEw0oyGy+ft3dsIjY8ZRYDMRp6FZ9GbD/7xORuG1P5FxmhHGwkasF2aKUcJmfVlfahSkxha40NJuycSQay7IXqVk63uLZZfh4bzqXVbdxkWldpMfoghHcAyn4MEV1OAO6tAEAQjP8AbvTt95cl6c159owcn/HMIfOR/fafmKSQ==</latexit>

u2
<latexit sha1_base64="Je8hLv92Ns33GSU/SkqTekJ3/XE=">AAAB5HicbZDLTgJBEEVrfCK+UJduOhITV2SGGHVJdOMSozwSmJCepgY69DzSXWNCCH+gK6Pu/CJ/wL+xwVkoeFen695O6laQKmnIdb+cldW19Y3NwlZxe2d3b790cNg0SaYFNkSiEt0OuEElY2yQJIXtVCOPAoWtYHQz81uPqI1M4gcap+hHfBDLUApOdnSf9aq9UtmtuHOxZfByKEOueq/02e0nIoswJqG4MR3PTcmfcE1SKJwWu5nBlIsRH2DHYswjNP5kvuqUnYaJZjRENn//zk54ZMw4Cmwm4jQ0i95s+J/XySi88icyTjPCWNiI9cJMMUrYrDHrS42C1NgCF1raLZkYcs0F2bsUbX1vsewyNKsV76Li3p2Xa9f5IQpwDCdwBh5cQg1uoQ4NEDCAZ3iDdyd0npwX5/UnuuLkf47gj5yPb/vZizg=</latexit>

<latexit sha1_base64="sy4I/7UfJYEf5LR7HGv6L/Aj/uI=">AAAB8nicbVC7TsNAEFzzDOERAyXNiQiJhsgGBJQRNJRBIg8psaLz5Zyccn7obo0ULP8IVAjo+BR+gL/hElxAwlSzO7PSzviJFBod58taWl5ZXVsvbZQ3t7Z3KvbuXkvHqWK8yWIZq45PNZci4k0UKHknUZyGvuRtf3wz1dsPXGkRR/c4SbgX0mEkAsEomlXfrvQCRVnm1M7y7PGE5n276tScGcgicQtShQKNvv3ZG8QsDXmETFKtu66ToJdRhYJJnpd7qeYJZWM65F1DIxpy7WWzx3NyFMSK4IiT2fzbm9FQ60noG09IcaTntenyP62bYnDlZSJKUuQRMxajBakkGJNpfjIQijOUE0MoU8J8SdiImg7QtFQ28d35sIukdVpzL2rO3Xm1fl0UUYIDOIRjcOES6nALDWgCgxSe4Q3eLbSerBfr9ce6ZBU3+/AH1sc3AyuQXA==</latexit>

0.3 y2
<latexit sha1_base64="5NV/46e450ijzsi0OVYdv2eQwEw=">AAAB5HicbZC9TsMwFIVv+C3lr8DIYlEhMVVJhYCxgoWxCPojtVHluDetVTuJbAcpivoGMCFg44l4Ad4Gt2SAljN9vudYuucGieDauO6Xs7K6tr6xWdoqb+/s7u1XDg7bOk4VwxaLRay6AdUoeIQtw43AbqKQykBgJ5jczPzOIyrN4+jBZAn6ko4iHnJGjR3dZ4P6oFJ1a+5cZBm8AqpQqDmofPaHMUslRoYJqnXPcxPj51QZzgROy/1UY0LZhI6wZzGiErWfz1edktMwVsSMkczfv7M5lVpnMrAZSc1YL3qz4X9eLzXhlZ/zKEkNRsxGrBemgpiYzBqTIVfIjMgsUKa43ZKwMVWUGXuXsq3vLZZdhna95l3U3LvzauO6OEQJjuEEzsCDS2jALTShBQxG8Axv8O6EzpPz4rz+RFec4s8R/JHz8Q0B6Is8</latexit>

+
<latexit sha1_base64="562mJs3SD3pyBexdFHju0eHqW84=">AAAB4nicbZDLSgNBEEVr4ivGV9Slm8YgCEKYEVGXQTcuEzAmkAyhp1OTNOl50F0jhJAf0JWoOz/JH/Bv7MRZaOJdna57G+pWkCppyHW/nMLK6tr6RnGztLW9s7tX3j94MEmmBTZFohLdDrhBJWNskiSF7VQjjwKFrWB0O/Nbj6iNTOJ7GqfoR3wQy1AKTnbUOOuVK27VnYstg5dDBXLVe+XPbj8RWYQxCcWN6XhuSv6Ea5JC4bTUzQymXIz4ADsWYx6h8SfzRafsJEw0oyGy+ft3dsIjY8ZRYDMRp6FZ9GbD/7xORuG1P5FxmhHGwkasF2aKUcJmfVlfahSkxha40NJuycSQay7IXqVk63uLZZfh4bzqXVbdxkWldpMfoghHcAyn4MEV1OAO6tAEAQjP8AbvTt95cl6c159owcn/HMIfOR/fafmKSQ==</latexit>

z a

Figure 3: Scheme of Problem 13

(a) Determine an MIMO state-space realization of the system in Figure 3.

Solution:
First, the top branch including a closed loop with negative unitary feedback, can be
simplified as

For each transfer function and taking the general form towards its state-space realization
equivalence (from Subject’s slides Block 3, slide 33), the following expressions are used:
(
x(k + 1) = β x(k) + µ(k)

γ(k) = x(k)

being x ∈ R the system state, µ ∈ R its input and γ ∈ R its output. From this point on,
there are two options:
Option 1: In this case, the following scheme is considered:

For the top branch of the scheme, µ(k) = 0.2u1 (k) and β = 0.6, then

x1 (k + 1) = 0.6x1 (k) + 0.2u1 (k). (1)

On the other hand, for the bottom branch, µ(k) = 0.3(u1 (k) + u2 (k)) and β = a,
then
x2 (k + 1) = ax2 (k) + 0.3u1 (k) + 0.3u2 (k). (2)
Regarding the outputs,

y1 (k) = γ1 (k) + γ2 (k) = x1 (k) + x2 (k) (3)

Digital Control Complementary Material 15 / 20


and
y2 (k) = γ2 (k) = x2 (k). (4)
Finally, from (1) to (4), the state-space realization for the system with two inputs
and two outputs results in
       
x1 (k + 1) 0.6 0 x1 (k) 0.2 0 u1 (k)
= + ,
x2 (k + 1) 0 a x2 (k) 0.3 0.3 u2 (k)
    
y1 (k) 1 1 x1 (k)
= ,
y2 (k) 0 1 x2 (k)

which will be used later on in the following way:


        
x1 (k + 1) 0.6 0 x1 (k) 0.2 0
= + u1 (k) + u2 (k),
x2 (k + 1) 0 a x2 (k) 0.3 0.3
| {z } | {z } | {z }
A b1 b2
 
  x1 (k)
y1 (k) = 1 1 ,
| {z } x2 (k)
c1
 
  x1 (k)
y2 (k) = 0 1 .
| {z } x2 (k)
c2

Option 2: In this case, the following scheme is considered:

For the top branch of the scheme, µ(k) = u1 (k) and β = 0.6, then

x1 (k + 1) = 0.6x1 (k) + u1 (k). (5)

On the other hand, for the bottom branch, µ(k) = u1 (k) + u2 (k) and β = a, then

x2 (k + 1) = ax2 (k) + u1 (k) + u2 (k). (6)

Regarding the outputs,

y1 (k) = 0.2γ1 (k) + 0.3γ2 (k) = 0.2x1 (k) + 0.3x2 (k) (7)

and
y2 (k) = 0.3γ2 (k) = 0.3x2 (k). (8)
Finally, from (5) to (8), the state-space realization for the system with two inputs
and two outputs results in
       
x1 (k + 1) 0.6 0 x1 (k) 1 0 u1 (k)
= + ,
x2 (k + 1) 0 a x2 (k) 1 1 u2 (k)
    
y1 (k) 0.2 0.3 x1 (k)
= ,
y2 (k) 0 0.3 x2 (k)

Digital Control Complementary Material 16 / 20


which can be written as
        
x1 (k + 1) 0.6 0 x1 (k) 1 0
= + u1 (k) + u2 (k),
x2 (k + 1) 0 a x2 (k) 1 1
| {z } | {z } | {z }
A b1 b2
 
  x1 (k)
y1 (k) = 0.2 0.3 ,
| {z } x2 (k)
c1
 
  x1 (k)
y2 (k) = 0 0.3 .
| {z } x2 (k)
c2

In the sequel and without lost of generality, Option 1 will be used to propose
the solutions for subsequent items.

(b) Determine the input that makes the system completely controllable. (1 point)

Solution:
The system controllability can be determined by using the controllability matrix C.
Hence,

i. Considering u1 , the determinant of such a matrix is

0.2 0.12
C1 = b1 A b1 = .
0.3 0.3a

Notice that the determinant of C1 is 0.06a − 0.036, which could be different from
zero, making that C1 would be of full rank and hence the system completely con-
trollable.

ii. Considering u2 , the determinant of the controllability matrix is

0 0
C2 = b2 A b2 = .
0.3 0.3a

Notice that the determinant of C2 will always be null, which implies the system
will not be completely controllable.

Therefore, the input that makes the system completely controllable is u1 .

(c) For the case of the input determined at item 13b, analyse the system controllability in terms
of the parameter a. (1 point)

Solution:
The determinant of C1 is 0.06a − 0.036, therefore the system (A, b1 ) will be completely
controllable iff a ̸= 0.6.

(d) Determine the output that makes the system completely observable.

Digital Control Complementary Material 17 / 20


Solution:
The system observability can be determined by using the observability matrix O. Hence,

i. Considering y1 , the determinant of such a matrix is

c1 1 1
O1 = = .
c1 A 0.6 a

Notice that the determinant of O1 is a − 0.6, which could be different from zero,
making that O1 would be of full rank and hence the system completely observable.

ii. Considering y2 , the determinant of the observability matrix is

c2 0 1
O2 = = .
c2 A 0 a

Notice that the determinant of O2 will always be null, which implies the system
will not be completely observable.

Therefore, the output that makes the system completely observable is y1 .

(e) For the case of the output determined at item 13d, analyse the system observability in terms
of the parameter a.

Solution:
The determinant of O1 is a − 0.6, therefore the system (A, c1 ) will be completely observ-
able iff a ̸= 0.6. It also implies that O1 is of full rank.

Considering the input determined at item 13b and the output determined at item 13d, i.e., a SISO
system in state space,

(a) Analyse the system stability in function of the parameter a. (1 point)

Solution:  
0.6 0
The system stability depends only on the eigenvalues of matrix A = . Since
0 a
such eigenvalues are 0.6 and a, then the system will be stable iff |a| ≤ 1. In particular,
the system is marginally stable when |a| = 1.

Y1 (z)
(b) Determine the corresponding transfer function G(z) = U1 (z) .

Solution:
Now, the original system scheme, taking into account the used input and output, is
redrawn as

Digital Control Complementary Material 18 / 20


Thus, the transfer function is the following:

0.2 0.3 0.5z − (0.2a + 0.18)


G(z) = + = 2 .
z − 0.6 z − a z − (0.6 + a)z + 0.6a

(c) From the transfer function determined at item 5b, obtain the state-space realization of the
system in controllable canonical form.

Solution:
The system matrices for the controllable canonical for are
   
0 1 0  
Ac = , b1,c = , c1,c = −(0.2a + 0.18) 0.5 , dc = 0.
−0.6a 0.6 + a 1

(d) With the previously computed realization and supposing full-state measurement, determine a
state-feedback control law that
• makes the closed-loop system output to have no overshoot, and
• defines the closed-loop system eigenvalues with modules 0.1 and 0.2.

Solution:
No specification is given about the steady-state behaviour of the closed-loop system
response, then the control law to be computed has the
 form u(k) = −Kx(k). Defining
such a state-feedback stabilising gain K = k1 k2 , the closed-loop eigenvalues of the


system come from the matrix


 
0 1
Acl = A − b1 K = .
−0.6a − k1 0.6 + a − k2

The characteristic polynomial is then

λI − Acl = λ2 + (−0.6 − a + k2 ) λ + 0.6 a + k1 .

Given that the desired characteristic polynomial is λ2 − 0.3 λ + 0.02, solving the lin-
ear system of equations generated by equalling the coefficients from both characteristic
polynomials yields

0.6a + k1 = 0.02,
−0.6 − a + k2 = −0.3,

and therefore
k1 = −0.6a + 0.02, k2 = 0.3 + a.
Finally, the requested control law is written as follows:

u(k) = (0.6a − 0.02)x1 (k) − (0.3 + a)x2 (k).

(e) Complement the control law determined at item 5d such that the closed-loop system was able
to amplify, with a gain of 2, all exogenous closed-loop constant inputs yd (desired outputs).

Digital Control Complementary Material 19 / 20


Solution:
Given the requirements upon the steady-state behaviour of the closed-loop system re-
sponse, then the control law to be computed has the form u(k) = −Kx(k) + k ∗ yd . Such
a pre-compensation gain k ∗ is determined as
−1
k ∗ = c1,c (I − Ac + b1,c K)−1 b1,c
 −1  !−1
  1 −1 0
= −(0.2a + 0.18) 0.5
0.02 0.7 1
= (−0.2778a + 0.4445)−1
1
= .
−0.2778a + 0.4445
By definition, when implementing k ∗ , the resultant gain from yd to y(k) is 1. Then, the
requested control law is now

u(k) = (0.6a − 0.02)x1 (k) − (0.3 + a)x2 (k) + 2 k ∗ yd


2
= (0.6a − 0.02)x1 (k) − (0.3 + a)x2 (k) + yd .
0.4445 − 0.2778a

Digital Control Complementary Material 20 / 20

You might also like