Lecture Notes On Digital Control
Lecture Notes On Digital Control
1 Introduction 5
1.1 Digital Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Advantages and Disadvantages of Digital Control . . . . . . . . . 6
6 Frequency response 63
6.1 Nyquist plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Introduction
Control Process/
State
Algorithm Signal
Estimation
Design Model
x̂
Control
Algorithm Process/
Adjust. Signal
Analysis
y
Control b
Actuator Process Sensors
Algorithm
u
Physical Block
n
On the other hand, there are some disadvantages, which are to be carefully
considered in the design and implementation phases, which are related to:
1. the technology and its functioning environment:
2. By employing the Laplace transform, the solution of the ODE and the
analysis of the structure of said solution can be handled by simple algebraic
techniques.
3. Linearity of the systems implies that the solution can be additively de-
composed as the sum of two signals: the free response depending only on
the initial conditions and the forced response depending only on the input
signal.
4. The I/O behaviour of the system, i.e. the properties of the function map-
ping a certain input signal to the corresponding forced response can be
analyzed by considering the transfer function (TF) of the system. For the
linear, time-invariant, causal systems with lumped parameters the TF is a
rational function of the complex variable. Such variable is usually denoted
by s.
Chapter 2. Discrete-time Signals and Systems and Z-Transform 10
5. The position of the poles of the TF in the complex plane accounts for
many important properties of the systems including BIBO stability, and
important features of the step response of the system.
The first part of this book is devoted to introducing the tools needed for
deriving a similar approach for discrete-time signals and systems and for sampled
signals.
With this norm `∞ is a Banach space, i.e. all the Cauchy sequences in `∞
converge to an element of `∞ .
and is a Banach space with respect to this norm. An interesting feature which
does not have a counterpart in continuous-time signals is the following strict
inclusion:
`p ( `s , ∀ 1 ≤ p < s ≤ ∞.
If we further impose that the system is causal, i.e. the output at each “time” k
only depends on the input at times l ≤ k, we get the following representation
k−1
X k
X
y(k) = aj (k)y(j) + bl (k)u(l). (2.2)
j=−∞ l=−∞
the output at each “time” k only depends on the last n samples of the output
itself and on the last m + 1 samples of the input (where n and m are natural
numbers and for the input we consider m + 1 samples because the sample at “the
present time” k of the input may be used). In this case, in place of (2.2) we have
the equation
k−1
X Xk
y(k) = aj (k)y(j) + bl (k)u(l). (2.3)
j=k−n l=k−m
Finally, if we impose that the system is time-invariant, i.e. its behaviour does
not change in time, then the coefficients aj (k) only depend on the difference k − j
and the coefficients bl (k) only depend on the difference k − l, so that
k−1
X k
X
y(k) = ak−j y(j) + bk−l u(l)
j=k−n l=k−m
Xn Xm
= aj y(k − j) + bl u(k − l). (2.4)
j=1 l=0
We will develop the I/O analysis for systems of the form (2.4). These systems
are obtained by discretizing continuous-time equations modeling, for example,
classical mechanical or electrical systems. We shall see, however, that there are
discrete-time systems described by (2.4) that cannot be obtained by discretizing
a continuous-time linear system of dynamical equations.
d2 d
a2 2
y(t) + a1 y(t) = b0 u(t). (2.5)
dt dt
We now describe how this equation can be “discretized”, i.e. approximated by a
discrete-time system. To this aim we sample the continuous-time signals u(·), y(·)
and derive a difference equation that is approximately satisfied by the sampled
signals: the key point being that when the sampling time tends to 0 also the
approximation error tends to zero.
Let T be the sampling time and assume that u(·), and y(·) are sufficiently
smooth signals (more precisely u(·), y(·) are of class al least C n , n being the
order of the ODE so that, in this case, n = 2). Then, for T sufficiently small, we
d
can approximate arbitrarily well the differential operator dt with the difference
∆
quotient T , where the discrete difference operator ∆ acts on a function f (t) as
follows:
∆f (t) = f (t) − f (t − T ). (2.6)
ỹ(k) − ỹ(k − 1)
d ∆
y(t) ' y(t) = (2.8)
dt | T | T
2 t=kT 2 t=kT
d ∆ ỹ(k) − 2ỹ(k − 1) + ỹ(k − 2)
y(t) ' y(t) = . (2.9)
dt2 |t=kT T2 |t=kT T2
where
a2 a1 2a2 a1 a2
ã0 :=
2
+ , ã1 := − 2 − , ã2 := 2 .
T T T T T
Notice, in passing, that the coefficients of the discrete-time system obtained
by discretizing a continuous-time one, depend on the sample time T which has
therefore a relevant impact on numerical properties of the discrete-time system. ♦
2.4 Z-Transform
The Z-Transform may be viewed as the discrete-time counterpart of the Laplace
Transform. It is a linear operator mapping sequences in Z+ to functions of the
complex variable z ∈ C.
Example 2.2. Let f (k) be the discrete impulse also known as Kronecker delta:
(
1 k=0
f (k) = δ(k) = (2.12)
0 otherwise
Z[δ] = 1 (2.13)
2
There also exists the bilateral Z-Transform defined by
+∞
X
Z[f ] = F (z) := f (k)z −k .
k=−∞
We will only use the unilateral Z-Transform as we mainly consider causal signals.
Chapter 2. Discrete-time Signals and Systems and Z-Transform 14
1. Remind that lim sup or superior limit of a sequence g(k) is always well
defined (also when the sequence does not admit limit) and is given by the
following procedure: given g(k), define the new sequence
Then
lim sup g(k) := lim l(k).
k→∞ k→∞
3. Formulas (2.14) and (2.15) hinge on the root test. An alternative formula,
based on the ratio test, is the following:
f (k + 1)
%0 = lim . (2.16)
k→+∞ f (k)
Also this formula is usually much easier to compute than (2.14) but holds
if and only if the limit in its right-hand side exists.
P∞ −k
4. Theorem 2.1 discusses the convergence of the series k=0 f (k)z only
for |z| > %0 and for |z| < %0 . Indeed, there are no general results on
the convergence of the series on the circle of radius %0 : depending on the
specific sequence and on the specific z such that |z| = %0 the series can be
convergent or non-convergent.
{z ∈ C : |z| > %0 }.
=(z)
%0
0 <(z)
• Let f (k) be the discrete unit step (also known as Heaviside function)
(
1 k≥0
f (k) = δ−1 (k) := (2.17)
0 k<0
Chapter 2. Discrete-time Signals and Systems and Z-Transform 16
Challenge 2.1. Provide a sequence f (k) for which the radius of converge of the
corresponding Z-Transform cannot be computed with the simplified formulas
(2.15) and (2.16) so that formula (2.14) must be employed. In particular, prove
that for such f (k) the limits in (2.15) and (2.16) do not exist and compute the
limit in (2.14).
%0 ≤ max{%1 , %2 }. (2.24)
z sin ϑ
Z[g] = . (2.26)
z2 − 2 cos ϑz + 1
+∞
X
Z[g] = f (k + a)z −k
k=0
+∞
X
=z a
f (k + a)z −(k+a)
k=0
a−1
X
a
= z F (z) − f (j)z a−j . (2.27)
j=0
| {z }
Σa
−3 −2 −1 0 1 2 3 4 5 6 7 k
−3 −2 −1 0 1 2 3 4 5 6 7 k
In view of (2.27), and (2.28), we may think that the action of the
operator q corresponds, in the Z-Transform domain, to multiplication
by z and, similarly, that the action of the operator q −1 corresponds,
in the Z-Transform domain, to multiplication by z −1 . This is wrong
and would lead to gross errors. In fact, we are considering the unilat-
eral Z-Transform which is defined for signals whose domain is Z+ , or,
Chapter 2. Discrete-time Signals and Systems and Z-Transform 19
equivalently, only accounts for the causal part of signals whose domain
is the whole Z.
For example, we easily see that the Z-Transform F (z) of discrete-
time signal f (k), does not contain any information about the term
f (−1). On the other hand, g(k) defined by g(k) := q −1 f (k) is such that
g(0) = f (−1) so that its Z-Transform (that contains the information
on g(0)) cannot be obtained from F (z) unless, as observed before, we
know that f is causal so that g(0) = f (−1) = 0. Otherwise we need
to include the term Σr defined in (2.28).
In conclusion, when computing the Z-Transform of translated signals
we need to take great care over the sample entering or exiting the
domain Z+ of the transform. For this reason, in formulas (2.27) and
(2.28) appear the terms Σa and Σr , respectively.
An interesting special case is the one in which g(k) is zero also for all k ≥ N
(see Figure 2.3). In this case f (k) is clearly periodic of period N .
The Z-Transform of the periodic repetition can be easily obtained by using
linearity:
∞
X 1 zN
F (z) := Z[f (k)] = z −iN G(z) = G(z) = G(z). (2.32)
i=0
1 − z −N z N −1
| {z }
=:ΘN (z)
This formula shows that the action of the operator of periodic repetition
corresponds, in the transform domain, to multiplication by ΘN (z).
g(k)
3 4
−3 −2 −1 0 1 2 5 6 7 k
Figure 2.3: Signal g(k) vanishing for k < 0 and for k ≥ N = 5. The corresponding
periodic repetition of period N = 5, gives a causal signal f (k) that equals g(k)
for 0 ≤ k ≤ N − 1 = 4 and for which these 5 samples are repeated periodically
for k ≥ 5.
Chapter 2. Discrete-time Signals and Systems and Z-Transform 20
This signal can be seen as the periodic repetition of the discrete impulse
(2.12) with period N = 2. Therefore, from (2.32) we get
"∞ #
X z2
F (z) := Z[f (k)] = Z δ(k − i2) = 2 .
i=0
z −1
♦
f (k) 1
−3 −2 −1 0 1 2 3 4 5 6 7 k
5. Scaling in the z-domain C: Given the signal f (k), let F (z) = Z[f (k)]
and %0 be the corresponding radius of convergence. Then
∞
Z
X
k −k z
k
p f (k) −
→ f (k)p z = F , r.c. %00 = |p|%0 . (2.33)
k=0
p
6. Discrete integration: Given the signal f (k), let F (z) = Z[f (k)]. The
discrete integral of f (k) is defined as
k
X
g(k) := f (l).
l=0
Chapter 2. Discrete-time Signals and Systems and Z-Transform 21
7. Discrete derivative: Given the signal f (k), let F (z) = Z[f (k)]. Let ∆
be the discrete derivative operator defined in (2.6) and g(k) := ∆f (k) =
f (k) − f (k − 1). By using (2.28) we get
signal. For the n-th order discrete derivative ∆n , the sum S(z) depends on
the n samples f (−`), for ` = 1, . . . , n. This corresponds to the formula
for the Laplace transform of the derivative of order n of a continuous-time
signal where n initial conditions are required (i.e. the limits for t → 0− of
the signal and of its first n − 1 derivatives). In the discrete-time, the idea
is similar but to specify the first difference in k = 0 we need the sample
f (−1), to specify the second difference in k = 0 we need the two samples
f (−1) and f (−2), and so on. In general, to specify the n-th difference in
k = 0 we need the n samples f (−`), for ` = 1, . . . , n.
∞
d X
F (z) = (−k)f (k)z −k−1 = −z −1 Z[kf (k)]. (2.39)
dz k=1
As a consequence, we have:
d
Z[kf (k)] = −z F (z). (2.40)
dz
d z
Z[f (k)] = Z[k · k] = −z
dz (z − 1)2
1 2z
= −z −
(z − 1)2 (z − 1)3
z(z + 1)
= . (2.41)
(z − 1)3
k
• Let f (k) = . This notation has to be understood as f (k) :=
2
k!
2!(k−2)!
for k ≥ 2 and f (k) := 0 for k < 2 so, in particular f (k) is
6
We recall that a function of the complex variable z is analytic in an open set if in this set
it can be locally represented as the sum of a convergent power series. We recall also that F (z)
is analytic in an open set if and only if it is differentiable (as a function of the complex variable
z) in this set and, in this case, F (z) is differentiable infinitely many times in the same set.
Chapter 2. Discrete-time Signals and Systems and Z-Transform 23
causal. We have
2
k(k − 1)
k k
Z[f (k)] = Z =Z −
2 2 2
z(z − 1)
1 z(z + 1)
= −
2 (z − 1)3 (z − 1)2 (z − 1)
z
= . (2.42)
(z − 1)3
k
• Let f (k) = . Similarly to the previous example, this notation has
l
k!
to be understood as f (k) := l!(k−l)! for k ≥ l and f (k) := 0 for k < l.
We have
z
Z[f (k)] = . (2.43)
(z − 1)l+1
Proof. The proof of (2.43) will be carried over by induction on l.
k
Base case: for l = 0, 1 relation (2.43) holds as Z = Z[δ−1 (k)] =
0
z k z
z−1
and Z = Z[k] = (z−1) 2 (see formulas (2.17) and (2.36)).
1
Induction step: assume that (2.43) holds for l − 1. We can write
k k−1
k k!
Z =Z =Z ,
l l!(k − l)! l l−1
and by using the discrete derivative formula (2.40) and the translation
formula (2.28),7 we get
k k−1
z d −1 z z
Z =− z = .
l l−1 l dz (z − 1)l (z − 1)l+1
k k−l
• Let f (k) = p ; in view of (2.43) and of (2.33), we get the im-
l
portant expression
1 z/p z
Z[f (k)] = l l+1
= . (2.44)
p (z/p − 1) (z − p)l+1
♦
10. Final Value Theorem: Consider a signal f (k), and let F (z) = Z[f (k)]
be its Z-Transform. If limk→∞ f (k) exists and is finite, then
Example 2.10. Next we show how the Final Value Theorem can be used
and that if the assumptions of theorem do not hold, formula (2.47) provides
a wrong result!
• Let f (k) := 0.9k +1. Since limz→∞ f (k) = 1, we can use formula (2.47)
that gives
z−1
z z
lim + = 1.
z→1 z z − 0.9 z − 1
• Let f (k) := sin(ϑk) with ϑ 6= hπ, h ∈ Z+ . The limit limz→∞ f (k) does
not exist, and formula (2.47) (which cannot be used) wrongly gives
• Let f (k) := k2k . In this case the limit limz→∞ f (k) exists but is +∞
(and so is not finite). Again and formula (2.47) (which cannot be used)
wrongly gives
z−1
d z 2
lim (−z) = lim(z − 1) = 0.
z→1 z dz z − 2 z→1 (z − 2)2
♦
Chapter 2. Discrete-time Signals and Systems and Z-Transform 25
11. Convolution: Let f (k), g(k) be two causal signals and F (z), G(z) be the
corresponding Z-Transforms. We define the discrete convolution of f (k)
and g(k) as
+∞
X
h(k) := f (k) ⊗ g(k) := f (l)g(k − l). (2.48)
l=−∞
that if f1 (k) and f2 (k) are two causal sequences having the same Z-Transform
F (z), then f1 (k) ≡ f2 (k). Since the Z-Transform is a linear map, we may simplify
the proof by observing that the Z-Transform of d(k) := f1 (k)−f2 (k) is D(z) ≡ 0.
Therefore it is sufficient to show that if the transfer function of a causal signal
d(k) is D(z) ≡ 0 then d(k) ≡ 0. To this end, we fist observe that, by causality,
d(k) = 0 for all k < 0. Moreover, by using (2.45), we get:
Hence,
∞
X ∞
X ∞
X
−k −1 −k+1 −1
0 ≡ D(z) = d(k)z =z d(k)z =z d(h + 1)z −h . (2.51)
k=1 k=1 h=0
or, equivalently, 0 ≡ D1 (z) is the Z-Transform of d1 (k). We can now use again
(2.45), to obtain 0 = d1 (0) := d(1). By iterating this argument, we obtain
d(2) = 0, d(3) = 0, and so on, so inductively d(k) = 0 for all k which concludes
the proof.
We remark that the previous argument can be adapted to find the first l
samples (l being an arbitrary integer) of the inverse Z-Transform.
Surjectivity: this is a delicate issue because to proof surjectivity, we must
specify the co-domain of the Z-Transform understood as a linear map. We have
already seen that if F (z) is a Z-Transform then it is an analytic function in the
open set {z ∈ C : |z| > %0 } so this set can be naturally assumed as the co-domain
of the Z-Transform. We have the following result.
Theorem 2.2. Any function of the complex variable that is analytic in a region
of the form {z ∈ C : |z| > %0 }, with %0 ≥ 0, is the Z-Transform of a causal
sequence.
As a consequence of the previous theorem and of injectivity, we have that
Z-Transform can be inverted and for any function F (z) that is analytic outside
a circle there exists a unique causal f (k) such that F (z) = Z[f (k)]. We are left
with the task of computing such an f (k).
Integral method: This method is very general and has great conceptual
importance but is seldom practically viable. The first sample is computed as
before:
f (0) = lim F (z). (2.54)
|z|→+∞
N (z)
F1 (z) = QN , (2.58)
ni
i=0 (z − pi )
Chapter 2. Discrete-time Signals and Systems and Z-Transform 28
Z −1 Ai,l k k
Fpi ,l (z) = Ai,l (z−pzi )l+1 −−→ pli l
pi , (2.65)
Z −1
F0,l (z) = A0,l z −l −−→ A0,l δ(k − l). (2.66)
By taking into account that the inverse Z-Transform is linear, from (2.65), (2.66)
and (2.64), it follows:
N n i −1 n0
X X Ai,l k k X
f (k) = l
p i + A0,l δ(k − l), k ≥ 0. (2.67)
i=0 l=0
p i l l=0
Remark 2.8. Notice that the relative degree r of F (z) has an important in-
terpretation. In fact, we easily see that exactly the first r samples of f (k), i.e.,
f (0), f (1), . . . , f (r − 1) are zero. In other words f (r) is the first non-zero sample
of f (k). Thus, r can be viewed as the “inner delay” of f (k). This fact may be
used as a convenient “sanity check” after computing the inverse Z-Transform.
Remark 2.9. Notice that if F (z) is, as it will always be in our setting, a real
rational function (i.e. the coefficients of the numerator and denominator of F are
real) then for any complex pole p = %ejϑ of F (z), its complex conjugate p∗ = %e−jϑ
is also a pole of F (z) and p and p∗ have the same multiplicity. Moreover, in the
Al A0l
partial fraction expansion (2.59) the terms (z−p) l+1 and (z−p∗ )l+1 have complex
conjugate coefficients, i.e. A0l = A∗l . Therefore, the inverse Z-Transforms of the
Al A∗l
two complex conjugate terms (z−p) l+1 and (z−p∗ )l+1 sum to a real signal. We can
compute explicitly this signal. In fact, by denoting by < e = the real and the
imaginary part, we easily get:
A0l
−1 Al
Z + (2.68)
(z − p)l+1 (z − p∗ )l+1
Al k k A∗l k ∗k
k−l k
+ Āl e−j(k−l)ϑ
j(k−l)ϑ
= l p + ∗l p =% Al e
p l p l l
1 k k
% 2<(Al e−jlϑ ) cos(ϑk) − 2=(Al e−jlϑ ) sin(ϑk) .
= l (2.69)
% l
Az A∗ z
In particular, if p is a simple pole (np = 1), the two terms z−p
and z−p∗
sum
to
Az A∗ z z(α(z − % cos ϑ) − β% cos ϑ)
+ ∗
= , (2.70)
z−p z−p z 2 − 2zp cos ϑ + p2
with
2A = α + jβ = M ejϕ . (2.71)
Therefore, we have
A∗ z
−1 Az
Z + = M %k cos(kϑ + ϕ). (2.72)
z − p z − p∗
3z 4 + 8z 3 + 7z 2 − 26z + 26
F (z) = .
z(z − 1)(z + 2)2 (z 2 − 2z + 2)
We immediately see that the relative degree of F (z) is r = 2 and that F (z) has
a pole at 0. Since this pole corresponds to a one-step delay, we can simplify the
Chapter 2. Discrete-time Signals and Systems and Z-Transform 30
Thus
z z z z z
F0 (z) = zF1 (z) = A + B + C1 + C2 +D + D∗
z−1 z+2 (z + 2) 2 z−p z − p∗
so that
We know that f0 is a real-valued signal but the previous representation does not
highlight this fact. Hence, we regroup the two complex conjugate terms Dpk and
D∗ (p∗ )k as: Dpk + D∗ (p∗ )k = 2<[Dpk ]. By writing D as D = α + jβ and p as
p = ρ exp(jθ), we get:
Notice that this expression holds only for k ≥ 0. Notice also that the relative
degree of F0 is equal to 1 so that we must have f0 (0) = 0: by plugging k = 0 in
(2.73), we easily get f0 (0) = − 13
4
+ 2 + 45 = 0 that is a reassuring sanity check.
Eventually, we obtain f (k) as f0 (k − 1):
13 5 3
f (k) = f0 (k − 1) = − δ(k − 1) + 2δ−1 (k − 1) + (−2)k−1 + (k − 1)(−2)k−2
4√ 4 2
k−1
+ 2( 2) sin((k − 1)π/4), k > 0.
Clearly, for k = 0 (and for k < 0) we have f (k) = 0. Indeed, the expression
(2.73) of f0 (k) only holds for k ≥ 0.
Chapter 2. Discrete-time Signals and Systems and Z-Transform 32
Chapter 3
clock
f (t) T
ց fh (t)
sampling
box signal having height 1/h and support [−h/2, h/2] with h < T . In this way
fh (t) can be understand as signal that is equal to the input scaled by the factor
1/h in each of the intervals [kT − h2 , kT + h2 ], k ∈ Z, and is zero outside these
R kT + T
intervals. Therefore, for all k ∈ Z, kT − T2 fh (t)dt is equal to the average value of
2
f (t) on the interval [kT − h2 , kT + h2 ]. This value converges to f (kT ) as h → 0.
The latter case can be viewed as the modulation of the input signal with a Dirac
comb carrier signal i.e. a train of pulses of the form:
+∞
X
ϕ(t) = δ(t − kT ).
k=−∞
Remark 3.1. Notice that technically the Dirac “delta function” is not a function
but a distribution defined by the following integral action on the test functions f
(i.e. infinitely differentiable functions having compact support):
Z +∞
δ(t − τ )f (τ )dτ = f (t).
−∞
Remark 3.2. It is now clear that the continuous-time signal fδ (t) and the
discrete-time signal f˜(k) = f (kT ) contain exactly the same information: we can
obtain one from the other by using (3.2) or (3.3). Therefore fδ is an intuitive and
mathematically consistent way of representing the information of a discrete-time
signal by using a continuous-time one.
We will also see that fδ provide a powerful tool to connect the Z-transform
and the Laplace transform.
Chapter 3. Notions of Sampling Theory 35
L
f (t) F (s)
⊗ϕ(t) ??
L
fδ (t) Fδ (s)
≈ z = eT s
Z
f˜(k) F̃ (z)
where Z T /2 Z T /2
1 −jkΩt 1 1
ak = ϕ(t)e dt = δ(t)e−jkΩt dt = .
T −T /2 T −T /2 T
Notice that ak is independent of k. By plugging these values in (3.7), we get
+∞
1 X jkΩt
ϕ(t) = e . (3.8)
T k=−∞
We can now compute the Laplace transform in both sides of (3.9). We get:
+∞
1 X
Fδ (s) := L[fδ (t)] = F (s − jkΩ). (3.10)
T k=−∞
|F (jω)|
−ωB ωB Ω
0 2 Ω f
Figure 3.2: The solid line represents |F (jω)| for a band-limited signal (with band
ωB smaller than Ω2 ). The dashed line represents |F (jω)| for a signal with unlimited
band: we see that in this case the multiple copies of the signal generated by the
sampling (corresponding to periodic repetition in the frequency domain) interfere
with one another so that the original signal F (jω) can no longer be recovered
from the periodic repetition.
Chapter 3. Notions of Sampling Theory 37
where T is the sampling time. Thus, not only both F (s) and F̃ (z) are rational
functions but the pole eaT of F̃ (z) is obtained by mapping the pole a of F (s) via
the map z = esT .
This is a particular case of a more general result: if f (t) = qn (t)eat , t ≥ 0,
Qn (s)
with qn (t) being a polynomial in t of degree equal to n, then F (s) = (s−a) n+1
=(s)
Ω
2
5 2 6
7
3 1 4 <(s)
− Ω2
=(z)
6 2 5 3 1 4 <(z)
Figure 3.3: Correspondence between some points on the primary stripe and their
images according to the map esT .
To analyze the map z = esT , let us consider s = σ +jω. First of all we observe
that e(s+j2lπ/T )T = esT ej2lπ = esT for all l ∈ Z. In other words the map z = esT
is periodic of period Ω := 2π/T along any vertical axis of the complex plane.
Therefore, to study the map z = esT we can restrict attention to the primary
stripe
Ω Ω
S := s : s = σ + jω, − < ω ≤ .
2 2
Chapter 3. Notions of Sampling Theory 39
It easy to see that, once restricted to S, the map z = esT is injective, i.e. if
s1 , s2 ∈ S and s1 6= s2 then es1 T 6= es2 T . Moreover the image of the map is the
whole complex plane except for the origin, i.e. for all z̄ ∈ C \ {0} there exists
s̄ ∈ S such that z̄ = es̄T . The origin z̄ = 0 can be achieved as the image of the
map only at the limit for s tending to −∞. More precisely, we have
lim esT = 0.
<(s)→−∞
It is easy to check that the intersection of S with the left half complex plane
is mapped to the open unit disk, the intersection of S with the imaginary axis
is mapped to the unit circle S1 , and the intersection of S with the right half
complex plane is mapped to the open region outside unit circle as depicted in
Figure 3.3.
Vout (s) −1 −1
= 2
= 2 , (3.12)
Vin (s) sR C1 C2 + 3RC1 s + 1 s
ωn
+ 2 ωsξn +1
Chapter 3. Notions of Sampling Theory 40
C1
R R
+
vin C2 −
−
+ +
vout
−
To give an idea of the effect of the A.A. filter consider the closed-loop system
in Figure 3.5 and assume for the moment that there is no A.A. filter (i.e. that
A(s) = 1). Assume that the gain crossover frequency is ωc (i.e. |P (jωc )| = 1) and
the phase margin of the system is mϕ and that these values satisfy the design
specs. Now let us introduce the A.A. filter in the loop, i.e. A(s) is no longer
equal to 1 but is given by
ωn2
A(s) = (3.13)
s2 + 2ξωn s + ωn2
which is the transfer function of the circuit in Figure 3.4 except for the sign that
can be changed simply by inverting the output polarity in the circuit.
+ e
r̃ P (s) b y
−
A(s)
In order for the A.A. filter to provide a good attenuation at the Nyquist
frequency Ω/2 without perturbing too much the phase margin, we must design
the sampling frequency and tune the parameters of the A.A. filter in such a way
that
ωc ωn Ω/2.
Chapter 3. Notions of Sampling Theory 41
Under this condition, the gain crossover frequency ωc remains essentially unaf-
fected by the presence of the A.A. filter and we can easily estimate the phase
delay −ϕ introduced by the A.A. filter at this frequency which accounts for how
the phase margin is affected by the filter. In fact, we have
2ξωn ωc
ϕ = arg[A(jωc )] = − arctan , (3.14)
ωn2 − ωc2
and since we are assuming ωc ωn , ϕ this can be approximated as
ξωc
ϕ ' −2 . (3.15)
ωn
Let 2
1 Ω Ωξ
a := = 1− +j . (3.16)
A j Ω2 2ωn ωn
This parameter accounts for the attenuation of the filter at the Nyquist frequency
and therefore it must be at lest equal to a minimum value set by the specs in
order to effectively deal with the aliasing effect.
Since we are assuming Ω 2ωn we have the following approximation:
2
Ω
a' . (3.17)
2ωn
Ω
Then ωn ' √
2 a
,which, plugged into (3.15) yields:
ω √
c
ϕ ' −4ξ a . (3.18)
Ω
The latter provides a first approximation of the phase margin loss introduced by
the A.A. filter. This value can be used in the design of the controller.
Example 3.3. Consider the following specs: a = 10, |ϕ| < 0.1, ξ = √1 and
2
ωc = 10 rad/s. Compute the minimum sampling (angular) frequency Ω.
By using (3.18) we easily get
√
4 5
|ϕ| < 0.1 ⇒ Ω > 10 ' 900 rad/s
0.1
♦
3 0
Q
0 1 2 t 0 1 2 3 t
1-bit Quantizer
Analysis of Discrete-Time
Systems
Y (z) := Z[y(k)]
N
! N
! N r
X X X X
= ai z −i Y (z) + bl z −l U (z) + ar y(−k)z −r+k
| i=1
{z } | l=0
{z } |r=1 k=1
{z }
Ã(z) B̃(z) C(z)
B(z) C(z)
Y (z) = U (z) + = H(z)U (z) +Yl (z) = Yf (z) + Yl (z) (4.3)
A(z) A(z) | {z }
| {z } | {z } Yf (z)
H(z) Yl (z)
where
h(k) = Z −1 [H(z)], (4.5)
is the so-called impulse response of the system (the reason is obvious as when
u(k) = δ(k) is the discrete impulse, U (z) = 1, so that Yf (z) = H(z) and, finally
yf (k) = h(k)).
The transfer function H(z) is rational and proper so that its inverse transform
h(k) can be obtained by the procedure described in §2.6.2. Next, we recall the
main steps of this procedure: we first compute the partial fraction decomposition
of H(z)
z
:
N n −1
i 0 n
H(z) X X 1 X A0,l
= Ai,l l+1
+
z i=0 l=0
(z − pi ) l=0
z l+1
Then we have
N n i −1 n0
X X z X
H(z) = Ai,l l+1
+ A0,l z −l
i=0 l=0
(z − pi ) l=0
1. The expression in (4.6) shows that the impulse response of the system can
be additively decomposed as the sum of an impulse and a linear combination
k k
of discrete functions of the form l pi and δ(k−l), where pi are the non-zero
poles of the system’s transfer function. The modes δ(k − l) are associated
Chapter 4. Analysis of Discrete-Time Systems 45
with the poles of H(z) at the origin and are non zero only at the discrete
time instant l: for this reason they are called the modes of the Finite
Impulse Response (FIR) part
of the transfer function H(z). On the contrary,
the modes of the form kl pki are associated with the non-zero poles pi of
H(z) and are non-zero for all k ≥ l: for this reason they are called the
modes of the Infinite Impulse Response (IIR) part of the transfer function
H(z).
The position of the poles in the complex plane are associated with the
asymptotic character of the corresponding modes as follows:
• if |pi | < 1 ⇒ the corresponding modes are convergent (i.e. they decay
to zero as k diverges);
• if |pi | > 1 ⇒ the corresponding modes are divergent (i.e. they explode
as k diverges);
• if |pi | = 1 and k > 1 ⇒ the corresponding modes are divergent;
• if |pi | = 1 and k = 1 ⇒ the corresponding modes are bounded but not
convergent (i.e. as k diverges, they remain bounded but they do not
converge to zero).
2. If the transfer function H(z) has only the pole p = 0 and n0 is the pole
multiplicity then it has the form
N (z)
H(z) =
z n0
with N (z) being a polynomial of degree at most n0 . In this case, H(z) can
be rewritten as
n0
X Al
H(z) =
l=0
zl
with An0 6= 0. The impulse response is therefore
n0
X
h(k) = Al δ(k − l). (4.7)
l=0
The sum in (4.7) is finite so that h(k) is identically zero after n0 steps. In
this case the system is purely FIR. Notice that this is a situation that has
no analogous in continuos time.
3. The transfer function H(z) is rational and proper; in fact, it can be written
as the ratio H(z) = B(z)
A(z)
, with deg[A(z)] ≥ deg[B(z)]. The relative degree
r := deg[A(z)] − deg[B(z)] of H(z) has a very important meaning. Indeed
let us consider an input u(k) and let U (z) be its Z-Transform. Since U (z)
is analytic outside the radius of convergence we have that lim|z|→∞ U (z)
exists and is finite and it is zero if and only if u(0) = 0. Therefore, by using
Chapter 4. Analysis of Discrete-Time Systems 46
the argument in (2.53) we immediately see that the forced response yf (k)
of the system to the input u(k) is such that
yf (0) = yf (1) = · · · = yf (r − 1) = 0;
moreover, yf (r) 6= 0 if and only if u(0) 6= 0. Then r has the meaning of the
intrinsic delay of the system. We recall that in continuous-time a delay is
only produced by a non-rational transfer function.
Definition 4.2 (BIBO Stability). An LTI system (Σ) is said to be BIBO (Bounded
Input Bounded Output) stable if for any (causal) bounded input signal u(t), the
corresponding forced response yf is bounded, i.e.
∀u ∈ `∞ ∞
+ , yf (k) = h(k) ⊗ u(k) ∈ `+ . (4.10)
• (Σ) asymptotically stable =⇒ (Σ) BIBO stable: in fact, the poles of H(z)
are necessarily a subset of the zeros of A(z).
• If the common zeros of A(z) and B(z), if any, have all magnitude less than
1 then: (Σ) asymptotically stable ⇐⇒ (Σ) BIBO stable.
strictly inside the unit disk and the system is BIBO-stable if and only if all the ze-
ros of the denominator of a coprime representation of the transfer function H(z)
are strictly inside the unit disk. Therefore the only difference with respect to
the continuous-time case is that the region of the complex plane where the zeros
must be is the open unit disk instead of the left half-plane. To check stability of
a discrete-time system it would then be useful to have a discrete-time countepart
of the Routh-Hurwitz test, i.e. a test that, given the coefficients of a polynomial,
checks whether or not all its zeros are in the open unit disk without computing
said zeros. To discuss this issue the following definition comes in handy.
Definition 4.3. A polynomial A(z) is said to be a Schur polynomial if all its
zeros are inside the unit disk of the complex plane.
We now describe two different approaches to check whether or not a given
polynomial is a Schur polynomial (without computing its zeros):
1. Jury test: it is an algebraic test that, given the coefficients of a polynomial,
provides a necessary and sufficient condition for the polynomial to be Schur.
The coefficients ci are obtained from the coefficients bi by following the same
procedure, and so on for the subsequent rows of the table. Notice that from
(4.11) we get bn = 0, as shown in the table. The following result provides a
simple test to check whether or not a given polynomial is a Schur polynomial.
Chapter 4. Analysis of Discrete-Time Systems 49
Theorem 4.1. Consider a polynomial A(z) and the corresponding Jury table
built as just shown. Then the polynomial A(z) is Schur if and only if all the
coefficients a0 , b0 , c0 ,. . . , r0 have the same sign.
If we denote by {pk }nk=1 the zeros of A(z), the previous theorem can be sum-
marised by the following formula:
b0 c0 r0
|pk | < 1, k = 1, . . . , n ⇐⇒ > 0, > 0, . . . , > 0. (4.12)
a0 a0 a0
1 1 1 1/2
1/2 1 1 1
3/4 1/2 1/2 0
1/2 1/2 3/4 0
5/12 1/6 0 0
1/6 5/12 0 0
7/20 0 0 0
In this case, all the relevant coefficients of the first column of the table are
positive and we can conclude that A(z) is a Schur polynomial. By computing
explicitly the zeros of A(z) we get the three zeros p1,2 = −0.1761 ± j0.8607,
p3 = −0.6487, with magnitudes |p1,2 | = 0.878 and |p3 | = 0.647 which are, as
expected, smaller than 1. ♦
=(z) =(s)
z−1
s= z+1
=⇒
<(z) <(s)
Therefore, M (z) is finite and well defined for all z 6= −1 and can take any
complex value except 1.
Next we√prove that |z| < 1 if and only if < (M (z)) < 0. Let z = a + jb so
that |pi | = a2 + b2 . We have
z−1 a2 − 1 + b2 + j2b
M (z) = = ,
z+1 (a + 1)2 + b2
so that
a2 − 1 + b 2
< (M (z)) = .
(a + 1)2 + b2
Therefore, we have
and analyze its stability by employing the Routh-Hurwitz test (see Appendix
C.1).
Chapter 5
Interconnections between
continuous-time and
discrete-time systems
+ ẽ ũ
r̃ C(z) P (z) b
ỹ
−
The rest of this section will be dedicated to the much more delicate analysis
of closed-loop control systems where the controller is modelled as a discrete-
time system and the to-be-controlled plant as continuous-time one. Of course to
Chapter 5. Interconnections between continuous- and discrete-time systems 52
We can write the relation between the discrete-time signal ũ(k) and the cor-
responding continuous-time signal ū(t) as:
+∞
X
ū(t) = u(k) (δ−1 (t − kT ) − δ−1 (t − (k + 1)T )) . (5.2)
k=0
with T being the sampling time. It immediately follows from (5.3) that the
transfer function of the ZOH in the Laplace variabile s is
1 − e−sT
H00 (s) = . (5.4)
s
Chapter 5. Interconnections between continuous- and discrete-time systems 53
This result will be useful below when we compute the overall discrete transfer
function of the series interconnection obtained by cascading H0 , P (s) and a sam-
pling block.
Remark 5.1. Some comments are in order.
• In place of the ZOH we could use higher order holders, for example the first
order holder (FOH). These devices however, perform a derivative action
with the disadvantage of amplifying the noise.
• ZOH are fast, cheap and easy to implement as they can be built by using
op-amp, and resistances.
• As we will see with more details in the following, on average the ZOH
introduces a delay corresponding to a half of sampling time T .
≃
ū(t) y(t)
ũ(k) H0 F (s) T
ց ỹ(k)
≃
ẽ(k) ũ(k)
e(t) T
ց C̃(z) H0 ū(t)
Consider the cascade depicted in Figure 5.5 and assume that F (s) is the
transfer function of a causal system. We also assume (and this is a fundamental
assumption) that the sampling and the hold devices are synchronous, i.e. that
they work with the same clock of period T .
ū(t) y(t)
ũ(k) ∼ uδ (t) H0 F (s) T
ց ỹ(k)
Figure 5.5: Block diagram of the cascade ”ZOH”, F (s) and ”Sampling”.
Let H(s) := F (s)H00 (s), where H00 (s) is the continuous-time version of the
ZOH as defined above. We first compute the forced output of the filter with
transfer function H(s) fed with the pulse input
∞
X
uδ (t) = ũ(l)δ(t − lT ).
l=0
Notice that
Z t
h(t − lT ) if lT ≤ t
h(t − τ )δ(τ − lT )dτ =
0 0 if lT > t
Notice also that both the system of transfer function F (s) and the continuous-
time versione of the ZOH are causal so that their cascade, whose transfer func-
tion is H(s) := F (s)H00 (s), is a causal system as well, i.e. its impulse response
Chapter 5. Interconnections between continuous- and discrete-time systems 55
h(t) := L−1 [H(s)] is a causal function i.e. it vanishes for all negative values of t.
Therefore, we have
Z t
h(t − τ )δ(τ − lT )dτ = h(t − lT ).
0
the cascade of the same two operators in the opposite order is not the
identity: its output, indeed, is always a piece-wise constant function which
is typically different from the input signal which is, in general, not a piece-
wise constant signal. Indeed, the latter cascade is a projection whose output
retains only the information corresponding to values of the input at the
sample points.
• In spite of the previous observation, the cascade in Figure 5.4 (in which
some of the information coded in the input is indeed lost and hence does
not appear in the output) can be used to approximate a continuous-time
system.
– F (s) is not rational and has a delay so that it has the form F (s) =
0
e−T s F0 (s) with T 0 > T ;
h i
– F (s) is rational but its step-response y(t) = L−1 F (s)
s
is such that
y(T ) = 0.
Chapter 5. Interconnections between continuous- and discrete-time systems 57
e(k) u(k)
+
r(k) kC(z) P (z) b
y(k)
−
To draw the root locus we use the same rules of the continuous-time case (clearly
the form of the locus does not depend on the fact that the complex variable is
named z instead of s). The important difference, however, is in the interpretation
of the result. Indeed, the critical points are no longer those in which the locus
intersect the imaginary axis; now they are the intersections between the locus and
the unit circle {z : |z|2 = <(z)2 + =(z)2 = 1}. In fact, now the stability region
is the one contained inside the unit circle, i.e. {z : |z|2 = <(z)2 + =(z)2 < 1}.
=(z) =(s)
ϕcr
ωcr
<(z) ωcr
<(s)
ϕcr
Figure 5.7: Root locus (in red) in the z and s domains with the corresponding
critical points.
To compute the critical values kcr of the gain k, we need to solve the equation
in the two unknowns kcr and ϕcr . This is particularly easy when the form of the
locus allows to conclude that z = ±1 are critical points.
=(z)
kcr
×
<(z)
Figure 5.8: Root locus (in red) for the example 5.2.
Chapter 5. Interconnections between continuous- and discrete-time systems 59
Example 5.3. Let us consider the block diagram depicted at the top of Figure
1
5.9, where P̃ (s) := s+1 (we use the notation P̃ (s) in such a way that P can be
reserved for the discrete-time system). We want to compute the corresponding
discrete-time system depicted at the bottom of Figure 5.9 and discuss the stability
of the closed-loop system. By using equation (5.8), we get:
+ e ẽ ũ ū
k′
r(t) T
ց
1−z −1
H0 P̃ (s) b
y(t)
−
+
k′
r(k) 1−z −1
P (z) b
y(k)
−
=(z)
kcr
◦× ×
<(z)
Figure 5.10: Root locus (in red) for the example 5.3.
0
From (5.13), we immediately see that the critical value kcr depends on T and
gets smaller and smaller as T increases. On the contrary, as T tends to 0 critical
0
value kcr tends to infinity so that the closed loop system tends to be stable for
any positive value of the gain. ♦
In general, to compute the points where the root locus crosses the unit cir-
cumference {z : |z|2 = <(z)2 + =(z)2 = 1} we can use the bilinear transform
(4.13) which, as we have seen, bijectively maps the unit circumference deprived of
the point −1, to the imaginary axis of the complex plane. Notice the the missing
point −1 can be treated separately by using (5.11). By resorting to the bilinear
transform, equation (5.11) may be rewritten as
1+w 1+w
kN (z) + D(z) =0 ⇒ kN +D = 0. (5.14)
1−w 1−w
1+w 1+w
By setting N 0 (w) := N and D0 (w) := D
1−w 1−w
, we get
kN 0 (w) + D0 (w) = 0,
and we can compute the critical values kcr of k by using the Routh Criterion. Once
obtained kcr , we can compute the values jωcr such that kcr N 0 (jωcr )+D0 (jωcr ) = 0,
and hence the values of z for which the root locus crosses the unit circumference
1+jωcr
are easily obtained as zcr = ejϕcr = 1−jωcr
.
Alternatively, we can compute the points where the root locus crosses the
unit circumference by resorting to the Jury Criterion (after constructiong a Jury
table whose elements are functions of k).
Example 5.4. Consider the closed-loop system depicted in Figure 5.11. Com-
pute the corresponding critical values of the gain k.
In this case the denominator of the closed-loop transfer function is Q(z) :=
k + 2z 2 − 3z + 1. By using the bilinear transform, we get
+
k
r(k) (z−1)(2z−1)
b
y(k)
−
=(z)
kcr,2
kcr,1
× ×
<(z)
kcr,2
Figure 5.12: Root locus (in red) for the example 5.4.
whose numerator
Definition 5.1. Let us consider an interconnection with p blocks and let Pl (z),
l = 1, 2, . . . , p, be the transfer function of the l−th block. Let us perturb ad-
ditively the input of each block by adding an auxiliary input ul , l = 1, 2, . . . , p.
Let yl denote the output of the l-th block. The original interconnection is said to
be internally stable if for all i, l = 1, 2, . . . , p, the overall transfer function Wil (z)
from the input ul to the output yi is BIBO-stable.
z+2
Example 5.5. Consider the block diagram in Figure 5.13, where F (z) := z−1/2
z−1/2
and G(z) := (z+2)(z−1/3) . Notwithstanding the fact that the transfer function
from r to y is BIBO-stable:
Y (z) 1
= ,
R(z) z + 23
Chapter 5. Interconnections between continuous- and discrete-time systems 62
n(k)
+
r(k) F (z) G(z) b
y(k)
−
the transfer function from n to y is not stable because of the pole in −2:
Y (z) z − 21
= .
N (z) (z + 2)(z + 2/3)
Frequency response
One of the key tools for the design of continuous-time controllers and for the
closed-loop stability analysis are the frequency response and its graphical repre-
sentations, i.e. the Bode plots and the Nyquist plot.
In discrete-time similar results hold. Let G(z) be the transfer function of a
LTI system and let u(k) = u0 cos(kϑ0 + Ψ0 ) be its input. If the system is BIBO-
stable then the corresponding (forced) output tends to become a pure oscillation
with the same frequency ϑ0 of the corresponding input:
k→∞
y(k) −→ y0 cos(kϑ0 + χ0 ), (6.1)
where
Remark 6.1. Since in (6.4), ϑ enters in G(·) via the periodic function ejϑ , the
frequency response is clearly a periodic function of period 2π. Moreover, it is also
symmetric: G(e−jϑ ) = G(ejϑ )∗ . Therefore, we need only to study the function in
the interval [0, π].
The graphics of M (ϑ) and ϕ(ϑ) in the frequency interval [0, π] are the discrete-
time Bode plots and are analogous to the continuos-time ones.
Chapter 6. Frequency response 64
+ E U
R C P b
Y
−
and this is possible if and only if the polynomial DE is Hurwitz. In discrete time,
tracking is achieved if
k→+∞
|y(k) − r(k)| −−−−→ 0, (7.5)
and this is the case if and only if DE has roots with modulus strictly lesser than
one, i.e. inside the unit disc in the complex plane. For the sake of simplicity,
with a slight abuse of terminology, such a DE is said to be stable. Note that from
(7.3) we have that roots(DE ) ⊆ roots(NCA + DCA ) ∪ roots(DR ), due to possible
cancellations. Being NCA + DCA stable, because of the closed-loop stability re-
quirements, it has roots inside the unit circle. Thus, two possibilities remain to
be discussed:
1. DR is stable,
Chapter 7. Control problem and controller design 67
2. DR is not stable.
In the first case tracking is already guaranteed, while to address the second it is
convenient to factorize DR in a stable and an unstable part, SR and IR respec-
tively:
DR = SR IR . (7.6)
In order to eliminate the effect of the non-convergent modes associated to IR on
the error E it is necessary to cancel such factor in (7.3). Assuming NR and DR
coprime the only possible cancellation is between DCA and IR . Summing up, if
pR
i is an unstable root of DR :
This conclusion is a formulation of the so-called internal model principle for LTI
systems in an input-output description, in discrete time.
Example 7.1 (Type of the loop and tracking of steps and ramps). Consider
again the control interconnection of Figure 7.1. In the continuous-time case,
if the reference is a ramp of order l, R(s) = sAl , in order to attain asymptotic
tracking it is necessary to add a number of poles in zero ∆ = l − n0 in C(s), with
n0 the number of poles in zero already present in P (s). This is typically proven
using the final value theorem, see e.g. [7]. We now treat the discrete-time case
using Proposition 7.1: consider the ramp of order l
Az l̃
R(z) = ,
(z − 1)l
with ˜l − l < 0 the intrinsic delay of the signal. In order to obtain asymptotic
tracking with zero error, from the internal model principle we have that
NP (z) NC (z)
if P (z) = =⇒ C(z) = ,
D̃P (z)(z − 1)nP D̃C (z)(z − 1)∆
with ∆ := l−nP . It is critical of course to choose a D̃C (z) such that NC (z)NP (z)+
(z − 1)l D̃P (z)D̃C (z) be stable. ♦
Chapter 7. Control problem and controller design 68
y(t)
y(∞)
1 + mp
1 + 0.05
1
0.9 1 − 0.05
0.1
tr ta,5% t
• in the frequency domain: in this approach a desired “shape” for the fre-
quency response W (jω) of the controlled system is specified (Fig. 7.3).
Typically a value of |W (jω)| ' 1 is sought for ω < B1 , if the expected ref-
erence signals have limited bandwidth B1 ∼ B3dB =: B, while |W (jω)| ' 0
is desirable for ω > B2 , a band beyond which only noise is expected. Tol-
erances ∆1 and ∆2 prescribe the areas in which |W (jω)| must remain. In
particular, the maximum absolute value M of the frequency response should
not overly exceed 1.
Empirical relations can be found which link the key parameters of the two
approaches:
Remark 7.1. Other performance specifications, or way to express these, can also
be used, e.g.,
• internal stability;
• Optimality: among all possible inputs or control laws one is chosen so that
a given cost functional is minimized J(y, u). The cost functional is typically
either a quadratic function that can be interpreted as an “energy” for the
signals, or the time in which a certian task is achieved.
Chapter 7. Control problem and controller design 70
|W (jω)|
1 + ∆1 =: M
1 − ∆1
∆2
B1 B2 ω
where
These will represent the dominant poles of the actual W (s). If ξ ≥ 1 the two
poles are real (overdamped system), if ξ < 1 they are a complex-conjugate pair
(underdamped system).
Chapter 7. Control problem and controller design 71
eσt
w−1 (t) = δ−1 (t) − p (sin(ωd t + ϕ)), (7.11)
1 − ξ2
p
where σp:= <(p1,2 ) = −ωn ξ, ωd := |=(p1,2 )| = ωn 1 − ξ 2 and ϕ such that
sin ϕ = 1 − ξ 2 and cos ϕ = ξ.
If the derivative of (7.11) and its first zero are computed, corresponding to
the first extremal point, the peak time and tp the peak value 1 + mp are found:
π
tp = (7.12)
ωd
ξ
−√ π
mp = e 1−ξ2 (7.13)
Furthermore from the envelopes 1±eσt it is possible to compute the settling times
at 5% and, where needed, at other values, e.g.:
3
ta,5% ' (7.14)
|σ|
4.6
ta,1% ' (7.15)
|σ|
2πB
ωn = q p (7.18)
2ξ 1 − ξ 2 + 2 − ξ 2 + 4ξ 4
1
ωn tr ' p ϕ (7.19)
1 − ξ2
Chapter 7. Control problem and controller design 72
=(s)
ωn
σ ϕ
<(s)
Figure 7.4: Admissible regions for the poles of a second-order system satisfying
a given set of specifications in the time domain.
Chapter 7. Control problem and controller design 73
8. engineering evaluation.
The first two points have been already discussed in the previous sections, so in
the following we’ll focus on phases 3, 4 and 5.
• denoting with W the whole scheme transfer function, the tracking property
requires |W (iω)| ' 1 for ω < B1 ;
• we need system robustness: the most useful parameter for quantifying ro-
bustness is the sensitivity function:
∆W/W ∂ ln W
SPW = lim = ; (7.21)
∆P →0 ∆P/P ∂ ln P
Chapter 7. Control problem and controller design 74
|W (jω)|
1 + ∆1
1
1 − ∆1
∆2
B1 B2 ω
tracking filtering
U
• for avoiding the actuator overloading, if A = R
we’ll look for A “small
enough”.
What is impossible to modify are the three relations WN1 ' P , WN2 ' 1 and
SPW = 1, so in particular robustness is prevented. Moreover, A = C ' P1
risks to overload the actuator whenever P is “small” (which means that
some zeros of P lie in the interest bandwidth).
n1 (k) n2 (k)
u(k)
r(k) C P y(k)
2. Closed-loop control (feedback) (Fig. 7.7). This makes the various transfer
CP P 1
function given by, respectively, W = 1+CP , WN1 = 1+CP , WN2 = 1+CP and
W W 1
SP = SC = 1+CP . Any of these transfer functions has to be BIBO-stable
if internal stability of the whole system is required. The tracking property
translates into |C| |P1 | , which means |CP | 1 in the frequency-range
0 − B1 , besides to |C||P | 1 in the frequency-range B2 − +∞. This way,
for ω < B1 both WN1 , WN2 ' 0 and SPW , SCW ' 0 hold true. The actuator
C
transfer function A = 1+CP has to be carefully evaluated, since ω < B1
1
implies |A| ' |P | , which in case of P “small enough” could overload the
Chapter 7. Control problem and controller design 75
actuator, while ω > B2 implies |A| ' |C|. By summarizing, the closed-loop
control leads to significant improvements w.r.t. the open-loop structure.
Furthermore, C can embed internal model components, so leading to an
asymptotically exact tracking of the reference signal.2
n1 (k) n2 (k)
+ u(k)
r(k) C P b
y(k)
−
3. Closed-loop control based on two degrees of freedom with a pre-filter (Fig. 7.8).
The dynamic control action is split up between L, C, H. The vari-
P CL P
ous transfer functions are given by W = 1+HP C
, WN1 = 1+HP C
and
W 1
WN2 = SP = 1+HP C , respectively, while the actuator transfer function
LC
is given by A = 1+HP C
. This way, L allows the freedom of suitably split-
ting the control tasks in such a way that A can remain small enough, C
is devoted to endowing internal model components, while the H’s task is
usually that of obtaining stabilization. A careful design of the block L is
needed as SLW = 1.
n1 (k) n2 (k)
+ u(k)
r(k) L C P b
y(k)
−
H
Figure 7.8: Closed-loop control based on two degrees of freedom with a pre-filter
(with possible disturbances).
F n1 (k) n2 (k)
+ u(k)
r(k) b
L C P b
y(k)
−
H
Figure 7.9: Closed-loop control based on two degrees of freedom with a pre-filter
and an additional feedforward (with possible disturbances).
Main constraint. If a µP based system is used, with Tc denoting the time re-
quired to the control algorithm for performing computations and other functions,
listed below:
?
• input signal test (e(k) ∈ [emin , emax ]);
• estimation (or extraction) of the signal values (if only ỹ(k) = f (y(k)) is
available, to compute f −1 (ỹ(k)) is needed);
Criterions for the T choice. A detailed list follows, dealing with various
criterions to be taken into account for the sampling-time T choice:
– for ωΩb < 10, with Ω the sampling frequency, the noise sensitivity is
worse in the discrete system,
2]
– for ωΩb > 20, the index E[|y(k)|
E[|y(t)|2 ]
is lower than 1.2, which implies a
reduced noise sensitivity in the discrete system.
w
+
r(t) ≡ 0 C(s) 1/s2 b
y(t)
−
w
+
r(k) ≡ 0 C(z) H0 1/s2 b
y(k)
−
T
ց
E[|y(k)|2 ]
E[|y(t)|2 ]
1.2
1 10 100 Ω
ωb
E[|y(k)|2 ] Ω
Figure 7.12: Behavior of E[|y(t)|2 ]
while ωb
varies.
• System dynamics and related delays. Assume that at a certain time instant
tg either a step reference signal appears or a disturbance w get started
to act. Let (k − 1)T and kT be two subsequent sample acquiring times.
The controller “sees” the step signal (or the disturbance) only at time kT
(Fig. 7.13). So a delay given by ∆ = kT − tg is unavoidable and, in the
worst case (the step signal suddenly arises as soon as the time instant k
got over), ∆ = T . We already saw that the system “quickness” depends
on the rise-time tr , and that delay phenomena have a negative impact on
the system transient performances. In order to overcome that, we usually
assume
tr
T ≤ , (7.22)
10
2π10
or, equivalently, Ω ≥ tr
.
k
Example 7.3 (first order system). Let G(s) = 1+sτ , with τ ∈ R+ the
system time constant. We know that tr ' 2.3τ , so in order to obtain
tr ≥ 10T it should hold Tτ ≥ 4.3. By introducing the cut-off frequency
Chapter 7. Control problem and controller design 79
r(t)
• •
• • •(k − 1)T
•
tg kT t
Figure 7.13: Delay caused by the sampling-time T on the input step (δ−1 (t − tg ))
response.
y(t), ỹ(t)
T t
Figure 7.14: Delay induced by ZOH on the output signal. The signal y(t) - blue -
represents the non-delayed signal, while ỹ(t) - red dashed - is the approximation
of the delayed signal due to the holder.
• Anti-aliasing filter effects. This issue has been already addressed in Chapter
3, by referring in particular to second order Butterworth filters. In order
to obtain an attenuation a at frequency Ω/2 with damping factor ξ, an
estimate of the phase margin variation ϕ is given by (3.18). Therefore, the
presence of an anti-aliasing filter leads to add to the interpolator delay a
further delay, generated by the anti-aliasing filter, so that, by denoting, as
usually we did, with ϕM the maximum admissible decrease in the phase
margin, we need to impose
ωa √ ωa
ϕM ≥ + 4ξ a (7.26)
2/T Ω
We are going to conclude this section by listing in Table 7.1 some practical
considerations regarding typical sampling-time choices in relation to the physical
system of interest.
Chapter 7. Control problem and controller design 81
Table 7.1: Some examples of the magnitude order for the sampling time T .
Chapter 7. Control problem and controller design 82
Chapter 8
8.1 Introduction
We are going to deal with the problem of designing a discrete-time controller
C(z) for a given continuous-time plant P (s), as shown in Fig. 8.1.
+ ẽ ũ ū
r̃ C(z) H0 P (s) b y
−
T
ց
1
The “scaling factor” T2 has no relevance from a mathematical viewpoint, but the reason
why we introduced that will be clear in the sequel.
Chapter 8. Digital controller synthesis: Emulation methods 84
In the following sections both the first and the third method will be discussed in
detail.
which corresponds to
1 − z −1
s' . (8.5)
T
which leads to the approximation
1
esT ' ; (8.6)
1 − sT
• Tustin’s method. It corresponds to a trapezoidal approximation of the
time derivative:
x(t + T ) − x(t)
d x(t + T ) + x(t)
' . (8.7)
dt 2 T
from which
2 z−1
s= . (8.9)
T z+1
Let’s remark that the Tustin’s transformation is exactly the bilinear
one, except for a “scaling” factor.
After having chosen one of the previous approximations, we can compute
where the pole in the origin has been highlighted for reasons which
will be later clarified.
Chapter 8. Digital controller synthesis: Emulation methods 86
=(s)
<(s)
⇓
=(z) =(z) =(z)
EF EB Tustin
Figure 8.2: Left-hand half plane mapping through the three methods.
• map the computed poles and zeros through z = esT , so obtaining C1 (z)
m
Y
(z − eẑi T )
i=1
C1 (z) := n . (8.12)
Y
ν
(z − 1) (z − ep̂i T )
i=1
• equip C1 (z) with further l zeros at −1, for diminishing the delay
from which
n
Y m
Y
p̂i T
(1 − e ) (−ẑi )
i=1 i=1
KD = KE m n . (8.16)
Y Y
l ẑi T
2 (1 − e ) (−p̂i )
i=1 i=1
r(t) - k - y(t)
+ C(s) - P (s) -
−
6
where C(s) has a simple pole at s = 0 and Bode gain KB , while the plant
P (s) is devoid of poles at s = 0 and has unit Bode gain. Assume the closed-
loop is BIBO-stable and driven by the reference signal r(t) = t · 1(t) (the
Chapter 8. Digital controller synthesis: Emulation methods 88
unit ramp with Laplace transform R(s) = 1/s2 ). By being 1 the system
type, the steady-state error is the inverse of KB , the open-loop gain (the
Bode gain of C(s)P (s)), i.e.
1
er = . (8.18)
KB
r̃(k) - k - ỹ(k)
+ C̃(z) - P̃ (z) -
−
6
and, again, assume the BIBO-stabilty of the closed-loop system and let P̃ (z)
be the sample/hold version of P (s), so that P̃ (z) is devoid of poles at z = 1
and P̃ (1) = 1. The reference signal sampled version is r̃(k) = T k · δ−1 (k),
so that
z
R̃(z) = T . (8.19)
(z − 1)2
Therefore, if C̃(z) has a simple pole at z = 1 and C̃0 (z) := (z − 1)C̃(z) is
KB0 −valued at z = 1, i.e. C̃0 (1) = KB0 , from the final value theorem we get
T
ẽr = (8.20)
KB0
1
which is equal to the steady-state error er = KB
of the continuous-time case
if we assume
KB0 = T KB (8.21)
in perfect agreement with (8.17). A similar reasoning should be developed
in case of C(s) with a pole at s = 0 with multiplicity ν and with a canonical
reference signal whose transform is R(s) = 1/sν+1 .
Example 8.1. We are now going to show two applications of the MPZ
method.
z − e−aT
C1 (z) = kd = C2 (z),
z − e−bT
with kd such that
a 1 − e−aT a 1 − e−bT
lim C(s) = kc = kd = lim C1 (z) ⇒ kd = kc .
s→0 b 1 − e−bT z→1 b 1 − e−aT
Chapter 8. Digital controller synthesis: Emulation methods 89
s+a
• Let C(s) = kc s(s+b) . If we want zero relative degree
(z + 1)(z − e−aT )
C2 (z) = kd .
(z − 1)(z − e−bT )
kd is evaluated through
T a 1 − e−bT
kd = kc .
2 b 1 − e−aT
Example 8.2. Let C(s) be a proper rational transfer function and, for
simplicity sake, assume that C(s) is devoid of zeros at s = 0. Let Ct (z)
be the discrete version of C(s), obtained via the Tustin’s method, and let
Cm (z) be the discrete version of C(s), obtained via the MPZ method (by
choosing zero relative degree). Denote by pit , i = 1, . . . , n1 , and by zit ,
i = 1, . . . , n1 , the poles and the zeros, respectively, of Ct (z), and by pim ,
i = 1, . . . , n1 , and zim , i = 1, . . . , n1 , the poles and the zeros, respectively,
of Cm (z). It is required to prove that
pit − pim
lim = 0, ∀i = 1, . . . , n1 , (8.22)
T →0 T
and
zit − zim
lim = 0, ∀i = 1, . . . , n1 . (8.23)
T →0 T
Moreover, if KEt and KEm denote the Evans’ gains of Ct (z) and Cm (z),
respectively, we want to prove that also
KEt − KEm
lim = 0. (8.24)
T →0 KEt
holds true.
Proof. Express C(s) in Evans form, by pointing out the (possible) pole at
s = 0 (obviously, ν = 0 in case that pole is absent):
m
Y
(s − zi )
i=1
C(s) = KE n , (8.25)
Y
ν
s (s − pi )
i=1
By evaluating
2 z−1
Ct (z) = C (8.26)
T z+1
Chapter 8. Digital controller synthesis: Emulation methods 90
| {zi=1 } i=1
KEt
(8.27)
where
1 + zi T /2
zit := , i = 1, . . . , m, (8.28)
1 − zi T /2
and
1 + pi T /2
pit := , i = 1, . . . , n. (8.29)
1 − pi T /2
From (8.27) it easily follows that
and
pit = 1, i = n + 1, . . . , n1 = n + ν, (8.31)
and, moreover
m
Y
n+ν−m (1 − zi T /2)
T i=1
KEt = KE n . (8.32)
2 Y
(1 − pi T /2)
i=1
Let’s now compute Cm (z). By the above procedure and taking into account
that l = r = n + ν − m is needed because of the zero relative degree
requirement, we obtain
"m #
Y
(z − zim ) (z + 1)n+ν−m
i=1
Cm (z) = KEm " n
# , (8.33)
Y
(z − pim ) (z − 1)ν
i=1
where
zim := ezi T , i = 1, . . . , m, (8.34)
and
pim := epi T , i = 1, . . . , n. (8.35)
Chapter 8. Digital controller synthesis: Emulation methods 91
and
pim = 1, i = n + 1, . . . , n1 = n + ν. (8.38)
We are now in a position to prove what we claimed before. Let’s get started
with (8.22). It’s obvious for i = n + 1, . . . , n1 = n + ν, so only its validity
for i = 1, . . . , n has to be verified. In fact, for any i = 1, . . . , n, we have:
1+pi T /2
pit − pim 1−pi T /2
− epi T
lim = lim
T →0 T T →0 T
1 + pi T /2 − epi T (1 − pi T /2)
= lim
T →0 T (1 − pi T /2)
pi /2 − pi epi T (1 − pi T /2) − epi T (−pi /2)
= lim = (8.39)
0,
T →0 1 − pi T
where, in the last-but-one step, we resorted to the de l’Hôpital rule.
Furthermore, (8.23) easily follows from similar reasonings.
Only (8.24) remains to be proved, and that follows from
KEt − KEm
lim
T →0 KEt
m n
Y Y epi T − 1
n+ν−m (1 − zi T /2)
KE T2 i=1 pi
m−n i=1
= lim
n − T m zi T
T →0 KEt Y Y e − 1
(1 − pi T /2)
i=1 i=1
zi
Yn m
Y n
Y epi T − 1
(1 − pi T /2) (1 − zi T /2)
i=1
i=1 i=1
pi T
= lim m
n − m zT = 0.
T →0 Y e −1
i
Y Y
(1 − zi T /2) (1 − pi T /2)
i=1 i=1 i=1
zi T
So, as a general statement, that method leads to worse results w.r.t. ei-
ther Tustin or MPZ. A better method would be that of considering a ramp
response invariance issue, however this method would be similar, at a per-
formance level, to the Tustin’s one, which is simpler to implement.
2
Let’s recall that the hold/sample order (∼ 1 for discrete signals) is different w.r.t. the
sample/hold order (6= 1 for continuous signals).
Chapter 8. Digital controller synthesis: Emulation methods 93
KP
1
e(t) b
sTI u(t)
sTD
1 1+sTD
e(t) KP 1+ sTI 1+sTL u(t)
• the Nyquist plot of P exhibits a sole crossing point on the (negative) real
axis;
• the Nyquist plot of P exhibits a sole crossing point on the unit circle (cor-
responding to the crossover frequency ωa );
=(s)
mϕ
ωa <(s)
kRP
C 0 (s) = . (8.51)
sνRP
We can imagine this term being a “fictitious” part of the plant P (s)
with
1
M := |C(jωa∗ )| =
|P 0 (jωa∗ )|
ϕ := arg(C(jωa∗ )) = m∗ϕ − π − arg(P 0 (jωa∗ ).
Therefore, it easily follows that the open-loop transfer function now is sat-
isfying the requirements about both phase margin and crossover frequency
(clearly, closed-loop stability must be preserved first of all). C(s) can be now
designed by resorting either to one of the actions or elementary networks or
to a standard controller, as explained in the next sections. Obviously, the
whole controller will be the product of the steady-state requirements part
and of the transient requirements (phase margin and crossover frequency
adjustment) one:
C(s)00 = C(s)C 0 (s). (8.54)
M (cos ϕ − M )
α= , (8.56)
1 − M cos ϕ
1 M cos ϕ − 1
T = ∗ , (8.57)
ωa M sin ϕ
Let’s remark that α > 0 requires M < cos ϕ, even though this condi-
tion is not so strong, as if it doesn’t hold it suffices to assume a smaller
value for ϕ, which allows to obtain a greater total phase margin mϕ .
So the performances could be a little bit worse, however stability is
guaranteed anyway.
• Anticipator network. This way we have
1 + Ts
Cant (s) = , 0 < α < 1, T > 0, (8.58)
1 + αT s
with
M cos ϕ − 1
α= , (8.59)
M (M − cos ϕ)
1 M − cos ϕ
T = ∗ ., (8.60)
ωa sin ϕ
1 + αT1 s 1 + T2 s
Csella (s) = , 0 < α < 1, T1 > T2 > 0. (8.61)
1 + T1 s 1 + αT2 s
It’s needed when we have, at the same time, both |P 0 (jω ∗ )| > 1 and
arg(P 0 (jωa∗ )) < m∗ϕ + π. In order to evaluate the unknown parameters
in (8.61) we can follow the simple procedure explained below:
– the condition M < cos ϕ is necessary to check, otherwise the prob-
lem has no solution;
– the following parameter is evaluated
M (cos ϕ − M )
m := ; (8.62)
1 − M cos ϕ
Chapter 8. Digital controller synthesis: Emulation methods 98
5. a final check about the desired requirements is needed, if not we can recur-
sively repeat the whole procedure, after having changed the values of ωa∗
and m∗ϕ .
ωa∗ 1 3π
M= , ϕ = m∗ϕ + − arg(P 0 (jωa∗ )). (8.68)
KI |P (jω ∗ )| 2
n1 (k) n2 (k)
+ u(k)
r(k) C P b
y(k)
−
Let’s consider the closed-loop control architecture depicted in Fig.9.1, and as-
sume the system desired behavior and requirements have been translated in some
desired closed-loop transfer function W (z). A simple way for exactly obtaining
W (z) passes through expressing C(z) in terms of both W (z) and P (z) as follows.
From
C(z)P (z)
W (z) = ,
1 + C(z)P (z)
the desired controller can be obtained as
W (z) 1
C(z) = . (9.1)
1 − W (z) P (z)
• C(z) could result to be too highly complex (although the computation capa-
bilities of actual µP’s could overcome that problem, it might be preferable
to deal with simpler controllers);
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 102
• C(z) could result to be not a proper (causal) controller, and the conditions
on W (z) (our degree of freedom in the design) which might prevent that
aren’t so clear;
NP NC NW
P = , C= , W = , (9.2)
DP DC DW
where all numerators and denominators (Ni , Di ) are assumed to be coprime each
other and of degrees ni e di respectively, for i = P, W, C. By substituting into
the expression of C(z) given by (9.1) it easily follows
NC NW DP
C= = , (9.3)
DC DW − NW NP
with
nC = nW + dP − ∆, dC = dW + nP − ∆, (9.4)
where ∆ represents the cancellations (between NC and DC ) number, and where we
assumed the degree of DW −NW still being dW .1 In case the last assumption would
be not satisfied, it is needed to consider d0W = dW − ∆0 , where ∆0 represents the
degree loss in DW − NW due to cancellations between the maximal degree terms
in DW and NW . So, for guaranteeing properness of C, the following relations
have to hold true
Equivalently, all the transfer functions between inputs (and possibly auxiliary
inputs acting on the various blocks inputs) and internal variables have to be
1
This always holds true if W is either strictly proper or is proper with negative Evans’ gain.
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 103
stable ones. More explicitly (by referring to Fig. 7.7 again), the following transfer
functions have to be stable ones
Y CP
=W = , (9.7)
R 1 + CP
Y P DC
= =W , (9.8)
N1 1 + CP NC
U 1 DP DC
= =W , (9.9)
N1 1 + CP NP NC
U C DP
= =W . (9.10)
R 1 + CP NP
It is worthwhile to notice that the disturbance N2 hasn’t been taken into account,
as it could be considered as a version of R (except for a sign change). So the
conditions we are searching for are
• from (9.7) W has to be stable (which, on the other hand, is a fundamental
requirement on W );
• from (9.10) the unstable roots of NP must be canceled by NW ’s roots;
• from (9.8) it follows
DC NW (DW − NW )NP
W = , (9.11)
NC DW NW DP
which easily implies that all unstable poles of P must be DW − NW ’s roots
too;
• from the previous conditions, BIBO-stabilty of (9.9) is ensured.
Remark 9.1. As final remarks
• the direct synthesis method is simple to apply, unless P is unstable. In that
case NW , DW have to be chosen in order to guarantee that DW − NW has
some suitable roots;
• if we are interested in including internal model components, they can be
embedded in a fictitious way in the plant P (s) as follows: Let R = DN R
S DU
R R
S U
be the signal we want to track, with DR stable and DR unstable. It suffices
1
to define P̃ (z) = DU P (z) and thereafter to apply the above procedure;2
R
• since internal stability implies that all poles belongs to the open unit circle,
by being the poles continuously depending on the coefficients, small enough
coefficients variations do preserve stability. This means that small model-
ing errors appearing in P (z) don’t affect stability (in case they are small
enough).
2
In this respect we have to be somewhat careful, as the situation corresponds to the “diffi-
cult” case which requires to include the P unstable roots into DW − NW .
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 104
3. how can we take into account delays, which could appear either in the plant
P to control or in the measurement processes?
4. are these methods in accordance with standard P.I.D. & Co. design?
We’ll answer these question, starting with describing some methods which apply
for reasonable choices of W .
e−std
W (s) = , (9.12)
1 + sτ
with td the closed-loop system delay and τ1 a pole related to the system rise-time
(the more τ is, the quicker the system is). Let’s assume td being an integer
multiple of the sampling time T , i.e. td = nT . From the step response invariance
methodology, expressed by (5.8), it follows
−1 −1 W (s)
W (z) = (1 − z )Z S ◦ L ;T
s
1 − e−T /τ
= z −n . (9.13)
z − e−T /τ
W (z) 1 1 − e−T /τ 1
C(z) = = −T /τ n −T /τ
, (9.15)
1 − W (z) P (z) −1 + e + z (z − e ) P (z)
=(s) =(z)
ωn
1
z
−
→
<(s) <(z)
Figure 9.2: Mapping from s plane to z one of the region related to t∗r .
=(s) =(z)
1
σ z
−
→
<(s) <(z)
eσT
Figure 9.3: Mapping from s plane to z one of the region related to t∗a .
=(s) =(z)
1
ϕ z
−
→
<(s) <(z)
Figure 9.4: Mapping from s plane to z one of the region related to m∗p .
By intersecting the three regions described above, the admissible region for
placing the W (z)’s poles is obtained (see Fig. 9.5).
=(z)
<(z)
Figure 9.5: An example of admissible region for pole placement in the z plane.
The blocks connection in Fig. 9.6 can be equivalently replaced with that in
Fig. 9.7, where it’s easier to notice that, denoting by C the positive-feedback
connection of C 0 and P , it holds true
W
C0 P P̃ ≡P W 1
C= = = , (9.18)
0
1 − C P̃ W
1 − P P̃ 1−W P
which represents nothing more than the well-known direct synthesis formula.
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 108
e u
+
r C ′ b
P b y
−
P̃
C
Figure 9.7: Equivalent systems connection for the controller direct synthesis.
which means that a delay td is present. In most cases the tracking target is
adapted to the delay, in the following sense
As a case study (see [4]), a delaying system, for which a controller leading to
(9.20) is needed, is now presented.
Example 9.1 (Temperature control for a fluid in a duct). Let the physical scheme
described in Fig.9.8 be given.
R v RT
l
u(t)
y(t)
Let RT be the thermistor for measuring the duct temperature, and y(t) be
proportional to the measured temperature. The duct is endowed with a resistor R
for controlling its temperature, thanks to an input voltage u(t) which modulates
the delivered power. An approximate model for the to-be-controlled plant transfer
function is (without taking into account any delay),
k
P 0 (s) = .
1 + sτ
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 109
If the fluid speed in the duct is assumed to be constant, the temperature measure
appears to be delayed of td = l/v. So, taking into account this delay, the to-be-
controlled plant becomes
ke−std
P (s) = .
1 + sτ
A proportional controller (with gain KP ) leads to the systems interconnection
expressed by the scheme depicted in Fig. 9.9. From Nyquist plots of both P 0 (s)
and P (s) (9.14) the arising of instability for KP large enough is self-evident, so
an alternative control scheme is required.
+
r(t) KP P (s) b
y(t)
−
=(s) =(s)
<(s) <(s)
Figure 9.10: Nyquist plot of P (s) (left) and of its delayed version P 0 (s) (right).
For large enough gain values the P 0 (s) diagram encircles the point −1+j0, leading
to instability (red dotted line).
B(s)
= P 0 (s), (9.21)
U (s)
P (s) − D(s) = P 0 (s) ⇒ D(s) = −(1 − e−std )P 0 (s) = e−std P 0 (s) − P 0 (s). (9.22)
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 110
e u
+
r C ′ b
P′ e−std b y
−
− +
D
b
By assuming that some estimates P̃ 0 (s) and t̃d of both P 0 (s) and td are available,
the control scheme in Fig. 9.11 can be reduced to that in Fig. 9.12. The same
figure shows as the external feedback loop “disappears” if the estimates would
be exact ones.
+ +
r C′ b
P′ e−std b y
− −
b
− +
P̃ ′ e−st̃d
This way, C 0 (s) could be designed regardless of the delay P (s) is endowed
with. As a matter of fact, the feedback output (i.e. the signal b), if P̃ 0 ≡ P 0 and
t̃d ≡ td , will coincide with that of the plant P 0 deprived of the delay.
By evaluating the whole system transfer function
it follows that (9.23) can be factorized into two terms: the first one without any
delay, and the second one expressing 0a delay equal to the desired one. So, a
0 C (s)P 0 (s)
correct design of C (i.e. satisfying 1+C 0 (s)P 0 (s) ' 1) leads to reach the tracking
target (9.20).
Remark 9.3. The previous analysis holds true both for continuous-time and
discrete-time systems. However, substantial differences arise in the practical sit-
uations:
• On the contrary, in the discrete-time case non-linear functions like the ex-
ponential are easily built: it suffices to store the function values in suit-
able look-up tables placed into the µP. So we can resort to the scheme in
Fig. 9.13, with e−st̃d ∼ z −N , N T = t̃D and
C 0 (z)
C(z) = .
1 + (1 − z −N )C 0 (z)P̃ 0 (z)
C(z)
+ +
r C ′ (z) b
P (z) b y
− −
− + b
P̃ ′ (z)
z −N
+
NC (z) NP (z)
r(k) C(z) = DC (z)
P (z) = DP (z)
b
yo (k)
−
NP Y + DP X = D∗ . (9.25)
Remark 9.5. The problem here deals with deg(D∗ ) = 2n − 1, which could be
“too large”, and henceforth we should impose requirements on 2n − 1 poles.
However the solution is easily found out, by assuming
with Ddom (z) endowed with the dominant poles, while ∆(z) has only “quick
poles” (e.g. poles at z = 0).
Let5
x = A−1 b. (9.33)
U U
DP in (9.25) with D̃P = DP DR , where DR takes into account for the g unstable
poles of the reference signal. This way, the degree of D̃P increases up to n + g.
Solving the linear system associated with the diophantine equation, with the
constraint of having both a minimal unknowns number and a proper controller,
reduces to choosing:
Y
C= I
.
XDR
E(z)
+
r(k) C(z) P (z) b
y(k)
−
ÑR (z −1 )
E(z) = (1 − W (z)) . (9.48)
D̃R (z −1 )
1 − W (z)
= Q(z −1 ), (9.49)
−1
D̃R (z )
NW
W (z) = = 1 − D̃R (z −1 )Q(z −1 )
DW
z κ − z κ D̃R (z −1 )Q(z −1 )
=
zκ
z κ − DR (z)Q̃(z)
= , (9.51)
zκ
It is easy to see that the open-loop transfer function C(z)P (z) = D N(z)
W (z)
Q̃(z)
is
R
endowed, as expected, with internal model components (related to the whole
reference signal denominator).
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 117
without losing both the controller causality and the closed-loop system internal
stability.
Remark 9.7. Let
and note that (9.54) can be rewritten in terms of a linear system of the form
0 ···
anR 0 0
1 − bκ
.. −bκ−1
anR −1 anR 0 ··· .
xq
.
.. .. ... .. .. x
..
.
. . . q−1
.. ..
a0 .. ... .. . .
a1 . .
. = ..
(9.58)
.. ..
.. .
0 a0 . . anR
. .. .. . ..
.. .. .
0 a0 . .
.
. .. .. .. .. x0
..
..
. . . .
0 0 · · · · · · a0 −b0
| {z }
(κ+1)×(q+1)
Other constraints which W (z) has to satisfy to are the following ones:
from (9.51), by being DR (z) assumed monic w.l.o.g, it follows that W (z)
could have relative degree (at least) 1 only if Q̃(z) would be monic too.8
z κ − DR Q̃(z)
lim W (z) = = 1 ⇐⇒ NW (1) = 1. (9.59)
z→1 zκ z=1
Remark 9.9. As far as the last situation is concerned, we need to take care of
the roots of DR (z), as in those z−values there is no effect of Q. This implies
that both zeros in W and roots of DW − NW can’t be placed in any pole of the
reference signal we want to track in the dead-beat sense.
Some examples follow, referring to simple situations.
• Case q = 0. It holds
So, by concluding
W (z) = z −1 , (9.64)
i.e., W (z) becomes the pure unit delay, and the controller assumes the
expression
W (z) 1 1 DP (z)
C(z) = = . (9.65)
1 − W (z) P (z) z − 1 NP (z)
Notwithstanding, the previous W (z) is obtainable only for minimum phase
plants P (z) (otherwise the internal stability is lost) with relative degree
rP = 1.
Q(z −1 ) = a + bz −1 (9.66)
⇒ NW (z) = z 2 − (z − 1)(az + b) (9.67)
z 2 − (z − 1)(az + b)
⇒ W (z) = . (9.68)
z2
The constraints are
+ e u
r(k) C(z) H0 P (s) T
ց b
y(k)
−
1
Example 9.2. Assume P (s) = s(s+1) , and let the goal be that of designing a
DB compensator for the step response of the corresponding sample/hold plant.
Without loss of generality, assume T = 1. From (5.8)
−1 −1 P (s)
P̃ (z) = (1 − z )Z S ◦ L ;T
s
1 − 2e−1 + ze−1
=
(z − 1)(z − e−1 )
0.264 + 0.368z
= ,
(z − 1)(z − 0.368)
the relative degree of P̃ (z) is rP = 1. Moreover, P̃ (z) is devoid of unstable zeros,
while it has an unstable pole at z = 1. The internal stability is therefore lost,
unless W (z) = NW (z)/DW (z) with DW (z) − NW (z) having a zero at z = 1 is
chosen. The DB requirement leads to W (z) = z −1 , and the controller, from the
direct synthesis formula (9.1), becomes
z −1 (z − 1)(z − 0.368)
C(z) = ·
1 − z −1 0.264 + 0.368z
z − 0.368
= .
0.264 + 0.368z
The variabile y(t) (the output of P (s)) behavior is shown in Fig. 9.17 (upper
graph), together with the response y(k). So y(t) exhibits some oscillations
(ripples), despite the right value (1) is assumed in the various sampling time
instants. We can also note that
• in general, stability outside the sampling times can’t be guaranteed;
• by decreasing the sample step, greater inputs are required;
• if the physical limitation of the actuator are overtaken (i.e., the saturation
levels) the ideal behavior is disregarded and, in particular, the dead-beat
property is definitely lost.
Conditions ensuring DB control without ripples exist (they are available in
various textbooks and in the attached notes). They are strongly related both to
state-space representations and to elementary modes conversion from continuous-
time into discrete-time.
♦
Chapter 9. Digital Controllers Synthesis: Direct Synthesis Methods 122
0 1 2 3 4 5 t
u(t)
1 3 5
2 4 t
Figure 9.17: Qualitative behavior of y(t) (grey dashed) and of y(k) (blue) for
the step response (upper figure) and behavior of the actuating input u(t), which
drives the plant P (s) (lower figure).
Appendix A
δ(k) d ... t 1 ∀z ∈ C
d ... t z
δ−1 (k) |z| > 1
z−1
d .... t z
kδ−1 (k) |z| > 1
(z − 1)2
d ... t z(z + 1)
k 2 δ−1 (k) |z| > 1
(z − 1)3
k d .... t z
,l≥0 |z| > 1
l (z − 1)l+1
d .... t z
pk δ−1 (k), p ∈ C |z| > |p|
z−p
k k−l d .... t z
p , l ≥ 0, p ∈ C |z| > |p|
l (z − p)l+1
Appendix A. Table of Most Common Z Transforms 124
d .... t z sin ϑ
sin(ϑk)δ−1 (k) |z| > 1
z2 − 2 cos ϑz + 1
d .... t zp sin ϑ
pk sin(ϑk)δ−1 (k) p ∈ C |z| > |p|
z2 − 2p cos ϑz + p2
Appendix B
δ(t) d t 1 ∀s ∈ C
δ(t − τ ), τ ∈ R+ d t e−τ s ∀s ∈ C
d t 1
δ−1 (t) <(s) > 0
s
d t 1
tδ−1 (t) <(s) > 0
s2
tn d t 1
δ (t),
n! −1
n∈N <(s) > 0
sn+1
d t 1
eαt δ−1 (t), α ∈ R <(s) > α
s−α
tn αt d t 1
n!
e δ−1 (t), α∈R <(s) > α
(s − α)n+1
Appendix B. Table of Most Common Laplace Transforms 126
d t s
cos(ϑt)δ−1 (t) <(s) > 0
s2 + ϑ2
d t ϑ
sin(ϑt)δ−1 (t) <(s) > 0
s2 + ϑ2
d t s−α
eαt cos(ϑt)δ−1 (t), α ∈ R <(s) > α
(s − α)2 + ϑ2
d t ϑ
eαt sin(ϑt)δ−1 (t) α ∈ R <(s) > α
(s − α)2 + ϑ2
Appendix C
Notions of Control in
Continuous-Time
an an−2 an−4 . . .
an−1 an−3 an−5 . . .
Each of the subsequent rows is obtained as function of the elements in the two
rows before it as shown in the example below. Consider the thee consecutive
rows:
pi+2 pi pi−2 . . .
qi+1 qi−1 qi−3 . . .
ri ri−2 ri−4 . . .
Then rj is given by
pi+2 pj
h i
det qi+1 qj−1 pi+2
rj = − = pj − qj−1 . (C.1)
qi+1 qi+1
This expression holds also for j = 0, 1 with the proviso of considering to be zero
all the elements of the two preceding rows that have negative index.
With reference to the table just defined we have the following result (known
as Routh Theorem):
Theorem C.1 (Routh). The following hold:
Appendix C. Notions of Control in Continuous-Time 128
1. A(s) is Hurwitz if and only if the construction of the table can be completed
(i.e. none of the elements in the first column of the table except the last
one is zero) and all the elements in the first column of the table have the
same sign (strictly).
2. If the construction of the table can be completed then the number nn of zero
of A(s) (counted with multiplicities) that are in the open left half-plane is
equal to the number of consecutive pairs of elements having (strictly) the
same sign in the first column of the table.
3. If the construction of the table can be completed then the number np of zero
of A(s) (counted with multiplicities) that are in the open right half-plane
is equal to the number of sign changes in the first column of the table.
4. If the construction of the table can be completed A(s) has at most a simple
zero in the imaginary axis. This zero, if present, is 0 and is present if and
only if the last element in the first column of the table is zero.
The following result provides some simple rules allowing to draw a qualitative
sketch of L+ and L− .
6. The intersection between L+ and the real axis is the set of all real points
having to their right an overall odd number of zeros of D(s) and of N (s)
(counted with multiplicity).
6. The intersection between L− and the real axis is the set of all real points
having to their right an overall even number of zeros of D(s) and of N (s)
(counted with multiplicity).
1. The points for which the Nyquist plot crosses the unit circle correspond to
the values of the frequency ω for which the Bode magnitude plot crosses
the x-axis (0 dB).
2. The points for which the Nyquist plot crosses the positive real axis cor-
respond to the values of the frequency ω for which the Bode phase plot
crosses the horizontal lines with ordinate 2πk, k ∈ Z.
3. The points for which the Nyquist plot crosses the negative real axis cor-
respond to the values of the frequency ω for which the Bode phase plot
crosses the horizontal lines with ordinate π + 2πk, k ∈ Z.
4. The points for which the Nyquist plot crosses the positive imaginary axis
correspond to the values of the frequency ω for which the Bode phase plot
crosses the horizontal lines with ordinate π2 + 2πk, k ∈ Z.
5. The points for which the Nyquist plot crosses the negative imaginary axis
correspond to the values of the frequency ω for which the Bode phase plot
crosses the horizontal lines with ordinate − π2 + 2πk, k ∈ Z.
6. If W (s) has poles on the imaginary axis then |W (jω)| diverges for some
values of the frequency ω so that the Nyquist plot is an open curve.
7. If W (s) is a rational function without poles at the origin, then the Nyquist
plot starts, for ω = 0, from the real point of abscissa KB , with KB being
the Bode gain of W (s).
8. If W (s) is a strictly proper rational function, then the Nyquist plot tends
to the origin for ω → ∞.
9. If W (s) is a proper rational function and all its poles and zeros have strictly
negative real part (minimum phase system), then the phase arg[W (jω)]
tends, for ω → ∞, to −(n − m) π2 where n and m are the numbers (counted
with multiplicity) of poles and zeros of W (s), respectively.
10. If W (s) is a proper rational function but it is not strictly proper then the
Nyquist plot tends, for ω → ∞, to the real point of abscissa KE , with KE
being the Evans gain of W (s).
11. Both for ω → 0 and for ω → ∞ the gradient to the Nyquist plot of a
rational function tends to an integer multiple of π2 .
Appendix C. Notions of Control in Continuous-Time 132
Bibliography
[2] A.E. Bryson and Y.C. Ho. Applied Optimal Control: Optimization, Estima-
tion, and Control. Halsted Press book’. Taylor & Francis, 1975.
[7] G.F. Franklin, J.D. Powell, and M.L. Workman. Digital control of dynamic
systems. Addison-Wesley world student series. Addison-Wesley, 1998.
[8] R.A. Horn and C.R. Johnson. Matrix Analysis. Cambridge University Press,
1990.
[9] E.I. Jury. Theory and application of the z-transform method. Wiley, 1964.