0% found this document useful (0 votes)
99 views58 pages

Chapter 12 - Solutions: Problem 12.1. If The Sampling Frequency Is 1 (HZ), Then The Sampling Pe

This document provides solutions to problems regarding Z-transforms and discrete-time systems. It includes: 1) A table showing examples of signals and their corresponding Z-transforms 2) Deriving transfer functions from system equations by taking the Z-transform 3) Computing step responses from transfer functions using partial fraction expansions and inverse Z-transforms 4) Finding pole-zero cancellations to simplify transfer functions involving trigonometric terms 5) Relating the Delta transform to the Z-transform and continuous-time transfer functions 6) Providing an example of applying the Z-transform table to determine an output signal Yq(z)

Uploaded by

José Perez
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)
99 views58 pages

Chapter 12 - Solutions: Problem 12.1. If The Sampling Frequency Is 1 (HZ), Then The Sampling Pe

This document provides solutions to problems regarding Z-transforms and discrete-time systems. It includes: 1) A table showing examples of signals and their corresponding Z-transforms 2) Deriving transfer functions from system equations by taking the Z-transform 3) Computing step responses from transfer functions using partial fraction expansions and inverse Z-transforms 4) Finding pole-zero cancellations to simplify transfer functions involving trigonometric terms 5) Relating the Delta transform to the Z-transform and continuous-time transfer functions 6) Providing an example of applying the Z-transform table to determine an output signal Yq(z)

Uploaded by

José Perez
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/ 58

Chapter 12 - Solutions

Problem 12.1. If the sampling frequency is 1 [Hz], then the sampling pe-
riod, ∆, is 1 [s]. To compute the Z-transform of a sampled signal f (t) we first
obtain the expression for f (k∆) = f [k] and we then use tables to obtain the
Z-transform. The results are shown in the table below

f (t) f [k] Z{f [k]} Notes

z2 + z + 1
µ(t) − µ(t − 3) µ[k] − µ[k − 3]
z2

2z(z − a cos(0.5) − a sin(0.5))
e−0.1t cos(5t + π/4) ak cos(0.5k + π/4) a = e−0.1
2(z 2 − 2a cos(0.5)z + a2 )

bz(z + b)
t2 e−0.25t k 2 bk b = e−0.25
(z − b)3

az(cos(1)z 2 − 2az + a2 cos(1))


te−0.1t cos(t) kak cos(k) a = e−0.1
(z 2 − 2a cos(1)z + a2 )2

Problem 12.2. The transfer function for each system can be obtained from the
system recursive equation on applying the Z-transform, with zero initial condi-
tions and then multiplying both sides by z M , where M is the smallest integer
which makes positive all powers of z.

12.2.1 The transfer functions for each of the three cases are
a)

Yq (z) − 0.8z −1Yq (z) = 0.4z −1Uq (z) (1)


zYq (z) − 0.8Yq (z) = 0.4Uq (z) (2)

The transfer function is thus


Yq (z) 0.4
Hqa (z) = = (3)
Uq (z) z − 0.8

b)

Yq (z) − 0.5z −1 Yq (z) + 0.06z −2Yq (z) = 0.6z −1 Uq (z) + 0.3z −2 Uq (z)
(4)
2
z Yq (z) − 0.5zYq (z) + 0.06Yq (z) = 0.6zUq (z) + 0.3Uq (z) (5)

Thus the transfer function is


Yq (z) 0.6z + 0.3
Hqb (z) = = 2 (6)
Uq (z) z − 0.5z + 0.06

1
c)

Yq (z) − 0.5z −1Yq (z) + 0.64z −2Yq (z) = z −1 Uq (z) (7)


2
z Yq (z) − 0.5zYq (z) + 0.64Yq (z) = zUq (z) (8)

And the transfer function is

Yq (z) z
Hqc (z) = = 2 (9)
Uq (z) z − 0.5z + 0.64

Problem 12.3. The step response y[k] of a given system with transfer function
Hq (z) can be computed from
z
Yq (z) = Hq (z) (10)
z−1
A partial fraction expansion is then used and known inverse Z-transforms
for simple fractions are applied. Alternatively, a symbolic math. package, such
as Maple V can be used.
We thus have that

 
z − 0.5 1 z(z − 0.5) 2 1
= 2 =⇒ y[k] = (−0.5)k−2 + µ[k − 2]
z(z + 0.5)(z − 1) z (z − 1)(z + 0.5) 3 3
(11)

For the inversion of

z2 2 z 2 z(z − 1)
= − (12)
(z − 1)(z 2− 0.5z + 1) 3 z − 1 3 z 2 − 0.5z + 1

it is worthwhile to have in mind that


z(z − cos(α) + cot(β) sin(α))
Z [sin(αk + β)] = sin(β) (13)
z 2 − 2z cos(α) + 1

Here cos(α) = 0.25 and thus α = 1.32 [rad], and



15
cos(α) − cot(β) sin(α) = 1 =⇒ cot(β) = − =⇒ β = −0.91 [rad] (14)
3
Thus, for this system the unit step response is given by
2
y[k] = µ[k] + 0.84 sin(1.32k − 0.91) (15)
3
For the third system we have that

2
z 25 z 5 z 25 1
= − − (16)
(z − 1)(z − 0.6)2 4 z − 1 2 (z − 0.6)2 4 z − 0.6
 
25 25 2 25 2
=⇒ y[k] = − (0.6) + k(0.6) µ[k] (17)
4 4 6
For the last case we have that
(z + 1)z 50 z 50 z(z + 0.02)
Yq (z) = = − (18)
(z − 1)(z 2 − 0.4z + 0.64) 31 z − 1 31 z 2 − 0.4z + 0.64
It is also worthwhile to recall that

  z(z − ρ cos(α) + ρ cot(β) sin(α))


Z ρk sin(αk + β) = sin(β) (19)
z 2 − 2ρz cos(α) + ρ2

We then compare the second fraction in (18) with (19), from where we obtain
cos(β) = 0.25 and

− cos(α) + cot(β) sin(α) = 0.025 =⇒ cot(β) = 0.284 =⇒ β = 1.296 [rad] (20)

Thus
 
50 1
y[k] = 1− sin(kα + β) µ[k] = [1.613 − 1.676 sin(1.32k + 1.29)]µ[k]
31 sin(β)
(21)

Problem 12.4. In this problem

Bq (z)
[GGh0 ]q (z) = (22)
Aq (z)
 
Bq (z) = z 1 − cos(1.6∆)e−1.2∆ − 0.75 sin(1.6∆)e−1.2∆ (23)
−2.4∆ −1.2∆ −1.2∆
+e + 0.75 sin(1.6∆)e − cos(1.6∆)e (24)
2 −1.2∆ −2.4∆
Aq (z) = z − 2ze cos(1.6∆) + e (25)

For [GGh0 ]q (z) to have only one pole, a pole-zero cancellation is required.
Since there is only one zero, and this is real, it is necessary that the sampling
period ∆ is chosen so that the poles are also real. This is only possible if
cos(1.6∆) = ±1, since then there are double poles located at ± e−1.2∆ . This is
equivalent to choose
π
∆ = ±κ ; ∀κ ∈ N (26)
1.6
In this case there is one zero located at e−1.2∆ (or at −e−1.2∆ ) which cancels
one of the poles.

3
Problem 12.5. We first recall that the Delta transform transfer function is
1
the Delta transform of the system output when the input is ∆ δK [k] (see section
§12.11).

12.5.1 As in figure 12.6 we assume a zero order hold, then


   
1 ∆γ 2 
Hoδ (γ) = D L −1  (27)
∆ ∆γ + 1 s(s + 1)(s + 2) t=k∆
γ  
= D 1 − 2e−k∆ + e−2k∆ (28)
∆γ + 1
1
Note that the first factor ∆ corresponds to the characteristic signals in
the Delta transform domain. The second factor originates in the Delta
transform corresponding to the term 1 − e−s∆ , present in the zero order
sample and hold device.
We then use the tables for the Delta transform to obtain

γ (1 + γ∆)((b − 2a)γ + ab) (b − 2a)γ + ab


Hoδ (γ) = = (29)
∆γ + 1 γ(γ − a)(γ − b) (γ − a)(γ − b)

where a = (1 − e−∆ )/∆ and b = (1 − e−2∆ )/∆


12.5.2 If we make ∆ → 0, then γ → s, a → 1 and a → 2 thus

lim Hoδ (γ)|γ→s = Go (s) (30)


∆→0

Problem 12.6.

12.6.1 The function Yq (z) is determined by applying the table of Z-transforms.


 
z z 0.2z
Yq (z) = 0.5 − = (31)
z − 1 z − 0.6 (z − 1)(z − 0.6)

12.6.2 The transfer function is given by

Yq (z) 0.2 0.2z −1


= = (32)
Uq (z) z − 0.6 1 − 0.6z −1

12.6.3 The difference equation can be computed from the z −1 form of the trans-
fer function above, since

(1 − 0.6z −1 )Yq (z) = z −1 Uq (z) =⇒ y[k] − 0.6y[k − 1] = 0.2u[k − 1] (33)

Problem 12.7.

4
12.7.1 Using the MATLAB command d2c, with ∆ = 0.5 [s] we obtain
3.1275s + 4.4892
Go (s) = (34)
s2 + 3.6652s + 1.4365

12.7.2 We have seen in Problem 12.4 that a pole zero cancellation may arise
for particular choices of the sampling frequency. This happens because the
sampling frequency is a sub-multiple of half the period of an oscillatory
mode (including a damped oscillatory mode). We can thus imagine a
situation where one of the poles in Hoq (z), say the one located at z = 0.8
was originally a double pole which was cancelled by a zero. This could have
happened if the continuous time plant had a damped oscillatory mode of
the form eln(0.8)t cos(ωo t + α), and the sampling period were chosen such
that ωo = κωs , with κ ∈ N.
It can also happen that the phase and frequency in an oscillatory mode in
y(t) (Figure 12.6) (when u[k] = δK [k]) are such that by choosing a suitable
sampling frequency only a constant value is observed.

Problem 12.8. We consider first the case when ∆ = 1 [s]. In this case, the
plant time delay is exactly one sampling period, then it will translate in a pole
at the origin, i.e.

1.25(1 − e−0.8 )
Hoq (z) = (35)
z(z − e−0.8 )

When ∆ = 0.75 [s], the delay is larger than a sampling period. We can apply
the definition of the Z-transform, i.e.

   
z−1 e−s 
 z−1  
Hoq (z) = Z L  = 1.25 Z (1 − e−0.8(0.75k−1) )µ(0.75k − 1)
z s(s + 1) t=0.75k z
(36)

As k is an integer, the above equation is different from zero only for k ≥ 2


and it can then be translated into

z−1  
Hoq (z) = 1.25 Z (1 − e−0.4 e−0.6(k−2) )µ[k − 2] (37)
z  
z−1 1 e−0.4
= 1.25 − (38)
z z(z − 1) z(z − e−0.6 )
(1 − e−0.4 )z + (e−0.4 − e−0.6 )
= 1.25 (39)
z 2 (z − e−0.6 )

5
Problem 12.9. We first recall that the stability region in the γ plane is given
by
|γ∆ + 1| < 1 (40)
12.9.1 We observe that the system has poles at γ = −0.1 and at γ = −0.8.
Considering ∆ = 3.5, the first pole is stable, because it satisfies (40); how-
ever, the second one does not satisfy (40), hence the system is unstable.
12.9.2 To obtain the Z-transform transfer function, we simply use the relation-
ship γ = (z − 1)/∆ = (z − 1)/3.5. This yields
z + 0.75
Gq (z) = 3.5 (41)
(z − 0.65)(z + 1.4)
Note that this expression confirms the instability of the system because
there is a pole outside the unit circle.
12.9.3 If ∆ = 1.5, then, both poles are stable, hence the system is stable.
The Z-transform transfer function is obtained using the relationship γ =
(z − 1)/∆ = (z − 1)/1.5. We then obtain

z − 0.25
Gq (z) = 1.5 (42)
(z + 0.2)(z − 0.92)
Which, as expected, is stable.
Problem 12.10. The frequency responses of both filters are shown in Figure
1.
20

0
|H ((ejω∆−1)/∆)|
δ
Magnitudes [dB]

−20

−40
|H(jω)|
−60

−80
10
−2
10
−1
10
0
10
1
ωs 2ωs 2
10
Frequency [rad/s]

Figure 1: Frequency responses

12.10.1 The filter frequency responses in Figure 1 show that both filters have
similar frequency response for low frequencies (roughly up to the cutoff
frequency 1 [rad/s]). However, as the frequency increases, the responses
drift apart. The analogue filter frequency response decays monotonically.
However the digital filter, as expected, exhibits a periodic frequency re-
sponse.

6
12.10.2 The periodic nature of the digital filter frequency response precludes its
use as an anti-aliasing filter. Indeed, the purpose of an anti-aliasing filter
is to avoid the folding effect of high frequency components in the signal
being sampled; this purpose is achieved by filtering out the high frequency
component in the signal before it is sampled. This implies that an analogue
filter has to be used unless it is known a-priori that no signal components
lie at the frequency where folded components of the digital filter appear.
This can be achieved by combining a crude analogue filter followed by a
digital filter.
Problem 12.11. To make the comparison, the frequency responses are com-
puted using MATLAB. The results are shown in Figure 2.
In both cases (∆ = 0.5 [s] and ∆ = 0.05 [s]) the frequency responses are
compared and computed using the absolute value of the expression

[Gh0 G1 G2 ]q (ejω∆ ) − [Gh0 G1 ]q (ejω∆ )[Gh0 G2 ]q (ejω∆ ) (43)


From Figure 2 we can see that the difference is much smaller for the smaller
sampling period. This can be understood by considering that the zero order hold
builds a staircase approximation of continuous time signals. When the sampling
frequency is much higher than the signal frequency band, then the zero order
hold plays almost no role and the difference above is insignificant.

0.25

0.2
Magnitude

0.15

0.1 ∆=0.5 [s]

0.05

0
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]

0.02

0.015
Magnitude

∆=0.05 [s]
0.01

0.005

0
−1 0 1 2 3
10 10 10 10 10
Frequency [rad/s]

Figure 2: Frequency response differences

7
Chapter 13 - Solutions
Problem 13.1.
13.1.1 The frequency responses for ∆ = 0.1, 1 and 10 [s] are computed using
MATLAB. The results are shown in figure 1.

|Gh0(jω)/∆| 1

0.5 ∆ =0.1 [s]

0
−2 −1 0 1 2
10 10 10 10 10

1
|Gh0(jω)/∆|

0.5 ∆ =1 [s]

0
−2 −1 0 1 2
10 10 10 10 10

1
|Gh0(jω)/∆|

0.5
∆ =10 [s]

0
−2 −1 0 1 2
10 10 10 10 10
Frequency [rad/s]

Figure 1: Frequency response for ∆ = 0.1, 1 and 10 [s]

We observe that as the sampling period increases, the frequency response


looses flatness. Also, the frequency responses exhibit zero gain at frequen-
cies ωs , 2ωs , 3ωs , . . . .
13.1.2 We have the following facts:
(i) The zero-order hold has a d.c. gain equal to 1/∆ (use L’Hôpital’s rule
to compute Gh0 (0)).
(ii) From Figure 12.5, it is the straightforward to see that a constant input
u[k] = K yields a constant output m(t) = K, i.e., the zero-order
sample and hold has a unit d.c. gain.
(iii) Also from Figure 12.5 and from the previous two facts we conclude
that the Fourier transform of us (t), U s (jω) satisfies U s (0) = ∆M (0),
where M (jω) is the Fourier transform of m(t).
(iv) The Fourier transform of U s (jω) is periodic with period ωs . This
can be proved as follows:

1
Using Fourier series we establish that

 ∞
1  −jkωs t
δ(t − k∆) = e (1)

k=−∞ k=−∞

On the other hand, if we build a continuous-time function u(t) such


that u(k∆) = u[k], then on using (1) we have that

 ∞

 ∞

 1 
−jkωs t
U (jω) = F u(t)
s
δ(t − k∆) = F u(t) e

k=−∞ k=−∞
(2)


1
= U (j(ω − kωs )) (3)

k=−∞

From the above facts we can appreciate that the staircase nature of m(t),
being a high frequency ingredient, originates on the degree of filtering of
U (j(ω − kωs )), for k = 1, 2, . . . .
On the other hand, since the frequency-response gain of the hold devise is
exactly zero at ω = ωs , 2ωs , 3ωs , . . . , then the high-frequency response
has to do with the degree of damping in the neighborhood of each of those
frequencies. It turns out that the higher the sampling frequency, the higher
the damping. This can be appreciated from Figure 2, where two different
sampling periods have been considered. For the purpose of comparison
scaling and frequency, shifting has been used.

0.35

0.3
Gh0(jω)/∆|∆=1
0.25
Magnitudes

0.2

0.15
Us(jω) ∆
0.1
shifted G (jω)/∆|
h0 ∆=0.5
0.05

0
4.5 5 5.5 6 6.5 7 7.5 8
Frequency [rad/s]

Figure 2: High frequency filtering for different sampling periods.

Problem 13.2. We first recall that, if we denote by f(kh) the sampled version
of the plant unit step response, then

z−1
[Go Gh0 ]q (z) = Z [f (k∆)] (4)
z

2
And, for this plant, the step response of the process, f (t), is given by:

 
1 1 1
f (t) = L = −te−t − e−2t + (5)
(s + 1)2 (s + 2)s 2 2
Then, a discretized version of (5) yields

1 1
f (k∆) = −k∆e−k∆ − e−2k∆ + (6)
2 2
Thus

1 az 2 + bz + c
[Go Gh0 ]q (z) = − 3 −∆ −2∆
2 z + (−2e −e ) z 2 + (e−2∆ + 2e−3∆ ) z + (−e−4∆ )
(7)
where

 
a = 2∆e−∆ + e−2∆ − 1 (8)
 
b = −2e−3∆ − 2∆e−∆ − 2∆e−3∆ + 2e−∆ (9)
 
c = e−4∆ − e−2∆ + 2∆e−3∆ (10)

13.2.1 We compute the zeros evaluating the numerator polynomial az 2 + bz + c


for ∆ = 0.2, and then computing its roots. This yields zeros located at
z = −3.063 and at z = −0.219.
13.2.2 From the above results, we can build a root locus of the zeros of (7) for
∆ varying from 0.02 to 2 [s]. This is shown in Figure 3.

0.5

h=2
h=2
Im

0
h=0.02 h=0.02

−0.5

−1
−4 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0
Re

Figure 3: Zero locus.

In Figure 3 two branches can be observed, the one to the right goes from
-0.0296 to -0.2626 and the other from -0.6189 to -3.6582.

3
Problem 13.3. Since the given plant is nonminimum-phase it then exhibits
reverse action, i.e., an undershoot occurs in the unit step response, as shown in
Figure 4.

13.3.1 The pulse transfer function [Go Gh0 ]q (z) is computed via the unit step
response of Go (s). We recall that, if we denote by f (t) that response, we
have that
z−1
[Go Gh0 ]q (z) = Fq (z); where Fq (z) = Z [f [k]] (11)
z

where f [k] is the sampled sequence {f (k∆)}. Unless Go (s) has a zero at
the origin (which would make it impossible to steer it to a constant output
with finite input) then Fq (z) has a pole at z = 1, and therefore all zeros
in [Go Gh0 ]q (z) are zeros of Fq (z).
The problem then reduces to finding a ∆ such that Fq (z) has no zeros
(except for one zero at the origin). We also observe that since [Go Gh0 ]q (z)
has only two poles, then if it has no zeros, the relative degree must be equal
to two, this implies that f [k] must be zero, not only at k = 0, but also at
k = 1. From Figure 4 we conclude that ∆ must be equal to the interval for
which the step response is negative (see the dotted indicator in Figure 4).

0.6
Unit step rersponse

0.4

0.2

−0.2
0 1 2 3 4 5 6 7 8
Time [s]

Figure 4: Continuous-time unit-step response

The required ∆ is approximately equal to 1.1 [s]. This sampling period


yields1

0.2961
[Go Gh0 ]q (z) = (12)
z 2 − 0.4437z + 0.03688

Which, as expected has no zeros.


1 Use MATLAB command c2dm.

4
13.3.2 To design a minimal prototype controller for ∆=0.5[s], we first obtain1
[Go Gh0 ]q (z). This leads to

Boq (z) −0.1612z + 0.2856


Goq (z) = [Go Gh0 ]q (z) = = 2 (13)
Aoq (z) z − 0.9744z + 0.2231

Note that [Go Gh0 ]q (z) has a NMP zero (located at z = 1.77).
Then, because of the nonminimum-phase zero, only the Aoq (z) part can be
canceled, so, Acl (z) (of order 2n, i.e., 4) will be chosen as:

Acl (z) = z 2 (z 2 − 0.9744z + 0.2231) (14)

And the controller expression will be given by (15) where P̄ (z) and L̄(z) are
of orders 0 (a constant value) and 1, respectively, in order to achieve the required
cancellation.

P (z) Aoq (z)P̄ (z)


Cq (z) = = (15)
L(z) (z − 1)L̄(z)
Then, the Diophantine equation is given by:

Boq (z)P (z) + Aoq (z)L(z) = Acl (z) (16)


Boq (z)P̄ (z) + (z − 1)L̄(z) = (−0.1612z + 0.2856)p0 + (z + l1 )(z − 1) = z 2
(17)

Solving the above equation we obtain

8.041z 2 − 7.835z + 1.794


Cq (z) = (18)
(z − 1)(z + 2.2966)
And the complementary sensitivity is given by

−1.297z + 2.297
Tq (z) = (19)
z2
An interesting feature of this problem is that, due to the NMP constraint,
the minimal prototype coincides with a dead-beat behavior.

Problem 13.4. We have that

Boq (z) 0.01643z + 0.01345


Goq (z) = [Go Gh0 ]q (z) = = 2 (20)
Aoq (z) z − 1.489z + 0.5488

5
13.4.1 To synthesize a deat-beat control we use equations (13.16.30) to (13.16.32),
this leads to

33.47z 2 − 49.83z + 18.37


Cq (z) = (21)
(z − 1)(z + 0.4502)

So, the Toq (z) is given by:

0.5498z + 0.4502
Toq (z) = (22)
z2

Next, a unit step reference is applied at t=0.2[s], the closed-loop response,


y(t), and the plant input, u(t), are shown by solid lines in Figure 5.

1.4

1.2

0.8
y(t)

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5 3

40

30

20
u(t)

10

−10

−20
0 0.5 1 1.5 2 2.5 3
[s]

Figure 5: Step reference response (nominal case–solid line and real case–dashed
line)

13.4.2 We now have that the plant model is


8
G(s) = (23)
(s + 1)(s + 2)(s + 8)

Note that the d.c. gain is the same as in the nominal case.

6
To guage the effect of the unmodeled pole on the above design, we first
compute

0.006381z 2 + 0.01533z + 0.002135


Gq (z) = [GGh0 ]q (z) = (24)
z 3 − 1.691z 2 + 0.8494z − 0.1108
The complementary sensitivity is now

0.2135z 2 + 0.5131z + 0.07145


Tq (z) = (25)
z3− 0.5382z 2 + 0.174z + 0.1623
The closed-loop behavior is simulated under the same conditions and the
results (dashed lines) are shown in Figure 5.
Note, that although the nominal design is robustly stable, the dead-beat
property has been lost. This is due to the fact that the complementary
sensitivity has nonzero poles.

Problem 13.5. We first recall that the minimum time dead-beat behavior de-
veloped in subsection §13.6.3, for stable- and minimum-phase plants, implies
Boq (z) Boq (1)z n − Boq (z)
Toq (z) = Soq (z) = (26)
Boq (1)z n Boq (1)z n
Observe that Soq (z) has a zero at z = 1, the loop will then compensate
completely any (either input or output) disturbance (in steady state).
13.5.1 The (sampled) response, Yq (z), to a input disturbance di (t) is given by
Yq (z) = Soq (z)[Go Di ]q (z) (27)
where [Go Di ]q (z) is the Z-transform of the sampled output of the system
Go (s), when the input is a continuous-time signal di (t).
We then have that, if di (t) = µ(t), then Yq (z) has n poles at the origin (so
far, so good). However it also has the n poles of Goq (z), which generally
will be located elsewhere. Since we assume that the plant is stable, then
y[k] will tend to zero not with dead-beat performance, but with dynamics
determined by the poles of Goq (z).
13.5.2 To achieve dead-beat behavior in the presence of step input disturbances,
we need that Soq (z) have not only a zero at z = 1, but also possess the
property that its zeros should coincide with the poles of Goq (z). Thus, the
controller Cq (z) should not cancel the poles of Goq (z).
To design the required dead-beat controller, we set the Diophantine equa-
tion as
Aoq (z) (z − 1)L̄q (z) +Boq (z)Pq (z) = Acl (z) = z 2n (28)


Lq (z)

7
This leads to
Aoq (z − 1)L̄q (z)
Soq (z) = (29)
z 2n

Also, we have that [Go Di ]q (z) can always be written as

Pd (z)
[Go Di ]q (z) = (30)
(z − 1)Aoq (z)

where Pd (z) is a polynomial in z. Combining the two equations above we


have that

L̄q (z)Pd (z)


Yq (z) = Soq (z)[Go Di ]q (z) = (31)
z 2n

which will go to zero in exactly 2n sampling periods.


It is necessary to choose the sampling period small enough to avoid abnor-
mal pole zero cancellations in Goq (z).
13.5.3 For the given plant we have that n = 2. Thus dead-beat performance can
be achieved in 4 sampling periods. For this case, and choosing ∆ = 0.1
[s], we have that

0.0181z + 0.0164
Goq (z) = (32)
z2 − 1.7064z + 0.7408

The Diophantine equation then becomes

(z 2 − 1.7064z + 0.7408)(z − 1)(z + l0 ) + (0.0181z + 0.0164)(p2z 2 + p1 z + p0 ) = z 4


(33)

When this equation is solved we obtain the controller

105.7513z 2 − 112.5546z + 35.7888


Cq (z) = (34)
(z − 1)(z + 0.7923)

Also, for a unit step input disturbance

0.0006z 2 + 0.0023z + 0.0005


[Go Di ]q (z) = (35)
(z 2 − 1.7064z + 0.7408)(z − 1)

Thee preceding expressions lead to

8
(z + 0.7923)(0.0006z 2 + 0.0023z + 0.0005)
Yq (z) = Soq (z)[Go Di ]q (z) =
z4
(36)

The performance of this design is evaluated using SIMULINK. A unit step


reference r(t) = µ(t − 0.5) and an input disturbance2 di (t) = 10µ(t − 2)
were injected. The results are shown in Figure 6.

2.5

2
y(t)

1.5

0.5

0
0 0.5 1 1.5 2 2.5 3 3.5

150

100

50

0
u(t)

−50

−100

−150

−200
0 0.5 1 1.5 2 2.5 3 3.5
Time [s]

Figure 6: Dead-beat behavior for step references and step input disturbances.

Note the large control effort. This is due to the requirement to achieve dead-
beat behavior after 0.4 [s]. We could have forecast this result from inspection of
the controller numerator, which has very large coefficients.

Problem 13.6.
13.6.1 We recall that the minimum time dead-beat controller for a stable plant
is given by:

Aoq (z)
Cq (z) = (37)
Boq (1)z n − Boq (z)

We next analyze the four proposed plants.


2A unit step disturbance is hardly noticeable at the plant output.

9
a) In this case, we deal with a stable, second order plant (n = 2). We
then compute3 the pulse transfer function
Boq (z) 0.0393z − 0.0344
Goq (z) = = 2 (38)
Aoq (z) z − 1.5967z + 0.6703

From where we have that4 Boq (1) = 0.0736. Thus the controller is
given by

13.5824z 2 − 21.6869z + 9.1045


Cq (z) = (39)
z 2 − 0.5333z − 0.4667

b) In this case, we have a first-order (n = 1) unstable system with


−0.2214
Goq (z) = (40)
z − 1.2214
The dead-beat performance cannot be achieved in n sampling periods,
since that would require an unstable pole zero cancellation. Hence,
we try a second-order complementary sensitivity, i.e.,

a1 z + a0
Toq (z) = (41)
z2
The coefficients a1 and a0 have to be computed to satisfy two re-
quirements: Toq (1) = 1 (to achieve zero steady state errors) and
Toq (1.2214) = 1 (to satisfy the interpolation constraints, recall sub-
section §8.6.3).
Then a1 = 2.2214 and a0 = −1.2214, the controller is then given by

Toq (z) −10.03z + 5.517


Cq (z) = = (42)
Soq (z)Goq (z) z−1

c) We now deal with a stable, second-order (n = 2) NMP system. An


interesting feature of the minimum time dead-beat control is that it
does not cancel the plant zeros. Hence, we can still use the
standard synthesis formulae.
We first have that, for this case
−0.044z + 0.1066
Goq (z) = (43)
z2 − 1.5595z + 0.6065

15.9637z 2 − 24.8961z9.6825
Cq (z) = (44)
z 2 + 0.7022z − 1.7022
3 Use MATLAB command c2dm.
4 Use MATLAB command polyval.

10
d) In this case, we have a second order (n = 2) unstable NMP system:
The issue here is similar to case b), in that we cannot cancel all plant
poles.
For this system
0.0680z − 0.1034
Goq (z) = (45)
z 2 − 1.7755z + 0.7048

Note that the pulse-transfer function has a NMP zero, located at z =


1.5042, and poles located at z = 0.6703 (stable) and at z = 1.1052
(unstable).
We now require, that Toq (z) satisfies
• Toq (z) has only poles at the origin (to achieve dead-beat perfor-
mance)
• Toq (1) = 1 to achieve zero steady state errors
• Toq (1.5042) = 0 to satisfy the NMP zero interpolation constraint.
• Toq (1.1052) = 1 to satisfy the unstable pole interpolation con-
straint.
• The relative degree of Toq (z) must be at least equal to that of
Goq (z), i.e. at least equal to one.
We then choose
a2 z 2 + a1 z + a0
Toq (z) = (46)
z3
where

a2 + a1 + a0 = 1 (47)
2
a2 (1.5042) + a1 (1.5042) + a0 = 0 (48)
2 3
a2 (1.1052) + a1 (1.1052) + a0 = (1.1052) (49)

From where a2 = −13.3083, a1 = 31.3433 and a0 = −17.0350 and


the controller is then given by

Toq (z) −193.5z 2 + 294.4z − 110.4


Cq (z) = = (50)
Soq (z)Goq (z) (z − 1)(z + 15.4135)

Note the choice of three poles at the origin, only one more than the
one required for minimum-time dead-beat control. This seems a sen-
sible choice, since only one unstable pole has to be taken care of.
13.6.2 The above cases suggest that special care has to be taken when dead-
beat control is desired for unstable plants. Starting with z n , for every

11
noncancellable pole (either unstable or too close to the unit circle) we
must add one pole at the origin. We thus write

Aoq (z) = Acoq (z)Anc


oq (z) (51)

where Acoq (z) is a cancellable factor, of degree nac , and Anc


oq (z) is the non-
cancellable factor, of degree n − nac . We then apply the pole assignment
technique with

Acl (z) = Acoq (z)z 2n−nac (52)

Problem 13.7. We first compute the pulse-transfer function, with ∆ = 0.2


[s]. This yields
0.1903
Goq (z) = [Go Gh0 ]q (z) = (53)
z 5 (z− 0.9048)
Note that the multiple pole at the origin is due to the pure time delay.
13.7.1 To achieve the desired speed we choose

0.6 z 6 − 0.4z 5 − 0.6


Toq (z) = ⇐⇒ S oq (z) = (54)
z 5 (z − 0.4) z 5 (z − 0.4)

This choice for Toq (z) has the following features:


• it has unit gain at d.c., to achieve zero steady state errors;
• it has five fast poles (all of them at the origin) and one at z = 0.4,
which will produce a transient of the form (0.4)k , which is faster than
(0.5)k , as specified;
• it has relative degree equal to that of Goq (z). This will lead to a proper
(indeed biproper) controller.
In addition, we need to stress that cancellation of the plant pole at z =
0.9048 will occur with that choice of Toq (z). This implies that this (slow)
pole will appear in the input sensitivity. If this is unacceptable then, an
alternative choice is

0.6(α(z − 1) + 1)
Toq (z) = (55)
z 6 (z − 0.4)

where α is chosen to satisfy the interpolation constraint (see subsection


§8.6.3)

Toq (0.9048) = 1 (56)

12
Note that this Toq (z) still has unit d.c. gain and relative degree equal to
that of Goq (z).
We return to the original choice (54), from where we can compute the
controller as
Toq (z) 0.3153z 5(z − 0.9048)
Cq = = (57)
Soq Goq (z) z 6 − 0.4z 5 − 0.6

13.7.2 We recall (see section §7.4) that when a Smith predictor is used, then
the achieved complementary sensitivity has the form

Ḡo (s)C(s)
To (s) = e−τ s (58)
1 + Ḡo (s)C(s)

for a plant with nominal model Go (s) = e−τ s Ḡo (s).


To design a controller with similar performance to the discrete one, we
first translate the discrete time limiting mode (0.5)k (for ∆ = 0.2 [s]) to
the continuous time limiting mode ept , where p = 5 ln 0.5 = −3.5.
We then choose
3.5 s
To (s) = e−s ⇐⇒ So (s) = (59)
s + 3.5 s + 3.5

This leads to
3.5(s + 0.5)
C(s) = (60)
s

Both designs are compared using a unit step reference. The difference
between the closed-loop outputs is shown in Figure 7.

0.02

0
Output difference

−0.02

−0.04

−0.06

−0.08

−0.1
0 2 4 6 8 10 12 14 16 18 20
Time [s]

Figure 7: Comparison of a digital control loop and a Smith predictor.

Figure 7 shows that the difference in performance is barely noticeable.

13
Problem 13.8. Assume that the digital biproper controller has transfer func-
tion
Uq (z) Pq (z)
= Cq (z) = (61)
Eq (z) Lq (z)
where Pq (z) and Lq (z) are polynomials having the same degree. We can then
build a structure similar to that one built for continuous-time system (see Figure
11.2).
This implies that Cq (z) can be expressed as
cq∞
Cq (z) = (62)
1 + (Cq (z)−1 − c−1
q∞ )cq∞

In the above equation cq∞ = limz→∞ Cq (z). This implies that Cq (z)−1 − c−1
q∞
is a strictly proper transfer function.

Problem 13.9. The structure in Figure 11.6 is defined by the parameters cq∞
and Cq (z)−1 − c−1
q∞ . They are shown for each case in the following table

Cq (z) cq∞ Cq (z)−1 − c−1


q∞

4z − 1 −0.25
4
z − 0.5 4z − 1

z(z − 0.2) −3z + 2.5


1
z 2 − 0.8z + 0.5 z(5z − 1)

(z − 0.4)3 150z 2 − 60z + 0.8


1
z3 (5z − 2)3

z + 1.2 −10
1
z − 0.8 5z + 6

We observe, in the last case, that the transfer function Cq (z)−1 − c−1
q∞ is un-
stable, this will always happen when the controller is NMP. The disadvantage of
this is that, when the controller output saturates, this transfer function remains
in open loop, and its output grows unbounded.

Problem 13.10.
13.10.1 We use the reaction curve and Cohen-Coon settings, to have a first
set of PID parameters, after some iteration, based on the closed-loop step
response, the following PID controller was chosen.
1.16s2 + 1.68s + 0.35
C(s) = (63)
s(0.1s + 1)

14
Note that a fast pole have been added to make the controller proper (biproper).
13.10.2 The controller in delta form is given by

1.16γ 2 + 1.68γ + 0.35


Cδ (γ) = (64)
γ(0.1γ + 1)

This digital controller is transformed to the shift form using the MATLAB
command (included in the CD ROM) del2z for ∆ = 0.1 [s]. The controller
has transfer function

11.61z 2 − 21.54z + 9.96


Cq (z) = (65)
z(z − 1)

With these results, two SIMULINK loops are evaluated: the first one with
the continuous-time PID controller and the second one with the digital
controller (65). A step reference was applied at t = 0 and a step input
disturbance was injected at t = 20 [s]. The outputs of both loops are
indistinguishable, as can be seen in Figure 8. The difference is shown in
Figure 9.

1.4

1.2
Unit step response

0.8

0.6

0.4

0.2

0
0 5 10 15 20 25 30 35 40
Time [s]

Figure 8: Output of a control loop with continuous-time controller.

13.10.3 In a similar way a digital controller in shift form is obtained for ∆ = 1


[s]. However, the resulting loop is unstable. This is not unexpected, since
the digital controller was based on making the substitution Cδ (γ) = C(γ).
This is valid in the frequency region where

ej ω∆ − 1
≈ jω (66)

In this particular case this is not the case for ∆ = 1, due to the location
of the poles and zeros of C(s).

15
−3
x 10
5

Output difference
−5

−10

−15
0 5 10 15 20 25 30 35 40
Time [s]

Figure 9: Difference in the outputs of the continuous and discrete control loop
outputs described.

Problem 13.11.

13.11.1 The Nyquist diagram is computed (with α = 0.4) for Cq (z)Goq (z)/K,
using MATLAB command freqz5 .
The results are shown in Figure 10

200

100
Imaginary

−100

−200
−3 −2 −1 0 1
Real

Figure 10: Nyquist diagram for the discrete-open loop

Since the open loop has no poles outside the unit disk, and the Nyquist
plot does not encircle the (−1, 0) point, then the closed loop is stable for
K = 1 and α = 0.4. Indeed the stability margins are Mg = 2.43 [dB] and
Mp = 40.66◦.
13.11.2 If we fix K = 2, we can study the effect of α using root locus. We first
need to set the problem in the canonical form 1 + λF (s) = 0. We start
5 MATLAB command dnyquist can also be used.

16
from
2(z − α)
1 + Cq (z)[Go Gh0 ]q (z) = 1 + =0 (67)
(z − 1)(z − 0.7)
After some algebra we finally obtain the canonical form

−2
1+α =0 (68)
z 2 − 0.3z + 0.7

The associated root locus is shown in Figure 11. In this case, we can see
that increasing α from zero the locus will leave the unit disk (one of the
branches leaves through (−1, 0) and the other through (1, 0). Using the
MATLAB command rlocfind, the critical points can be located. In this
way it is found that the critical value for α is 0.7 (the right-hand branch),
the other branch leaves the unit disk when α reaches the value 0.99.

1.5

0.5
Imaginary

−0.5

−1

−1.5
−1 0 1 2
Real

Figure 11: Root locus for the discrete-open loop

Problem 13.12. With the specified complementary sensitivity we have that


z−1
Soq (z) = 1 − Toq (z) = (69)
z − po
13.12.1 The control sensitivity is given by
Toq (z) z − 0.9
Suoq (z) = = 10(1 − po ) (70)
Goq (z) z − po

13.12.2 First the controller is computed from


Toq (z) z − 0.9
Cq (z) = = 10(1 − po ) (71)
Soq (z)Goq (z) z−1

17
10

u[k]
4

0
0 2 4 6 8 10 12
Time [∆]

Figure 12: Control output for a unit step reference

The loop is then built, with po = 0.1, so as to simulate the closed loop
response for a unit step response. The results are shown in Figure 12.
Figure 12 verifies that a large control effort is required.
13.12.3 With po = 0.1, we draw the Bode diagrams for the plant and the com-
plementary sensitivity. The results are shown in Figure 13.

10

5 |Toq(e )|
0
Magnitude [dB]

−5

−10
|G (ejω)|
−15 oq

−20

−25

−30

50

0

∠ Toq(e )
Phase [°]

−50

−100

∠ Goq(e )
−150

−200
−2 −1 0
10 10 10
Frequency (normalized)

Figure 13: Bode diagrams of the plant and the complementary sensitivity

From these diagrams, we see that the complementary sensitivity bandwidth


is much larger than the plant model bandwidth. Since the magnitudes
are measured in [dB], the magnitude of the control sensitivity corresponds

18
to the difference between the two magnitude curves. Thus, the control
sensitivty has large magnitude at medium and high frequencies.

Problem 13.13. Lemma 13.2 states (equation (13.8.6)) that, if y[k] is the
unit step response, and zo is a plant zero outside the unit circle, then


y[k] (zo )−k = 0 (72)
k=0

In this problem, the pulse transfer function has a zero at z = zo = α.


−k
13.13.1 If α > 1, then (zo ) > 0 for all k. Thus, equation (72) says that
y[k] must be negative at some time. This means that the plant output will
always undershoot for a unit step reference.
−k −k
13.13.2 If α < −1, then (zo ) = |zo |−k (−1)k . This implies that (zo ) >
0 is alternating positive and negative values. This suggest that the step
response y[k] can satisfy (72) without being negative.

Problem 13.14. This problem can be tackled as a repetitive control problem.


See subsection §13.7.1. We observe that for the given sampling period (∆ = 0.1),
we are dealing with a reference generated by the difference equation

r[k + 10] − r[k] = 0 (73)

This implies that the controller denominator must contain the factor z 10 − 1.
The pulse transfer function of the model is
Boq (z) −0.0141z − 0.0132
Goq (z) = = 2 (74)
Aoq (z) z − 1.846z + 0.8187
The controller is given by
P (z)
Cq (z) = (75)
L(z)
The controller is synthesized using pole assignment. For simplicity, we
choose Acl (z) = z 13 , i.e., we choose all closed-loop poles at the origin. Then

Aoq (z) (z 1 0 − 1)(z − l0 ) +Boq (z)P (z) = z 13 (76)




L(z)

where

P (z) = p11 z 11 + p10 z 10 + p9 z 9 + p8 z 8 + p7 z 7 +


p6 z 6 + p5 z 5 + p4 z 4 + p3 z 3 + p2 z 2 + p1 z + p0 (77)

19
When Diophantine equation (76) is solved the following results are obtained:

p11 = −46.3272 p10 = −54.728 p9 = 120.492 (78)


p8 = −112.8015 p7 = 105.6014 p6 = −98.8609 (79)
p5 = 92.5506 p4 = −86.6431 p3 = 81.1127 (80)
p2 = −146.8573 p1 = 183.8106 p0 = −73.9800 (81)
(82)

and l0 = −1.1928.
A simulation is carried out with this controller, the results are shown in
Figure 14.

5
Ref. and plant output

−1
0 0.5 1 1.5 2 2.5 3
Time [s]

Figure 14: Closed loop with repetitive control.

An alternative approach to solve this problem use the fact that, for this par-
ticular reference, the generating recursive equation is simpler than (73), more
precisely, if we denote by q the forward shift operator, then

(q − 1)(q 2 − 2 cos(0.2π)q + 1)r[k] = 0 (83)

Hence, the controller can be synthesized using pole assignment via

Aoq (z) (z − 1)(z 2 − 2 cos(0.2π)z + 1)L̄q (z) +Boq (z)Pq (z) = Acl (z) (84)


L(z)

Since, in this case, n = 2, the degree of Acl (z) has to be chosen at least equal
to 2n + 2 = 6, say we choose Acl (z) = z 6 .
The simplification with respect to the repetitive control approach is that, in
this particular case, we require only two periodic components to build the refer-
ence signal. Hence the Diophantine equation is simpler.

20
Chapter 14 - Solutions
Problem 14.1. If y(t) is the plant unit step response, then

1 0.25 1 0.75
L [y(t)] = Y (s) = Go (s) = − + (1)
s s s+2 s+4
Thus

 
[Go Gh0 ]q (z) = (1 − z −1 )Z [y(k∆)] = (1 − z −1 )Z 0.25 − e−2k∆ + 0.75e−4k∆
(2)
−x(x − 3)z − (3x − 1)
= 0.25(x − 1) (3)
(xz − 1)(x2 z − 1)

where x = e2∆ .
We see that, provided that x − 3 = 0, the zero, c, is located at

3x − 1 3e2∆ − 1
c= = 2∆ (4)
x(3 − x) e (3 − e2∆ )

Observe that when ∆ is chosen so that x = 3, which means ∆ = 0.5493,


then the system has no zeros. The explanation for this is that since y(t) has
undershoot, the sampling coincides with the zero crossing instant. This implies
that not only y[0] = 0, but also y[1] = 0, i.e. [Go Gh0 ]q (z) has relative degree 2,
and since it has two poles, then it has no zeros.

Problem 14.2. The continuous time transfer function can be computed using
the MATLAB d2cm command. This yields the following results

∆ [s] Go (s)

9.4s2 − 319.5s + 4147.2


0.1
s3 + 16.09s2 + 78.98s + 107.21

1.89s2 − 12.78s + 37.74


0.5
s3 + 3.22s2 + 3.16s + 0.86

0.94s2 − 3.19s + 4.72


1.0
s3 + 1.61s2 + 0.79s + 0.11

1
Problem 14.3. We recall that

Go (jω)
Θ(jω) = (5)
[Go Gh0 ]q (ejω∆ )

We then have

Case ∆ [s] Go (s) [Go Gh0 ]q (z)

1 0.0048z + 0.0047
a) 0.1
(s − 1)(s + 2) z 2 − 1.9239z + 0.9048

e−0.4s 0.0190z + 0.0181


b) 0.2
(s + 0.5)(s + 0.25) z 2 (z 2 − 1.8561z + 0.8607)

1 0.0308z + 0.0306
c) 0.25
s2 + 0.1s + 1 z 2 − 1.9139z + 0.9753

The frequency description for the three cases can be seen in Figure 1. In all
cases a significant peak originated from the sampling zero appears. This peak
suggests that one should avoid cancelling the sampling zeros during closed-loop
control-system design, otherwise the closed-loop response will exhibit undesirable
inter-sample behavior.

Problem 14.4. We first compute the Laplace Transform of the impulse re-
sponse corresponding to the first-order sample and hold device. This turns out
to be

(1 − e−s∆ )2 ∆s + 1
Gh1 (s) = (6)
∆ s2
We next compute the discrete transfer function for the composed system (first
order hold plus plant model), this is given by Gh1q (z) = [Go Gh1 ]q (z) where

 
(z − 1)2 ∆s + 1
Gh1q (z) = Z sampled step response of the system Go (s)
∆z 2 s2
(7)

For our case we obtain1


1 MAPLE V was used to go from the Laplace transform to the continuous time signal, then

to the discrete time signal, and finally to the Z-transform.

2
20

15

10 Θ (jω) Case a) ∆=0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

150

100
Θ (jω) Case b) ∆=0.2

50

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

100

Case c) ∆=0.25
50
Θ (jω)

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized frequency ω/ωs

Figure 1: Frequency response Θ(jω)

0.006363z 2 + 0.005955z − 0.003036


Gh1q (z) = (8)
z(z 2 − 1.856z + 0.8607)

On the other hand, the analogous function, but with a zero order hold is
given by2
0.0048z + 0.0045
Goq (z) = [Go Gh0 ]q (z) = (9)
z2 − 1.856z + 0.8607
We observe that both functions have the same poles (as it should be). How-
ever, the zeros are different. In the zero-order hold case there is one sampling
zero, located at −0.9512, while in the first-order hold case there are two sampling
zeros, located at 0.3663 and at −1.3023. Note that the second of these zeros is
nonminimum phase.
We finally build the two Θ-functions, i.e.,

Go (jω) Go (jω)
Θ(0) (jω) = ; Θ(1) (jω) = (10)
[Go Gh0 ]q (ejω∆ ) [Go Gh1 ]q (ejω∆ )
2 Use MATLAB command c2dm.

3
They are shown in Figure 2. From that figure we observe that the peak in the first
order hold case is one order of magnitude lower than the peak for the traditional
zero order hold case. This is due to the fact that in the second case, the sampling
zero is much closer to the (−1, 0) point than the zeros arising in the first order
hold case.
20

15
(0)
10 Θ (jω)

0
Θ(1)(jω)
−5
0 2 4 6 8 10 12 14
Frequency [rad/s]

Figure 2: Theta functions for the zero- and the first-order holds

The difference observed in the magnitudes of the peaks may suggest that the
control design will be facilitated if one uses a first order hold. However, since
in this case we have a NMP sampling zero, this zero cannot be canceled by the
controller. Hence, zero tracking error can only be achieved after two sampling
periods, which is also the case when the zero-order hold is used and a dead-beat
control is synthesized.
Caution must be exercised when using MATLAB with the first-order hold in
command c2dm because, at least in version 5.3, it appears to yield erroneous
results. SIMULINK however, implements the correct hold.

Problem 14.5. We observe that the system has a NMP zero at s = 4. A NMP
zero also appears in the discrete-time domain, as seen in the pulse function

−0.0396z + 0.0484
Goq (z) = (11)
z 2 − 1.7700z + 0.7788
where the NMP zero is located at z = 1.2235. Note that the system is stable and
there are no sampling zeros.
14.5.1 Since the reference is a periodic signal, we aim for a repetitive controller.
This is designed using pole assignment with cancellation of the plant poles.
We then have that the appropriate Diophantine equation is

(z 2 − 1.7700z + 0.7788)Lq (z) + (−0.0396z + 0.0484)Pq (z) = Acl (z) (12)

4
where

Lq (z) = (z 10 − 1)(z − l0 ) (13)


2
Pq (z) = (z − 1.7700z + 0.7788)P̄q (z) (14)
11 2
Acl (z) = z (z − 1.7700z + 0.778) (15)

This leads to a controller given by Cq (z) = Pq (z)/Lq (z), where

Lq (z) = (z 10 − 1)(z + 0.18982200) (16)

and

Pq (z) = 4.793z 11 − 2.626z 10 + 0.524z 9 + 0.641z 8 + 0.783z 7 + 0.957z 6


+ 1.170z 5 + 1.430z 4 + 1.747z 3 − 23.117z 2 + 11.648z + 3.054 (17)

14.5.2 The above controller is used in a simulation with the triangular refer-
ence. The results are shown in Figure 3. These results indicate perfect
steady-state reference tracking, after an initial transient which lasts ten
samples. We also observe that the inter-sample errors are very small.
This is due to the fact that there is no zero cancellation.
Another interesting feature of this result is observed when we plot together
the plant input and the plant output, as shown in Figure 4. Here we see
that the non-minimum phase behavior of the system is, in some sense,
used by the controller, since when the reference goes up, the controller
goes down and vice-versa.
This is a case where digital control provides a good answer to the design
problem, i.e., when the good is better than the optimum. The optimum
is to achieve zero error at all time. Since the reference is periodic with
frequency ωo , continuous time design and the Internal Model Principle
would require that the sensitivity be zero at an infinite number of values
(s = ±kjωo , k ∈ N). The discrete design instead aims at achieving zero
error only at some instants (in this case, equivalent to 10 frequencies). Of
course, if we increase the sampling period, i.e., we require zero error at a
smaller number of points, then the inter-sample performance deteriorates.

Problem 14.6. Basically each hold device provides a way to build a continuous
time signal from a discrete-time sequence. However, when modeling any hold
device, a unit impulse sampler is a common feature to describe the energizing
of the sequence of numbers.
14.6.1 The transfer function from u[k] to the system sampled output y[k] can
be computed as the Z-transform of the sampled output when the input is
a unit Kronecker delta (with zero initial conditions). Since the proposed

5
1.5

Ref. and plant output


0.5 y(t)

−0.5

−1 r[k]

−1.5
0 0.5 1 1.5
Time [s]

Figure 3: Closed loop with repetitive control; plant output

20

10
Ref. and plant input

−10
10r[k]
−20 u(t)

−30
0 0.5 1 1.5
Time [s]

Figure 4: Closed loop with repetitive control; plant input

generalized sample and hold model includes an impulse sampler, then the
Kronecker delta transforms into a Dirac delta. Thus the sampled plant
output is the sampled response of Go (s)Ghg (s) to a unit Dirac delta. Hence
(14.9.5) holds.
14.6.2 Let us define a pulse, starting at t = to with width α and unit height, as

 
−sto 1 − e−sα
p(t − to ) = (µ(t − to ) − µ(t − to − α) =⇒ L [p(t − to )] = e
s
(18)

Then, the impulse response hhg (t) given in Figure 14.9 can be described
as

m
 

hhg (t) = gi p t − (i − 1) (19)
i=1
m

6
Then, taking the Laplace transform we obtain
m

 ∆

1 − e−s m
−s(i−1) m
Ghg = L [hhg (t)] = gi e (20)
i=1
s

Which coincides with (14.9.6).

Problem 14.7. Consider equations (14.9.7) and (14.9.8). The state at time
t can be computed from

t
x(t) = eA(t−to ) x(to ) + eA(t−τ ) Bu(τ )dτ (21)
to

t−to
= eA(t−to ) x(to ) + eA(t−τ ) Bm(to + τ )dτ (22)
0

Thus, for to = k∆ and t = (k + 1)∆, we have that




x[k + 1] = eA∆ x[k] + eA(∆−τ ) Bm(k∆ + τ )dτ (23)
0

Additionally, we observe that m(t) is piecewise continuous in t ∈ [k∆, (k +


1)∆], more precisely

m(t) = u[k]hhg (t); ∀t ∈ [k∆, (k + 1)∆] (24)

Hence the integral interval in (23) can be split into subintervals, thus

∆ m

 i∆
m
eA(∆−τ )Bm(k∆ + τ )dτ = u[k] eA(∆−τ ) Bdτ (25)
(i−1)∆
0 i=1 m

from where the result (14.9.11)-(14.9.13) follows.


Note that for a nonsingular matrix A, we have that

A∆ A∆
Γi+1 = e− m Γi ; Γ1 = eA∆ A−1 (I − e− m )B (26)

Problem 14.8. The continuous time transfer function Go (s) can be computed
using the MATLAB ss2tf command, leading to
−s + 1
Go (s) = (27)
s2 + 3s + 2
14.8.1 The pulse transfer function, for ∆ = 0.1, is given by (use MATLAB
c2dm command)
−0.0816s + 0.0902
Goq (z) = [Go Gh0 ]q (z) = (28)
s2 − 1.7236s + 0.7408

7
14.8.2 The pulse transfer function has a zero at z = 1.1057 and poles at z =
0.9048 and z = 0.8187.
14.8.3 We observe that the generalized pulse transfer function is given by
m

Ggq (z) = gi G(i)
gq (z); G(i)
gq (z) = Cq (zI − Aq )
−1
Γi (29)
i=1

The above equation says that Ggq (z) has the same poles3 as Goq (z) and
its zeros can be fully or partially manipulated (depending on the value of
m) by choosing convenient values for the coefficients g1 , g2 , . . . , gm .
In our case m = 2, and
 T  T
Γ1 = 0.9512 0.4524 ; and Γ2 = 1 0.5 ; (30)

Thus
−0.0364z + 0.0409 −0.0452z + 0.0493
G(1)
gq (z) = ; G(2)
gq (z) =
z2 − 1.7236z + 0.7408 z2− 1.7236z + 0.7408
(31)

We then have to compute g1 and g2 to satisfy


0.1
Ggq (z) = g1 G(1) (1)
gq (z) + g2 Ggq (z) = (32)
z − 0.81873

Using (31), we finally obtain g1 = 15.1006 and g2 = −14.3641.

Problem 14.9. The apparent advantages in using generalized holds are at least
counterbalanced by the fact that the controller output u in [k∆ (k + 1)∆) is
modulated by the hold function hgh (t). Thus, when the loop is in steady state
for constant references and disturbances, the controller output is a constant, and
the plant input, m(t) is a periodic signal, with period ∆. This input forces a
periodic component, with the same period, at the plant output. The sampling
process does not see this component, because of the stroboscopic effect, and hence
folds this component back into the low frequency region.

Problem 14.10. We can obtain a minimal prototype controller using pole as-
signment for the plant given by (32). We choose a controller which cancels the
plant pole, thus the closed loop polynomial is given by Acl (z) = z(z − 0.8173),
and the controller is

10(z − 0.8173)
Cq (z) = (33)
z − 1)
3 Except for cancellation.

8
This controller yields a complementary sensitivity Toq (z) = 1/z.
We next simulate two control loops, the first one is a pure discrete control
loop which basically implements the above To q(z). The second loop is the hybrid
control loop with the generalized sample and hold mechanism. In both cases a
unit step reference was applied at time t = 0.1 [s]. The results are shown in
Figure 5, where the continuous time plant output, y(t) and the sampled output,
y[k] have been plotted.

−2
y(t), y[k]

−4

−6

−8
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time [s]

Figure 5: Continuous and sampled plant output

We observe from Figure 5 that although there are zero control errors at
sampling instants, the inter-sample signal strongly deviates from the desired
set-point. Another significant feature is that a significant undershoot appears,
i.e. although the generalized hold was designed such that Ggq (z) has no zeros
outside the unit circle, the undershoot is still present in the continuous time
output. To understand that, we consider the plant with transfer function Go (s)
and the plant input m(t). We note that Y (s) = Go (s)M (s) and, since y(t) is
bounded, then its Laplace transform convergence region is defined by s > 0,
hence



Y (1) = Go (1)M (1) = y(t)e−t dt = 0 (34)
0

This equation says that y(t) has to be negative to satisfy the above equa-
tion. The balance has to be achieved initially, since later on the factor e−t will
make any area contribution insignificant.

9
Chapter 18 - Solutions
Problem 18.1. We will solve this problem using a step by step procedure. In
each case the solutions will be built using MATLAB

18.1.1 To determine the feedback gain K, we define K = [k1 k2 ]. Hence using


the controller polynomial F (s) = (s + 5)(s + 6) = s2 + 11s + 30 we have
that
· ¸
s + 3 − k1 −2 − k2
det(sI − Ao + Bo K) = det (1)
k1 s + 1 + k2
= s2 + (4 + k2 − k1 )s + 3 + k1 + 3k2 = (s + 5)(s + 6)
(2)

Equating coefficients on both sides we obtain K = [1.5 8.5]


18.1.2 In this case we require F (s) = (s + 2)2 + 0.25 = s2 + 4s + 4.25. We can
use the results of the previous question to establish that

s2 + (4 + k2 − k1 )s + 3 + k1 + 3k2 = s2 + 4s + 4.25 (3)

This is satisfied by K = [0.3125 0.3125].

18.1.3 For the system to be completely observable the observability matrix Γo


must be a full rank matrix,
· ¸ · ¸
Co −1 α
Γo = = (4)
Co Ao 3 −2 − α

Thus det Γo = 2 − 2α and the matrix Γo is full rank for all α 6= 1.


18.1.4 Say we choose α = 2 and assume the observer gain J is of the form;
J = [j1 j2 ]T . The observer polynomial is chosen as E(s) = (s+8)(s+10),
i.e., the observer error decays at least as fast as e−8t . Then

det(sI − Ao + Jo Co ) = s2 + 18s + 80 (5)

The above equation is satisfied for J = [49 31.5]T .

Problem 18.2. We first observe that


αo 2β1 + sβ2
F (s) = L [f (t)] = + (6)
s s2 + 4
Thus the generating polynomial is Γf (s) = s(s2 + 4).

1
We also observe that

f (0) = αo + β2 (7)
f˙(0) = 2β1 (8)
f¨(0) = −4β2 (9)

i.e., αo , β1 and β2 are linear functions of the initial conditions.

18.2.1 A state space model to generate f (t) can be obtained by using the gen-
erating polynomial to build a differential equation

d3 f (t) df (t)
+4 =0 (10)
dt3 dt

We then assign the following states:

x1 (t) = f (t); x2 (t) = f˙(t); x3 (t) = f¨(t) (11)


Thus, a possible state description is
 
0 1 3
A = 0 0 1 ; B = 0; C = [1 0 0]; D=0 (12)
0 −4 0

18.2.2 A state observer which leads to negligible error after 2 [s] can be built
if we choose the observer poles, for instance, at s = −10, s = −12 and
s = −15. This leads to E(s) = (s + 10)(s + 12)(s + 15) = s3 + 37s2 +
450s + 1800. We can use the MATLAB command place, to design the
observer as follows:

>>J=(place(A’,C’,[-10 -12 -14]))’

Hence the observer gain J is given by J = [36 424 1536]T To generate


estimates for αo , β1 and β2 , we notice that

α = y(t) + 0.25ÿ(t) (13)

y(t) − αo = x1 (t) − αo = β1 sin(2t) + β2 cos(2t) (14)


ẏ(t) = x2 (t) = 2β1 cos(2t) − 2β2 sin(2t) (15)

Multiplying (14) by sin(2t), (15) by cos(2t) and doing a linear combination


of both results we obtain

β1 = (x1 (t) − αo ) sin(2t) + 0.5x2 (t) cos(2t) (16)

2
Similarly, multiplying (14) by cos(2t), (15) by sin(2t) and making a linear
combination of both results we obtain

β2 = (x1 (t) − αo ) cos(2t) − 0.5x2 (t) sin(2t) (17)

We can now build the estimates as

α̂ = x̂1 (t) + 0.25x̂3 (t) (18)


ˆ
β1 = (x̂1 (t) − α̂o ) sin(2t) + 0.5x̂2 (t) cos(2t) (19)
βˆ2 = (x̂1 (t) − α̂o ) cos(2t) − 0.5x̂2 (t) sin(2t) (20)

The observer was simulated and the results are shown in Figure 1, from
where it can be seen that the estimates are unbiased. For this example we
used αo = −1, β1 = 2 and β2 = 3.

20 10 10

15 8 5

0
10 6
αo β1 −5 β2
5 4
−10
0 2 −15

−5 0 −20
0 1 2 0 1 2 0 1 2
Time [s] Time [s] Time [s]

Figure 1: Observer behaviour

Problem 18.3. For the given transfer function, we can build the state space
description using the MATLAB command tf2ss. This leads to (we only need
matrices Aq and Cq )
· ¸
1.4 −0.48 £ ¤
Aq = ; Cq = 1 0.8 (21)
1 0

18.3.1 We set the two observer poles at z = 0. The observer gain matrix J can
then be computed using the following MATLAB command:

>>J=(place(Aq’,Cq’,[0 0]))’

This leads to J = [0.8286 0.7143]T . To achieve zero error in three time


units, we only need to add another pole at the origin in T1 and T2 (see
(18.5.3) and (18.5.4), in the book).

3
Problem 18.4. If we denote by x(t) = K the constant to be determined, and
by y(t) the noisy measurement, we have the following state space model
ẋ(t) = 0 (22)
y(t) = x(t) + v(t) (23)
where v(t) is the measurement noise. Then a suitable state space model is de-
scribed by

A = 0; B = 0; C = 1; D=0 (24)
If the observer gain is J = β, then the observer is given by
β
X̂(s) = (sI − A + JC)−1 JY (s) = (X(s) + V (s)) (25)
s+β
If X(s) = K/s then
K K β
X̂(s) = − + V (s) (26)
s s+β s+β
· ¸
β
x̂(t) = K − Ke−βt + L−1 V (s) (27)
s+β
| {z }
vf (t)

We see that the observed state has two error components: one decays to zero
with time and the other is the filtered noise.
We first consider β = 5. If v(t) = sin(0.5t) then the filtered noise is
5
vf (t) = √ sin(0.5t − arctan 0.1) ≈ 0.997 sin(0.5t − 0.1) (28)
0.25 + 25
This is a significant error. However, if β = 0.1, then the filtered noise is
0.1
vf (t) = √ sin(0.5t − arctan 5) ≈ 0.196 sin(0.5t − 1.37) (29)
0.25 + 0.01
which is a much smaller error. However when β = 0.1, the other error com-
ponent (e−βt ) decays much slower. This suggests the existence of a trade off
between noise immunity and speed.

Problem 18.5. We first build a state space description for the plant and the
disturbance. If the plant state is xp (t) and the disturbance generating model
state is xd (t), then

· ¸ · ¸· ¸ · ¸
ẋp (t) −2 2 xp (t) 1
= + (30)
ẋd (t) 0 0 xd (t) 0
· ¸
£ ¤ xp (t)
y(t) = 1 0 (31)
xd (t)

4
18.5.1 The observer gain J can be computed using the following MATLAB com-
mand:

>>J=(place([-2 2;0 0]’,[1 0]’,roots([1 8 40])) )’

leading to J = [6 20]T .
18.5.2 We can only allocate one closed loop pole, since the disturbance state
is uncontrollable. Say we want to shift the plant pole from s = −2 to
s = −12. This is achieved by choosing k1 = 5. Then the complete feedback
gain vector becomes £ ¤ £ ¤
K = k1 1 = 5 1 (32)

18.5.3 The controller state space model is defined by the 4-tuple (A − JC − BK,
J, K, 0), hence the controller transfer function C(s) = P (s)/L(s) is ob-
tained with

>>[P,L]=ss2tf(A-JC-BK,J,K,0); Cont=tf(P,L);

The complementary sensitivity results from

>>Go=tf(2,[1 2]);To=minreal(Go*Cont/(1+Go*Cont);

This yields
100s + 480
To (s) = (33)
(s + 12)(s2 + 8s + 40)
thus the closed loop polynomial is equal to the complementary sensitivity
denominator (since there is no pole-zero cancellation).

Problem 18.6. We first use the MATLAB command c2dm, to obtain [Go Gh0 ]q (z)
leading to
0.2212
[Go Gh0 ]q (z) = 2 (34)
z (z − 0.7788)
18.6.1 The state space description for the sampled data transfer function can
be obtained using the MATLAB command tf2ss, leading to
   
0.7788 0 0 1 £ ¤
Aq =  1 0 0 ; Bq = 0 ; Cq = 0 0 0.2212 (35)
0 1 0 0

18.6.2 To build the observer we choose to set the observer poles at z = 0.4,
z = 0.5 and z = 0.6. We then use the MATLAB command place to
obtain
£ ¤T
J = 0.0854 0.8062 −3.2604 (36)

5
Problem 18.7. With the given nominal model Go (s) and the given controller
C(s) we can compute the closed loop polynomial (we must include the canceled
factor (s + 1)2 ), that leads to

Acl (s) = (s + 1)2 (s2 + 2.96s + 3.88)(s + 100.04) (37)

The controller has integration, and this suggests that this was forced via modeling
an input disturbance (as in Problem 18.5). Thus the observer polynomial, E(s),
has degree 3, and the state feedback polynomial, F (s), has degree 2 (the state
associated with the disturbance model belongs to the uncontrollable subspace).
We thus make the following associations.

E(s) = (s + 1)2 (s + 100.04) (38)


2
F (s) = s + 2.96s + 3.88 (39)

The state space description is given by


   
−2 −1 1 1 £ ¤
A= 1 0 0 ; B = 0 ; C= 0 2 0 (40)
0 0 0 0
Using the MATLAB command acker1 , we have

£ ¤T
J = 0 50.02 50.02 (41)
£ ¤
Ko = 0.96 2.88 (42)
£ ¤
K = 0.96 2.88 1 (43)

The controller can then be reconstructed using the 4-tuple (A − JC − BK,


J, K, 0)

Problem 18.8. We will use the strategy described in section §18.7 (in the
book), and in particular the state description in equations (18.7.15) to (18.7.18),
from the book. We first build a state space description for the nominal model,
which is given by (use MATLAB command tf2ss)
· ¸ · ¸
−6 −9 1 £ ¤
Ao = ; Bo = ; Co = 0 6 ; Do = 0 (44)
1 0 0
And the composite description is given by (18.7.17)-(18.7.18), from the book,
with Ad = 0, Cd = 1.
18.8.1 We first use an observer to estimate the composite state, the observer
polynomial is chosen as E(s) = (s + 4)(s + 5)(s + 6) (with this choice,
the observer natural modes satisfy the speed requirement). Thus J =
1 The MATLAB command place has some problems dealing with multiple roots.

6
[1.833 1.5 20]T . We next choose the control poles to be located at s = −4
and s = −5, i.e F (s) = (s + 4)(s + 5) (recall that the disturbance state
is uncontrollable) this is achieved with Ko = [3 11], thus the composite
feedback gain is
K = [3 11 1] (45)

Finally the resulting controller is given by the 4-tuple (A − JC − BK,


J, K, 0) and

P (s) 42s2 + 258.66s + 400


C(s) = = (46)
L(s) s(s2 + 18s + 112)

Note that this is a strictly proper transfer function.


18.8.2 An alternative controller synthesis can be carried out using

Acl (s) = E(s)F (s) = (s + 4)2 (s + 5)2 (s + 6) (47)

Using the MATLAB function paq, the same controller (46) is obtained.
If one wants to synthesize a minimum order, biproper controller, we must
specify a fourth order closed loop polynomial

Ãcl (s) = E(s)F (s) = (s + 4)(s + 5)2 (s + 6) (48)

With this choice the controller is

P̃ (s) 28s2 + 182s + 300


C̃(s) = = (49)
L̃(s) 3s(s + 14)

The use of a (full order) observer has led to a strictly proper controller.
On the contrary, the choice of a minimum degree closed loop polynomial
in the pole assignment method leads to a biproper controller.

Problem 18.9.

18.9.1 The state space realization for the nominal model is


· ¸ · ¸
−6 16 1 £ ¤
Ao = ; Bo = ; Co = 1 −8 ; Do = 0 (50)
1 0 0

18.9.2 The observer poles are chosen at s = −3 and s = −4. This leads to

J = [−2 − 0.375]T (51)

7
On the other hand, from the state space model, we have that

y(t) = x1 (t) − 8x2 (t) (52)


ẏ(t) = ẋ1 (t) − 8ẋ2 (t) (53)
= −6x1 (t) + 16x2 (t) + u(t) − 8x1 (t) = −14x1 (t) + 16x2 (t) − 2u(t)
(54)

This leads to
4
f (t) = y(t) − 2ẏ(t) = 29x1 (t) − 40x2 (t) − 2u(t) (55)

Finally an estimate of f (t) will be given by

fˆ(t) = [29 − 40]x̂(t) − 2u(t) (56)

where x̂(t) is the observed state, given by

dx̂(t)
= (Ao − JCo )x̂(t) + Bo u(t) + Jy(t) (57)
dt

You might also like