Signals Systems and Control
Signals Systems and Control
Epilogue 571
Acknowledgements
Some of the exercises in these lecture notes have been taken or adapted from
collections of exercises or exams conceived by colleagues to whom I am in-
debted for authorising their reproduction here. In particular, I thank profes-
sors Alexandra Moutinho, Carlos Cardeira, Jorge Martins, José Raul Azinheira,
Mário Ramalho, Miguel Ayala Botto, Paulo Oliveira, Pedro Lourtie and Rodrigo
Bernardo for this.
i
ii OVERVIEW OF CONTENTS
Contents
I Modelling 3
2 The Laplace transform 7
2.1. Denition, 7. 2.2. Finding Laplace transforms, 8. 2.3. Finding
inverse Laplace transforms, 10. 2.4. Important properties: derivatives
and integrals, 14. 2.5. What do we need this for?, 15. 2.6. More
important properties: initial and nal values, convolution, 17. 2.7. The
Fourier transform, 19. Glossary, 21. Exercises, 22.
3 Examples of mechatronic systems and signals 23
3.1. Systems, 23. 3.2. Signals, 28. 3.3. Models, 35. Glossary,
36. Exercises, 38.
4 Modelling mechanical systems 41
4.1. Modelling the translation movement, 41. 4.2. Simulating transfer
functions in Matlab, 47. 4.3. Modelling the rotational movement, 49.
4.4. Energy, eort and ow, 50. 4.5. Other components, 51. Glossary,
56. Exercises, 56.
5 Modelling electrical systems 61
5.1. Passive components, 61. 5.2. Energy, eort and ow, 64. 5.3. The
operational amplier (OpAmp), an active component, 68. 5.4. Other
components, 73. Glossary, 74. Exercises, 75.
6 Modelling uidic systems 79
6.1. Energy, eort and ow, 79. 6.2. Basic components of a uidic system,
80. 6.3. Other components, 83. Glossary, 83. Exercises, 85.
7 Modelling thermal systems 87
7.1. Energy, eort and ow, 87. 7.2. Basic components of a thermal
system, 87. Glossary, 91. Exercises, 91.
8 Modelling interconnected and non-linear systems 93
8.1. Energy, eort and ow, 93. 8.2. System interconnection, 95. 8.3.
Dealing with non-linearities, 97. Glossary, 99. Exercises, 100.
34.1. Frequency responses that require fractional order systems, 451. 34.2.
Frequency responses of fractional order systems, 453. 34.3. Identication
from the Bode diagram, 458. 34.4. Levy's method extended, 459.
Glossary, 462. Exercises, 462.
35 Fractional order derivatives 467
35.1. Gamma function, 467. 35.2. Two apparently simple examples,
471. 35.3. The Grünwald-Letniko denition of fractional derivatives,
473. 35.4. The Riemann-Liouville denition of fractional derivatives,
475. 35.5. Properties of fractional derivatives, 478. 35.6. Applications
of fractional derivatives, 479. Glossary, 480. Exercises, 480 .
36 Time responses of fractional order systems 483
36.1. The Mittag-Leer function, 483. 36.2. Time responses of simple
fractional order transfer functions, 485. 36.3. Stability of fractional sys-
tems, 486. 36.4. Identication from time responses, 488. 36.5. Final
comments about models of fractional order, 491. Exercises, 491.
VIII Stochastic systems 493
37 Stochastic processes and systems 497
37.1. Stochastic processes, 497. 37.2. Characterisation of stochastic pro-
cesses, 500. 37.3. Relations between stochastic processes, 510. 37.4.
Operations with stochastic processes, 515. Glossary, 517. Exercises, 518.
38 Spectral density 519
38.1. The bilateral Fourier transform, 519. 38.2. Denition and properties
of the spectral density, 522. 38.3. Numerical computation of the PSD and
CSD, 527. 38.4. White noise, 531. Glossary, 532. Exercises, 532.
39 Identication of continuous stochastic models 533
39.1. Identication in time, 533. 39.2. Identication in frequency, 537.
Glossary, 541. Exercises, 542.
40 Filter design 543
40.1. Wiener lters, 543. 40.2. Whitening lters, 546. Glossary, 547.
Exercises, 547.
41 Digital stochastic models 549
41.1. Types of digital stochastic models, 549. 41.2. Autocorrelation
of a MA, 552. 41.3. Partial autocorrelation of an AR, 554. 41.4.
Identication, 555. Glossary, 556. Exercises, 556.
42 Control of stochastic systems 557
42.1. Minimum variance control, 557. 42.2. Pole-assignment control,
564. 42.3. Control design for time-varying references, 566. 42.4. Adap-
tive control, 567. Glossary, 568. Exercises, 568.
Epilogue 571
43 What next? 571
43.1. Discrete events and automation, 571. 43.2. State-space representa-
tions of systems continuous in time, 571. 43.3. State-space representations
of systems discrete in time, 571. 43.4. MIMO systems and MIMO con-
trol, 571. 43.5. Optimal control, 572. 43.6. Fractional order control,
572. 43.7. Other areas, 572. Glossary, 572.
Chapter 1
Part II uses the models from Part I to study how systems behave.
Part III presents the technology used to measure signals and to control mechatronic
systems.
Part IV shows how controllers can be designed to make control systems behave as
desired.
2
wave elevation [m]
5
x 10
7
Uncontrolled 1
6 Controlled
5 0
Energy [J]
3 −1
2
−2
1
0
−3
0 100 200 300 400 500 600 700 800 900
−1
0 50 100 150 200 250 300 350 400 time [s]
Time [s]
1
2 CHAPTER 1. THE NAME OF THE GAME
Part VI explores system identication, i.e. ways of nding models from experimen-
tal data.
Part VII studies systems described by models with derivatives and integrals with
orders that are not integer numbers.
Part VIII covers systems with outputs that are not deterministic.
Modelling
3
5
Chapter 2 presents very handy mathematical tools for the resolution of dierential
equations, which we will need repeatedly in subsequent chapters.
Chapter 3 gives examples of mechatronic systems and signals, and the basic notions
related thereto.
The Laplace transform is a very important tool for the resolution of dif- Laplace transform
ferential equations. In this chapter we will study its denition, its properties,
its application to dierential equations (which is the reason we are studying this
subject), and the related Fourier transform, that we will also need.
2.1 Denition
Denition 2.1. Let t ∈ R be a real variable, and f (t) ∈ R a real-valued
function. The Laplace transform of function f , denoted by L [f (t)] or by F (s),
is a complex-valued function F (s) ∈ C of complex variable s ∈ C, given by
Z +∞
L [f (t)] = f (t)e−st dt (2.1)
0
Z +∞
L [f (t)] = f (t)e−st dt (2.2)
−∞
This bilateral Laplace transform is seldom used; we will use (2.1) instead, as is
common, and will need (2.2) only in Chapter 37. The price to pay for being
able to work with functions dened in R+ only will be addressed below in
section 2.4.
Remark 2.3. The Laplace transform is part of a group of transforms known
as integral transforms, given by
Z +∞
T [f (t)] = f (t)K(s, t) dt (2.3)
0
7
8 CHAPTER 2. THE LAPLACE TRANSFORM
The Laplace transform of function f (t) will only exist if the improper integral Existence of the Lap
in (2.1) converges. This will happen in one of two cases: transform
Otherwise, the integrand of (2.1) does not tend to 0 and it is obvious that the
improper integral will be innite. For complete rigour we also have to require
f (t) to be piecewise continuous for F (s) to exist, otherwise the Riemann integral
would not exist.
Remark 2.4. In fact (2.1) may converge only for some values of s, and thus have
a region of convergence which is smaller than C; but then it can be analytically
extended to the rest of the complex plane. This is a question we will not worry
about.
L [e−at ] Example 2.2. Let f (t) be a negative exponential, f (t) = e−at . Then
Z +∞
L e −at
e−at e−st dt
=
0
+∞
e−(a+s)t e−∞ e0
1
= =− − − = . (2.7)
−a − s 0 s+a s+a s+a
While Laplace transforms can be found from denition as in the two exam-
ples above, in practice they are found from tables, such as the one in Table 2.1.
To use with prot Laplace transform tables, it is necessary to prove rst the
following result.
L is linear Theorem 2.1. The Laplace transform is a linear operator:
L [k f (t)] = k F (s), k∈R (2.8)
L [f (t) + g(t)] = F (s) + G(s) (2.9)
Proof. Both (2.8) and (2.9) are proved from the linearity of the integration
operator:
Z +∞ Z +∞
L [k f (t)] = k f (t)e −st
dt = k f (t)e−st dt = k F (s) (2.10)
0 0
Z +∞
L [f (t) + g(t)] = (f (t) + g(t)) e−st dt (2.11)
0
Z +∞ Z +∞
= f (t)e−st dt + g(t)e−st dt = F (s) + G(s)
0 0
x (t) X (s)
1 δ (t) 1
1
2 H (t)
s
1
3 t
s2
2
4 t2
s3
1
5 e−at
s+a
a
6 1 − e−at
s (s + a)
1
7 te−at 2
(s + a)
n!
8 tn e−at , n ∈ N n+1
(s + a)
ω
9 sin (ωt)
s2 + ω 2
s
10 cos (ωt)
s2 + ω 2
ω
11 e−at sin (ωt)
(s + a)2 + ω 2
s+a
12 e−at cos (ωt) 2
(s + a) + ω 2
1 1
13 e−at − e−bt
b−a (s + a)(s + b)
1 1 1
14 b e−at − a e−bt
1+
ab a−b s(s + a)(s + b)
ωn −ξωn t ωn2
15 e sin (ωn Ξt)
Ξ s2 + 2ξωn s + ωn2
1 s
16 − e−ξωn t sin (ωn Ξt − φ)
Ξ s + 2ξωn s + ωn2
2
1 −ξωn t ωn2
17 1− e sin (ωn Ξt + φ)
Ξ 2
s (s + 2ξωn s + ωn2 )
p Ξ
In this table: Ξ = 1 − ξ 2 ; φ = arctan
ξ
10 CHAPTER 2. THE LAPLACE TRANSFORM
3 1 3s + 32 − s 2s + 9
= − 2 = 2 = 3 (2.13)
s (s + 3) (s + 3) s (s + 3) s + 6s2 + 9s
Partial fraction expansion Example 2.6. The inverse Laplace transform of F (s) = s2 +13s+30 s+2
is obtained
from line 5 of Table 2.1 together with (2.8). But for that it is necessary to develop
F (s) in a partial fraction expansion. First we nd the roots of the polynomial
in the denominator, which are −3 and −10. So s2 + 13s + 30 = (s + 3)(s + 10),
and we can write
s+2 A B
= + (2.15)
s2 + 13s + 30 s + 3 s + 10
where A and B still have to determined:
A B As + 10A + Bs + 3B s(A + B) + (10A + 3B)
+ = = (2.16)
s + 3 s + 10 (s + 3)(s + 10) s2 + 13s + 30
s+2 − 17 8
So = + 7
, and nally
s2 + 13s + 30 s + 3 s + 10
1 8
−7
s+2
L −1
=L −1
+ 7
(2.18)
s2 + 13s + 30 s + 3 s + 10
1 8
−7 1 8
= L −1 + L −1 7
= − e−3t + e−10t
s+3 s + 10 7 7
Remark 2.5. Notice that the result in line 13 of Table 2.1 can be obtained
from line 5 also using a partial fraction expansion:
We want
( ( (
−1
A+B =0 B = −A B=
⇔ ⇔ b−a
1
(2.20)
Ab + aB = 1 Ab − aA = 1 A= b−a
and thus
" 1 # " −1 #
1 b−a b−a
L −1 =L −1
+L −1
(2.21)
(s + a)(s + b) s+a s+b
1 −at −1 −bt 1
e−at − e−bt
= e + e =
b−a b−a b−a
2.3. FINDING INVERSE LAPLACE TRANSFORMS 11
ial fraction expansion Example 2.7. The inverse Laplace transform of F (s) = 4s2 +13s−2
(s2 +2s+2)(s+4) is ob-
complex roots tained from lines 5, 15 and 16 of Table 2.1 together with 2.8 and 2.9. The
transforms in lines 14 and 15 are used because the roots of 4s2 + 13s − 2 are
complex and not real (−1 ± j , to be precise). So we will leave that second order
term intact and we make
4s2 + 13s − 2 As + B C As2 + 4As + Bs + 4B + Cs2 + 2Cs + 2C
2
= 2 + =
(s + 2s + 2)(s + 4) s + 2s + 2 s + 4 (s2 + 2s + 2)(s + 4)
s2 (A + C) + s(4A + B + 2C) + (4B + 2C)
= (2.22)
(s2 + 2s + 2)(s + 4)
Hence
A + C = 4
C = 4 − A
C = 4 − A
C = 1
4A + B + 2C = 13 ⇔ 4A + B + 8 − 2A = 13 ⇔ 2A + B = 5 ⇔ A=3
4B + 2C = −2 4A − 3B = 15 4A − 3B = 15 B = −1
(2.23)
Finally,
4s2 + 13s − 2
3s − 1 1
L −1
=L −1
+ (2.24)
(s2 + 2s + 2)(s + 4) s2 + 2s + 2 s + 4
s 1 2 1
= 3L −1 2 − L −1 2 + L −1
s + 2s + 2 2 s + 2s + 2 s+4
and since for the rst two terms we have
√
ω= 2 (2.25)
ξω = 1 (2.26)
1
ξ=√ (2.27)
2
r
1 1
Ξ= 1− =√ (2.28)
2 2
ωΞ = 1 (2.29)
√1
2 π
ϕ = arctan = (2.30)
√1 4
2
we arrive at
4s2 + 13s − 2 √ −t
π 1 −t
L −1 = −3 2e sin t − − 2e sin(t) + e−4t
(s2 + 2s + 2)(s + 4) 4 2
h √ π π i
−4t −t
=e +e −3 2 sin t cos − cos t sin − sin t
4 4
√
−4t −t 1 1
=e +e −3 2 sin t √ − cos t √ − sin t
2 2
= e−4t + e−t (−4 sin t + 3 cos t) (2.31)
Remark 2.6. If in the example above we had decided to expand the second
order term and use only line 5 of Table 2.1, we would have arrived at the very
same result, albeit with more lengthy and tedious calculations involving complex
numbers. We would have to separate s23s−1
+2s+2 in two as follows:
3s − 1 A + Bj C + Dj
= + (2.32)
s2 + 2s + 2 s+1+j s+1−j
As + A − Aj + Bjs + Bj + B + Cs + C + Cj + Djs + Dj − D
=
s2 + s − js + s + 1 − j + js + j + 1
s(A + C) + js(B + D) + (A + B + C − D) + j(−A + B + C + D)
=
s2 + 2s + 2
Then
C = 23
A+C =3
C =3−A
B + D = 0
D = −B
D = 2
⇔ ⇔
A + B + C − D = −1 A + B + 3 − A + B = −1 B = −2
−A + B + C + D = 0 −A + B + 3 − A − B = 0 A = 32
(2.33)
12 CHAPTER 2. THE LAPLACE TRANSFORM
Consequently
3 3
4s2 + 13s − 2 2 − 2j
2 + 2j 1
L −1 =L −1
+ +
(s2 + 2s + 2)(s + 4) s+1+j s+1−j s+4
3 1 3 1 1
= − 2j L −1
+ + 2j L −1
+L −1
2 s+1+j 2 s+1−j s+4
3 3
= − 2j e−(1+j)t + + 2j e−(1−j)t + e−4t
2 2
−4t 3 −t 3
=e + − 2j e (cos(−t) + j sin(−t)) + + 2j e−t (cos t + j sin t)
2 2
−4t −t 3 3
=e +e cos t − j sin t − 2j cos t − 2 sin t+
2 2
3 3
+ cos t + j sin t + 2j cos t − 2 sin t
2 2
= e−4t + e−t (3 cos t − 4 sin t) (2.34)
Notice how all the complex terms appear in complex conjugates, so that the
imaginary parts cancel out. This has to be the case, since f (t) is a real-valued
function.
Partial fraction expansion Example 2.8. The inverse Laplace transform of F (s) = s2 +22s+119
(s+10)3 is obtained
with multiple roots from lines 5, 7 and 8 of Table 2.1 together with (2.8) and (2.9):
s2 + 22s + 119 A B C
3
= + 2
+
(s + 10) s + 10 (s + 10) (s + 10)3
2
As + 20As + 100A + Bs + 10B + C
= (2.35)
(s + 10)3
Hence
A = 1
A = 1
20A + B = 22 ⇔ B=2 (2.36)
100A + 10B + C = 119 C = −1
Finally,
2
−1 s + 22s + 119 1 2 −1
L =L −1
+ + (2.37)
(s + 10)3 s + 10 (s + 10)2 (s + 10)3
1 2 1 −1 2
=L −1
+ 2L −1
− L
s + 10 (s + 10)2 2 (s + 10)3
−10t −10t 1 2 −10t −10t 1 2
=e + 2t e − t e =e 1 + 2t − t
2 2
Division of polynomials Example 2.9. The inverse Laplace transform of F (s) = 2s+145
s+70 is obtained
from lines 1 and 5 of Table 2.1, but for that it is necessary to begin by dividing
the numerator of F (s) by the denominator. Because the denominator is of rst
order, in this case polynomial division can be carried out with Runi's rule
(otherwise a long division would be necessary):
2 145
−70 −140 (2.38)
2 5
2s + 145 5
So =2+ , and nally
s + 70 s + 70
2s + 145 1
L −1 = 2L −1 [1] + 5L −1
s + 70 s + 70
= 2δ(t) + e−70t (2.39)
Example 2.11. The roots of 4s3 + 3s2 + 2s + 1 are −0.6058, −0.0721 + 0.6383j
and −0.0721 − 0.6383j :
Example 2.13. The partial fraction expansion (2.18) from Example 2.6 is Matlab's command
obtained as residue
>> [r,p,k] = residue([1 2],[1 13 30])
r =
1.1429
-0.1429
p =
-10
-3
k =
[]
Vector r contains the residues or numerators of the fractions in the partial Residues
fraction expansion. Vector p contains the poles or roots of the denominator Poles
of the original expression. Vector k contains (the coecients of the polynomial
which is) the integer part of the polynomial division, which in this case is 0
because the order of the denominator is higher than the order of the numerator.
The polynomials of the original rational function can be recovered feeding
this function back vectors r, p and k:
Example 2.14. The partial fraction expansion (2.34) from Example 2.7 and
Remark 2.6 is obtained as
14 CHAPTER 2. THE LAPLACE TRANSFORM
Example 2.15. The partial fraction expansion from Example 2.9 is obtained
as
>> [r,p,k] = residue([2 145],[1 70])
r =
5
p =
-70
k =
2
Notice how this time there is an integer part of the polynomial division, since
the order of the numerator is not lower than the order of the denominator.
Example 2.16. From
>> [r,p,k] = residue([1 2 3 4 5 6],[7 8 9 10])
r =
0.1451 + 0.0000i
-0.0276 - 0.2064i
-0.0276 + 0.2064i
p =
-1.1269 + 0.0000i
-0.0080 + 1.1259i
-0.0080 - 1.1259i
k =
0.1429 0.1224 0.1050
we learn that
s5 + 2s4 + 3s3 + 4s2 + 5s + 6
(2.40)
7s3 + 8s2 + 9s + 10
0.1451 −0.0276 − 0.2064j −0.0276 + 0.2064j
= 0.1429s2 + 0.1224s + 0.1050 + + +
s + 1.1269 s + 0.0080 − 1.1259j s + 0.0080 + 1.1259j
u v0
Z +∞ z}|{ z}|{
L [f (t)] = f (t) e−st dt
0
+∞ Z +∞
e−st e−st
= f (t) − f 0 (t) dt
−s 0 0 −s
e−st e0 1 +∞ 0
Z
= lim f (t) − f (0) + f (t)e−st dt (2.42)
t→+∞ −s −s s 0
2.5. WHAT DO WE NEED THIS FOR? 15
The limit has to be 0, otherwise F (s) would not exist. The integral is, by
denition, L [f 0 (t)]. From here (2.41) is obtained rearranging terms.
Proof. This is proved by mathematical induction. The rst case is (2.41). The
inductive step is proved applying (2.41) to (2.45) as follows:
n+1 n
dn f (t)
d d
L f (t) = s L f (t) − (2.46)
dtn+1 dtn dtn t=0
n
!
dk−1 f (t) dn f (t)
X
= s sn F (s) − sn−k −
dtk−1 t=0 dtn t=0
k=1
n k−1
!
dn f (t)
n−k+1 d f (t)
X
n+1
=s F (s) − s −
dtk−1 t=0 dtn t=0
k=1
n
!
k−1 k−1
n+1−k d f (t) n+1−k d f (t)
X X
n+1
=s F (s) − s − s
dtk−1 t=0 dtk−1 t=0
k=1 k=n+1
Z t
1
L f (t) = F (s) (2.47)
0 s
Remark 2.7. Notice that the Laplace transform of a derivative (2.41) involves
f (0), the value of the function itself at t = 0. This is because we are using
the Laplace transform as dened by (2.1), rather than the bilateral Laplace
transform (2.2).
Example 2.17. Solve the following dierential equation, assuming that y(0) =
0:
y 0 (t) + y(t) = e−t (2.50)
16 CHAPTER 2. THE LAPLACE TRANSFORM
as desired.
Notice how the Laplace transform turned the dierential equation in t into
an algebraic equation in s, which is trivial to solve. All that is left is to apply
the inverse Laplace transform to turn the solution in s into a solution in t.
Take care of non-null ini- Initial conditions must be taken into account if they are not zero.
tial conditions
Example 2.18. Solve the following dierential equation, assuming that y(0) =
1
3 and y 0 (0) = 0:
y 00 (t) + 4y 0 (t) + 3y(t) = 4et (2.53)
Using the Laplace transform, we get
2 1 1 4
s Y (s) − s − 0 + 4 sY (s) − + 3Y (s) = ⇔
3 3 s−1
s 4 4
⇔ Y (s) s2 + 4s + 3 − − = (2.54)
3 3 s−1
Because s2 + 4s + 3 = (s + 1)(s + 3), we get
4 1 s+4
Y (s) = + (2.55)
(s − 1)(s + 1)(s + 3) 3 (s + 1)(s + 3)
We now need two partial fraction expansions:
4 1 s+4 A B C 1 D E
+ = + + + +
(s − 1)(s + 1)(s + 3) 3 (s + 1)(s + 3) s−1 s+1 s+3 3 s+1 s+3
A(s + 4s + 3) + B(s + 2x − 3) + C(s2 − 1) 1 Ds + 3D + Es + E
2 2
= +
(s − 1)(s + 1)(s + 3) 3 (s + 1)(s + 3)
2
s (A + B + C) + s(4A + 2B) + (3A − 3B − C) 1 s(D + E) + (3D + E)
= +
(s − 1)(s + 1)(s + 3) 3 (s + 1)(s + 3)
(2.56)
whence
1
A + B + C = 0
4A − 2B = 4
8A = 4
A = 2
4A + B = 0 ⇔ 4A + B = 0 ⇔ B = −2A ⇔ B = −1
C = 12
3A − 3B − C = 4 C = 3A − 3B − 4 C = 3A − 3B − 4
(2.57)
and
( ( (
D+E =1 E =1−D E = − 12
⇔ ⇔ (2.58)
3D + E = 4 2D = 3 D = 32
Thus
1 1 3 1
1 1
y(t) = L −1 2
+ 2 +
− 2
− 2 (2.59)
s−1 s+1 s+3 3 s+1 s+3
1 1 1 3 −t 1 −3t 1 1 1
= et − e−t + e−3t + e − e = et − e−t + e−3t
2 2 3 2 2 2 2 3
It is easy to verify that this is indeed the solution: on the one hand,
1 t 1 −t
y 0 (t) = e + e − e−3t (2.60)
2 2
1 1 −t
y 00 (t) = et − e + 3e−3t (2.61)
2 2
2.6. MORE IMPORTANT PROPERTIES: INITIAL AND FINAL VALUES, CONVOLUTION 17
and thus
1 t 1 −t 3 3
y 00 (t) + 4y 0 (t) + 3y(t) = e − e + 3e−3t + 2et + 2e−t − 4e−3t + et − e−t + e−3t
2 2 2 2
= 4e t
(2.62)
as desired; on the other hand,
1 1 1 1
y(0) = − + = (2.63)
2 2 3 3
1 1
y 0 (t) = + − 1 = 0 (2.64)
2 2
as required.
Remark 2.8. Notice what would have happened if we had forgot to include
initial conditions. It would have been as if initial conditions were null, and we
would have got
4 4
s2 Y (s) + 4sY (s) + 3Y (s) = ⇔ Y (s) s2 + 4s + 3 = (2.65)
s−1 s−1
and then
1 1
1 1 1
y(t) = L −1 2
− + 2 = et − e−t + e−3t (2.66)
s−1 s+1 s+3 2 2
In this case,
1 t 3
y 0 (t) = e + e−t − e−3t (2.67)
2 2
1 9
y 00 (t) = et − e−t + e−3t (2.68)
2 2
and so it remains true that
1 9 12 −3t 3 t 3
y 00 (t) + 4y 0 (t) + 3y(t) = et − e−t + e−3t + 2et + 4e−t − e + e − 3e−t + e−3t
2 2 2 2 2
= 4et (2.69)
but the initial conditions are indeed
1 1
−1+ =0
y(0) = (2.70)
2 2
1 3
y 0 (t) = + 1 − = 0 (2.71)
2 2
To conclude: if in fact initial conditions were as in Example 2.18, and if we had
written (2.65) instead of (2.54), we would get a wrong result.
Example 2.19. Let f (t) = e−at , a > 0. We know that limt→+∞ f (t) = 0. We
have F (s) = s+a
1
. And lims→0 s F (s) = lims→0 s+a s
= 0.
Notice that, when a < 0, it is still true that F (s) = s+a
1
and that lims→0 s F (s) =
lims→0 s+a = 0. But now limt→+∞ f (t) = +∞, which is not real.
s
Initial value theorem Theorem 2.5. If f (t) and f 0 (t) have Laplace transforms,
lim f (t) = lim s F (s) (2.74)
t→0+ s→+∞
In the integrand, e−st goes to zero as s → +∞. If f 0 (t) has a Laplace trans-
form, it must be of exponential
R +∞ 0 order, and thus e−st goes to zero faster enough
to ensure that lims→+∞ 0 f (t)e −st
dt = 0. Because we are assuming the uni-
lateral Laplace transform denition, f (0) is in reality limt→0+ f (t), as whatever
may happen for t < 0 is not taken into account.
Example 2.21. Let f (t) = e−at . We know that limt→0+ f (t) = 1. We have
1
F (s) = s+a . And lims→+∞ s F (s) = lims→0 s+a
s
= 1.
Notice that, unlike what happened when we applied the nal value theorem
in Example 2.19, there is now no need to restrict a > 0.
Example 2.22. Let F (s) = s(s+a) . We have lims→+∞ s F (s) = lims→+∞ s+a =
1 1
Convolution Denition 2.2. Given two functions f (t) and g(t) dened for t ∈ R+ , their
convolution, denoted by ∗, is a function of t given by
Z t
f (t) ∗ g(t) = f (t − τ )g(τ ) dτ (2.76)
0
Proof.
Z +∞ Z t
L [f (t) ∗ g(t)] = f (t − τ )g(τ ) dτ e−st dt (2.79)
0 0
2.7. THE FOURIER TRANSFORM 19
We now apply to the inner integral the change of variables t = t − τ , for which
dt = dt. With this change of variables, when t = 0 we have t = −τ , and when
t → +∞ we have t → +∞ too.
Z +∞ Z +∞
L [f (t) ∗ g(t)] = g(τ ) f (t)H(t)e−s(τ +t) dt dτ (2.82)
0 −τ
All that is left is taking outside integrals terms that do not depend on the
corresponding variables:
Z +∞ Z +∞
L [f (t) ∗ g(t)] = g(τ )e−sτ f (t)e−st dt dτ
0 0
Z +∞ Z +∞
= f (t)e−st dt g(τ )e−sτ dτ (2.84)
0 0
Z t Z t
1 −1 1 1
L −1 = L = H(t − τ )H(τ ) dτ = 1 dτ = t (2.85)
s2 s s 0 0
Remark 2.9. The function obtained is known as the unit slope ramp: Unit slope ramp
(
t, if t ≥ 0
f (t) = (2.86)
0, if t < 0
x (t) X (s)
Z∞
1
14 x (t) X (u) du
t
s
ZT
1
15 x (t) = x (t + T ) e−su X (u) du
1 − e−sT
0
16 x (0) lim sX (s)
s→∞
=[s]
jω, ω ∈ R+
jω, ω = 0
<[s]
jω, ω ∈ R−
While it should now be clear what we need Laplace transforms for, we will
only see what we need Fourier transforms for in chapter 10. A more detailed
study of this transform is found in Chapter 38.
Glossary
I said it in Hebrew I said it in Dutch
I said it in German and Greek:
But I wholly forgot (and it vexes me much)
That English is what you speak!
Exercises
1. Find the Laplace transforms of the following functions:
cos a sin b.
(a) F (s) = 1
3s2 +15s+18
(b) F (s) = 1
5s2 +6s+5
8s2 +34s−2
(c) F (s) = s3 +3s2 −4s
s2 +2s+8
(d) F (s) = 2s+4
−s2 +5s−2
(e) F (s) = s3 −2s2 −4s+8
3. Consider dierential equation (2.50) from Example 2.17, but now with the
initial condition y(0) = 2.
h i
(a) Show that y(t) = L −1 (s+1)2s
2 + (s+1)2 .
3
(c) Find y(t) and check that it veries both the dierential equation
(2.50) and the new initial condition.
5. Use the nal value and initial value theorems to nd the initial and nal
values of the inverse Laplace transforms of the functions of Exercise 2.
7. Prove the result in line 7 of Table 2.1. Hint: use (2.78) together with the
result in line 5.
8. Prove the result in line 8 of Table 2.1. Hint: use mathematical induction.
Chapter 3
Examples of mechatronic
systems and signals
Eia comboios, eia pontes, eia hoteis à hora do jantar,
Eia aparelhos de todas as espécies, férreos, brutos, mínimos,
Instrumentos de precisão, aparelhos de triturar, de cavar,
Engenhos, brocas, máquinas rotativas !
Eia ! eia ! eia !
Eia electricidade, nervos doentes da Matéria !
Eia telegraa-sem-os, simpatia metálica do Inconsciente !
3.1 Systems
In chapter 1 we have already dened system as the part of the Universe we want
to study.
A system made up of physical components may be called a plant. A system Plant
which is a combination of operations may be called a process. Process
Example 3.1. WECs, mentioned in Example 1.1, are plants. Figures 3.1, 3.2
and 3.3 show three dierent WECs; many other such devices exist.
The variables describing the characteristics of the system that we are inter-
ested in are its outputs. The variables on which the outputs depend are the Outputs
system's inputs. Inputs in the general sense
23
24CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.2: The Archimedes Wave Swing, a submerged oshore Wave Energy
Converter before submersion, at Viana do Castelo, Portugal. The device is lled
with air which is compressed when wave crests pass and expands during wave
troughs. The heaving movement of the AWS upper part moves an electrical
linear generator.
Figure 3.3: The Pico Power Plant (concluded in 1999, decommissioned in 2018),
an onshore Wave Energy Converter of the Oscillating Water Column (OWC)
type (source: left, WavEC; right, DOI 10.3390/en11112939). In an OWC, the
heaving movement of the water inside a chamber compresses and expands the
air, which can ow in and out the chamber through a turbine designed to always
rotate in the same direction irrespective of the sense of the ow. The turbine
drives a usual rotational generator.
3.1. SYSTEMS 25
Figure 3.4: A Panhard & Levassor Type A motorcar, the rst mass produced
car in the world, driven by the French priest Jules Gavois (1863 1946) in
1891 (source: Wikimedia). This car still does not have a steering wheel (rst
introduced in 1894), but only a tiller.
Figure 3.5: A window unit air conditioning system (source: Wikimedia). There
are many other types of AC units.
A control system is one devised to make one or more of the system's Control system
outputs follow some reference. Reference
Example 3.4. An air conditioning (AC) unit (see Figure 3.5) is a mechatronic
system that heats or cools a room to a temperature set by the user. It is
consequently a control system. The value of the temperature selected by the
AC user is the reference. The room's temperature is the output of the plant
that has to follow this reference.
Example 3.5. The wind at the location of a wind turbine is related to the
temperature, the solar exposition, and the atmospheric pressure, among other
variables. This is a process we cannot control. It is not a control system.
inputs to the inputs in the strict sense, and to call outputs only to the variable
or variables that have to follow a reference.
Example 3.6. In the case of the OWC from Example 3.1 and Figure 3.3, the
sea waves are disturbances, since we cannot control them. The rotation speed
of the turbine is an input in the strict sense, since we can manipulate it (e.g.
varying the resistance of the electrical generator). If the OWC chamber has
a relief valve, the pressure in the chamber will be also an input, since we can
change it opening or closing the relief valve.
Example 3.7. In the case of the car from Example 3.3, the positions of the
steering wheel and of the pedals are inputs. If the car has a manual gear box, the
gear selected is an input too; if the gear box is automatic, it is not. The gusts
of wind are a disturbance, since we cannot modify them. If we are studying the
temperature of the motor of the car, this will depend on the outside temperature,
which we cannot control and is therefore a disturbance.
A system with only one input and only one output is a Single-Input, Single-
SISO system Output (SISO) system. A system with more than one input and more than one
MIMO system output is a Multi-Input, Multi-Output (MIMO) system. It is of course possible
to have Single-Input, Multiple-Output (SIMO) systems, and Multiple-Input,
Single-Output (MISO) systems. These are usually considered as particular
cases of MIMO systems.
Example 3.8. Both the OWC of Example 3.1 and the car of Example 3.3 are
MIMO plants.
Example 3.9. The lever in Figure 3.6 is a SISO system: if the extremities are
at heights x(t) and y(t), and the rst is actuated, then y(t), the output, depends
on position x(t), the input, and nothing more.
Remark 3.1. We can sometimes model a part of a MIMO system as a separate
SISO system. A car is a MIMO system, as we said, but we can model the
suspension of one wheel separately, as a SISO system relating the position of the
wheel to the position of the vehicle frame, neglecting the inuence that all the
other inputs have on this particular output. Such a model is an approximation,
but for many purposes it is good enough (as we will see in Example 4.2, in
Chapter 4 below).
Model A system's model is the mathematical relation between its outputs, on the
one hand, and its inputs in the general sense (inputs in the strict sense and
disturbances), on the other.
Linear system A system is linear if its exact model is linear, and non-linear if its exact
Non-linear system model is non-linear. Of course, exact non-linear models can be approximated
by linear models, and often are, to simplify calculations.
Example 3.10. The lever of Figure 3.6 is a linear plant, since, if its arm lengths
are Lx and Ly for the extremities at heights x(t) and y(t) respectively,
Ly
y(t) = x(t). (3.1)
Lx
Example 3.11. A Cardan joint (see Figure 3.7) connecting two rotating shafts,
with a bent corresponding to angle β , is a non-linear plant, since a rotation of
θ1 (t) in one shaft corresponds to a rotation of the other shaft given by
tan θ1 (t)
θ2 (t) = arctan . (3.2)
cos β
3.1. SYSTEMS 27
tan θ1 (t)
θ2 (t) = arctan = θ1 (t). (3.3)
1
The error incurred in approximating (3.2) by (3.3) depends on how close cos β
is to 1. There will be no error at all if the two shafts are perfectly aligned
(β = 0).
A system is time-varying if its exact model changes with time, and time- Time-varying system
invariant otherwise. Time-invariant system
Example 3.14. A drone powered by a battery will not have a similar variation
of mass. It is a time-invariant system (unless e.g. its mass changes because it is
a parcel-delivering drone).
Example 3.15. WECs can have time-varying parameters due to the eects of
tides. This is the case of the AWS in Figure 3.2, which is submerged and xed
to the ocean bottom. Consequently, the average height of sea water above it
varies from low tide to high time, even if the sea waves remain the same. Other
WECs are time-invariant, at least with respect to tides. That is the case of the
oating OWC in Figure 3.8, which, precisely because it oats, is not aected by
tides.
Example 3.16. Both mechanical systems in Figures 3.6 and 3.7 have no dy-
namics, since the output y(t) only depends on the current value of the input
u(t). Past values of the input are irrelevant.
Example 3.17. Consider a pipe with a tap (or a valve) that delivers a ow
rate Q(t) given by
Q(t) = kQ f (t) (3.4)
where f (t) ∈ [0, 1] is a variable that tells is if the tap is open (f (t) = 1) or closed
(f (t) = 0). This system is static. But a tap placed far from the point where the
ow exits the pipe will deliver a ow given by
Q(t) = kQ f (t − τ ) (3.5)
Here, τ is the time the water takes from the tap to the exit of the pipe. This is
an example of a dynamic plant, since its output at time instant t depends on a
past value of f (t).
28CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
A system is deterministic if the same inputs starting from the same initial Deterministic system
condition always lead to the same output. A system is stochastic if its outputs Stochastic system
are not necessarily the same when it is subject to the same inputs beginning
with the same initial conditions, or, in other words, if its output is random.
Example 3.18. The process from Example 3.5 is stochastic. Even though we
may know all those variables, it is impossible to precisely predict the wind speed.
The same happens with the process from Example 3.2, and even more so.
Example 3.19. Figure 3.9 shows a laboratory setup to test controllers for the
lithography industry (which produces microchips with components positioned
with precisions of the order of 1 nm). This is a deterministic system. If lithog-
raphy plants and processes were not deterministic, it would be far more dicult
to mass produce microchips.
3.2 Signals
In chapter 1 we have already dened signal as a function of time or space that
conveys information about a system. In other words, it is the evolution with
time or with space of some variable that conveys information about a system.
Most of the signals we will meet depend on time but not on space.
Quantised signal Some signals can only take values in a discrete set; they are called quantised
Analogical signal signals. Others can take values in a continuous set; they are called analogical
signals.
Example 3.21. Consider a turbine, such as the turbine in Figure 3.10, of the
Wells type, installed in the Pico Power Plant (shown above in Figure 3.3). Its
rotation speed is real valued; it takes values in a continuous set. So the signal
consisting in the turbine's rotation speed as a function of time is an analogical
signal.
3.2. SIGNALS 29
Figure 3.9: Left: precision positioning system used at the Delft University of
Technology (source: DOI 10.1007/s11071-019-05130-2). Coil actuators 1 move
masses 2, which are connected through exures to mass 3, the position of which
is measured using sensors (encoders) 4. Mass 2 can be positioned with a preci-
sion of 1 µm or less. Right: NASA clean room for lithography (source: Wiki-
media).
Figure 3.10: The Wells turbine of the Pico Power Plant OWC in Figure 3.3
(source: DOI 10.1016/j.renene.2015.07.086).
30CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.11: Three-speed manual gearbox, typical of cars in the 1930s (source:
Wikimedia).
Example 3.22. Consider the gearbox of a car (see Figure 3.11). The signal
consisting in the speed engaged as a function of time (neutral, reverse, 1st, 2nd,
etc.) takes values in a discrete set. It is a quantised signal.
Remark 3.2. It is possible, and sometimes desirable, to approximate a quan-
tised signal by an analogical signal, and vice-versa.
Example 3.23. The rotation of a shaft θ(t) is an analogical signal; it is of course
possible to rotate the shaft by an angle as small as desired. But it is often useful
to replace it by a discrete signal ϑ(t) which is the number of revolutions (i.e. the
number of 360◦ jrotations
k of the shaft). This corresponds to an approximation
θ(t)
given by ϑ(t) = 360◦ . Figure 3.12 shows a mechanical revolution counter.
Figure 3.12: Mechanical 19th century revolution counter, from the former Bar-
badinhos water pumping station (currently the Water Museum), Lisbon. Nowa-
days mechanical revolution counters are still used, though electronic ones exist.
Some signals take values for all time instants: they are said to be continu- Continuous signal
ous. Others take values only at some time instants: they are said to be discrete Discrete signal
in time, or, in short, discrete. The time interval between two consecutive values
of a discrete signal is the sampling time. The sampling time may be variable Sampling time
(if it changes between dierent samples), or constant. In the later case, which
makes mathematical treatment far more simple, the inverse of the sampling time
is the sampling frequency. Sampling frequency
Example 3.26. The air pressure inside the chamber of an OWC is a continuous
signal: it takes a value for every time instant.
Example 3.27. The number of students attending the several classes of this
course along the semester is a discrete signal: there is a value for each class, and
the sampling time is the time between consecutive classes. The sampling time
may be constant (if there is e.g. one laboratory class every Monday) or variable
(if there are e.g. two lectures per week on Mondays and Wednesdays).
Example 3.28. One of the controllers used with the laboratory setup from
Example 3.19 in Figure 3.9 provided a discrete control action with sampling
frequency 20 kHz. So the sampling time was
1
Ts = = 50 × 10−6 s = 50 µs, (3.7)
20 × 103
or, in other words, every 50×10−6 s the control action for the coil actuators was
updated; or, again, the control action was updated 20 × 103 times per second.
The sampling frequency could also be given as
2π
ωs = = 2π × 20 × 103 = 125.7 × 103 rad/s. (3.8)
50 × 10−6
Remark 3.3. Mind the numerical dierence between the value of the sampling
frequency in Hertz and in radians per second. It is a common source of mistakes
in calculations.
Example 3.29. The control action from Example 3.28 had in fact to be con-
verted into a continuous signal to be applied by the coil actuators. As described,
this was done by keeping the control action signal constant between sampling
times. The operation corresponds to converting a discrete signal as seen in
the left of Figure 3.13 into a continuous signal as seen in the right diagram of
that Figure. The conversion of a digital signal into an analogical signal will be
addressed in detail in Chapter 25.
32CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.13: Left: discrete signal; right: continuous signal obtained from the
discrete signal by keeping the previous value between sampling times (source:
Wikimedia, modied).
A signal which is both discrete and quantised is a digital signal. Digital signal
A system, too, is said to be continuous, discrete, or digital, if all its inputs Continuous system
and outputs are respectively continuous, discrete, or digital. Discrete system
Electronic components are nowadays ubiquitous. As a result of sensors, Digital system
actuators, controllers, etc. being electronic, most signals are digital. Likewise,
systems that incorporate such components are digital, inasmuch their inputs
and outputs are all digital.
Example 3.31. Consider an industrial oven, seen in Figure 3.15, with a control
system to regulate its temperature. The output of this system is the actual
temperature inside the oven, and the input is the desired temperature (i.e. the
reference of the control system). The oven is heated by gas, and so the gas ow is
the manipulated variable that allows controlling the oven. This is a continuous
system, since all variables exist in all time instants. But, in all likelihood, a
digital sensor will be used for the temperature, and changes in gas ow will also
take place at sampling times, after the temperature reading is compared with
the reference and processed to nd the control action that will better eliminate
the error between actual and desired temperatures. So in practice the system
will probably be digital.
Example 3.32. A ush tank for a toilet equipped with a oat valve as seen
in the top scheme of Figure 3.16 is a control system devoid of any electronic
component, and for which all signals are continuous. (See also Figure 3.17.)
This is a continuous control system.
Bounded signal A signal is bounded if it can only assume values in a bounded interval. In
engineering, most signals (if not all) are bounded.
Example 3.33. The wave elevation at given coordinates cannot be less than
the depth of the sea there. Similarly, the rotation speed of a turbine, or the
linear velocity of a shaft, or a voltage in a circuit, are always limited by physical
constraints.
Remark 3.5. Bounded continuous signals can assume innite values, but bounded
quantised signals can only assume a nite number of values.
3.2. SIGNALS 33
Figure 3.15: Industrial oven for aircraft component manufacture (source: Wiki-
media).
Figure 3.16: Top: oat valve mechanism, well known by its use in ush tanks
(source: Wikimedia). Bottom: ush tank with a oat valve (notice that the lever
has two arms, to increase the speed with which the water ow is interrupted as
soon as the oat raises the level from the lower end of stroke).
34CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.17: Top: a oat valve (see Figure 3.16) was also used in water me-
ters devised by António Pinto Bastos in the 1850s, which were used in Lisbon
until the 1960s in spite of being obsolescent for a long time by then (source:
Wikimedia). These meters were purely mechanical. Bottom: electromagnetic
ow meters have no mechanical components; the reading can be sent elsewhere
rather than having to be read in the dials in loco (source: Wikimedia). We will
address sensors for ow measurements in Chapter 13.
3.3. MODELS 35
3.3 Models
In Section 3.1 we have already dened a system's model as a mathematical rela-
tion between its inputs and outputs. There are basically two ways of modelling
a system:
1. A model based upon rst principles is a theoretical construction, re- First principles model
sulting from the application of physical laws to the components of the
plant.
2. A model based upon experimental data results from applying identi- Experimental model
cation methods to data experimentally obtained with the plant.
It is also possible to combine both these methods.
In this course we will concentrate on models based upon rst principles, and
you will nd abundant examples thereof in Chapters 4 through 8. They can
be obtained whenever the way the system works is known. They are the only When to use rst princi-
possibility if the system does not exist yet because it is still being designed and ples models
built, or if no experimental data is available. They may be quite hard to obtain
if the system comprises many complicated interacting sub-parts. Simplications
can bring down the model to more manageable congurations, but its theoretical
origin may mean that results will dier signicantly from reality if parameters
are wrongly estimated, if too many simplications are assumed, or if many
phenomena are neglected.
The models of dynamic continuous LTI systems are given by linear dier- Dierential equations
ential equations. The models of dynamic digital LTI systems are given by
linear dierence equations. The models of static LTI systems are linear and Dierence equations
have neither derivatives nor time dierences.
Example 3.34. The static model of the lever (3.1) includes neither dierential
nor dierence equations. It is irrelevant whether x(t) and y(t) are discretised
or not. The same happens with the non-linear static model of the Cardan joint
(3.2).
Example 3.35. Continuous model (3.6) is a dierential equation. Suppose
that the model is applied to the population of a country, where immigration
and emigration are neglectable, and for which population data is available on a
yearly basis. Also suppose that birth and death rates are constant and given by
b = 0.03/year and d = 0.02/year. So
dp(t)
= 0.01p(t) (3.9)
dt
Because the sampling time is Ts = 1 year, we can perform the following approx-
imation:
dp(t) pk − pk−1
≈ , (3.10)
dt t=year k 1 year
where pk is the population in year k , and pk−1 is the population in the year
before. Notice that this is a rst order approximation for the derivative in year
k , in which we use the value of the year before, and is consequently called a
backward approximation. So we end up with the following dierence equation:
1
pk − pk−1 = 0.01pk ⇔ pk = pk−1 , (3.11)
0.99
which is an approximation of dierential equation (3.9); approximations other
than (3.10) could have been used instead. We will address this subject further
below in Part V.
Example 3.36. Dierential equation (2.53) can be approximated by dierence
equation
for sampling time Ts . Once more, we will see how to arrive at this result below
in Part V.
36CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Experimental data should, whenever available, be used to conrm, and if Experimental identi
necessary modify, models based upon rst principles. This often means that rst tion of model paramet
principles are used to nd a structure for a model (the orders of the derivatives
in a dierential equation, or the number of delays in a dierence equation), and
then the values of the parameters are found from experimental data: feeding
the model the inputs measured, checking the results, and tuning the parameters
until they are equal (or at least close) to measured outputs. This can sometimes
be done using least squares; sometimes other optimisation methods, such as
genetic algorithms, are resorted to. If the outputs of experimental data cannot
be made to agree with those of the model, when the inputs are the same, then
another model must be obtained; this often happens just because too many
simplications were assumed when deriving the model from rst principles. It
may be possible to nd, from experimental data itself, what modications to
model structure are needed. This area is known as identication, and will be
addressed below in Parts VI to VIII.
White box model Models based upon rst principles can be called white box models, since
the reason why the model has a particular structure is known. If experimental
data requires changing the structure of the model, a physical interpretation of
the new parameters may still be possible. The resulting model is often called a
Grey box model grey box model.
There are methods to nd a model from experimental data that result in
something that has no physical interpretation, neither is it expected to have.
Still the resulting mathematical model ts the data available, providing the
correct outputs for the inputs used in the experimental plant. Such models
Black box model are called black box models, in the sense that we do not understand how
they work. Such models include, among others, neural network (NN) models
(see an example in Figure 3.18) and models based upon fuzzy logic, known as
fuzzy models (see Figure 3.19). These modelling techniques are increasingly
important, but we will not study them in these Lecture Notes.
Glossary
Lascia stare, cerchiamo un libro greco!
Questo? chiedevo io mostrandogli un'opera dalle pagine coperte di
caratteri astrusi. E Guglielmo: No, questo è arabo, sciocco! Aveva
ragione Bacone che il primo dovere del sapiente è studiare le lingue!
Ma l'arabo non lo sapete neppure voi! ribattevo piccato, al che
Guglielmo mi rispondeva: Ma almeno capisco quando è arabo!
Umberto Eco (1932 2016), Il nome della rosa, Quinto giorno, Sesta
Figure 3.19: In Boolean logic, propositions are either true or false. These two
cases correspond respectively to logical values 1 and 0. In fuzzy logic, all inter-
mediate logical values can be used. The plot above shows an example of this
(source: Wikimedia). For the temperature shown by the grey line, proposition
temperature is hot has the logical value 0, proposition temperature is warm
has the logical value 0.2, and proposition temperature is cold has the logical
value 0.8. This type of logic can then be used to build models, both static and
dynamic. We will not not study fuzzy logic or fuzzy models in these Lecture
Notes.
38CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.20: The Stansted Airport Transit System conveys passengers between
Terminals 1 and 2 of Stansted Airport, United Kingdom (source: Wikimedia).
Vehicles have no driver. They stop, open doors, close doors, and move between
terminals automatically.
plant planta
process processo
reference referência
sampling frequency frequência de amostragem
sampling time tempo de amostragem
signal sinal
single input entrada única
single output saída única
static estático
stochastic estocástico
white box model modelo de caixa branca
Exercises
1. Answer the following questions for each of the mechatronic systems below:
2. Use the Laplace transform to solve (3.9) for the situation starting at a
time when the country's population is 10 million inhabitants. Find the
population for t = 1, 2, 3 . . . years. Then use (3.11) to nd the evolution
of the population starting with year k = 1 (corresponding to t = 0 years)
when the country's population is 10 million inhabitants. Find the popu-
lation for k = 2, 3, 4 . . . and compare the results with those obtained with
(3.9).
3.3. MODELS 39
Figure 3.23: The Portuguese Navy submarine Tridente, of the Tridente class,
propelled by a low noise skew back propeller and powered by hydrogenoxygen
fuel cells (source: Wikimedia).
Figure 3.24: Astronomer Carl Sagan (1934 1996) with a model of one of the
two Viking landers, space probes that descended on Mars in 1976 and worked
until 1980 and 1982 (source: Wikimedia). Descent speed was controlled by
deploying a parachute and launching three retrorockets (one on each leg) to
ensure a soft landing. The descent control system employed an inertial reference
unit, four gyroscopes, a radar altimeter, and a landing radar.
40CHAPTER 3. EXAMPLES OF MECHATRONIC SYSTEMS AND SIGNALS
Figure 3.25: Two KUKA LWR IV robotic arms extant at the Control, Automa-
tion and Robotics Laboratory of Instituto Superior Técnico, Universidade de
Lisboa, Portugal. Each robot has seven rotational joints. (Source: Professor
Jorge Martins.)
Chapter 4
Ut tensio sic vis ; That is, The Power of any Spring is in the same
proportion with the Tension thereof: That is, if one power stretch
or bend it one space, two will bend it two, and three will bend it
three, and so forward.
In this and the following chapters, we will pass in review the basic concepts
of system modelling, for dierent types of components. In this chapter, we
concentrate upon mechanical components. Surely you will have already learned,
if not all, at least most of these subjects in other courses. However, there are
two reasons why a brief review is convenient at this point of your studies:
1. We will systematically resort to the Laplace transform to study dynamic
systems, and after seeing too many equations with variable s it is easy to
forget that we keep talking about real things namely, in this course,
mechatronic systems that are all around us in our daily life.
2. This is a good time to stress the similarities between apparently very
dierent systems that can be described by the very same equations. We
will see that thinking of any system as an energy converter helps to see
those parallels.
41
42 CHAPTER 4. MODELLING MECHANICAL SYSTEMS
Figure 4.1: Usual translation springs. Left: helical or coil spring; centre: volute
spring; right: leaf spring. (Source: Wikimedia.)
Here, F is the sum of all forces applied on the mass m(t), which is at
P
position x(t). (Product m(t) ẋ(t), as you know, is called momentum.) Momentum
Because we are assuming a movement of translation, we need not bother to
use vectors, but the forces must be applied along the direction considered;
if not, their projection onto the said direction must be used. And, as we
said in Section 3.1, we will only consider LTI systems; since the mass is,
in (4.1), a parameter, this restriction means that it will not change with
time, and so we are left with
X
F = m ẍ(t) (4.2)
Spring 2. A spring. This is a mechanical device that stores energy under the form
of elastic potential energy (see Figure 4.1). A translation spring usually
Hooke's law follows Hooke's law (which you can read in Latin and English at the
beginning of this chapter):
F = k (x1 − x2 ) (4.3)
Here, F is the force exerted by the spring, x1 and x2 are the positions of
the extremities of the spring (dened so that x1 − x2 is the variation in
length of the spring measured from the repose length), and k is the spring
constant. This constant is usually represented by k or K , and its SI units
are N/m. Force F opposes the relative movement of the extremities that
is its cause (i.e. force F contracts the spring when it is stretched, and
stretches the spring when it is compressed).
Damper 3. A damper. This is a mechanical device that dissipates energy (see Fig-
Viscous damping ure 4.2). The most usual model for dampers is viscous damping:
Here, F is the force exerted by the damper, ẋ1 and ẋ2 are the velocities
of the extremities of the spring (dened so that ẋ1 − ẋ2 is the relative
velocity of the extremities of the damper), and c is the damping constant.
This constant is usually represented by c, C , b or B , and its SI units are
N s/m. Force F opposes the relative movement of the extremities that is
its cause.
Model (4.4) can also be used to model unintended energy dissipation, such
as that due to friction. Notice that since energy dissipation is ubiquitous
even a mechanical system consisting only of a mass and a spring will be
more exactly modelled by a mass, a spring, and a damper, the latter to
account for energy dissipation.
Remark 4.1. Unlike (4.2), Hooke's law (4.3) is often only an approximate
model of the phenomenon it addresses. There are three ways in which reality
usually deviates from (4.3).
Figure 4.2: Dashpot damper (source: Wikimedia). There are other types of
dampers. This one, because it contains a viscous uid, follows (4.4) rather
closely.
3. In any case, Hooke's law is obviously valid only for a limited range of
length variations.
Remark 4.2. Our models are approximations of reality. They are valid only for
limited ranges of parameters. These important truths cannot be overstated.
Remark 4.3. Viscous damping (4.4) is another model of reality that very often
is only a rough approximation. Dashpot dampers such as the ones in Figure 4.2
follow this law more closely than other damping phenomena, where damping
may be non-linear or, if linear, proportional to another derivative of position
x (some damping models even use fractional orders of dierentiation). In any
case, it is obvious that after a while x will reach its end of stroke, and (4.4) will End of stroke
no longer apply.
Combining (4.2)(4.4) with Newton's third law which states that when Newton's third law
a body exerts a force on another, this latter body exerts an equal force, but
opposite in direction, on the rst body , it is possible to nd the dierential
equations that model translation mechanical systems.
44 CHAPTER 4. MODELLING MECHANICAL SYSTEMS
Example 4.2. One of the most simple, but also most useful, mechanical mod- Massspringdamper
els is the so-called massspringdamper system, which can be used to model tem
the behaviour of a mass, on which a force is applied, connected to an inertial
referential by a spring and a damper (remember that any real spring also has
some damping, so, even in the absence of a dashpot damper or a similar device,
energy dissipation must be accounted for). See Figure 4.5. This model can be
applied to many systems, among which the vertical behaviour of a car's suspen-
sion (for which of course far more accurate, and complex, models can also be
used see Figure 4.6).
Since one of the extremities of the spring is xed, the force that it exerts on
M is
We will now assume that initial conditions are zero. Applying the Laplace
transform,
The form (4.9) in which the model of the massspringdamper system was
Transfer function put is called transfer function. It is very practical for the resolution of dy-
namic models.
Denition 4.1. Given a SISO system modelled by a dierential equation, its
transfer function is the ratio of the Laplace transform of the output (in the nu-
merator) and the Laplace transform of the input (in the denominator), assuming
that all initial conditions are zero.
Remark 4.4. When you see a transfer function, never forget that it is nothing
but a dierential equation under disguise. The transfer function is a rational
function in s, which conceals a dynamic relation in time (or a relation in space,
if the dierential equation has derivatives in space rather than in time).
4.1. MODELLING THE TRANSLATION MOVEMENT 45
X(s) 1
= (4.10)
F (s) ms2
X(s) 1
= (4.11)
F (s) k
X(s) 1
= (4.12)
F (s) cs
Example 4.4. Suppose that force F (t) = sin(t) is applied to the system in
Figure 4.5, in which M = 1 kg, B = 3.5 N s/m, K = 1.5 N/m. What is the
output x(t)?
The system's transfer function is
X(s) 1 1
G(s) = = 2 = (4.13)
F (s) s + 3.5s + 1.5 (s + 3)(s + 0.5)
We have
1
F (s) = (4.14)
s2 + 1
and thus
L of the input transfer function
z }| { z }| {
1 1 as + b c d
X(s) = = 2 + + (4.15)
s2 + 1 (s + 3)(s + 0.5) s + 1 s + 3 s + 0.5
(as + b)(s2 + 3.5s + 1.5) + c(s2 + 1)(s + 0.5) + d(s2 + 1)(s + 3)
=
(s2 + 1)(s + 3)(s + 0.5)
3 2
s (a + c + d) + s (3.5a + b + 0.5c + 3d) + s(1.5a + 3.5b + c + d) + (1.5b + 0.5c + d)
=
(s2 + 1)(s + 3)(s + 0.5)
whence
a+c+d=0
c + d = −a
c + d = −a
3.5a + b + 0.5c + 3d = 0
3.5a − 0.5b = −1
50b = 2
⇔ ⇔
1.5a + 3.5b + c + d = 0
0.5a + 3.5b = 0
a = −7b
1.5b + 0.5c + 3d = 1 c + 6d = 2 − 3b c + 6d = 2 − 3b
7 7 1
c + d = 25
c = 25 − d
c = − 25
b = 1
⇔ 25 ⇔ ⇔ (4.16)
a = − 257
47 40 8
c + 6d = 25 5d = 25 d = 25
Finally,
7 1 1 8
− 25 − 25
s
x(t) = L −1 + 25
+ + 25
s2 + 1 s2 + 1 s + 3 s + 0.5
7 1 1 −3t 8 −0.5t
= − cos(t) + sin(t) − e + e (4.17)
25 25 25 25
4.2. SIMULATING TRANSFER FUNCTIONS IN MATLAB 47
Example 4.6. Transfer function (4.13) from Example 4.4 can be created as Matlab's command tf
>> G = tf(1,[1 3.5 1.5])
G =
1
-----------------
s^2 + 3.5 s + 1.5
0.4
0.3
0.2
0.1
x [m]
0
−0.1
−0.2
−0.3
0 10 20 30 40 50
t [s]
or else as
>> s = tf('s')
s =
>> G = 1/(s^2+3.5*s+1.5)
G =
1
-----------------
s^2 + 3.5 s + 1.5
Simulation Command lsim (linear simulation) uses numerical methods to solve the dif-
ferential equation represented by a transfer function for a given input. In other
words, it simulates the LTI represented by the transfer function.
Matlab's command lsim Example 4.7. The output found in Example 4.4 can be obtained and displayed
as follows, if transfer function G(s) has been created as above:
>> t = 0 : 0.01 : 50;
>> f = sin(t);
>> x = lsim(G, f, t);
>> figure,plot(t,x, t,-7/25*cos(t)+1/25*sin(t)-1/25*exp(-3*t)+8/25*exp(-0.5*t))
>> xlabel('t [s]'), ylabel('x [m]')
See Figure 4.8. Notice that we plotted two curves: the rst was created with
lsim, the second is (4.17). As expected, they coincide (there is a small numerical
dierence, too small to show up in the plot), and only one curve can be seen.
Remark 4.7. The result (4.17) from Example 4.4 is exact. So the second curve
in Figure 4.8 only has those numerical errors resulting from the implementation
of the functions. The rst curve has the errors resulting from the numerical
method with which the dierential equation was solved. Of course, both curves
are based upon the same transfer function, and thus will suer from any errors
that there may be in that model (e.g. imprecise values of parameters M , B ,
and K , or neglected non-linearities in the spring or the damper). Do you still
remember Remark 4.2?
4.3. MODELLING THE ROTATIONAL MOVEMENT 49
Proof. Let r be the radius of rotation for which are applied the tangential
forces F that cause the torque (see Figure 4.9). Because x = rω , then
P
ẋ = rω̇ , and Newton's second law (4.1) becomes
X d X d
m(t) r2 ω̇(t) (4.22)
F = (m(t) rω̇(t)) ⇔ r F =
dt dt
Because the torque τ of a force F is rF , and the moment of inertia J
of mass m is mr2 , (4.21) follows for a point-like mass. In the case of a
distributed mass, integrating (4.22) over the volume occupied will then
yield the desired result.
Corollary 4.1. Considering an LTI system, J will not change with time,
and so we are left with
X
τ = J ω̈(t) (4.23)
Here, τ is the torque exerted by the spring, ω1 and ω2 are the angular
positions of the extremities of the spring, and κ is the spring constant.
This constant is usually represented by the Greek character κ or K (to
avoid confusion with a translation spring, for which a Latin character is
used), and its SI units are N/rad.
3. A rotary damper, or torsional damper. The most usual model for Rotary (or torsional)
this mechanical device that dissipates energy is viscous damping: damper
Here, τ is the torque exerted by the damper, ω̇1 and ω̇2 are the angular
velocities of the extremities of the damper, and c is the damping constant.
50 CHAPTER 4. MODELLING MECHANICAL SYSTEMS
where ω is the rotation of J in the sense of rotation in which the applied torque
τ is positive. The torque exerted by the damper is
Thus
Applying the Laplace transform (and assuming, once more, that all initial con-
ditions are zero),
Ω(s) 1
T (s) − κΩ(s) − BsΩ(s) = Js2 Ω(s) ⇔ = (4.29)
T (s) Js2 + Bs + κ
and of B (in translation) and B (in rotation), and of K and κ, are the same,
then the model will be the same.
As you surely know by now, this happens not only with mechanical systems,
but also with systems of other, dierent types, as we shall see in the following
chapters. One of the best ways of studying this parallelism is to see systems as
energy converters, and energy E as the integral of the product of two variables, Energy
called eort variable e and ow variable f : Eort
Z t Flow
E(t) = e(t) f (t) dt (4.30)
0
In other words, the product e(t) × f (t) is the instantaneous power Ė(t). Power
In the case of a translation movement,
Z t
Ė(t) = F (t) ẋ(t) ⇔ E(t) = F (t) ẋ(t) dt (4.31)
0
We will consider force F and torque τ as the ow variable, and velocity ẋ and
angular velocity ω̇ as the eort variable. But notice that it would make no
dierence if it were the other way round. In any case, their product will be the
power. Both choices can be found in published literature.
The components of a system are the eort accumulator, the ow accu- Eort accumulator
mulator, and the energy dissipator, as seen in Table 4.1. For both accumu- Flow accumulator
lators, energy is the integral of accumulated ow or accumulated eort: elastic Dissipator
potential energy in the case of eort, and kinetic energy in the case of ow. The
dissipator dissipates energy and it makes no dierence whether it is kinetic or
potential energy that it dissipates. Table 4.1 also includes the relations between
these quantities.
Denition 4.2. A transfer function of a system that has the ux as input and
the eort as output is called impedance of that system. A transfer function of a Impedance
system that has the eort as input and the ux as output is called admittance Admittance
of that system. Consequently, the admittance is the inverse of the impedance.
sX(s) 1
= (4.33)
F (s) ms
sX(s) s
= (4.34)
F (s) k
sX(s) 1
= (4.35)
F (s) c
Figure 4.12: Left: two external cogwheels (source: Wikimedia). Right: two
cogwheels, the outside one being an internal cogwheel (because the cogs are on
the inside), and the inside one being an external cogwheel (because the cogs are
on the outside; source: https://etc.usf.edu/clipart).
ω1 r1 = ω1 r2 (4.37)
Proof. The spacing of the teeth in both cogwheels has to be the same,
otherwise they would not match. Thus the perimeters of the two wheels,
2πr1 and 2πr2 , are directly proportional to n1 and n2 .
As to the angular velocity and acceleration, it suces to dierentiate
(4.36).
Theorem 4.3. Let τ1 and τ2 be the torques of the two cogwheels. Then
τ1 r1 n1
= = (4.39)
τ2 r2 n2
Proof. See Figure 4.13. The forces that each wheel exerts on the other are
equal. Thus
τ1
τ1 = F r1 ⇒ F = (4.40)
r1
τ2
τ2 = F r2 ⇒ F = (4.41)
r2
and the result follows.
Figure 4.15: Left: rack and pinion in a canal gate; the rack is the linear ele-
ment (in this case, vertical). Right: schematic of a harmonic drive. (Source:
Wikimedia.)
Glossary
Als Storm weer bijkomt is het eerste wat hij ziet het vriendelijke
gezicht van de jager.
Wat wilt u dat ik voor u doe, god?
Ik. . . kan je verstaan, maar. . . maar spreek ik nu jouw taal of jij de
mijne? En wat bedoel je met god? Ik ben geen god!
Maar natuurlijk bent u dat! Alles wijst erop. U sprak wartaal en
begreep mij niet. Nou, het is duidelijk dat de goden de mensen
niet begrijpen, anders hadden ze ze allang uitgeroeid! En nu u van
de parel der kennis hebt gegeten, begrijpt u er nog niets van. Dat
bewijst dat u gek bent! En de goden moeten gek zijn anders hadden
ze de wereld nooit zo gemaakt als hij is.
Exercises
1. Consider the system in Figure 4.17.
(b) From the result above, knowing that M1 = 1 kg, M2 = 0.5 kg,
K1 = 10 N/m, K2 = 2 N/m, and B2 = 4 N s/m, nd transfer
function XF2(s)
(s)
.
2. Consider the system in Figure 4.18. The wheels have neglectable mass and
inertia; they are included to show that the masses move without friction.
(a) Find the dierential equations that model the system.
(b) From the result above, knowing that M1 = 100 kg, M2 = 10 kg,
K = 50 N/m, and B = 25 N s/m, nd transfer function X 2 (s)
X1 (s) .
3. Consider the system in Figure 4.19. The wheels have neglectable mass and
inertia; they are included to show that the masses move without friction.
(a) Find the dierential equations that model the system.
(b) From the result above, knowing that M1 = M2 1 kg, K = 5 N/m,
and B = 10 N s/m, nd transfer function XF1(s)
(s)
.
X2 (s)
(c) For the same constants, nd transfer function F (s) .
X2 (s)
(c) For the same constants, nd transfer function F (s) .
X3 (s)
(d) For the same constants, nd transfer function F (s) .
5. Consider the system in Figure 4.21. The cogwheels have neglectable mo-
ments of inertia, when compared to J . Let Nu be the number of cogs in
the upper cogwheel, and Nl the number of cogs in the lower cogwheel.
6. Consider the system in Figure 4.22. The pinion's centre is xed, and its
moment of inertia I includes the lever actuated by force F .
Figure 4.25: From left two right: two springs in series; two springs in parallel;
two dampers in series; two dampers in parallel.
(a) Model the system, writing the equations that describe its dynamics.
(b) Obtain the transfer function considering the torque T as input and
the mass position x as output.
Chapter 5
U (t)
R(t) = (5.1)
I(t)
Here R is the resistance, U is the voltage (or tension, or electric potential
dierence), and I is the current. Notice that U = U1 − U2 , where U1 and
U2 are the voltages at the resistor's terminals.
The resistance R of a uniform conductor is directly proportional to its
length L and inversely proportional to its cross-section A:
L
R=ρ (5.2)
A
Proportionality constant ρ is called resistivity. This variation with length
is used to build variable resistances, shown in Figure 5.2.
2. A capacitor. This component (see Figure 5.4) stores energy and its most Capacitor
usual model is
1
U (t) = Q(t) (5.3)
C
where Q(t) is the electrical charge stored, and C is the capacity. Since
I(t) = dQ(t)
dt ,
1 t
Z
U (t) = I(t) dt (5.4)
C 0
Dierentiating, we get
dU (t)
I(t) = C (5.5)
dt
61
62 CHAPTER 5. MODELLING ELECTRICAL SYSTEMS
Figure 5.1: Dierent types of resistors. Left: individual resistors for use in
electronics; centre: many resistors in one encasing; right: wirewound resistors
for high tensions and currents in a train. (Source: Wikimedia.) There are still
other types of resistors.
Figure 5.3: Top: a linear potentiometer with length xmax and resistance Rmax ,
connected on the left and on the movable terminal at position x, has a resistance
R proportional to the position: xmax
x R
= Rmax ⇔ R = Rmax xmaxx
. Bottom: this
potentiometer is used as a tension divider, grounded on the left and at Vmax on
the right; the voltage at the terminal is given by Vmax
V R
= Rmax x
= xmax ⇒V =
Vmax xmax ⇔ x = xmax Vmax .
x V
5.1. PASSIVE COMPONENTS 63
3. An inductor. This component (see Figure 5.5) also stores energy and its Inductor
most usual model is
1
I(t) = λ(t) (5.6)
L
Rt
where λ(t) = 0 U (t) dt is the ux linkage, and L is the inductance. Dif-
ferentiating, we get
dI(t)
U (t) = L (5.7)
dt
The transfer functions of the resistor, the capacitor, and the inductor, cor-
responding to (5.1), (5.5), and (5.7), considering always tension U (s) as the
output and current I(s) as the input, are
U (s)
=R (5.8)
I(s)
U (s) 1
= (5.9)
I(s) Cs
U (s)
= Ls (5.10)
I(s)
Remark 5.1. Notice that Ohm's law (5.1) or (5.8) corresponds to a static
system.
Remark 5.2. It cannot be overstated that relations (5.8)(5.10) are not fol-
lowed by many components:
Even when (5.8)(5.10) are accurately followed, this only happens for a
limited range of values. Increase U or I too much, and any electrical
component will cease to function (burn, melt. . . ). What is too much
depends on the particular component: there are components that cannot
stand 1 V while others work at 104 V and more.
Remark 5.3. Transfer functions (5.8)(5.10) have the ux as input and the
Electrical impedance eort and output. They consequently give the impedance of the corresponding
components.
Kircho 's current law The current law states that the sum of the currents at a circuit's node is
zero.
Kircho 's voltage law The voltage law states that the sum of the voltages around a circuit's
closed loop is zero.
Voltage divider Example 5.1. Consider the system in Figure 5.6 known as voltage divider.
The input is Vi (t) and the output is Vo (t). Applying the current law at point
5.2. ENERGY, EFFORT AND FLOW 65
B , we see that the current owing from A to B must be the same that ows
from B to C . Applying Ohm's law (5.1) to the two resistances, we see that
Remark 5.4. Remember that, similarly to what happens with the positive
direction of displacements in mechanical systems, it is irrelevant if a higher
tension is presumed to exist to the left or to the right of a component. Current
is always assumed to ow from higher to lower tensions; as long as equations are
coherently written, if in end current turns out to be negative, this only means
that it will ow the other way round.
Example 5.2. The transfer function of the system in Figure 5.6 known as RC
circuit can be found in almost the same manner, thanks to impedances: RC circuit
Notice that this system is dynamic, and from Vo (s)(1 + RCs) = Vi (s) we get
Vo (t) + RC dVdt
o (t)
= Vi (t).
Example 5.3. Both systems above are particular cases of the generic system Two generic impedances
in Figure 5.7 with two impedances:
Figure 5.7: Left: generic electrical system with two impedances, of which the
voltage divider (Figure 5.6), the RC circuit (Figure 5.6) and the CR circuit (to
the right) are particular cases. Right: CR circuit.
Consequently,
Vo Z2
(Vo − Vi )Z2 = −Vo Z1 ⇔ = (5.19)
Vi Z1 + Z2
Impedances in series Remark 5.5. We have incidentally shown that two impedances Z1 and Z2 in
series correspond to a single impedance Z = Z1 + Z2 , i.e. two impedances in
series are summed, just as two resistances in series are. You know that two
resistances R1 and R2 in parallel are equivalent to resistance R = 1 +
1
1 , and
R1 R2
Impedances in parallel something similar happens to two impedances in parallel (see Figure 5.8):
VB − VA VB − VA
Z1 = ⇔ I1 = (5.20)
I1 Z1
VB − VA VB − VA
Z2 = ⇔ I2 = (5.21)
I2 Z2
VB − VA VB − VA 1
Z= = VB −VA = (5.22)
I1 + I2 Z + VBZ−VA
1 2
1
Z1 + 1
Z2
Because of the parallelism between systems of dierent types, this is true for me-
chanical impedances as well (see Exercise 10 from Chapter 2), and for impedances
of other types of systems we will study in the next chapters.
RLC circuit Example 5.4. Consider the system in Figure 5.9 known as RLC circuit. The
input is Vi (t) and the output is Vo (t). Applying the current law, we see that
the current owing from A to B must be the same that ows from B to C and
5.3. THE OPERATIONAL AMPLIFIER (OPAMP), AN ACTIVE COMPONENT 67
We now replace the rst equation in the second, and use it together with the
third to get
Remark 5.6. We could have established (5.25) rst, without using impedances:
VB (t)−VA (t)
1 1
R =
I(t) ⇒ I(t) = R VB (t) − R Vi (t)
V (t) − VB (t) = dI(t)
L dt ⇒ Vo (t) − VB (t) = R L dVB (t) L dVi (t)
−R (5.26)
C 1
R dVo (t)
dt dt
VD (t) − VC (t) = I(t) dt ⇒ − = f rac1CI(t)
C dt
Replacing the rst equation in the third, and then the result in the second,
Rearranging terms in the last equality gives (5.25). Applying the Laplace trans-
form, we then obtained transfer function (5.24). The results are of course the
same. Notice that in both cases zero initial conditions were implicitly assumed
(i.e. integrals were assumed to be zero at t = 0; in the case of the Laplace
transform, this means that there is no f (0) term in (2.41)). We will address
this further in Chapter 9.
Remark 5.7. Transfer function (5.24) is similar to transfer functions (4.9) and
(4.11). As you know, this is one case of a so-called electrical equivalent of a
mechanical system, or of a mechanical equivalent of an electrical system. The
notions of eort and ux make clear why this parallel between models exists:
both consist of an eort accumulator, a ux accumulator, and a dissipator.
But notice that the parallel is not complete: (4.9) has a ux as input and
an accumulated eort as output; both the input and the output of (5.24) are
eorts.
68 CHAPTER 5. MODELLING ELECTRICAL SYSTEMS
Figure 5.10: Left: an integrated circuit with a 741 OpAmp, one of the most usual
types of OpAmps (source: Wikimedia). Other OpAmp types are manufactured
in integrated circuits that have several OpAmps each, sharing the same power
supply. Right: the symbol of the OpAmp (source: Wikimedia). Power supply
tensions are often omitted in diagrams for simplicity, but never forget that an
active component without power supply does not work.
V out = K V + − V − (5.29)
V S− ≤ V out ≤ V S+ (5.30)
As can be expected from the fact that the OpAmp is an active component, if
No output if no power sup- no power is supplied, i.e. if the corresponding pins of the integrated circuit are
ply disconnected and thus V S+ = V S− = 0 V, then V out = 0 V, i.e. there is no
output. The gain of the OpAmp K should ideally be innite; in practice it is
very large, e.g. 105 or 106 . See Figure 5.11.
The other important characteristic of the OpAmp is that the impedance
between its two inputs V − and V + is very large. Ideally it should be ininite;
in practice it is 2 MΩ or more.
5.3. THE OPERATIONAL AMPLIFIER (OPAMP), AN ACTIVE COMPONENT 69
parator Example 5.5. The OpAmp can be used to compare two tensions, connected
to the two inputs V − and V + . Because K is very large, if V + > V − , even if
only by a very small margin, the output will saturate at tension V S+ . Likewise,
if V + < V − , even if only by a very small margin, the output will saturate at
tension V S− .
Only if V + and V − are equal, and equal to a great precision, will the output
be 0 V. Consider the case of a 741 OpAmp, typically supplied with V S± =
±15 V. Suppose that K = 105 . Then the output V out will not saturate at
either +15 V or −15 V only if |V + − V − | < 15 × 10−5 V.
Example 5.6. OpAmps are very usually employed in the conguration shown
in Figure 5.12, known as inverting OpAmp or inverter. In this case, because Inverting OpAmp or in-
the OpAmp's input impedance is very large, the current I will ow from input verter
Vi to output Vo , as shown in Figure 5.12. Consequently,
Vo
+ − −
Vo = K(V − − V ) ⇔ V −= − K
Z2 = Vo −V
I ⇔ I = Vo −V
Z2
(5.31)
−
V −Vi V − −Vi
Z1 = ⇔ I = Z1
I
Vo + VKo − Vo − Vi Z1 Z1 Vo Z2 K
= K ⇔ V o Z1 + V o + Vo = −Vi Z2 ⇔ =−
Z2 Z1 K K Vi Z1 K + Z1 + Z2
(5.32)
Vo Z2
=− (5.33)
Vi Z1
(and so in this case V − = 0). This is because of the high input impedance.
Vo R2
=− (5.35)
Vi R1
Example 5.8. Consider the circuit in Figure 5.14, which is another variation
of the negative feedback OpAmp. From (5.34) and the Kircho law of nodes,
implicit in the currents shown in Figure 5.14, we get
V1 −0 V1
Z 1 =
I1 ⇔ I1 = Z1
Z2 = V2 −0
I2
V2
⇔ I2 = Z2
(5.36)
0−Vo V1 V2 −Vo
−Z Z3
Z3 = ⇔Z + Z2 = ⇔ Vo = Z1 V 1
3
− Z2 V2
I1 +I2 1 Z3
Inverting weighted sum- If all the resistances are dierent, we will have an inverting weighted
mer summer. If R3
R1 + R3
R2 = 1 there is no amplication or attenuation; other-
wise there is.
Remark 5.9. Notice that the circuit in Figure 5.14 is a MISO system.
5.3. THE OPERATIONAL AMPLIFIER (OPAMP), AN ACTIVE COMPONENT 71
Vo 1
=− (5.38)
Vi 1 + RCs
and similar to the RC circuit from Example 5.2 with transfer function (5.16).
If in Figure 5.12 we have Z2 = R and Z1 consists in a resistor R and a
capacitor C in series, we obtain the circuit in Figure 5.16, with
1 1 + RCs
Z1 = R + = (5.39)
Cs Cs
Vo RCs
=− (5.40)
Vi 1 + RCs
and similar to the CR circuit from Example 5.3.
Example 5.10. Other than the inverter conguration in Figure 5.12, the most
usual conguration with which OpAmps are used is the on in Figure 5.17, known
as the non-inverting OpAmp or non-inverter. Because of the very large Non-inverting OpAmp or
input impedance, current ows as shown, and non-inverter
−
Vo = K(Vi −− V ) ⇔ V =
−
Vi − VKo
−
Z2 = Vo −V
I ⇔ I = Vo −V
Z2
(5.41)
−
V −0 V−
Z1 = I ⇔ I = Z1
Vo Z1 + Z2
= (5.43)
Vi Z1
Remark 5.10. (5.43) shows once again that we can assume (5.34). We would
have arrived sooner at the same result.
Vo R1 + R2
= (5.44)
Vi R1
Notice that, because R1 , R2 > 0, not only in this circuit the signs of Vi and
Vo are always the same, as the input is always amplied (i.e. |Vo | > |Vi |): it is
impossible to attenuate the input.
Figure 5.19: Two inverting ampliers, that amplify the input 4 times.
5.4. OTHER COMPONENTS 73
Example 5.13. Consider the circuit in Figure 5.20. Because of (5.34), we have
V + = V − = Vi , and Vo = V − ; hence
Vo = Vi (5.45)
While at rst sight this may seem a good candidate for the prize of the most
useless circuit, it is in reality a most useful one. We can be sure that Vo = Vi
and that whatever components are connected to Vo will not aect Vi , because
there is no current owing between Vi and Vo . (The source of energy is the
OpAmp's power supply.) If it were not for the OpAmp, anything connected to
Vo would modify the value of Vi . This circuit is known as voltage buer or
tension buer. Voltage buer
Example 5.14. The MISO system in Figure 5.21 is know as subtractor, be- Subtractor
cause
V2 −V ±
R =
I2
V ± −Vo
R =
I2
V1 −V ±
(5.46)
R= I1
V ± −0
R =
I1
From the last two equations, we get 2V ± = V1 . From the rst two equations,
and replacing this last result,
V2 = 2V ± − Vo ⇔ Vo = V1 − V2 (5.47)
VP NP
= (5.48)
VS NS
Here VP and VS are the tensions in the two windings, and NP and NS are
the corresponding numbers of turns in each winding. This is an ideal model; in
practice, there are losses, but we will not need to use a more accurate expression.
74 CHAPTER 5. MODELLING ELECTRICAL SYSTEMS
Glossary
Et le professeur Lidenbrock devait bien s'y connaître, car il passait
pour être un véritable polyglotte. Non pas qu'il parlât couramment
les deux mille langues et les quatre mille idiomes employés à la sur-
face du globe, mais enn il en savait sa bonne part.
(a) (b)
(c) (d)
(e) (f)
(g) (h)
Exercises
1. Find the equations describing the dynamics of the systems in Figure 5.23,
and apply the Laplace transform to the equations to nd the corresponding
transfer function.
2. Again for the systems in Figure 5.23, nd the transfer function directly
from the impedances of the components, and apply the inverse Laplace
transform to the transfer functions to nd the corresponding equations.
3. Show that the dierential equations modelling the circuit in Figure 5.24
are similar to those of the mechanical system of Exercise 1 in Chapter 4.
Explain why, using the concepts of eort and ow.
4. Find the mechanical systems equivalent to the circuits in Figure 5.25.
5. Find the transfer function of the circuit in Figure 5.12 from the impedance
of the components for the following cases:
(a) Impedance Z1 is a resistor, impedance Z2 is a capacitor.
76 CHAPTER 5. MODELLING ELECTRICAL SYSTEMS
(a) (b)
6. Find the transfer function of the circuit in Figure 5.26. Assume that all
resistors are equal.
(a) Vo = V1 − 13 V2
(b) Vo = 5(V1 − V2 )
11. Suppose you are using an OpAmp with power supply V S± = ±20 V as
comparator. Use Matlab to plot the expected output Vo for 0 s≤ t ≤ 10 s
and the following inputs:
The force is equal to the product of the pressure p and the cross-sectional area
A, so
Z x
F = pA ⇒ E = p A dx (6.2)
0
The volume ow rate (or volumetric ow rate) Q is the derivative of the Volume ow rate
volume V = A x, given by
dx
Q=A (6.3)
dt
where we assume a constant A. With some abuse of notation, we can write
A = Qdxdt and replace this in (6.2) to rewrite the integral in (6.1) as
Z t
E= pQ dt (6.4)
0
79
80 CHAPTER 6. MODELLING FLUIDIC SYSTEMS
So pressure p and volume ow rate Q can be used as eort and ow. By an
understandable universal convention, Q is always considered as the ow, and p
as the eort.
Table 6.1 sums up the passing information and relations. The next section
presents the basic components mentioned in that Table.
Pressurised tank In the case of reservoirs without a free surface, it can also be shown that
V = pC , where the value of capacitance C will depend on whether the uid
is is a liquid, a gas undergoing an isothermal compression or expansion,
or a gas undergoing an adiabatic compression or expansion. We need not
worry with that, as long as the value of C is known.
Fluidic inductance 2. A uidic inductance. This is in fact one of the two phenomena that
take place in a pipe. Its model is an application of Newton's second law
(4.1) to the uid contained in a length ` of pipe (see Figure 6.2):
d2 x
A p = ρA` (6.7)
|{z} |{z} dt2
force mass
The force is the product of the cross-sectional area and the pressure (or
rather the dierence of pressures at the two extremities of the uid sep-
R `). Integrating both sides, and introducing the uidic
arated by length
moment Γ = p dt,
dx
Γ = ρ` (6.8)
dt
6.2. BASIC COMPONENTS OF A FLUIDIC SYSTEM 81
Figure 6.1: A water reservoir at the Évora train station. (Source: Wikimedia.)
3. A pressure drop. This is the other phenomena taking place in any pipe, Pressure drop
due to the resistance of viscous forces both between the uid and the
wall of the pipe and between uid particles themselves. In another course
you learn about the dierence between laminar ow (i.e. a situation in Laminar ow
which uid particles move essentially in the direction of the ow only)
and turbulent ow (i.e. a situation in which uid particles move in a far Turbulent ow
more chaotic manner).
Here it suces to notice that in laminar ow the Hagen-Poiseuille equa- Hagen-Poiseuille equation
tion applies: for laminar ow
8µ`
p= Q (6.10)
πr4
|{z}
uidic resistance R
Here p is the pressure drop over length ` of the pipe, µ is the dynamic
viscosity, and r is q
the pipe radius. (If the cross-section of the pipe is not
circular, then r = Ar .) This expression was rst determined experimen-
tally, and then proved from the Navier-Stokes equations; all that we need
to worry about is the value of the uidic resistance.
The pressure drop is always higher for turbulent ow than for laminar
ow, and the relation between p and Q is no longer linear. However, it
may be linearised around a convenient point, so as to nd an approximate
value of resistance R = Q
p
valid in some range of values of these variables.
(See Figure 4.3 again.)
The pressure also drops when the ow crosses valves, bends (or shouldered
ttings), orices, diameter reducers, etc.. Model p = RQ is usually a good
t for those situations as well.
Remark 6.1. Pipes have both inertance and resistance. Of course, it may be
that one of the two is neglectable when compared to the other; but in reality
both are present.
82 CHAPTER 6. MODELLING FLUIDIC SYSTEMS
Fluidic impedances Remark 6.2. The impedances of these components are as follows:
P (s) 1
= (6.11)
Q(s) Cs
P (s)
= Ls (6.12)
Q(s)
P (s)
=R (6.13)
Q(s)
Pipe ow can be modelled putting together the equations describing these
components with the conservation of mass.
Example 6.1. Consider the system in Figure 6.3, supplied with water by a
pump providing a pressure p, that ows through a long pipe with inertance L
and neglectable resistance, and either lls a tank with capacitance C or leaves
the system through a valve with resistance R. We want to know the pressure
below the tank pt .
Let q(t) be the volume ow rate through the long pipe, that is then divided
into the ow feeding the tank qt (t) and the ow through the valve qv (t). Using
the impedances, we get
P (s)−Pt (s)
P (s) − Pt (s) = LsPt (s) R1 + Cs
Q(s) = Ls
Q(s) = Pt (s) R1 + Cs
Q(s) = Qt (s) + Qv (s)
Pt (s) 1 ⇒ (6.14)
Qt (s) = Cs Qt (s) = Pt (s)Cs
Pt (s) = R
Qv (s) = R1 Pt (s)
Qv (s)
Example 6.2. Consider the system in Figure 6.4, with two water reservoirs
fed by a pump that delivers a ow q , and connected by a pipe with neglectable
inertance and resistance R. We have
q(t) = q1 (t) + q2 (t)
Q(s) = A1 H1 (s)s + A2 H2 (s)s
q (t) = A ḣ (t) Q (s) = A H (s)s
1 1 1 1 1 1
⇒ (6.18)
q2 (t) = A2 ḣ2 (t)
Q2 (s) = A2 H2 (s)s
h2 (t)−h1 (t)
= q1 (t) H2 (s) − H1 (s) = RA1 H1 (s)s
R
Thus
( (
Q(s) = A1 H1 (s)s + A2 H1 (s)(RA1 s + 1)s Q(s) = H1 (s)(RA1 A2 s2 + A1 s + A2 s)
⇔ ⇔
H2 (s) = H1 (s)(RA1 s + 1) H2 (s) = H1 (s)(RA1 s + 1)
H1 (s) 1
=
Q(s) RA1 A2 s2 + (A1 + A2 )s
(6.19)
H2 (s) RA1 s + 1
=
Q(s) RA1 A2 s2 + (A1 + A2 )s
Remark 6.5. When modelling pipe ows, pay special attention to non-linearities.
All pipes have some maximum value that the ow can take. So in a pipe like
that in Figure 6.4 we have −Qmax ≤ Q ≤ Qmax . But in some systems pipes
feed tanks from above: see for instance Figure 6.8 below, corresponding to Ex-
ercise 2. In that case, 0 ≤ Q3 ≤ Q3 max . In other words, the ow can ll up the
tank below, but it cannot empty it.
Neglecting non-linearities leads to absurd models and ludicrous conclusions,
such as those mocked by mathematician Charles Dogdson in the quote at the
beginning of this chapter.
Glossary
Había en el puerto gran multitud de buques de todas clases y tamaños,
resplandeciendo entre ellos, llamando la atención y hasta excitando
la admiración y la envidia de los españoles, un enorme y hermosísimo
navío, construido con tal perfección, lujo y elegancia, que era una
maravilla.
Los españoles, naturalmente, tuvieron la curiosidad de saber quién
era el dueño del navío y encargaron al secretario que, sirviendo de
intérprete, se lo preguntase a algunos alemanes que habían venido a
84 CHAPTER 6. MODELLING FLUIDIC SYSTEMS
bordo.
Lo preguntó el secretario y dijo luego a sus paisanos y camaradas:
El buque es propiedad de un poderoso comerciante y naviero de
esta ciudad en que estamos, el cual se llama el señor Nichtverstehen.
Exercises
1. Consider the system from Example 6.1, shown in Figure 6.3. Find its
mechanical equivalent.
2. Consider the system in Figure 6.7, fed by a pump delivering volume ow
rate q1 (t). Tanks 1 and 2 are connected by a pipe with neglectable iner-
tance and uidic resistance R1 ; tanks 2 and 3 are emptied through valves
with resistances R2 and R3 respectively. Find transfer functions H 1 (s)
Q1 (s) ,
H2 (s) H3 (s)
Q1 (s) and Q1 (s) .
3. Consider the system in Figure 6.8, fed by a pump delivering volume ow
rate q1 (t). Find transfer functions H 1 (s) H2 (s) H3 (s) Q5 (s)
Q1 (s) , Q1 (s) , Q1 (s) and Q1 (s) .
86 CHAPTER 6. MODELLING FLUIDIC SYSTEMS
This chapter concerns thermal systems. You will study heat transfer in
depth in another course, but simple cases can be modelled with a formulation
similar to that employed to the systems in the previous chapters.
However, heat is energy; it is in fact kinetic energy of molecules and atoms. Heat is energy
(As you may know, an omnipresent æther was postulated for some centuries
to explain the propagation of heat and especially of light, but this hypothesis,
of which you may nd a popular explanation at the beginning of this chapter,
has been abandoned for about one century, having been by then contested for
decades because of experimental results with which it could not reconciled.)
Consequently, it is not true in thermal systems that energy is the integral of the
product of eort and ow see (4.30) , as the variable used for ow is an
energy rate itself. And, as a result, the parallels with the other types of systems
we have been studying are not perfect.
87
88 CHAPTER 7. MODELLING THERMAL SYSTEMS
Here H(t) = 0 q(t) dt is the accumulated heat in mass m, which has a specic
Rt
heat Cp and is heated from temperature T (0) to temperature T (t). Specic heat
Dissipation can take place in three dierent ways:
∂T (x, t)
q(t) = −kA (7.2)
∂x
where A is the cross-sectional area and k is the thermal conductivity.
Assuming that the temperature distribution over x is linear over a distance
L, (7.2) becomes
kA
q(t) = (T (0, t) − T (L, t)) (7.3)
L
|{z}
conduction heat transfer coecient hc
∆T = Rq (7.7)
Thermal system SI
eort e temperature T K or ◦ C
ow f heat ow rate q W
eort accumulator
R
accumulated eort ea = e dt
relation between accumulated eort and ow ea R= ϕ(f )
accumulated energy Ee = ea df
ow accumulator
R heat accumulator with mass Rm and specic heat Cp kg × J kg−1 K−1
accumulated ow fa = f dt heat H = q dt J
relation between accumulated ow and eort fa R= ϕ(e) heat H = m Cp T
accumulated energy Ef = fa de
dissipator thermal resistance with resistance R K/W
relation between eort and ow e =R ϕ(f ) T = Rq
dissipated energy Ed = f de
BASIC COMPONENTS OF A THERMAL SYSTEM
Figure 7.2: Electrical circuit equivalent to the thermal system in Figure 7.1.
Tf Tt(0)
Tt(0) Tf
t t
Figure 7.3: Evolution of temperature Tt (t) in the system Figure 7.1 when Tt (t) <
Tf (left) and when Tt (t) > Tf (right).
7.2. BASIC COMPONENTS OF A THERMAL SYSTEM 91
Glossary
Aber in Phantásien waren fast alle Wesen, auch die Tiere, min-
destens zweier Sprachen mächtig: Erstens der eigenen, die sie nur
mit ihresgleichen redeten und die kein Auÿenstehender verstand, und
zweitens einer allgemeinen, die man Hochphantäsisch oder auch die
Groÿe Sprache nannte. Sie beherrschte jeder, wenngleich manche sie
in etwas eigentümlicher Weise benützten.
conduction condução
convection convecção
forced convection convecção forçada
free convection convecção livre
heat accumulator acumulador de calor
heat ow rate uxo de calor
radiation radiação
specic heat calor especíco
thermal resistance resistência térmica
temperature temperatura
Exercises
1. Consider the Wave Energy Converter of Figure 3.2, when submerged in
sea water at constant temperature Tsea . Assume that the air inside the
device has a homogeneous temperature Tair (t) and is heated by the de-
vice's Power Take-O (PTO) mechanism, at temperature TP T O (s), that
delivers an electrical power P (t) to the electrical grid with an eciency
η . (See Figure 7.4.) Heat transfer from the PTO to the air inside the
device takes place by convection with a constant coecient h and for area
A; neglect the thermal capacity of the metallic WEC itself; consider that
92 CHAPTER 7. MODELLING THERMAL SYSTEMS
Cair and CP T O are the thermal capacities of the air and the PTO, that
have masses mair and mP T O . Let T (t) = Tair (t) − TP T O (t). Find transfer
function PT (s)
(s) .
93
94CHAPTER 8.
Notice that there may be values of these variables that we can think of as ab-
solute zeros, such as temperature −273.15 ◦ C = 0 K, pressure 0 Pa of complete
vacuum, or position and velocity measured in an inertial frame of reference.
Still, it is often far more practical to use other values, such as atmospheric Dealing with initial condi-
pressure, room temperature, or resting position, as zero. tions
We know that initial conditions are z(0) = 200 and ż(0) = 0, so we could be
tempted to apply the Laplace transform as
Rearranging terms,
Z ∗ (s) 1
300Z ∗ (s) = 30U (s) − 30Z ∗ (s)s ⇔ = (8.4)
U (s) (10s + 1)s
The result will of course be the same, but this allows us to use many results
established for transfer functions, such as those in Chapters 9 and 11. It also
allows us to use Matlab to nd the answer as follows:
Remark 8.1. Remember that we already did something similar in Example 7.1.
Example 8.2. Consider the system in Figure 8.2. The force exerted by the
inductance in the handle that undergoes displacement x2 is given by F2 (t) =
αi(t), where i(t) is the current in the inductance. Find X 1 (s)
Vi (s) .
96CHAPTER 8. MODELLING INTERCONNECTED AND NON-LINEAR SYSTEMS
400
380
360
340
320
z [m]
300
280
260
240
220
200
0 10 20 30 40 50
t [s]
We can of course write all the equations, and obtain the desired result with
successive replacements. Transfer functions allow us to model each system sep-
arately, making such replacements easier.
As to the electrical system, remembering (5.48),
n2 n
n1 Vi (s)
2
I(s) n1
R + Ls = ⇔ = (8.5)
I(s) Vi (s) R + Ls
As to the lever, and letting F1 be the force exerted on mass m1 ,
F1 (s) b
F1 (t)a = F2 (t)b ⇔ = (8.6)
F2 (s) a
As to the mass,
X1 (s) 1
F1 (t) − Kx1 (t) = m1 ẍ1 (t) ⇔ = 2
(8.7)
F1 (s) m1 s + K
Finally,
b n2
X1 (s) X1 (s) F1 (s) F2 (s) I(s) a α n1
= = (8.8)
Vi (s) F1 (s) F2 (s) I(s) Vi (s) (m1 s2 + K)(R + Ls)
This way, we are also able to study each transfer function separately, analysing
its inuence in the nal result.
Bond graphs Bond graphs are another tool that can be used to assist the modelling
of interconnected systems. They consist in a graphical representation of what
happens with energy in a system, based upon the concepts of eort and ux.
These are written above and below arrows (of which, by convention, only half the
8.3. DEALING WITH NON-LINEARITIES 97
Figure 8.3: Two bond graphs of systems where elements have the same ux and
there is an eort junction. Top: electrical circuit. Notice that V1 = (V1 − V2 ) +
(V2 − V3 ) + V3 . Bottom: uidic system. Since the pipe has both resistance and
inductance, the pressure change from the pump delivering a constant pressure
P to the bottom of the reservoir where the hydraulic head is h and the pressure
is ρgh is split into two, as if the uid would rst go through an inductance
without resistance and then through a resistance without inductance, so that
P = (P − P1 ) + (P1 − ρgh) + ρgh.
tip is drawn). Figure 8.3 shows two examples of bond graphs in which several
elements have the same ux and dierent eorts; the corresponding junction
of the several eorts in one system is by convention denoted by number 1.
Figure 8.4 shows two examples of bond graphs in which several elements have
the same eort and dierent ows; the corresponding junction of the several
ows in one system is by convention denoted by number 0. Also notice how
sources of energy are denoted by SE . Finally, the product of what is above and
below each arrow (the eort and the ow) will be that element's instantaneous
power, showing how energy is distributed over the system. We will not study
bond graphs more complicated than these, nor further explore the ability of this
graphical tool to assist in the modelling.
Figure 8.4: Two bond graphs of systems where elements have the same eort
and there is a ux junction. Top: electrical circuit. Notice that I = I1 + I2 + I3 .
Bottom: mechanical system. Notice that F − Kx − B ẋ = M ẍ ⇔ F = Kx +
B ẋ + M ẍ.
10 20
8
15
6
10
4
5
2
0
y
0
y
−5
−2
saturation
−10
−4
−6 −15
dead zone linear approximation around operation point x=6
−8 −20
−10 −25
−10 −5 0 5 10 −10 −5 0 5 10
x x
Figure 8.5: Left: hard non-linearities (dead zone and saturation; in practice
limits need not be symmetric for positive and negative values, though this is
assumption is frequent). Right: soft non-linearity and one of its linear approxi-
mations.
−1.9́ 10−3 m
3000
2000
1000
Fk [N]
0
−98 N
−1000
−2000
−3000
−0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05
D y [m]
around the uncompressed value. We want a linear model for this system around
nominal conditions of rest when F = 0.
Figure 8.7 shows the non-linear force. When F = 0, the non-linear spring is
compressed by the weight of m, which is −9.8 × 10 N (notice the minus sign,
since the weight is downwards and the positive sign of y corresponds to an
upwards direction), corresponding to
500
−98 = 5000 − ⇔ ∆y = −1.9 × 10−3 m (8.9)
∆y + 0.1
The linearised law is
dFk 500
y = 5.2 × 104 y (SI)
Fk ≈ y= 2
d(∆y) ∆y=−1.9×10−3 m (∆y + 0.1) ∆y=−1.9×10−3 m
(8.10)
where y = ∆y + 1.9 × 10−3 m, or, if you prefer, the variation of length around
∆y = −1.9 × 10−3 m. Furthermore, the linear components are assumed to have
no mass, and hence transmit force F to mass m. Thus
Glossary
Desejoso ainda o Fucarãdono, como mais douto q os outros, de leuar
a sua auante cõ preg utas q
embaraçasse o padre, lhe veyo arguindo
de nouo q porq razão punha nomes torpes ao Criador de todas as
cousas, & aos Sãtos q no ceo assistião em louuor seu, infamãdoo de
metiroso, pois elle, como todos criaõ, era Deos de toda a verdade ?
& para q se entenda dõde naceo a este dizer isto, se ha de saber q
na lingoa do Iapaõ se chama a metira diusa, & por q o padre quãdo
pregaua dezia q a
qella ley q
elle vinha denuciar era a verdadeira ley
de Deos, o qual nome elles pela grossaria da sua lingoa não podião
pronuciar taõ claro como nos & por dizere Deos dezião diùs, daquy
veyo que estes seruos do diabo tomaraõ motiuo de dizere aos seus
que o padre era demonio em carne q vinha infamar a Deos põdo-lhe
nome de mentiroso: (. . . ) E porque tambem se saiba a razaõ porque
lhe este bonzo disse que punha nomes torpes aos santos, foy, porque
tinha o padre por custume quando acabaua de dizer missa rezar com
todos hua Ladaynha para rogar a N. Senhor pela augmetação da fé
Catholica, & nesta ladainha dezia sempre, como nella se custuma,
Sancte Petre ora pro nobis, Sancte Paule ora pro nobis, & assi dos
100CHAPTER 8. MODELLING INTERCONNECTED AND NON-LINEAR SYSTEMS
Exercises
1. Draw the bond graph of the system in Figure 8.8.
3. The system in Figure 8.9 is fed by a water pump with a characteristic curve
given by P (t) = 105 − 2 × 106 Q(t), where P and Q are the pressure (Pa)
and the volumetric ow (m3 /s) provided.
The pipe has a 0.01 m2 cross section and a length of 50 m. Its ow
resistance is neglectable; its inertance is not.
The tank has a free surface and 1 m2 cross-section.
The valve is non-linear and veries relation
(8.12)
p
Qv (t) = 0.3 × 10−4 N (t) Pv (t)
where Qv is the ow through the valve (m3 /s), N is the opening of the
valve (dimensionless), and Pv is the pressure (Pa) at the entrance of the
valve, which is also the pressure at the bottom of the tank.
In nominal conditions, Pv = 8 × 104 Pa and Qv = 0.01 m3 /s.
(c) Show that the non-linear relation of the valve (8.12) can be linearised
as
Qv (t) = Qv (t) + 0.085 N (t) − N (t) + 6.25 × 10−7 Pv (t) − Pv (t)
(8.13)
(d) Show that the system can be modelled by (8.13) together with
Pv (t) − Pv = ρg h − h̄
d(h−h̄)
(8.14)
Q(t) − Q̄ − Qv (t) − Qv = A dt
d(Q(t)−Q̄)
Pb (t) − Pb − Pv (t) − Pv = L
dt
∆Pv (s)
(e) Find transfer function ∆N (s) , relating variations around nominal
conditions.
4. In Figure 8.10, the lever with inertia I oscillates around the horizontal
position (i.e. θ(t) = 0) and is moved by torque τm . Mass m moves verti-
cally, at distance d from the fulcrum of the lever, inside a cylinder with
two springs of constant k , lled with incompressible oil. The pressure
dierence ∆p(t) between the two chambers of the cylinder moves the oil
through uidic resistance R. Thanks to oil lubrication, friction inside the
cylinder is neglectable.
(a) Write linearised equations for the dynamics of the system.
Θ(s)
(b) Find transfer function Tm (s) .
5. In Figure 8.11, the lever with inertia I is actuated by force F (t) and
supported on the other side by a spring and a damper. On the lever
there is a car with mass m, moving to sidewards due to gravity, without
friction. When F = 0 and the car is on the fulcrum (i.e. its position is
x = 0), the lever remains in the horizontal position. There is no friction
at the fulcrum.
(a) Write linearised equations for the dynamics of the system.
X(s)
(b) Find transfer function F (s) .
It is known that m1 = 1.5 kg, m2 = 2.0 kg, d1 = 0.6 kg, d2 = 0.4 m, and
b = 20 N s/m. The spring obeys the non-linear law in Figure 8.12, where δ
is the length variation in mm (with δ > 0 corresponding to compression),
and Fm is the resulting force in N.
7. In Figure 8.14, the fresh water (ρ = 1000 kg/m3 ) tank in the left is big
enough to keep a constant liquid height h0 = 5 m, while the tank in the
right has a 10 m2 cross-section and a variable liquid height h1 (t).
Flow qc (t) bleeds this tank and does not depend on pressure; ow q1 (t)
passes through a non-linear valve that veries
where ∆p(t) is the pressure dierence on both sides of the valve and xv (t)
is mechanically actuated by h1 (t) through a rigid lever with a = 0.4 m
and b = 4 m.
In nominal conditions, qc (t) = q1 (t) = 0.2 m3 /s and h1 (t) = 3 m.
(a) Show that the model of the ow through the valve (8.15) can be
linearised around nominal conditions as
Systems theory
105
107
To study and not think is a waste. To think and not study is dan-
gerous.
Chapter 9 develops the very important notion of transfer function of a system through
the representation of interconnected systems as blocks, in so-called block
diagrams.
In the last expression, n and m are the highest derivative orders of the equa-
tion. Assuming zero initial conditions and applying the Laplace transform, this
becomes
a0 Y (s) + a1 Y (s)s + a2 Y (s)s2 + a3 Y (s)s3 + . . . = b0 U (s) + b1 U (s)s + b2 U (s)s2 + b3 U (s)s3 + . . .
X n Xm
⇔ ak Y (s)sk = bk U (s)sk (9.2)
k=0 k=0
Rearranging terms,
m
X
bk sk
2 3
Y (s) b0 + b1 s + b2 s + b3 s + . . .
= = k=0
n (9.3)
U (s) a0 + a1 s + a2 s2 + a3 s3 + . . . X
k
ak s
k=0
109
110 CHAPTER 9. TRANSFER FUNCTIONS AND BLOCK DIAGRAMS
Remark 9.1. Some authors change the order of the coecients, and instead of
(9.3) write
m
X
bm−k sk
Y (s)
= k=0
n (9.4)
U (s) X
k
an−k s
k=0
which is the Laplace transform of the dierential equation governing the plant:
Proper transfer function Denition 9.1. A transfer function is proper if the order of the polynomial
in the numerator is equal to or less than the order of the polynomial in the
denominator.
Strictly proper transfer A transfer function is strictly proper if the order of the polynomial in the
function numerator is less than the order of the polynomial in the denominator.
In the notation of (9.3), the transfer function is proper if m ≤ n, and strictly
proper if m < n.
For reasons we shall address in Chapters 11 and 25, we will be working almost
always with proper transfer functions, and most of the times with strictly proper
transfer functions.
Order of a transfer func- Denition 9.2. The order of a transfer function is the highest order of the
tion polynomials in the numerator and the denominator. If the transfer function is
proper, its order is the order of the denominator.
Remark 9.3. The order of a transfer function is also the order of the dierential
equation from which it was formed. In fact, sk corresponds to a derivative of
order k .
Remark 9.4. Notice that some transfer functions can be simplied because
numerator and denominator have common factors. Eliminating them reduces
the order of the transfer function.
9.1. MORE ON TRANSFER FUNCTIONS 111
Ga (s) = 20 (9.9)
Order 1
19
Gb (s) = (9.10)
s + 18
17s + 16
Gc (s) = (9.11)
s + 15
14
Gd (s) = (9.12)
s
13s + 12
Ge (s) = (9.13)
s
Order 2
11
Gf (s) = (9.14)
s2 + 10s + 9
8s + 7
Gg (s) = (9.15)
s2 + 6s + 5
4s2 + 3s + 2
Gh (s) = (9.16)
s2 + s − 1
2
s − 2s + 1
Gi (s) = (9.17)
s2
2
s − 3s − 4
Gj (s) = (9.18)
s2 − 5s − 6
They have all been normalised so that the coecient of the highest order mono-
mial in the denominator is 1 (i.e. an = 1). Transfer functions Gb (s), Gd (s),
Gf (s), Gg (s), and Gi (s) are strictly proper; the other ones are not.
Gj (s) is of order 2 but can be simplied and become of order 1:
s2 − 3s − 4 (s − 4)(s + 1) s−4
Gj (s) = = = (9.19)
s2 − 5s − 6 (s − 6)(s + 1) s−6
Transfer functions are often put in the following form, that explicitly shows
the zeros of the transfer function (i.e. the zeros of the polynomial in the nu- Zeros
merator) and the poles of the transfer function (i.e. the zeros of the polynomial Poles
in the denominator):
m
Y
bm (s − zk )
Y (s) bm (s − z1 )(s − z2 )(s − z3 ) . . . k=1
= = n (9.20)
U (s) an (s − p1 )(s − p2 )(s − p3 ) . . . X
an (s − pk )
k=0
For Gj (s), see (9.19). Notice that, in the case of Gh (s), only the second expres-
sion is usual; the rst one, explicitly showing the two complex conjugate zeros,
is not.
Remark 9.5. From Denition 9.2 results that the order of a proper transfer
function is the number of its poles.
Transfer function from ze- zpk creates a transfer function from its zeros, poles, and the ratio in
bm
an
ros, poles, gain (9.20), here called gain k , and also converts a transfer function created
with tf into this form;
veries k = bm
an = 8
1 = 8.
Matlab's command zpk It can be created, converted to a ratio of two polynomials as in (9.3), and
converted back to the (9.20) form as follows:
G_g =
8 (s+0.875)
-----------
(s+5) (s+1)
G_g =
8 s + 7
-------------
s^2 + 6 s + 5
G_g =
8 (s+0.875)
-----------
(s+5) (s+1)
It does not matter whether a transfer function was created with tf or with
zpk (or with any other function to create transfer functions that we did not
study yet): pole and tzero work just the same.
Another way of nding the poles and the zeros is to access the numerator and
the denominator, and then using roots to nd the roots of these polynomials.
The transfer function must be in the tf form this time, the only one that has
the num and den elds:
>> G_g = tf(G_g);
>> G_g.num{1}
ans =
0 8 7
>> roots(ans)
ans =
-0.8750
>> G_g.den{1}
ans =
1 6 5
>> roots(ans)
ans =
-5
-1
Notice that the {1} is necessary since Matlab presumes that the transfer
function is MIMO and thus has many transfer functions relating the many inputs
with the many outputs. The cell array index accesses the rst transfer function,
which, as the system is SISO, is the only one.
A very important property of transfer functions for the rest of this chapter
has already been mention in Section 8.2 and illustrated in Example 8.2: if two
systems G1 (s) = uy11(s) y2 (s)
(s) and G2 (s) = u2 (s) are interconnected so that the output Multiplying transfer func-
of one is the input of the other, y1 (s) = u1 (s), then the resulting transfer tions
function is
y2 (s) y2 (s) y1 (s)
= = G1 (s) G2 (s) (9.25)
u1 (s) u2 (s) u1 (s)
Remark 9.6. Remember that the multiplication of two Laplace transforms Multiplication of L is con-
does not correspond to the multiplication of the original functions, but rather volution in t
to their convolution, as we have shown in (2.78). Operation convolution is
dened in (2.76). (This is sometimes a source of confusion, because the sum of
two Laplace transforms is the sum of the original functions, as L is linear.)
Example 9.6. The mechatronic system in Example 8.2 had four transfer func-
tions, as follows:
2n
I(s) n1
G1 (s) = = (9.26)
Vi (s) R + Ls
F2 (s)
G2 (s) = =α (9.27)
I(s)
F1 (s) b
G3 (s) = = (9.28)
F2 (s) a
X1 (s) 1
G4 (s) = = (9.29)
F1 (s) m1 s2 + K
The corresponding block diagram is shown in Figure 9.3. In fact,
I(s) = G1 (s)Vi (s) (9.30)
F2 (s) = G2 (s)I(s) (9.31)
F1 (s) = G3 (s)F2 (s) (9.32)
X1 (s) = G4 (s)F1 (s) (9.33)
Figure 9.5: Block diagrams with feedback loops. Left: negative feedback. Right:
positive feedback.
Example 9.7. The centrifugal governor (see Figure 9.6) is a control system Centrifugal governor
which had widespread use to control the pressure in boilers. It rotates because
of the pressure of the steam. The faster it rotates, the more the two spheres
go up, thereby opening a valve relieving steam pressure. Consequently the
regulator spins slower, the balls go down, and this closes the valve, so pressure
is no longer relieved and goes up again. This is negative feedback: an increase
of any variable has as consequence the decrease of another variable that caused
the original increase, and vice-versa.
(The block for G1 (s) is triangular because Simulink, which we will mention
below, uses triangles for constants, but this convention is unusual; when drawing
blocks by hand, they are all usually rectangles.) Then
e = G2 c = G2 G1 b = G2 G1 (a − d) = G1 G2 (a − G3 e) ⇒
G1 G2
⇒ (1 + G1 G2 G3 )e = G1 G2 a ⇒ e = a (9.43)
1 + G1 G2 G3
G1 G2 G1 G2 G5
h = G5 g = G5 (e + f ) = G5 a + G4 a = a + G4 G5
1 + G1 G2 G3 1 + G1 G2 G3
(9.44)
Finally, the whole block diagram corresponds to transfer function
s+10 1
h(s) 2 s2 +0.5s+5 s 20(s − 0.5)
= s+10 1 + (9.45)
a(s) 1 + 2 s2 +0.5s+5 s+1 s(s − 1)(s − 3)
It is usually a good idea to put the result in one of the forms (9.3) or (9.20).
Since calculations are rather complicated, we can use Matlab:
>> s = tf('s');
>> (2/s*(s+10)/(s^2+0.5*s+5))/(1+2/(s+1)*(s+10)/(s^2+0.5*s+5))+...
20*(s-0.5)/((s-1)*(s-3)*s)
ans =
22 s^7 + 45 s^6 + 200 s^5 + 617.5 s^4 + 380.5 s^3 + 1960 s^2 - 950 s
----------------------------------------------------------------------
s^9 - 2 s^8 + 8.25 s^7 - 10.75 s^6 - 55.25 s^5 + 33.75 s^4 - 350 s^3
+ 375 s^2
>> zpk(ans)
ans =
As you can see from the last result, it is possible to eliminate s and s2 +0.5∗s+5
from both the numerator and the denominator. So h(s) a(s) is of sixth order.
operators + and * add and multiply transfer functions (remember that two
blocks in series correspond to the product of their transfer functions);
feedback receives the direct and the feedback branches and gives the
transfer function of the negative feedback loop.
Matlab's command Example 9.11. We can verify our calculations of Example 9.10 as follows:
feedback
>> G1 = 2;
>> G2 = (s+10)/(s^2+0.5*s+5);
>> G3 = 1/(s+1);
>> G4 = 20*(s-0.5)/((s-1)*(s-3));
>> G5 = 1/s;
>> loop_from_a_to_e = feedback(G1*G2, G3)
loop_from_a_to_e =
2 s^2 + 22 s + 20
--------------------------
s^3 + 1.5 s^2 + 7.5 s + 25
from_a_to_g =
from_a_to_h =
>> zpk(from_a_to_h)
ans =
This is the same transfer function we found above, with the poles and zeros
common to the numerator and denominator eliminated.
Simulink Matlab's most powerful tool for working with block diagrams is Simulink.
All the block diagrams above have been created with Simulink, and then
cropped so as not to show what Simulink calls source and sink, which are
not part of what is shown in standard block diagrams (you must not include
them when drawing block diagrams by hand). To use Simulink, access its
library in Matlab by clicking the corresponding button or typing simulink.
The library looks like very dierent in dierent versions of Matlab, but its
organisation is similar: the most commonly used blocks are in one of the several
subsets of the Simulink library; then there are libraries corresponding to the
Commonly used Simulink toolboxes you have installed. Figure 9.10 shows the blocks you will likely need:
blocks
The Transfer Fcn block, from the Continuous subset of the Simulink
library, creates a transfer function like function tf.
The Zero-Pole block, from the Continuous subset of the Simulink li-
brary, creates a transfer function like function zpk.
The LTI System block, from the Control System Toolbox library, cre-
ates a transfer function using function tf or function zpk. It is also pos-
sible just to put there a variable with a transfer function, created in the
command line.
The Sum block (name hidden by default), from the Math operations sub-
set of the Simulink library, is a sum point.
The Gain block, from the Math operations subset of the Simulink li-
brary, multiplies a signal by a constant.
The From Workspace block, from the Sources subset of the Simulink
library, provides a signal to run a simulation. The signal is either a struc-
ture (see the block's dialogue for details) or a matrix with time instants in
the rst column and the corresponding values of the signal in the second
column (these will be interpolated).
The Scope block, from the Sinks subset of the Simulink library, plots
the signal it receives. It can be congured to record the data to a variable
in the workspace, which is most practical to reuse it later.
The Mux block (from multiplexer, name hidden by default), from the
Signal Routing subset of the Simulink library, joins two (or more) sig-
nals into one. The result is a vector-valued signal. If two real-values signals
are multiplexed, the result is a vector-valued signal with dimension 2.
9.2. BLOCK DIAGRAMS 121
0.12
0.1
0.08
x1 [m]
0.06
0.04
0.02
0
0 0.5 1 1.5 2 2.5 3
time [s]
To use a block, create an empty Simulink le and drag it there. Connect blocks
with arrows by clicking and dragging from one block's output to another's input.
Double-click a block to see a dialogue where you can ll in the arguments you
would use in a Matlab command written in the command line (i.e. after the
>>). Most of the times you can use numbers or variables; you just have to
create the variables before you create the model. Right-clicking a block shows a
context menu with many options, among which those of showing or hiding the
block's name, or rotating it. You can edit a block's name by clicking it, and
add a label to a signal by double-clicking it.
To run a simulation, choose its duration in the box on the top of the window,
or go to Simulation > Model Configuration Parameters. Then click the
Play button, or use command sim with the name of the (previously saved) le
with the block diagram model.
Example 9.12. Let us simulate the mechatronic system of Examples 8.2 and 9.6,
given by (9.26)(9.29). The Simulink le is as shown in Figure 9.11 and its
running time was set to 3 s; variables have been used and must be dened before
running the simulation, but this means that they are easier to change. Block
From Workspace has matrix [0 1], meaning that at time 0 it will output value
1, and since no other value is provided this one will be kept. So we are nding
the response of the system to a Heaviside function (2.5), or rather to a tension
of 1 V being applied when the simulation begins. Block Scope is congured to
save data to variable Data. The following commands create the variables, run
the simulation, and plot again the results which you could also see in the Scope
itself:
Figure 9.13: Left: open loop control. Right: closed loop control.
Remark 9.7. Notice that the input signal was specied in time and the out-
put variable was obtained as a function of time, but the dierential equations
were specied as transfer functions, i.e. not as relations in variable t but in the
Laplace transform variable s. This is the way Simulink works. However, do not
forget that, since in a block diagram system dynamics is indicated by transfer
functions, signals too must be given by their Laplace transforms, as functions
of s. It is correct to say that y(s) = G(s)u(s); it makes no sense at all to write
y(t) = G(s)u(t) mixing t and s.
The dialogue Model Configuration Parameters, which can also be ac-
cessed through a button, allows specifying many other things, among which:
the numerical method used to solve the dierential equations;
the maximum and minimum time steps used by the numerical method;
and since we want y(s) = r(s) then we should have C(s) = G−1 (s), i.e. the
controller should be an inverse model of the system to control. Notice that
if the model of the system is proper then the controller is not proper; you will
learn why this brings problems in Chapter 11.
Closed-loop control Closed-loop control uses negative feedback. The reference is compared with
the system output. Ideally, the error should be zero. What the controller
receives is this error, so the control action is based on the error.
The simplest closed-loop controller is proportional: C(s) = K ∈ R. With
Proportional control proportional control, if the error is small, the control action is small too; if
the error is large, the control action is also large. There are techniques to choose
an appropriate value of K , and also to develop more complex controllers, with
poles and zeros, which will be addressed in Part IV.
9.3. CONTROL IN OPEN-LOOP AND IN CLOSED-LOOP 123
Figure 9.15: The same as Figure 9.14, but with MIMO systems.
Actually, no control system is that simple. Figure 9.14 shows a more realistic
situation, including the following additions:
H(s) is the sensor that measures output y . A perfect sensor measures Sensor dynamics
the output exactly: ŷ(t) = y(t), ∀t; and hence H(s) = 1. No sensor is
perfect, but it is often possible to assume H(s) = 1 even so (in which case
the block does not need to be there). If this is not the case, H(s) must be
explicitly taken into account.
du (t) is a disturbance that aects the control action. This means that Control action disturbance
the control action is not precisely received by the controlled system. For
instance, if the control action is a force, this means that there are other
forces acting upon the system. Or, if the control action is a current, there
are unintended uctuations of the value determined by the controller.
dy (t) is a disturbance that aects the system output. This means that the System output disturbance
output is aected by something else other than the system. For instance,
if the output is a ow, there is some other source of uid, or some bleeding
of uid somewhere, that must be added or subtracted. Or, if the output
is a position, there may be vibrations that have to be superimposed.
dŷ (t) is a disturbance that aects the sensor's measurement of the system Output measurement dis-
output. Just like u(t) can suer a disturbance, so can ŷ(t). turbance
Remark 9.9. We saw in Chapter 3 that MIMO systems may have some inputs
in the general sense that are disturbances and others that are manipulated
variables. Figure 9.15 represents disturbances using MISO systems. The block
diagram in Figure 9.14 reects the same situation using only SISO systems. The
124 CHAPTER 9. TRANSFER FUNCTIONS AND BLOCK DIAGRAMS
Figure 9.16: The same as Figure 9.14, but using transfer functions (9.48)(9.51).
price to pay for using SISO systems is less freedom in establishing mathematical
relations between disturbances and outputs.
Notice that each of the four transfer functions above can be obtained assuming
that all inputs but one of them are zero. If the system were not linear, that
would not be the case.
Glossary
D'altra parte gli aveva detto la sera prima che lui possedeva un'dono:
che gli bastava udire due che parlavano in una lingua qualsiasi, e
dopo un poco era capace di parlare come loro. Dono singolare, che
Niceta credeva fosse stato concesso solo agli apostoli.
Exercises
1. For each of the transfer functions below, answer the following questions:
What are its poles?
What are its zeros?
What is its order?
Is it a proper transfer function?
Is it a strictly proper transfer function?
What is the dierential equation it corresponds to?
(a) s
s2 + 12s + 20
(b) ss +
−5
1
2
(c) 3 s + 22s + 10
s − 5s + 15.25s
(d) 10
(s + 1)2 (s2 + 5s + 6)
(e) s2 + 2
2
s (s + 3)(s + 50)
(s4 + 6s3 + 8.75s2 )
(f)
(s2 + 4s + 4)2
2. Find the following transfer functions for the block diagram in Figure 9.17:
y(s)
(a)
d(s)
y(s)
(b)
r(s)
y(s)
(c)
m(s)
y(s)
(d)
n(s)
u(s)
(e)
d(s)
u(s)
(f)
r(s)
u(s)
(g)
m(s)
u(s)
(h)
n(s)
e(s)
(i)
d(s)
e(s)
(j)
r(s)
e(s)
(k)
m(s)
e(s)
(l)
n(s)
5. Redraw the block diagram of Figure 9.11 from Example 9.12 as follows:
We already know that we can use the Laplace transform (and its inverse)
to nd out the output of any transfer function for any particular input. In
this chapter we study several usual particular cases. This allows us to nd
approximate responses in many cases, and to characterise with simplicity more
complex responses. It also paves the way to the important concept of frequency
responses.
u(t) = d t (10.7)
d
L [u(t)] = 2 (10.8)
s
u(t) = t (10.9)
1
L [u(t)] = 2 (10.10)
s
129
130 CHAPTER 10. TIME AND FREQUENCY RESPONSES
u(t) = d t2 (10.11)
2d
L [u(t)] = 3 (10.12)
s
Unit parabola In particular, the unit parabola, with second derivative 2:
u(t) = t2 (10.13)
2
L [u(t)] = 3 (10.14)
s
You can either nd the Laplace transforms above in Table 2.1, or calculate them
yourself.
Remark 10.1. Notice that:
Z t
the unit step is the integral of the impulse: δ(t) dt = H(t);
0
Z t
the unit ramp is the integral of the unit step: H(t) dt = t;
0
Z t
1 2
the unit parabola is not the integral of the unit ramp: t dt = t 6=
0 2
t2 .
Properties of δ(t) Remark 10.2. Remember that while the Heaviside function H(t) is a function,
δ(t) is not a function and so are t and t2 , the Dirac delta δ(t) is not. It is a generalised function, and
the limit of the following family of functions:
(
1
, if 0 ≤ t ≤
f (t, ) = (10.15)
0, if t < 0 ∨ t >
δ(t) = lim f (t, ) (10.16)
→0+
Since
Z +∞ Z Z
1
f (t, ) dt = f (t, ) dt = dt = 1, ∀ ∈ R+ (10.17)
−∞ 0 0
Its integral in R is 1 we also have Z +∞
δ(t) dt = 1 (10.18)
−∞
Furthermore, for a continuous function g(t),
f (t, ) min g(t) ≤ f (t, )g(t) ≤ f (t, ) max g(t)
0≤t≤ 0≤t≤
Z Z Z
⇒ f (t, ) min g(t) dt ≤ f (t, )g(t) dt ≤ f (t, ) max g(t) dt
0 0≤t≤ 0 0 0≤t≤
Z Z Z
⇔ min g(t) f (t, ) dt ≤ f (t, )g(t) dt ≤ max g(t) f (t, ) dt
0≤t≤ 0 0 0≤t≤ 0
Z
⇒ min g(t) ≤ f (t, )g(t) dt ≤ max g(t) (10.19)
0≤t≤ 0 0≤t≤
The reasons why (10.1)(10.13) are routinely used as inputs to test systems
are:
They are simple to create.
They can be used to model many real inputs exactly, and even more as
approximations.
Example 10.1. The following situations can be modelled as steps:
A metal workpiece is taken from an oven and quenched in oil at a lower
temperature.
A sluice gate is suddenly opened, letting water into an irrigation canal.
u1(t)
t0 1
t
t
k
u3(t)
t0 t 1
t
Figure 10.3: Would you test a car's suspension like this? (Source: Wikimedia,
modied)
10.1. TIME RESPONSES: STEPS AND IMPULSES AS INPUTS 133
Figure 10.4: The Rasteirinho mobile robot, without the laptop computer with
which it is controlled.
Example 10.4. The Rasteirinho (see Figure 10.4) is a mobile robot, of which
about a dozen units are used at IST in laboratory classes of dierent courses.
It is controlled by a laptop computer, xed with velcro. Its maximum speed
depends on the particular unit; in most, it is around 80 cm/s. Consequently, it
is useless to try to make its position follow a unit ramp, which would correspond
to a 1 m/s velocity. Once more, we could simulate its behaviour with a linear
model for a unit ramp and then scale the output down.
Example 10.5. In the WECs of Figures 3.2 and 3.3, the air inside the device is
compressed by the waves. A change of air pressure of 1 Pa is ludicrously small;
it is useless even to try to measure it. But if our model of the WEC is linear we
can simulate how much energy it produces when a unit step is applied in the air
pressure and then scale the result up to a more reasonable value of the pressure
variation.
In what follows we will concentrate on the impulse and unit step responses,
and mention responses to unit ramps and steps with amplitudes which are not 1
whenever appropriate.
Theorem 10.1. The impulse response of a transfer function has a Laplace Impulse response of a sys-
transform which is the transfer function itself. tem
Remark 10.5. This allows dening a system's transfer function as the Laplace
transform of its output when the input is an impulse. This denition is an
alternative to Denition 4.1 found in many textbooks.
Corollary 10.1. The output of a transfer function G(s) for any input u(t)
is equal to the convolution of the input with the transfer function's impulse
response g(t):
Z t
y(t) = g(t) ∗ u(t) = g(t − τ )u(τ ) dτ (10.25)
0
step plots a system's response to a unit step (and can return the values
plotted in vectors);
impulse does the same for an impulse input;
lsim, already studied in Section 4.2, can be used for any input.
Just like lsim, both step and impulse use numerical methods to nd the re-
sponses, rather than analytical computations.
Matlab's command Example 10.6. The impulse, unit step and unit ramp responses of a plant are
impulse shown in Figure 10.5 and obtained as follows:
Matlab's command step >> s = tf('s'); G = 1/(s+1);
>> figure, impulse(G), figure, step(G)
>> t = 0 : 0.01 : 6; figure, plot(t, lsim(G, t, t))
>> xlabel('t [s]'), ylabel('output')
>> title('response to a unit ramp')
The time range is chosen automatically by step and impulse.
Example 10.7. The response of the transfer function from Example 10.6 to a
step with amplitude 10 during 20 s can be found in two dierent manners, both
providing, of course, the same result:
>> [stepresp, timevector] = step(G, 20);
>> t = 0 : 0.01 : 20;
>> figure, plot(t, lsim(G, 10*ones(size(t)), t), timevector, 10*stepresp)
>> xlabel('t [s]'), ylabel('output'), title('Step response')
There is, in fact, a slight dierence in the two plots shown in Figure 10.6, because
function step chooses the sampling time automatically, and it is dierent from
the one explicitly fed to lsim.
In each of them we can separate the terms that tend to zero as the time increases
Transient from those that do not. The rst make up what we call the transient response.
Steady-state The latter make up what we call the steady-state response.
yi (t) = 0
|{z} e−t
+ |{z} (10.30)
steady-state transient
ys (t) = 1
|{z} e−t
− |{z} (10.31)
steady-state transient
yr (t) = e−t
t − 1 + |{z} (10.32)
| {z }
steady-state transient
10.2. STEADY-STATE RESPONSE AND TRANSIENT RESPONSE 135
Impulse Response
1
0.9
0.8
0.7
Amplitude
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6
Time (seconds)
Step Response
1
0.9
0.8
0.7
Amplitude
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8 9
Time (seconds)
4
output
0
0 1 2 3 4 5 6
t [s]
Figure 10.5: Impulse, unit step and unit ramp responses of G(s) = s+1 ,
1
from
Example 10.6.
136 CHAPTER 10. TIME AND FREQUENCY RESPONSES
Step response
10
output
5
0
0 5 10 15 20
t [s]
In other words, a time response y(t) can be separated into two parts, the tran-
sient response yt (t) and the steady-state response yss (t), such that
We also call transient to the period of time in which the response is dominated
by the transient response, and steady-state to the period of time in which the
transient response is neglectable and the response can be assumed equal to the
steady-state response. Whether a transient response can or cannot be neglected
depends on how precise our knowledge of the response has to be. Below in
Sections 11.2 and 11.3 we will see usual criteria for this.
The steady-state response can be:
innity, with the output oscillating with increasing amplitude, as the im-
pulse response of (s2 +1)2 ,
s
shown in Figure 10.7.
What the steady-state response is depends on what the system is and on what
its input is.
Remark 10.7. Most systems never reach innity. The probe of Example 10.2
can move away to outer space, but temperatures do no rise to innite values
(before that the heat source is exhausted, or something will burn), robots reach
the end of their workspace, high electrical currents will activate a circuit breaker,
etc.; in other words, for big values of the variables involved, the linear model of
the system usually ceases in one way or another to be valid.
Over the next sections we will learn several ways to calculate steady-state
responses without having to nd an explicit expression for the output, and then
calculating its limit. When the steady-state response is constant or innity, it
Final value theorem can be found from the nal value theorem (Theorem 2.4), i.e. applying (2.72).
10.2. STEADY-STATE RESPONSE AND TRANSIENT RESPONSE 137
Step Response
1.8
1.6
1.4
1.2
Amplitude
0.8
0.6
0.4
0.2
0
0 10 20 30 40 50 60
Time (seconds)
Impulse Response
20
15
10
Amplitude
−5
−10
−15
−20
0 5 10 15 20 25 30 35 40
Time (seconds)
Example 10.8. The steady-states of the impulse, step and ramp responses
(10.27)(10.29) are as follows:
They can be found without the inverse Laplace transform using (2.72):
1
lim yi (t) = lim s =0 (10.39)
t→+∞ s→0 s+1
1 1
lim ys (t) = lim s =1 (10.40)
t→+∞ s→0 s + 1 s
1 1
lim yr (t) = lim s = +∞ (10.41)
t→+∞ s→0 s + 1 s2
Example 10.9. Remember that (2.72) applies when the limit in time exists.
Figure 10.7 shows two cases where this limit clearly does not exist because of os-
cillations with an amplitude that does not decrease. But the two corresponding
limits are
1 1
lim y(t) = lim s =1 (10.42)
t→+∞ s→0 (s2
+ 1)(s + 1) s
s
lim y(t) = lim s 2 =∞ (10.43)
t→+∞ s→0 (s + 1)2
In the rst case we got the average value of the steady-state response; in the
second, innity. Neither case is a valid application of the nal value theorem.
We need to know rst if the time limit exists.
Static gain Denition 10.1. The constant steady-state output of the unit step response
of a stable system G(s) = YU (s)
(s)
is called the static gain of G(s):
b0 + b1 s + b2 s2 + b3 s3 + . . . 1 b0
lim y(t) = lim s 2 3
= (10.44)
t→+∞ s→0 a + a1 s + a2 s + a3 s + . . . |{z}s a0
|0 {z }
G(s) U (s)
10.3 Stability
The time responses from Section 10.2 illustrate the importance of the concept
of stability.
Bounded signal Denition 10.2. A signal x(t) is bounded if ∃K ∈ R+ : ∀t, |x(t)| < K .
BIBO stability Denition 10.3. A system is:
stable if, for every input which is bounded, its output is bounded too;
not stable if there is at least a bounded input for which its output is not
bounded.
This denition of stability is known as bounded input, bounded output stabil-
ity (BIBO stability).
All poles of stable transfer Theorem 10.2. A transfer function is stable if and only if all its poles are on
functions are on the left the left complex half-plane.
complex half-plane
Proof. We will prove this in two steps:
A transfer function G(s) is stable if and only if its impulse response g(t)
is absolutely integrable, i.e. i ∃M ∈ R+
Z +∞
|g(t)| dt < M (10.45)
0
Lemma 10.1. A transfer function is stable if and only if its impulse response
is absolutely integrable.
Let us also suppose that the input u(t) is bounded, as required by the denition
of BIBO stability:
|u(t)| ≤ U, ∀t (10.47)
From (10.25) we get
Z t
|y(t)| = |g(t) ∗ u(t)| = g(τ )u(t − τ ) dτ
0
Z t
≤ |g(τ )u(t − τ )| dτ
0
Z t
≤ |g(τ )| |u(t − τ )| dτ
0
Z t
≤U |g(τ )| dτ ≤ U K (10.48)
0
So the output is bounded, proving that the condition (impulse response abso-
lutely integrable) is sucient.
Reductio ad absurdum proves that it is also necessary. Suppose that the
impulse response g(t) is not absolutely integrable; thus, there is a time instant
T ∈ R+ such that
Z T
|g(τ )| dτ = +∞ (10.49)
0
This is a bounded input, −1 ≤ u(t) ≤ 1, ∀t, and so, if the transfer function
were stable, the output would have to be bounded. But in time instant T
Z T Z T
y(T ) = g(τ )u(t − τ ) dτ = |g(τ )| dτ = +∞ (10.51)
0 0
and thus y(t) is not bounded. This shows that the condition is not only sucient
but also necessary.
The pole is real, p ∈ R, and simple. In this case the fraction (where k
s−p
k ∈ R is some real numerator) has the inverse Laplace transform k ept .
The pole is real and its multiplicity n is 2 or higher. In this case there will
kn−1 kn−2
be, in the expansion, fractions of the form (s−p)
kn
n , (s−p)n−1 , (s−p)n−2 . . . s−p .
k1
Notice that the imaginary parts cancel out, and we are left with oscillations
having:
period 2π
b , where b is the positive imaginary part of the poles;
amplitude 2<(k)eat , where a is the real part of the poles. The ex-
ponential is the important term, since it is the exponential that may
cause this term to vanish or diverge.
So:
2<(ki ) i−1 at
(i−1)! t e cos bt. So:
It is clear that one single term not tending exponentially to zero suces to
prevent the impulse response from being absolutely integrable. Consequently,
the only way for the impulse response to tend to zero is that all poles should
have negative real parts; in other words, that all poles should lie on the left
complex half-plane.
While some authors call unstable to all systems that are not stable, the
following distinction is current.
Theorem 10.3. Marginally stable systems have no poles on the right complex Marginally stable systems
half-plane, and one or more simple poles on the imaginary axis. have simple poles on the
imaginary axis
Proof. It is clear from the proof of Lemma 10.2 that simple poles on the imag-
inary axis correspond to:
responses to bounded inputs which are not bounded, since systems with
such poles are not stable.
A single pole p on the right complex half-plane makes a system unstable, since,
whatever the input may be, in the partial fraction expansion of the output there
will be a fraction of the form s−p
k
, and the proof of Lemma 10.2 shows that such
terms always diverge exponentially to innity.
The same happens with multiple poles on the imaginary axis:
pure imaginary multiple poles also cause the impulse response to diverge,
as argued in the proof of Lemma 10.2.
The eect of each pole on the stability of a system justies the following
nomenclature.
Poles, not zeros, deter- Remark 10.8. Never forget that zeros have nothing to do with stability.
mine stability
10.4. TIME RESPONSES: PERIODIC INPUTS 143
f (t + T) = f (t), ∀t (10.59)
Triangle waves are also a useful alternative to ramps, since they avoid the
inconvenience of an innitely large signal. Square waves are useful in experi-
mental settings for another reason: they allow seeing successive step responses,
and consequently allow measuring parameters several times in a row. For this
purpose, the period must be large enough for the transient regime to disappear.
Example 10.11. We can nd the output of G(s) = 15
s+20 to a square wave with Matlab's command
period 1 s and amplitude 1 using Matlab as follows: square
>> t = 0 : 0.001 : 3;
>> u = square(t*2*pi);
>> figure, plot(t,u, t,lsim(15/(s+20),u,t))
>> axis([0 3 -1.5 1.5])
>> xlabel('t [s]'), ylabel('input and output'), legend({'input','output'})
144 CHAPTER 10. TIME AND FREQUENCY RESPONSES
1.5
square wave
triangle wave
1
0.5
signal
0
−0.5
−1
−1.5
0 1 2 3 4 5
t [s]
Figure 10.9: A square wave and a triangle wave (both with period 1 and ampli-
tude 1).
Notice that the amplitude of the rst step is 1 and the amplitude of the following
steps is the peak to peak amplitude, twice as big, viz. 2. Also notice that there
is a step every half period, i.e. every 0.5 s.
The period was appropriately chosen since (as we shall see in Section 11.2)
the transient response is practically gone after 0.5 s. A period four times smaller
would not allow seeing a complete step response. Both cases are shown in
Figure 10.10.
Another useful periodic signal is the sinusoid, which appears naturally with
any phenomena that are the projection onto a plane of a circular movement on
a perpendicular plane. In practice, sinusoids are found (at least as approxima-
tions) when working with such dierent things as tides, motor vibrations, or
daily thermal variations.
Sinusoidal inputs cause si- Theorem 10.4. The stationary response y(t) of a stable linear plant G(s)
nusoidal outputs in steady subject to a sinusoidal input u(t) = sin(ωt) is
state
y(t) = |G(jω)| sin(ωt + ∠G(jω)) (10.61)
and
ω ω
Y (s) = G(s)U (s) = G(s)L [sin(ωt)] = G(s) = G(s)
s2 + ω 2 (s + jω)(s − jω)
(10.63)
response yt (t)
We know that all terms in the transient response yt (t) belong there because the
exponentials are vanishing, since the poles are on the left complex half-plane.
10.4. TIME RESPONSES: PERIODIC INPUTS 145
1.5
input
output
1
input and output
0.5
−0.5
−1
−1.5
0 0.5 1 1.5 2 2.5 3
t [s]
1.5
input
output
1
input and output
0.5
−0.5
−1
−1.5
0 0.5 1 1.5 2 2.5 3
t [s]
15
Figure 10.10: Response of G(s) = to two square waves with dierent
s + 20
periods.
146 CHAPTER 10. TIME AND FREQUENCY RESPONSES
If there are multiple poles, the only dierence is that there will be terms of the
form (i−1)!
bk
ti−1 epk t , i ∈ N in the transient response yt (t), which will still, of
course, be vanishing with time. In either case, the steady-state response is the
same.
From (10.63) we know that Y (s) = G(s) (s+jω)(s−jω)
ω
, and from (10.64) we
know that Y (s) = b0
s+jω + b0
s−jω + L [yt (t)]. We can multiply both by s + jω
and obtain
ω b0
G(s) = b0 + + L [yt (t)] (s + jω) (10.65)
s − jω s − jω
Corollary 10.2. Since G(s) is not only stable but also linear, if the input is
u(t) = A sin(ωt) instead, the output is
Example 10.12. Figure 10.11 shows the simulated vertical position of the Wave
Energy Converter of Figure 3.2, the Archimedes Wave Swing, when subject to
sinusoidal waves of dierent amplitudes. The device is in steady-state, as is clear
both from the regularity of its movements and from the time already passed since
the beginning of the simulation. As the input is sinusoidal, if the model were
linear, the output should be sinusoidal too. But the shape of the output is not
sinusoidal; it is not even symmetrical around its mean value; its amplitude does
not increase linearly with the amplitude of the input. The model used to obtain
these simulation results is obviously non-linear.
Frequency, amplitude, and if the input is sinusoidal, the steady-state output is sinusoidal too;
phase of output for sinu-
soidal inputs if the input has frequency ω , the steady-state output has frequency ω too;
10.5. FREQUENCY RESPONSES AND THE BODE DIAGRAM 147
4
2.0 m
3
x / m
1
0
0.5 m
−1
−2
Figure 10.11: Vertical position of the AWS from Figure 3.2, simulated assuming
sinusoidal sea waves of dierent amplitudes between 0.5 m and 2.0 m.
if the input has amplitude A (or peak-to-peak amplitude 2A), the steady-
state output has amplitude A|G(jω)| (or peak-to-peak amplitude 2A|G(jω)|);
if the input has phase θ at some time instant t, the steady-state output
has phase θ + ∠G(jω) at that time instant t.
Remember that:
the steady-state output is sinusoidal, but the transient is not: you must The transient is not sinu-
wait for the transient to go away to have a sinusoidal output; soidal
unstable systems have transient responses that do not go away, so you will
never have a sinusoidal output;
its gain in decibel (denoted by symbol dB) is 20 log10 |G(jω)| (gain Gain in dB
|G(jω)| is often called gain in absolute value, to avoid confusion with the Gain in absolute value
gain in decibel);
Remark 10.10. These denitions are used even if G(s) is not stable. If the
system is stable:
the gain is the ratio between the amplitude of the steady-state output and
the amplitude of the input;
the phase is the dierence in phase between the steady-state output sinu-
soid and the input sinusoid.
>> s = tf('s');
>> G = 300*(s+1)/((s+10)*(s+100));
>> t = 0 : 0.001 : 30;
>> figure, plot(t,sin(t), t,lsim(G,sin(t),t))
>> xlabel('time [s]'), ylabel('output'), grid
148 CHAPTER 10. TIME AND FREQUENCY RESPONSES
Ay
Ay > Au ⇒ |G(jω)| = > 1 ⇒ 20 log10 |G(jω)| > 0 dB (10.69)
Au
That is to say:
the gain in absolute value is larger than 1;
the gain in decibel is larger than 0 dB.
If the amplitude of the output is smaller than the amplitude of the input,
Attenuation Ay > Au , the system is attenuating its input:
Ay
Ay < Au ⇒ |G(jω)| = < 1 ⇒ 20 log10 |G(jω)| < 0 dB (10.70)
Au
That is to say:
the gain in absolute value is smaller than 1;
the gain in decibel is smaller than 0 dB.
If the amplitude of the output and the amplitude of the input are the same,
Ay = Au , the system is neither amplifying nor attenuating its input:
Ay
Ay = Au ⇒ |G(jω)| = = 1 ⇒ 20 log10 |G(jω)| = 0 dB (10.71)
Au
That is to say:
the gain in absolute value is 1;
the gain in decibel is 0 dB.
10.5. FREQUENCY RESPONSES AND THE BODE DIAGRAM 149
0.8
0.6 X: 26
Y: 0.4219
0.4
0.2
output
−0.2
−0.4
−0.6
−0.8
−1
0 5 10 15 20 25 30
time [s]
X: 0.1703
1.5 Y: 1.313
1
output
0.5
−0.5
−1
−1.5
0 0.05 0.1 0.15 0.2
time [s]
300(s + 1)
Figure 10.12: Response of G(s) = to two sinusoids with dif-
(s + 10)(s + 100)
ferent periods.
150 CHAPTER 10. TIME AND FREQUENCY RESPONSES
Table 10.1: Gain values; Au is the amplitude of the input sinusoid and Ay is
the amplitude of the steady-state output sinusoid
Gain in absolute value Gain in decibel Amplitudes
Minimum value |G(jω)| = 0 20 log 10|G(jω)| = −∞ dB Ay = 0
Attenuation 0 < |G(jω)| < 1 20 log 10|G(jω)| < 0 dB Ay < Au
Input and output with same amplitude |G(jω)| = 1 20 log 10|G(jω)| = 0 dB Ay = Au
Amplication |G(jω)| > 1 20 log 10|G(jω)| > 0 dB Ay > Au
Furthermore:
If the extremes of the output take place earlier than the corresponding
Phase lead extremes of the input, the output leads in relation to the input; this
means that
If the extremes of the output take place later than the corresponding
Phase lag extremes of the input, the output lags in relation to the input; this means
that
If the extremes of the output and the corresponding extremes of the input
take place at the same time, the output and the input are in phase; this
means that
∠G(jω) = 0 (10.74)
If the maxima of the output and the minima of the input take place at
Phase opposition the same time, and vice versa, the output and the input are in phase
opposition; this means that
∠G(jω) = ±180◦ = ±π rad (10.75)
Remark 10.11. Notice that, since sinusoids are periodic, the phase is dened
up to 360◦ shifts: a 90◦ phase is undistinguishable from a −270◦ phase, or for
that matter from a 3690◦ phase or any 90◦ + k360◦ , k ∈ Z phase. While each
of these values can be in principle arbitrarily chosen, it usual to make the phase
vary continuously (as much as possible) with frequency, starting from values for
low frequencies determined as we will see below in Section 11.4.
Gain crossover frequency Denition 10.9. Frequencies ωgc at which the frequency response of a plant
G(s) veries
For ω = 1 rad/s:
For ω = 2 rad/s:
The Bode diagram, or Bode plot, is a graphical representation of the fre- Bode diagram
quency response of a system, as a function of frequency. This diagram comprises
two plots:
a top plot, showing the gain in dB (y axis) as a function of frequency in
a semi-logarithmic scale (xaxis);
a bottom plot, showing the phase in degrees (y axis) as a function of
frequency in a semi-logarithmic scale (xaxis).
Frequency is usually given in rad/s, but sometimes in Hz.
Denition 10.11. A frequency variation corresponding to a 10fold increase Decade
or decrease is called decade. In a Bode diagram, since the frequency is shown
in a logarithmic scale, decades are equally spaced.
152 CHAPTER 10. TIME AND FREQUENCY RESPONSES
Bode Diagram
10
Magnitude (dB)
0
−10
−20
−30
90
Phase (deg)
45
−45
−90
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (rad/s)
300(s + 1)
Figure 10.14: Bode diagram of G(s) = .
(s + 10)(s + 100)
In the following sections we will learn how to plot by hand the Bode diagram
of any plant (or at least a reasonable approximation thereof); meanwhile, the
following Matlab commands can be used instead:
bode plots the Bode diagram of a system;
>> w = [1 200];
>> Gjw = 300*(1i*w+1)./((1i*w+10).*(1i*w+100));
Gjw =
0.3271 + 0.2676i 0.6186 - 1.2212i
>> gains = 20*log10(abs(Gjw))
gains =
-7.4909 2.5420
>> phases = rad2deg(unwrap(angle(Gjw)))
phases =
38.7165 -60.8590
Notice the small dierences due to numerical errors.
Example 10.16. The Bode diagram in Figure 10.15 of G(s) = from
1
s2 +0.5s+1
Example 10.14 shows the gains and phases found in that example, that can also
be found as follows:
>> G = tf(1,[1 .5 1])
G =
1
---------------
s^2 + 0.5 s + 1
>> figure,bode(G),grid on
>> Gjw = squeeze(freqresp(G, [.5 1 2]))
Gjw =
1.2000 - 0.4000i
0.0000 - 2.0000i
-0.3000 - 0.1000i
>> gains = 20*log10(abs(Gjw))
gains =
2.0412
6.0206
-10.0000
>> phases = rad2deg(unwrap(angle(Gjw)))
phases =
-18.4349
-90.0000
-161.5651
Example 10.17. From the Bode diagram in Figure 10.16, even without know-
ing what transfer function it belongs to, we can conclude the following:
20
At ω = 0.1 rad/s, the gain is 20 dB (i.e. 10 20 = 10 in absolute value) and
the phase is 0 = 0 rad. So, if the input is
◦
π
u(t) = 5 sin(0.1t + ) (10.86)
6
the steady-state output will be
π π
y(t) = 5 × 10 sin(0.1t + ) = 50 sin(0.1t + ) (10.87)
6 6
17
At ω = 10 rad/s, the gain is 17 dB (i.e. 10 20 = 7.1 in absolute value) and
the phase is −45◦ = − π4 rad. So, if the input is
π
u(t) = 5 sin(10t + ) (10.88)
6
the steady-state output will be
π π π
y(t) = 5 × 7.1 sin(10t + − ) = 35.5 sin(10t − ) (10.89)
6 4 12
10.5. FREQUENCY RESPONSES AND THE BODE DIAGRAM 155
Bode Diagram
10
Magnitude (dB)
0
−10
−20
−30
−40
0
Phase (deg)
−45
−90
−135
−180
−1 0 1
10 10 10
Frequency (rad/s)
1
Figure 10.15: Bode diagram of .
s2 + 0.5s + 1
−20
At ω = 1000 rad/s, the gain is −20 dB (i.e. 10 = 0.1 in absolute value) 20
π π
u(t) = 0.5 sin(0.1t + ) + 25 sin(1000t + ) (10.94)
6 6
the steady-state output will be
π π π
y(t) = 0.5 × 10 sin(0.1t + ) + 25 × 0.1 sin(1000t + − )
6 6 2
π π
= 5 sin(0.1t + ) + 2.5 sin(1000t − ) (10.95)
6 3
Notice how the frequency with the largest amplitude in the input now has
the smallest.
Glossary
And he said: Behold, it is one people, and one tongue is to al: and
they haue begunne to doe this, neyther wil they leaue of from their
determinations, til they accomplish them indede. Come ye therfore,
let vs goe downe, and there confound their tongue, that none may
heare is neighbours voice.
Bode Diagram
20
Magnitude (dB)
10
−10
−20
0
Phase (deg)
−45
−90
−1 0 1 2 3
10 10 10 10 10
Frequency (rad/s)
amplication amplicação
attenuation atenuação
bounded signal sinal limitado
decade década
frequency response resposta em frequência
gain ganho
gain crossover frequency frequência de cruzamento de ganho
impulse impulso
marginally stable marginalmente estável
phase fase
phase crossover frequency frequência de cruzamento de fase
phase lag atraso de fase
phase lead avanço de fase
phase opposition oposição de fase
phase crossover frequency frequência de cruzamento de fase
ramp rampa
square wave onda quadrada
static gain ganho estacionário
steady-state estado estacionário
steady-state response resposta estacionária
stable estável
step degrau, escalão
transient response resposta transiente
triangle wave onda triangular
unit ramp rampa unitária
unit step degrau unitário
unstable instável
Exercises
1. For each of the following pairs of a transfer function and an input:
10
(a) G(s) = and u(t) = 0.4, t > 0
s2 + 21s + 20
10.5. FREQUENCY RESPONSES AND THE BODE DIAGRAM 157
5
(b) G(s) = and u(t) = 2t, t > 0
s + 0.1
s
(c) G(s) = 2 and u(t) = δ(t)
s +s+1
s
(d) G(s) = 2 and u(t) = 0.4, t > 0
s +s+1
7
(e) G(s) = and u(t) = 0.4, t > 0
s
2. From the poles of the transfer functions of Exercise 1 of Chapter 9, explain
which of them are stable, unstable, or marginally stable.
3. Figure 10.17 shows the Bode diagrams of some transfer functions. For each
of them, read in the Bode diagram the values from which you can calculate
the transfer function's steady state response to the following inputs:
u(t) = sin(2t)
π
u(t) = sin(2t + 2)
u(t) = sin(1000t)
u(t) = 10 sin(1000t)
1
u(t) = 3 sin(0.1t − π4 ) + sin(2t + π2 )10 sin(1000t)
Bode Diagram
Magnitude (dB) 200
100
−100
−180
Phase (deg)
−225
−270
−315
−360
−3 −2 −1 0 1 2 3
10 10 10 10 10 10 10
Frequency (rad/s)
Bode Diagram
−30
Magnitude (dB)
−40
−50
−60
−70
180
Phase (deg)
90
−90
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (rad/s)
where we have used (2.47). In particular, the unit step response of (11.1) is b
Unit step response of s
b
y(t) = L −1
= bt (11.3)
s2
161
162 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
and in the more general case of a step with amplitude K the response is b
Step response of s
This response will go up if K > 0 and go down if K < 0, as seen in Figure 11.1.
As we know, (11.1) is marginally stable, since
its response to a step, which is a bounded input, is not bounded;
when compared with the case b = 1, the gain is shifted up if b > 1 or down
if 0 < b < 1, by 20 log10 b in either case.
b
1 − e−at (11.10)
y(t) =
a
and, in the more general case of a step with amplitude K , the step response is
bK
1 − e−at (11.11)
y(t) =
a
As we know, (11.9) is
stable if a > 0 (pole in −a ∈ R− ), in which case the exponential in
(11.10)(11.11) vanishes when t increases;
unstable if a < 0 (pole in −a ∈ R+ ), in which case the exponential in
(11.10)(11.11) keeps increasing when t increases.
Figure 11.3 shows the general shape of the step response. Notice that, if the
system is stable:
the steady-state response is constant and given by yss = a ;
bK
the response is monotonous, and thus the output is never larger than the
steady-state value;
the response changes with time as follows:
0.7 bK
1 − e−0.7 = 0.50 yss (11.12)
y =
a a
1 bK
1 − e−1 = 0.63 yss (11.13)
y =
a a
2 bK
1 − e−2 = 0.86 yss (11.14)
y =
a a
2.3 bK
1 − e−2.3 = 0.90 yss (11.15)
y =
a a
3 bK
1 − e−3 = 0.95 yss (11.16)
y =
a a
4 bK
1 − e−4 = 0.98 yss (11.17)
y =
a a
4.6 bK
1 − e−4.6 = 0.99 yss (11.18)
y =
a a
1
a is called time constant; Time constant
bK −a0
y 0 (0) = ae = bK (11.19)
a
164 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Denition 11.1. The x%settling time ts,x% is the minimum value of time Settling time
for which
x x
∀t > ts,x% , yss 1 − ≤ y(t) ≤ yss 1 + (11.20)
100 100
The most usual are the 5%settling time and the 2%settling time, though other
values, such as 10%, 15%, or 1%, are sometimes found.
b
Frequency response of s+a The frequency response of (11.9) is
b b(a − jω)
G(jω) = = 2 (11.21)
jω + a a + ω2
b
|G(jω)| = = √ b (11.22)
jω + a a2 + ω 2
20 log10 |G(jω)| = 20 log10 b − 10 log10 a2 + ω 2
[dB] (11.23)
ω
∠G(jω) = 0 − ∠(jω + a) = − arctan (11.24)
a
and thus, if a > 0 (stable system):
b
ω a ⇒ G(jω) ≈ (11.25)
a
b b
ω a ⇒ |G(jω)| ≈ = (11.26)
a a
b
ω a ⇒ 20 log10 |G(jω)| ≈ 20 log10 [dB] (11.27)
a
b
ω a ⇒ ∠G(jω) ≈ ∠ =0 ◦
(11.28)
a
11.2. TIME AND FREQUENCY RESPONSES OF A FIRST-ORDER SYSTEM WITHOUT ZEROS 165
for frequency ω = a,
b
G(ja) = (11.29)
a(j + 1)
b = b √1 (11.30)
|G(ja)| =
a(j + 1) a 2
b √ b
20 log10 |G(ja)| = 20 log10 − 20 log10 1 + 1 ≈ 20 log10 − 3 [dB]
a a
(11.31)
∠G(ja) = 0 − ∠(j + 1) = −45◦ (11.32)
b
ω a ⇒ G(jω) ≈ (11.33)
jω
b b
ω a ⇒ |G(jω)| ≈ = (11.34)
jω ω
ω a ⇒ 20 log10 |G(jω)| ≈ 20 log10 b − 20 log10 ω [dB] (11.35)
b
ω a ⇒ ∠G(jω) ≈ ∠ = −90◦ (11.36)
jω
In other words:
the phase goes down from 0◦ for low frequencies to −90◦ for high frequen-
cies.
b b
G(j|a|) = = (11.38)
a + j|a| |a|(−1 + j)
ω = |a| ⇒ ∠G(jω) = 0 − ∠(−1 + j) = −135◦ (11.39)
So in this case the phase goes up from −180◦ for low frequencies to −90◦ for
high frequencies. Remember that since the system is unstable in this case the
output will not be a sinusoid in steady state (it will have diverged exponentially
to innity).
Figure 11.4 shows the Bode diagram of (11.9).
Remark 11.1. The Bode diagram of (11.9) in Figure 11.4 is often approximated
by its asymptotes shown in Figure 11.5.
Remark 11.2. The steady-state response of (11.9) to a unit step ab can be found
from the gain for low frequencies (11.25). In fact, a low frequency corresponds
to a large time span.
166 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
b
G(s) = , b>0 (11.41)
s2 + a1 s + a2
b b
G(s) = = , b>0
s2 2
p p
+ 2ξωn s + ωn (s + ξωn + ξ + 1)(s + ξωn − ξ 2 + 1)
2
(11.42)
For reasons we will see later, ξ is called damping coecient and ωn natural
frequency. The poles of (11.42) are
p
p1 = −ξωn + ωn ξ 2 − 1 (11.43)
p
p2 = −ξωn − ωn ξ 2 − 1 (11.44)
Notice that:
if either ξ or ωn are negative the real part of the poles is positive and
(11.42) is unstable too;
if ωn = 0 then G(s) = s2 ,
b
which is unstable;
b
G(s) = , b > 0, p1 , p2 ∈ R (11.45)
(s + p1 )(s + p2 )
if, in particular, ξ = 1 then the two real poles are both equal to −ωn :
b
G(s) = , b, ωn > 0 (11.46)
(s + ωn )2
if 0 ≤ ξ < 1 the system is not unstable and the complex conjugate poles
are given by
p
p1 = −ξωn + jωn 1 − ξ2 (11.47)
p
p2 = −ξωn − jωn 1 − ξ 2 (11.48)
Overdamped system ξ > 1, i.e. the two poles are real and dierent, as in (11.45): in this case
the system is called overdamped;
Critically damped system ξ = 1, i.e. there is a double pole, as in (11.46): in this case the system is
called critically damped;
Underdamped system 0 < ξ < 1, i.e. the two poles are complex conjugate and stable: in this
case the system is called underdamped;
System with no damping ξ = 0, i.e. the two poles are complex conjugate and marginally stable: in
this case the system is said to have no damping;
11.3. TIME AND FREQUENCY RESPONSES OF A SECOND-ORDER SYSTEM WITHOUT ZEROS 169
Figure 11.6: Location of the poles in the complex plane of second order systems.
Notice that the bottom left undamped system is marginally stable, as well as
the bottom centre one with a pole at the origin.
G(s) = b b
= s(s+a
s2 +a1 s 1)
, b > 0, i.e. the transfer function is marginally
stable with one pole in the origin.
Then:
bK 1
y 0 (t) = −p1 p2 e−p1 t + p1 p2 e−p2 t (11.53)
p1 p2 p1 − p2
bK
y 00 (t) = p1 e−p1 t − p2 e−p2 t = 0
p1 − p2
⇒ log p1 − p1 t = log p2 − p2 t
p1 − p2
⇔t= (11.54)
log p1 − log p2
(11.52) shows that y(t) depends on t only in the argument of the two exponen-
tials, where t appears multiplied by ωn . This product ωn t has no dimensions.
This step response can be put as a function of ωn t, as in Figure 11.7, and then
will vary only with ξ as shown.
Frequency response The frequency response in this case can be easily found thanks to the fol-
of overdamped system lowing result:
b
(s+p1 )(s+p2 ) Theorem 11.1. The gain in dB and the phase of the product of two transfer
functions are the sum of their separate gains and phases:
20 log10 |G1 (s)G2 (s)| = 20 log10 |G1 (s)| + 20 log10 |G2 (s)| (11.55)
∠ [G1 (s)G2 (s)] = ∠ [G1 (s)] + ∠ [G2 (s)] (11.56)
So we can just add the frequency responses of two rst-order systems and
obtain the responses in Figure 11.8. Again, it usual to plot the corresponding
asymptotes, shown in Figure 11.9, instead. Notice that:
For low frequencies, the gain is 20 log10 = 20 log10 ωb2 dB, and the
b
p1 p2 n
phase is 0 . Indeed, when ω ≈ 0, the system is similar to a constant:
◦
b b
G(jω) = ≈ 2 (11.57)
−ω 2 + 2ξωn jω + ωn2 ωn
For high frequencies, the gain is linear with a slope of −40 dB per decade,
and the phase is −180◦ . Indeed, when ω p1 , p2 , the system is similar
to a double integrator:
b b
G(jω) = ≈− 2 (11.58)
−ω 2 2
+ 2ξωn jω + ωn ω
When the two poles do not have the same order of magnitude, it is possible
to notice their eect on gain and phase separately. But, if the values of
p1 and p2 are close to each other, their eects on the frequency response
merge.
Step response of critically If both poles of (11.41) are equal, (11.50) shows that p1 = p2 = ωn , and the
b
damped system (s+ω )2
n
system's response to a step of amplitude K is, as can be seen in Table 2.1,
bK
1 − e−ωn t − ωn te−ωn t (11.59)
y(t) = 2
ωn
As expected, should p be negative, (11.59) would diverge to innity. Assuming
that p is positive, then:
the steady-state response is constant and given by yss = 2 ;
bK
ωn
bK
y 0 (t) = ωn e−ωn t − ωn e−ωn t + ωn2 te−ωn t = bKte−ωn t (11.60)
2
ωn
and thus y 0 (0) = 0;
the response is monotonous, since y 0 (t) = bKte−ωn t = 0 admits only one
solution which is t = 0;
there is an inection point, which can be found as follows:
1
⇔t= (11.61)
ωn
11.3. TIME AND FREQUENCY RESPONSES OF A SECOND-ORDER SYSTEM WITHOUT ZEROS 171
Once more, (11.59) shows that y(t), given in Figure 11.7, depends on t only, by
product ωn t.
Frequency response of The frequency response in this case can be found thanks to (11.55)(11.56)
critically damped system and is shown in Figure 11.10. Again, it usual to plot instead the corresponding
b
(s+ωn )2 asymptotes, shown in Figure 11.11. Notice that:
For low and high frequencies, the frequency response is the same as in the
overdamped case.
b b b
G(jωn ) = = 2 = (11.62)
(jωn + ωn )2 ωn (j + 1)2 2jωn2
b
20 log10 |G(jωn )| = 20 log10 2 − 20 log10 2
ωn
b
= 20 log10 2 − 6 dB (11.63)
ωn
∠G(jωn ) = −90◦ (11.64)
Step response of un- If the poles of (11.41) are complex conjugate, the system's response to a step
derdamped system of amplitude K is, as can be seen in Table 2.1,
b
s2 +2ξωn s+ωn
2 p !!
bK 1 −ξωn t
p
2
1 − ξ2
y(t) = 2 1 − p e sin ωn 1 − ξ t + arctan
ωn 1 − ξ2 ξ
(11.65)
See Figure 11.7. As already mentioned, should product −ξω be positive (i.e. if
either ξ or ωn are negative), (11.65) would diverge to innity. Assuming that
the system is stable, i.e. that 0 < ξ < 1, then:
the response has oscillations caused by the sinusoid, and so is not monotonous;
the oscillations take place around the steady-state, which means that the Overshoot
response will exceed that value at some instants: this is called overshoot
(see Figure 11.12);
and thus
sin sin
zp }| { z }| { !
p
2 1 − ξ2
p
bK 1−ξ
y 0 (0) = p ξ sin arctan − 1 − ξ 2 cos arctan
ωn 1 − ξ2 ξ ξ
|{z} |{z}
cos cos
bK p p
= p ξ 1 − ξ2 − 1 − ξ2ξ = 0 (11.68)
ωn 1 − ξ 2
that the response is not monotonous can also be seen equalling (11.67) to
176 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
because the upper exponential curve in (11.66) limiting the response de-
creases with time, the rst overshoot is the largest, and its maximum value
is thus the the maximum overshoot;
Maximum overshoot the value Mp of this maximum overshoot is usually given as a percentage
of the steady-state value:
max y(t) − yss
Mp = ⇔ max y(t) = yss (1 + Mp ) (11.70)
yss
Peak time the time instant at which the maximum overshoot takes place is the peak
time tp , which is consequently given by (11.69) for k = 1:
π
tp = p (11.71)
ωn 1 − ξ 2
Settling time (11.65) could be used to nd settling times for dierent percentages of
the steady-state value, but the sinusoid makes calculations dicult (the
response is not monotonous) and numerical results have abrupt variations
with ξ ; it is easier to obtain approximated (by excess) settling times from
the (monotonous) limiting exponential curves in (11.66), e.g. ȳ(t):
x
ȳ(ts,x% ) = yss 1 +
! 100
bK e−ξωn t x bK
⇔ 2 1+ p = 1+
ωn 1 − ξ2 100 ωn2
x p
⇔ e−ξωn t = 1 − ξ2
100
x
p
− log 100 1 − ξ2 x
− log 100
⇒t= ≤ (11.73)
ξωn ξωn
11.3. TIME AND FREQUENCY RESPONSES OF A SECOND-ORDER SYSTEM WITHOUT ZEROS 177
and thus, replacing x with dierent values, we nd that (compare these
values with those of a rst order system without poles):
The frequency response in this case cannot be found from that of rst order Frequency response of
transfer functions using Theorem 11.1. We can write underdamped system
b
s2 +2ξωn s+ωn
2
b
G(jω) = (11.74)
−ω 2 + 2ξωn jω + ωn2
b
|G(jω)| = p (11.75)
(ωn2 − ω 2 )2 + 4ξ 2 ωn2 ω 2
(11.76)
p
20 log10 |G(jω)| = 20 log10 b − 20 log10 (ωn2 − ω 2 )2 + 4ξ 2 ωn2 ω 2
2ξωn ω
∠G(jω) = − arctan 2 (11.77)
ωn − ω 2
and see that for high and low frequencies the frequency response is the same as
in the overdamped and critically damped cases. But this time the gain (11.75)
may not be monotonous. To nd this, because numerator b is constant and the
square root is monotonous, we only need to calculate the derivative
d 2
(ωn − ω 2 )2 + 4ξ 2 ωn2 ω 2 = 2(ωn2 − ω 2 )(−2ω) + 8ξ 2 ωn2 ω (11.78)
dω
Equalling to zero we nd that the gain has a maximum at a frequency called Resonance frequency
resonance frequency ωr given by
Figure 11.13: Pole location in the complex plane, unit step responses and Bode
ω2
diagrams of three transfer functions given by s2 +2ξωnn s+ω2 , when ωn is constant.
n
as long as the square root is real, i.e. 1 − 2ξ 2 > 0 ⇔ ξ < √12 ≈ 0.707. In this
case, the corresponding maximum value of the gain is found from (11.76):
p
20 log10 |G(jωr )| = 20 log10 b − 20 log10 (ωn2 − ωn2 (1 − 2ξ 2 ))2 + 4ξ 2 ωn4 (1 − 2ξ 2 )
p
= 20 log10 b − 20 log10 ωn4 (1 − 1 + 2ξ 2 )2 + ωn4 (4ξ 2 − 8ξ 4 )
p
= 20 log10 b − 20 log10 ωn2 4ξ 4 + 4ξ 2 − 8ξ 4
∈[0,1]
z p}| {
= 20 log10 b − 20 log10 ωn2 −20 log10 2ξ 1 − ξ 2 (11.80)
| {z }| {z }
gain at low frequencies >0
√ √ q
(Notice that since 0 < ξ < 22 we have 2ξ 1 − ξ 2 < 2 1 − 12 = 1.) This
p
Step response of undamped For ξ = 0, system (11.41) is marginally stable, and step response (11.65)
b
system s2 +ω 2 simplies to
n
bK π
y(t) = 2 1 − sin ωn t + (11.81)
ωn 2
and thus the steady-state response consists in oscillations with frequency ωn
Why ωn is the natural fre- that are not damped; that is why ωn is called natural frequency: it is the
quency frequency of the system's step response (or impulse response; check Table 2.1
Why ξ is the damping co- again) oscillations when the damping coecient is 0. The reason why ξ is the
ecient damping coecient, by the way, is that it is proportional to the coecient of the
damper in (4.9); more generically, it is related to the coecient of the energy
dissipator, as can be seen e.g. in (5.24).
Frequency response of un- The corresponding frequency response is given by (11.74) with ξ = 0:
b
damped system s2 +ω 2
n b
G(jω) = (11.82)
ωn2 − ω2
This is always a real number, and so the phase jumps from 0◦ (when ω < ωn )
to −180p ◦
(when ω > ωn ) as seen in Figure 11.10. At resonance frequency
ωr = ωn 1 − 2ξ 2 = ωn , the peak is
b
lim |G(jωr )| = lim |G(jωn )| = lim p = +∞ (11.83)
ω→ωr ω→ωn ω→ωn (ωn − ω 2 )2
2
11.3. TIME AND FREQUENCY RESPONSES OF A SECOND-ORDER SYSTEM WITHOUT ZEROS 179
Figure 11.14: Pole location in the complex plane, unit step responses and Bode
ω2
diagrams of three transfer functions given by s2 +2ξωnn s+ω2 , when ξ is constant.
n
Of course, in practice systems have some residual damping, and in any case
sinusoidal outputs never have innite amplitudes (reread Example 4.1 and Re-
mark 10.7 if you need).
We can now sum up what happens for the four dierent cases of (11.41) we
have studied (check Figure 11.6 again):
√−ξπ
step responses have no overshoot if ξ ≥ 1, and have a Mp = e 1−ξ2
overshoot if 0 ≤ ξ < 1;
frequency responses have a phase that goes from 0◦ (at low frequencies)
to −180◦ (at high frequencies) as the frequency increases;
frequency responses have a gain that goes from (i.e. 20 log10 ωb2 dB, at
b
ωn2
n
low frequencies) to 0 (i.e. −∞ dB, at high frequencies) as the frequency
increases;
Figures 11.1311.16 illustrate how step and frequency responses of (11.42) with
complex conjugate poles change according to their position on the complex
plane.
To conclude this section, the fth and nal case of a second order transfer b
Step response of s(s+a)
function to be considered is that in which either pole is 0: (11.49) cannot be
applied; (11.41) will integrate the output of the other pole.
180 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Figure 11.15: Pole location in the complex plane, unit step responses and Bode
diagrams of three transfer functions given by (s+pp11)(s+p
p2
2)
, when the real part of
the poles is constant.
Figure 11.16: Pole location in the complex plane, unit step responses and Bode
diagrams of three transfer functions given by (s+pp11)(s+p
p2
2)
, when the imaginary
part of the poles is constant.
11.4. SYSTEMS WITH MORE ZEROS AND POLES: FREQUENCY RESPONSES 181
its gain
found separately. To nd the frequency response of any transfer function, write
it as a product of smaller transfer functions found therein, and sum the corre-
sponding gains and phases, according to Theorem 11.1.
1
G(jω) = (11.84)
jω
20 log10 |G(jω)| = −20 log10 ω dB (11.85)
∠G(jω) = −90 ◦
(11.86)
a
G(jω) = (11.94)
jω − a
20 log10 |G(jω)| ≈ 0 dB, ω a (11.95)
∠G(jω) ≈ −180 , ω a ◦
(11.96)
a 1
20 log10 |G(ja)| = 20 log10 √ = 20 log10 √ = −3 dB (11.97)
2
a +a 2 2
a
◦
∠G(ja) = 0 − arctan = −135 ◦
(11.98)
−a
20 log10 |G(jω)| ≈ 20 log10 a − 20 log10 ω dB, ω a (11.99)
◦
∠G(jω) ≈ −90 , ω a (11.100)
tion 11.3:
ωn2
G(jω) = (11.101)
ωn2 − ω 2 + j2ξωn ω
20 log10 |G(jω)| ≈ 0 dB, ω ωn (11.102)
◦
∠G(jω) ≈ 0 , ω ωn (11.103)
p p
20 log10 |G(jωn 1 − 2ξ 2 )| = −20 log10 2ξ 1 − ξ 2 dB > 0 dB (11.104)
20 log10 |G(jωn )| = −20 log10 2ξ dB (11.105)
1
∠G(jωn ) = ∠ = −90◦ (11.106)
j2ξ
20 log10 |G(jω)| ≈ 20 log10 ωn2 − 40 log10 ω dB, ω ωn
(11.107)
∠G(jω) ≈ −180◦ , ω ωn (11.108)
G(jω) = k (11.109)
20 log10 |G(jω)| = 20 log10 k dB (11.110)
∠G(jω) = 0◦ (11.111)
G(jω) = −k (11.112)
20 log10 |G(jω)| = 20 log10 |k| dB (11.113)
∠G(jω) = −180 ◦
(11.114)
G(jω) = jω (11.115)
20 log10 |G(jω)| = 20 log10 ω dB (11.116)
∠G(jω) = 90 ◦
(11.117)
jω + b
G(jω) = (11.118)
b
20 log10 |G(jω)| ≈ 0 dB, ω b (11.119)
∠G(jω) ≈ 0◦ , ω b (11.120)
√
b2 + b2 √
20 log10 |G(jb)| = 20 log10 = 20 log10 2 = 3 dB (11.121)
b
b
∠G(jb) = arctan = 45◦ (11.122)
b
20 log10 |G(jω)| ≈ 20 log10 ω − 20 log10 b dB, ω b (11.123)
◦
∠G(jω) ≈ 90 , ω b (11.124)
jω − b
G(jω) = (11.125)
b
20 log10 |G(jω)| ≈ 0 dB, ω b (11.126)
∠G(jω) ≈ 180 , ω b ◦
(11.127)
√
b2 + b2 √
20 log10 |G(jb)| = 20 log10 = 20 log10 2 = 3 dB (11.128)
b
b
∠G(jb) = arctan = 135◦ (11.129)
−b
20 log10 |G(jω)| ≈ 20 log10 ω − 20 log10 b dB, ω b (11.130)
∠G(jω) ≈ 90◦ , ω b (11.131)
11.4. SYSTEMS WITH MORE ZEROS AND POLES: FREQUENCY RESPONSES 183
2
ωn
A pair of complex conjugate poles in the right complex half-plane 2 ,
s2 −2ξωn s+ωn ωn >
0, 0 ≤ ξ < 1:
ωn2
G(jω) = (11.132)
ωn2 − ω 2 − j2ξωn ω
20 log10 |G(jω)| ≈ 0 dB, ω ωn (11.133)
◦
∠G(jω) ≈ 0 ≡ −360 , ω ωn ◦
(11.134)
p p
20 log10 |G(jωn 1 − 2ξ )| = −20 log10 2ξ 1 − ξ dB > 0 dB (11.135)
2 2
s2 −2ξωn s+ωn
2
A pair of complex conjugate zeros in the right complex half-plane 2
ωn , ωn >
0, ξ ≥ 0:
ωn2 − ω 2 − j2ξωn ω
G(jω) = (11.148)
ωn2
20 log10 |G(jω)| ≈ 0 dB, ω ωn (11.149)
◦
∠G(jω) ≈ 0 , ω ωn (11.150)
p p
20 log10 |G(jωn 1 − 2ξ 2 )| = 20 log10 2ξ 1 − ξ 2 dB < 0 dB (11.151)
20 log10 |G(jωn )| = 20 log10 2ξ dB (11.152)
∠G(jωn ) = ∠ − j2ξ = −90 ◦
(11.153)
20 log10 |G(jω)| ≈ 40 log10 ω − 20 log10 ωn2 dB, ω ωn
(11.154)
∠G(jω) ≈ −180◦ , ω ωn (11.155)
First plot the asymptotes of the Bode diagrams of the four transfer function
G1 (s) to G4 (s), in Figure 11.20. Add them to obtain the asymptotes of the Bode
diagram of G(s) in the same Figure, which also shows the actual Bode diagram.
The asymptotes are seen to be a rather√fair approximation, especially when the
resonance peak given by −20 log10 (0.5 1 − 0.252 ) = 6.3 dB is added.
184 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Remark 11.4. Since the phase is determined up to shifts of 360◦ , there are
dierent ways of choosing which particular values are used. In all of them the
phase is, of course, continuous with frequency ω whenever possible.
Choose the low frequency phase value to be closest to zero. In this way
a low frequency value of, say, −90◦ is preferred to 270◦ , no matter what.
This criterion presents no reason to choose among 180◦ and −180◦ , when
input and output are in phase opposition at low frequencies.
Choose the low frequency phase value that better shows the number of
3
zeros and poles at the origin. In this way, transfer function sD(s)
N (s)
, where
polynomials N (s) and D(s) have no roots at the origin, will have a low
frequency phase beginning at 270◦ and not at −90◦ , since a zero pushes the
phase up and so this phase shows that the three zeros are responsible for
N (s)
the low frequency behaviour. The phase of transfer function sD(s) would
begin at −90 for a similar reason. This criterion may or may not give
◦
the same result as the one above. It allows choosing among low frequency
phases of 180◦ and −180◦ if there are two poles or two zeros at the origin,
but not if there is a negative gain.
Choose the closest values to zero in the entire frequency range of concern,
as long as the phase is continuous with ω .
Example 11.2. Find the Bode diagram of
−s + 5 1 1 10 s−5
G(s) = = − × 2 × × (11.157)
s2 (s
+ 10) 2
|{z} s
|{z} s + 10 5
| {z } | {z }
G1 (s) G2 (s) G3 (s) G4 (s)
First plot the asymptotes of the Bode diagrams of the four transfer function
G1 (s) to G4 (s), in Figure 11.21. Add them to obtain the asymptotes of the
Bode diagram of G(s) in the same Figure, which also shows the actual Bode
diagram.
Remark 11.5. Given the way Bode diagrams can be built from smaller transfer
functions, this can be used to identify a model for a plant from its frequency
response. The Bode diagram is split into the sum of several Bode diagrams
corresponding to frequency responses in Figures 11.1711.19; the model will be
the product of the respective transfer functions.
11.4. SYSTEMS WITH MORE ZEROS AND POLES: FREQUENCY RESPONSES 185
Figure 11.20: Building the Bode diagram of (11.156) from Example 11.1.
188 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Figure 11.21: Building the Bode diagram of (11.157) from Example 11.2.
11.4. SYSTEMS WITH MORE ZEROS AND POLES: FREQUENCY RESPONSES 189
Example 11.3. Given either Bode diagram of Examples 11.1 or 11.2, rst
draw its asymptotes, as shown in Figures 11.20 or 11.21; then divide them into
the separate asymptotes, also shown in the Figures, corresponding to transfer
functions from Figures 11.1711.19. The product of these transfer functions is
the desired transfer function, either (11.156) or (11.157).
Denition 11.2. A zero on the left complex half-plane (i.e. a zero with a Minimum and non-
negative real part) is a minimum phase zero. A zero on the right complex minimum phase zeros
half-plane (i.e. a zero with a positive real part) is a non-minimum phase
zero.
Remark 11.6. The reason for these names can be seen in Figure 11.18: the
a , a > 0 is between 0 and 90 , while the phase of a , a > 0 is
phase of s+a ◦ ◦ s−a
between 180 and 90 . The latter is thus, for low frequencies and in average,
◦ ◦
A system's frequency response at high frequencies depends on the dierence Gain slope at high frequen-
between the number of poles n and the number of zeros m. More precisely, it cies
is clear from Figures 11.1711.19 that, at high frequencies, each pole will con-
tribute to the gain with a slope of −20 dB/decade, and each zero will contribute
to the gain with a slope of 20 dB/decade. Consequently, the slope of the gain in
a Bode diagram will be 20(m−n) dB per decade. So, as the frequency increases:
the gain of transfer functions with the same number of poles and zeros
goes to a constant value (in both dB and absolute value);
the gain of transfer functions which are not proper goes to +∞ dB, i.e. to
+∞ in absolute value.
In the latter case, if the transfer function is stable, this means that inputs with Why transfer functions
oscillations of smaller and smaller periods correspond to steady-state output should be strictly proper
oscillations with larger and larger amplitudes (and with the same small period
of the input). The velocity with which the output would be changing would
become innite. This is clearly impossible in practice, as it would require an
arbitrarily large energy. (For instance, in the case of an output which is a
position, there would a frequency above which this position would be changing
faster than light speed.) The same happens even in the case of a constant
gain for high frequencies, since the amplitude may not be increasing, but the
period decreases. The only models which are physically possible are those with
more poles than zeros, i.e. strictly proper models. That is why most models are
strictly proper. Of course, all models are only valid for a range of parameters.
So we can use models with as many zeros as poles, or more zeros than poles,
being aware that for frequencies high enough they cannot be valid: there have
to be unmodelled poles changing the behaviour of the plant so that it does not
require an impossibly innite energy.
On the other hand, the slope of the gain at (very) low frequencies depends on Gain slope at low frequen-
the number of zeros or poles at the origin: it is clear from Figures 11.1711.19 cies
only they cause a slope at such frequencies:
n poles at the origin cause a low frequency gain slope of −20n dB/decade;
m zeros at the origin cause a low frequency gain slope of 20m dB/decade.
Example 11.4. Consider the Bode diagram of Example 11.1 in Figure 11.20.
At low frequencies, the gain has a −20 dB/decade slope. Consequently, there
has to be a pole at the origin. At high frequencies, the gain has a −40 dB/decade
slope. Consequently, the number of poles exceeds the number of zeros by 2 (we
could have 0 zeros and 2 poles, or 1 zero and 3 poles, or 2 zeros and 4 poles,
etc.).
Example 11.5. Consider the Bode diagram of Example 11.2 in Figure 11.21.
At low frequencies, the gain has a −40 dB/decade slope. Consequently, there
have to be 2 poles at the origin. At high frequencies, the gain has a −40 dB/decade
slope. Consequently, the number of poles exceeds the number of zeros by 2.
190 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Remark 11.7. Notice that the gain of a stable system at low frequencies is Stable system's gain a
constant and equal to its static gain: frequencies
b0 + b1 s + b2 s2 + b3 s3 + . . . b0
lim G(jω) = lim = (11.158)
ω→0 a0 + a1 s + a2 s2 + a3 s3 + . . . a0
ω→0
| {z }
G(s)
s=jω
Type of a transfer function Denition 11.3. The type of a transfer function is its number of poles at the
origin.
Example 11.6. Here are transfer functions of type 0, type 1, type 2 and type
3:
1
G0 (s) = (11.159)
s+1
1
G1 (s) = (11.160)
s(s + 1)
1
G2 (s) = 2 (11.161)
s (s + 1)
1
G3 (s) = 3 (11.162)
s (s + 1)
For each of if its n roots, we want to know if it has positive real parts, negative
real parts, or lies on the imaginary axis.
If a0 = 0, there is a root at the origin. Divide the polynomial by s and
start again.
If not all the ak have the same sign, there is at least one root with positive
real part. If all the ak are negative, we can multiply p(s) by −1, which
does not change its roots, and all coecients become positive; so we can
say instead that all the ak must be positive if all the roots are to have
negative real parts. This is a necessary condition, but it is not sucient (it
may happen that all the ak are positive and still some roots have positive
real parts).
Routh-Hurwitz table The number of roots with positive real parts is equal to the number of
sign changes of the rst column of the Routh-Hurwitz table, which has n
lines, n2 columns, and is built as follows:
Here,
an−1 an−2 − an−3 an an−3 an
b1 = = an−2 − (11.165)
an−1 an−1
an−1 an−4 − an−5 an an−5 an
b2 = = an−4 − (11.166)
an−1 an−1
..
. (11.167)
b1 an−3 − b2 an−1 b2 an−1
c1 = = an−3 − (11.168)
b1 b1
b1 an−5 − b3 an−1 b3 an−1
c2 = = an−5 − (11.169)
b1 b1
..
. (11.170)
This pattern goes on in each line until all further elements are necessarily
zero, and goes down until all n lines are lled in.
and verify that all elements in the rst column are positive. So the transfer
function is stable (whatever the numerator may be, since, remember, zeros have
nothing to do with stability).
If there is a zero in the left column, replace it with a vanishing ε. If when Zero in the left column
ε −→ 0+ all the coecients below are positive, there is a pair of complex
conjugate pure imaginary poles (which are marginally stable), and the other
poles are stable. If some are negative, the transfer function is unstable.
and verify that when ε −→ 0+ the rst column is entirely positive. So there are
no unstable poles. The zero is caused by a pair of complex conjugate poles on
the imaginary axis: s3 + s2 + 4s + 4 = (s + 1)(s + 2j)(s − 2j).
s6 1 9 0 −10
s5 4 13 −17
13
s4 9− 4 = 23
4
17
4 −10
17
s3 13 − 23 = 231 −17 + 40
23 = − 231
231 17
+
4
231 23
23 4
23
(11.173)
s2 23 4
231
23 4
= 10 -10
23
ε
(
10 − 231 )
23 +10 23
231
s 10 = 0
1 −10
and verify that when ε −→ 0+ there is one sign change in the rst column, from
line s to line 1. So there are ve stable poles, and one unstable pole (in fact
s6 + 4s5 + 9s4 + 13s3 − 17s − 10 = (s − 1)(s + 1)2 (s + 2)(s2 + s + 5)).
192 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
and verify that when ε −→ 0+ the element below in the rst column is negative.
So there are two sign changes, and two unstable poles (in fact s3 − 12s + 16 =
(s − 2)2 (s + 4)).
Remark 11.8. Notice that coecient a0 always turns up in the last line of the
table. If it does not, you got your calculations wrong.
Line of zeros If there is a whole line of zeros, build a polynomial with the coecients of the
line above, dierentiate it, and use the coecients of the derivative to replace
the zeros.
Example 11.11. Consider a transfer function given by N (s)
s6 −4s4 +4s2 −16 . We
begin the Routh-Hurwitz table
s6 1 −4 4 −16
(11.175)
s5 0 0 0
and verify that the second line only has zeros. So we look at the line above,
which is line s6 , and use the coecients of that line with powers s6 , s4 , s2 and
s to obtain ds s − 4s + 4s − 16 = 6s5 − 16s3 + 8s.
d
0 6 4 2
s6 1 −4 4 −16
s5 6 −16 8
s4 − 34 8
3 −16
s3 −4 −64 (11.176)
s2 24 −16
s − 200
3
1 −16
There are three sign changes, and so three unstable poles (in fact s6 − 4s4 +
4s2 − 16 = (s − 1 + j)(s − 1 − j)(s + 1 + j)(s − 1 − j)(s + 2)(s − 2)).
The Routh-Hurwitz criterion is important not only because it allows nding
out by hand whether or not a system is stable, but above all because it lets us
nd analytical conditions for the stability of a closed-loop that depends on a
parameter.
Example 11.12. Plant
y(s) 1
= (11.177)
u(s) (s − 1)(s + 2)
is controlled in closed loop with a proportional controller K , as seen in Fig-
ure 11.22. We rst assume that the sensor is perfect, i.e. H(s) = 1. To know
what values of K ensure that the closed loop is stable, we nd the closed loop
transfer function
K
y(s) 2 K
= s +s−2K
= 2 (11.178)
r(s) 1 + s2 +s−2 s +s+K −2
11.5. SYSTEMS WITH MORE ZEROS AND POLES: STABILITY 193
s2 1 K −2
s 1 (11.179)
1 K −2
from which we see that all coecients are positive in the left column if
Example 11.13. If in the last example we make K = 10 and then nd out that
the sensor has dynamics given by H(s) = s+a a
, we want to know what values
of pole a still let the closed loop be stable. So the closed loop transfer function
becomes
10
y(s) s2 +s−2 10
= 10a = (11.181)
r(s) 1+ (s2 +s−2)(s+a)
s3 + (a + 1)s2 + (a − 2)s + 8a
−0.22 −1 9.22
a2 − 9a + 2 + 0 − − 0 +
a+1 − − 0 + +
− 0 + ∞ − 0 +
(11.184)
and conclude that only these values of K make the closed loop stable. But if
we make K = −1 in (11.186) we get
which has poles in −58.4330 and −2.5670 and is thus stable. Why is this so?
Because the number of unstable poles is the number of sign changes in the rst
column of the Routh-Hurwitz table; if they are all negative, there are no sign
changes, and no unstable poles. Since G(s) is not strictly proper, the entire
rst column depends on K , while in all previous examples there was always a
positive number in that column, meaning that all others had to be positive too
for all poles to be stable. In this case, we can let the entire column be negative,
i.e.
2
1 + 1.5K < 0
K < − 3 = −0.6667
22.5K − 8 < 0 ⇔ K < 22.5 8
= 0.3556 ⇒ K < −0.6667 (11.190)
9
66K − 9 < 0 K < 66 = 0.1364
together with a reasoning similar to that of Remark 2.6, that each pole of a
transfer function will originate an exponential in its time response:
Eects of the real part of a if the pole is stable, its (negative) real part corresponds to how fast this
pole part of the time response is vanishing;
The imaginary parts of if there is an imaginary part, it will correspond (together with that of the
poles cause oscillations pole's complex conjugate) to oscillations in time (which, the pole being
stable, are vanishing).
Consequently,
Faster poles the more negative the real part of a stable pole is, the faster its eect in
the time responses vanishes;
Slower poles the closer a stable pole is to the imaginary axis, the slower its eect in the
time responses vanishes.
Meaning of the residues When a transfer function is written as a partial fraction expansion, the
residues show the weight that each pole will have in the time responses. Slower
poles, even when weighted with a residue which is relatively small when com-
pared with the others, have a lasting eect in time responses just for being slow,
i.e. for the slowly vanishing eect of their contribution, and are thus called dom-
Dominant poles inant poles.
When a transfer function has only one dominant pole, or one pair of complex
conjugate dominant poles, clearly far from the other ones, its time response will
be mostly determined by that pole or poles. This is not so when there are
several dominant poles, or, rather, when there are none, since no pole has an
eect clearly dominating that of the others.
11.6. SYSTEMS WITH MORE ZEROS AND POLES: TIME RESPONSES 195
Figure 11.23: Unit step responses of the transfer functions of Example 11.15.
Figure 11.24: Poles and zeros of the transfer functions of Example 11.15.
196 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Figure 11.26: Unit step responses of the transfer functions of Example 11.16.
Figure 11.27: Unit step and unit ramp responses of the transfer functions of
Example 11.17.
Proof. Let us consider the case of a transfer function with a non-minimum phase
zero and a positive steady-state value; other cases are similar:
−s + b
G(s) = n (11.201)
Y
(s + pk )
k=1
The beginning of the transient response corresponds to very small time values,
i.e. to very high frequencies. At high frequencies,
−jω + b −jω
G(jω) = n ≈ (11.202)
Y (jω)n
(jω + pk )
k=1
Proof. The line of reasoning is similar to that of the theorem above, and because
the system is linear we can consider the unit step response of a transfer function
with an arbitrary gain:
m
Y
(jω + zk )
−1 1 k=1
y(t) = L (11.204)
n
s Y
(jω + pk )
k=1
Again we are interested in the beginning of the transient response, which cor-
responds to very small time values, i.e. to very high frequencies, at which
1 (jω)m 2
Y (jω) ≈ = (11.205)
jω (jω)n (jω)n−m+1
Figure 11.28: Step responses of three dierent transfer functions, for which the
dierence between the number of poles and zeros is 0, 1 and 2.
Example 11.18. Consider these transfer functions, with the following dier-
ences between the number of poles and zeros:
s+1
G0 (s) = , n−m=0 (11.207)
s+2
1
G1 (s) = , n−m=1 (11.208)
s+1
s+1
G2 (s) = , n−m=2 (11.209)
(s + 0.5)(s + 1.5)(s + 2)
According to Theorem 11.3 and its proof, at t = 0 their outputs will be similar
to
−1 1
y0 (s) = L = H(t) (11.210)
s
1
y1 (s) = L −1 2 = t (11.211)
s
t2
1
y2 (s) = L −1 3 = (11.212)
s 2
Glossary
`To you I may seem a vulgar robber, but I bear on my shoulders
the destiny of the human race. Your tribal life with its stone-age
weapons and beehive huts, its primitive coracles and elementary
social structure, has nothing to compare with our civilization
with our science, medicine and law, our armies, our architecture, our
commerce, and our transport system which is rapidly annihilating
space and time. Our right to supersede you is the right of the higher
over the lower. Life '
`Half a moment,' said Ransom in English. `That's about as much
as I can manage at one go.' Then, turning to Oyarsa, he began
translating as well as he could. The process was dicult and the
11.6. SYSTEMS WITH MORE ZEROS AND POLES: TIME RESPONSES 201
Exercises
1. Sketch the following step responses, marking, whenever they exist,
the settling time according to the 5% criterion,
the settling time according to the 2% criterion,
the steady-state value.
15
(a) G(s) = , for input u(t) = 4H(t)
s+5
10
(b) G(s) = , for input u(t) = H(t)
s−1
1
(c) G(s) = , for input u(t) = −H(t)
2s + 1
−2
(d) G(s) = , for input u(t) = 10H(t)
4s + 1
10
(e) G(s) = , for input u(t) = H(t)
s
202 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Hint: draw the asymptotes of the Bode diagram. Mark the frequency at
which the gain has decreased 3 dB.
15
(a) G(s) =
s+5
1
(b) G(s) =
s + 10
1
(c) G(s) =
2s + 1
2
(d) G(s) =
4s + 1
10
(e) G(s) =
s
1
3. Let G(s) = .
s+1
(a) Consider the unit step response of G(s). What is the settling time,
according to the 5% criterion?
(b) Find analytically the unit ramp response y(t) of G(s).
(c) Find the analytical expression of the steady-state yss (t) of that re-
sponse y(t).
(d) How long does it take for yss (t)−y(t) to be less than 5%? In other
y(t)
words, nd how long it takes for the unit ramp response to be within
a 5% wide band around its steady state.
5. For each of the transfer functions below, and for the corresponding step
input, nd, if they exist:
the 5% and the 2% settling times (use the expressions for the expo-
nential envelope of the oscillations),
the location of the poles,
the time instant at which the response rst reaches 2 ,
yss
(a) Find the values of mass M , viscous damping coecient B , and spring
stiness K .
(b) Suppose we want the same steady-state regime and the same settling
time, but a maximum overshoot of 0.15%. What should the new
values of M , B and K be?
s2
(d) G(s) =
(s + 0.5)(s + 10)
10s
(e) G(s) =
(s + 10)(s2 + s + 2)
(s + 4)(s + 20)
(f) G(s) =
(s + 1)(s + 80)
10. Establish a correspondence between the three Bode diagrams and the three
unit step responses in Figure 11.30.
11. Establish a correspondence between the three Bode diagrams and the three
unit step responses in Figure 11.31.
12. Find the transfer functions corresponding to the Bode diagrams in Fig-
ure 11.32.
13. Use the Routh-Hurwitz criterion to nd how many unstable poles each of
the following transfer functions has, and classify each system as stable,
marginally stable, or unstable.
5
s2 + s − 10
(a) 7
s4 − 2s3 − 13s2 + 14s + 24
(b) s+2
s4 − 2s3 − 13s2 + 14s + 24
(c) s+2 Hint: can you put anything in evi-
s6 − 2s5 − 13s4 + 14s3 + 24s2
dence in the denominator?
(d) s3 + 2s2 + s
s + 4s3 + 4s + 5
4
(e) s3 + 2s2 + s
s5 + 4s4 + 4s2 + 5s
(f) s3 + 2s2 + s
2s3 − 6s + 4
14. Find the ranges of values of K1 , K2 ∈ R for which the systems having
transfer functions with the following denominators are stable.
(a) s3 + 3s2 + 10s + K1
(b) s3 + K2 s2 + 10s + 5
(c) s3 + 2s2 + (K1 + 1)s + K2
15. How many unstable, marginally stable, and stable poles do the following
transfer functions have?
s−2
(a) G1 (s) =
s4 + 2s3 + 5s2 + 8s + 4
11.6. SYSTEMS WITH MORE ZEROS AND POLES: TIME RESPONSES 205
Figure 11.30: Bode diagrams and unit step responses of Exercise 10.
206 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Figure 11.31: Bode diagrams and unit step responses of Exercise 11.
Bode Diagram
200
Magnitude (dB)
100
−100
−200
−300
−90
Phase (deg)
−135
−180
−225
−270
−4 −2 0 2 4 6
10 10 10 10 10 10
Frequency (rad/s)
Bode Diagram
100
Magnitude (dB)
−100
−200
−90
Phase (deg)
−120
−150
−180
−2 −1 0 1 2 3 4
10 10 10 10 10 10 10
Frequency (rad/s)
Figure 11.33: The Sopwith Camel, a ghter aircraft from World War I.
18. The roll angle φ (rotation around the x-axis) of the aircraft in Figure 11.33
is given by
ṗ = −2p + 12δA (11.215)
where p = φ̇ and δA is the aileron deection. All variables are given in SI
units.
p(s)
(a) Find transfer function Gp (s) = .
δA (s)
φ(s)
(b) Find transfer function Gφ (s) = .
δA (s)
(c) Sketch p(t) when the ailerons undergo a 1◦ = π
180 rad step.
(d) What is p(t) when t = 0.5 s?
(e) Sketch φ(t) for the same input.
(f) Suppose you want φ = 30◦ after 20 s. Without calculating φ(t), nd
an approximate value for the necessary aileron deection.
120 (s + 1)
19. Plot the Bode diagram of transfer function G(s) = 2 .
s (s + 2) (s + 3)
208 CHAPTER 11. FINDING TIME AND FREQUENCY RESPONSES
Part III
209
211
Then Dick gave a cry. It's just come into sight. Look, when we
passed those tall trees on the bank yonder, Tall Stone came into
view. It was behind them before that.
Good, said Julian. Now I'm going to stop paddling and keep Tall
Stone in sight. If it goes out of sight I'll tell you and you must back-
paddle. Dick, can you possibly paddle and look out for something
that could be Tock Hill on the opposite side? I daren't take my eyes
o Tall Stone in case it disappears.
Right, said Dick, and paddled while he looked earnestly for Tock
Hill.
Got it! he said suddenly. It must be it! Look, over there a
funny little hill with a pointed top. Julian, can you still see Tall
Stone?
Yes, said Julian. Keep your eyes on Tock Hill. Now it's up to the
girls. George, paddle away and see if you can spot Steeple.
I can see it now, already! said George, and for one moment the
boys took their eyes o Tall Stone and Tock Hill and looked where
George pointed. They saw the steeple of a faraway church glinting
in the morning sun.
Good, good, good, said Julian. Now Anne look for Chimney
look down towards the end of the lake where the house is. Can
you see its one chimney?
Not quite, said Anne. Paddle just a bit to the left the left, I
said, George! Yes yes, I can see the one chimney. Stop paddling
everyone. We're here!
They stopped paddling but the raft drifted on, and Anne lost the
chimney again! They had to paddle back a bit until it came into
sight. By that time George had lost her steeple!
At last all four things were in view at once, and the raft seemed to
be still and unmoving on the quiet waters of the lake.
Chapter 12 introduces the basic concepts of measuring chains and control loops.
Chapter 13 presents the technology of the most common types of sensors, and the
criteria to choose them.
Chapter 14 presents the technology of the most common types of actuators, and the
criteria to choose them.
Example 12.1. The analogical ammeter in Figure 12.2 transduces current into
an angle. The angle can be read directly by sight on a scale. This sensor does
not record the reading.
213
214 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
Figure 12.1: Closed loop control. Top: simplest representation (see Figure 9.13).
Bottom: sensor and actuator explicitly shown.
Figure 12.2: Ammeter from the Tagus power plant (currently the Museum of
Electricity), Lisbon. Notice that the scale is not linear.
Figure 12.3: Seismograph from the Santa Marta lighthouse (currently a mu-
seum), Cascais.
12.2. FILTERS 215
Figure 12.4: Closed loop control with sensor, actuator and AD/DA conversion
explicitly shown.
Figure 12.5: Open loop control with actuation chain explicitly shown.
converter, between the controller and the actuator, as seen in Figure 12.4. The
function of the AD converter is to receive a digital signal as input and provide
an analogical output (remember the example in Figure 3.13). Likewise, if after
all the sensor provides a measurement ŷ which is not digital, an analogical to
digital converter , or DA converter in short, is needed after the sensor. Even if the AD converter
sensor itself already provides a digital output, it is because it incorporates the
function of the DA converter. The function of the AD converter is to discretise
(in time) and quantise (in amplitude) its input.
The AD and the DA conversions may be carried out by the same device, AD/DA converter
which will have:
Figure 12.4 shows yet another element after the sensor: a lter, that is, a Filter
system designed to eliminate noise from the measurement. This noise can be
present in the output of the plant, or be a result of the sensor itself. The lter
can be applied to the analog measurement before AD conversion, or be applied
to the digital signal after AD conversion (this last option is the only one possible
if the sensor provides a digital reading).
Figure 12.4 also indicates what, in a digital control system, constitutes
12.2 Filters
We have just mentioned lters in connection with the measuring chain, as a
means of eliminating noise from sensor measurements. In general, a lter is a
system that eliminates some frequency components of a signal. These compo-
nents are said to be cut. Those that are not eliminated are said to pass the
lter. Figure 12.6 shows the ideal behaviour of four types of lters: Types of lters
216 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
band-pass lters eliminate both small and large periods and pass interme-
diate periods;
band-stop lters eliminate intermediate periods and pass both small and
large periods.
What low and high frequencies (or large and small periods) are depends on the
Cut-o frequency application. The cut-o frequency ωc is the limit separating the pass-band (the
interval of frequencies that pass the lter) from the stop-band (the interval of
frequencies that the lter eliminates).
Perfect lters do not exist No lter can be as good as what Figure 12.6 shows. Figure 12.7 pictures a
more realistic behaviour. Notice in particular:
that both the pass-band and the stop-band are dened within some tol-
erance (in Figure 12.7, δp is the tolerance of the pass-band and δs is the
tolerance of the stop-band), which can be larger or narrower depending
on what is needed for each particular application;
that, because the gain of a lter within the stop-band will never reach
0 (i.e. −∞ dB), no frequencies of the ltered signal are ever eliminated:
only attenuated;
that, because the gain within the pass-band will not always be 1 (i.e.
0 dB), neither will the phase of the lter in the interval be always 0◦ : and
so, in practice, all lters always introduce some distortion in the signal
that passes;
12.2. FILTERS 217
Figure 12.7: Behaviour of lters, closer to reality than the ideal behaviour in
Figure 12.6. Notice that the band-stop lter shown has a larger value of δs , and
larger ripples in the stop-band, than the other lters.
that there is between the pass-band and the stop-band a transition band,
i.e. a range of frequencies where the signal no longer passes (since the
gain is below tolerance δp of the pass-band) and where it is not su-
ciently attenuated (since the gain is above tolerance δs of the stop-band),
lying between the cut-o frequency ωc which delimits the pass-band and
frequency ωs which delimits the stop-band.
Example 12.4. If the 14% attenuation is not enough, a second order lter can
be used instead. Let us put two poles at 44.4 rad/s:
44.42
F2 (s) = (12.2)
(s + 44.4)2
Figure 12.9 shows the Bode diagram of F2 (s), and the gain and the phase at
the frequencies of both signal and noise:
218 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
−0.172
|F2 (j 6.28)| = 10 = 0.98, which means that 98% of the signal passes:
20
it undergoes a 2% attenuation;
∠F2 (j 6.28) = −16◦ , which means that distortion due to a delay in the
phase is now larger;
−34.2
|F2 (j 314)| = 10 = 0.02, which means that 2% of the noise passes: it
20
∠F2 (j 314) = −164◦ , which means that noise is now even more signi-
cantly distorted.
Notice how we got a better attenuation of the noise, paying the price of distorting
more the signal.
it does not make sense to have an overdamped system, ξ > 1, with two real
poles which do not coincide: the transition band would be larger without
any advantage (see Figures 11.8 and 11.9 again);
√
it does not make sense to have an underdamped system with ξ < 2 :
there
2
H1 (x) = x + 1 (12.5)
2
H2 (x) = x + 1.4142x + 1 (12.6)
H3 (x) = (x + 1)(x + x + 1) 2
(12.7)
3 2
= x + 2x + 2x + 1 (12.8)
2 2
H4 (x) = (x + 0.7654x + 1)(x + 1.8478x + 1) (12.9)
4 3 2
= x + 2.6131x + 3.4142x + 2.6131x + 1 (12.10)
2 2
H5 (x) = (x + 1)(x + 0.6180x + 1)(x + 1.6180x + 1) (12.11)
5 4 3
= x + 3.2361x + 5.2361x + 5.2361x + 3.2361 + 1 2
(12.12)
..
.
n
X
Hn (x) = ak,n xk (12.13)
k=0
a0,n = 1 (12.14)
k
Y cos (m−1)π
ak,n = 2n
mπ , k = 1, . . . , n (12.15)
m=1
sin 2n
Example 12.5. Figure 12.10 shows the Bode diagram of the rst 10 Butter-
worth lters with ωc = 44.4 rad/s, as in Examples 12.3 and 12.4. Notice how
steeper gain slopes, and consequently larger attenuations at high frequencies,
are got at the cost of earlier distortions in the phase. A constant gain and a
220 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
negative phase mean that the signal will be delayed; as we will see in Chap-
ter 24, delays are a serious nuisance in control systems, and easily make them
unstable.
The transfer functions of the rst two lters are
1
F1 (s) = s (12.16)
44.4+1
1 1971
F2 (s) = √ = 2 (12.17)
s 2 2 s s + 62.79s + 1971
+2 +1
44.4 2
|{z} 44.4
ξ
Chebyshev and elliptic l- Designing a lter by minimising the width of the transition band leads to
ters minimise the transi- Chebyshev and elliptic lters. We will not study them, just mention their ex-
tion band istence. Butterworth, Chebyshev and elliptic lters of any order can be easily
used in Simulink with block Analog Filter Design (from the DSP System
toolbox). All you have to do is to specify what type of lter you want (low-
pass, high-pass, band-pass, or band-stop), what design method you want (el-
liptic, Butterworth, Chebyshev. . . ), the order of the lter, and the passband.
Figure 12.11 compares lters of fth order of these types.
12.3 Bandwidth
Bandwidth of a lter Strictly speaking, the bandwidth ωb of a lter is the width of its pass-band.
Consequently:
In the case of a low-pass lter, the lower limit of the pass-band is 0 rad/s,
thus ωb = ωc − 0 = ωc .
In the case of a high-pass lter, the upper limit of the pass-band is innite,
so strictly speaking ωb = ∞ − ωc = ∞. But, since for a low-pass lter
ωb = ωc , for high-pass lters ωc is frequently given as the bandwidth as
well.
In the case of a band-stop lter, there are two pass-bands: the lower fre-
quency pass-band has bandwidth ωb = ωcl − 0 = ωcl ; the upper frequency
pass-band has ωb = ∞ − ωch = ∞, and, as for a high-pass lter, ωch is
often given instead.
12.3. BANDWIDTH 221
Figure 12.11: Absolute value of the gain of dierent fth order lters, as a
function of normalised frequency (source: Wikimedia).
In the case of a band-pass lter, ωb = ωch − ωcl (see Figure 12.7). But
the two limits of the pass-band ωcl and ωch are often given instead, as for
band-stop lters.
So in practice bandwidth ωb is frequently identied with the cut-o frequency
ωc (or frequencies, if there are more than one). Consequently, ωb will be the
frequency (or frequencies) where the gain crosses tolerance δp of the pass-band
(see Figure 12.7 again). The value of δp should be dened according to the
specications of the particular situation where the lter is employed. Very often,
the −3 dB criterion is used, i.e. the bandwidth ωb of a lter F (s) is dened as −3 dB criterion for the
the frequency where its gain |F (jω)| crosses −3 dB, or, in absolute value, bandwidth
−3
20 log10 |F (jωb )| = −3 dB ⇔ |F (jωb )| = 10 20 = 0.708 (12.18)
So, with this criterion, 70% of the signal passes, i.e. there is an attenuation of
30%. (Of course, if this is not acceptable, either because 30% of attenuation
is too much or because larger attenuations of the signal can be tolerated, a
dierent criterion should be used.) The advantage of this criterion is that
a rst-order lter F (s) = a
s+a has a −3 dB gain at the frequency of the
pole, as we see by (11.90), and so ωb = a;
√
a second-order lter with ξ = 2
2
and natural frequency ωn = a, given by
a2
F (s) = √ (12.19)
2
s2 + 2 2 as + a2
√
has a −20 log10 2 22 = −3 dB gain at frequency ωn = a, as we saw in
(11.105), and so ωb = a;
and indeed all Butterworth lters of any order, not only those of rst-order
and second-order just mentioned, will have ωb = a.
When a bandwidth is mentioned, and no indication is given about the criterion
used to dene it, you can safely assume that the −3 dB criterion was employed.
The notion of bandwidth can be extended to any plant. Again, strictly Bandwidth of a plant in
speaking, the bandwidth is the width of a frequency range, but in practice general
222 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
Figure 12.12: Bode diagram of a rst-order plant with gain gmax = 20 dB at low
frequencies. Using the gmax − 3 dB criterion for the bandwidth, the frequency
of the pole is found.
the limits of the range are given instead, or rather only one limit if the other
is 0 rad/s or innity. The bandwidth will thus be once more a frequency or
frequencies that satisfy one of several criteria, according to what better suits
the plant.
If the largest value of the gain of the plant is 0 dB, then the −3 dB criterion
can be used just as it is for lters.
If the largest value of the gain is larger than 0 dB, the −3 dB criterion
can also be used just the same.
If the largest value of the gain is larger than 0 dB, the 0 dB criterion
can be used instead. The bandwidth will then separate the frequencies
where the input is amplied from those where the input is attenuated. In
this case, the bandwidth will be just another name for the gain crossover
frequency, according to Denition 10.9.
If the largest value of the gain is some value gmax dB, a criterion can be
used by which the bandwidth is the frequency (or frequencies) where the
gain crosses gmax − 3 dB. See Figure 12.12 to see an example showing why
this makes sense.
The former criterion makes particular sense if gmax < 0 dB, since the gain
does not cross 0 dB and may not even cross −3 dB.
The former criterion makes no sense if there are poles at the origin, since
in that case gmax = +∞.
Some other value that better suits the problem addressed can be used
instead.
The 0 dB criterion is often useful, but since a plant's gain can be known with
uncertainty, or undergo small changes, for safety the −3 dB criterion is used
instead.
Example 12.6. A 4-bit digital signal can assume 24 = 16 values which are
binary decimal
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
Notice that 16 in base 2 is 10000 and requires 5 bits to be represented. It is
impossible to represent it with 4 bits.
Remark 12.4. This is similar to what happens with an integer decimal number
with n digits, which can assume 10n values ranging from 0 to 10n −1. With three
decimal digits we can represent 999, but 103 = 1000 would require 4 decimal
digits. Of course, there are 1000 numbers from 0 (or 000, if you prefer) to 999.
Converting integers from base 2 to base 10 can be done summing the powers From base 2 to base 10
of 2 corresponding to bits which are 1.
The rightmost digit multiplies 100 and thus, if there are n digits, the leftmost
digit multiplies 10n−1 . Binary numbers are even easier to handle, because bits
are either 0 or 1.
1×27 +0×26 +0×25 +1×24 +1×23 +1×22 +0×21 +1×20 = 128+0+0+16+8+4+0+1 = 157
(12.21)
It is sometimes convenient to write the number like this:
order 7 6 5 4 3 2 1 0
bits 1 0 0 1 1 1 0 1
powers of 2 27 26 25 24 23 22 21 20
weights 128 64 32 16 8 4 2 1
224 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
order 11 10 9 8 7 6 5 4 3 2 1 0
bits 0 0 0 1 1 1 0 1 0 1 1 0
powers of 2 211 210 29 28 27 26 25 24 23 22 21 20
weights 2048 1024 512 256 128 64 32 16 8 4 2 1
Since 210 > m we now know we will need 10 bits, corresponding to powers from
20 to 29 . Now we successively subtract the larger possible weight from the table
above:
10−(−10)
The resolution of the AD converter in Volt is 210
20
= 1024 = 0.0195 V.
Hence the resolution in degree Celsius is 0.0625 = 0.3125 C.
0.0195 ◦
7.5−(−10)
7.5 V corresponds to output 10−(−10) × 1024 = 896. 1.25 V corresponds
1.25−(−10)
to output 10−(−10) × 1024 = 576. Thus the resolution is 120−20
896−576 =
0.3125 ◦ C.
Of course, all these ways of reasoning consist in fact in the same calculation and
give the same result. See Figure 12.14.
In the previous example, outputs were found with rules of three. When
the result is not integer, it must be rounded down, because both AD and DA AD/DA conversion
converters work as shown in Figure 12.15 (in the next section we will see why). rounds down
Notice that, as a result:
in DA conversion, since the largest input is 2n −1, the output never reaches
Vmax , but only Vmax − ∆V = Vmax − Vmax −Vmin
2n .
Figure 12.15: Blue line: how AD and DA conversions take place, for a 3-bit
converter working with voltages in the range from Vmin to Vmax ; the resolution
is ∆V = Vmax −V
8
min
. The extension to any other number of bits is immediate.
12.4. SIGNAL CHARACTERISTICS 227
we get 1001100101011001.
Example 12.15. A 6-bit DA converter has outputs in the −5 V to 5 V range
and receives 110001 as input. Since 110001(2) = 25 + 24 + 20 = 32 + 16 + 1 = 49,
the output will be
25 + 24 + 20 32 + 16 + 1 490
−5 + (5 − (−5)) = −5 + 10 = − 5 = 2.656 V
26 64 64
(12.37)
Knowing the resolution is important to calculate the precision: Precision
The precision of the chain, being a maximum value of an absolute error, is the
sum of the precision of its components.
Indeed, sensor and actuator accuracy is aected by errors, which can be Systematic vs. stochastic
classied as systematic when their value remains the same for identical condi- errors
tions, or stochastic when they are a random variable. Systematic errors lead
to a bias in measurements. Stochastic errors corresponding to random variables
that do not have a zero mean also lead to bias in measurements. We will study
stochastic systems in detail in Part VIII of these Lecture Notes.
Example 12.16. Suppose that the sensor from Example 12.12 has an accuracy
of 5 mm. Since the range is 50 cm, this is often indicated as 50 cm = 1% of
5 mm
full-scale reading. This means that the accuracy is 1% × 50 cm = 5 mm. Accuracy as % of full-scale
Since the resolution of the AD conversion is 0.39 cm = 3.9 mm, if there are reading
no other sources of noise present, the precision of the measuring chain shall be
5 + 3.9 = 8.9 mm.
Example 12.17. Analog measurements have resolution and precision too. Con-
sider the weighing scale in Figure 12.16. Mass can be measured in the 5 kg to
100 kg range, with a resolution of 0.1 kg, and a precision of 0.1 kg. There is
no ner resolution because the graduation has ten marks per kilogram. The
precision is a result of the characteristics of the device.
Example 12.18. In Example 12.17 the resolution and the precision have the
same value, but this is often not the case. Figure 12.17 shows luggage scales with
a resolution of 1 g, but with a precision of 5 g or 10 g depending on the range
where the measurement falls. (Varying precisions are found for some types of
sensors, especially because of non-linearities, as we shall see in Chapter 13.)
228 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
Figure 12.16: Weighing scales once used in the Beªchatów coal mine, Poland.
12.4. SIGNAL CHARACTERISTICS 229
In Examples 12.12 and 12.16 the range of outputs of the sensor S is precisely
the range of inputs of the AD converter C . If S 6= C there are three possible
situations:
Example 12.22. If the temperature sensor from Example 12.13 has an accuracy
of 3 ◦ C, then the precision of the measurement is 3.3125 ◦ C. The contribution of
the AD converter for this is 0.3125 ◦ C and is not very relevant when compared
to sensor accuracy. So the sensor can be directly connected to the AD converter.
Example 12.23. If the temperature sensor from Example 12.13 has an accuracy
of 0.1 ◦ C, then the precision of the measurement is 0.4125 ◦ C. The contribution
of the AD conversion is signicant, and if we need a precision of 0.2 ◦ C it is clear
that it is the resolution of the AD conversion that is preventing this specication
from being fullled. The resolution is poor because only 320 of the 1024 values
that the AD can output are being used. If all values were used, the precision of
the measurement would be 0.1 + 120−20 1024 = 0.1977 < 0.2 C as required. So the
◦
Figure 12.20: Relations in the measuring chain of Example 12.23. Compare this
with the original situation in Figure 12.14.
Care must be taken not to exceed supply tensions anywhere. That is why
it is not possible to multiply the sensor output S ∈ [1.25 V, 7.5 V] by 3.2
rst, and only then correct the mean value subtracting 14 V. Apparently
the nal result would be the same, since of course 3.2(x−4.375) = 3.2x−14.
But the rst operation would require voltages in the range
The circuit in Figure 12.21 is not the only possible way of implementing
the desired operations. A weighted subtracting op-amp could have been
used instead. (Try to draw the corresponding circuit.)
Resistor values that cannot be found o the shelf can be obtained combin-
ing resistors in series (or in parallel), or with a potentiometer. The later
Calibration option allows calibrating the measuring (or actuation) chain, i.e. changing
the parameters of the components (in this case, resistance values) so that
the value read is exact in situations where the accurate value to be read
is known.
Small resistor values mean high currents, since from Ohm's law I = R.
U
And high currents mean signicant energy dissipation by Joule eect, since
the power dissipated is given by P = RI 2 = U I ; this also means that the
resistances would get very hot.
Another reason to avoid small resistor values is that jump wires, cables,
and other components have resistance too; such resistances are small, but
cannot be neglected if resistors have small values. As a consequence,
proportions of resistances around the op-amps would not be the desired
ones, and signal conditioning would be inaccurate.
Large resistor values are also undesirable, since currents would be small.
In that case, noise aecting currents would hardly be neglectable, and
measurements would be unreliable.
12.5. OP-AMP IMPLEMENTATION OF SIGNAL CONDITIONING 233
Glossary
Ora menganava tanto
que cuydey que ereis vos santo
& vos falais castellano
234 CHAPTER 12. MEASURING CHAINS AND ACTUATION CHAINS
accuracy precisão
active lter ltro ativo
actuation chain cadeia de atuação
AD converter conversor AD
band-pass (lter) (ltro) passa-banda
band-stop, band-reject (lter) (ltro) corta-banda
bandwidth largura de banda
bias enviesamento
calibration calibração
cut-o frequency frequência de corte
DA converter conversor DA
distortion distorção
lter ltro
high-pass (lter) (ltro) passa-alto
low-pass (lter) (ltro) passa-baixo
measuring chain cadeia de medida
measuring range gama de medida
pass-band banda (de frequências) de passagem
passive lter ltro passivo
precision precisão
repeatability repetibilidade
resolution resolução
signal conditioning condicionamento de sinal
sensibility sensibilidade
stochastic error erro estocástico
stop-band banda (de frequências) de corte, banda de rejeição
successive approximation aproximação sucessiva
systematic error erro sistemático
transduction transdução
transition band banda (de frequências) de transição
Exercises
1. The speedometer of a car's dashboard receives a signal in the [0, 2] V range
and shows speed values in the [0, 200] km/h range. It will be connected to
a sensor that measures speeds in the [0, 50] m/s range, providing a reading
in the [0, 50] mV range. Design the signal conditioning needed to connect
the sensor to the dashboard's speedometer.
2. A submarine has a sonar that creates a sound and detects its reection by
an object. The sound travels from the submarine to the object and back,
and then is detected. The speed of sound in water is 1500 m/s.
12.5. OP-AMP IMPLEMENTATION OF SIGNAL CONDITIONING 235
Figure 12.23: Circuit with the lter of Exercise 5. The sensor is connected to
the left of the breadboard, and the ltered signal is read to the right (source:
Professor Carlos Cardeira).
(a) How is the distance d to the object related to the time t between the
emission of the sound and the detection of its reection?
(b) The sound detector that measures t returns a tension given by 100 mV
per second. It will be connected directly to a display that receives
signals in the [0, 5] V range. What is the largest distance d that can
be shown, before the display saturates?
3. An accelerometer outputs 14 mV per g , where g = 9.8 m/s2 . Design a
signal conditioning to convert this into 0.25 V per m/s2 .
4. A quadcopter has a sensor to measure its height. The maximum frequency
of this signal is 10 Hz. There is noise at frequencies of 1 kHz and higher.
Design a lter with at least 37 dB attenuation for noise, while letting at
least 99% of the signal pass.
5. A sensor reads a signal given by y(t) = cos(10t). A power amplier in-
troduces noise estimated as d(t) = 0.5 cos(104 t). In order to reduce the
amplitude of the noise to 0.01, the lter in Figure 12.23 was employed.
(a) The resistance is R = 10 kΩ and the capacitor is C = 6 µF. Explain
why the lter is not suitable for its purpose.
(b) What values of R and C would be suitable?
7. Repeat the last exercise, using the lters with the circuits in Figure 12.25.
Sensors
Once outside the town, Stomper led them into a thick sedge and bade
them to be small and quiet lest they be seen by Sorhed's agents, who
would soon revive and mount the hunt.
The party was still panting when sharp-eared Arrowroot adjusted
the volume on his hearing aid and laid his head to the ground.
Hark and lo! he whispered, I do hear the sound of Nine Riders
galloping nigh the road in full battle array. A few minutes later a
dispirited brace of steers ambled awkwardly past, but to give Stom-
per his due, they did carry some rather lethal-looking antlerettes.
The foul Nozdrul have bewitched my ears, mumbled Stomper as
he apologetically replaced his batteries, but it is safe to proceed,
for the nonce. It was at that moment that the thundering hooves
of the dreaded pig riders echoed along the road.
In this chapter we will study how sensors for dierent types of physical
quantities work. Most sensors nowadays transduce what they are measuring
into a voltage or a current, which will then be acquired electronically. Even
if the signal is not recorded, but merely shown to a human user, such sensors
are employed with a digital display. As a consequence, measuring chains need,
almost always, to be supplied energy to function.
Sensors used to display a reading on a scale, as in Figure 12.2, are not found
today as often as they once were. In any case,
In either case, the measurement will be based on more than one transduction. The working principle of
This is usual: as we will see, there are sensors with working principles based some sensors uses two or
upon more than two transductions. more transductions
The output of some sensors is already digital; they do not require AD con-
version.
You are strongly advised to search the Internet for websites of manufacturers
and sellers of the dierent types of sensors, and check the technical documen-
tation available. This is the best way to get acquainted with the characteristics
of the dierent sensors: range, resolution, precision, bandwidth, type of output, Important characteristics
type of supply, repeatability, linearity, temperature or humidity limitations of sensors
and if possible check yet another very important non-technical characteristic
which is the price.
239
240 CHAPTER 13. SENSORS
Figure 13.2: Left: a signal corrupted by high frequency noise. Right: the
derivative we would like to have, and what we really get when we dierentiate
without bothering to lter.
Figure 13.3: Left: a signal corrupted by low frequency noise. Right: the inte-
gral we would like to have, and what we really get when we integrate without
bothering to lter.
Figure 13.4: Several proximity sensors with range r, placed at a distance d from
each other, can be used to measure position (in this case, the position of the
dark square), if d < 2r.
This distance can never be larger than xmax , and in practice should probably
be inferior; otherwise it is possible that an object will not be detected by any
sensor.
Proximity sensors can also be easily used to measure the angular velocity of
non-homogeneous bodies. The example of a cog is shown in Figure 13.5: the
sensor detects the proximity of a tooth; the angular velocity is found dierenti-
ating with respect to time the value of a counter that accumulates the number
of teeth.
Example 13.1. The cog of Figure 13.5 has 28 teeth. A proximity sensor has the
output shown in that Figure; i.e., 14 teeth could be counted during 1 s. Thus,
the cog rotates at 14
28 = 0.5 Hz, i.e. 0.5 × 2π = π rad/s, or still 0.5 × 60 = 30 rpm.
Usually the values of a counter would be known instead of the sensor output.
For instance, the counter would have 753 at t = 31 s, and 767 at t = 32 s; thus,
767−753
ω = 32−31
28
= 0.5 Hz = π rad/s = 30 rpm.
Figure 13.5: Left: a proximity sensor detects the teeth of a cog (source: adapted
from Wikimedia). Right: output of the proximity sensor for Example 13.1.
242 CHAPTER 13. SENSORS
of sensors. Some only work for linear quantities; others only work for angular
quantities; others work for both.
Encoders are more often used to measure angular position, though linear
encoders exist as well. A rotary encoder is a sensor consisting in a wheel
with perforations (shaped as slits), disposed in such a way that the light of
a LED on one side of the wheel may be detected by a light sensor (which
we will address below in Section 13.6) on the other side, if the hole is
aligned with both the LED and the sensor. Instead of a perforated wheel,
it is possible to have a wheel with a surface which either reects light or
not; in this case, both the LED and the light sensor are on the same side of
the wheel. Because the encoder output depends on light sensors detecting
light or not, it is digital by construction. There are two main types of
encoders:
Figure 13.7: Left: incremental encoder. Right: output of the light sensors.
(Source: ISBN 9780128123195.)
0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 1
2 0 1 0 5 1 0 1
3 0 1 1 7 1 1 1
4 1 0 0 3 0 1 1
5 1 0 1 2 0 1 0
6 1 1 0 6 1 1 0
7 1 1 1 4 1 0 0
Figure 13.8: Left: 3-bit encoder wheel with binary numbers. Right: 3-bit
encoder wheel with Gray code. (Source: Wikimedia.) Notice how on the left
all three bits may change at one time, while on the right, by construction, only
one changes at a time.
the shaft rotates back. To know the sense of rotation, two dierent
light sensors are needed. They will either be slightly misaligned so
that they will not detect a slit at the same time, or correspond to two
dierent rows of misaligned slits along the rim. In this way, there will
be two square waves, and knowing which of them goes up rst it is
possible to know if the wheel turns clockwise or counter-clockwise, i.e.
if the count should be incremented or decremented. In any case, the
rotation is measured from the position of the shaft when the counter
was reset. Some encoders include a third sensor, to detect a single
slit that will correspond to 0◦ ; but this will only work if that sensor
is ever activated (small oscillating shaft rotations may prevent that).
And, in any case, the position is found integrating or rather, since
a digital value is used, summing a measurement.
Absolute encoders give the absolute value of the angular position Absolute encoders
of the shaft. The wheel is divided into n concentric annuli, and into
2n sectors, as seen in Figure 13.8. Each sector has its n sectors of
annuli painted so as to correspond to a dierent number in base 2.
(Slits would prevent a smooth transition of the reading from one
sector to the next.) There are n sensors, and the binary number
formed by the readings of the sensors gives the angular position of
◦
the shaft, with resolution 360
2n . Numbers may follow in numerical
order, but in this way it is possible that, when the reading changes
from one sector to the next, dierent light sensors will change its
output at slightly dierent instants. Consequently, for a short period
of time, the output will be wrong. Thus, it is usual to arrange the
binary numbers in such a way that only one bit changes at a time.
This arrangement is known as Gray code and shown in Figure ??. Gray code
The encoders described above are optical encoders, by far the most com- Optical vs. magnetic en-
mon. Magnetic encoders are similar but replace the LED and the light coders
sensor by magnetic pulses. Instead of slits in the wheel, or zones that alter-
nately reect and do not reect light, the wheel has permanent magnets,
244 CHAPTER 13. SENSORS
LVDT and RVDT sensors Linear variable dierential transformers (LVDT sensors) and ro-
tary variable dierential transformers (RVDT sensors) have three
coils and a ferromagnetic core connected by a shaft to the position to be
measured. The shaft moves back and forward, as seen in Figure 13.10, in
a LVDT; in a RVDT, shown in Figure 13.11, it rotates. A xed voltage is
applied to coil A, the primary coil, and the core becomes an electromag-
net. If it is equidistant from both the other coils, the secondary coils, the
core induces no current in them, and there is no voltage B ; this is called
the null point. If the core moves aside, there will be a current in one of
the secondary coils, and B 6= 0. LVDT and RVDT sensors have good
resolution and bandwidth, little wear, and few temperature restrictions.
Capacitive sensors Capacitive sensors, or capacitance sensors, have the position to be mea-
sured connected to one of the plates of a capacitor. If the moving target
is conductive, it may be used as one of the plates. The capacitance C of
a capacitor with plates of area A separated by distance x is given by
Aε
C= (13.2)
x
where ε the dielectric constant of the medium between the plates. Capac-
itance is then measured applying a known current, so that the resulting
13.2. WORKING PRINCIPLES OF POSITION SENSORS 245
Figure 13.11: Left: RVDT with its core at the null point, and thus equal volt-
ages in the secondary windings. Right: dierent voltages in the two secondary
windings. (Source: https://www.youtube.com/watch?v=lNKxIsM_W3M.)
Figure 13.12: Eddy currents with intensity I induced by the magnetic eld
B of a magnet on a moving conducting material C with velocity V (source:
Wikimedia).
Eddy current sensors are based on eddy currents, or Foucault currents, Eddy current sensors
and require that the target be conductive. As Figure 13.12 shows, a mov-
ing magnetic eld induces an electric current in a conductive material.
Since the target may not be moving, sensors use an electromagnet with
a high frequency alternating current. In this way, the magnetic eld is
always changing, just as if a permanent magnet were moving. The closer
the target, the more energy these currents have. They generate a magnetic
eld that counteracts the one that originates them. The result is that the
sensor and the target can be modelled as a transformer with a variable
coupling coecient (remember Figure 5.22). The sensor itself will be sim-
ilar to an LR system with both impedance L and resistance R depending
on the distance x, as in Figure 13.13. These sensors operate in a wide
amplitude of temperatures and have a high bandwidth.
Hall sensors, or Hall eect sensors, are based on the Hall eect, explained Hall sensors
in Figure 13.14, and again require a conductive target. The presence of
the conductive target in the magnetic eld changes the dielectric constant
and consequently the Hall voltage. The variation of this voltage is used
to nd the distance of the target.
Inductive sensors are similar, and are also based on an electromagnet. Inductive sensors
Unlike Hall sensors, only variations in the magnetic eld caused by a
metallic target are detected. Consequently, these sensors are proximity
sensors.
Strain gauges are resistances glued to a surface, in such a way that Strain gauges
will be stretched or compressed with it. They are used to measure small
Figure 13.14: Hall eect: magnet (3) generates a magnetic eld (4) that deviates
the electrons (1) passing through plate (2) which is part of the circuit fed by
battery (5). The force acting on the electrons is called Lorentz force. Because
electrons are deected, there is a dierence of electric potential between the
upper and the lower sides of plate (2), called Hall voltage. In practice, the plate
is usually a semiconductor. (Source: adapted from Wikimedia.)
See Figure 13.15. The resistance of a strain gauge has several windings
to maximise the changes in length and cross-section; see Figure 13.16. It
should be glued so that these windings are parallel, or oblique, to the
direction of the stretch or compression; it should never be perpendicular
thereto.
Proof. As the strain gauge is solid, its volume before and after the change
in length is the same. Let the initial length be L and the initial cross-
section be A. The nal length will be L + ∆L, and the nal cross-section
will be A − ∆A; the variations ∆L and ∆A will be either both positive
or both negative. Neglecting second order terms (that is why we need a
small ∆L),
≈0
z }| {
LA = (L + ∆L)(A − ∆A) = LA − L∆A + A∆L − ∆L∆A
A
⇒ ∆A = ∆L (13.3)
L
Figure 13.15: How a strain gauge's length and cross section change when it is
stretched and compressed (source: Wikimedia).
nal resistance is
L + ∆L
R + ∆R = ρ
A − ∆A
L L + ∆L
⇔ ρ + ∆R = ρ
A A − ∆A
L + ∆L L
⇒ ∆R = ρ A
−ρ
A − ∆L A
2L
L2
L + L∆L
=ρ −
LA − A∆L LA
| {z }
≈LA
L∆L ρ
=ρ = ∆L (13.4)
LA A
Since a strain gauge transduces the variation in length into a resistance,
another transduction is needed to obtain a voltage. The simplest way
to do this would be a tension divider, as in Figure 13.17. A constant
reference voltage Vi is provided, the output is Vo , and we let the additional
resistor of the divider be equal to the nominal value of the resistance of
the gauge:
(
R + ∆R = Vi −Vi
o
Vi − Vo Vo
Vo ⇒i= =
R= i R + ∆R R
⇒ Vi R − Vo R = Vo R + Vo ∆R ⇔ Vo (2R + ∆R) = Vi R
Vo R
⇔ = (13.5)
Vi 2R + ∆R
Because, as we saw, ∆R R, this conguration seldom, if ever, leads to
acceptable results, as VVoi will be nearly constant. That is why an alterna-
tive conguration, teh Wheatstone bridge, is used instead. There are
in fact three dierent variations, shown in Figure 13.17, depending on the
number of gauges used:
Wheatstone bridge: quar- In a quarter bridge, there is one gauge, and
ter bridge ( !
R
VA = Vi R+R+∆R 1 1
R
⇒ Vo = VB − VA = Vi −
VB = Vi R+R 2 2 + ∆R
R
∆R
Vo 2+ 2 1 ∆R
⇒ = R
− ≈ (13.6)
Vi ∆R ∆R 4 R
2 (2 + ) 2 (2 + )
| {zR } | {zR }
≈2 ≈2
Wheatstone bridge: half In a half bridge, there are two gauges, placed in such a way that
bridge one will be stretched and the other compressed; i.e. the variations of
resistance will be symmetrical. If the distance measured is the result
of bending a beam, that means that a gauge is placed on top and
another at the bottom. Then
( !
R−∆R
VA = Vi R−∆R+R+∆R 1 1 − ∆R R
R
⇒ Vo = VB − VA = Vi −
VB = Vi R+R 2 2
Vo 1 ∆R
⇒ = (13.7)
Vi 2 R
Wheatstone bridge: full In a full bridge, there are four gauges, placed in such a way that
bridge two will be stretched and two compressed:
( !
R−∆R
VA = Vi R−∆R+R+∆R 1 + ∆R
R 1 − ∆R
R
R+∆R
⇒ Vo = VB − VA = Vi −
VB = Vi R−∆R+R+∆R 2 2
Vo ∆R
⇒ = (13.8)
Vi R
Even with a Wheatstone bridge, the output voltage usually needs to be
signicantly amplied to be read by an AD converter.
13.2. WORKING PRINCIPLES OF POSITION SENSORS 249
(a) (b)
(c) (d)
Figure 13.17: A strain gauge needs to be used with other resistors. (a) Volt-
age divider, a very poor conguration because the output hardly changes. (b)
Wheastsone quarter bridge, with one gauge. (c) Wheatstone half bridge, with
two symmetrical gauges. (d) Wheatstone full bridge, with two pairs of symmet-
rical gauges.
250 CHAPTER 13. SENSORS
Ultrasound sensors Ultrasound sensors emit ultrasounds and measure the time it takes for
the echo to return. This may be done with a single transducer, that both
emits the ultrasound and measures the echo. In a way, they are similar
to a lidar, but using ultrasounds instead of laser pulses; this means that
the sensor works even when there is smoke or fog (environments that pose
problems to laser sensors), or when the material fails to reect a laser
beam because of being translucid. On the other hand, the range is usually
of at most a few meters only, and care must be taken because the speed
of sound is not constant (it depends on temperature and on other usually
less relevant factors).
of America, though there are others, such as the European Union's Galileo,
and many are compatible with each other; in any case, GPS is often used
by synecdoche to design all GNSSs. These systems are based on satellites
orbiting the Earth, broadcasting radio signals that include the satellite's
location and the time, given by an atomic clock (this is a very simplied
description, but suces for our purpose). GPS receivers read these signals
and nd how much time the signal took to arrive; from this time t, the
distance d to the satellite is found as c = dt , where c is the speed of light.
Knowing the distance to several such satellites, and their position, the
current location is found as the point which is at the correct distance from
all the satellites (see Figure 13.19). Receiving four signals, it is possible to
correct the GPS receiver's clock (which is not as precise as the satellites'
clocks).
As to angular position sensors:
There is an additional sensor technology that measures angular position
only and deserves a mention. A resolver is similar to a transformer Resolver
(which we studied in Section 5.4), or, rather, to two transformers, with
the primary winding in a rotor, and two secondary windings in a stator
within which the rotor rotates. (Notice the dierence to a RVDT.) The
number of turns in the two secondary windings must be the same; the
number of turns in the primary winding can be dierent, but to simplify
we will assume that all windings have the same number of turns, and that
there are no losses.
The primary voltage VP is an AC voltage with a frequency ωI which must
be clearly above the frequency of rotation of the rotor:
VP (t) = A sin(ωI t) (13.9)
The two secondary windings make an angle of 90◦ with each other; see
Figure 13.20. When the primary is aligned with one of them, a voltage
equal to VP (t) will be induced in that winding, while the other one, being
perpendicular, will have no current whatsoever. When the rotor makes an
angle θ with one of the windings, the voltages will be
VS1 (t) = A cos θ sin(ωI t) (13.10)
VS2 (t) = A sin θ sin(ωI t) (13.11)
For this reason, the two stator windings are known as cos and sin wind-
ings. If the rotor rotates with a constant angular velocity θ̇, their voltages
252 CHAPTER 13. SENSORS
Figure 13.20: Left: the three windings of a resolver. Right: how the voltages
of the sin and cos windings change with time when the rotor rotates with a
constant angular velocity.
VS2 (t)
θ(t) = arctan (13.12)
VS1 (t)
Because the signs of both the numerator and the denominator are known,
θ(t) can be found in any quadrant.
Clinometer Inclinometer or clinometer is a generic name for a sensor that measures
the inclination or tilt of a probe, either from the vertical or from the
horizontal. Any working principle for an angular position sensor will do, as
long as it can measure small angles with a reasonable precision; frequently,
servo accelerometers, addressed below in Section 13.3, are used.
Compass A compass is often employed with a GPS to know not only one's position,
but one's orientation as well. Most compasses make use of the Hall eect
(remember Figure 13.14).
the rotating body. But if n is odd, say, equal to 3, in the new period
ω there will be 1.5 rotations, and the mark will be seen on opposite
π
sides of the body just as if ω were the actual angular velocity of the
rotating body. Thus, doubling ω should only be done when it is quite
certain that the body is rotating at most twice during period 2π ω .
Drag cup tachometers are based on eddy currents, already mentioned Drag cup
about eddy current sensors. While eddy current sensors use an AC elec-
tromagnet, so as to be able to measure the position of a target which did
not move, these tachometers use a permanent magnet that rotates with
the body whose angular velocity we want to measure. It is this rotation
that induces eddy currents in a metallic (usually aluminium) cup, within
which the magnet rotates. As mentioned, these currents themselves gen-
erate a magnetic eld; thus, there is a torque between the magnet and
the disk, proportional to the velocity of the magnet. In other words, the
rotation of the magnet drags the cup; it would cause it to rotate as well,
but the cup is connected to a rotational spring, that exerts a force propor-
tional to the angular position, as in (4.24). Thus, the cup will stop at an
angular position proportional to the angular velocity of the magnet. See
Figure 13.21.
The cup may be connected to a pointer (to show the velocity on a grad-
uated dial) or connected to a sensor of angular position. These sensors
were often used in cars, though nowadays less often. In a car, they can
be used to show the velocity of the vehicle (with the magnet connected
to the output of the gearing box, and thus rotating with the wheels) or
the velocity of the engine (with the magnet connected to the input of the
gearing box, and thus rotating with the engine).
Glossary
᾿Εὰν οὖν μὴ ειδῶ τὴν δύναμιν τῆς φωνῆς, ἔσομαι τῷ λαλοῦντι βάρβαρος
και ὁ λαλῶν ἐν ἐμοι βάρβαρος.
Saint Paul of Tarsus (5 BC? 67?), First Epistle to the Corinthians, xiv 11
anemometer anemómetro
encoder contador incremental
extensometer extensómetro
speedometer velocímetro
Exercises
1. According to European standards, car speedometers must never indicate
a speed below the actual speed, and the indicated speed must not exceed
the actual speed by more than 10% of the actual value plus 4 km/h.
(a) Let v be the actual speed and vm the indicated speed. Plot the
maximum and minimum admissible values of vm as functions of v ,
together in the same plot.
13.7. SENSORS FOR PH AND CONCENTRATION 255
(a) What are the resolution and the precision in relation to the 100 mm
width of the measuring range?
(b) Show that the angular position α and the linear position x are related
by
d
tan α = (13.13)
x − x0
(a) Show that the change ∆n of the counter reading between two suc-
cessive sampling instants is given by
∆n = b32.6ωc (13.14)
7. The temperature of a motor can assume values in the [10◦ C, 180◦ C] range,
and is measured with an infrared sensor that works in the [−18◦ C, 538◦ C]
range. Its output is in the [0 V, 5 V] range, and its precision is given by
Actuators
An engineer is a person who enjoys the feel of tools, the noise of
dynamos and smell of oil.
14.2 DC motors
In the picture: National Pantheon, or Church of Saint Engratia, Lisbon (source:
http://www.panteaonacional.gov.pt/171-2/historia-2/), somewhen dur-
ing its construction (16821966).
14.3 AC motors
This chapter is still being written.
259
260 CHAPTER 14. ACTUATORS
Glossary
Os bos e xenerosos
a nosa voz entenden
e con arroubo atenden
o noso rouco son,
máis sóo os iñorantes,
e féridos e duros,
imbéciles e escuros
non os entenden, non.
Eduardo María González-Pondal Abente (1835 1917), Queixumes dos
pinos, Os pinos
alternating current corrente alternada
brushless motor motor sem escovas
compressed air ar comprimido
compressor compressor
coreless motor motor sem núcleo
direct current corrente contínua
double acting valve, double action valve válvula de duplo efeito
power amplier amplicador de potência
stepper motor motor passo-a-passo
Exercises
1. We want to control the angular position of a brushless DC motor, with
the characteristics given in Figure 14.1. An 8-bit DA converter will be
used, with the characteristics given in Figures 14.2 and 14.3. The supply
voltage VDD of the DA converter will be the highest possible.
(a) The motor should turn in both senses, and consequently must re-
ceive a voltage in the range from −12 V to +12 V. Design a signal
conditioning to connect the output of the DA converter to the motor
input.
(b) Show how you could implement this signal conditioning using OpAmps.
Find reasonable values for resistors and other components you may
need. Assume that you have −12 V and +12 V available.
14.7. DIMENSIONING OF PNEUMATIC AND HYDRAULIC CIRCUITS 261
(c) Find the resolution of the control action in Volt, after the signal
conditioning.
(d) Tensions −12 V and +12 V correspond to the motor's nominal rota-
tion velocity of 6070 rpm shown in Figure 14.1 (in dierent senses of
rotation, of course). What is the resolution of the rotation velocity?
(e) When the DA converter's output is 01101001, what tension will be
supplied to the motor, and what will be its rotation speed?
(f) The angular position of the motor's shaft is being measured with
160 Hz noise. Design a rst order lter that brings the amplitude
of the noise down to 10% of its original value, with the smallest
possible attenuation to low frequencies two decades or more below
the frequency of the noise. (There is no need to show how the lter
could be implemented with OpAmps.)
(g) The DC motor takes a time interval τ to reach 95% of the expected
rotation velocity when there is a step in the tension supplied. Model
this dynamic behaviour with a rst order transfer function (with unit
gain at low frequencies).
(a) What values, in both degrees and radians, do the two resolutions
mentioned in Figure 14.4 correspond to?
(b) Which of the two resolutions allows reading a lower angular velocity
of the motor? Find the value of that velocity in radians per second.
262 CHAPTER 14. ACTUATORS
(c) The plot in Figure 14.4 shows the non-linearity of the sensor for
the worst situation that still respects alignment tolerance, when 256
counts per turn are selected. That largest absolute value of the angle
given in the plot correspond to how many LSB?
(d) For the rated angular velocity of the motor (do not confound this
with the angular velocity when there is no load), and for both res-
olutions mentioned in Figure 14.4, nd the change in the reading of
the encoder during a sample time.
(e) Between the DA converter providing the control action and the DC
motor, there is one of the two signal conditioning circuits in Fig-
ure 14.6. For each of the circuits, nd what is the largest voltage
that the DA can supply, without exceeding the nominal voltage at
the input of the motor. (Consider that the power amplier does not
change the voltage.)
(a) If this is a cylinder with a through rod, what force can it exert?
(b) If this cylinder does not have a through rod, what force can it exert?
14.7. DIMENSIONING OF PNEUMATIC AND HYDRAULIC CIRCUITS 263
Control systems
265
267
The thought makes me feel old. I can remember when there wasn't
an automobile in the world with brains enough to nd its own way
home. I chaueured dead lumps of machines that needed a man's
hand at their controls every minute. Every year machines like that
used to kill tens of thousands of people.
The automatics xed that. A positronic brain can react much faster
than a human one, of course, and it paid people to keep hands o
the controls. You got in, punched your destination and let it go its
own way.
We take it for granted now, but I remember when the rst laws came
out forcing the old machines o the highways and limiting travel
to automatics. Lord, what a fuss. They called it everything from
communism to fascism, but it emptied the highways and stopped the
killing, and still more people get around more easily the new way.
Of course, the automatics were ten to a hundred times as expensive
as the hand-driven ones, and there weren't many that could aord
a private vehicle. The industry specialized in turning out omnibus-
automatics. You could always call a company and have one stop at
your door in a matter of minutes and take you where you wanted to
go. Usually, you had to drive with others who were going your way,
but what's wrong with that?
Chapter 15 is about control strategies and controller structures, among which are PID
controllers and lead-lag controllers.
Chapter 16 presents the root locus plot, which is a tool to study closed loop control
systems, and how it can be used to design controllers.
Chapter 18 concerns the Nyquist stability criterion, which are another tool to study
closed loop control systems.
Chapter 17 addresses stability margins, yet another tool to study closed loop control
systems.
Chapter 19 shows the Nichols plot, a further tool for the study of closed loop control
systems.
Chapter 23 shows how to design controllers using the Internal Model Control method-
ology.
Chapter 24 introduces pure delay systems and the problem they cause to control.
See Section 9.3 again, and in particular Figure 9.13. In this chapter we will
study what these congurations can do, and what controllers are used with
each.
269
270CHAPTER 15. CONTROL STRATEGIES AND CONTROLLER STRUCTURES
if there is noise,
things do not work that well. And, most importantly, it is nigh to impossible
to control unstable plants in open loop.
Example 15.2. Consider the case of Example 15.1 again, with two changes:
Figure 15.3 shows what happens if there is an error identifying the plant:
in particular, a 10% error in the gain. Consequently,
0.11
G(s) = (15.3)
s2 + 1.5s + 1
but the controller remains the same. Notice that the output has steady-
state errors, but, since the controller does not receive any measurement
of the output (which may even not be measured at all), nothing is done
about it.
15.1. OPEN LOOP CONTROL 271
Figure 15.2: Open-loop control of (15.1) from Example 15.1, with an anticipated
control action.
Figure 15.3: Open-loop control of (15.1) from Example 15.1, when the plant is
known with a modelling error.
272CHAPTER 15. CONTROL STRATEGIES AND CONTROLLER STRUCTURES
Figure 15.4: Open-loop control of (15.1) from Example 15.1, when the output
is aected by sinusoidal disturbance (15.4).
where y(t) is the output we expected. Again, because the controller does
not receive any measurement of the output, nothing is done about this
oscillation which appears in the output.
Example 15.3. The underdamped second-order plant of Examples 15.1 and 15.2
can be controlled in closed-loop, as seen in Figure 9.13, with
30
C(s) = 55 + + 25s (15.5)
s
This is a type of controller that we will study later on in this chapter. For more
realistic simulations of performance, and for fairer comparison with open-loop
control, control actions were limited to the [−500, 500] interval. (The eects of
this saturation of the control action will be studied in depth in Chapter 28.)
Figures 15.5 and 15.6 show that:
10 + 5s s−1
1
y(s)
=
1 + 10 + 5s s−1
1
r(s)
10s+5
s2 −s 10s + 5
= = (15.8)
1 + 10s+5
s2 −s
s2 + 9s + 5
The roots of the denominator are −8.4 and −0.6: the closed-loop is thereby
stable.
However, badly designed closed loop control can also make stable plants
unstable.
Example 15.5. In the closed-loop of Figure 9.13, let
1
G(s) = (15.9)
s3 + 4s2+ 6s + 4
C(s) = 25 (15.10)
The poles of G(s) are −2 and −1 ± j , and so the plant is stable; but the closed-
loop and its poles are
>> G = 1/((s+2)*(s+1+1i)*(s+1-1i));
>> closed_loop = feedback(25*G, 1)
closed_loop =
25
----------------------
274CHAPTER 15. CONTROL STRATEGIES AND CONTROLLER STRUCTURES
Figure 15.6: Top: closed-loop control of (15.1) from Example 15.1, when the
plant is known with a modelling error. Bottom: the same, when the output is
aected by sinusoidal disturbance (15.4).
15.2. CLOSED LOOP CONTROL 275
s^3 + 4 s^2 + 6 s + 29
>> pole(closed_loop)
ans =
-4.2107 + 0.0000i
0.1054 + 2.6222i
0.1054 - 2.6222i
Remark 15.1. Assuming that the controller of Example 15.5 is proportional, Routh-Hurwitz criterion
C(s) = K ∈ R, it is easy to use the Routh-Hurwitz criterion to nd which and proportional control
values of K would ensure a stable closed-loop:
K
y(s) 3 2
= s +4s +6s+4
r(s) 1 + s3 +4sK
2 +6s+4
K
= (15.11)
s3 + 4s2 + 6s + (4 + K)
s3 1 6
s2 4 4+K
4×6−(4+K) (15.12)
s 4
1 4+K
24 − 4 − K
> 0 ⇒ K < 20 (15.13)
4
4 + K > 0 ⇒ K > −4 (15.14)
and thus if we want the output y(s) to follow the reference r(s) perfectly, i.e.
y(s) = r(s), all we have to do is
1
C(s) = (15.16)
G(s)
and perfect control is achieved.
Open-loop controller de- In practice things are not that simple. As we saw in Chapter 11, plant
sign in practice models ought to be strictly proper, i.e. to have more poles than zeros. If so,
applying (15.16) we get a controller C(s) which is not proper, i.e. has more zeros
than poles. This controller, as we know, has a behaviour at high frequencies
that is impossible. Consequently, additional poles must be added, so that C(s)
will be strictly proper, or at least proper. Ideally, additional poles should have
a frequency as high as possible, preferably higher than the frequency of every
zero and pole in G(s), so as to not alter the desired behaviour in the frequencies
where the model is valid (and in which the controller must thus do its job). Of
course, higher frequencies will mean faster responses, and faster responses mean
higher values of the control actions, so even if the actuator can respond fast
enough it may saturate if poles are too far away.
Example 15.6. Suppose that we want to control plant
s+1
G(s) = (15.17)
s(s + 10)
in open loop. It has one zero and two poles; so, if the controller is to be proper,
it needs an additional pole. One decade above the highest frequency zero or
pole would place it at 100 rad/s. But assume that control actions would be too
large, or that the actuator does not respond that fast, and we are left with
20s(s + 10)
C1 (s) = (15.18)
(s + 1)(s + 20)
or even with
10s
C2 (s) = (15.19)
s+1
which corresponds to an additional pole at 10 rad/s, which then cancels the
zero. Figure 15.8 shows the results obtained with both controllers when the
reference is the same of previous examples.
Combining open and It is possible to combine open-loop and closed-loop control in a single control
closed loop control system.
Example 15.7. Plant (15.17) from Example 15.6, with a 10% error in the
steady-state gain, can be controlled combining open-loop controller (15.19) with
a closed-loop proportional controller, as seen in Figure 15.9. The result, when
there is a sinusoidal output disturbance given by (15.4), is shown in Figure 15.10,
and is clearly better than results got with only one of the controllers, shown in
Figure 15.11.
Figure 15.9: Simulink le with which simulation results in Figures 15.10
and 15.11 were obtained, corresponding to Example 15.7.
278CHAPTER 15. CONTROL STRATEGIES AND CONTROLLER STRUCTURES
Figure 15.10: Control of (15.17) from Example 15.7, combining open-loop and
closed-loop control as seen in Figure 15.9.
P controllers Proportional controllers are already known to us. They apply a control
action
proportional to the loop error: the larger the error, the larger the control
action. Notice that a proportional controller is a static system.
Z t
u(t) = Kp e(t) + Ki e(t) dt, Kp , Ki 6= 0 (15.23)
0
Ki
⇒ u(s) = Kp e(s) + e(s) (15.24)
s
u(s) Ki
⇒ = C(s) = Kp + (15.25)
e(s) s
The reasoning behind this second term is that, in this way, if proportional
control achieves a steady-state error, since the integral of the error will
grow with time, the control action will also keep increasing, eliminating
the error. We will see in Chapter 20 when this actually works and when
it does not.
Figure 15.11: Control of (15.17) from Example 15.7. Top: open-loop control
only. Bottom: closed-loop control only.
280CHAPTER 15. CONTROL STRATEGIES AND CONTROLLER STRUCTURES
de(t)
u(t) = Kp e(t) + Kd dt, Kp , Kd 6= 0 (15.26)
dt
⇒ u(s) = Kp e(s) + Kd s e(s) (15.27)
u(s)
⇒ = C(s) = Kp + Kd s e(s) (15.28)
e(s)
The reasoning behind this second term is that, in this way, if there is a
sudden increase of the error, the control action will immediately increase
to counter it, rather than waiting for a large error (or, even worse, for a
large integral of the error) to do so. We will see in the next chapters when
this makes sense and when it does on.
but also similar controllers with more than one derivative part (though
this is seldom found) or (more often) more than one integral part, such as
PI2 D controllers:
Ki1 Ki2
C(s) = Kp + + 2 + Kd s (15.32)
s s
PI3 D controllers:
Ki1 Ki2 Ki3
C(s) = Kp + + 2 + 3 + Kd s (15.33)
s s s
PID2 controllers:
Ki
C(s) = Kp + + Kd1 s + Kd2 s2 (15.34)
s
and so on. We will see in Chapter 20 why additional integral parts may
be needed. Chapter 21 is devoted to design methods for the PID family
of controllers.
Lead-lag controllers have one pole, one zero, and a positive gain that
tends to zero at either low or high frequencies:
Glossary
I have remarked that the paper had fallen away in parts. In this
particular corner of the room a large piece had peeled o, leaving a
yellow square of coarse plastering. Across this bare space there was
scrawled in blood-red letters a single word:
rache
What do you think of that? cried the detective, with the air of a
showman exhibiting his show. This was overlooked because it was
in the darkest corner of the room, and no one thought of looking
there. The murderer has written it with his or her own blood. See
this smear where it has trickled down the wall! That disposes of the
idea of suicide anyhow. Why was that corner chosen to write it on?
I will tell you. See that candle on the mantelpiece. It was lit at the
time, and if it was lit this corner would be the brightest instead of
the darkest portion of the wall.
And what does it mean now that you have found it? asked Gregson
in a depreciatory voice.
Mean? Why, it means that the writer was going to put the female
name Rachel, but was disturbed before he or she had time to nish.
You mark my words, when this case comes to be cleared up you will
nd that a woman named Rachel has something to do with it. It's
all very well for you to laugh, Mr. Sherlock Holmes. You may be
very smart and clever, but the old hound is the best, when all is said
and done.
(. . . )
One other thing, Lestrade, he added, turning round at the door,
`Rache' is the German for `revenge,' so don't lose your time by
looking for Miss Rachel.
Exercises
1. A train can travel at a maximum speed of 115.2 km/h, and its maximum
acceleration is ±0.8 m/s2 .
(a) What is the minimum time that the train takes to travel between
two stations 6.4 km apart? Draw the evolution of velocity with time.
(b) Assume that larger accelerations (or decelerations) mean a larger
consumption of energy. (In fact things are more complicated in real
life.) If, due to timetable constraints, the train must take exactly
six minutes to travel between the same two stations, how should the
velocity change with time so that energy consumption is as low as
possible?
Chapter 16
Root locus
Minos' daughter Ariadne was among the spectators and she fell in
love with Theseus at rst sight as he marched past her. She sent
for Daedalus and told him he must show her a way to get out of the
Labyrinth, and she sent for Theseus and told him she would bring
about his escape if he would promise to take her back to Athens
and marry her. As may be imagined, he made no diculty about
that, and she gave him the clue she had got from Daedalus, a ball
of thread which he was to fasten at one end to the inside of the door
and unwind as he went on. This he did and, certain that he could
retrace his steps whenever he chose, he walked boldly into the maze
looking for the Minotaur.
to design the gain of a controller that has poles and zeros, once these are
known,
to see what happens to a closed loop control system with a known con-
troller, when the gain of the plant changes for some reason.
As we already saw, the location of the poles of the closed loop control system:
lets us know if it is stable (remember Section 10.3);
can give us an idea of how its time responses will be (remember Sec-
tion 11.6).
K
y(s) K
= s+1K = (16.1)
r(s) 1 + s+1 s+1+K
s = −1 − K (16.2)
283
284 CHAPTER 16. ROOT LOCUS
Figure 16.1: Situations in which the root locus diagram is useful. (a) The
plant G(s) is known. The controller K is proportional. We want to set a
reasonable value for K . (b) The plant G(s) is known. The controller K × C(s)
has known poles and zeros (collected in transfer function C(s)). We want to set
a reasonable value for controller gain K . (c) The controller C(s) is known. The
plant K × G(s) has known poles and zeros (collected in transfer function G(s)).
We want to know what happens when the gain of the plant K changes for some
reason. (Notice that in this case we cannot change K at will, otherwise it would
be part of the controller, not the plant.)
16.1. SIMPLE EXAMPLES 285
Table 16.1: Variation of the closed loop pole with open loop gain K in Exam-
ple 16.1.
K 5 4 3 2 1 0 −1 −2 −3 −4 −5
pole −6 −5 −4 −3 −2 −1 0 1 2 3 4
Notice that, if K = 0, the closed loop pole (16.2) will be K = −1, which is the
open loop pole too. But in that case the numerator of the closed loop (16.1) is
zero, the control action u(t) will be always zero, and the control system will not
work; there is not, properly speaking, a closed loop when K = 0.
We can give dierent values to K and nd the values for the closed loop
pole in Table 16.1, which are then plotted in Figure 16.2. Plotting more points
is easy using two for cycles in Matlab, one for positive and one for negative
values of K , with the result also shown in Figure 16.2:
G = tf(1,[1 1]);
% positive values of K
poles_closed_loop = [];
for K = 0 : 0.25 : 6
poles_closed_loop = [poles_closed_loop; pole(feedback(K*G, 1))];
end
figure, plot(real(poles_closed_loop), imag(poles_closed_loop), 'bx')
% negative values of K
poles_closed_loop = [];
for K = 0 : -0.25 : -6
poles_closed_loop = [poles_closed_loop; pole(feedback(K*G, 1))];
end
hold on, plot(real(poles_closed_loop), imag(poles_closed_loop), 'rx')
grid on, xlabel('Real axis'), ylabel('Imaginary axis'), legend({'K>0','K<0'})
Of course, the root locus diagram corresponds to an innitely small reso-
lution in K . This diagram shows what happens to the closed loop pole with the
variation of K . The last plot of Figure 16.2 was obtained with Matlab using
commands Matlab command
rlocus
>> s = tf('s');
>> figure,rlocus(1/(s+1))
>> hold on, rlocus(-1/(s+1),'g') % the 'g' option forces the green colour
>> legend({'K>0','K<0'})
Function rlocus always assumes a positive open loop gain K ; that is why it
was used twice, the second time with the minus sign inserted in the open loop
itself. For this simple open loop transfer function with only one pole, the root
locus could also have been easily plotted by hand from (16.2).
K
y(s) 2 K
= s +6s+8K
= 2 (16.4)
r(s) 1 + s2 +6s+8 s + 6s + 8 + K
y(s)
Figure 16.2: Top left: pole of the close loop consisting of plant u(s) 1
= s+1 and
a proportional controller K , for the cases in Table 16.1. Top right: the same,
calculated with for cycles for more values of K . Bottom: root locus diagram
of the plant.
If K > 1, they are imaginary, having a constant real part <(s) = −1;
√
If K < 0, they are real. If −3 + 1 − K > 0 ⇒ 1 − K > 9 ⇔ K < −8,
one of them will be positive.
These conclusions can be qualitatively seen in the root locus diagram, which
can be plot as
or better still as
s = tf('s');
G = 1/((s+2)*(s+4));
figure,rlocus(G,-G)
legend({'K>0','K<0'})
Two cases must be considered, corresponding to Kabnm > 0 and Kabnm < 0.
2. Plot the n open loop poles on the complex plane using a cross ×, and the m open loop zeros using a circle ◦.
3. The root locus diagram is symmetric in relation to the real axis.
4. If n − m ≥ 2, the centroid of the root locus is constant, irrespective of the value of K .
5. Points on the real axis belong to the root locus
if there is an odd number of open loop poles and zeros to its right, and Kabm > 0;
if there is an even number of open loop poles and zeros to its right, ornno poles and zeros at all, and
K bm
an < 0.
6. The diagram has n branches, each of which corresponds to a closed loop pole.
7. All branches converge to the open loop poles when K → 0.
8. m branches converge to the open loop zeros when |K| → ∞.
9. n − m branches diverge to innity when |K| → ∞, following asymptotes that make with the positive real axis
angles of
180◦ (2k + 1) K bm
, k = 0, . . . , n − m − 1, if >0
γ = 360n◦ k− m K bm
an (16.7)
, k = 0, . . . , n − m − 1, if <0
n−m an
and intersect on the real axis at point
n
X m
X
pk − zk
k=1 k=1
σ= (16.8)
n−m
10. The branches of the root locus converge or diverge on the real axis, perpendicularly thereto, at the real roots of
d 1 d (s − p1 ) . . . (s − pn )
=0⇔ =0 (16.9)
ds G(s) ds (s − z1 ) . . . (z − zm )
11. In the neighbourhood of a complex open loop pole pi , branches have an asymptote with an angle φi given by
m n
X X K bm
− φk + 180◦ , if
ψ k >0
k=1 an
k=1
k6=i
φi = X m n (16.10)
X K bm
if
ψ k − φ k , < 0
an
k=1 k=1
k6=i
where
φk = ∠[pi − pk ], k = 1, . . . , n, k 6= i (16.11)
ψk = ∠[pi − zk ], k = 1, . . . , m (16.12)
where
φk = ∠[zi − pk ], k = 1, . . . , n (16.14)
ψk = ∠[zi − zk ], k = 1, . . . , m, k 6= i (16.15)
Figure 16.4: Measuring the angles for rules 11 and 12 from Table 16.2.
Figure 16.5: Root locus of (16.16) from Example 16.3. Left: incomplete sketch
after step 5. Right: complete sketch after step 9.
12. There are no complex conjugate open loop poles, so this rule does not
apply.
It is clear from the root locus that
G(s) can be controlled in closed loop with a proportional controller K > 0,
being always stable;
there will always be oscillations in the controlled system, since the closed
loop poles will always be complex;
the larger the value of K , the more oscillations the controlled system will
have;
a negative proportional controller may result in real poles, if K is negative
enough;
however, for values of K which are negative and very large, the controlled
system will become unstable, since one of the closed loop poles will be
positive. We can nd the value of K below which the closed loop is
unstable applying to the closed loop transfer function
20K
y(s) 2
= s +2s+2
20K
r(s) 1 + s2 +2s+2
20K
= (16.27)
s2 + 2s + (2 + 20K)
the Routh-Hurwitz criterion:
s2 1 2 + 20K
s 2 (16.28)
1 2 + 20K
for this gain value K = −0.1 which makes the closed loop marginally
stable, there will be a pole at s = 0.
10. The points of divergence or convergence on the real axis are found solving
ans =
-4.8449 + 0.0000i
-1.8950 + 0.5908i
-1.8950 - 0.5908i
-0.6985 + 0.0000i
12. There are no complex conjugate open loop poles, so this rule does not
apply. With all we know, the second diagram in Figure 16.6 can now be
drawn.
when the control loop is stable, there may be two complex conjugate
dominant poles, resulting in an oscillating response, or one real dominant
pole;
even when there is a real dominant pole, there will be complex conjugate
poles;
16.2. RULES FOR THE ROOT LOCUS 293
Figure 16.6: Root locus of (16.30) from Example 16.4. Left: incomplete sketch
after step 9. Right: complete sketch after step 11.
the control loop will be stable only for an interval of negative values of K ,
that can be found applying to the closed loop transfer function
K(s+4)
y(s) 4 3 2 −4s+24
= −s −6s −13s
K(s+4)
r(s) 1 + −s4 −6s3 −13s2 −4s+24
Ks + 4K
=
−s4 − 6s3 − 13s2 − 4s + 24 + Ks + 4K
−Ks − 4K
= 4 3 2
(16.41)
s + 6s + 13s + s(4 − K) + (−4K − 24)
(in which we took the care of letting the rst coecient of the denominator
be positive) the Routh-Hurwitz criterion:
s4 1 13 −4K − 24
s3 6 4−K
s2 13 + K−4
6 −4K − 24 (16.42)
4K+24
s 4 − K + 6 13+ K−4
6
1 −4K − 24
For stability, the entire rst column must have the same sign (in this case,
positive), and so
K−4
13 + 6 > 0
4K+24
4 − K + 36 78+K−4 >0
−4K − 24 > 0
K − 4 > −78
⇒ (−K+4)(K+74)+144K+864
K+74 >0
4K < −24
K2> −74
⇒ K −74K−1160
K+74 <0
K < −6
K > −74
⇒ −13.3 < K < 87.3 ⇒ −13.3 < K < −6 (16.43)
K < −6
Notice that these negative values of K , replaced in the closed loop (16.41),
result in a positive steady state value;
when K = −6, the marginally stable closed loop has a pole at s = 0;
when K = −13.3, the closed loop has two imaginary poles s = ±jω .
Figure 16.7: Angles needed for the root locus of (16.30) from Example 16.4.
Figure 16.8: Step response of the marginally stable closed loop consisting in
plant (16.30) controlled with K = −13.3, from Example 16.5.
denominator of the closed loop (16.41), which must be zero at these poles. If
we replace K = −13.3 and s = jω , and equal to zero:
(jω)4 + 6(jω)3 + 13(jω)2 + jω(4 + 13.3) + (−4(−13.3) − 24) = 0
⇔ω 4 − j6ω 3 − 13ω 2 + j17.3ω + 29.2 = 0
(
ω 4 − 13ω 2 + 29.2 = 0
⇔
−6ω 3 + 17.3ω = 0
( √
ω 2 = 13± 169−4×29.2
2
⇔
ω = 0 ∨ −6ω 2 + 17.3 = 0
(
ω 2 = 10.1 ∨ ω 2 = 2.9
⇔
ω = 0 ∨ ω 2 = 2.9
(
ω = 3.2 ∨ ω = 1.7
⇔ (16.44)
ω = 0 ∨ ω = 1.7
Thus, when K = −13.3 the root locus crosses the imaginary axis at s = ±1.7j ,
as shown in Figure 16.6. The interest of knowing this is that, as we saw in
Chapter 10, this ω is the frequency of an oscillation. The oscillation is that of
the step response of the closed loop, which is marginally stable (since it has no
unstable poles, and two poles on the imaginary axis). If we make
figure,step(feedback(-13.3 * (s+4)/( (-s+1)*(s+3)*(s^2+4*s+8) ), 1), 25)
we get the response in Figure 16.8. The frequency of the oscillation is, as
expected,
2π
ω= = 1.7 rad/s (16.45)
24.4 − 20.7
Theorem 16.1. The root locus diagram is symmetric in relation to real axis.
Proof. This is a consequence of poles being either real or pairs of complex con-
jugates, as we saw in Section 9.1.
Denition 16.1. Given a plant with transfer function Characteristic equation
N (s)
G(s) = (16.46)
D(s)
where N (s) and D(s) are polynomials in s, the equation D(s) = 0, the roots of
which are the poles of G(s), is called characteristic equation.
Corollary 16.1. Let the direct branch of any of the closed loop control systems
in Figure 16.1 be K N (s)
D(s) , where K is the varying gain and polynomials N (s) and
D(s) collect the zeros and the poles. Since the transfer function of the closed
loop is
y(s) KN (s)
D(s)
= (16.47)
r(s) 1+KN (s)
D(s)
the characteristic equation of the closed loop is Closed loop characteristic
equation
N (s)
1+K =0 (16.48)
D(s)
which can also be written in any of the following forms:
D(s) + KN (s) = 0 (16.49)
N (s)
K = −1 (16.50)
D(s)
|N (s)|
|K|
=1
|D(s)| (16.51)
∠ K N (s) = π + 2kπ, k ∈ Z
D(s)
In what follows we always presume that the open loop transfer function
KN (s)
D(s) is proper, i.e. that the order n of polynomial N (s) is not larger than
the order m of polynomial D(s), i.e. that there are not more zeros than poles
(remember Denition 9.1 and the discussion about the number of poles and
zeros in Section 11.4). Also let
N (s) = bm sm + bm−1 sm−1 + . . . + b0
= bm (s − z1 ) . . . (s − zm ) (16.52)
n n−1
D(s) = an s + an−1 s + . . . + a0
= an (s − p1 ) . . . (s − pn ) (16.53)
where z1 , . . . , zm are the zeros of the open loop, and p1 , . . . , pn the poles.
Theorem 16.2. Points s on the real axis that are not zeros of G(s) belong to
the root locus
if there is an odd number of open loop poles and zeros to its right, and
Kbm > 0;
an
if there is an even number of open loop poles and zeros to its right, or no
poles and zeros at all, and Kb
an < 0.
m
Let s be real. As we know, poles and zeros may either be real or appear as
complex conjugates:
When a zero zi or pole pi is real, the angle ∠[s − zi ] or ∠[s − pi ] is either
0 or ±π .
It will be 0 if s − zi > 0 ⇔ s > zi or s − pi > 0 ⇔ s > pi , i.e. if the
pole or zero lies to the left of s.
It will be ±π if s − zi < 0 ⇔ s < zi or s − pi < 0 ⇔ s < pi , i.e. if the
pole or zero lies to the right of s. Notice that it is irrelevant whether
we are talking about a pole or a zero, since +π ≡ −π .
When there is a pair of complex conjugate poles or zeros, since s is real
and thus s = s, the angles must always cancel out:
There must be an odd number of real zeros and poles to the right of s, if
s is to belong to the root locus.
Kb Kbm = ±π , and (16.54) becomes
h i
If a m < 0, then −∠ a
n n
There must be an even number of real zeros and poles to the right of s, if
s is to belong to the root locus.
Because adding 2 to an odd number results in an odd number, and adding 2 to
an even number results in an even number, the total number of zeros and poles
can be considered; pairs of complex conjugates change nothing just the same.
We have shown when s may belong to the root locus because the phase
condition of (16.51) is fullled. But, if the phase condition is fullled, the gain
condition of (16.51) is fullled making
|D(s)|
|K| = (16.59)
|N (s)|
which is always possible as long as N (s) 6= 0.
Theorem 16.3. The number of poles of the closed loop is the number of poles
of the open loop n.
Proof. Since we assumed that m ≤ n, and K is a scalar, the polynomial in the
left member of (16.49) is of order n.
Theorem 16.4. When K → 0, the poles of the closed loop converge to the
poles of the open loop, i.e. the roots of D(s).
Proof. When K → 0, (16.49) becomes D(s) = 0.
Theorem 16.5. When K → ±∞, m closed loop poles converge to the zeros
of the open loop, i.e. the roots of N (s), and n − m closed loop poles diverge to
innity.
16.3. PROOFS OF RULES FOR THE ROOT LOCUS 297
Figure 16.9: Diagrams to illustrate the proof of Theorem 16.2. Left: s has all
the open loop zeros and poles to its left. Right: some open loop zeros and poles
are on the right side of s, some on the left.
Since |K| → +∞, the right member is diverging to innity. The only way the
left member is also diverging to innity is |s| → +∞. (Notice that s is complex
and may be diverging to innity in any direction.)
Theorem 16.6. The n − m closed loop poles diverging to innity have asymp-
totes making with the positive real axis angles given by
π(2k + 1) Kbm
n − m , if a > 0
n
(16.61)
if Kb
2kπ ,
m
n−m an < 0
Proof. Since |s| ← ∞,
If Kbm
an > 0, its contribution for the phase is 0, and we get
π + 2kπ π(2k + 1)
∠s = − = , k∈Z (16.64)
n−m n−m
298 CHAPTER 16. ROOT LOCUS
If Kbm
an < 0, its contribution for the phase is π , and we get instead
2kπ 2kπ
∠s = − = , k∈Z (16.65)
n−m n−m
Theorem 16.7. The branches of the root locus converge or diverge on the real
axis at the real roots of
d (s − p1 ) . . . (s − pn )
=0 (16.66)
ds (s − z1 ) . . . (z − zm )
Proof. When the branches converge or diverge, the real point s where they do
so will correspond to either a maximum or a minimum value of K on the real
axis. Indeed, if we move along the real axis with K increasing, and reach a
point of divergence s, then K will increase along branches that are no longer
real, and to the other side of s gain K will now decrease. And, if we move along
the real axis with K decreasing, and reach a point of convergence s, then K will
decrease along branches that are no longer real, and to the other side of s gain
K will now increase. This is clear by looking at any root locus diagram where
such points exist.
Consequently, if K has a local maximum or minimum for a certain real point
ds = 0. Using (16.50),
s, then dK
D(s)
K=− ⇒
N (s)
dK d D(s) d D(s)
= − = =0 (16.67)
ds ds N (s) ds N (s)
Theorem 16.8. Rules 11 and 12 from Table 16.2 hold.
Proof. Let s be a point of the root locus in the vicinity of pole pi , i.e. we make
s → pi . We take the limit of the phase condition of (16.51)
K bm (s − z1 ) . . . (s − zm )
lim ∠ = π + 2kπ, k ∈ Z (16.68)
s→pi an (s − p1 ) . . . (s − pn )
which becomes (dropping the 2kπ periodicity)
either 0 or ±π
z }| { ∠[pi −z1 ]=ψ1 ∠[pi −zm ]=ψm
Kbm z }| { z }| {
∠ + lim ∠[s − z1 ] + . . . + lim ∠[s − zm ]
an s→pi s→pi
nd from the specications the zones of the complex plane where the closed
loop poles must lie;
nd for which values of gain the root locus is inside such zones. If there are
no values of the gain that put all the closed poles in those zones, another
controller is necessary.
We know from Section 11.6 that the poles are not the only thing that determines
the time response of a system, but reasonable approximations can be found in
this way if there is a dominant real pole s = −a, or a pair of complex conjugate
dominant poles
s = −a ± jb
p
= −ξωn ± jωn 1 − ξ 2 (16.72)
p
|s| = ξ 2 ωn2 + ωn2 (1 − ξ 2 ) = ωn
⇒ (16.73)
p p
2 2
∠s = arctan ±ωn 1 − ξ = arctan ± 1 − ξ
−ξωn −ξ
(remember (11.43)(11.44)).
Recall from Sections 11.2 and 11.3 that, in either case, Zones of C for a given set-
tling time
2.3 2.3
the 10% settling time is ts,10% = ⇔ −a = − ;
a ts,10%
3 3
the 5% settling time is ts,5% = ⇔ −a = − ;
a ts,5%
4 4
the 2% settling time is ts,2% = ⇔ −a = − ;
a ts,2%
4.6 4.6
the 1% settling time is ts,1% = ⇔ −a = − .
a ts,1%
Suppose that a maximum value for the settling time is required. This settling
time will correpond to poles on a vertical straight line with real part −a found
from the relations above. The dominant poles can be on this line, or, better
still, somewhat to its left, in which case they will be faster. See Figure 16.11.
Also recall that: Zones of C for a maximum
value of Mp
if there is a dominant real pole (i.e. without imaginary part), there is no
overshoot;
Figure 16.11: Left: zone of the complex plane where dominant poles must be,
given a real part −a found from a maximum settling time ts specication. Right:
zone of the complex plane where the dominant poles must be, given a maximum
overshoot Mp that is not to be exceeded.
ξπ
⇒p = − log Mp
1 − ξ2
⇒ ξ 2 π 2 = (log Mp )2 (1 − ξ 2 )
⇒ ξ2 π 2 + (log Mp )2 = (log Mp )2
(log Mp )2
⇒ ξ2 = (16.74)
π2 + (log Mp )2
Of the two possible values of the square root, one is positive and the other
is negative. Usually the maximum overshoot is smaller than 100%, i.e.
than 1; thus, it is with the minus sign that we get a positive value for the
damping coecient ξ :
− log Mp
ξ=p (16.75)
π 2 + (log Mp )2
So, if one of the specications is that a certain value of the maximum over-
shoot cannot be exceeded, (16.75) is used to nd the minimum admissible
damping factor (ξ can be higher, since larger damping factor correspond
to more damped oscillations, i.e. with smaller amplitudes). From (16.73),
we know that ξ has no eect on the magnitude of the poles, and suces
to nd their phase. Replacing (16.74) and (16.75) in (16.73),
s
(log Mp )2
± 1− 2
π + (log Mp )2
∠s = arctan
− log Mp
−p
π 2 + (log Mp )2
s
π2
±
π 2 + (log Mp )2
= arctan
log Mp
p
π + (log Mp )2
2
π
= arctan ± (16.76)
log Mp
Since the poles are stable, these angles are in the second ( π2 ≤ ∠s ≤ π )
and third quadrants (−π ≤ ∠s ≤ − π2 ). Poles closer to the real axis,
where there are no oscillations, will have lower values of the maximum
overshoot (the imaginary parts of the poles are smaller; remember from
16.4. FINDING DESIRED POLES FROM SPECIFICATIONS 301
Figure 16.12: Left: zone of C where dominant poles must be in Example 16.6.
Right: root locus of C(s)G(s).
Section 11.6 that the imaginary parts of the poles are what originate the
oscillations). Thus, a specication for the largest admissible value of Mp
translates into a sector of the complex plane around the negative real axis.
See Figure 16.11.
Of course, if there is no clearly dominant pole or pair of complex conjugate
poles, the approximations above for the desired locations of poles will be poor.
Example 16.6. Plant G(s) = s2 +s+1 will be controlled
10
in closed loop by a PID
controller given by C(s) = Kp 1 + 5s + 20
s
. We want
a maximum overshoot of 5% or less;
Remark 16.2. In the Example above, as we do not know what type of system
G(s) is (mechanical, thermal, etc.), and what actuator is being used, we can
form no idea about whether the control action is reasonably small, or too large.
We also do not know if the actuator bandwidth required to implement this
control action is feasible. In real life, it is important to know what system is
being controlled, so that these matters can be decided.
Matlab includes the app controlSystemDesigner (called sisotool in
older versions) to assist the design of closed loop controllers for SISO plants.
Among other functionalities, this app lets us select a plant and change the open
loop gain in its root locus diagram, showing interactively how the closed loop
step response will be in each case. See Figure 16.14.
302 CHAPTER 16. ROOT LOCUS
Figure 16.13: Behaviour of the closed loop control system from Example 16.6.
Glossary
And Eliacim, and Sobna, and Ioahe sayd to Rabsaces: Speake to
thy seruants in the Syrian tongue: for we vnderstand it: speake not
to vs in the Iewes language in the eares of the people, that is vpon
the wal. And Rabsaces sayd to them: Why, did my lord send me to
thy lord and to thee, to speake al these wordes; and not rather to
the men, that sitte on the wal (. . . )?
Isaiah ben Amoz (attrib.; 8th7th c. BC), Isaiah, xxxvi 1112, Douay-Rheims
version (1610)
branch ramo
characteristic equation equação característica
root locus lugar geométrico das raízes (LGR)
Exercises
1. Consider the plants with the following open-loop transfer functions. Admit
both cases K > 0 and K < 0. Plot their root-locus, determining all
the relevant points, the asymptotes, the departure and arrival angles, the
values of K ensuring stability (resorting to the Routh-Hurwitz criterion as
needed), and the points where the root locus crosses the imaginary axis.
1
(a) G1 (s) =
s + 10
1
(b) G2 (s) =
s − 10
s + 30
(c) G3 (s) =
s + 10
s + 10
(d) G4 (s) =
s + 30
16.4. FINDING DESIRED POLES FROM SPECIFICATIONS 303
1
(e) G5 (s) =
(s + 10)(s + 30)
1
(f) G6 (s) =
(s + 10)(s − 30)
1
(g) G7 (s) =
(s − 10)(s + 30)
1
(h) G8 (s) =
(s − 10)(s − 30)
s + 20
(i) G9 (s) =
(s + 10)(s + 30)
1
(j) G10 (s) =
(s + 10)(s + 20)(s + 30)
1
(k) G11 (s) = 2
s + 20s + 200
s + 20
(l) G12 (s) = 2
s + 20s + 200
2. Consider the plants with the following open-loop transfer functions. Admit
both cases K > 0 and K < 0. Plot their root-locus, determining all
the relevant points, the asymptotes, the departure and arrival angles, the
values of K ensuring stability (resorting to the Routh-Hurwitz criterion as
needed), and the points where the root locus crosses the imaginary axis.
(s + 1)
(a) G1 (s) =
s2 (s + 2)
(s − 2)
(b) G2 (s) =
s2 (s + 1) (s + 3)
1
(c) G3 (s) =
s (s2 + 0.2s + 1)
(s + 1)
(d) G4 (s) =
s (s2 + 3s + 9)
1
(e) G5 (s) = 3
s (s + 1)
s2 + 2, 8s + 4
(f) G6 (s) =
s (s + 3) (s2 + 2s + 4)
(s + 1)
(g) G7 (s) =
s2 (s + 3) (s + 4)
(s + 1)
(h) G8 (s) =
s2 (s + 10)
(s + 2)
(i) G9 (s) =
s (s2 + 2s + 2)
(−10s + 40)
(j) G10 (s) =
s(s2 + 40s + 1025)
3. Find the zones of the complex plane corresponding to the following spec-
ications:
100
(c) G(s) = , settling time under 50 s, overshoot under
s2 + 100s + 2600
1%.
5. The plant with the root locus in Figure 16.15 will be controlled in closed
loop with a proportional controller K .
The Nyquist criterion is another tool that, just like the root locus, can be
used
to design the gain of a controller that has poles and zeros, once these are
known,
to see what happens to a closed loop control system with a known con-
troller, when the gain of the plant changes for some reason.
This criterion is better visualised in the Nyquist diagram, and to study the
Nyquist diagram it is convenient to study the polar diagram rst.
the gain |G(jω)| (in absolute value, not in dB) is its distance to the origin,
for low frequencies, lim G(jω) = 1, and so the polar diagram begins at Where the polar plot begins
ω→0+
1;
for high frequencies, lim G(jω) = 0, and so the polar diagram ends at Where the polar plot ends
ω→+∞
the origin;
for high frequencies, lim ∠G(jω) = −90◦ , and so the polar diagram
ω→+∞
approaches the origin from below, tangent to the imaginary axis, where
the phase is −90◦ , remaining always to the right of the imaginary axis
because the phase is never below −90◦ .
305
306 CHAPTER 17. THE NYQUIST STABILITY CRITERION
Figure 17.1: Bode diagram and polar plot for G(s) = s+1 .
1
Figure 17.2: Bode diagram and polar plot for G(s) = s2 +0.6s+1 .
1
for low frequencies, lim G(jω) = 1, and so the polar diagram begins at
ω→0+
1;
for high frequencies, lim G(jω) = 0, and so the polar diagram ends at
ω→+∞
the origin;
√
because ξ = 0.3 < 2 ,
there is a resonance peak, and thus the gain is
2
for high frequencies, lim ∠G(jω) = −180◦ , and so the polar diagram
ω→+∞
approaches the origin from the left, tangent to the real axis, where the
phase is −180◦ , remaining always below the real axis because the phase is
never below −180◦ .
Because lim ∠G(jω) = −90◦ , the polar diagram begins vertically, from
ω→0+
below. These points are in the third quadrant, and have phases between
−180◦ and −90◦ . For arbitrarily large distances from the origin, the real
part is neglectable, and the imaginary part very large; thus, the phases
approach −90◦ .
Figure 17.3: Bode diagram and polar plot for G(s) = s(s+1) .
1
1
G(jω) =
jω(jω + 1)
1
=
−ω 2 + jω
−ω 2 − jω
=
(−ω + jω)(−ω 2 − jω)
2
−ω 2 − jω −1 −1
= 4 = 2 +j 3 (17.1)
ω + ω2 ω +1 ω +ω
−1
lim <[G(jω)] = lim+ 2 = −1 (17.2)
ω→0+ ω→0 ω + 1
−j
lim+ =[G(jω)] = lim+ 3 = −j∞ (17.3)
ω→0 ω→0 ω + ω
First notice that the curve showing the frequency response in the polar
diagram can be seen as the positive imaginary axis j×]0, +∞[ transformed by
the complex-valued function of complex value G(s). We say that the frequency
Mapping response curve is a mapping of the positive imaginary axis, using function
G(s).
G(−jω) = G(jω) Theorem 17.1. The complex conjugate of the frequency response G(jω) is the
mapping of the negative imaginary axis, G(−jω), ω > 0.
N (s)
Proof. Let G(s) = D(s) . Then
N (jω)
G(jω) =
D(jω)
N (jω) D(jω)
= (17.4)
D(jω) D(jω)
| {z }
∈ R
the term on jω ,
the term on (jω)3 = −jω 3 ,
the term on (jω)5 = jω 5 ,
=[G(jω)] is odd and so on, i.e. the terms on odd powers of jω . Thus, =[N (jω) D(jω)] is
an odd function of ω , and so is =[G(jω)]. That is to say, =[G(jω)] =
−=[G(−jω)].
Consequently,
As a result, given a transfer function G(s), its polar plot plus its complex
conjugate are the mapping, using G(s), of j] − ∞, 0[∪j]0, +∞[. In fact we can
throw in the origin too, and map the entire imaginary axis jω, ω ∈] − ∞, +∞[,
since we are assuming no poles on the imaginary axis: this means that D(jω) 6= 0
whatever the value of ω (including ω = 0), and so G(0) = N (0)
D(0) is nite.
The Nyquist diagram is dened as the mapping, not of the imaginary axis
alone, but of a contour in C.
Contour in C Denition 17.1. A contour is a closed curve in C, oriented clockwise or
counter-clockwise, such that:
there is only a nite number of points of the curve where it is not dier-
entiable;
the curve can be completely traversed without passing twice by any point
(this precludes closed curves that cross themselves, for instance).
Denition 17.2. The Nyquist diagram of a transfer function G(s) that has
no poles on the imaginary axis is the mapping, using G(s), of the Nyquist
Nyquist contour contour, or Nyquist path, that consists of
17.3. THE NYQUIST CRITERION 309
Figure 17.5: The Nyquist contour (blue) in the complex plane. This contour is
mapped in a Nyquist diagram, when G(s) has no poles on the imaginary axis.
a semi-circle s = rejθ , θ ∈ [− π2 , + π2 ],
since n > m.
If n = m, the semi-circle of innite radius is mapped to a point other than
the origin. In fact,
bn sn + . . . + b0 bn
lim G(s) = lim n
= (17.7)
|s|→+∞ |s|→+∞ an s + . . . + a0 an
In Figure 17.7, bottom, a dierent contour is used with the same transfer
function as above, showing that changing the shape of the contour is
irrelevant for the result. The number of encirclements, is, as expected, the
same: twice, clockwise.
The plots of Figure 17.6, top, can be drawn with the following code. The next
cases are similar.
s1 = 1+1i*(-1:0.01:1);
s2 = 1i+(1:-0.01:-1);
s3 = -1+1i*(1:-0.0025:-1);
s4 = -1i+(-1:0.01:1);
G = @(s) 1./(s+2);
% transfer function defined as a function handle for complex variables
figure, plot(real(s1),imag(s1), real(s2),imag(s2),...
real(s3),imag(s3), real(s4),imag(s4), -2,0,'x')
axis([-2 2 -2 2]), xlabel('Real axis'), ylabel('Imaginary axis')
title('1/(s+2)')
figure, plot(real(G(s1)),imag(G(s1)), real(G(s2)),imag(G(s2)),...
real(G(s3)),imag(G(s3)), real(G(s4)),imag(G(s4)), 0,0,'+')
axis([-0.5 1.5 -1 1]), xlabel('Real axis'), ylabel('Imaginary axis')
title('1/(s+2)')
The plots of Figure 17.7, bottom, use the contour
sr = 1.5*exp(1i*(-pi:pi/100:pi));
Since G(s) is linear, f (s) is also linear. So, given a contour C , its mapping
by f (s) will be f (C ) = 1 + G(C ), i.e. the mapping by G(s) shifted to the
right by 1. Thus, the number of enrolments of f (C ) around the origin N
is also the number of enrolments of G(C ) around −1. And the mapping
G(C ) is the Nyquist plot of G(s).
17.3. THE NYQUIST CRITERION 311
Figure 17.6: Example 17.5 illustrates Theorem 17.2. Left: complex contour and
the zeros and poles of a transfer function. Right: the contour mapped by the
the transfer function (the origin is marked with a cross). Bottom right gure:
the two leftmost curves are coincident; the outside curve was enlarged to show
more clearly the shape of the mapped contour. Continues in Figure 17.7.
312 CHAPTER 17. THE NYQUIST STABILITY CRITERION
Figure 17.7: Figure 17.6 continued. Example 17.5 illustrates Theorem 17.2.
Left: complex contour and the zeros and poles of a transfer function. Right:
the contour mapped by the the transfer function (the origin is marked with a
cross).
Figure 17.8: Top: block diagram for the Nyquist criterion. Bottom: block
diagram for the Nyquist criterion, with a variable open loop gain K .
17.3. THE NYQUIST CRITERION 313
Figure 17.9: Nyquist diagram of model (17.8) of a boost converter, from Exam-
ple 17.6.
Z is the number of zeros of f (s) inside C . Since the Nyquist path covers
the entire right half of the complex plane, Z is the number of roots of
f (s) such that s > 0. The roots of f (s) are the roots of the closed loop
characteristic equation, i.e. the unstable poles of the closed loop.
N (s)
P is the number of poles of f (s) = 1 + G(s) = 1 + = N (s)+D(s)
D(s) D(s) inside
C . Since the Nyquist path covers the entire right half of the complex
plane, the poles of f (s) are the roots of D(s) such that s > 0, i.e. the
unstable poles of G(s).
−∞ −472 0 472 +∞
R
1
−K ∈ ] − ∞, −472[ ] − 472, 0[ ]0, 472[ ]472, +∞[
K∈ ]0, 0.0021[ ]0.0021, +∞[ ] − ∞, −0.0021[ ] − 0.0021, 0[
N 0 2 1 0
P 0 0 0 0
Z 0 2 1 0
(17.9)
From the table it is clear that there will be no closed loop unstable poles (P = 0)
if −0.0021 < K < 0 or if 0 < K < 0.0021. So the open loop will be stable for
314 CHAPTER 17. THE NYQUIST STABILITY CRITERION
−0.0021 < K < 0.0021. (We can add K = 0 to the interval since there will be
no feedback and the output will be always zero. Control will be a failure, but
the output is stable.)
What Nyquist diagram Remark 17.3. Remember that if, instead of the cases of Figure ??, the control
should be plot loop is dierent, the characteristic equation is not the same. Thus:
in case (b) of Figure 16.1, when a plant G(s) is controlled in closed loop
by a controller KC(s) with variable gain K , we must nd the Nyquist
diagram of C(s)G(s);
in case (c) of Figure 16.1, when a plant KG(s) with variable gain K is
controlled in closed loop by a controller C(s), we must nd the Nyquist
diagram of C(s)G(s);
in the case of Figure 16.10, when a plant G(s) is controlled in closed loop
by a proportional controller K , and there is in the feedback branch a
sensor H(s), we must nd the Nyquist diagram of G(s)H(s).
Figure 17.11: The Nyquist contour (blue) in the complex plane, when there are
poles on the imaginary axis.
as Matlab plots them, and then with the curves at innity added. The same
Figure shows the mapping of two approximations of the Nyquist path: one with
r = 10, r0 = 10
1
, and another with r = 100, r0 = 100
1
, which is of course a better
approximation of the Nyquist diagram. The rst approximation already shows
where the curves at innity will be; the second is quite clear.
To know without numerical calculations whether a curve in the Nyquist plot Finding curves at innity
caused by a pole at the origin turns clockwise or counter-clockwise, it suces
to see what happens with the only real point of the vanishing semi-circle of the
Nyquist path, → 0+ . See Figure 17.13.
Thus:
The Nyquist diagram of G1 (s) will have a curve at innity on the right
side of the complex plane; we might, with some abuse of terminology, say
that the curve passes through +∞.
The Nyquist diagrams of G2 (s) and G3 (s) will have curves at innity on
the left side of the complex plane; we might, with some abuse of terminol-
ogy, say that in each diagram the curve passes through −∞.
Notice that multiple poles at the origin result in an increasingly large curve Multiple poles at the origin
at innity:
Figure 17.13: The Nyquist contour (blue) in the complex plane, when there is
a pole at the origin, evidencing the only vanishing real point → 0+ .
17.4. THE NYQUIST DIAGRAM WHEN THERE ARE POLES ON THE IMAGINARY AXIS 317
Example 17.10. Figure 17.14 shows fairly good approximations of the Nyquist
plots of
s + 0.1
G1 (s) = (17.17)
s(s + 1)
s + 0.1
G2 (s) = 2 (17.18)
s (s + 1)
s + 0.1
G3 (s) = 3 (17.19)
s (s + 1)
obtained mapping the Nyquist path from Figure 17.12, bottom left (r = 100
and r0 = 100
1
).
Glossary
Oltre la porta si scopre un sepolcro a sette lati e sette angoli, illu-
minato prodigiosamente da un sole articiale. Nel mezzo, un altare
rotondo, ornato da vari motti o emblemi, del tipo nequaquam
vacuum. . .
contour contorno
curve at innity curva no innito
encirclement enrolamento
mapping mapeamento
318 CHAPTER 17. THE NYQUIST STABILITY CRITERION
Exercises
1. Figure 17.15 shows the polar plot of a plant.
(a) What is the type of the plant?
(b) How many poles and zeros does the plant have?
2. Figure 17.16 shows the polar diagram of the second-order plant
ωn2
G(s) = , (17.20)
s2 + 2ζωn s + ωn2
Stability margins
In eo umine pons erat. Ibi præsidium ponit et in altera parte
uminis Q. Titurium Sabinum legatum cum sex cohortibus relinquit;
castra in altitudinem pedum XII vallo fossaque duodeviginti pedum
muniri iubet.
Stability margins are another tool that, just like the root locus, can be used
to design the gain of a controller that has poles and zeros, once these are
known,
to see what happens to a closed loop control system with a known con-
troller, when the gain of the plant changes for some reason.
|N (s)|
K
=1
N (s) N (s) |D(s)|
1+K =0⇒K = −1 ⇒
D(s) D(s) ∠ K N (s) = π + 2kπ, k ∈ Z
D(s)
(18.1)
(where we made |K| = K because K > 0) and we know that marginally stable
poles are on the imaginary axis: s = jω, ω ∈ R. Thus, marginally stable closed
loop poles verify
|N (jω)|
K =1
|D(jω)|
⇔ 20 log10 K + 20 log10 |G(jω)| = 0 dB (18.2)
| {z } | {z }
K in dB gain in dB at frequency ω
and
N (jω)
∠ K = π + 2kπ
D(jω)
⇔ |{z}
∠K +∠G(jω) = π + 2kπ, k ∈ Z
0 rad
| {z }
. . . , 3π, π, −π, −3π, . . .
321
322 CHAPTER 18. STABILITY MARGINS
Figure 18.1: Top left: root locus of G1 (s) = s3 +10s21+40s+80 ; top right: Bode
diagram of s3 +10s320
2 +40s+80 ; a closed loop with controller K = 320 and plant
The phase margin is measured at a gain crossover frequency ωg , and is Phase margin (PM)
given by
Always remember that we nd the GM and PM of the open loop to learn about GM and PM of the open
the stability of the closed loop. In the next section, we will see that they hold loop determine closed loop
also when K and closed loop stability are related otherwise; we will only obtain stability
a formal proof in Chapter 17.
Remark 18.1. Remember that if, instead of case (a) of Figure 16.1, the control
loop is dierent, the characteristic equation is not the same. Thus:
in case (b) of Figure 16.1, when a plant G(s) is controlled in closed loop
by a controller KC(s) with variable gain K , we must nd the stability
margins of C(s)G(s);
in case (c) of Figure 16.1, when a plant KG(s) with variable gain K is
controlled in closed loop by a controller C(s), we must nd the stability
margins of C(s)G(s);
in the case of Figure 16.10, when a plant G(s) is controlled in closed loop
by a proportional controller K , and there is in the feedback branch a
sensor H(s), we must nd the stability margins of G(s)H(s).
Example 18.1. We want to control plant G(s) = 10
s(s+10)2 with a proportional
controller C(s) = 10. Will the closed loop be stable?
Writing the open loop as
1 10 10 100
C(s)G(s) = (18.7)
s s + 10 s + 10 10 × 10
| {z } | {z }
cut-o at 10 rad/s 1
we can easily plot the asymptotic Bode diagram in Figure 18.3, and see that:
there is one gain crossover frequency at ωgc = 1 rad/s;
at frequency ωgc , the phase of C(s)G(s) is close to −90◦ , per the asymp-
totes;
consequently the phase margin is PM = −90◦ + 180◦ = 90◦ ;
Figure 18.2: Gain margin and phase margin. Top: both margins are positive.
Bottom: both margins are negative. (The gain and phase margin can have
opposite signs.)
at frequency ωpc , the gain of C(s)G(s) is −20 dB, per the asymptotes;
remembering (11.90), we see that the gain value is in fact |C(jωgc )G(jωgc )| =
−20 − 3 − 3 = −26 dB, as shown in Figure 18.3;
consequently the gain margin is PM = 26 dB.
The easiest way of nding stability margins in Matlab is using function Matlab function margin
margin, which is similar to function bode.
Example 18.2. The margins of Example 18.1 are found as
>> s=tf('s'); figure, margin(10*10/(s*(s+10)^2))
and we obtain Figure 18.4. Function margin can also return the margins, if
used with output arguments.
Example 18.3. Since the gain margin of the last two examples is 26 dB, or,
in absolute value, 1026/20 = 19.95, we could still increase the gain up to 19.95
times, and the closed loop would still be stable. This is clear from the Bode
diagram in Figure 18.4: if the gain goes up less than 26 dB, we still have GM > 0
and PM > 0.
With controller C(s) = 10 × 19.95 = 199.5, the loop would be marginally
stable.
Glossary
Então duvida que se falasse latim?perguntou Henrique, sor-
rindo.
Eu duvido. Não sei como os homens se podessem entender com
aquella endiabrada contradança de palavras, com aquella desa-
nação que faz dar volta ao juizo de uma pessoa. Sabe o senhor o que
é uma casa desarranjada, onde ninguem se lembra onde tem as suas
326 CHAPTER 18. STABILITY MARGINS
Exercises
1. The distance d travelled by a robot controlled with a variable voltage
d(s) 1
u is given by G (s) = = 2 . This plant is controlled with a
u(s) s (s + 1)
proportional controller K . Find the gain K for which the phase margin
of the controlled loop is P M = 60◦ .
2. Plot the asymptotes of the Bode diagrams of the plants with the open-loop
transfer functions given below. Mark the gain and phase margins in your
plots. What can you say about the stability of the plants?
s2
(a) G1 (s) =
(s + 0.5) (s + 10)
10s
(b) G2 (s) =
(s + 10) (s2 + s + 2)
(s + 4) (s + 20)
(c) G3 (s) =
(s + 10) (s + 80)
3. Find the stability margins of the following plants, and take conclusions
about whether or not they are stable in closed loop:
2(s + 3)
(a) G1 (s) =
s(s + 1)(s + 2)
5(s + 2)
(b) G2 (s) =
(s + 1)(s2 + 2s + 4)
1
(c) G3 (s) =
s(s + 1)2
Chapter 19
Glossary
And the Galaadites tooke the fordes of Iordan, by the which Ephraim
was to returne. And when there had come to the same one of the
number of Ephraim, eeing, and had said: I besech you let me passe:
The Galaadites said to him: Art thou not an Ephraite? Who saying:
I am not: they asked him: Say then Schibboleth, which is interpreted
an Eare of corne. Who answered, Sibboleth, not being able by the
same letter to expresse, an eare of corne. And immediatly being
apprehended they killed him in the very passage of Iordan.
327
328 CHAPTER 19. THE NICHOLS DIAGRAM
Exercises
1. Plot the Nichols diagram of the plant in Exercise 3 from Chapter 18.
4. Prove that the M and N curves are circles in the Nyquist diagram. Follow
the following steps.
X2 + Y 2
|F (jω)|2 = (19.1)
(1 + X)2 + Y 2
Steady-state errors
Einer der Männer feuerte auf sie. Der hellblaue Lichtblitz verfehlte
sie um mehrere Meter und schlug eine Stichamme aus der Wand,
und Katt begann Haken zu schlagen und sich auf fast noch un-
möglichere Weise zu bewegen. Der nächste Schuss verfehlte sie noch
mehr, aber nun eröneten auch die anderen Männer das Feuer, und
Anders hatte ja bereits gesehen, was für ausgezeichnete Schützen sie
waren.
Glossary
At the next peg the Queen turned again, and this time she said,
Speak in French when you can't think of the English for a thing
turn out your toes as you walkand remember who you are!
329
330 CHAPTER 20. STEADY-STATE ERRORS
Exercises
1. Consider a unit feedback control system with transfer function in the direct
loop
s+2
G(s) = 10 . (20.1)
(s + 3)(s + 5)
For a unit step input signal u(t) = 1, t ≥ 0, what is the steady-state error
ess of the time response?
Y (s) 8
G(s) = = . (20.2)
E(s) (s + 2)(s + 4)
3. Consider a system with transfer function Y (s)/U (s) = G(s). The output
time response y(t) in closed loop for a step input in the reference r(t) = 10,
t ≥ 0, exhibits the steady-state error ess = 1 shown in Figure 20.1. For
m ≤ n, which of the following statements is true?
1 + b1 s + · · · + bm sm
A) G (s) = 10
1 + a1 s + · · · + an sn
1 + b1 s + · · · + bm sm
B) G (s) = 9
1 + a1 s + · · · + an sn
1 + b1 s + · · · + bm sm
C) G (s) = 10
s (1 + a1 s + · · · + an sn )
1 + b1 s + · · · + bm sm
D) G (s) = 9 .
s (1 + a1 s + · · · + an sn )
331
Figure 20.3: Step response of the model of a pen in a plotter printer from
Exercise 4.
4. Figure 20.2 shows a block diagram that models the pen in a plotter and
the corresponding control system, and Figure 20.3 shows its unit-step
response.
(a) Find from the step-response the system's damping coecient ξ and
natural frequency ωn .
(b) We want to improve the time response y(t), so as to have an overshoot
Mp ≤ 5% and a 2% settling time ts < 0.1 s. Find, if possible, a value
of gain K for these specications.
In this paper, the three principal control eects found in present con-
trollers are examined and practical names and units of measurement
are proposed for each eect. (. . . ) Formulas are given which enable
the controller settings to be determined from the experimental or
calculated values of the lag and unit reaction rate of the process to
be controlled. These units form the basis of a quick method for ad-
justing a controller on the job. The eect of varying each controller
setting is shown in a series of chart records. It is believed that the
conceptions of control presented in this paper will be of assistance in
the adjustment of existing controller applications and in the design
of new installations.
In this chapter we address design methods for controllers of the PID family.
A generic PID controller corresponds to a transfer function usually written in
one of three ways:
I
C(s) = P + + Ds (21.1)
s
1
C(s) = kp 1 + + Td s (21.2)
Ti s
1
C(s) = KP 1 + (1 + TD s) (21.3)
TI s | {z }
| {z } derivative part
integral part
(21.1) is the same as (15.31), but this notation avoids confusions with (21.2)
and (21.3). It is of course possible to rewrite a PID given in one of these three
forms in either of the other two (see Exercise 1).
333
334 CHAPTER 21. DESIGN OF PID CONTROLLERS
Glossary
Nay, ye shall know the truth. Já que vos perdoei, porque sois
We come from another world, ignorantes, condescendo tambem
though we are men such as ye; em vos dizer quem somos. So-
we come, I went on, from the mos Espiritos! Vivemos além,
biggest star that shines at night. por cima das nuvens, n'uma
Oh! oh! groaned the chorus of d'aquellas estrellas que vós vêdes
astonished aborigines. de noite brilhar. E viemos visi-
tar esta terra, mas em paz e para
Yes, I went on, we do, indeed;
alegria de todos!
and again I smiled benignly, as
I uttered that amazing lie. We Entre os indigenas correram
come to stay with you a little grandes ah! ah! Lentos e mara-
while, and to bless you by our vilhados.
sojourn. Ye will see, O friends, Eu prosegui, mais grave:
that I have prepared myself for
this visit by the learning of your Nós conhecemos todos os reis
language. e todas as gentes. E eu, que sou
It is so, it is so, said the chorus. a voz dos outros, conheço todas
as linguas.
Only, my lord, put in the old
gentleman, thou hast learnt it A nossa bem mal! Arriscou
very badly. com timidez o velho guerreiro.
I cast an indignant glance at him, Dardejei-lhe um olhar chamme-
and he quailed. jante que o estarreceu.
H. Rider Haggard (1856 1925), King Solomon's mines, VII (transl. Eça
de Queiroz (1845 1900), As minas de Salomão, V)
Exercises
1. Show that:
P = kp (21.4)
kp
I= (21.5)
Ti
D = kp Td (21.6)
kp = P (21.10)
P
Ti = (21.11)
I
D
Td = (21.12)
P
336 CHAPTER 21. DESIGN OF PID CONTROLLERS
or in alternative
q
1− 1 − 4 TTdi
KP = kp (21.25)
q2
1 − 1 − 4 TTdi
TI = Ti (21.26)
2
2
TD = Td q (21.27)
1 − 1 − 4 TTdi
− 21 s + 1
2. Find a PI controller and a PID controller for plant G(s) = ,
s2 + s + 31
using the open-loop (reaction curve) Ziegler-Nichols method.
10
3. Find a PID controller for plant G (s) = 2, using the closed-loop
s (s + 1)
(critical gain) Ziegler-Nichols method.
4. Consider the multirotor drone in Figure 21.1. The four rotors exert an
upwards force F , due to which the drone hovers at height h, with a vertical
velocity w = ḣ. The system can be represented by the block diagram in
the same Figure and will be controlled in closed loop aiming at
a 2% settling time of 1 second or less,
a maximum overshoot of 4.3% or less, and
no steady-state error for a constant height reference.
337
Figure 21.1: Left: multirotor drone; centre: block diagram with the control
system of the drone.
1
(h) G8 (s) =
(s + 1)(1 + 0.5s)(1 + 0.52 s)(1 + 0.53 s)
1 − 0.1s
(i) G9 (s) =
(s + 1)3
1 − 0.2s
(j) G10 (s) =
(s + 1)3
1 − 0.5s
(k) G11 (s) =
(s + 1)3
1−s
(l) G12 (s) =
(s + 1)3
1 − 2s
(m) G13 (s) =
(s + 1)3
1 − 5s
(n) G14 (s) =
(s + 1)3
7. Find PID controllers for the following plants:
100 1 0.5
(a) G15 (s) = +
(s + 10)2 s + 1 s + 0.05
(s + 6)2
(b) G16 (s) =
s(s + 1)2 (s + 36)
1
(c) G17 (s) = 2
(s + 1)(s + 0.2s + 1)
22
(d) G18 (s) =
(s + 1)(s2 + 0.2 × 2s + 22 )
52
(e) G19 (s) =
(s + 1)(s2 + 0.2 × 5s + 52 )
102
(f) G20 (s) =
(s + 1)(s2 + 0.2 × 10s + 102 )
1
(g) G21 (s) = 2
s −1
1
(h) G22 (s) =
s(s + 1)
1
(i) G23 (s) =
s(s + 1)2
1
(j) G24 (s) =
s(s + 1)3
1
(k) G25 (s) =
s(s + 1)4
1
(l) G26 (s) =
s(s + 1)8
1
(m) G27 (s) =
s(s + 1)(1 + 0.1s)(1 + 0.12 s)(1 + 0.13 s)
1
(n) G28 (s) =
s(s + 1)(1 + 0.2s)(1 + 0.22 s)(1 + 0.23 s)
1
(o) G29 (s) =
s(s + 1)(1 + 0.5s)(1 + 0.52 s)(1 + 0.53 s)
1 − 0.1s
(p) G30 (s) =
s(s + 1)3
1 − 0.2s
(q) G31 (s) =
s(s + 1)3
1 − 0.5s
(r) G32 (s) =
s(s + 1)3
1−s
(s) G33 (s) =
s(s + 1)3
1 − 2s
(t) G34 (s) =
s(s + 1)3
1 − 5s
(u) G35 (s) =
s(s + 1)3
Chapter 22
Glossary
᾿Ακούσαντες δὲ ὅτι τῇ ῾Εβραΐδι διαλέκτῳ προσεφώνει αὺτοις μᾶλλον
παρέσχον ἡσυχίαν.
Exercises
s+5
1. Consider plant G(s) = .
(s + 0.5)(s2+ 0.6s + 1.09)
(a) Find a lead compensator C(s) for this plant that fullls the following
specications:
The gain margin must be innite.
The phase margin must be P M = 20◦ with a ±10% tolerance.
The steady state error cannot be aected.
339
340 CHAPTER 22. DESIGN OF LEAD-LAG CONTROLLERS
(b) Find a lead compensator C(s) for this plant that puts a pair of poles
at −4 + 10j , and verify the 2%-settling time against the performance
expected.
2. The transfer function relating the voltage applied to the motor u(t) with
Θ(s) 1
the azimuth angle of an antenna θ(t) is G(s) = = ; see
U (s) s(10s + 1)
Figure 22.1. We want
an overshoot to a step in the reference angle of 16% or less;
a 2% settling time of 10 s or less;
no steady-state error for a constant reference.
(a) Find the region of the splane where closed loop poles can lie.
(b) Prove that you cannot fulll all specications using proportional con-
trol only.
(c) Propose a structure for the controller.
(d) Find the parameters of a controller of the lead-lag family and show
that all specications are thereby fullled.
(e) Do the same for a controller of the PID family.
3. Figure 22.2 shows a plane, together with the variation of its height h(t)
in metres when a 1◦ step is applied to angle of the elevators δ(t).
(a) Which of the plots AH in Figure 22.3 corresponds to the root locus
of transfer function H(s)
∆(s) when K > 0?
(b) Which of the plots AH in Figure 22.3 corresponds to the root locus
of transfer function H(s)
∆(s) when K < 0?
(a) Show that not all specications can be satised with a proportional
controller K = 1.
341
Figure 22.2: Airplane from Exercise 3 and the unit step response from its model.
(b) Propose a structure for the controller, nd its parameters, and verify
that specications are fullled.
X(s) 1.6
Gp (s) = = (22.2)
U (s) (s + 1)2
(a) Show that not all specications can be satised with a proportional
controller K = 1.
(b) Propose a structure for the controller, nd its parameters, and verify
that specications are fullled.
342 CHAPTER 22. DESIGN OF LEAD-LAG CONTROLLERS
Figure 22.3: Possible root locus plots for the airplane from Exercise 3.
Chapter 23
343
344 CHAPTER 23. INTERNAL MODEL CONTROL
In this conguration,
E = R − Y − Ŷ
= R − D − GU + G∗ U
= R − D − GG−1 E + G∗ G−1 E (23.1)
−1 ∗ −1
⇒ E 1 + GG − G G =R−D
1 1
⇒E=R −D
(1 + GG−1 − G∗ G−1 ) (1 + GG−1 − G∗ G−1 )
GG−1 GG−1
Y = GG−1 E + D = R −1 ∗ −1
−D +D
1 + GG − G G 1 + GG−1 − G∗ G−1
GG−1 1 − G∗ G−1
=R −1 ∗ −1
+D
1 + GG − G G 1 + GG−1 − G∗ G−1
(23.2)
Notice that if the model is perfect, i.e. if G∗ (s) = G(s), then the error (23.1)
is
E(s) = R(s) − D(s) −G(s)U (s) + G∗ (s)U (s) = R(s) − D(s). (23.3)
| {z }
0
Y (s) = D(s) + G(s)G−1 (s) E(s) = D(s) + R(s) − D(s) = R(s) (23.4)
| {z }
1
In other words, with perfect models, IMC achieves perfect disturbance rejection,
i.e. perfect robustness to disturbances. In practice, models are never perfect,
but IMC often works well enough if models are fairly good.
IMC is suitable when black-box models (direct and inverse) of the plant
are available. If models are transfer functions, then a proper G∗ (s) implies an
inverse model G−1 (s) which is not proper. Consequently, additional poles will
have to be included just as for PIDs and lead-lag controllers. To be more
precise, if G∗ (s) has n poles and m zeros and is strictly proper, then n − m + 1
poles have to be added to G−1 (s) so that it will become strictly proper.
Example 23.1. Consider the following case:
s+2
G(s) = (23.5)
(s2 + 0.18s + 1)(s + 0.1)
s+2
G∗ (s) = 2 (23.6)
(s + 0.2s + 1)(s + 0.1)
102 (s2 + 0.2s + 1)(s + 0.1)
G−1 (s) = (23.7)
(s + 2)(s + 10)2
Notice that:
the dominant pole of the model is −0.1;
the model also has two non-dominant complex conjugate poles with ξ =
0.1 and ωn = 1 rad/s;
we are assuming that the damping coecient ξ of the complex poles was
identied with a 10% error;
23.1. IMC AS A VARIATION OF CLOSED-LOOP CONTROL 345
two poles, one decade above ωn , were added to the inverse model, so that
it will be proper.
The output of the IMC system in Figure 23.1 in this case is shown in Figure 23.2
for a reference consisting of three steps.
−s + 2
G(s) = (23.8)
(s2 + 0.18 ∗ s + 1)(s + 0.1)
2
G∗ (s) = 2 (23.9)
(s + 0.2 ∗ s + 1)(s + 0.1)
103 (s2 + 0.2 ∗ s + 1)(s + 0.1)
G−1 (s) = (23.10)
2(s + 10)3
The dierence from Example 23.1 is that there is a non-minimum phase zero. As
a consequence, there would be an unstable pole in the inverse model. The way
around this is to replace that pole by its steady-state gain; a third additional pole
has to be added for a proper inverse model. And, because this approximation
was used in the inverse model G−1 , it is better to use in G∗ as well, otherwise
results would be worst. The output of the IMC system in Figure 23.1 in this
case is shown in Figure 23.3 for the same reference of Example 23.1. Notice how
the eect of the non-mimimum phase zero which was not properly modelled is
now clearly felt. We will see in Example 23.3 how to improve upon this.
346 CHAPTER 23. INTERNAL MODEL CONTROL
G−1 (s)
C(s) = . (23.11)
1 − G−1 (s)G∗ (s)
−1
G G
= (23.12)
1 − G−1 G∗ + G−1 G
which is the same as (23.2).
Of course, if the inverse model G−1 (s) is the exact inverse of the model G∗ (s)
of the plant, then (23.11) becomes
G−1
C(s) = −1 ∗ (23.13)
1−G
| {zG}
1
| {z }
0
which makes no sense, and at best means that the control action U = CE =
G−1 E
lim should be very large (likely saturating the actuator in practice).
D→0 D
Still, fairly good models may be used with (23.11) resulting in acceptable con-
trollers.
Example 23.3. Plant (23.8) from Example 23.2 can be controlled in closed
loop using (23.11) found from (23.9)(23.9):
103 (s2 +0.2∗s+1)(s+0.1)
2(s+10)3
C(s) = 103 (s2 +0.2∗s+1)(s+0.1) 2
1− 2(s+10)3 (s2 +0.2∗s+1)(s+0.1)
103 (s2 +0.2∗s+1)(s+0.1)
2(s+10)3
= 103
1 − (s+10) 3
3 2
10 (s + 0.2 ∗ s + 1)(s + 0.1)
=
(s + 10)3 − 103
103 (s2 + 0.2 ∗ s + 1)(s + 0.1)
= (23.14)
s3 + 30s2 + 300s
This closed-loop controller actually performs better than the IMC from Exam-
ple 23.2, as you may see simulating both cases with Matlab. This may seem
surprising since we just proved equivalence for the general case. But cancelled
poles and zeros in (23.14) allow much better results numerical simulations
and in practice (23.11) also works better than Figure 23.1 if, of course, models
are known as transfer functions.
Glossary
I got o the plane in Recife (the Brazilian government was going to
pay the part from Recife to Rio) and was met by the father-in-law
of César Lattes, who was the director of the Center for Physical
Research in Rio, his wife, and another man. As the men were o
getting my luggage, the lady started talking to me in Portuguese:
You speak Portuguese? How nice! How was it that you learned
Portuguese?
23.2. IMC AS A DESIGN METHOD FOR CLOSED-LOOP CONTROLLERS 347
Exercises
1. Find a closed-loop controller for the plant of Example 23.1 using (23.11).
Compare its performance with the one shown in Figure 23.2.
2. Apply IMC to the plants of Exercises 6 and 7 from Chapter 21. Simulate
the results using Simulink for the references mentioned in each Exercise.
(a) Implement the simulation using the block diagram of Figure 23.1.
(b) Implement the simulation using (23.11) and a closed loop.
348 CHAPTER 23. INTERNAL MODEL CONTROL
Chapter 24
Delay systems
Abrupt and nerve-shattering the telephone rang. Ashley leapt up to
answer it. Captain Granforte barred his way.
Let him go, Captain, said George Harlequin. Let him do what he
wants.
Granforte stepped aside and Ashley stood with the receiver in his
hands, listening to the crackling, impersonal voices saying Pronto!
Pronto! Pronto! all the way up to Rome, and looking down at
the dead face of Vittorio d'Orgagna and the blood that spread out
over his white shirt-front. The `prontos' started again in descend-
ing scaleRome, Terracina, Naples, Castellammare, Sorrentoand
nally, Hansen came on.
Pronto! Hansen speaking.
This is Ashley. . . Sorrento.
Great to hear you, Ashley boy! Great, great! What's news?
This chapter is still being written. In the picture below: National Pantheon,
or Church of Saint Engratia, Lisbon (source: http://www.panteaonacional.
gov.pt/171-2/historia-2/), somewhen during its construction (16821966).
Proof. Since we are using the unilateral Laplace transform, and thus the integral
in
Z +∞
L [f (t − θ)] = f (t − θ)e−st dt (24.2)
0
τ =t−θ (24.4)
t = 0 ⇒ τ = −θ (24.5)
t = +∞ ⇒ τ = +∞ (24.6)
dτ = dt (24.7)
349
350 CHAPTER 24. DELAY SYSTEMS
this becomes
Z +∞
L [f (t − θ)] = f (τ )H(τ )e−s(t−θ) dτ (24.8)
−θ
1
Z +∞ z }| {
L [f (t − θ)] = e −sθ
f (τ ) H(τ ) e−sτ dτ
0
Z +∞
= e−sθ f (τ )e−sτ dτ = F (s) e−sθ (24.9)
0
| {z }
L [f (t)]
Glossary
Padre nosso que estaes nos céus:dizia Engracia Ripa, deixando
correr um dos bugalhos de umas contas da terra sancta que tinha nas
mãos.Ora essa!Sancticado seja o vosso nome.Forte tractante!
Venha a nós o vosso reino.E uma pessoa com a sua áquella de que
era um home como se quer!Seja feita a vossa vontade.Safa!
Assim na terra como nos céus.Com que então setenta?
Entregadinhas!Ave Maria, gracia plena: respondeu a tia Jero-
nyma, que latinisava furiosamente á força de viver com o prior.
Como lh'o hei-de dizer?Domisteco.Foi o demo que o tentou.
Benedités tu. . .
Exercises
1. Consider the irrigation canal in Figure 24.2. The water from a reservoir
enters the canal through a gate at height y ∈ [0 m, 1 m]. The gate is
actuated by a motor controller by voltage V ∈ [−10 V, +10 V]. The
velocity of the gate is given by
ẏ = ϕV (24.10)
and maximum velocity of the gate achieved by the motor is ±0.1 m/s.
We know from Fluid Mechanics that water dynamics in the canal is given
by Saint-Venant equations (a simplied version of the Navier-Stokes equa-
tions for this case), but this can be approximated by a rst order transfer
function with delay, relating water height h with gate height y . In this
canal,
h(s) 100
= e−20s (24.11)
y(s) 100s + 1
352 CHAPTER 24. DELAY SYSTEMS
(a) Draw the block diagram for this system, with input V and output h.
(b) Show that a proportional controller K for gate height y leads to a
closed loop transfer function given by
y(s) 0.01K
= (24.12)
yref (s) s + 0.01K
(c) Find the value of K achieving the smallest possible settling time for
a unit step reference, without saturation of the control action.
(d) Let K = 10. Show that h(s) and yref (s) are related by transfer
function
h(s) 0.1 × 100
G(s) = = e−20s (24.13)
yref (s) (s + 0.1)(100s + 1)
(e) Show that, using a (1,1) Padé approximation, G(s) above can be
approximated by
(f) Plot the Bode diagram of G̃(s). (Take into account that this is a
non-minimum phase system.)
(g) Since G(s) is a system with delay a Smith predictor is actually a
better control architecture. The block diagram is given in Figure
24.3, where κ is a controller. Identify signals 1, 2, 3, 4 and 5, and
transfer functions 6, 7, 8, 9 and 10.
Gate
Reservoir
y
Canal
h
1
G(s) = e−0.35s (24.15)
0.04s + 1
24.4. CONTROL OF SYSTEMS SIMILAR TO DELAY SISTEMS 353
5. Find PID controllers for the following plants both without, and with, a
Smith predictor, and compare performance.
Practical implementation of
control systems
355
357
Chapter 27 presents tools for the study of digital closed loop control systems, and how
to use them to design digital controllers directly, rather then approximat-
ing a previous design.
Control theory, from Part IV (though you may have skipped Chapters 19
and 23).
358
Chapter 25
359
360 CHAPTER 25. DIGITAL SIGNALS AND SYSTEMS
t0 = 0 (25.4)
t1 = Ts (25.5)
t2 = 2Ts (25.6)
t3 = 3Ts (25.7)
..
. (25.8)
tk = k Ts (25.9)
and
onstant in practice In practice, Ts is almost always constant, since this is much easier to implement
and it is fortunate that it be so, since the mathematical treament is much
simpler assuming a constant Ts , as we will always do in what follows.
y(t) = y(0)δ(t) + y(Ts )δ(t − Ts ) + y(2Ts )δ(t − 2Ts ) + y(3Ts )δ(t − 3Ts ) + . . . + y(k Ts )δ(t − k Ts ) + . . .
= y0 δ(t) + y1 δ(t − Ts ) + y2 δ(t − 2Ts ) + y3 δ(t − 3Ts ) + . . . + yk δ(t − k Ts ) + . . .
+∞
X
= yk δ(t − k Ts ) (25.16)
k=0
z −1 = e−Ts s (25.19)
Using this delay operator z −1 , we can write the Laplace transform (25.17)
of a discrete signal yk in a more simple way:
Denition 25.2. The Z transform of a discrete signal yk is its Laplace trans- Z [yk ]
form written with the delay operator z −1 :
+∞
X
Z [yk ] = yk z −k (25.20)
k=0
Figure 25.3: Three discrete time signals from Examples 25.2, 25.3, and 25.4,
together with the continuous time functions that they discretise.
the forward operator z = eTs s is a forward shift in time of one sampling Forward operator z
time Ts ;
z k = ek Ts s is a forward shift in time of k sampling times Ts ;
a 0
The rst term is = 1, and the ratio is z;
a
thus, the sum is
z
1 z 1
Z [xk ] = X(z) = a = = (25.36)
1− z z−a 1 − a z −1
The rst term is 1, and the ratio is z −1 e−aTs ; thus, the sum is
1 z
Z [xk ] = X(z) = = (25.38)
1 − z −1 e−aTs z − e−aTs
The Z transform, being a Laplace transform, enjoys the linearity property Z is linear
of L . This can also be shown from denition:
Theorem 25.3. The initial and nal values of a discrete signal xk are retrieved Initial value theorem
from its Z transform X(z) as Final value theorem
To prove (25.42), we rst notice that since z −1 is a delay then z −1 X(z) is found
as follows:
+∞
X
X(z) = Z [xk ] = xk z −k (25.44)
k=0
+∞
X
⇒ z −1 X(z) = Z [xk−1 ] = xk−1 z −k (25.45)
k=0
+∞
X +∞
X
−1 −k
X(z) − z X(z) = xk z − xk−1 z −k
k=0 k=0
+∞
X
−1
(xk − xk−1 ) z −k
⇔ X(z) 1 − z =
k=0
+∞
X n
X
⇒ lim X(z) 1 − z −1 = lim (xk − xk−1 ) z −k = lim
(xk − xk−1 )
z→1 z→1 n→+∞
k=0 k=0
= lim x0 − x−1 + x1 − x0 + x2 − x1 + x3 − x2 + x4 − x3 + . . . + xn−1 − xn−2 + xn − xn−
n→+∞
Y (z) Ts
⇔ = (25.50)
U (z) 2Ts + 3 − 3z −1
Discrete transfer function (25.50) is a dierential equation put under the form of a discrete transfer
function. While a discrete transfer function relates the Z transform of the
output (in the numerator) and the input (in the numerator), just like a contin-
uous time transfer function, is not unusual to abuse notation and write instead
yk Ts
= (25.51)
uk 2Ts + 3 − 3z −1
There are several ways of creating a discrete transfer function with Matlab:
tf will create a discrete transfer function in z if, after the vectors with
the coecients of the numerator and the denominator, the sampling time
is given;
tf will create a discrete transfer function in z −1 if this is requested by
option 'Variable';
z = tf('z') creates the forward operator z , for which the sampling time
may or may not be specied;
z_1 = tf([0 1],1,'Variable','z^-1')
creates the delay operator z −1 .
Simulink also has a block for discrete transfer functions.
Example 25.6. Transfer function
z+2 z −1 + 2z −2
G(z) = = (25.52)
3z 2 + 4z + 5 3 + 4z −1 + 5z −2
can be created as a function of z either as
>> tf([1 2],[3 4 5],0.5)
25.3. ZERO ORDER HOLD 365
Figure 25.4: Top row: a signal, discrete in time, and the continuous signals
obtained with a ZOH and a FOH. It is clear that the FOH easily over or un-
derestimates the signal. Bottom row: the same signal, corrupted by noise. The
ZOH is aected; the FOH provides wild outputs.
or as
>> z = tf('z',0.5);
>> (z+2)/(3*z^2+4*z+5)
or
Figure 25.5: Control loop with a digital controller and a continuous plant.
Notice that the reference rk is discrete in time, just as the measured output
ŷk and the closed loop error ek . The plant output y(t) is continuous, and
the control action provided by the controller must be converted from a digital
signal uk into a continuous signal u(t) by a ZOH. The part of the loop within
the dashed line is what Theorem 25.4 is concerned with.
z−1 G(s) G(s)
HG(z) = Z −1
= (1 − z )Z (25.53)
z s s
Proof. The output u(t) of the ZOH is given by a sequence of steps:
Thus
+∞
X 1 −k Ts s 1 −(k+1)Ts s
u(s) = L [u(t)] = uk e − e
s s
k=0
z −1
z −k z }| {
+∞
1 − e−Ts s
X z }| {
= uk e−k Ts s (25.56)
s }
k=0 | {z
| {z } due to the ZOH
Z [uk ]
and
1 − z −1
yk G(s)
= HG(z) = Z G(s) −1
= (1 − z )Z (25.57)
uk s s
Figure 25.6: A sinusoid, sampled with dierent sampling periods. Notice how,
if the sampling frequency is too small, the frequency of the sinusoid is unrecog-
nisable. It seems to be lower than it is: this phenomenon is called aliasing.
We will not present a formal proof, but this result is rather intuitive. It tells
us that we need at least two points per period to sample a sinusoid so that its Minimum sampling fre-
frequency will be recognisable. Otherwise, a phenomenon called aliasing will quency
occur, illustrated in Figure 25.6. Aliasing
However, this bare minimum of two sampling instants per period is most
undesirable: the amplitude of a sinusoid sampled in this way will surely be
wrong. Only with an exceptional luck would the crest and the through of the
sinusoid be sampled, as seen in the rst case of Figure 25.7. It would be very
likely that the sample instants would match phases other than ±90◦ , and thus
the amplitude of the sampled sinusoid will be some random value, below the true
one, as in the second and third cases of Figure 25.7. And, with an exceptional
lack of luck, the last situation of Figure 25.7, in which only the zero crossings
are hit, might arise.
In practice it is expedient to have 10 to 20 points per period. So, if the Rule of thumb for Ts
sinusoid has period T and frequency ω = 2π T , the sampling time Ts and the
sampling frequency ωs = 2π Ts should verify
T T 2π 2π
≤ Ts ≤ ⇔ ≤ Ts ≤ ⇔ 20ω ≥ ωs ≥ 10ω (25.58)
20 10 20ω 10ω
This is a heuristic rule; the lower limit for Ts ensures that the amplitude is
never underestimated by more than 5%, as seen in Figure 25.8, which depicts
the most unfavourable case possible. It may sometimes be convenient to have
an even higher sampling frequency.
Most signals, of course, are not sinusoidal. So rule (25.58) must be applied
to the fastest frequency (i.e. the smallest perior) found in the signal or at
least the fastest frequency we may be interested in.
368 CHAPTER 25. DIGITAL SIGNALS AND SYSTEMS
dierent discrete signals. Top row: very favourable situation, only possible with
exceptional luck. Middle rows: usual situations. Bottom row: very unfavourable
situation, only possible with exceptional lack of luck.
Figure 25.9: Zones where poles are stable. Left: poles in s. Right: poles in z .
Also,
if pole s is stable, i.e. if a < 0, pole z will have a magnitude eTs a < 1, i.e. Stable poles in z are inside
z will be inside the unit radius circle; the unit radius circle
if pole s is on the imaginary axis, i.e. if a < 0, pole z will have a magnitude
e0 = 1, i.e. z will be on the unit radius circle;
if pole s is unstable, i.e. if a > 0, pole z will have a magnitude eTs a > 1,
i.e. z will be outside the unit radius circle. Outside the unit radius
circle, poles in z are unsta-
In other words, ble
poles in s are stable to the left of the imaginary axis, and unstable to the
right;
poles in z are stable inside the unit radius circle, and unstable outside. Stable poles have |z| < 1
Additionally, Unstable poles have |z| > 1
simple poles in s on the imaginary axis are marginally stable: the same
applies to simple poles in z on the unit radius circle;
multiple poles in s on the imaginary axis are unstable: the same applies
to multiple poles in z on the unit radius circle.
See Figure 25.9.
Example 25.7. Transfer function G1 (z) = has a pole at z = −2; since
1
z+2
|z| = 2 > 1, this is an unstable pole, and G1 (z) is unstable.
Transfer function G2 (z) = z−1 1 has a pole at z = 12 ; since |z| = 12 < 1, this
2
is an stable pole, and G2 (z) is stable.
Figure 25.10 shows the unit step responses of G1 (z) and G2 (z), by which it
can be conrmed that the rst is stable and the second is not.
370 CHAPTER 25. DIGITAL SIGNALS AND SYSTEMS
Figure 25.10: Unit step responses of G1 (z) (left) and G2 (z) (right) from Exam-
ple 25.7. The sample time (which is irrelevant for stability) was assumed to be
1 s.
Notice that what matters are poles in z ; even if a discrete transfer function Find poles in z, not in
is given as a ratio of two polynomials in z −1 , what matters for stability are the
roots of the denominator given as values of z .
G(z) is stable.
We saw in Chapter 11 that only those transfer functions having more poles
than zeros, i.e. which are proper, can be physically possible. The same happens
in z ; it is in fact even much clearer in z .
This transfer function is not proper, since it has two zeros but only one pole.
The corresponding dierence equation is
b2 z 2 + b1 z + b0 yk
= ⇔
a1 z + 1 uk
(b2 z 2 + b1 z + b0 )uk = (a1 z + 1)yk ⇔
b2 uk+2 + b1 uk+1 + b0 uk = a1 yk+1 + yk ⇔
b2 b1 b0 1
yk+1 = uk+2 + uk+1 + uk − yk ⇔
a1 a1 a1 a1
b2 b1 b0 1
yk = uk+1 + uk + uk−1 − yk−1 (25.62)
a1 a1 a1 a1
Theorem 25.6. If a discrete transfer function has m zeros and n poles, such
that m > n, then the output yk depends from future inputs uk+1 , . . . , uk+m−n .
Causality A system is
Remark 25.1. The number of zeros and poles that matters is found in z , not in
1
z −2 + 1 z −1 + 1
z −1 . We might be tempted to say that H(z) = 3 3
1
3
has a polynomial
of order 2 in the numerator and a polynomial of order 0 in the denominator;
25.6. PRIMARY AND COMPLEMENTARY STRIPS IN S 371
Figure 25.11: Strips of the complex plane where s is represented that are mapped
onto the entire complex plane where z is represented.
of course, with 2 zeros and 0 poles it would not be causal. But its dierence
equation is
1 −2 1 −1 1 yk 1 1 1
z + z + = ⇒ yk = uk + uk−1 + uk−2 (25.63)
3 3 3 uk 3 3 3
and it is clear that the output depends on the current and on past inputs, not
1
+ 1 z+ 1 z 2
on anything future. We should have considered H(z) = 3 3 z2 3 and noticed
that the transfer function has in fact 2 poles and 2 poles, and thus no problems
of causality.
This means that the complex plane where s is represented can be split into an
innite number of horizontal strips, of width 2πTs , as seen in Figure 25.11. Each Each strip in s mapped to
of them is mapped onto the entire complex plane where z is represented. the entire plan in z
The existence of innite points s mapped to the same value of z is a con-
sequence of Theorem 25.5. Many sinusoids, when sampled in time, result in
the same discrete signal, as seen in Figure 25.12. Of course, only one will be
properly sampled: the one with a frequency below the Nyquist frequency, i.e.
the one found inside the strip of the complex plane centred on the real axis,
from −j Tπs to +j Tπs . For this reason, this strip is called primary strip, and
the others, where sinusoids have frequencies that cannot be properly sampled,
are called complementary strips.
372 CHAPTER 25. DIGITAL SIGNALS AND SYSTEMS
Figure 25.12: Dierent sinusoids sampled with the same sampling time can
result in the same discrete signal.
Glossary
They were really getting quite fond of their strange pet and hoped
that Aslan would allow them to keep it. The cleverer ones were
quite sure by now that at least some of the noises which came out
of his mouth had a meaning. They christened him Brandy because
he made that noise so often.
Exercises
1. In a closed loop control system, the error e and the control action u are
electrical signals. Design analog circuits to implement:
(a) A proportional controller u
e = 10, using one OpAmp and two resis-
tors.
(b) A proportional controller ue = 0.5, using two OpAmps and four re-
sistors. Why is it that in this case one OpAmp is not enough?
(c) A PD controller e = 5 (1 + 0.1s).
u
A) x (t) = 1 − (−1)n Ts , n = 0, 1, 2, . . .
h i
B) x (t) = 1
2 1 − (−1)
n Ts
, n = 0, 1, 2, . . .
h i
C) x (t) = 2 1 − (−1)n Ts , n = 0, 1, 2, . . .
D) None of the above.
s+2
5. Consider signal x(t), such that X (s) = L {x(t)} = 2 .
(s + 1) (s + 3)
(a) Obtain X (z) = Z {x (t)} for a generic sampling time h.
(b) Do the same for h = 1 s.
(c) Do the same for a sampling frequency of 10 Hz.
5
2z z − 12
6. Consider a signal with Z transform given by Z{x (t)} = .
z − 12 z − 31
Digital approximations of
continuous systems
In this chapter
375
376CHAPTER 26. DIGITAL APPROXIMATIONS OF CONTINUOUS SYSTEMS
Glossary
Pirenne leaned over the table to get a better view and Hardin contin-
ued: The message from Anacreon was a simple problem, naturally,
for the men who wrote it were men of action rather than men of
words. It boils down easily and straightforwardly to the unqualied
statement, when in symbols is what you see, and which in words,
roughly translated, is, `You give us what we want in a week, or we
take it by force.'
Exercises
1. The PD controller C(s) = 8s + 32 has to be implemented with a sampling
time of 0.02 s. Find the dierence equation that should be implemented
in a microprocessor.
377
378 CHAPTER 27. STUDY AND CONTROL OF DIGITAL SYSTEMS
Glossary
But I think I've learnt to manage these donkeys, Fred. I leant
forward and quietly gave the order to turn left into Peter's large
hairy ear. Zur linken Zeite, mein Freund.
Peter veered to the left, barging into Paul and very nearly unseating
Fred. We would have left the track altogether and started across the
Forest had I not quickly murmured to him in German to go right
again and then straight on.
It's quite simple, I explained to Fred. Mr. Mattock said that Aunt
Lot was always muttering in German. That's how she talked to the
donkeys. We'll be all right from now on.
You mean you'll be all right, grumbled Fred. My subject's His-
tory, not German. You'll have to talk for us both.
Exercises
1. Consider the system shown in Figure 27.1 with sampling period h. Is the
Y (z) G(z) Y (z) G(z)
closed-loop transfer function given by = , by = ,
R(z) 1 + G(z)H(z) R(z) 1 + GH(z)
or by neither of these transfer functions?
2. Consider the system shown in Figure 27.2 with sampling period h. Which
of the following transfer functions corresponds to this closed-loop?
Y (z) G1 G2 (z)
(a) =
R(z) 1 + G1 G2 (z)
Y (z) G1 (z)G2 (z)
(b) =
R(z) 1 + G1 G2 (z)
Y (z) G1 G2 (z)
(c) =
R(z) 1 + G1 (z)G2 (z)
Y (z) G1 (z)G2 (z)
(d) =
R(z) 1 + G1 (z)G2 (z)
3. The discretised transfer function relating the voltage u(t) applied to the
motor with the azimuth angle θ(t) of the antenna in Exercise 2 of Chap-
0.003z + 0.003
ter 22 is HG(z) = 2 , with a sampling time of 0.25 s.
z − 1.975z + 0.975
Figure 27.3 shows the Bode diagram of the open loop formed by the plant
30.361(z − 0.882)
and by controller C(z) = .
z − 0.286
(a) Is the closed loop stable?
(b) Can this controller follow constant angle references?
Bode Diagram
100
50
Magnitude (dB)
−50
−100
−90
−135
Phase (deg)
−180
−225
−270
−3 −2 −1 0 1 2
10 10 10 10 10 10
Frequency (rad/s)
(a) Show that the discrete equivalent of (27.4), when a zero-order hold
with a 200 Hz sampling frequency is applied at the input of the plant,
is
6.2482 × 10−5 (z − 1)(z + 1)
HG(z) = (27.5)
(z − 1.025)(z − 0.999)(z − 0.9753)
(b) Figure 27.5 shows the Nyquist plot of (27.5). Show that (27.5) cannot
be stabilised with a proportional controller.
27.7. STUDYING STABILITY FROM FREQUENCY RESPONSES 381
Figure 27.4: Inverted pendulum in the Laboratory of Control and Robotics; its
parameters are not those of transfer function (27.4).
0.04 2
Imaginary Axis
Imaginary Axis
0.02 1
0 0
−0.02 −1
−0.04 −2
−0.06
−3
−0.08
−4
−0.1
−5
−0.2 −0.15 −0.1 −0.05 0 −0.05 −0.04 −0.03 −0.02 −0.01 0
Real Axis Real Axis
Figure 27.5: Nyquist diagram of (??); right plot: detail of the left plot.
382 CHAPTER 27. STUDY AND CONTROL OF DIGITAL SYSTEMS
Chapter 28
Non-linearities in control
systems
This chapter concerns the eects of non-linearities in control systems. Non-
linearities can stem:
From the plant. We saw in Chapter 8 that soft non-linearities can be
linearised, but of course that is only an approximation.
From the actuator. While the actuator is often considered as part of
the plant, it is better to consider it a separate model not only if it can be
easily replaced but also if it is the source of non-linear behaviour. One
particular non-linearity, saturation, is inevitable in any actuator, since no
actuator can provide an arbitrarily large control action (this would always
require innite energy). At most, this non-linearity can be neglected if it
is certain that in no case the controller will ever require a control action
too large for the actuator. In mechatronic systems, mechanical parts of-
ten originate non-linearities such as dead zones (remember Figure 8.5) or
backlash (remember Figure 4.16).
From the sensor. As we saw in Chapter 13, there are sensors with non-
linear transductions, which can be accounted for (in which case it is as if
they did not exist) or linearised.
From the control law itselft. Design strategies of non-linear control
laws fall outside the scope of these Lecture Notes; only one particular case
of one particular strategy (that of reset control) will be presented below
in Chapter 29.
The study of their eect is easier in continuous time (i.e. using transfer functions
in s, not in z ); in any case, the eects of non-linearities are similar in discrete
time as well.
0, if − 1 < x < 1
x, if − 3 ≤ x ≤ −1 ∨ 1 ≤ x ≤ 3
y= (28.2)
−3, if x < −3
3, if x > 3
383
384 CHAPTER 28. NON-LINEARITIES IN CONTROL SYSTEMS
if − 1 < x1
0
x,
0, if − 1 < x1
x , if − 3 ≤ x ≤ −1 ∨ 1 ≤ x ≤ 3
y = x−3 = 1, if − 3 ≤ x ≤ −1 ∨ 1 ≤ x ≤ 3
, if x < −3 3 , if x < −3 ∨ x > 3
3x
x , if x > 3 |x|
(28.3)
Notice that, for input x = 0, the equivalent gain was, of course, extended by
continuity.
Equivalent gain and root- If a closed-loop conguration such as the one seen in Figure 28.2 can be
locus found, in which the non-linearity aects the error, then the equivalent gain
must be combined with a means of studying the inuence of the gain in closed-
loop stability, such as the root-locus diagram and the Routh-Hurwitz criterion,
to assess the inuence of the non-linearity in the control loop.
Example 28.2. In the control system of Figure 28.3,
s+5
G(s) = (28.4)
s2
The root-locus of (28.4) is given in Figure 28.4. We now consider two cases,
both shown in Figure 28.5:
When the reference is r = 1, the initial value of the error is e(0) = 1 (and
then the error decreases). The control action never saturates, so we always
have Keq = 1. The response is oscillatory, with an overshoot only slightly
larger than what might be expected from the position of the closed loop
poles. (Remember that the discrepancy is not surprising since the closed
loop is not a second order system without zeros.)
28.1. NON-LINEARITIES AND RESPONSES IN TIME 385
Figure 28.3: Control loop of Examples 28.2 and 28.3 (top), and equivalent gain
of the saturation (bottom).
386 CHAPTER 28. NON-LINEARITIES IN CONTROL SYSTEMS
When the reference is r = 5, the initial value of the error is e(0) = 5, the
control action saturates at u(0) = 1, and so Keq = 51 = 0.2. In Figure 28.4
we see that this corresponds to a more oscillatory behaviour, as expected
from the poles closer to the imaginary axis; the overshoot is somewhat
lower than, but in line with, the expected value.
Example 28.3. If in the control system of Figure 28.3 the system is rather
s+5
G(s) = (28.5)
s(s2 + 0.25s + 1)
with the root-locus given in Figure 28.6, the values of the gain ensuring closed-
loop stability are found as follows:
s+5
y(t) K s3 +0.25s2 +s
= s+5
r(t) 1 + K s3 +0.25s2 +s
Ks + 5K
= (28.6)
s3 + 0.25s2 + s(K + 1) + 5K
s3 1 K +1
s2 0.25 5K
5K (28.7)
s K +1− 0.25
1 5K
( (
1
K + 1 − 20K > 0 K < 19 = 0.0526
⇒ (28.8)
5K > 0 K>0
Limit cycle When the reference is r = 1, the initial value of the error is e(0) = 1.
The control action is limited to 1, so the equivalent gain is 11 , and thus
the system becomes unstable. However, in the Figure we see that the
amplitude of the oscillations does not grow indenitely, as might be ex-
pected. This is because of the saturation. As the error grows, since the
control action is limited to [−1, 1], the equivalent gain becomes smaller,
and the loop eventually falls back into the zone of stability. As the er-
ror decreases, the equivalent gain increases, and the control loop becomes
unstable again. Because of this switching between a stable and an unsta-
ble situation, around the limit of stability, the oscillations end up with a
constant amplitude. This is called a limit cycle.
28.1. NON-LINEARITIES AND RESPONSES IN TIME 387
When the reference is r = 100, the initial value of the error is e(0) =
100. The control action is limited to 1, so the equivalent gain is 100
1
, and
the system is stable. As the error becomes smaller, the equivalent gain
increases, the system becomes unstable, and we have a limit cycle again.
Notice that the amplitude of the oscillations is the same in both cases of Fig-
ure 28.7. We will see below how it can be found. But there is a signicant
dierence between the two cases. When r = 1, the amplitude of the oscillations
of the limit cycle is so large in relation to r that the situation is in practice as bad
as if the loop were unstable. When r = 100, the amplitude of the oscillations,
not being neglectable, may in some cases be tolerable. Hence the importance of
estimating limit cycles, and their amplitudes, caused by non-linearities.
Remark 28.1. Complex conjugate poles on the imaginary axis can also orig-
inate oscillations with a constant amplitude, but a limit cycle is caused by a
non-linearity instead.
(in other words, T is shortest period of time after which y(t) repeats itself);
Fourier series expansion Theorem 28.1. Let f (x) be a limited, periodic function, with period 2π , and
a nite number of maxima, minima and discontinuities. Then the Fourier series
28.2. DESCRIBING FUNCTION 389
Figure 28.7: Example 28.3: reference 1 (top), reference 100 (centre), reference
consisting of three steps (bottom).
390 CHAPTER 28. NON-LINEARITIES IN CONTROL SYSTEMS
f(x) given by
+∞
a0 X
f(x) = + ak cos kx + bk sin kx (28.11)
2
k=1
1 2π
Z
ak = f (x) cos kx dx (28.12)
π 0
1 2π
Z
bk = f (x) sin kx dx (28.13)
π 0
converges in the domain of f and veries
lim f (τ ) + lim+ f (τ )
τ →x− τ →x
f(t) = (28.14)
2
Proof. The proof can be found in any textbook of Calculus.
Corollary 28.1. Suppose that f (x) has an arbitrary period T , and that ω =
2π 2π
. Then function g(x) = f
T x
has period 2π , and we
T ⇔ T = ω 2π x =f ω
can write
x +∞
a0 X
g(x) = f = + ak cos kx + bk sin kx (28.15)
ω 2
k=1
1 2π
Z
ak = f (x) cos kx dx (28.16)
π 0
1 2π
Z
bk = f (x) sin kx dx (28.17)
π 0
Making t = x
ω ⇔ x = ωt ⇒ dx = ω dt, we get
+∞
a0 X
f(t) = + ak cos kωx + bk sin kωx (28.18)
2
k=1
Z 2π
ω ω
ak = f (t) cos kωt dt (28.19)
π 0
Z 2π
ω ω
bk = f (t) sin kωt dt (28.20)
π 0
In our case, from (28.10), (28.19) and the denition of ω comes
2 T
Z
a0 = y(t) dt
T 0
Z T2 Z T
2 2
= y(t) dt + y(t) dt = 0 (28.21)
T 0 T T2
| {z }
R T /2
− 0 y(t) dt
and so we make
b + ja
= (28.29)
U
Example 28.4. Let us nd the describing function of the static two-valued Describing function of on-
non-linearity represented in Figure 28.8, known as on-o (the higher output o
standing for on, the lower for o ):
(
M, if x ≥ 0
y= (28.30)
−M, if x < 0
the output is
(
M, 0 ≤ t ≤ T2
y(t) = (28.32)
−M, T2 < t < T
392 CHAPTER 28. NON-LINEARITIES IN CONTROL SYSTEMS
−2 2
M z }| { z }| { 4M
=− cos π − cos 0 − (cos 2π − cos π ) = (28.34)
π | {z } | {z } | {z } | {z } π
−1 1 1 −1
this being the Fourier series truncated after the rst term, as seen in Figure 28.8;
and the describing function is
4M 2πt
π sin 4M
N (U, ω) = T
= (28.36)
U sin 2πt
T
πU
N (U ) of static non- Remark 28.2. Notice that, as is clear from Figure 28.8, the input x(t) and
linearities does not depend the truncated Fourier series of the output ỹ(t) are in phase, always; this is an
on ω obvious consequence of the non-linearity being static. Thus the phase of the
describing function is always 0◦ , and there is in fact no dependency at all from
ω . This happens with all static non-linearities, not just on-o.
Describing function of a Example 28.5. Let us nd the describing function of the dynamic non-linearity
reset integrator called reset integrator (or Clegg integrator), with which the output y(t) of
C(t), which is an integral, is reset to zero whenever the input u(t) is zero. By
convention, this is represented as
0
1
y(s) = u(s) (28.37)
s
Let the input be
u(t) = sin ωt, t > 0 (28.38)
which has a frequency ω = 2π T and a period T = ω ; the amplitude is 1, without
2π
loss of generality, since for this non-linearity the amplitude of the output is
linear with respect to the amplitude of the input. Without reset, the output
would be given by
1 1
y(t) = − cos ωt (28.39)
ω ω
(where the integration constant ensures y(0) = 0) and, with reset, by
1 − 1 cos ωt, kT ≤ t < kT + T , k ∈ N0
y(t) = ω ω
1 1 T
2 (28.40)
− − cos ωt, kT + ≤ t < (k + 1)T, k ∈ N0
ω ω 2
as seen in Figure 28.9.
28.2. DESCRIBING FUNCTION 393
0 π t
2π 3π 4π
−1
−2
Figure 28.9: Eects of reset control on the control action for controller C(s) = 1
s
dB
44
40
ω
10−2 102
−36
−40
10−2 102
ω
−38
−90
N (U, ω) of dynamic non- Remark 28.3. Notice that this non-linearity has a describing function depend-
linearities depends on ω ing from ω , since it is dynamic. But, because the amplitude of the output is
linearly dependent on the amplitude of the input (it is determined by an in-
tegral, which is linear if there is no reset), N (U, ω) does not depend on input
amplitude U .
Just as Laplace transforms are in practice found from tables, so are de-
scribing functions. Table 28.1 gives describing functions of some common non-
linearities.
Plot − N1 on the Nyquist The best way to see this for a static non-linearity is to plot − N (U
1
) on the polar
diagram plot of G(s) (or on the Nyquist diagram, considering only the polar plot), and
verify if there are intersections:
Frequency and amplitude the frequency ω for which there is an intersection will be the frequency of
of the limit cycle the limit cycle;
Describing functions
(28.50)
Remark 28.4. Sometimes solutions for (28.48) can be found analytically. This
Finding limit cycles for is easier if the non-linearity is static. In that case, − N1 is real and negative, and
static non-linearities ω is a phase crossover frequency.
(28.50) is one of those cases where a numerical solution has to be sought.
Some of the limit cycles found from (28.48) are never found in practice
because they are unstable. The ones actually found are those which are stable.
The Nyquist diagram is used to tell them apart:
Stable limit cycle Suppose that, when the amplitude of the limit cycle increases, curve − N
1
Figure 28.12: Nyquist diagram of (28.49) and − N1 for the backlash in Fig-
ure 28.11.
398 CHAPTER 28. NON-LINEARITIES IN CONTROL SYSTEMS
Figure 28.14: Output of the control system in Figure 28.11 for Example 28.7.
loop in unstable. Thus, the amplitude will stop decreasing and will rather
increase. Whichever case happens, the amplitude of the limit cycle will
remain roughly the same.
This is better seen through an example.
Example 28.7. Simulating the closed loop of Example 28.6 as shown in Fig-
ure 28.13, we obtain the result in Figure 28.14, with a limit cycle of frequency
188.76−180.48 = 0.76 rad/s and an amplitude quite close to the expected one,
2π
So we see that, at the intersection in the upper right corner of the lower plot,
corresponding to X = 4.72 and ω = 0.76 rad/s:
If the amplitude X increases, the diagram leaves the encirclement. This
is a stable zone of the plane. Thus the amplitude will decrease back to
X = 4.72.
If the amplitude X decreases, the diagram enters the encirclement. This
is an unstable zone of the plane. Thus the amplitude will increase back
to X = 4.72.
The same Figure shows that, at the intersection in the lower left corner of
the lower plot, corresponding to X = 1.37 and ω = 0.31 rad/s:
If the amplitude X increases, the diagram enters the encirclement. This
is an unstable zone of the plane. Thus the amplitude will increase away
from X = 1.37, approaching the limit cycle with X = 4.72.
28.3. PREDICTING LIMIT CYCLES 399
This limit cycle is thus unstable, and will not be observed in practice.
Glossary
He was not loved, Guy knew, either by his household or in the town.
He was accepted and respected but he was not simpatico. Grän von
Gluck, who spoke no word of Italian and lived in undisguised con-
cubinage with her butler, was simpatica. Mrs. Garry was simpatica,
who distributed Protestant tracts, interfered with the shermen's
methods of killing octopuses and lled her house with stray cats.
Guy's uncle, Peregrine, a bore of international repute whose dreaded
presence could empty the room in any centre of civilization, Uncle
Peregrine was considered molto simpatico. The Wilmots were gross
vulgarians; they used Santa Dulcina purely as a pleasure resort,
subscribed to no local funds, gave rowdy parties and wore indecent
clothes, talked of `wops' and often left after the summer with their
bills to the tradesmen unpaid; but they had four boisterous and
ill-favoured daughters whom the Santa-Dulcinesi had watched grow
up. Better than this, they had lost a son bathing here from the
rocks. The Santa-Dulcinesi participated in these joys and sorrows.
They observed with relish their hasty and unobtrusive departures
at the end of the holidays. They were simpatici. Even Musgrave
who had the Castelletto before the Wilmots and bequeathed it his
name, Musgrave who, it was said, could not go to England or Amer-
ica because of warrants for his arrest, `Musgrave the Monster', as
the Crouchbacks used to call him he was simpatico. Guy alone,
whom they had known from infancy, who spoke their language and
conformed to their religion, who was open-handed in all his deal-
ings and scrupulously respectful of all their ways, whose grandfather
built their school, whose mother had given a set of vestments embroi-
dered by the Royal School of Needlework for the annual procession
of St Dulcina's bones Guy alone was a stranger among them.
Exercises
1. Figure 28.15 shows two non-linear elements (a relay and a dead zone) in
series. To which of the following single systems is this equivalent?
2. Figure 28.16 shows two non-linear elements (a relay and a dead zone) in
parallel. To which of the single systems in Figure 28.17 is this equivalent?
3. Repeat the calculations of Example 28.3, when the plant of the diagram
in Figure 28.3 is
s2 + 7s + 10
G(s) = 3 (28.53)
s + 0.25s2 + s
4. The plant in Figure 28.18 includes a backlash non-linearity with 2A = 0.5
3
and B = 1, C = 1. Let G(s) = 2 . Use the describing function
s (s + 1)
method to verify if this plant has a limit cycle. If it does, nd its frequency
and amplitude.
5. The plant in Figure 28.11 includes a backlash non-linearity with A = 1
1.5
and k = 1. Let G(s) = 2 . Use the describing function method
s (s + 1)
to verify if this plant has a limit cycle. If it does, nd its frequency and
amplitude.
6. Consider the plant in Figure 28.19.
(a) Let R = 0, A = 4, k = 1 and K1 = 20. Find the frequency and the
amplitude of the limit cycle.
(b) Is this limit cycle stable or unstable?
(c) Increasing gain K1 , how does the limit cycle change?
Strictly proper systems. Placing extra poles. PID as PI+D. Windup. Reset.
Modelling errors. Robustness. Gain modelling. Waterbed eect. The small gain
theorem.
This chapter is still being written.
In the picture: National Pantheon, or Church of Saint Engratia, Lisbon
(source: http://www.panteaonacional.gov.pt/171-2/historia-2/), some-
when during its construction (16821966).
Glossary
Listen to me for a moment, said the steady voice of Moreau; and
then say what you will.
Well? said I.
He coughed, thought, then shouted: Latin, Prendick! bad Latin,
schoolboy Latin; but try and understand. Hi non sunt homines;
sunt animalia qui nos habemus vivisected. A humanising process.
I will explain. Come ashore.
403
404CHAPTER 29. OTHER ASPECTS OF CONTROLLER DESIGN AND IMPLEMENTATION
Exercises
1. Question.
Part VI
System identication
405
407
if the sampling time was well chosen, according to the criteria in Sec-
tion 25.4, the digital signal will reproduce the analogical signal with ac-
curacy;
Even though signals are almost always digital, some identication methods Continuous and discrete
provide a continuous transfer function, while others provide a discrete transfer identied models
function. If the desired transfer function is of the other type, a conversion using
the Tustin approximation or a pole-zero match is then performed.
The identication methods addressed in this part presume SISO models. If How to deal with MIMO
the plant is linear, this poses no restriction at all: plants
if there are several outputs, each of them is identied separately, i.e. the
MIMO plant is treated as several MISO plants;
409
410 CHAPTER 30. OVERVIEW AND GENERAL ISSUES
Figure 30.1: How to identify a MIMO plant as several MISO plants (top), and
a linear MISO plant as several SISO plants (bottom).
if there are several inputs, since the plant is linear, the output is a linear
combination of SISO plants. Consequently:
all inputs are set to zero, save one of them, and a model for the
relation between that input and the output is found;
the step above is repeated for each input;
the model of the MISO plant is the sum of the SISO models found.
All this is illustrated in Figure 30.1. But if there are non-linearities the above
method fails. We will address the identication of non-linearities only for SISO
models, in Chapter 33.
Identication methods can be performed using data as it becomes available.
Identication in real time This is called real time identication, and if it works as expected the model
obtained gets more accurate with time, as more data becomes available. (Obvi-
ously, if the model becomes worst, the identication is a failure.) Identication
Oine identication can also be carried out only after all data becomes available, using a batch of
measured values all at once. This is called oine identication.
If there is a model based The case where there already is a model of the plant based upon rst prin-
upon rst principles ciples has been mentioned in Section 3.3. Remember that:
in this case, identication from experimental data can be used to conrm,
or correct, the values of the parameters of a model for which the structure
is known;
experimental data can also be used to conrm (or not) the said structure
of the model. It may show that some neglected phenomenon (say, a non-
linearity, or a friction force) is after all so signicant that, for the model
to have the desired accuracy, additional details must be included (a non-
linearity, or additional poles or zeros, etc.).
If there is no model available before identication, then a model structure must
be found before model parameters are identied; or, in other identication meth-
ods, both the model structure and its parameters are found simultaneously.
Identication in closed Some plants have to be identied when they are already controlled in closed
loop loop. This may happen for several reasons:
it is somehow impossible to turn o or disconnect the controller;
without control, outputs may reach unacceptable values (e.g. some temper-
ature may become so high that the plant will be damaged; some pressure
may rise to values that endanger operators' lives; forces will be applied in
a structure that will yield);
the plant is marginally stable or unstable, and without control outputs will
reach saturation values so fast that almost no data at all can be recorded.
Such plants usually have the problem of unacceptable values too.
In this case, a known controller C must be used, and what is identied is the
closed loop transfer function F . If the closed loop is the one from Figure 9.13,
plant G is found as
CG
F = ⇒ F + F CG = CG
1 + CG
⇒ F = CG(1 − F )
F
⇒G= (30.1)
C(1 − F )
Dierent congurations of the closed loop are dealt with similarly.
30.2. COMPARING MODEL PERFORMANCE 411
Z tf
1
MAE(y(t) − ŷ(t)) = |y(t) − ŷ(t)| dt (30.2)
tf 0
N
1 X
MAE(yk − ŷk ) = |yk − ŷk | (30.3)
N +1
k=0
Z tf
1
MSE(y(t) − ŷ(t)) = (y(t) − ŷ(t))2 dt (30.4)
tf 0
N
1 X
MSE(yk − ŷk ) = (yk − ŷk )2 (30.5)
N +1
k=0
s Z tf
1
RMS(y(t) − ŷ(t)) = (y(t) − ŷ(t))2 dt (30.6)
tf 0
v
u N
u 1 X
RMS(yk − ŷk ) = t (yk − ŷk )2 (30.7)
N +1
k=0
σ 2 (y − ŷ)
VAF(y − ŷ) = 1 − (30.10)
σ 2 (y)
The performance indexes above do not help to solve the trade-o between ac-
curacy and simplicity mentioned above. For that purpose, the following ones are
employed. Data is assumed to be discrete in time; models have K parameters.
AIC Akaike Information Criterion (AIC):
correction for
small data sets
z }| {
2K(K + 1)
AIC(yk − ŷk ) = N log MSE(yk − ŷk ) + 2K +
N −K −1
N
= N log MSE(yk − ŷk ) + 2K (30.11)
N −K −1
| {z }
correction for
small data sets
This expression has no correction for small data sets, and so applies only
if N K . Compared with the AIC, the BIC favours models with less
parameters.
Normalised AIC and BIC, needed to compare models found from data
with dierent lengths N :
AIC(yk − ŷk )
nAIC(yk − ŷk ) = (30.13)
N
BIC(yk − ŷk )
nBIC(yk − ŷk ) = (30.14)
N
The lower the value of the AIC or of the BIC, the better the model is considered;
the values themselves have no signicance, and only serve to compare dierent
models. Given n models with outputs i ŷk , i = 1, . . . , n, it is possible to nd
from their values of the AIC or of the BIC a probability of each model being
the best. (Dening precisely in which sense this probability is to be understood
Akaike weights falls outside our scope.) This probability is given by the Akaike weights for
30.2. COMPARING MODEL PERFORMANCE 413
Table 30.1: Values of the AIC, BIC, and corresponding weights for four models
of plant (30.17).
G1 (s) G2 (s) G3 (s) G4 (s)
AIC −0.98 −0.98 −4635.0 −4630.1
w(AIC) 0.0% 0.0% 92.2% 7.8%
BIC 15.8 15.8 −4618.2 −4613.3
w(BIC) 0.0% 0.0% 92.2% 7.8%
warz weights the AIC, or the Schwarz weights for the BIC:
AICi − min AICm
!
m=1...n
exp −
2
wi (AIC) = !, i = 1 . . . n (30.15)
n
X AICp − min AICm
m=1...n
exp −
p=1
2
BICi − min BICm
!
m=1...n
exp −
2
wi (BIC) = !, i = 1 . . . n (30.16)
n
X BICp − min BICm
m=1...n
exp −
p=1
2
Figure 30.2: Unit step responses of plant (30.17) and of four models thereof.
Figure 30.3: Unit step responses of plant (30.17) and of two models thereof.
the lowest AIC is that of G5 (s), which results in a very high probability
of being the best;
G5 (s) is neither the model with less parameters nor the model with lower
MSE;
that the BIC favours G5 (s) even more; in fact, a slightly higher MSE of
G5 (s) could make Akaike weights attribute a higher probability for G6 (s),
while the Schwarz weights would still favour G5 (s);
G3 (s) and G4 (s), which had signicant weights when there were only four
models, are now considered highly improbable.
30.3 Noise
All experimental data is more or less corrupted by noise. Explicit consideration
of noise in models and in the identication process leads to models of a type
called stochastic models, addressed below in Part VIII. Here we address the way
to try to eliminate it from data.
SNR Suppose that a signal y is corrupted with noise yn , so that the measured
30.3. NOISE 415
Table 30.2: Values of the AIC, BIC, and corresponding weights for six models
of plant (30.17).
G1 (s) G2 (s) G3 (s) G4 (s) G5 (s) G6 (s)
AIC already given in Table 30.1 −5620.7 −5617.7
w(AIC) 0.0% 0.0% 0.0% 0.0% 81.6% 18.4%
BIC already given in Table 30.1 −5592.7 −5578.6
w(BIC) 0.0% 0.0% 0.0% 0.0% 92.9% 0.1%
value ỹ is
ỹ = y + yn (30.24)
Then the signal to noise ratio (SNR) is dened as
RMS(y)
SNR = (30.25)
RMS(yn )
RMS(y)
20 log10 SNR = 20 log10 (30.26)
RMS(yn )
When SNR< 1 (i.e. below 0 dB) noise is larger than the signal itself. It is
obviously desirable that SNR 1 (i.e. 20 log10 SNR 0 dB).
To eliminate noise, a lter is applied. Oine identication can use non-
causal lters.
Example 30.2. A centred moving average lter of order 2n + 1 is a digital Centred moving average
low-pass lter given by
z −n + . . . + z −1 + 1 + z + . . . + z n
F (z) = (30.27)
2n + 1
It has a zero phase until the rejection band, thus introducing no phase distortion.
Its gain is almost constant in a large passband. See Figure 30.4.
When a too small sampling time was employed, data should be subsampled, Subsampling
i.e. only the measurements at regular intervals are kept. This corresponds to a
low pass ltering of a signal. When there is so much experimental data that the
computational eort of using it all would be excessive, there are two options:
subsample the data, which eliminates high frequency behaviour (since sub- Truncating and subsam-
sampling has the eect of a low pass lter); pling eliminate low and
high frequencies respec-
truncate the data, which eliminates low frequency behaviour (which is not tively
captured in a shorter time range).
416 CHAPTER 30. OVERVIEW AND GENERAL ISSUES
The discussion above presumes that it is known what in the measured values
is the signal and what is the noise. Sometimes this is not clear at the outset or
by a mere inspection of the data. It is necessary to have some previous estimate
of the bandwidth of the plant to known what is to be ltered. Remember that:
noise with frequencies inside that bandwidth can only be eliminated dam-
aging the response of the plant itself;
any behaviour of the plant (or of the noise) that is ltered cannot be
expected to be modelled acurately.
Noise is not everything that has to be eliminated from data: initial conditions
must be set to zero; remember Example 8.1. Some identication methods require
normalising all variables involved, but since the methods we are dealing with
are for transfer function models, which are linear, this should not make any
dierence.
The results of identication methods must be critically analysed rather than
accepted without reserve. It often happens that identication methods provide
models with unnecessary poles and zeros, that is to say:
poles and zeros that cancel out, or nearly cancel out and only do not
because of slight numerical dierences (these can be removed in Matlab
Matlab's command using function minreal);
minreal
Range of frequencies where
poles and zeros with frequencies outside the range of frequencies where
good results can lie
experimental data can lead to acceptable results.
Remember from what we saw in Chapter 25 that a signal measured from time
0 to time tf with sampling frequency Ts cannot carry information outside fre-
quency range
π π
≤ω≤ (30.28)
tf Ts
which corresponds to a bare minimum of two points per period; and that in
practice, since we need at least some 10 points to sample a period of a sinusoid
with an error in its amplitude below 5%, it is better to consider the narrower
frequency range
2π 2π
10 ≤ω≤ (30.29)
tf 10Ts
instead. Eliminating the poles and zeros of a model that fall outside this range
of frequencies is also a sort of ltering, since less frequencies are being considered
in the end.
either only as many data points as model parameters to identify are used,
which is likely a waste of much information,
The least-squares solution of a linear problem can be found using the pseudo-
inverse of a matrix. To dene it, some results are needed.
30.4. PSEUDO-INVERSE OF A MATRIX 417
∂
∂x1 f (x)
∂
f (x)
d ∂x (30.30)
f (x) = 2
..
dx
.
∂
f (x)
∂xn
Lemma 30.1.
n
∂ X
bk xk
∂x1 k=1
n b1
∂ X
d
bk xk b2
bT x = ∂x2 (30.31)
= . =b
..
k=1
dx
..
.
bn
n
∂ X
bk xk
∂xn
k=1
C11 C12 ··· C1n x1
d d C21
C22 ··· C2n x2
xT Cx =
x1 x2 ··· xn . .. .. .. ..
dx dx .. . . . .
Cn1 Cn2 ··· Cnnxn
" n x1
n n
#
d x2
Xx C X X
= xk Ck2 · · · xk Ckn ..
k k1
dx k=1 .
k=1 k=1
xn
n n
n n
∂ XX X X
xk Ckl xl C1l xl + xk Ck1
∂x1
l=1 k=1
l=1 k=1
n X n n n
∂ X X X
xk Ckl xl
C2l xl + xk Ck2
∂x2
= l=1 k=1
= l=1 k=1
.. ..
. .
n X n n n
∂ X X X
x C x
k kl l
C x + nl l x C k kn
∂xn
l=1 k=1 l=1 k=1
X n
2 Cm1 xm
m=1
n
X
C11 C12 ··· C1n
2 C m2 xm C21 C22 ··· C2n
= m=1 = 2 .. .. .. .. (30.32)
.. . . . .
.
X n
Cn1 Cn2 ··· Cnn
2 Cmn xm
m=1
Thus, in the m × m resulting matrix, both element l, c and element c, l are given
n
X
by Bkl Bkc .
k=1
Ax = b (30.34)
x = A+ b (30.35)
ε = b − Ax (30.37)
Glossary
Cornelius, do you and your lawfully wedded spouse speak any lan-
guage other than English?
What is English? I speak the language taught to me by my father
and mother, who were taught by their fathers and mothers before
them. It has been the language of our ancestors for nearly two
thousand years. As to its origins, who can be sure?
Paul Dehn (1912 1976), Escape from the Planet of the Apes
Exercises
1. Plot the Bode diagram of (30.27) for dierent values of n. For each case,
nd the passband and the largest gain in the rejection band.
420 CHAPTER 30. OVERVIEW AND GENERAL ISSUES
Chapter 31
The dierence between the numbers of zeros and poles can be found from
the way the step response behaves for t = 0, according to Theorem 11.3.
This becomes dicult if noise is so signicant that this behaviour in a
short period of time is hard to assess.
421
422 CHAPTER 31. IDENTIFICATION FROM TIME RESPONSES
The signal can be dierentiated to better see how the behaviour for t = 0
is. But remember that dierentiating amplies high-frequency noise.
If the output settles at a steady state value y∞ , there are no poles at the
origin, and the gain of the plant K is the ratio between that steady state
value and the amplitude of the step u∞ :
y∞
K= (31.1)
u∞
If the plant is marginally stable, or is unstable because of two or more
poles at the origin (integrations), the response can be dierentiated one
or more times, until a steady state is found. The number of dierentiations
is the number os poles at the origin. But it is never too often repeated
that dierentiating amplies high-frequency noise.
The pole of a (stable) rst order model, or a (stable) dominant real pole of
a model with more poles and zeros, can be found from the settling time,
or from any other point given by (11.12)(11.18) or in the general case
by (11.11). The slope at t = 0, given by (11.19), can be used to nd
the gain. Since the response at t = 0 is linear with time, this slope can
be found tting a straight line with least squares during a short interval.
This corresponds to a low pass ltering of noise.
The two real poles of an overdamped second order model without zeros
can be found as follows:
the dominant pole is found as if it were the only one;
the other pole is found from the inection point using (11.54).
The coecients of an underdamped second order model without zeros can
be found as follows:
the damping factor is found from the maximum overshoot using
(11.72);
the natural frequency is then found from the settling time using
(11.73) and the particular values given immediately after;
the frequency of the oscillations ωn 1 − ξ 2 can be used to conrm
p
these two values or to correct one of them once the other is known.
Example 31.1. An electrical motor can be modelled as
θ(s) 10
= (31.2)
U (s) s(1 + 0.15s)
and its unit step response is shown in Figure 31.1. A linear regression easily
shows that the response is going to innity linearly (not exponentially, as when
there is an unstable pole; not quadratically, as when there are two poles at the
origin; etc.) and thus that there is one pole at the origin. As an alternative,
the derivative of θ(t) can be numerically calculated (with a rst order nite
dierence) and plotted, and, as seen also in Figure 31.1, it easy to establish for
θ̇(s)
U (s) a rst order model with steady state gain 10 and time constant 0.15:
θ̂(s) 10
= (31.3)
U (s) 1 + 0.15s
From this, (31.2) comes immediately.
31.3. IDENTIFICATION BY MINIMISATION OF ERROR 423
Figure 31.1: Left: unit step response of (31.2), from Example 31.1. Right: its
rst derivative.
From the values of y(t) for large t, we can get steady state gain ab . Then we
calculate
bK
log y(t) − = −at (31.4)
a
and a linear regression on t gives a. See Exercise 4 of Chapter 11.
While in the Example above the calculations are still fairly simple, this is
not the case for models with more than one pole.
Example 31.3. An overdamped second order model with poles which are not
too close may still be identied in a likewise manner. Consider the unit step
response of
1
G(s) = (31.5)
(s + 1)(s + 10)
which is given by (see Table 2.1)
1 1
10e−t − e−10t (31.6)
y(t) = +
10 10(−9)
and has a steady state given by limt→+∞ y(t) = 10
1
, as seen in Figure 31.2.
Suppose that our model uses the correct structure
1
10 p1 p2
Ĝ(s) = (31.7)
(s + p1 )(s + p2 )
and already includes the correct steady-state gain 10 1
easily read in Figure 31.2.
Plotting
1
log −(y(t) − ) = log 90 10e−t − e−10t = log 90 + log 10e−t − e−10t
10
(31.8)
gives us a practically straight line, since the faster pole (which is −10, as we
saw in Section 11.6) has a vanishing eect that can only be seen near t = 0.
The slope shown in Figure 31.2 gives us the pole p1 = −1.
As to the other pole, it could be found from the inection point using (11.54),
but it is quite hard to nd it using a method similar to the one used for p1 ,
since we now know that
p2 1 1 −t −p2 t
y(t) = 1+ p2 e − e ⇒
10 p2 1 − p2
(10y(t) − 1)(1 − p2 ) = p2 e−t − e−p2 t ⇒
−p2 t = log p2 e−t − (10y(t) − 1)(1 − p2 ) (31.9)
424 CHAPTER 31. IDENTIFICATION FROM TIME RESPONSES
Figure 31.2: Left: unit step response of (31.5), from Example 31.3. Right: plot
of (31.8).
This expression has p2 on both sides, and so we would have to nd some value
p2 with which the right hand side of 31.9 is a straight line for small values of
t, with slope −p2 . Searching for this value can be done by trial and error until
p2 = 10 is found, but there are better methods than that.
Remark 31.1. The method of Example 31.3 can be used for other plants with
a dominant real negative pole.
In the general case, nding the parameters of a continuous model that pro-
vide the best t between its response and the experimental data is a non-linear
problem. Consequently, optimisation methods such as the Nelder-Mead simplex
search method (implemented in Matlab with function fminsearch), or meta-
Metaheuristics for identi- heuristic methods (of which genetic algorithms and particle swarm optimisation
cation are well known examples) can be used. We will not study such methods, but
once you learn them in a course on that subject you can apply them easily in
identication:
Some algorithms use only one initial estimate; others use several dierent
sets of values.
These algorithms are iterative, and in each iteration the time response
of the plant for the parameters currently being evaluated is found and
compared with the experimental data.
Metaheuristics do not This strategy can work for complicated problems, but can also get stuck because
guarantee the optimal of numerical problems, and these algorithms do not ensure that the parameters
result, and not even good they nd actually correspond to the minimum value of the performance index.
results The problem is far easier if discrete models
Identifying parameters of
−1
models in z
yk b0 + b1 z −1 + . . . + bm z −m
= ⇒
uk 1 + a1 z −1 + . . . + an z −n
yk = b0 uk + b1 uk−1 + . . . + bm uk−m − a1 yk−1 − . . . − an yk−n (31.10)
31.3. IDENTIFICATION BY MINIMISATION OF ERROR 425
Figure 31.3: Output of (31.14) for a sinusoidal output and normally distributed
error.
are used instead, since we can arrange data and parameters to be identied as
n+m+1 rows
θ
z }| {
columns
y
n+m+1
A
b0
z }| { z }| { b1
yk uk uk−1 ··· uk−m −yk−1 ··· −yk−n ..
.
yk−1 uk−1 uk−2 ··· uk−m−1 −yk−2 · · · −yk−n−1
yk−2 = uk−2
bm
uk−3 ··· uk−m−2 −yk−3 · · · −yk−n−2
.. .. .. .. .. .. .. .. a1
. . . . . . . . .
..
an
(31.11)
and then solve for θ . We need y and A to have at least n + m + 1 rows, and
thus n + m + max{n, m} samples of uk and yk are needed. Likely there will be
more, and Aθ = y will be overdetermined. A solution in the least-squares sense
is then found, as seen in Section 30.4:
θ = A+ y (31.12)
2 + 3z −1
G z −1 = (31.13)
1 + 0.5z −1 − 0.4z −2
with sample time Ts = 1 s, which, allowing for additive noise at the output,
corresponds to the dierence equation
Its output is tabulated in Table 31.1 and shown in Figure 31.3 for a sinusoidal
input, when the error is normally distributed with variance 0.001.
Suppose we know that the model has two poles and one zero, i.e. we know
that it is given by (31.14), and want to know the values of parameters a1 , a2 ,
b0 and b1 . We know that there will be an error, and since we cannot measure
it or estimate it the best we can do is to replace it by its expected value, which
426 CHAPTER 31. IDENTIFICATION FROM TIME RESPONSES
We can now replace values, assuming that before t = 0 s both input and output
were 0 (if we could not assume this, we would just discard the last two equations
right away):
The last equation being clearly impossible which is a result of the output
being nothing but noise without depending from the parameters in any way
, we discard it; the other 20 equations can be easily put in the form of (31.11).
Solving for θ ,
a1 0.4969
a2 −0.4024
θ=
b0 2.0114 (31.27)
b1 2.9812
31.4 Deconvolution
We know from (10.25) that the output of a transfer function is given by the
convolution of its impulse response with the input. If signals are discretised in
time, we can approximate the integral in (10.25)
Z t
y(t) = g(t − τ )u(τ ) dτ (31.28)
0
k−1
X
yk = Ts ui gk−1−i (31.29)
i=0
31.4. DECONVOLUTION 427
On the other hand, we can force (31.30) to be overdetermined by calculating Filtering noise in deconvo-
the impulse response gk in less time instants than the N time instants for which lution
this is possible:
N ×1 N ×K
K×1
z}|{ z}|{
(31.36)
z}|{
y = Ts U g , K<N
Since a convolution nds the response to an arbitrary input from the input
and the impulse response, and now the impulse response is determined from
an arbitrary input and its response, this operation (31.31)(31.35) or (31.37) is
called deconvolution.
Once the impulse response of the model is found, it can be used in several
dierent ways.
It can be used to nd the model's response to an arbitrary input, by
convolution.
It can in particular be used to nd the model's response to sinusoids, so
as to obtain the model's frequency response.
The Laplace transform of the impulse response can be found numerically.
We know from Theorem 10.1 that the result is the transfer function of the
model. Since we will only have numerical values, and not an analytical
expression, this may not be very useful. But instead of the Laplace trans-
form (with s ∈ C) we can just nd the Fourier transform (2.87), thereby
obtaining the model's frequency response without the cumbersome and
tedious intermediate step of sinusoidal inputs.
The impulse response can be used to obtain the parameters of a model,
either using (31.11) or using a simplied formulation as in the following
Example, which is possible because the impulse is dierent from zero in
one time instant only.
Example 31.5. Consider model
b0 + b1 z −1 + b2 z −2
G(z) = ⇒
1 + a1 z −1 + a2 z −2
yk = b0 uk + b1 uk−1 + b2 uk−2 − a1 yk−1 − a2 yk−2 (31.38)
Replacing the impulse
1
u0 = (31.39)
Ts
uk = 0, ∀k 6= 0 (31.40)
in (31.38), the output yk will be the impulse response gk :
1
g0 = b0 (31.41)
Ts
1
g1 = b1 − a1 g0 (31.42)
Ts
1
g2 = b2 − a1 g1 − a2 g0 (31.43)
Ts
g3 = −a1 g2 − a2 g1 (31.44)
g4 = −a1 g3 − a2 g2 (31.45)
..
.
There are 5 unkowns (2 on the denominator and 3 on the numerator), which
can be found with at least 5 values of the impulse response, corresponding to
the 5 equations above.
Using more values of gk , and thus more equations, the solution of the overde-
termined system will once more be found in a least-squares sense (and be more
robust to noise).
Remark 31.2. (31.41)(31.45) can be arranged in matrix form, collecting the
terms on numerator coecients bk on one side and all the other terms on the
other:
b0 1 0 0 0 0 ··· g0
b1 a1 1
0 0 0 · · · g1
1 b2 a2 a1
1 0 0 · · · g2
0 = 0 a2 a1 1 0 · · · (31.46)
Ts g3
0 0 0 a2 a1 1 · · · g4
.. .. .. .. .. .. .. ..
. . . . . . . .
31.4. DECONVOLUTION 429
This is not as useful as (31.11) or (31.30), since the coecients are in the matrix,
but gives a better idea of the general case.
Glossary
Though it be appointed in the afore written preface, that al thinges
shalbe read and sõg in the churche, in the Englishe tongue, to thende
t
y the congregacion maie be therby edied: yet it is not meant, but
when men saye Matins and Euensong priuately, they maye saie the
same in any language that they themselues do understande.
Thomas Cranmer (attrib.; 1489 1556), The booke of the common prayer
and administracion of the Sacramentes, and other rites and ceremonies of the
Churche: after the use of the Churche of England (1549), The preface
deconvolution desconvolução
genetic algorithms algoritmos genéticos
metaheuristic meta-heurística
Nelder-Mead simplex search method método do simplex, método de Nelder-
Mead
particle swarm optimisation otimização por enxame de partículas
pseudo-inverse matrix matriz pseudo-inversa
Exercises
1. Find numerically the unit step response of
1
G(s) = (31.47)
(s + 0.1)(s2 + 0.3s + 1)
for the rst 60 s, using a sampling time you nd appropriate. Use the
method of Example 31.3 to nd the dominant pole from the response.
2. Find a model for a plant with the unit step response y(t) in Table 31.2.
(a) Find discrete models for this plant, using (31.11). Try dierent num-
bers of zeros and poles, and see how some performance index changes.
(b) Find the plant's impulse response, using (31.37) with dierent values
of K . Explain the dierent results obtained.
5. Find an expression similar to (31.46) for the case in which plant (31.38)
has 3 zeros and poles, 4 zeros and poles, and so on. What happens if there
are more poles than zeros?
430 CHAPTER 31. IDENTIFICATION FROM TIME RESPONSES
Chapter 32
431
432 CHAPTER 32. IDENTIFICATION FROM FREQUENCY RESPONSES
Figure 32.1: Left: responses to chirps of a rst order plant. Right: responses to
chirps of a second order plant. Top: responses of rst and second order plants
to a chirp in the [0.01, 1] rad/s frequency range. Bottom: responses of rst and
second order plants to a chirp in the [1, 100] rad/s frequency range.
Using a chirp instead of several sinusoids with dierent frequencies to obtain Replacing sinusoids w
the frequency response of a plant has the major advantage of being faster. The chirp
major drawback is that, of course, a steady-state is never reached. Consequently,
measurements of both gain and amplitude cannot but be approximations. How-
ever, if the rate of frequency increase is low enough, this approximation may be
acceptable.
Clearly this chirp would have had to last longer to explore the frequency response
in this way.
Remark 32.1. It is dicult to tell, before identication, how fast or slow the
transient regime of a plant may be, and consequently how much time a chirp
ought to take to sweep any particular range of frequencies. Still, responses such
as those in Figure 32.1 can even so be used in identication, with the advantage
of having explored the system's response at many frequencies, but using instead
the techniques we will study in Part VIII.
32.2. IDENTIFICATION FROM THE BODE DIAGRAM 433
In that case, if the phase is 0◦ , the gain is positive; if it is ±180◦ , the gain
is negative.
detected from the resonance peak, and (11.80) can be used to nd ξ ; then
(11.79) can be used to nd ωn .
Review Section 11.4 for further insights. See Exercises 10 to 12 of Chapter 11.
Notice that this method can be applied if all that is known about the fre- If only the gain is known
quency response is the gain. This may happen because the phase was not regis-
tered, or is more aected by noise than the gain. However, it will be impossible
to determine if poles are stable or unstable, and if zeros are minimum phase or
non-minimum phase. Only with the phase can that be known. Unless there is
some reason to suppose otherwise, stable poles and minimum phase zeros are
presumed.
Something similar happens if all that is known about the frequency response If only the phase is known
is the phase (a more rare occurrence than knowing only the gain).
is found solving
A B b e
= (32.10)
C D a g
f
X
A= Ap (32.11)
p=1
f
X
B= Bp (32.12)
p=1
f
X
C= Cp (32.13)
p=1
f
X
D= Dp (32.14)
p=1
f
X
e= ep (32.15)
p=1
f
X
g= gp (32.16)
p=1
l = 0...m (32.21)
2 2
= −< (jωp )l < [G(jωp )] + = [G(jωp )] ,
gp;l,1
l = 1...n (32.22)
32.3. LEVY'S METHOD 435
ε = |GD − N |2
2
= <[G] + j=[G] <[D] + j=[D] − <[N ] + j=[N ]
2
= <[G]<[D] − =[G]=[D] − <[N ] + j <[G]=[D] + =[G]<[D] − =[N ]
2 2
= <[G]<[D] − =[G]=[D] − <[N ] + <[G]=[D] + =[G]<[D] − =[N ]
(32.23)
To minimise ε, we want its derivatives in order to coecients ak and bk to be
zero.
Let us suppose that there is only one frequency ωp . First we nd
d<[G] d<[G] d=[G] d=[G]
= = = =0 (32.24)
dai dbi dai dbi
d<[N ]
=0 (32.25)
dai
m
d<[N ] d X
bk < (jωp )k = < (jωp )i (32.26)
=
dbi dbi
k=0
d=[N ]
=0 (32.27)
dai
m
d=[N ] d X
bk = (jωp )k = = (jωp )i (32.28)
=
dbi dbi
k=0
( n
)
d<[D] d X
k
= < (jωp )i (32.29)
= 1+ ak < (jωp )
dai dai
k=1
d<[D]
=0 (32.30)
dbi
( n
)
d=[D] d X
k
= = (jωp )i (32.31)
= 1+ ak = (jωp )
dai dai
k=1
d=[D]
=0 (32.32)
dbi
(Notice that j k can only assume four values: ±1 and ±j . In the rst case, there
will be a real part, and the imaginary part is zero; in the later case, there will
be an imaginary part, and the real part is zero.) Consequently,
∂ε
= 2 <[G]<[D] − =[G]=[D] − <[N ] <[G]< (jωp )i − =[G]= (jωp )i
∂ai
+ 2 <[G]=[D] + =[G]<[D] − =[N ] <[G]= (jωp )i + =[G]< (jωp )i
(32.33)
∂ε
= 2 <[G]<[D] − =[G]=[D] − <[N ] − < (jωp )i
∂bi
+ 2 <[G]=[D] + =[G]<[D] − =[N ] − = (jωp )i (32.34)
Equaling to zero,
∂ε
= 0 ⇔ <[D] =[G]2 + <[G]2 < (jωp )i +
∂ai
=[D] =[G]2 + <[G]2 = (jωp )i +
<[N ] =[G]= (jω)i − <[G]< (jωp )i +
=[N ] − =[G]< (jωp )i − <[G]= (jωp )i (32.35)
=0
∂ε
= 0 ⇔ <[G]<[D] − =[G]=[D] − <[N ] < (jωp )i +
∂bi
<[G]=[D] + =[G]<[D] − =[N ] = (jωp )i = 0 (32.36)
436 CHAPTER 32. IDENTIFICATION FROM FREQUENCY RESPONSES
The m + 1 equations given by (32.35) and the n equations given by (32.36) form
linear system (32.10), with matrixes and vectors dened by (32.17)(32.22).
Considering f frequencies instead of only one, we arrive at (32.11)(32.16).
Why the error is dened as Remark 32.2. Notice that error was dened as in (32.9) so that the minimisa-
it was tion problem should be linear on coecients b and a. That is why the denom-
inator D(jωp ) is used as a sort of weighting function. Otherwise, the problem
would not have as solution a system of linear equations such as (32.10).
High frequencies are given Remark 32.3. Using D(jωp ) is used as a weighting function in error ε gives
more weight more weight to high frequencies, since D(jωp ) is a polynomial and thus its
absolute value must increase with frequency ω . If Levy's method is applied,
and the performance of the resulting model is poor at low frequencies, this
Use weights to improve low eect can be counteracted, weighting the contributions of dierent frequencies
frequencies results in (32.11)(32.16) with weights that increase the inuence of low frequencies.
Alternative formulation of Remark 32.4. Instead of summing matrixes Ap , Bp , Cp and Dp , and vectors
Levy's method ep and gp , they can be stacked. In that case, instead of (32.10)(32.16), the
coecients in b and a will be found solving
A1 B1 b= e1
C1 D1 g1
a
A2 B2 e2
C2 D2 g2
(32.37)
.. .. ..
. . .
Af Bf ef
Cf Df gf
| {z } | {z }
H v
[b a]T = H+ v (32.38)
What to do if there are Remark 32.5. Model (32.6) is of type 0. If the frequency data corresponds to
poles at the origin a model with poles at the origin, the eect of such poles must be removed from
the data. Once the model is identied, the poles at the origin are then added.
Zeros at the origin cause no problem.
Example 32.4. The frequency response G(jω) of
5s + 10
G(s) = (32.39)
s(s2 + 0.2s + 1)
Figure 32.2: Frequency response of G(s), given by (32.39), and frequency re-
sponse of identied model Ĝ(s), given by (32.40).
Remark 32.6. If, in the example above, the model should have k poles at the
origin, then
1
Gcorrection (s) = (32.45)
sk
Remark 32.7. Levy's method requires knowing in advance the number of zeros
and poles needed in the model. The inspection of the Bode diagram should be
used beforehand for this purpose.
b1 b2 b3 b4
a0 + ··· (32.47)
a1 + a2 + a3 + a4 +
1
xk = , k∈N (32.51)
xk−1 − bxk−1 c
P−1 = 1 (32.52)
P0 = a0 (32.53)
Pk = ak Pk−1 + bk Pk−2 , k ∈ N (32.54)
Q−1 = 0 (32.55)
Q0 = 1 (32.56)
Qk = ak Qk−1 + bk Qk−2 , k ∈ N (32.57)
Then Rk = Pk
Qk is the value of the continued fraction, truncated after k terms.
Proof. This is proved by mathematical induction. For k = 1,
P1 a1 a0 + b1 b1
R1 = = = a0 + (32.58)
Q1 a1 + 0 a1
To prove the inductive step, notice that adding a further pair of coecients
means that the last denominator ak will be added a new fraction abk+1
k+1
. So, if in
ak Pk−1 +bk Pk−2 bk+1
Rk = Pk
Qk = ak Qk−1 +bk Qk−2 we replace ak with ak + ak+1 ,
bk+1
ak + ak+1 Pk−1 + bk Pk−2
Rk+1 =
bk+1
ak + ak+1 Qk−1 + bk Qk−2
Pk
z }| {
ak+1 (ak Pk−1 + bk Pk−2 ) +bk+1 Pk−1 Pk+1
= = (32.59)
ak (ak Qk−1 + bk Qk−2 ) +bk+1 Qk−1 Qk+1
| {z }
Qk
tk+1 − t0
=f0 (t0 ) +
f1 (tk+1 )
tk+1 − t0
=f0 (t0 ) + tk+1 −t0
f0 (tk+1 )−f0 (t0 )
Glossary
Every concept that can ever be needed, will be expressed by exactly
one word, with its meaning rigidly dened and all its subsidiary
meanings rubbed out and forgotten. Already, in the Eleventh Edi-
tion, we're not far from that point. But the process will still be
continuing long after you and I are dead. Every year fewer and
fewer words, and the range of consciousness always a little smaller.
George Orwell (1903 1950), Nineteen Eighty-Four, I5
chirp chirp
continued fraction fração contínua
down-chirp chirp descendente
up-chirp chirp ascendente
Exercises
1. Find a model for the frequency response in Table 32.1 using every method
in this chapter.
2. A controller is wanted for plant
s+1
G(s) = (32.74)
s3 + 2.2s2 + 100.4s + 20
You want a constant phase margin of 45◦ in [1, 10] rad/s.
32.5. OUSTALOUP'S METHOD 441
5. Figure 32.5 shows the Bode diagram of a LTI system. Find its transfer
function.
442 CHAPTER 32. IDENTIFICATION FROM FREQUENCY RESPONSES
Identication of
non-linearities
This chapter concerns the identication of non-linearities, already studied above
in Chapter 28 as to their inuence in control systems.
1
G(jω) = − (33.1)
N (U, ω)
The amplitude of the limit cycle will be U and its frequency ω . Additionally,
the limit cycle should be stable to be observed.
If a limit cycle is observed, the describing function N of the non-linearity
can be found from the measured values of U and ω .
Example 33.1. Consider the situation of Examples 28.6 and 28.7. The plant Calculations of the limit
has already been identied in open loop as cycle, backwards
1.4
G(s) = 2 (33.2)
s (s + 1)
When controlling the plant in closed loop, a limit cycle is found with frequency
0.76 rad/s and amplitude 4.68. Since there are no marginally stable poles, this
443
444 CHAPTER 33. IDENTIFICATION OF NON-LINEARITIES
(33.3)
Compare this with (28.50). There are two unknowns, both of them real numbers.
The real and the imaginary parts of (33.3) provide a system of equations to nd
them.
Exercises
1.5
1. The control system in Figure 33.1 includes plant G(s) = 2 and an
s (s + 1)
actuator with backlash. A limit cycle with period 7.757 s and amplitude
5.45 is observed. Find A and k .
3
2. The control system in Figure 33.2 includes plant G(s) = 2 and
s (s + 1)
the represented non-linearity, with C = 1. A limit cycle with 0.882 rad/s
and amplitude 2.155 is observed. Find A and B .
3. The control system in Figure 33.3 includes the represented non-linearity,
with k = 1. A limit cycle with 0.39 Hz and amplitude 10.2 is observed.
Find A and K1 .
33.3. IDENTIFICATION OF A PURE DELAY 445
447
449
`I just take the train from platform nine and three-quarters at eleven
o'clock,' he read.
His aunt and uncle stared.
`Platform what?'
`Nine and three-quarters.'
`Don't talk rubbish,' said Uncle Vernon, `there is no platform nine
and three-quarters.'
Chapter 34 introduces fractional order systems from their frequency responses and the
corresponding identication methods.
Chapter 35 shows how fractional derivatives are the origin of fractional order systems.
Chapter 36 concerns the time responses of fractional order systems and the corre-
sponding identication methods.
451
452CHAPTER 34. FRACTIONAL ORDER SYSTEMS AND THEIR FREQUENCY RESPONSES
12
Figure 34.1: Frequency response of 1
s+1 .
as well.
Notice, however, that the frequency responses of G1 (s) and G2 (s) are not the
same. (Figure 34.1 actually corresponds to G2 (jω), given by (34.12).) Transfer
functions G1 (s) and G2 (s) belong to two dierent types of fractional transfer
functions.
Explicit fractional transfer explicit, in which case it is the ratio of two linear combinations of powers
function of s, and may be
in sα :
b0 + b1 sα + . . . + bm smα
G(s) =
a0 + a1 sα + . . . + an snα
Xm
bk skα
k=0
= n (34.15)
X
kα
ak s
k=0
By contrast with these, transfer functions given by (9.3) may be called integer
order transfer functions.
Remark 34.1. (34.16) reduces to (34.15) if it turns out that all the βk in
the numerator and all the αk in the denominator are integer multiples of some
commensurability order α. Both (34.14) and (34.15) reduce to integer order
transfer functions if condition α ∈
/ N is relaxed.
Remark 34.2. Non-integer transfer functions would be a better name, since Fractional orders can be
fractional orders may in fact be irrational, but the name fractional stuck. irrational
Remark 34.3. Implicit fractional transfer functions have this name because
fractional powers of s are only implicitly found in (34.14). They are explicitly
seen in (34.15)(34.16).
We know that, as (2.45) shows, the Laplace transforms of derivatives orig- Where do fractional pow-
inate integer powers of s. We will defer to the next chapter the study of frac- ers of s come from?
tional order derivatives that originate fractional powers of s, and proceed with
the study of frequency responses of fractional transfer functions.
α function
G(s) = [Gi (s)] (34.17)
are the gain and the phase of the integer transfer function Gi (s) scaled by α,
i.e.
1
G(jω) = (34.23)
(jω)α
20 log10 |G(jω)| = −20α log10 ω dB (34.24)
∠G(jω) = −90◦ α (34.25)
Frequency response of 1
α , a rst-order polynomial on sα in the denominator with α, a ∈ R+ :
1 ( as ) +1
α
( as ) +1
1
G(jω) =
( jω
a )
α +1
1
= ω α (34.26)
cos απ
2 + j sin απ
2 a +1
1
|G(jω)| = q 2
α 2α 2
1 + ωa cos απ + ωa απ
2 sin 2
1
=r ω 2α ω α (34.27)
απ
1+ +2 cos
a a 2
√
| {z }
ζ(ω)
Notice that the gain may decrease monotonously or it may rst go up,
have a peak value, and then decrease, depending on the value of α. Indeed,
equaling the derivative of (34.27) to zero,
d 1
p =0
dω ζ(ω)
d
dω ζ(ω)
⇔ p =0
−2ζ(ω) ζ(ω)
2αω 2α−1 2αω α−1 απ
⇔ 2α
+ cos =0
a aα ω 2α απ
⇔ = − cos (34.34)
a 2
Notice that the left hand side of the equation is always positive, while
the right hand side will be positive if cos απ
2 < 0. So (34.34) will have a
34.2. FREQUENCY RESPONSES OF FRACTIONAL ORDER SYSTEMS 455
solution when
π απ 3π
+ 2kπ < < + 2kπ, k ∈ Z+0 ⇔
2 2 2
⇔ 4k + 1 < α < 4k + 3, k ∈ Z+
0 (34.35)
In other words, the gain will have a peak when 1 < α < 3∨5 < α < 7∨9 < When the gain of
1
α
( as ) +1
α < 11 ∨ . . .. (We known that this point where the derivative is equal to has a peak
zero is a maximum, and not a minimum or a saddle point, because the
gain is constant for low frequencies and decreases for high frequencies.)
The frequency at which there is a peak is found from (34.34):
απ α1
ωpeak = a − cos (34.36)
2
The peak of the gain is found replacing this in (34.27):
1
max |G(jω)| = q
ω απ
+ 2 − cos απ cos απ
1 + cos2 2 2 2
1 1
=p = (34.37)
1 − cos2 απ
2
sin απ 2
is given by
αω α−1 α α απ αω α−1
aα sin απ
2 (1+( ωa ) 2 )−( a ) sin
cos απ ω
2 aα cos απ
2
d (1+C(ω))2
∠G(jω) = − 2
dω
S(ω)
1 + 1+C(ω)
(34.39)
Notice that the denominator is always positive, and the numerator is a
fraction with a denominator which cannot be negative. So, supposing that
the derivative exists, its sign σ is
d
σ ∠G(jω) (34.40)
dω
αω α−1 απ αω 2α−1 απ απ αω 2α−1 απ απ
=σ − α
sin − sin cos + sin cos
| a{z } 2 | a2α 2 2 {z a2α 2 2}
∈R+ 0
απ
2kπ < < (2k + 1)π, k ∈ Z+
0 ⇔
2
4k < α < 4k + 2, k ∈ Z+
0 (34.41)
that is to say, if 0 < α < 2 ∨ 4 < α < 6 ∨ 8 < α < 10 ∨ . . .;
the phase will increase from 0◦ to 1 + α4 360◦ − α90◦ if
απ
(2k − 1)π < < 2kπ, k ∈ Z+ ⇔
2
4k − 2 < α < 4k, k ∈ Z+ (34.42)
that is to say, if 2 < α < 4 ∨ 6 < α < 8 ∨ 10 < α < 12 ∨ . . .;
456CHAPTER 34. FRACTIONAL ORDER SYSTEMS AND THEIR FREQUENCY RESPONSES
that is to say, if α ∈ {4, 8, 12, 16 . . .}, since in that case the derivative
is equal to 0;
the phase will have a discontinuity and jump from 0◦ to ±180◦ if
απ
= (2k + 1)π, k ∈ Z+
0 ⇔
2
α = 2 + 4k, k ∈ Z+
0 (34.44)
The two most common cases are 0 < α ≤ 1 and 1 < α < 2 (as we will
see in Chapter 36, no other cases can be stable). They correspond to the
Bode diagrams in Figure 34.2.
α
Frequency response of as + 1, a rst-order polynomial on sα in the numerator with α, a ∈ R+ :
s α
a +1 α
jω
G(jω) = +1
a
απ
απ ω α
= cos + j sin +1 (34.45)
2 2 a
20 log10 |G(jω)| ≈ 0 dB, ω a (34.46)
◦
∠G(jω) ≈ 0 , ω a (34.47)
απ απ
20 log10 |G(ja)| = 20 log10 cos + j sin + 1
r 2 2
απ
= 20 log10 2 + 2 cos
2
απ
= 10 log10 2 + 2 cos (34.48)
2
1 + cos απ
2 2 cos απ απ
4 cos 4
∠G(ja) = arctan απ = arctan
− sin 2 −2 sin 4 cos απ
απ
4
π
= α ± 2kπ, k ∈ Z (34.49)
4
20 log10 |G(jω)| ≈ 20α log10 ω − 20α log10 a dB, ω a (34.50)
∠G(jω) ≈ 90◦ α, ω a (34.51)
Frequency response of 2α
1
s α
, a second order polynomial on sα in the denominator with
1 ( as ) +2ζ ( a ) +1
2α α
( as ) +2ζ ( as ) +1
34.2. FREQUENCY RESPONSES OF FRACTIONAL ORDER SYSTEMS 457
α, a ∈ R+ :
1
G(jω) = (34.52)
jω 2α jω α
a + 2ζ a +1
20 log10 |G(jω)| ≈ 0 dB, ω a (34.53)
◦
∠G(jω) ≈ 0 , ω a (34.54)
20 log10 |G(jω)| ≈ 40α log10 a − 40α log10 ω dB, ω a (34.55)
∠G(jω) ≈ −180◦ α, ω a (34.56)
While it is simple to nd the conditions in which the gain has a resonance
peak if α = 1, when the order is fractional it is more expedient to nd
such conditions numerically. Figure 34.3 shows the combinations of values
of α and ζ for which there are zero, one or two resonance frequencies (that
is to say, for which the gain plot of the Bode diagram has zero, one or two
local maxima).
2α α
as + 2ζ as + 1, a second order polynomial on sα in the numerator Frequency response of
with α, a ∈ R+ : s 2α s α
a + 2ζ a +1
2α α
jω jω
G(jω) = + 2ζ +1 (34.57)
a a
20 log10 |G(jω)| ≈ 0 dB, ω a (34.58)
◦
∠G(jω) ≈ 0 , ω a (34.59)
20 log10 |G(jω)| ≈ 40α log10 ω − 40α log10 a dB, ω a (34.60)
∠G(jω) ≈ 180◦ α, ω a (34.61)
which can be found from the frequency responses of its three constituent rst
order polynomials in fractional powers of s. Notice that:
At ω = 10−5 rad/s, the phase goes down towards −60◦ , and the gain
slopes down at −13.33 dB/decade.
At ω = 1 rad/s, the phase godes up 45◦ , towards −15◦ , and the gain bends
up 10 dB/decade, ending with a still downwards slope of −3.33 dB/decade.
At ω = 105 rad/s, the phase goes down 63◦ , ending at −78◦ , and the
gain bends down −14 dB/decade, ending with a downwards slope of
−17.33 dB/decade.
At high frequencies, the gain has a slope of −10 dB and the phase is −45◦ .
1
The plant behaves like s− 2 .
The asymptotes of the gain for low and high frequencies are shown in the
gure, and intersect at 10 rad/s. It is also at that frequency that the phase
is halfway between its low and high frequency values.
34.4. LEVY'S METHOD EXTENDED 459
unting for the corner Beware of the temptation of writing the model as
ency
k1
G(s) = 1 (34.63)
s + 10
2
as if the plant were of integer order, and then nding the numerator k1 from
the value of the gain for low frequencies. As (34.30)(34.31) show, the actual
model should be
k2
G(s) = 21 (34.64)
s
10 +1
Since the order is not 1, (34.63) can never be the same as (34.64). The numerator
k2 is now found from the low frequency gain (20 dB for ω ≈ 0) as
k2
20 = 20 log10 21 ⇒ k2 = 10 (34.65)
0
10 +1
10
Thus, G(s) = 21 .
s
10 +1
m α
X
k
α bk s
N α (s) b0 + b1 s + . . . + bm sm
α
k=0
Ĝ(s) = Ĝi (s) = α = n
=
n
D (s) 1 + a1 s + . . . + an s X
1+ ak sk
k=1
(34.66)
1
is found identifying integer model Ĝi (s) from G α (jωp ) using Levy's method.
Proof. This is a straightforward consequence of (34.18)(34.19).
460CHAPTER 34. FRACTIONAL ORDER SYSTEMS AND THEIR FREQUENCY RESPONSES
Theorem 34.3. Let a plant's frequency response G(jωp ) be known at f fre- Levy's method for c
quencies, i.e. p = 1, 2, . . . , f . The model mensurate fractional o
models
m
X
kα
bk s
N (s) k=0
Ĝ(s) = = n (34.68)
D(s) X
kα
1+ ak s
k=1
is found solving
A B b e
= (34.72)
C D a g
f
X
A= Ap (34.73)
p=1
f
X
B= Bp (34.74)
p=1
f
X
C= Cp (34.75)
p=1
f
X
D= Dp (34.76)
p=1
f
X
e= ep (34.77)
p=1
f
X
g= gp (34.78)
p=1
Ap;l,c = −< (jωp )lα < [(jωp )cα ] − = (jωp )lα = [(jωp )cα ] ,
l = 0...m (34.83)
2 2
= −< (jωp )lα < [G(jωp )] + = [G(jωp )] ,
gp;l,1
l = 1...n (34.84)
Proof. The proof is similar to that of Theorem 32.1. Error (34.71) is given by
ε = |GD − N |2
2
= <[G] + j=[G] <[D] + j=[D] − <[N ] + j=[N ]
2
= <[G]<[D] − =[G]=[D] − <[N ] + j <[G]=[D] + =[G]<[D] − =[N ]
2 2
= <[G]<[D] − =[G]=[D] − <[N ] + <[G]=[D] + =[G]<[D] − =[N ]
(34.85)
(Notice that j kα can now assume any value, and will, in the general case, have
both a real part and an imaginary part is zero. This makes matrixes and vectors
(34.79)(34.84) more complicated than in the integer case.) Consequently,
∂ε
= 2 <[G]<[D] − =[G]=[D] − <[N ] <[G]< (jωp )iα − =[G]= (jωp )iα
∂ai
+ 2 <[G]=[D] + =[G]<[D] − =[N ] <[G]= (jωp )iα + =[G]< (jωp )iα
(34.95)
∂ε
= 2 <[G]<[D] − =[G]=[D] − <[N ] − < (jωp )iα
∂bi
+ 2 <[G]=[D] + =[G]<[D] − =[N ] − = (jωp )iα (34.96)
462CHAPTER 34. FRACTIONAL ORDER SYSTEMS AND THEIR FREQUENCY RESPONSES
Equaling to zero,
∂ε
= 0 ⇔ <[D] =[G]2 + <[G]2 < (jωp )iα +
∂ai
=[D] =[G]2 + <[G]2 = (jωp )iα +
<[N ] =[G]= (jω)iα − <[G]< (jωp )iα +
=[N ] − =[G]< (jωp )iα − <[G]= (jωp )iα (34.97)
=0
∂ε
= 0 ⇔ <[G]<[D] − =[G]=[D] − <[N ] < (jωp )iα +
∂bi
<[G]=[D] + =[G]<[D] − =[N ] = (jωp )iα = 0 (34.98)
The m + 1 equations given by (34.97) and the n equations given by (34.98) form
linear system (34.72), with matrixes and vectors dened by (34.79)(34.84).
Considering f frequencies instead of only one, we arrive at (34.73)(34.78).
Remark 34.4. Remarks on Theorem 32.1 apply here too. In particular, if the
model should have a0 = 0 in the denominator, the frequency response of sα
must be subtracted rst, just as was done for the integer case.
Remark 34.5. Notice that in the fractional case not only n and m (which
are integer) must be xed in advance, but also α (which has the additional
disadvantage of not being an integer). Reasonable ranges for these parameters
may be found by inspection of the Bode diagram.
Glossary
Lo anterior se reere a los idiomas del hemisferio austral. En los
del hemisferio boreal (de cuya Ursprache hay muy pocos datos en
el Onceno Tomo) la célula primordial no es el verbo, sino el adje-
tivo monosilábico. El sustantivo se forma por acumulación de adje-
tivos. No se dice luna : se dice aéreo-claro sobre oscuro-redondo o
anaranjado-tenue-del cielo o cualquier otra agregación. En el caso
elegido la masa de adjetivos corresponde a un objeto real; el hecho
es puramente fortuito.
Exercises
1. Establish a correspondence between Bode diagrams a and b in Figure 34.6,
polar plots A and B in Figure 34.7, and the following transfer functions:
1
G1 (s) = (34.99)
s(s + 1)1.5 (s
+ 2)
64.47 + 12.46s
G2 (s) = (34.100)
0.598 + 39.96s1.25
34.4. LEVY'S METHOD EXTENDED 463
a b
3. Figure 34.10 shows the Bode diagram of a LTI system. Find its transfer
function.
4. Figure 34.11 shows the Bode diagram of a LTI system. Find its transfer
function.
34.4. LEVY'S METHOD EXTENDED 465
a b
c d
In this chapter, fractional derivatives are introduced. They are at the origin
of fractional order transfer functions, and generalise the concept of derivative
to orders that do not need to be integer numbers. In fact, at the same time,
they also generalise the concept of integral, since the Fundamental Theorem of
2
Calculus shows we can identify dfdt(t) with f (t) dt, d dtf 2(t) with f (t) dtdt,
R RR
and so on.
Lemma 35.1.
Z +∞ +∞
e−y dy = −e−y 0 = 1 (35.2)
Γ(1) =
0
Theorem 35.1.
467
468 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
Proof.
Z +∞ +∞
Z +∞
e−y y x dy = −e−y y x y=0 − −e−y xy x−1 dy (35.4)
Γ(x + 1) =
0 | {z } |0 {z }
0
xΓ(x)
Γ(n) = (n − 1)! Remark 35.1. From (35.2) and from (35.3) it can be easily seen that
Theorem 35.2.
lim Γ(x) = +∞ (35.10)
x→0+
Proof.
+∞ 1 1 1
1 yx
Z Z Z
1
Γ(x) = e−y y x−1 dy > e−y y x−1 dy > e−1 y x−1 dy = =
0 0 0 e x y=0 ex
(35.11)
1
and since lim = +∞ the result follows.
x→0+ ex
Γ(x+2)
z }| {
Γ(x+1)
z }| { n−1
Y
Γ(x + n) = (x + n − 1) (x + n − 2) . . . (x + 1) xΓ(x) = Γ(x) (x + k), n ∈ N
| {z }
k=0
Γ(x+n−1)
| {z }
Γ(x+n)
(35.12)
This expression allows dening the Γ function for negative arguments:
In this way, by construction, (35.3) and (35.12) remain valid for all x ∈ R.
The evolution of Γ(x) around x = 0 is shown in gure 35.1. From the gure it
is clear that all non-positive integers are poles of function Γ. In other words:
Theorem 35.3.
lim Γ(x) = ∞, n ∈ Z−
0 (35.14)
x→n
(−1)b Γ(b − a)
a
= (35.24)
b Γ(b + 1)Γ(−a)
470 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
when n ∈ Z− ∧ a ∈
/ Z− ,
∈R\{0}
z }| {
a Γ(a + 1)
lim = =0 (35.25)
b→n b lim Γ(b + 1) lim Γ(a − b + 1)
b→n b→n
| {z } | {z }
∞ ∈R\{0}
when n ∈ Z− ∧ a ∈
/ Z− ,
∈R\{0}
z }| {
a Γ(a + 1)
lim = =0 (35.26)
a−b→n b lim Γ(b + 1) lim Γ(a − b + 1)
b→a−n a−b→n
| {z } | {z }
∈R\{0} ∞
∈R\{0}
z }| {
b
(−1) lim Γ(b − a)
a b−a→n−m∈N
lim = =0 (35.27)
(a,b)→(m,n) b lim Γ(b + 1) lim Γ(−a)
b→n a→m
| {z } | {z }
∞ ∈R\{0}
Denition 35.3.
Γ(a + 1)
, if a, b, a − b ∈
/ Z−
Γ(b + 1)Γ(a − b + 1)
a
= (−1)b Γ(b − a)
b , if a ∈ Z− ∧ b ∈ Z+ 0
Γ(b + 1)Γ(−a)
0, if [(b ∈ Z− ∨ b − a ∈ N) ∧ a ∈ / Z− ] ∨ (a, b ∈ Z− ∧ |a| > |b|)
(35.28)
Theorem 35.5.
a a a+1
+ = (35.29)
b b−1 b
Remark 35.2. The recursion used to dene the n ∈ Z− branches means that
Z x Z x
n
c Dx f (t) = ··· f (t) dt · · · dt, n ∈ Z− (35.36)
c c
| {z }
|n| integrations
Z c Z c
n
x Dc f (t) = ··· f (t) dt · · · dt, n ∈ Z− (35.37)
x x
| {z }
|n| integrations
(where the last equalities in (35.48) and (35.56) are a result of (35.20)(35.21))
we are tempted to write
Γ(λ + 1) λ−α
α λ
0 Dt t = t , t ∈ R+ , λ ∈
/Z (35.57)
Γ(λ − α + 1)
also when α ∈
/ Z.
Remark 35.4. Notice how in these two examples of apparently simple gener-
alisation of D to non-integer orders the lower limit of integration is in one case
c = −∞ and in the other c = 0.
df (t) f (t) − f (t − h)
D1 f (t) = = lim (35.58)
dt h→0 h
Theorem 35.7. The derivative of order n ∈ N of function f (t) is given by Derivative of order n
n
X n
(−1)k f (t − kh)
dn f (t) k
Dn f (t) = = lim k=0 (35.59)
dtn h→0 hn
1 1
(−1)0 f (t − 0) + (−1)1 f (t − h)
0 1
1
D f (t) = lim (35.60)
h→0 h1
474 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
it might as well be +∞ that the denition would not change. All the extra
terms would be zero, thanks to the rst branch of (35.28) and to (35.10).
For non-integer orders, it is unclear what it should be, but, since we want
D−1 f (t) = f (t) dt, we make α = −1 in (35.62); then, using (35.24) we get
R
?
X −1
(−1)k f (t − kh)
k
k=0
D−1 f (t) = lim
h→0 h−1
?
X (−1)k Γ(k + 1)
= lim h (−1)k f (t − kh) (35.63)
h→0 Γ(k + 1)Γ(1)
k=0
Rt −1
If this is to be a Riemann
t−c integral c f (t) dt = c Dt f (t), the upper limit of the
summation must be h , and h must be restricted to positive values. Thus,
we arrive at
35.4. THE RIEMANN-LIOUVILLE DEFINITION OF FRACTIONAL DERIVATIVES 475
nwald-Letniko deni-
of fractional deriva- Denition 35.6.
b t−c
h c
X
k α
(−1) f (t − kh)
k
k=0
α
c Dt f (t) = lim (35.64)
h→0+ hα
Remark 35.6. Only when α ∈ N does the summation have a nite number of D is non-local in the gen-
terms. In other words, α ∈ N is the only case in which (35.64) does not depend eral case
on c. That is to say, D is a non-local operator (depending on what happens
to f (t) between the integration limits c and t), except for the case of natural But D is local for positive
d2 d3
order derivatives ( dt
d
, dt 2 , dt3 and so on) and the case α = 0. In this respect,
integer orders
fractional derivatives look like the integrals, not the derivatives, we are used to
from Calculus; and this irrespective of the sign of α.
α
c Dt [af (t) + bg(t)] = ac Dtα f (t) + bc Dtα g(t), a, b ∈ R (35.66)
Proof.
b t−c
h c
X
k α
(−1) (af (t) + bg(t))
k
α k=0
c Dt (af (t) + bg(t)) = lim
h→0+ hα
b t−c
h c b t−c
h c
X
k α X
k α
(−1) f (t) (−1) g(t)
k k
k=0 k=0
= a lim + b lim
h→0+ hα h→0+ hα
= a c Dtα f (t) α
+ b c Dt g(t) (35.67)
b c−t
h c
X
k α
(−1) f (t + kh)
k
k=0
α
t Dc f (t) = lim+ (35.68)
h→0 hα
Theorem 35.9. If all the derivatives exist, the equality Law of exponents
m n
c Dt c Dt f (t) = c Dtm+n f (t) (35.69)
476 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
m, n ∈ Z+
0 (35.70)
m, n ∈ Z−
0 (35.71)
+
m∈Z ∧n∈Z −
(35.72)
Proof. The rst two cases wherein (35.69) holds are obvious consequences of
denition (35.34). The third case can be easily proven by mathematical induc-
tion from the fact that dierentiation is the left inverse operator of integration,
that is to say, D1 c Dt−1 f (t) = f (t).
Remark 35.8. If none of (35.70)(35.72) holds, that is to say, if m ∈ Z− ∧ n ∈
Z+ , then, when calculating c Dtm c Dtn f (t), integration constants appear, related
to initial conditions at t = c. This means that (35.69) will only hold if all the
integration constants are equal to zero.
Cauchy's formula Theorem 35.10. The indenite integral of order n ∈ N of function f (t) is
given by
n integrations
z Z x }| { Z
x x
(x − t)n−1
Z
D
c x
−n
f (t) = · · · f (t) dt · · · dt = f (t) dt (35.73)
c c c (n − 1)!
Z c Z c Z c
(t − x)n−1
D
x c
−n
f (t) = · · · f (t) dt · · · dt = f (t) dt (35.74)
x x x (n − 1)!
| {z }
n integrations
Proof. For n = 1, both (35.73) and (35.74) are trivial. The proof proceeds by
mathematical induction and is based upon Dirichlet's equality for a function of
two variables x1 and x2 :
Z x Z x1 Z xZ x
f (x1 , x2 ) dx2 dx1 = f (x1 , x2 ) dx1 dx2 (35.75)
c c c x2
If f does not depend on x1 , but on x2 alone (see the integration area in g-
ure 35.2),
Z x Z x1 Z xZ x
f (x2 ) dx2 dx1 = f (x2 ) dx1 dx2 (35.76)
c c c x2
Z x Z x Z x
= f (x2 ) dx1 dx2 = f (x2 )(x − x2 ) dx2
c x2 c
When the indenite limit of integration comes rst, (35.76) becomes (see the
integration area in gure 35.2)
Z cZ c Z c Z x2
f (x2 ) dx2 dx1 = f (x2 ) dx1 dx2 (35.78)
x x1 x x
Z c Z x2 Z c
= f (x2 ) dx1 dx2 = f (x2 )(x2 − x) dx2
x x x
35.4. THE RIEMANN-LIOUVILLE DEFINITION OF FRACTIONAL DERIVATIVES 477
x2 x2
x1 = x2 x1 = x2
x c
c x
x1 x1
c x x c
Figure 35.2: Left: integration area of (35.76); right: integration area of (35.78).
Proof. This is easily proved using the Riemann-Liouville denition. The result
is trivial for α = 0. For α < 0,
Z t
1
L [0 Dtα f (t)] = L (t − τ )−α−1 f (τ ) dτ (35.85)
Γ(−α) 0
is applied to a stable fractional system G(s), the output, after the transient
regime has passed away, is
Lemma 35.2.
b x−c
h c
X (kh)n−1
−n
c Dx f (t) = lim h f (x − kh) (35.93)
h→0+ (n − 1)!
k=0
to (35.73).
We can now show using the Grünwald-Letniko denition that c Dt−n f (t) is
in fact equal to
Z x Z x
··· f (t) dt · · · dt (35.95)
|c c
{z }
n integrations
According to (35.93), the limits inside the summation with index i would be
n−1−i
the integrals of f of order i + 1 if it were not for the fraction i! a(n−1)!
ih
. Since
h n−1−i
→ 0, these fractions converge to zero and thus the entire summation is
equal to zero: all that is left is the rst limit, which, again according to (35.93),
is indeed the nth order integral of f , as we might expect.
where σ is the stress, ε is the strain, and E is Young's modulus. For a viscous
material,
dε(t)
σ(t) = η (35.100)
dt
480 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
where η is viscosity.
Inbetween elasticity and viscosity lies viscoelasticity. The behaviour of the Viscoelasticity
material may be modelled as
1 1
σ(t) = Eτ 2 0 Dt2 ε(t) (35.101)
where τ is a time constant. Actually the fractional order can change according
to whether the viscoelastic behaviour is closer to elasticity or viscosity.
Diusion Heat diusion and mass diusion are also areas of application of fractional
order models, as in Example 36.5 of Chapter 36.
Glossary
And behold, when ye shall come unto me, ye shall write them and
shall seal them up, that no one can interpret them; for ye shall write
them in a language that they cannot be read. And behold, these
two stones will I give unto thee, and ye shall seal them up also, with
the things which ye shall write. For behold, the language which ye
shall write, I have confounded; wherefore I will cause in my own due
time that these stones shall magnify to the eyes of men, these things
which ye shall write.
Joseph Smith Jr. (1805 1844), The Book of Mormon, Book of Ether, iii
22-24
Exercises
1. Consider a commensurable transfer function G(s) given by
m
X
bk skα
k=0
G(s) = n (35.102)
X
kα
ak s
k=0
built with the same numerator and denominator coecients. Show that
the frequency response G(jω):
(a) can be obtained calculating G̃(j α ω α );
(b) can be obtained evaluating G̃(s) over the ray s = j α ω α , ω ∈ R+ ,
shown in gure 35.3.
=[σ] =[σ]
απ απ
2 2
<[σ] <[σ]
Figure 35.3: Ray where G̃(s) is evaluated to obtain G(jω); left: 0 < α < 1;
right: 1 < α < 2.
m
h
of the curve such that the time T that the mass takes to reach the bot-
tom of the curve be constant, irrespective of the value of h. Such curve
is thereby called tautochrone (from the Greek words ταὐτός, same, and
χρόνος, time).
(a) Find an expression for the total mechanical energy of the mass at
any height y .
(b) Show that
(35.104)
p
V = 2g(h − y)
at any height y .
(c) Let ` be the distance travelled along the curve by the mass, from
height y to the end of the curve, given by
s 2
Z y
dx
`(y) = 1+ dy (35.105)
0 dy
Show that T (h) is given by
Z h
1 d`(y)
T (h) = p dy (35.106)
0 2g(h − y) dy
(d) If the curve is tautochrone, T (h) does not depend on h. Knowing
that
√
1
Γ = π (35.107)
2
show from the Riemann-Liouville denition of D that
r
− 12 d`(y) 2gT 2
0 Dy = (35.108)
dy π
(e) Apply a 1
2 order derivative to both sides of the last result and show
that √
d`(y) 2gT − 1
= y 2 (35.109)
dy π }
| {z
a
482 CHAPTER 35. FRACTIONAL ORDER DERIVATIVES
π2 .
a horizontal straight line, with radius r = a2 = gT
Chapter 36
1 k!(±1)k
Dk = , k ∈ Z+
0 (36.8)
1∓t (1 ∓ t)k+1
Proof. This is proved by mathematical induction. For k = 0 the equality is
obvious, and the inductive step is proved as follows:
d k!(±1)k (k + 1)!(±1)k+1
k+1
= (−k − 1)k!(±1)k (1 ∓ t)−k−2 = (36.9)
dt (1 ∓ t) (1 ∓ t)k+2
483
484CHAPTER 36. TIME RESPONSES OF FRACTIONAL ORDER SYSTEMS
+∞
1
Corollary 36.1. The MacLaurin series of
X
is (±t)k .
1∓t
k=0
we obtain
+∞
X k!
(±1)k tk (36.11)
k!
k=0
The series converges for |t| < 1; otherwise its terms do not converge to 0 when
k → +∞.
k
Eα,β (±atα )
Theorem 36.1. The Laplace transform of tαk+β−1 d d(±atα )k
, 0 is
k ∈ Z+
k α
k!sα−β
αk+β−1 d Eα,β (±at )
L t = (36.12)
d(±atα )k (sα ∓ a)k+1
Proof. First we notice that
+∞ +∞ +∞
(±z)k tαk
Z Z X
−t β−1 α −t β−1
e t Eα,β (±zt ) dt = e t dt
0 0 Γ(αk + β)
k=0
+∞ Z +∞
X (±z)k
= e−t tαk+β−1 dt
Γ(αk + β) 0
k=0 | {z }
Γ(αk+β)
1
= (36.13)
1∓z
Dierentiating the rightmost and the leftmost members of (36.13) k ∈ Z+
0 times,
Z +∞
k!(±1)k dk
= e−t tβ−1 Eα,β (±ztα ) dt
(1 ∓ z)k+1 dz k 0
Z +∞
dk
= e−t tβ−1 (±tα )k E (±ztα ) dt
α )k α,β
(36.14)
0 d(±zt
We now replace t with st (and thus dt with s dt) and get
Z +∞
k!(±1)k k α α
k αk αk d Eα,β (±zs t )
= e −st β−1 β−1
s t (±1) s t s dt (36.15)
(1 ∓ z)k+1 0 d(±zsα tα )k
Rearranging the terms and replacing zsα with a (and thus z with sα ),
a
Z +∞
k! dk Eα,β (±atα )
k+1
= e−st tαk+β−1 dt (36.16)
sβ sαk 1 ∓ saα d(±atα )k
0
By comparison with (2.1), the right hand member can be seen to be the Laplace
k!s−β sα k!sα−β
transform in (36.12). The left hand member is α(k+1) k+1 = (sα ∓a)k+1 .
s (1∓ saα )
Corollary 36.2. Making k = 0 in (36.12),
sα−β
L tβ−1 Eα,β (±atα ) = α (36.17)
s ∓a
Corollary 36.3. Making α = β in (36.17),
1
L tα−1 Eα,α (±atα ) = (36.18)
sα ∓ a
Corollary 36.4. Making α = 1 in (36.17),
s1−β
L tβ−1 E1,β (±at) = (36.19)
s∓a
36.2. TIME RESPONSES OF SIMPLE FRACTIONAL ORDER TRANSFER FUNCTIONS 485
roximation of E for The inverse Laplace transforms corresponding to the relations above become
t easier to evaluate for |t| → +∞ using the following approximations, given here
without proof:
1 1−β t1/α
Eα,β (t) ≈ t α e (36.21)
α
n
dn Eα,β (t) X ak,n (α, β) 1−(2n−k)α−β+2(n−k) 1/α
≈ t α et (36.22)
dtn αn+1
k=0
4s1/2 − 1
1 3
L −1
=L −1
+
s + s1/2 − 2 s1/2 − 1 s1/2 + 2
1 1 1 1
= t− 2 E 21 , 12 (t 2 ) + 3t− 2 E 21 , 12 (−2t 2 ) (36.23)
s1/3 √ 1 √
1 2 1
L −1 √ + √ = t− 3 E 1 , 1 ( 2t 3 ) + t− 3 E1, 2 ( 2t) (36.25)
1/3
s − 2 s− 2 3 3 3
and is equal to
Z t E 1 1 (−√t − τ ) E 1 1 (−4 √
3
τ)
2 2,2 3,3
L −1
1 1 L [δ(t)] = 2 √ √
3
dτ
(s 2 + 1)(s 3 + 4) t−τ τ 2
0
(36.41)
π
∀ s : D(s) = 0, |∠s| > (36.42)
2
restricting ∠s to [−π, +π] rad.
We will not prove this theorem in the general case; only in the form it takes
for the particular case of commensurable transfer functions:
n
X
A(σ) = ak σ k (36.43)
k=0
Proof. If A(σ) has no roots with multiplicity higher than one, G(s) can be
written as a partial fraction expansion:
n
X ρk
G(s) = (36.46)
sα − σk
k=1
The asymptotic behaviour (36.21) shows that for t large enough this will become
n n
X 1 1−α α 1 X ρk 1−α 1/α
y(t) ≈ ρk tα−1 (σk tα ) α e(σk t ) α = σ α etσk (36.48)
α α k
k=1 k=1
h i
1/α
This response will tend to zero if < σk < 0. Since
h
1/α
i h i ∠σk ∠σk
< σk = < (|σk |ej∠σk )1/α = < |σk |1/α cos + j sin (36.49)
α α
The regions where the σ may lie in the case of a stable commensurable
transfer function are shown in gure 36.1.
=[σ] =[σ]
απ απ
2 2
<[σ] <[σ]
Figure 36.1: In grey: regions of the complex plane where the roots of A(σ)
may lie in the case of a stable commensurate transfer function, according to
Matignon's theorem; left: 0 < α < 1; right: 1 < α < 2.
Remark 36.1. For integer systems we reach the usual criterion of stability: all
poles must have a negative real part.
Orders α>2 make plants Orders α > 2 make the system necessarily unstable.
unstable
Example 36.4. Figure 36.2 shows four applications of Matignon's theorem.
1 2 ± 2j 1
Yes
s2/3 − 4s1/3 + 8 3
1 2 ± 2j 1
No (on the limit)
s − 4s1/2 + 8 2
1 2 ± 2j 2
No
s4/3 − 4s2/3 + 8 3
s4/3 − 2 −2 ± 2j 4
Yes
s8/3 + 4s4/3 + 8 3
for indeed
s x√ ds s −x√ ds
r r
∂Θ(x, s)
= k1 e − k2 e (36.58)
∂x d d
∂ 2 Θ(x, s) s √s s √s
2
= k1 ex d + k2 e−x d (36.59)
∂x d d
Because lim Θ(x, s) < +∞ (which means that the temperature inside the
x→−∞
body cannot grow innitely), it is necessary that k2 = 0. Hence the solution
must verify √s
Θ = k1 ex d (36.60)
where Θ = L [θ].
An estimate of the age of the Earth estimate was arrived at by Lord Kelvin Age of the Earth
from the heat equation, and redone by Heaviside using fractional derivatives in
a manner similar to the following. From (36.60) we get
s x√ ds
r
∂Θ(x, s) 1 1
= k1 e = s 2 √ Θ(x, s) (36.61)
∂x d d
Using an inverse Laplace transform (with zero initial conditions) and making
x = 0 we conclude that the temperature gradient at the surface must verify
∂θ(0, t) 1 1
= √ 0 Dt2 θ(0, t) (36.62)
∂x d
We now assume that the radius of the Earth is large enough for the planet to
be compared to a semi-innite solid; that its temperature, when it was formed,
490CHAPTER 36. TIME RESPONSES OF FRACTIONAL ORDER SYSTEMS
Tsf
was θ(0, 0) = 3900 ◦ C, which is the temperature of molten rock; and that
its surface has a constant temperature of 0 ◦ C. It immediately follows from
(36.75), proved in Exercise 7, that an expression for the temperature gradient
at the surface when the Earth was formed is
∂θ(0, 0) 1 3900 ◦ C
=√ √ (36.63)
∂x d πt
Assuming that the expression found is valid in the future, knowing that d =
1.178 × 10−6 m2 /s and that nowadays the temperature gradient at the surface
of the Earth is 1 ◦ C for every 27.43 m (as measured in the 19th century), we
can now estimate the age of the Earth: rather than making t = 0 in (36.63),
substituting numerical values and solving in order to t we get t = 3.0923 ×
1015 s = 98 × 106 years.
Actually, the currently accepted age for the Earth is 4.54 × 109 years: Lord
Kelvin's estimate is faulty because it does not take into account heat production
due to radioactive decay, unsuspected at the time. Of course, as the Earth is
heated from inside, it takes longer to cool down that it otherwise would.
the nature of the system is such that a fractional order model can be
expected (presence of diusion, or viscoelasticity, or another phenomenon
known to lead to such models); or
Figure 36.5: Left: integer order models. Right: fractional order models.
(Source: Wikimedia. Credit for the idea in this Figure goes to Professors
YangQuan Chen, Igor Podlubny and Blas Vinagre.)
Exercises
1. Use Matignon's theorem to nd whether the following transfer functions
are stable.
1
G1 (s) = 1/2
(36.64)
s − 6s + 18
1
G2 (s) = 4/3
(36.65)
s − 6s2/3 + 18
s4/3 − 2
G3 (s) = (36.66)
s8/3 + 6s4/3 + 18
1
G4 (s) = (36.67)
s2/3 − 6s1/3 + 18
492CHAPTER 36. TIME RESPONSES OF FRACTIONAL ORDER SYSTEMS
Γ(λ + 1)
L α λ
= sα = sα−λ−1 Γ(λ + 1), λ > −1 (36.71)
0 Dt t
sλ+1
Stochastic systems
493
495
Chapter 37 introduces stochastic processes and systems, and the tools to characte-
terise them.
Chapter 38 introduces the important concept of spectral density; it is yet another tool
to characterise stochastic processes and systems, but is so important that
it deserves a chapter on its own.
Chapter 41 describes dierent types of models for digital stochastic systems and how
to identify them from data.
497
498 CHAPTER 37. STOCHASTIC PROCESSES AND SYSTEMS
Figure 37.2: Two dimensional random walk. Left: the x and y coordinates as
functions of time. Right: the movement on the plane, beginning at (0, 0) and
following the random walks in the left plot.
Example 37.2. Brownian motion can be better modelled replacing the unbi-
ased random walk by a stochastic process which is also discrete in time but
continuous in amplitude:
in each time instant, the particle travels a distance d which is a random
number, following a normal distribution with zero mean and variance σ 2 ;
37.1. STOCHASTIC PROCESSES 499
the probability mass function (PMF) fX (x), if the variable assumes PMF
values in a discrete set, in which situation each of the N possible outcomes
xk , k = 1, 2 . . . N has a probability P X(t) = xk which veries
(37.5)
0 ≤ P X(t) = xk ≤ 1, ∀k = 1, 2 . . . N
N
X
(37.6)
P X(t) = xk = 1
k=1
(37.7)
fX (x) = P X(t) = x
the probability distribution function (PDF) fX (x), if the variable as- PDF
sumes values in a continuous set, in which situation each possible outcome
x has a probability
(37.8)
P X(t) = x = 0, ∀x
since there are innitely many outcomes. The PDF is dened so that
fX (x) ≥ 0, ∀x (37.9)
Z x2
(37.10)
P x1 ≤ X(t) ≤ x2 = fX (x) dx, x1 < x2
x1
Z +∞
fX (x) dx = 1 (37.11)
−∞
variance;
standard deviation;
autocorrelation;
autocorrelation coecient;
autocovariance.
Denition 37.4. The expected value E[X(t)] of a stochastic process X(t) is Expected value
the centroid of its distribution:
Z +∞
E[X(t)] = x fX (x) dx, for a PDF (37.17)
−∞
N
X
E[X(t)] = xk fX (xk ), for a PMF (37.18)
k=1
To estimate the expected value of a stochastic process from the values ob- Mean
served up to time t, the mean of the observed values X(t) is used.
Denition 37.6. The mean of a signal sampled in time with sampling time Ts ,
for n + 1 measurements from t = 0 to t = Ts n, is
n
1 X
X(t) = Xk (37.20)
n+1
k=0
Corollary 37.1.
2
2
X 2 (t) = X(t) + σX (37.24)
Denition 37.8. The standard deviation σX is the square root of the vari- Standard deviation
ance:
q
σX = 2
σX (37.27)
Example 37.4. The more samples of a process we have, the better our esti-
mation of its mean and variance is. Consider a uniform distribution X in [0, 1],
which has, applying (37.17) and (37.23),
(
1, if 0 ≤ x ≤ 1
fX (x) = (37.28)
0, otherwise
Z 1
1
E[X] = x dx = (37.29)
0 2
Z 1 2
1 1 1 1
2
σX = x2 dx − = − = (37.30)
0 2 3 4 12
Matlab's commands In three instances of 10 samples of this stochastic process, the mean and the
mean and var variance are
>> for k=1:4, X=rand(1,10); disp(['mean ' num2str(mean(X))...
', variance ' num2str(var(X))]), end
mean 0.62386, variance 0.11961
mean 0.66021, variance 0.10946
mean 0.58731, variance 0.086137
mean 0.39782, variance 0.13008
Means and variances do not stray much from the expected values, but are much
closer to them with 100 samples:
>> for k=1:4, X=rand(1,100); disp(['mean ' num2str(mean(X))...
', variance ' num2str(var(X))]), end
mean 0.49027, variance 0.080127
mean 0.46436, variance 0.071762
mean 0.49628, variance 0.084483
mean 0.49745, variance 0.078337
And even more with 1000:
>> for k=1:4, X=rand(1,1000); disp(['mean ' num2str(mean(X))...
', variance ' num2str(var(X))]), end
mean 0.50516, variance 0.081755
mean 0.48485, variance 0.082201
mean 0.49836, variance 0.082948
mean 0.4916, variance 0.083498
Remark 37.4. Notice how the estimates of the mean and the variance are
random variables themselves. That is why, in the previous example, several
instances of each were found for the same number of samples. If they are
updated in real time, their time-changing values will be stochastic processes
too.
Autocorrelation Denition 37.9. The autocorrelation RX (t1 , t2 ) of a stochastic process de-
pends on two time instants t1 and t2 and is given by
Remark 37.6. (37.36) can also be seen as a consequence of (37.32) and (37.34):
since RX (t1 , t2 ) in fact only depends on τ = t2 − t1 , then
RX (τ ) = RX (t2 − t1 ) = RX (t1 , t2 ) = RX (t2 , t1 ) = RX (t1 − t2 ) = RX (−τ )
(37.37)
Theorem 37.3. For τ = 0,
2
2
RX (0) = E [X(t)X(t)] = X 2 (t) = X(t) + σX (37.38)
The last equality is taken from (37.24).
To estimate the autocorrelation, the expected value in (37.35) is estimated
using a mean, as in (37.19)(37.20):
In the continuous case, for measurements from t = 0 to t = tnal :
Z tnal −τ
1
RX (τ ) = x(t)x(t + τ ) dt (37.39)
tnal − τ 0
Figure 37.5: Top: autocorrelation of uniformly distributed values in [0, 1]. Bot-
tom: autocorrelation of standard normally distributed values.
506 CHAPTER 37. STOCHASTIC PROCESSES AND SYSTEMS
Figure 37.7: Nothing is more similar to a signal than itself. The gures show
how the product X(t)X(t + τ ), used to calculate the autocorrelation RX (τ ) =
E [X(t)X(t + τ )], is found.
2
Proof. Since (X(t + τ ) ± X(t)) ≥ 0, its expected value is also non-negative:
h i
2
E (X(t + τ ) ± X(t)) ≥ 0
h i
2 2
⇒E (X(t + τ )) ± 2X(t)X(t + τ ) + (X(t)) ≥ 0
h i h i
2 2
⇒E (X(t + τ )) ± E [2X(t)X(t + τ )] + E (X(t)) ≥ 0
h i h i
2 2
⇒ E (X(t + τ )) ± E [2X(t)X(t + τ )] + E (X(t)) ≥ 0
| {z } | {z } | {z }
2RX (τ )
RX (0) RX (0)
where the last result was obtained applying (37.38). From these two inequalities,
( (
RX (0) + RX (τ ) ≥ 0 RX (τ ) ≥ −RX (0)
⇒ ⇒ −RX (0) ≤ RX (τ ) ≤ RX (0)
RX (0) − RX (τ ) ≥ 0 RX (0) ≥ RX (τ )
(37.45)
This range can actually be narrowed down further, as seen below in (37.55).
Meanwhile, it is possible to better understand why (37.43) is true with the
following reasoning:
RX (τ ) is the expected value of the product X(t)X(t + τ ).
In cases such as this, −RX (0) recurs whenever X(t) and X(t + τ ) are in
phase opposition.
The reasoning above also justies the following results.
Theorem 37.5. If X(t) is not periodic,
|RX (τ )| < RX (0), ∀τ 6= 0 (37.47)
Figure 37.8: Left: how RX (0) recurs in the autocorrelation when τ is a multi-
ple of the period. Centre: how −RX (0) recurs in the autocorrelation when a
periodic signal is symmetrical. Right: periodic signal with zero mean for which
it is impossible that RX (τ ) = −RX (0).
If X(t) is symmetric,
1
X t+ k+ T = −X(t), k ∈ Z
2
1
⇒ X(t)X t + k + T = −X 2 (t)
2
1
⇒ RX k+ T = −RX (0) (37.49)
2 | {z }
| {z } −E[X 2 (t)]
E [X(t)X (t+(k+ 21 )T )]
E[X] E[X]
z }| { z }| {
= E [X(t)X(t + τ )] − E[X] E [X(t)] − E[X] E [X(t + τ )] +E[X]2
| {z } | {z } | {z }
RX (τ ) E[X]2 E[X]2
= RX (τ ) − E[X] 2
(37.52)
37.2. CHARACTERISATION OF STOCHASTIC PROCESSES 509
Joint PMF Denition 37.13. The joint probability mass function (joint PMF) fXY (x, y),
of two variables that assume values in a discrete set is dened so that
fXY (x, y) = P X(t) = x ∧ Y (t) = y
= P X(t) = x | Y (t) = y P (Y (t) = y)
(37.65)
= P Y (t) = y | X(t) = x P (X(t) = x)
0 ≤ fXY (x, y) ≤ 1, ∀x, y (37.66)
XX
fXY (x, y) = 1 (37.67)
x y
37.3. RELATIONS BETWEEN STOCHASTIC PROCESSES 511
t CDF Denition 37.14. The joint cumulative distribution function (joint CDF)
of two probability distributions is a function FXY (x, y) such that
Just as we did when we had only one stochastic process, each of the following
statistical properties will be
dened for two stochastic processes;
Since ∆t can take any value, we can make ∆t = −t1 and conclude that
In other words, for stationary processes the correlation only depends on the
time interval between two instants τ = t2 − t1 :
While this is similar to what happens with the autocorrelation, the corre-
lation, unlike the autocorrelation, is not an even function in the general case.
Figure 37.9 illustrates why.
Additionally, the order of the signals X(t) and Y (t) matters. RXY (τ ) = RY X (−τ )
Theorem 37.7.
RXY (τ ) = E [X(t)Y (t + τ )] = E Y (t + τ )X(t) =
| {z }
t0
0 0
= E [Y (t )X(t − τ )] = RY X (−τ ) (37.76)
Theorem 37.8.
(37.77)
p p
− RX (0)RY (0) ≤ RXY (τ ) ≤ RX (0)RY (0), ∀τ
512 CHAPTER 37. STOCHASTIC PROCESSES AND SYSTEMS
Proof. The proof diers from that of (37.43): a similar reasoning would lead
to more conservative boundaries for RXY (τ ). This time it has to be argued
that the expected value E[x] is a norm, and consequently, the Cauchy-Schwartz
inequality, which in the general case states that a norm veries
2
|hu, vi| ≤ hu, ui hv, vi (37.78)
Consequently,
2 h i h i
2 2
E [X(t)Y (t + τ )] ≤ E (X(t)) E (Y (t + τ ))
= E [X(t)X(t)] E [Y (t + τ )Y (t + τ )] (37.80)
| {z } | {z }
RX (t−t)=RX (0) RY (t+τ −(t+τ ))=RY (0)
Figure 37.11: Correlation of two independent random signals with normal dis-
tribution.
h i
CXY (τ ) = E (X(t) − E[X]) (Y (t + τ ) − E[Y ])
= E [X(t)Y (t + τ ) − X(t)E[Y ] − E[X]Y (t + τ ) + E[X]E[Y ]]
= E [X(t)Y (t + τ )] − E [X(t)E[Y ]] − E [E[X]Y (t + τ )] + E [E[X]E[Y ]]
= E [X(t)Y (t + τ )] −E[X]E[Y ] − E[X]E[Y ] + E[X]E[Y ]
| {z }
RXY (τ )
q q
− 2 σ2 ≤ C
σX Y XY (τ ) ≤
2 σ2
σX Y (37.90)
Correlation coecient Correlation (and covariance) can be normalised just like the autocorrelation
(and the autocovariance).
RXY (τ ) − X Y CXY (τ )
ρXY (τ ) = = (37.92)
σX σY σX σY
can be found as in the case of RX and CX . But, unlike them, matrices RXY
and CXY are not symmetric. The matrix denoted by ρXY in (37.94) is the Correlation coecient ma-
correlation coecient matrix. trix
Proof. (37.95) and (37.97) have already been used and can be proved from the
fact that the limit of the mean is the expected value, as stated in (37.21).
Assuming continuous time,
Z tnal
1
E[X(t) ± Y (t)] = lim x(t) ± y(t) dt
tnal →+∞ tnal 0
Z tnal Z tnal
1 1
= lim x(t) dt ± lim y(t) dt = E[X(t)] ± E[Y (t)]
tnal →+∞ tnal 0 tnal →+∞ tnal 0
(37.100)
= E (X(t))2 + E (Y (t))2
±2 E [X(t)Y (t)]
| {z } | {z } | {z }
2
E[X(t)]2 +σX E[X(t)]E[Y (t)]+ρXY σX σY 2
E[Y (t)]2 +σY
(37.102)
(37.103)
Example 37.8. The following commands show what happens for two uncorre-
lated signals with normal distribution:
>> X = randn(1,10000);
>> Y = randn(1,10000);
>> rho = xcorr(X,Y,0,'coeff')
rho =
0.0068
>> % this is the correlation coefficient for tau=0; it should be zero
>> meanX = mean(X), meanY = mean(Y) % these should be zero
meanX =
-0.0078
meanY =
0.0139
>> varX = var(X), varY = var(Y) % these should be one
varX =
1.0198
varY =
1.0156
>> S = X+Y;
>> mean(S), meanX+meanY % these should be the same
ans =
0.0061
ans =
0.0061
37.4. OPERATIONS WITH STOCHASTIC PROCESSES 517
Glossary
E o senhor extraterrestre
viu-se um pouco atrapalhado.
Quis falar mas disse pi,
estava mal sintonizado.
autocorrelation autocorrelação
autocorrelation coecient coeciente de autocorrelação
autocovariance autocovariância
bias viés
biased enviesado
Brownian motion movimento Browniano
correlation correlação
correlation coecient coecient correlação
covariance covariância
cross correlation correlação cruzada
518 CHAPTER 37. STOCHASTIC PROCESSES AND SYSTEMS
Exercises
1. Question.
Chapter 38
Spectral density
In the last chapter, stochastic processes and systems were characterised using
dierent statistical properties. These were often functions of time. Among
them were the autocorrelation and the crosscorrelation; assuming ergodicity,
they depended on a time dierence.
The bilateral Fourier transforms of the autocorrelation and the crosscorre-
lation, which of course depend on frequency, turn out to be very important
functions. To see why, rst we must study the Fourier transform better.
Z +∞
F [f (t)] = f (t)e−jωt dt (38.1)
−∞
We will need an explicit expression for the inverse Fourier transform, which
we already met in Example 2.25. To nd it, we rst need a result about function
δ(t), which we met in Remark 10.2.
Integral form of δ(t)
Lemma 38.1.
Z +∞
ejωt dω = 2πδ(t) (38.2)
−∞
Proof.
e−jΩt d(−Ω)
R0
+∞
z }| {
Z +∞ Z 0 Z +∞
jωt jωt
e dω = e dω + ejωt dω
−∞ −∞ 0
Z +∞ Z +∞
= e −jωt
dω + ejωt dω (38.3)
0 0
These integrals have integrands which are limited but do not vanish at innity,
since
Z +∞ Z +∞ Z +∞ Z +∞
−jωt jωt
e dω + e dω = cos(−ωt) + j sin(−ωt) dω + (cos ωt + j sin ωt) dω
0 0 0 0
(38.4)
519
520 CHAPTER 38. SPECTRAL DENSITY
Consequently,
if t 6= 0,
Z +∞
2ε
ejωt dω = lim+ =0 (38.6)
−∞ ε→0 t2 + ε2
if t = 0,
Z +∞
2ε 2
ejωt dω = lim+ = lim+ = +∞ (38.7)
−∞ ε→0 ε2 ε→0 ε
This is the same as (10.15)(10.16), so all that is left is to see if a relation similar
to (10.17)(10.18) holds. Thus we calculate
Z +∞ Z +∞
2ε 1 dt
dt = 2 (38.8)
t + ε2
2 t 2
+1 ε
−∞ −∞
ε
t
τ= (38.9)
ε
t = −∞ ⇒ τ = −∞ (38.10)
t = +∞ ⇒ τ = +∞ (38.11)
dt
dτ = (38.12)
ε
we obtain
Z +∞ Z +∞
2ε 1 +∞
π π
2 2
dt = 2 2
dτ = 2 [arctan τ ]τ =−∞ = 2 − − = 2π
−∞ t + ε −∞ τ + 1 2 2
(38.13)
Inverse Fourier transform Theorem 38.1. Let f (t) be a function with bilateral Fourier transform F [f (t)] =
F (s). Then
Z +∞
1
f (t) = F (jω)ejωt dω (38.14)
2π −∞
38.1. THE BILATERAL FOURIER TRANSFORM 521
Proof. This can be shown replacing the denition of the bilateral Fourier trans-
form (38.1) in (38.14), and applying (38.2) when needed:
Z +∞ Z +∞
1
f (t) = f (τ )e−jωτ dτ ejωt dω
2π −∞ −∞
Z +∞ Z +∞
1
= f (τ )ejω(t−τ ) dω dτ
2π −∞ −∞
Z +∞ Z +∞
1
= f (τ ) ejω(t−τ ) dω dτ
2π −∞ −∞
| {z }
2πδ(t−τ )
Z +∞
= f (τ )δ(t − τ ) dτ (38.15)
−∞
Theorem 38.3. Let f (t) and g(t) be functions with bilateral Fourier transforms Generalised Parseval's
F [f (t)] = F (jω) and F [g(t)] = G(jω). Then theorem
Z +∞ Z +∞
1
f (t)g(t) dt = F (jω)G(jω) dω (38.18)
−∞ 2π −∞
Proof. The proof uses (38.14) to obtain both f (t) and the complex conjugate
of g(t):
G(−jΩ)e−jΩt dΩ
1
R +∞
2π −∞
z }| {
Z +∞ Z +∞ Z +∞ Z +∞
1 1
f (t)g(t) dt = F (jω)ejωt dω G(jΩ)ejΩt dΩ dt
−∞ −∞ 2π −∞ 2π −∞
(38.19)
Now we need (38.2) switching variables t and ω :
Z +∞
ejtω dt = 2πδ(ω) (38.20)
−∞
Figure 38.1: Left: a function in time which is zero when t < 0, for which a
unilateral transform makes sense. Right: a cross-correlation of two signals, that
exists for both τ > 0 and τ < 0, and for which only a bilateral transform makes
sense.
Remark 38.1. (38.16) can be seen as a particular case of (38.18) for f (t) =
g(t).
SX (jω) = F [RX (τ )]
Z +∞
= RX (τ )e−jωτ dτ (38.23)
−∞
CSD Denition 38.3. The cross-spectral density (CSD) SXY (jω) of two signals
X(t) and Y (t) is the bilateral Fourier transform of their correlation:
The reason why the bilateral transform is used for the PSD and the CSD,
while we have used unilateral transforms until now, should be clear:
We have been using unilateral transforms for time responses, that may
not be dened for t < 0, or are equal to 0 for t < 0. See Figure 38.1.
RXY (τ ) 6= RXY (−τ ) in the general case, and so values for both τ > 0 and
τ < 0 must be considered when calculating the Fourier transform. See
Figure 38.1.
From L to F :
s = jω (38.25)
2
s = −ω 2
(38.26)
3
s = −jω 3
(38.27)
4
s =ω 4
(38.28)
5
s = jω 5
(38.29)
..
.
From F to L :
s js
ω= = 2 = −js (38.30)
j j
2
ω = −s2
(38.31)
3
s
ω3 = − = js3 (38.32)
j
ω 4 = s4 (38.33)
5
s
ω5 = = −js5 (38.34)
j
..
.
Theorem 38.4.
Z +∞
1
X 2 (t) = SX (ω) dω (38.35)
2π −∞
RX (τ ) = F −1 [SX (ω)]
Z +∞
1
= SX (ω)ejωt dω (38.36)
2π −∞
In particular,
Z +∞
1
RX (0) = jω0
SX (ω) e|{z} dω (38.37)
2π −∞
1
t = −τ ⇔ τ = −t (38.40)
τ = −∞ ⇔ t = +∞ (38.41)
τ = −∞ ⇔ t = −∞ (38.42)
dτ = −dt (38.43)
524 CHAPTER 38. SPECTRAL DENSITY
to get
Z −∞
SX (−ω) = RX (−t)ejω(−t) (−dt) (38.44)
+∞
The PSD only has even Remark 38.3. Because the PSD is even, and rational, it must be a function
powers of ω or s of even powers of ω if given as a Fourier transform, or of s if given as a Laplace
transform: ω 0 = 1, ω 2 , ω 4 , etc.. There can be no terms in s, s3 , etc.. These
missing odd powers of s are the ones that correspond to imaginary parts in the
The PSD is real valued Fourier transform: jω , (jω)3 = −jω 3 , (jω)5 = jω 5 , etc.. Thus, the PSD, when
given as a Fourier transform, has no imaginary part.
Terms in ω 2 , because of (38.31), correspond to Laplace transforms with pairs
of symmetric poles or zeros: one in the left side of the complex plane and one
in the right side. The same will happen for terms in ω 6 , ω 10 , and so on.
We saw that the correlation, unlike the autocorrelation, is not in the general
case an even function. Consequently, neither is the CSD, its Fourier transform,
an even function in the general case; i.e. it can include odd powers of ω if given
as a Fourier transform, or of s if given as a Laplace transform: s, s3 , etc.. These
The CSD is complex val- odd power of s mean that the CSD, when given as a Fourier transform, has an
ued imaginary part.
Example 38.1. SX (ω) = 10
ω 2 +1 corresponds to SX (s) = 10
−s2 +1 −1 , with
= − s210
poles ±1, which are symmetric.
The usefulness of the PSD can be seen from the following results.
Lemma 38.2. The auto-correlation of X(t) = sin t is
1
RX (τ ) = cos t (38.46)
2
Proof. We will consider an arbitrarily large nal time:
Z tnal −τ
1
RX (τ ) = lim sin(t) sin(t + τ ) dt
tnal →+∞ tnal − τ 0
Z tnal −τ
1
= lim sin(t) sin(t) cos(τ ) + cos(t) sin(τ ) dt
tnal →+∞ tnal − τ 0
Z tnal −τ
1
= lim sin2 (t) cos(τ ) dt +
tnal →+∞ tnal − τ 0
Z tnal −τ
1
lim sin(t) cos(t) sin(τ ) dt
tnal →+∞ tnal − τ 0
Z tnal −τ
1
= cos(τ ) lim sin2 (t) dt +
tnal →+∞ tnal − τ 0
Z tnal −τ
1 1
sin(τ ) lim sin(2t) dt (38.47)
tnal →+∞ tnal − τ 0 2
Rπ
The last integral is limited; over each period, it has a zero mean: 0 12 sin(2t) dt =
0. Thus, the second limit is zero. As to the rst integral, since
we make
Z tnal −τ
1 1 1
RX (τ ) = cos(τ ) lim − cos(2t) dt
tnal →+∞ tnal − τ
0 2 2
tnal −τ
1 t
= cos(τ ) lim
tnal →+∞ tnal − τ 2
0
Z tnal −τ
1 1
− cos(τ ) lim cos(2t) dt (38.49)
2 tnal →+∞ tnal − τ 0
38.2. DEFINITION AND PROPERTIES OF THE SPECTRAL DENSITY 525
Again, the last integral is limited, and thus the limit is zero. We are left with
1 tnal − τ − 0
RX (τ ) = cos(τ ) lim (38.50)
2 tnal →+∞ tnal − τ
and the result follows immediately.
Proof. From (10.22) we know that L [δ(t)] = 1, and from (24.1) we know that
L [f (t − θ)] = F (s)e−θs . Thus L [δ(t − θ)] = e−θs ; the corresponding Fourier
transform is
We will use this integral to nd the Fourier transform of the complex exponen-
tial:
Z +∞
F ejat = ejat e−jωt dt
−∞
Z+∞
= ejt(a−ω) dt (38.54)
−∞
The integral in (38.54) is the same as that in (38.53), with the following variable
changes:
ω becomes t (38.55)
t becomes a (38.56)
θ becomes ω (38.57)
Thus, F ejat = 2πδ(a − ω), which is zero everywhere, save at ω = a, just like
2πδ(ω − a).
(
ejat = cos at + j sin at
⇒ ejat + e−jat = 2 cos at (38.59)
e−jat = cos at − j sin at
we can get
1 jat 1 −jat
SX (ω) = F e + F e (38.60)
4 4
Applying (38.51), the result follows immediately.
Figure 38.2: Power spectral density of X = sin(t) + 3 sin(10t), found with the
code from Example 38.2.
Example 38.2. The PSD of X(t) = sin(t) + 5 sin(t) can be found using a
function to compute its autocorrelation
function [autocorrelation,tau] = R_X(t,X,m)
% function [autocorrelation,tau] = R_X(t,X,m)
% Finds the autocorrelation of X(t) at m points (default is length(t)/2).
n = length(t)-1;
if length(X)~=n+1, error('t and X must have the same length'), end
if nargin<3, m = floor(n/2); end
autocorrelation = zeros(1,m);
for k = 0 : m-1
autocorrelation(k+1) = sum( X(1:n-k+1) .* X(k+1:n+1) )/( n-k+1 );
end
autocorrelation = [autocorrelation(end:-1:2) autocorrelation];
tau = [ -t(m:-1:2) 0 t(2:m) ];
and a function that computes the PSD using the one above
function [S,w]=S_X(t,X,number_w)
% function [S,w]=S_X(t,X,number_w)
% Finds the PSD S(w) of X(t) at number_w frequencies (default 100 per
% decade) in a reasonable range of frequencies.
[autocorrelation,tau] = R_X(t,X);
Ts = mean(diff(t)); % sample time
wUp = floor(log10(pi/Ts));
wLow = ceil(log10(pi/t(end))); if wLow == wUp, wLow = wUp-1; end % at least 1 decade
if nargin == 3
wvector = logspace(wLow, wUp, number_w);
else
wvector = logspace(wLow, wUp, (wUp-wLow)*100+1);
end
S = zeros(size(wvector));
for k = 1:length(wvector)
w = wvector(k);
S(k) = trapz( autocorrelation .* exp(-1i*w*tau) ) * Ts;
end
if norm(imag(S))/norm(real(S)) > 1e-6
warning('Imaginary part of S not neglectable, something''s wrong')
end % sanity check
S = real(S);
w = wvector;
In this way, commands
>> Ts = 0.01; tfinal = 100;
>> t = 0 : Ts : tfinal;
>> X = sin(t) + 3*sin(10*t);
>> [S,w] = S_X(t,X); figure,semilogx(w,S),xlabel('\omega [rad/s]'),ylabel('PSD')
result in Figure 38.2.
Notice that:
38.3. NUMERICAL COMPUTATION OF THE PSD AND CSD 527
there are ripples in the PSD around the frequencies of the sinusoids;
Usual windows Some of the most usual windows, represented in Figures 38.4 and 38.5, are
the following. They are given as a function of t, in interval [0, tnal ], and are
zero outside this range. Matlab functions to create them are also shown;
they receive as argument the number of samples in interval [0, tnal ], and are
shown in the Figures using command wvtool, which shows the window's Fourier
transform.
Rectangular window, useful for signals with frequency content in a broad-
band (Matlab function rectwin):
w(t) = 1 (38.61)
Using no window is using Notice that this window corresponds, in fact, to doing nothing to the
a rectangular window signal. It is, thus, in a sense, the default window.
A Hann window often Hann (or Hanning) window, the most used one, useful for signals with
gives good results frequency content in a narrowband (Matlab function hann):
πt
w(t) = sin2 (38.62)
tnal
Flat top window, useful for sinusoidal signals when amplitude accuracy is
more important than frequency accuracy (Matlab function flattopwin):
2πt 4πt
w(t) = 0.21557895 − 0.41663158 cos + 0.277263158 cos
tnal tnal
6πt 8πt
− 0.083578947 cos + 0.006947368 cos (38.64)
tnal tnal
Figure 38.4: Windows, plot for 64 samples between 0 and tnal , together with
their Fourier transforms. Continues in Figure 38.5.
530 CHAPTER 38. SPECTRAL DENSITY
Figure 38.5: Windows, plot for 64 samples between 0 and tnal , together with
their Fourier transforms. Continued from Figure 38.4.
38.4. WHITE NOISE 531
Example 38.3. In Figure 37.5, the signal in the lower plot, with normally
distributed random numbers, is white noise, or, rather, such an approximation
of white noise as is possible in practice.
The signal in the upper plot would also be (an approximation of) white noise
if it had no mean value.
Theorem 38.7. The PSD of white noise is constant over all frequencies. White noise has a constant
PSD
Proof.
No analogical signal can have the autocorrelation of white noise. This is White noise does not exist
better seen taking the analogical signal as a digital signal with Ts → 0. Since
the autocorrelation is zero, the variation of the signal from one sample to the
next can take any value. For vanishing sampling times, the velocity would
become innite, which is impossible in practice, since this would require an
arbitrarily large energy. The same can be seen from the PSD: a constant value
over all frequencies, including arbitrarily large ones, would mean arbitrarily fast
oscillations, with an amplitude that never vanishes. (The argument bears a
resemblance with the one that shows that transfer functions must be strictly
proper, given in Section 11.4.)
Analogical signals can approximate white noise over a certain range of fre- White noise approximated
quencies if they have a (fairly) constant PSD in that range. The PSD will have in a frequency range
to decrease for larger frequencies. Digital signals have their frequency content Digital approximations of
limited by the sampling time; thus they can have a (fairly) constant PSD over white noise make more
all frequencies up to ωs , and appear as better approximations of white noise. sense
Of course, they do not have a constant frequency content for arbitrarily large
frequencies, just as analogical approximations of white noise do not.
So white noise cannot be found in practice just as an impulse cannot,
and just as unit steps normally have a ramp, fast as it may be, when changing
values. But the mathematical convenience of such signals, and their ability to
approximate situations frequently found in practice, justify their widespread
use.
Remark 38.4. White light is electromagnetic radiation white noise in the vis- Where white noise got its
ible spectrum. White noise got its name due to its similarity with white light. name from
Light, to be white, does not need to have frequency content outside the visi-
ble spectrum; it does not need to have any ultraviolet or infrared content; still
less gamma rays or radio waves (see Figure 38.6). Likewise, all signals that in
practice pass for white noise will have frequency content in a limited range of
frequencies only.
Denition 38.5. Coloured noise is noise which is not white. The color of Coloured noise
noise is the particular evolution of the PSD with frequency. In particular:
the PSD of pink noise has a slope of −10 dB/decade;
There are other colours, but these and white are the most frequent. Notice
that pink and blue noise can be obtained from white noise with fractional lter
1
s± 2 .
532 CHAPTER 38. SPECTRAL DENSITY
Glossary
coloured (colored, US) noise ruído colorido
colour (colour, US) of noise cor do ruído
cross-spectral density densidade espetral cruzada
power spectral density densidade de potência espetral
white noise ruído branco
Exercises
1. Question.
Chapter 39
Identication of continuous
stochastic models
Jenkins is a very good shot, said Fisher. A very good shot who can
pretend to be a very bad shot. Shall I tell you the second hint I hit
on, after yours, to make me think it was Jenkins? It was my cousin's
account of his bad shooting. He'd shot a cockade o a hat and a
weathercock o a building. Now, in fact, a man must shoot very
well indeed to shoot so badly as that. He must shoot very neatly to
hit the cockade and not the head, or even the hat. If the shots had
really gone at random, the chances are a thousand to one that they
would not have hit such prominent and picturesque objects. They
were chosen because they were prominent and picturesque objects.
They make a story to go the round of society.
Gilbert K. Chesterton (1874 1936), The man who knew too much, I
This chapter concerns methods to identify a system when its input and
output are stochastic. These methods provide either the impulse response or
the frequency response of the system. From that point on, the procedures
studied in Part VI are applied.
In all that follows, assume a linear, stable or marginally stable system G(s),
with impulse response g(t) and static gain g0 . Its input is X(t) and its output
is
Z t
Y (t) = X(t) ∗ g(t) = X(t − τ )g(τ ) dτ (39.1)
0
533
534CHAPTER 39. IDENTIFICATION OF CONTINUOUS STOCHASTIC MODELS
Proof.
Z t
Y = lim E X(t − τ )g(τ ) dτ
t→+∞ 0
Z t
= lim E X(t − τ ) g(τ ) dτ
t→+∞ 0 | {z } |{z}
stochastic deterministic
Z t
= lim E[X(t − τ )] g(τ ) dτ
t→+∞ 0 | {z }
X (constant)
Z t
= X lim g(τ ) dτ
t→+∞ 0
Z t
= X lim g(τ )H(t − τ ) dτ
t→+∞ 0
= X lim g(t) ∗ H(t) (39.2)
t→+∞
This last limit is the steady-state value of the unit step response of G(s), i.e.
its static gain g0 . As assumed throughout this chapter, the system cannot be
unstable, otherwise the limit does not exist.
Example 39.1. A system with gain 5 receives an input with mean (approxi-
mately) equal to 12 :
Mean square value of the Theorem 39.2. The expected value of the square of the output Y 2 is
output
Z +∞ Z +∞
Y2 = RX (τ1 − τ2 )g(τ1 )g(τ2 ) dτ1 dτ2 (39.3)
0 0
Proof.
Y (t) Y (t)
zZ t
}| {Z
z
t
}| {
Y2 =E X(t − τ1 )g(τ1 ) dτ1 X(t − τ2 )g(τ2 ) dτ2
0 0
Z t Z t
=E X(t − τ1 )X(t − τ2 ) g(τ1 )g(τ2 ) dτ1 dτ2
0 0 | {z } | {z }
stochastic deterministic
Z tZ t
= E [X(t − τ1 )X(t − τ2 )] g(τ1 )g(τ2 ) dτ1 dτ2 (39.4)
0 0 | {z }
RX (t−τ2 −(t−τ1 ))=RX (τ1 −τ2 )
Proof.
Y (t) Y (t+τ )
zZ t
}| { zZ
t
}| {
RY (τ ) = E X(t − τ1 )g(τ1 ) dτ1 X(t + τ − τ2 )g(τ2 ) dτ2
0 0
Z t Z t
=E X(t − τ1 )X(t + τ − τ2 ) g(τ1 )g(τ2 ) dτ1 dτ2
0 0 | {z } | {z }
stochastic deterministic
Z tZ t
= E [X(t − τ1 )X(t + τ − τ2 )] g(τ1 )g(τ2 ) dτ1 dτ2 (39.6)
0 0 | {z }
RX (t+τ −τ2 −(t−τ1 ))=RX (τ −τ2 +τ1 )
Theorem 39.4. If G(s) is stable, the correlations of input and output RXY (τ ) Correlation of input and
and RY X (τ ) are output
Z +∞
RXY (τ ) = RX (τ − τ1 )g(τ1 ) dτ1 (39.7)
0
Z +∞
RY X (τ ) = RX (τ + τ1 )g(τ1 ) dτ1 (39.8)
0
Proof.
Y (t+τ )
z }| {
Z t
RXY (τ ) = E X(t) X(t + τ − τ1 )g(τ1 ) dτ1
0
Z t
=E X(t)X(t + τ − τ1 ) g(τ1 ) dτ1
0 | {z } | {z }
stochastic deterministic
Z t
= E [X(t)X(t + τ − τ1 )] g(τ1 ) dτ1 (39.9)
0 | {z }
RX (t+τ −τ1 −t)=RX (τ −τ1 )
Y (t)
zZ }| {
t
RXY (τ ) = E X(t + τ ) X(t − τ1 )g(τ1 ) dτ1
0
Z t
=E X(t + τ )X(t − τ1 ) g(τ1 ) dτ1
0 | {z } | {z }
stochastic deterministic
Z t
= E [X(t + τ )X(t − τ1 )] g(τ1 ) dτ1 (39.10)
0 | {z }
RX (t−τ1 −(t+τ ))=RX (−τ1 −τ )
For discrete signals, the integral in (39.7) is replaced with a rectangular Correlation of input and
approximation. It is more expedient to make use of the fact that RX (τ ) is even, output for discrete signals
and consider instead
Z +∞
RXY (τ ) = RX (τ − τ1 )g(τ1 ) dτ1
0
Z +∞
= RX (τ1 − τ )g(τ1 ) dτ1 (39.11)
0
Suppose that there are N + 1 samples of the impulse response g(kTs ), from
k = 0 to k = N , separated by sampling time Ts ; the autocorrelation R(kTs ),
which is an even function, is consequently known from k = −N to k = N . The
integral is approximated by N rectangles, and correlation Rx XY (nTs ) will be,
536CHAPTER 39. IDENTIFICATION OF CONTINUOUS STOCHASTIC MODELS
N
X −1
RXY (0) = Ts RX (kTs ) g(kTs ) (39.12)
k=0
N
X −1
RXY (Ts ) = Ts RX (kTs − Ts ) g(kTs ) (39.13)
k=0
N
X −1
RXY (2Ts ) = Ts RX (kTs − 2Ts ) g(kTs ) (39.14)
k=0
..
.
N
X −1
RXY (nTs ) = Ts RX (kTs − nTs ) g(kTs ) (39.15)
k=0
n×1 n×N N ×1
z
}| { z }| { z
}| {
RXY (0) RX (0) RX (Ts ) RX (2Ts ) ··· RX ((N − 1)Ts ) g(0)
RXY (Ts )
RX (−Ts )
RX (0) RX (Ts ) ··· RX ((N − 2)Ts ) g(Ts )
RXY (2Ts )
= Ts RX (−2Ts )
RX (−Ts ) RX (0) ··· RX ((N − 3)Ts ) g(2Ts )
.. .. .. .. .. .. ..
. . . . . . .
RXY (nTs ) RX (−nTs ) RX ((1 − n)Ts ) RX ((2 − n)Ts ) · · · RX ((N − 1 − n)Ts ) g(nTs )
| {z } | {z } | {z }
RXY RX g
(39.16)
The matrix is the autocorrelation matrix found in (37.60), save that, if values
of τ are never to approach tnal , there must be more columns than lines, i.e.
Finding the impulse re- n < N . If the autocorrelation of the input and the correlation of input and
sponse output are known, the impulse response of the plant can be found using the
pseudo-inverse of RX :
1 +
h(t) = R RXY (39.17)
Ts X
Example 39.2. This example is still being written. In the picture: Na-
tional Pantheon, or Church of Saint Engratia, Lisbon (source: http://www.
panteaonacional.gov.pt/171-2/historia-2/), somewhen during its construc-
tion (16821966).
39.2. IDENTIFICATION IN FREQUENCY 537
Theorem 39.5. The cross-spectral densities of input and output and the spec-
tral density of the input are related by
t = τ − τ1 ⇒ τ = t + τ1 (39.21)
τ = −∞ ⇒ t = −∞ (39.22)
τ = +∞ ⇒ t = +∞ (39.23)
dτ = dt (39.24)
to get
Z +∞ Z +∞
SXY (ω) = g(τ1 ) RX (t)e−jωt e−jωτ1 dt dτ1
0 −∞
Z +∞ Z +∞
= g(τ1 )e −jωτ1
dτ1 RX (t)e−jωt dt (39.25)
−∞
|0 {z }| {z }
F [g(t)]=G(jω) SX (ω)
|G(jω)|ej∠G(jω)
=
|G(jω)|e−j∠G(jω)
= ej2∠G(jω) (39.26)
Theorem 39.6. The spectral densities of input and output are related by
t = τ + τ1 − τ2 ⇒ τ = t − τ1 + τ2 (39.29)
τ = −∞ ⇒ t = −∞ (39.30)
τ = +∞ ⇒ t = +∞ (39.31)
dτ = dt (39.32)
to get
Z +∞ Z +∞ Z +∞
SY (jω) = g(τ1 )g(τ2 ) RX (t)e−jωt ejωτ1 e−jωτ2 dt dτ1 dτ2
0 0 −∞
Z +∞ Z +∞ Z +∞
= g(τ2 )e−jωτ2 dτ2 g(τ1 )ejωτ1 dτ2 RX (t)e−jωt dt
−∞
|0 {z } |0 {z }| {z }
F [g(t)]=G(jω) G(−jω) SX (jω)
(39.33)
So this is how the frequency response of G(s) can be found from spectral
densities SX (jω) and SY (jω) and from cross-spectral densities SXY (jω) and
SY X (jω):
or from (39.18)
SXY (ω)
|G(jω)| =
(39.36)
SX (ω)
or from (39.19)
SY X (ω)
|G(jω)| = |G(−jω)| =
(39.37)
SX (ω)
or from (39.18)
SXY (ω)
∠G(jω) = ∠ (39.39)
SX (ω)
or from (39.19)
SY X (ω)
∠G(jω) = −∠G(−jω) = −∠ (39.40)
SX (ω)
39.2. IDENTIFICATION IN FREQUENCY 539
ing the frequency re- The entire frequency response is either found from (39.18)
se
SXY (ω)
G(jω) = (39.41)
SX (ω)
or from (39.19)
SY X (ω)
G(jω) = G(−jω) = (39.42)
SX (ω)
|SXY (ω)|2
2
γXY (ω) = (39.44)
|SX (ω)||SY (ω)|
Theorem 39.7. In the conditions of Figure 39.1, 2
γXY (ω) = 1 for a LTI if
all noise is accounted for
2
γXY (ω) ≤ 1, ∀ω (39.45)
Proof. From
2 |SXY (ω)|2
γXY (ω) =
|SX (ω)||SY (ω)|
|G(jω)SX (ω)|2
=
|SX (ω)|SX (ω)|G(jω)|2
In practice, γXY
2
(ω) is seldom 1. The limit case is that of an uncorrelated 0 ≤ γXY
2
(ω) ≤ 1
pair of input and output, and then
2
RXY (τ ) = 0 ⇒ SXY (ω) = 0 ⇒ γXY (ω) = 0 (39.47)
Consequently:
When γXY
2
(ω) = 1, a linear model G(s) relating input X with output Y
can be found from the data.
When γXY
2
(ω) < 1, no model can predict Y solely from X . This may
happen for several reasons: there is noise that could not be measured;
there is another input; there are non-linearities.
The magnitude of γXY
2
(ω) shows how good the model will be, and at what
frequencies it will perform better and worse.
When γXY
2
(ω) = 0, no model can be found.
Example 39.3. Consider the following linear system:
Ts = 0.01; % sample time
t = 0 : Ts : 1000;
X = rand(1,length(t)); % input
s = tf('s'); G = 5/(s+1);
Y = lsim(G,X,t); % output
Figure 39.2 shows the values of input X and output Y of plant G(s) during
some seconds.
The gain and phase of the frequency response of G(s) can be obtained from
X and Y using (39.35)(39.40) as follows. They will be compared with the
result of command freqresp.
540CHAPTER 39. IDENTIFICATION OF CONTINUOUS STOCHASTIC MODELS
Figure 39.2: Sample of input and output of the plant of Example 39.3.
% spectral densities
[Syx,F] = cpsd(X,Y,[],[],[],1/Ts); w = 2*pi*F;
Sxy = cpsd(Y,X,[],[],[],1/Ts); % remember that the order of X and Y is like this
Sxx = cpsd(X,X,[],[],[],1/Ts);
Syy = cpsd(Y,Y,[],[],[],1/Ts);
% gain
Gfreqresp = squeeze(freqresp(G,w));
Ggain = 20*log10(abs(Gfreqresp)); % this is what we should obtain
Ggain1 = 20*log10(sqrt(Syy./Sxx));
Ggain2 = 20*log10(abs(Sxy./Sxx));
Ggain3 = 20*log10(abs(Syx./Sxx));
% phase
Gphase = rad2deg(angle(Gfreqresp));
Gphase1 = rad2deg(unwrap(imag(0.5*log(Sxy./Syx))));
Gphase2 = rad2deg(unwrap(angle(Sxy./Sxx)));
Gphase3 = -rad2deg(unwrap(angle(Syx./Sxx)));
The corresponding Bode diagrams are shown in Figure 39.3, as plotted with
the following commands:
figure, subplot(2,1,1), semilogx(w,Ggain, w,Ggain1, w,Ggain2, w,Ggain3)
grid on, xlabel('\omega [rad\cdots^{-1}]'), ylabel('gain [dB]')
legend({'gain','(S_Y/S_X)^{1/2}','|S_{XY}/S_X|','|S_{YX}/S_X|'})
subplot(2,1,2), semilogx(w,Gphase, w,Gphase1, w,Gphase2, w,Gphase3)
grid on, ylabel('phase [^\circ]')
legend({'phase','Im[0.5*(S_{XY}/S_{YX})]','\angle(S_{XY}/S_X)','\angle(S_{YX}/S_X)'})
Two conclusions can at once be taken.
39.2. IDENTIFICATION IN FREQUENCY 541
There are numerical problems with the result of (39.38), namely oscilla-
tions of 180◦ which command unwrap does not solve, since it only deals
with jumps of 360◦ . The way around this is to double the angle before
applying unwrap, so that jumps of 180◦ become 360◦ wide, and then halve
it:
Gphase1 = rad2deg(0.5*unwrap(2*imag(0.5*log(Sxy./Syx))));
gamma2 = (abs(Sxy)).^2./(abs(Sxx).*abs(Syy));
figure, semilogx(w,gamma2,'.')
grid on, xlabel('\omega [rad\cdots^{-1}]'), ylabel('\gamma_{XY}^2')
Fixing the phase and neglecting the last decade, the Bode diagram in Fig-
ure 39.5 is obtained.
Glossary
The political dialects to be found in pamphlets, leading articles,
manifestos, White Papers and the speeches of Under-Secretaries do,
of course, vary from party to party, but they are all alike in that
one almost never nds in them a fresh, vivid, home-made turn of
speech. When one watches some tired hack on the platform me-
chanically repeating the familiar phrases bestial atrocities, iron
heel, blood-stained tyranny, free peoples of the world, stand shoulder
to shoulder one often has a curious feeling that one is not watch-
ing a live human being but some kind of dummy: a feeling which
542CHAPTER 39. IDENTIFICATION OF CONTINUOUS STOCHASTIC MODELS
Exercises
1. Prove (39.19).
Chapter 40
Filter design
Other noises were subdued in this city of rubber; the passenger-
circles were a hundred yards away, and the subterranean trac lay
too deep for anything but a vibration to make itself felt. It was to
remove this vibration, and silence the hum of the ordinary vehicles,
that the Government experts had been working for the last twenty
years.
This chapter concerns the design of lters that receive a signal x(t) corrupted
by additive noise n(t), with the objective of returning an output y(t) as close
as possible to x(t), as seen in Figure 40.1. As might be expected, the ideal
situation y(t) = x(t) is seldom attainable, if ever; but useful approximations
can be usually found.
SX (s)
H(s) = (40.2)
SX (s) + SN (s)
Figure 40.1: Block diagram for lters H(s) addressed in this chapter.
543
544 CHAPTER 40. FILTER DESIGN
Proof. According to (38.35), using Laplace rather than Fourier transforms thanks
to variable change jω = s ⇔ ω = sj ,
Z +∞
1
m2 = SN (ω)H(jω)H(−jω) dω
2π −∞
Z +j∞
1 s
= SN (s)H(s)H(−s) d (40.3)
2π
−j∞ j
Z +∞
1
e2 = SX (ω) 1 − H(jω) 1 − H(−jω) dω
2π −∞
Z +j∞
1 s
(40.4)
= SX (s) 1 − H(s) 1 − H(−s) d
2π −j∞ j
Z +j∞
1
= SX (s) − SX (s)H(−s) − SX (s)H(s) + SX (s)H(s)H(−s) ds
2πj −j∞
and thus
Z +j∞
1
e2 + m 2 = SX (s) − SX (s)H(−s) − SX (s)H(s)
2πj −j∞
+ SX (s)H(s)H(−s) + SN (s)H(s)H(−s) ds (40.5)
so that
Fi (s) will only have poles and zeros with negative real parts, or on the
imaginary axis;
the poles and zeros of Fi (−s) will be the complex conjugates of those of
Fi (s).
SX (s)SN (s)
= SSXX(s)+S
Fi (s)Fi (−s)
(s)SN (s)
N (s)
does not depend on H(s), so there is nothing to
do to this term;
SX (s)
Fi (s)H(s) − and Fi (−s)H(−s) − FSiX(−s)
Fi (−s)
(s)
depend on H(s). We know
from (38.38) that the second term veries
SX (s) SX (−s)
Fi (−s)H(−s) − = Fi (−s)H(−s) − (40.9)
Fi (−s) Fi (−s)
Consequently, these two terms are complex conjugates, and their product
is always positive or zero; it cannot be negative.
Thus, to minimise the integrand and thereby minimise e2 + m2 , we must have
SX (s)
Fi (s)H(s) − =0 (40.10)
Fi (−s)
from which the result is immediate.
Example 40.1. Let
24
SX (s) = − (40.11)
s2 −1
1
SN (s) = − (40.12)
s2
Then
− s224
−1 −24s2
H(s) = = (40.13)
− s224
−1 − 1
s2
−25s2 + 1
Denition 40.2. A causal Wiener lter is the result of removing zeros and
poles with a positive real part from a Wiener lter.
When solving (40.10), Fi (s) has by denition no poles and zeros with positive
real part: these will appear (if they do) in FSiX(−s)
(s)
. A partial fraction expansion
SX (s)
can then be used to separate Fi (−s) into the sum of
h i
SX (s)
a rational function without poles and zeros with positive real part Fi (−s) ,
left
and
h i
SX (s)
a rational function without poles and zeros with negative real part Fi (−s) ,
right
so that (40.10) becomes
SX (s) SX (s)
Fi (s)H(s) − − =0 (40.14)
Fi (−s) left Fi (−s) right
h i
SX (s)
Term Fi (−s) is neglected, and the causal Wiener lter is given by
right
1 SX (s)
H(s) = (40.15)
Fi (s) Fi (−s) left
While it might seem that it would suce to neglect completely Fi (−s), since
by denition all its poles and zeros have non-negative real parts, it is better
to proceed as above since such zeros and poles may cancel poles and zeros of
SX (s).
546 CHAPTER 40. FILTER DESIGN
Then
1
S (s)
X Fi (−s)
z }| { z }| {
SX (s) −24 −s(−s + 1)
= 2
Fi (−s) s − 1 −5s + 1
24s(s − 1)(−1) 24s
= = (40.17)
(s + 1)(s − 1)(5s − 1)(−1) (s + 1)(5s − 1)
A straightforward partial fraction expansion gives
SX (s) 24s 4 4
= = + (40.18)
Fi (−s) (s + 1)(5s − 1) s+1 5s − 1
| {z } | {z }
h i h i
SX (s) SX (s)
Fi (−s)
left Fi (−s)
right
Consequently
s(s + 1) 4 4s
H(s) = = (40.19)
5s + 1 s+1 5s + 1
| {z } | {z }
1
h i
SX (s)
Fi (s) Fi (−s)
left
As was the case with the Wiener lter, whitening lters may have poles and
zeros with positive real parts, which in practice have to be neglected; or be
non-causal and need to have additional poles added. Such approximations, of
course, make the output of the lter deviate more from white noise.
which, being an improper transfer function, will have to have two additional
poles added to become causal.
Glossary
Entam elle por lhe querer a cudir descuidara de si e o foguo zeralhe
alg
u nojo por ptes de seu corpo, e direito do caualeiro topou com
outro mateiro que pera ho mato hia que lhe perguntou vendo ho vir
assi sem lenha que pera que fora ao mato. Respondendolhe o mateiro
queimado falandolhe galego estas soos palauras, Bimarder, olhou o
caualeiro pelo barbarismo das letras mudadas na pronunciaçam do,
b, por, v, e pareceolhe misterio por que elle tambem na quelle se
fora arder, e quis se chamar assi da hi auante (. . . )
Exercises
1. A signal with SX (s) = −1
s2 −1 is corrupted by noise with SN (s) = s2 −4 .
−1
Find:
Find:
Find:
Isaac Asimov (1920 1992), The machine that won the war, The Magazine
of Fantasy & Science Fiction, October 1961
We now turn our attention to digital stochastic models, often useful given
that most signals are, as we saw in Chapter 3, discrete in time.
G(z −1 ) is assumed as linear and proper, and thus its output yk is a linear
combination of the inputs and their past values. It will be a stochastic system if
yk depends only on ek but not on uk , or if it depends on both. Several paradigms
of digital stochastic systems are usually found.
Denition 41.1. The following digital stochastic systems have particular names.
Models that only depend on the stochastic input ek :
549
550 CHAPTER 41. DIGITAL STOCHASTIC MODELS
C(z −1 ) B(z −1 )
⇔ yk = −1
ek + uk (41.7)
A(z ) A(z −1 )
An ARMAX model is sometimes given as ARX(p, q, m, d), allowing
for a delay z −d that aects the manipulated input (i.e. the exogenous
input):
C(z −1 ) B(z −1 )z −d
yk = −1
ek + uk (41.8)
A(z ) A(z −1 )
This is the same as an ARMAX(p, q, m + d) model, since the numer-
ator of the second transfer function is of order m + d.
41.1. TYPES OF DIGITAL STOCHASTIC MODELS 551
C(z −1 ) B(z −1 )z −d
yk = e k + uk (41.9)
A(z −1 ) (1 − z −1 )d A(z −1 )
C(z −1 ) B(z −1 )
yk = e k + uk (41.10)
D(z −1 ) F (z −1 )
n and m are the orders of the denominators corresponding to p and
q.
Output error model of orders n, m, OE(n, m): OE
B(z −1 )
yk = ek + uk (41.11)
F (z −1 )
C(z −1 ) B(z −1 )z −d
A(z −1 ) yk = −1
ek + uk (41.12)
D(z ) F (z −1 )
∃n ∀m>k gm = 0, k, n, m ∈ N0 (41.13)
yk 1
= (41.20)
ek 1 − 0.1z + 0.2z −2
−1
and its poles are 0.05±0.444j . Letting the input ek , which should be stochastic,
be an impulse, the MA impulse response is found:
The identication of a digital stochastic system follows the usual steps: iden-
tifying the order of the model or models, identifying model parameters, and
assessing performance (which includes, if several models were found, selecting
one of them). Model parameter identication is done as seen in Section 31.3,
and peformance assessment as was covered in Section 30.2. To nd reasonable
orders for models, however, there are methods particularly suited to stochastic
systems.
41.2 Autocorrelation of a MA
Theorem 41.1. The autocorrelation RY (τ ) of the output yk of a MA(q) model
veries
RY (τ ) 6= 0, if |τ | ≤ q (41.26)
RY (τ ) = 0, if |τ | > q (41.27)
Proof.
The input may be clearly dierent from white noise. This may be
solved if a whitening lter can be applied at the input of the plant.
1.959964 1.959964
− √ < ρX (τ ) < √ (41.29)
N N
Figure 41.1: The normal distribution and the gure for a 5% signicance level
(source: Wikimedia). If X is a normally distributed random process with aver-
age 0 and variance 1, then P (X > 1.96) = 2.5%, and P (X < −1.96) = 2.5%.
Consequently, P (−1.96 < X < 1.96) = 95%.
The autocorrelation of this plant's output when fed 2001 samples of normally
distributed white noise is shown in Figure 41.2 together with the threshold
given by (41.29), which is −0.044 < RX (τ ) < 0.044. The rst three values,
corresponding to three coecients of the plant, are large enought to be outside
the threshold.
The autocorrelation can be used as well to nd the order of a model that
only depends on an exogenous variable, as long as this variable can be approx-
imated by white noise, and the MA part of the model can be neglected. In
practice, orders adjacent to those found with this method should be considered
for potential models as well, since numerical errors or noise can aect the results.
Yule-Walker equations.
t-value and p-value to know if all inputs i.e. delays are needed.
Figure 41.3: Left: partial autocorrelation of the output of plant (41.32) from
Example 41.4. Right: the same, when there is noise as in (41.33).
yk 1
=
uk 3 + 4z + 2z −2
−1
1 4 2
⇔ yk = uk − yk−1 − yk−2 (41.32)
3 3 3
The partial autocorrelation of this plant's output when fed 2001 samples of nor-
mally distributed white noise is shown in Figure 41.3 together with the threshold
given by (41.29), which is −0.044 < RX (τ ) < 0.044. The rst three values, cor-
responding to three coecients of the plant, are large enought to be outside the
threshold.
The partial autocorrelation is also shown for the situation when there is
additive noise at the output:
1 4 2
yk = uk − yk−1 − yk−2 + 0.05ek (41.33)
3 3 3
41.4 Identication
This section is still being written:
Prediction-correction.
Forgetting factor.
556 CHAPTER 41. DIGITAL STOCHASTIC MODELS
Glossary
I understood him in many Things, and let him know, I was very well
pleas'd with him; in a little Time I began to speak to him, and teach
him to speak to me; and rst, I made him know his Name should
be Friday, which was the Day I sav'd his Life; I call'd him so for the
Memory of the Time; (. . . )
Daniel Defoe (1660? 1731), The life and Strange Surprizing adventures of
Robinson Crusoe, of York, Mariner
Exercises
1. Question.
Chapter 42
Leo Tolstoy (1828 1910), War and Peace, II 17 (transl. Louise Maude
and Aylmer Maude)
where u(t) is a manipulated input, and e(t) is white noise. (If there is no
pure delay of d sample times from u(t) to the output, then d = 0.) This
plant is controlled in closed loop, as seen in Figure 42.1, and, without loss of
generality, reference r(t) is taken as 0 (otherwise a variable change is used). In
this situation, the controller that minimises the variance of error ε(t) = −y(t)
557
558 CHAPTER 42. CONTROL OF STOCHASTIC SYSTEMS
is given by
G(z −1 )
u(t) = − y(t) (42.2)
B(z −1 )F (z −1 )
B G
y(t + d) = u(t) + F e(t + d) + e(t) (42.7)
A A
Now notice that (42.1) can also be rewritten as
A B
e(t) = y(t) − z −d u(t) (42.8)
C C
Replacing this in (42.7), and using (42.6),
B G A B
y(t + d) = u(t) + F e(t + d) + y(t) − z −d u(t)
A A C C
G BG −d B
= F e(t + d) + y(t) − z u(t) + u(t)
C CA A
G B C − Gz −d
= F e(t + d) + y(t) + u(t)
C | CA
{z }
BF
C
G BF
= F e(t + d) + y(t) + u(t) (42.9)
| {z } C {z C
this can only be
| }
known at time t + d this is already known at time t
h i
2
Consequently, to minimise E (ε(t)) , we minimise
" 2 #
h
2
i G BF
E (y(t + d)) = E F e(t + d) + y(t) + u(t)
C C
" 2 #
h
2
i G BF
= E (F e(t + d)) + E y(t) + u(t) (42.10)
C C
where there are no cross-terms because white noise e(t + d) is independent from
y(t) and u(t). There is nothing to do about the expected value that depends on
the white noise, but the second term can be minimised:
G BF
y(t) + u(t) = 0 (42.11)
C C
From here (42.2) is immediate.
42.1. MINIMUM VARIANCE CONTROL 559
which is (42.4).
nF = d − 1 (42.13)
nG = max{nA − 1, nC − d} (42.14)
That is to say,
d=1 (42.19)
The left side of the equation is of order 2. The right side will be of order 2
if nF = 0 and nG = 1, i.e. F z −1 = f0 and G z −1 = g0 + g1 z −1 . Notice
that the only independent term on the right side will be f0 ; thus we must have
f0 = 1. This still leaves two variables, g0 and g1 , which suce to make the
equation possible.
Instead of reasoning like this we could apply (42.13)(42.14) and write
Thus
0.9 + 0.3z −1
u(t) = −y(t) (42.23)
0.7 + 0.3z −1
and this control law will achieve y(t) = e(t). This is not surprising, since the
noise itself cannot be eliminated; it is impossible to do any better.
Figure 42.2 shows the output, equal to the error, and the control action, for
a simulation with 100 time steps.
560 CHAPTER 42. CONTROL OF STOCHASTIC SYSTEMS
Example 42.2. Consider a plant similar to that of Example 42.1, save that
now the output is given by
(42.24)
This is in fact the same plant of Example 42.1 but with d = 2. We must solve
(42.3):
the right member will be of order 3, and the terms of order 3 will have to cancel,
since there is none on the right member.
Instead of reasoning like this we could apply (42.13)(42.14) and write
(42.27)
Thus
0.75 + 0.18z −1
u(t) = −y(t) (42.28)
(0.7 + 0.3z −1 ) (1 + 0.9z −1 )
and this control law will achieve y(t) = e(t) 1 + 0.9z −1 . Notice how one
additional delay from the control action to the output leads to more complicated
calculations, to a controller of higher order (there are two poles now rather than
only one), and to an output with more noise.
Figure 42.3 shows the output, no longer equal to the error, and the control
action, for a simulation with 100 time steps.
42.1. MINIMUM VARIANCE CONTROL 561
t of a non-minimum Example 42.3. Consider yet another plant similar to that of Example 42.1,
e zero save that now the output is given by
(42.29)
This is the same plant of Example 42.1 but this time with a non-minimum phase
zero, since
3 7
B z −1 = 0 ⇔ 0.7z −1 = −0.3 ⇔ z −1 = − ⇔ z = − (42.30)
7 3
which is outside the unit radius circle. Solving (42.3) is done as in Example 42.1;
the results are the same:
F z −1 = 1 (42.31)
−1 −1
(42.32)
G z = 0.9 + 0.3z
0.9 + 0.3z −1
u(t) = −y(t) (42.33)
0.3 + 0.7z −1
and this control law will achieve y(t) = e(t).
Figure 42.4 shows the output, which equal to the error, and the control
action that achieves this result. Notice how the amplitude of the control action
grows exponentially. This is because control law is unstable: (42.2) cancels the
zeros of the plant, and so in this case the controller tries to cancel the non-
minimum phase zero. Such a controller is of course impossible in practice: as
562 CHAPTER 42. CONTROL OF STOCHASTIC SYSTEMS
soon as actuators saturate, the output will be far from what is desired. (In fact,
even in simulation, sooner or later an overow prevents good results; that is the
reason why Figure 42.4 only shows 40 time steps).
What to do with non- This last example shows that, if there are non-minimum phase zeros in
minimum phase zeros B(z −1 ), we cannot have (42.2), but must use only the minimum-phase zeros
in the denominator. That is to say, we separate B(z −1 ) as product
so that Bnon (z −1 ) will have all the non-minimum phase zeros, and Bmin (z −1 ) all
the minimum phase zeros; and then make
G(z −1 )
u(t) = − y(t) (42.35)
Bmin (z −1 )F (z −1 )
Price to pay for a stable The eect of the error in the output will be larger, but the control system (and
control action in particular the control action) will be stable.
Theorem 42.2. Consider a plant with an output given by
B(z −1 )
z }| {
Bmin (z −1 )Bnon (z −1 ) −d C(z −1 )
y(t) = z u(t) + e(t) (42.36)
A(z −1 ) A(z −1 )
where u(t) is a manipulated input, and e(t) is white noise. (If there is no pure
delay of d sample times from u(t) to the output, then d = 0.) All the roots
of Bnon (z −1 ) have positive real parts; none of the roots of Bmin (z −1 ) do. This
plant is controlled in closed loop, as seen in Figure 42.1, and, without loss of
generality, reference r(t) is taken as 0 (otherwise a variable change is used). In
this situation, the controller that minimises the variance of error ε(t) = −y(t)
and ensures a stable control action is given by
G(z −1 )
u(t) = − y(t) (42.37)
Bmin (z −1 )F (z −1 )
F (z −1 )
y(t) = e(t) (42.39)
Bmin (z −1 )
Proof.Replacing the desired control action (42.37) in (42.36), and dropping the
dependence on t and z −1 to alleviate the notation,
Bmin Bnon −d G C
y= z − y + e
A Bmin F A
−d
Bnon Gz C
⇔y 1+ = e
AF A
| {z }
AF +B non
Gz −d
AF
C AF CF
⇔y= e= e (42.40)
A AF + Bnon Gz −d AF + Bnon Gz −d
nF = nBnon + d − 1 (42.41)
nG = max{nA − 1, nC − d} (42.42)
42.1. MINIMUM VARIANCE CONTROL 563
Example 42.4. We are now in position of nding a much better controller for
the non-minimum phase plant (42.29) of Example 42.3. We have
Bmin z −1 = 1 (42.45)
z −d
=z −1
(42.47)
(42.48)
The reasoning
of Example 42.2 applies here and shows that nF = 1 and nG = 1,
i.e. F z −1 = f0 +f1 z −1 and G z −1 = g0 +g1 z −1 . Or we could apply (42.41)
(42.42) and write
(42.50)
ans =
0.6551
0.8163
0.1872
Thus
F z −1 = 1 + 0.6551z −1 (42.51)
0.8163 + 0.1872z −1
u(t) = −y(t) (42.53)
1 × (1 + 0.6551z −1 )
As shown in Figure 42.5, this control law will achieve y(t) = e(t) 1 + 0.6551z −1 ,
an output larger than that of Example 42.3: the controller (42.37) is not in Sub-optimal minimum
fact a minimum variance controller; it is known as a sub-optimal minimum variance control
variance controller. However, this output is in practice feasible (since the
control action is now bounded), unlike the original controller, which would be
optimal if only it could ever work.
Remark
h i42.3. Minimum variance control minimises the variance of the error
2
E (ε(t)) , however large the control action has to be. It can be generalised so
as to minimise a cost function J instead, given by
h i h i
2 2
J = P E (ε(t)) + Q E (u(t)) (42.54)
564 CHAPTER 42. CONTROL OF STOCHASTIC SYSTEMS
where P and Q are weights. J denes how large we are willing to have the
control action to lower the variance of the output. Of course, when Q = 0 we
get minimum variance control back.
We will not explore this possibility, called generalised minimum variance
control, and which is a particular case of optimal control, addressed below
in Section 43.5.
where u(t) is a manipulated input, and e(t) is white noise. (If there is no
pure delay of d sample times from u(t) to the output, then d = 0.) This
plant is controlled in closed loop, as seen in Figure 42.1, and, without loss of
generality, reference r(t) is taken as 0 (otherwise a variable change is used).
In this situation, the controller that places the poles of the closed loop in the
locations dened by T (z −1 ) is given by
G(z −1 )
u(t) = − y(t) (42.56)
F (z −1 )
F (z −1 )
y(t) = e(t) (42.58)
T (z −1 )
Bz −d
G C
y= − y + e
A F A
−d
BGz C
⇔y 1+ = e
AF A
| {z }
AF +BGz −d
AF
C AF CF
⇔y= e= e (42.59)
A AF + BGz −d AF + BGz −d
42.2. POLE-ASSIGNMENT CONTROL 565
which is (42.58).
Remark 42.4. Orders nF and nG must again be enough for (42.57) to be
possible, and can be found by inspection in each case; these orders turn out to
be:
nF = nB + d − 1 (42.61)
nG = nA − 1 (42.62)
The maximum number of poles that can be placed is given by
nT ≤ nA + nB + d − 1 − nC (42.63)
Example 42.5. Consider a plant with an output given by
y(t) = 2y(t − Ts ) + u(t − Ts ) + 0.5u(t − 2Ts ) + e(t) + 0.3e(t − Ts )
⇔ y(t) 1 − 2z −1 = u(t) |{z}
z −1 1 + 0.5z −1 +e(t) 1 + 0.3z −1 (42.64)
| {z } | {z } | {z }
A(z −1 ) z −d B(z −1 ) C(z −1 )
(42.66)
The left side of the equation is of order 2. The right side will be of order 2
if nF = 1 and nG = 0, i.e. F z −1 = f0 + f1 z −1 and G z −1 = g0 . Notice
that the only independent term on the right side will be f0 ; thus we must have
f0 = 1. This still leaves two variables, g0 and f1 , which suce to make the
equation possible.
Instead of reasoning like this we could apply (42.61)(42.62) and write
1 − 0.2z −1 − 0.15z −2 = 1 − 2z −1 f0 + f1 z −1 + z −1 + 0.5z −2 g0
where u(t) is a manipulated input, and e(t) is white noise. (If there is no pure
delay of d sample times from u(t) to the output, then d = 0.) This plant is
controlled in closed loop, as seen in Figure 42.1, and no restriction on reference
r(t) is assumed. In this situation, the controller given by
G(z −1 ) 1
(42.72)
u(t) = r(t) − y(t)
B(z −1 )F (z −1 ) 1 − z −1
| {z }
integration
G z −1 −d
−1 −1
(42.74)
y(t) = F (z ) 1−z e(t) + z r(t)
C (z −1 )
CF 1 − z −1
Gz −d
⇔y= −1 −d
e+ r
AF (1 − z ) + Gz AF (1 − z −1 ) + Gz −d
(42.75)
nF = d − 1 (42.76)
nG = max{nA , nC − d} (42.77)
B z −1 = 1 + 0.5z −1 (42.79)
C z −1 = 1 + 0.3z −1 (42.80)
d=1 (42.81)
1 + 0.3z −1 = 1 − 2z −1 1 − z −1 F z −1 + z −1 G z −1 (42.82)
1 + 0.3z −1 = 1 − 2z −1 1 − z −1 f0 + z −1 g0 + g1 z −1
1 = f0 f0 = 1
(
F z −1 = 1
0.3 = −3f0 + g0 ⇔ g0 = 3.3 ⇒ (42.84)
G z −1 = 3.3 − 2z −1
0 = 2f0 + g1 g1 = −2
Thus
3.3 − 2z −1 3.3 − 2z −1
u(t) = −y(t) −1 −1
=− y(t) (42.85)
(1 + 0.5z ) (1 − z ) 1 − 0.5z −1 − 0.5z −2
3.3 − 2z −1 −1
y(t) = 1 − z −1 e(t) + (42.86)
z r(t)
1 + 0.3z −1
Figure 42.6 shows the results of a simulation with 50 time steps and a sinusoidal
reference. Notice that the output is not much far from the reference corrupted
by the noise (which as usual cannot be eliminated).
Glossary
I shook my head: I could not see how poor people had the means
of being kind; and then to learn to speak like them, to adopt their
manners, to be uneducated, to grow up like one of the poor women
I saw sometimes nursing their children or washing their clothes at
the cottage doors of the village of Gateshead: no, I was not heroic
enough to purchase liberty at the price of caste.
Exercises
1. Consider a plant with sampling time Ts and an output given by
y(t) = 0.6 y(t−Ts )+0.1 y(t−2Ts )+u(t−Ts )+2 u(t−2Ts )+e(t)−0.5 e(t−Ts )
(42.87)
where e(t) is white noise and u(t) is a manipulated input. Find the transfer
function R z −1 of a minimum variance regulator for this plant. Hint:
2. Find a controller for plant (42.15) of Example 42.1 that places the poles
of the closed loop at z = 10 1
and z = 201
. Hint: use Matlab for the
calculations.
Epilogue
569
Chapter 43
What next?
Beloved pupil! Tamed by thee, Caro discípulo, que bem dominas
Addish-, Subtrac-, Multiplica-tion, somas, produtos e subtrações,
Division, Fractions, Rule of Three, regras de três, razões e quocientes,
Attest thy deft manipulation! fazendo dextras manipulações:
Then onward! Let the voice of Fame avança, pois, para que a voz da Fama
From Age to Age repeat thy story, de era em era ecoe a tua história,
Till thou hast won thyself a name até que alcances para ti um nome
Exceeding even Euclid's glory! que exceda até de Euclides mesmo a glória!
This chapter not only brings together some odd ends left behind in previous
chapters, as it tries to show that what you have learned is related to many
subjects outside the scope of these Lecture Notes, which you may with this
background easily learn in dedicated courses.
This chapter is still being written. In the picture: National Pantheon, or
Church of Saint Engratia, Lisbon (source: http://www.panteaonacional.gov.
pt/171-2/historia-2/).
571
572 CHAPTER 43. WHAT NEXT?
Glossary
Had We revealed it as a non-Arabic Quran, they would have certainly
argued, If only its verses were made clear [in our language]. What!
A non-Arabic revelation for an Arab audience!
Muhammad ibn Abdullah (570? 632), Quran xli 44, Mustafa Khattab
version
43.7. OTHER AREAS 573