Digital and Optimal Control Data Book: Prepared by Themistoklis Charalambous and Ammar Khan
Digital and Optimal Control Data Book: Prepared by Themistoklis Charalambous and Ammar Khan
2017 version
Contents
1 Table of Laplace Transforms 1
2 Table of Z-transforms 2
3 Continuous-time control 3
3.1 Stability of the Closed-loop System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Routh-Hurwitz Stability Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.3 Nyquist Stability Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.4 Root Locus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.5 Bode Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.6 Solution of continuous-time LQ problem using Dynamic Programming . . . . . . . . . 5
4 Discrete-time control 6
4.1 State-space representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2 Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3.1 Backward difference method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3.2 Forward difference method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.3.3 Bilinear or Tustin method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.3.4 Impulse-invariance method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.3.5 Step-invariance method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.4 Nyquist criterion for sampling frequency . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.5 Gain- and phase margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.6 Stability criteria for discrete time systems . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.6.1 Jury’s stability criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.6.2 Triangle rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.6.3 Nyquist stability criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.7 Controllability and observability matrices . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.8 Canonical forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.8.1 Controllable canonical form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.8.2 Observable canonical form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.9 Difference Equation and Pulse Transfer Function from Canonical Form . . . . . . . . . 10
4.10 State controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.11 State observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.12 Luenberger Observer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.13 Servo controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.14 Disturbance models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.14.1 Concepts of stochastic processes . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.14.2 Properties of stochastic variables . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.14.3 Covariances and spectral densities . . . . . . . . . . . . . . . . . . . . . . . . . 12
i
ii ELEC-E8101 Data Book
5 Mathematical Preliminaries 16
5.1 Quadratic formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Geometric series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Partial fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 Matrix Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4.1 Determinant of a marix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4.2 Adjoint of a marix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4.3 Inverse of a marix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.4.4 The Cayley-Hamilton theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.4.5 Eigenvalues of a matrix function . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2017 version 1
δ(t) impulse 1
1
u(t) unit step
s
n!
tn
sn+1
1
e−at
s+a
ω0
sin(ω0 t)
s + ω02
2
s
cos(ω0 t)
s2 + ω02
ω0
sinh(ω0 t)
s − ω02
2
s
cosh(ω0 t)
s − ω02
2
A(s + a) + Bω0
e−at [A cos(ω0 t) + B sin(ω0 t)]
(s + a)2 + ω02
e−at g(t) G(s + a) shift in s
d
tg(t) − ds G(s)
dg
dt differentiation sG(s) − g(0)
dn g dg dn−1 g
dtn sn G(s) − sn−1 g(0) − sn−2 dt − ··· − dtn−1
0 0
Z t
G(s)
g(τ )dτ integration
0 s
g1 (t) ∗ g2 (t) convolution G1 (s)G2 (s)
Z t
= g1 (t − τ )g2 (τ )dτ
0
2 ELEC-E8101 Data Book
2 Table of Z-transforms
Sequence: z-Transform:
X∞
gk , k = 0, 1, 2, . . . G(z) = gk z −k
k=0
1
1 (unit step)
1 − z −1
T z −1
kT
(1 − z −1 )2
(k + m − 1)! 1
k!(m − 1)! (1 − z −1 )m
1
e−akT
1− e−aT z −1
sin(ω0 T )z −1
sin(ω0 kT )
1 − 2 cos(ω0 T )z −1 + z −2
1 − cos(ω0 T )z −1
cos(ω0 kT )
1 − 2 cos(ω0 T )z −1 + z −2
rk−1 1 − az −1
[r sin(ω0 (k + 1)T ) − a sin(ω0 kT )]
sin ω0 T 1 − 2r cos(ω0 T )z −1 + r2 z −2
A + rz −1 (B sin(ω0 T ) − A cos(ω0 T ))
rk [A cos(ω0 kT ) + B sin(ω0 kT )]
1 − 2r cos(ω0 T )z −1 + r2 z −2
rk gk G(r−1 z)
3 Continuous-time control
r̄(s) + ē(s) ȳ(s)
Σ K(s) P (s)
−
z̄(s)
H(s)
G(s)K(s) G(s)K(s)
ȳ(s) = r̄(s) = r̄(s)
1 + H(s)G(s)K(s) 1 + L(s)
G(s)K(s)
where 1+L(s) is the closed-loop transfer function relating y and r.
For the following conditions it is convenient to write L(s) = k g(s), an explicit function of the gain k.
Asymptotes: If g(s) has P poles and Z zeros, the asymptotes of the loci as k → ∞ are straight lines at
angles (2m+1)π 2mπ
P −Z to the real axis if k > 0 ( P −Z if k < 0).
Their point of intersection σ with the real axis is given by:
P P
(poles of g(s)) − (zeros of g(s))
σ=
P −Z
40dB
(=100) high freq asymptote
(slope = 20 dB/decade)
Gain
20dB
(=10)
low freq
asymptote
3 dB
0dB
(=1)
high freq
ω = 10/T asymptote
90
Phase (degrees)
45
approximation
to true phase
low freq
asymptote
ω = 0.1/T
0
0.01/T 0.1/T 1/T 10/T 100/T
Frequency (rad/sec)
1
Bode diagram of for ζ = 0.2, 0.4, 0.6, 0.8, 1.0:
1 + 2ζsT + s2 T 2
20
0
−6dB
Gain (dB)
ζ=1
−20
−40
−60
0.01/T 0.1/T 1/T 10/T 100/T
Frequency (rad/sec)
2017 version 5
ζ = 0.2
−45
ζ=1
Phase (degrees)
−90
−135
−180
0.01/T 0.1/T 1/T 10/T 100/T
Frequency (rad/sec)
Crtierion:
tf
1
Z
J(to ) = x(tf )T S(tf )x(tf ) + xT (t)Qx(t) + u(t)T Ru(t) dt
2 to
(S(tf ) ≥ 0, Q ≥ 0, and R > 0)
4 Discrete-time control
4.1 State-space representation
Continuous-time state-space representation is given by
With periodic zero-order-hold (ZOH) sampling (sampling period h), the corresponding discrete-time
system is represented as
where
Φ = eAh
Z h
Γ= eAs ds B
0
4.3 Discretization
The Laplace transfer function G(s) can be approximated by a discrete-time pulse function G(z) by the
following methods (sampling period is h):
z−1
−1 G(s)
G(z) = Z L
z s
t=kh
The continuous time counterpart xc (t) of a sampled signal xc (kh) can only be uniquely determined if
the sampling angular frequency is at least twice as big as ωo , i.e.,
2π
ωs = > 2ωo
Ts
The minimum sampling angular frequency for which the inequality holds is called Nyquist angular fre-
quency.
argH(ejωo h ) = −π
|H(ejωc h )| = 1
Gain margin:
1
Amarg =
|H(ejωo h )|
Phase margin:
φmarg = π + argH(ejωc h )
A(z) = a0 z n + a1 z n−1 + · · · + an
With Jury’s test it is possible to check whether all poles of the system are inside the unit circle, i.e.,
whether the system is asymptotically stable.
a1 · · · an−1 an
a0
bn = aan0
an an−1 · · · a1 a0
an−1 an−1 · · · an−1
0 1 n−1
(2n + 1) rows
an−1
an−1 n−1
n−1 an−2 · · · a0
n−1
bn−1 = n−1
n−1
a0
.
..
0
a0
where an0 = a0 , an1 = a1 , · · · , ann = an ,
ak−1
i = aki − bk akk−i
akk
bk =
ak0
A(z) = z 2 + a1 z + a2
a2 < 1
a2 > −a1 − 1
a2 > a1 − 1
2017 version 9
R(z) + Y (z)
Σ L(z)
−
will be stable if (and only if) the number of counter clockwise encirclements N of the point −1 by L(ejω )
as ω increases from 0 to 2π is equal to
N =Z −P
where
Z : number of zeros of the characteristic equation 1 + L(z) = 0 outside the unit circle
P : number of poles of the characteristic equation 1 + L(z) = 0 outside the unit circle
The zeros of the characteristic equation (i.e., closed-loop poles) determine the stability of the system
so that if the characteristic equation has zeros outside the unit circle, then the closed loop system is
unstable. The stability criterion is thus obtained by setting Z = 0 and by demanding that the Nyquist
curve encircles the point −1 P times counterclockwise.
Wc = Γ ΦΓ · · · Φn−1 Γ
C
CΦ
Wo =
..
.
CΦ n−1
A system is reachable if and only if matrix Wc has rank n. A system is observable if and only if matrix
Wo has rank n, where n is the order of system.
y[k] = b1 b2 · · · bn z[k]
fc Wc−1 , where W
The transformation matrix to the controllable canonical form is T = W fc is the control-
lability matrix for the controllable canonical form.
10 ELEC-E8101 Data Book
y[k] = 1 0 0 · · · 0 z[k]
f −1 Wo , where W
The transformation matrix to the observable canonical form is T = W fo is the observ-
o
ability matrix for the observable canonical form.
4.9 Difference Equation and Pulse Transfer Function from Canonical Form
Representation of a system in controllable and observable canonical forms is discussed in the previous
section. To represent the system as a difference equation directly from canonical form:
To represent the system in terms of transfer function directly from canonical form:
bo z nb + b1 z nb −1 + · · · + bnb
G(z) =
z na + a1 z na −1 + · · · + ana
State controller:
u[k] = −Lx[k]
If the system has to trace a changing reference signal, we use the servo controller:
u[k] = Lc yref [k] − Lx̂[k]
where yref [k] is the reference signal.
The overall system becomes:
x[k + 1] Φ − ΓL ΓL x[k] ΓLc
= + yref [k]
e[k + 1]
x 0 Φ − KC xe[k] 0
x[k]
y[k] = C 0
xe[k]
Z ∞
2
var{x} = E{(x − E{x}) } = (x − E{x})2 .p(x)d(x)
−∞
For vectors:
m(t) = E{x(t)}
var{x(t)} = E{(x(t) − m(t))(x(t) − m(t))T }
= E{(x(t) − E{x(t)})(x(t) − E{x(t)})T }
E{ax} = aE{x}
E{x + y} = E{x} + E{y}
E{a} = a
var{ax} = a2 var{x}
var{a} = 0
E{xy} = E{x}E{y}
var{x + y} = var{x} + var{y}
π
1 X∞
Z
φxy (ω) = rxy (k)e−ikω rxy (k) = e−ikω φxy (ω)dω
2π k=−∞ −π
σ2
φ(ω) =
2π
2017 version 13
Mean:
my = H(1)mu
Spectral density:
Cross-spectral density:
where the polynomials F and G are the quotient and the remainder when dividing q m−1 C by A, i.e.,
The variance of the prediction error can be calculated from the terms of F :
G∗ (q −1 ) −G(q)
u[k] = ∗ −1 ∗ −1
y[k] = y[k]
B (q )F (q ) B(q)F (q)
where the polynomials F and G are the quotient and the remainder when dividing q d−1 C by A, i.e.,
d = degA − degB
Crtierion:
N −1
1 T 1 X T
xk Qxk + uTk Ruk
J = xN SN xN +
2 2
k=i
(SN ≥ 0, Q ≥ 0, and R > 0 are symmetric)
where v and e are discrete-time Gaussian white noise processes with zero-mean value and
E{vvT } = R1
( )
T
v v v R1 R12
T
E{ve } = R12 ⇒ cov =E = T
e e e R12 R2
T
E{ee } = R2
The initial state x[0] is assumed to be Gaussian distributed, i.e., x[0] ∼ N (m0 , R0 ). Then, the Kalman
filter is given by
−1
P [k + 1] = ΦP [k]ΦT + R1 − ΦP [k]C T + R12 CP [k]C T + R2 CP [k]ΦT + R12
where P [k] is the co-variance of the estimation error, P [0] = R0 , x̂[k + 1|k] is the estimated state and
K[k] is the Kalman gain.
The continous-discrete correspondence of controller components for a practical PID controller is as fol-
lows:
Pm (z) = Kp (bYref (z) − Y (z))
Pm (s) = Kp (bYref (s) − Y (s))
Ki I(z) = Ki h (Y (z) − Y (z))
I(s) = (Yref (s) − Y (s))
ref
s =⇒ z−1
Kd s Kd z−1
D (s) = − Y (s) zh
m
D
m (z) = D m (s)| z−1 = − Y (z)
1 + KNd s
s= zh
1 + KNd z−1
zh
16 ELEC-E8101 Data Book
5 Mathematical Preliminaries
5.1 Quadratic formula
The general quadratic equation is
ax2 + bx + c = 0,
where x is the unknown, while a, b and c are constants with a not equal to 0. With the above parameter-
ization, the quadratic formula is:
√
−b ± b2 − 4ac
x= .
2a
n
X 1 − rn+1
For r 6= 1, ark = a + ar + ar2 + ar3 + . . . + arn = a
1−r
k=0
n
X rm − rn+1
For r 6= 1, ark = a
1−r
k=m
∞
X a
For |r| < 1, ark = a + ar + ar2 + ar3 + . . . =
1−r
k=0
P (z) K1 K2 Kn
Y (z) = ≡ + + ... , ri 6= rj , i 6= j
(z − r1 )(z − r2 ) . . . (z − rn ) z − r1 z − r2 z − rn
P (z) Cq Cq−1 C1 K1 Kn
Y (z) = ≡ + + ... + + + ...
(z − r)q (z − r1 ) . . . (z − rn ) z−r z−r z − r z − r1 z − rn
Heaviside method:
Ki = lim {(z − ri )Y (z)} , i = 1, 2, . . . , n
z→ri
1 dk
q
Cq−k = lim [(z − r) Y (z)]
z→r k! dz k
2017 version 17
Determinant of a 2 x 2 matrix:
For a matrix:
a a
A = 11 12
a21 a22
a11 a12
det(A) = |A| = = a11 a22 − a21 a12
a21 a22
Determinant of a 3 x 3 matrix:
For a matrix:
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
Adjoint of a 2 x 2 matrix:
For a matrix:
a a
A = 11 12
a21 a22
a22 −a12
adj(A) =
−a21 a11
Adjoint of a 3 × 3 matrix:
For a matrix:
a11 a12 a13
A = a21 a22 a23
a31 a32 a33
18 ELEC-E8101 Data Book
a22 a23 a12 a13 a12 a13
+a32 − +
a33 a32 a33 a22 a23
T
a21 a23
a11
a13
a11
a13
−a31
adj(A) = C =
a33
+
a31 a33
−
a21
a23
a21 a22
a11
a12
a11
a12
+ − +
a31 a32 a31 a32 a21 a22
adj(A)
inv(A) = A−1 =
det(A)
λn + a1 λn−1 + a2 λn−2 + · · · + an = 0
M n + a1 M n−1 + a2 M n−2 + · · · + an I = 0