AUTOMATIC CONTROL
Collection of Formulae
Department of Automatic Control
Lund University
June 2011
2
Matrix theory
Notations
Matrix of order m x n
a11 a12 ⋅⋅⋅ a1n
a21 a22 ⋅⋅⋅ a2n
A=
..
.
am1 am2 ⋅⋅⋅ amn
Vector of dimension n
x1
x2
x=
..
.
xn
Transpose
B = AT
bi j = a ji
( AB )T = B T AT
The matrix is symmetric if ai j = a ji .
Determinant
a11 a12 ⋅ ⋅ ⋅ a1n
a21 a22 ⋅ ⋅ ⋅ a2n
det A = p Ap = .
..
an1 an2 ⋅ ⋅ ⋅ ann
If A is of order 2 x 2, then
det A = a11 a22 − a12 a21
In general
n
X
det A = ai j (−1)i+ j det Mi j
i=1
n
X
= ai j (−1)i+ j det Mi j
j =1
where Mi j is the matrix one obtains if row i and column j are removed
from the matrix A.
Inverse
A−1 A = AA−1 = I (det A ,= 0)
If A is of order 2 x 2, then
−a12
−1 1 a22
A =
det A −a21
a11
1
In general,
1
A−1 = CT
det A
where the elements in C are given by
ci j = (−1)i+ j det Mi j
Eigenvalues and eigenvectors
The eigenvalues (λ i , i = 1, 2, . . . , n) and the eigenvectors ( xi , i = 1, 2, . . . , n)
are given as the solutions to the equation system
Ax = λ x
which has a solution if
det(λ I − A) = λ n + α 1 λ n−1 + α 2 λ n−2 + ⋅ ⋅ ⋅ + α n = 0
λ n + α 1 λ n−1 + α 2 λ n−2 + ⋅ ⋅ ⋅ + α n is called the characteristic polynomial.
det(λ I − A) = 0 is called the characteristic equation.
2
Dynamical systems
State-space equations
dx
= Ax + Bu
dt
y = Cx + Du
Z t
At
x(t) = e x(0) + eA(t−τ ) Bu(τ )dτ
0
Weighting function
Z t
y(t) = h(t − τ )u(τ )dτ
0
h(t) = CeAt B + Dδ (t)
Transfer function
Y (s) = G (s) U (s)
G (s) = C(sI − A)−1 B + D = L h(t)
The denominator of G is the characteristic polynomial to the matrix A.
Frequency response
u(t) = sin ω t
y(t) = a sin(ω t + ϕ )
a = p G (iω )p
ϕ = arg G (iω )
Linearization
If the nonlinear system
dx
= f ( x, u)
dt
y = ( x, u)
is linearized around a stationary point ( x0 , u0 ), a change of variables
∆ x = x − x0
∆ u = u − u0
∆ y = y − y0
then gives the linear system
d∆ x f f
= ( x0 , u0 )∆ x + ( x0 , u0 )∆ u
dt x u
∆y = ( x0 , u0 )∆ x + ( x0 , u0 )∆ u
x u
3
State-space representations
1. Diagonal form
λ1 0 β1
λ2 β2
dz
= z+
.
.
u
dt
. .
.
.
0 λn βn
y = γ 1 γ 2 . . . γ n z + Du
2. Observable canonical form
−a1 1 0 ... 0 b1
− a 0 1 0 b
2
2
dz
.
.
= .
.
z +
.
.
u
dt
−an−1 0 0 1
− an 0 0 0 bn
y = 1 0 0 . . . 0 z + Du
3. Controllable canonical form
−a1 −a2 . . . −an−1 −an
1
1 0 0 0
0
dz
= 0 1 0 0 z+
u
.
.
dt
. .
.
.
0
0 0 1 0
y = b1 b2 . . . bn z + Du
The transfer function of the system is
b1 sn−1 + b2 sn−2 + ⋅ ⋅ ⋅ + bn
G (s) = D +
sn + a1 sn−1 + ⋅ ⋅ ⋅ + an
β 1γ 1 β 2γ 2 β nγ n
= D+ + + ⋅⋅⋅ +
s − λ1 s − λ2 s − λn
4
The Laplace transform
Operator lexicon
Laplace transform F (s) Time function f (t)
1 α F1 (s) + β F2 (s) α f1 (t) + β f2 (t) Linearity
2 F (s + a) e−at f (t) Damping
(
f (t − a) t−a>0
3 e−as F (s) Time delay
0 t−a<0
1 s
4 F (a > 0) f (at) Scaling in t-domain
a a
1 t
5 F (as) (a > 0) f Scaling in s-domain
a a
Z t
6 F1 (s) F2 (s) f1 (t − τ ) f2 (τ ) dτ Convolution in t-domain
0
Z c+i∞
1
7 F1 (σ ) F2 (s − σ ) dσ f1 (t) f2 (t) Convolution in s-domain
2π i c−i∞
8 sF (s) − f (0) f ′ (t) Differentiation in t-domain
9 s2 F (s) − s f (0) − f ′ (0) f ′′ (t)
10 sn F (s) − sn−1 f (0) − ⋅ ⋅ ⋅ − f (n−1) (0) f (n) (t)
dn F (s)
11 (−t)n f (t) Differentiation in s-domain
dsn
Z t
1
12 F (s) f (τ ) dτ Integration in t-domain
s 0
∞
f (t)
Z
13 F (σ ) dσ Integration in s-domain
s t
14 lim sF (s) lim f (t) Final value theorem
s→0 t→∞
15 lim sF (s) lim f (t) Initial value theorem
s→∞ t→0
5
Transform lexicon
Laplace transform F (s) Time function f (t)
1 1 δ (t) Dirac function
1
2 1 Step function
s
1
3 t Ramp function
s2
1 1 2
4 2 t Acceleration
s3
1 tn
5
sn+1 n!
1
6 e−at
s+a
1
7 t ⋅ e−at
(s + a)2
s
8 (1 − at) e−at
(s + a)2
1 1
9 T e−t/T
1 + sT
a
10 sin at
s2 + a2
a
11 sinh at
s2 − a2
s
12 cos at
s2 + a2
s
13 cosh at
s2 − a2
1 1
1 − e−at
14 a
s(s + a)
1
15 1 − e−t/T
s(1 + sT )
1 e−bt − e−at
16
(s + a)(s + b) a−b
6
Transform lexicon, continued
Laplace transform F (s) Time function f (t)
s ae−at − be−bt
17
(s + a)(s + b) a−b
a
18 e−bt sin at
(s + b)2 + a2
s+b
19 e−bt cos at
(s + b)2 + a2
1
20
s2 + 2ζ ω 0 s + ω 02
1
ζ =0 ω0 sin ω 0 t
p
ζ <1 √1 e−ζ ω 0 t sin ω 0 1 − ζ 2 t
ω0 1−ζ 2
ζ =1 te−ω 0 t
p
ζ >1 √1 e−ζ ω 0 t sinh ω 0 ζ 2 − 1 t
ω0 ζ 2 −1
s
21
s2 + 2ζ ω 0 s + ω 02
p
0 ≤τ ≤π : ζ <1 √1 e−ζ ω 0 t sin ω 0 1 − ζ 2 t + τ
1−ζ 2
√
ω 0 1−ζ 2
τ = arctan −ζ ω 0
ζ =0 cos ω 0 t
ζ =1 (1 − ω 0 t) e−ω 0 t
a 1
sin(at − φ ) + e−bt sin φ
22 √
s2 + a2 (s + b) a2 + b2
a
φ = arctan
b
7
Laplace transform table, continued
Laplace transform F (s) Time function f (t)
s 1
cos(at − φ ) − e−bt cos φ
23 √
s2 + a2 (s + b) a2 + b2
a
φ = arctan
b
ab ae−bt − be−at
24 1+
s(s + a)(s + b) b−a
a2
25 1 − (1 + at) e−at
s(s + a)2
a
26 t − 1a (1 − e−at )
s2 (s + a)
1 (b − c) e−at + (c − a) e−bt + (a − b) e−ct
27
(s + a)(s + b)(s + c) (b − a)(c − a)(b − c)
ω 02
28
s(s2 + 2ζ ω 0 s + ω 02 )
p
0<ζ <1 1− √1 e−ζ ω 0 t sin ω 0 1 − ζ 2 t + φ
1−ζ 2
φ = arccos ζ
ζ =0 1 − cos ω 0 t
1 1 n −at
29 t e
(s + a)n+1 n!
s a(b − c) e−at + b(c − a) e−bt + c(a − b) e−ct
30
(s + a)(s + b)(s + c) (b − a)(b − c)(a − c)
as t
31 2 sin at
s2 + a2 2
1 1
32 √ √
s πt
√
Z ∞
1 1 2 /4t
33 √ F s √ e−σ f (σ ) dσ
s πt 0
8
G G
G(s)=(1+sT), 1
1+sT
20 T=1
Bode plot. Standard curves
10
90
.
01 2 5 1 2 5 10
1 0
Radians/s
0.5
0.2
90
0.1
0.05
0.02
180
0.01
9
10
G G
G(s)=e-sL
20 L=1
10
90
.
01 2 5 1 2 5 10
1 0
Bode plot. Standard curves, continued
Radians/s
0.5
0.2
90
0.1
0.05
0.02
180
0.01
G G
ω2
G(s)= 0
s2 + 2ζω0s + ω02
20 ω0=1
Bode plot. Standard curves, continued
10
ζ
90
ζ
5 ζ
2 ζ
.
01 2 5 1 2 5 10
1 0
Radians/s
0.5 ζ
ζ
0.2
90
0.1
ζ
0.05 ζ
ζ
ζ
ζ
0.02 ζ
180
0.01
11
Stability
Stability conditions for low-order polynomials
s + a1 a1 > 0
s2 + a1 s + a2 a1 > 0, a2 > 0
3 2
s + a1 s + a2 s + a3 a1 > 0, a2 > 0, a3 > 0, a1 a2 > a3
Routh’s algorithm
Consider the polynomial
F (s) = a0 sn + b0 sn−1 + a1 sn−2 + b1 sn−3 + ⋅ ⋅ ⋅
Assume that the coefficients ai , bi are real and that a0 is positive. Form
the table
a0 a1 a2 . . .
b0 b1 b2 . . .
c0 c1 c2 . . .
d0 d1 d2 . . .
..
.
where
c0 = a1 − a0 b1 /b0
c1 = a2 − a0 b2 /b0
..
.
d0 = b1 − b0 c1 /c0
d1 = b2 − b0 c2 /c0
..
.
The number of sign changes in the sequence a0 , b0 , c0 , d0 ⋅ ⋅ ⋅ equal the num-
ber of roots for the polynomial F (s) in the right half plane Re s > 0. All
the roots of the polynomial F (s) lie in the left half plane if all numbers a0 ,
b0 , c0 , d0 , . . . are positive.
12
Stability margins
0.8
0.6 1/ Am
0.4
0.2
G0 (ω o )
0
ϕm
−0.2
−0.4
−0.6
−0.8
G0 (ω c )
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
1
10
ωc
0
10
Gain
1
Am
−1
10
−2
10
−1 0
10 10
−50
−100
Phase
−150
ϕm
−200 ωo
−250
−1 0
10 10
Frekvens [rad/s]
Gain margin:
Am = 1/ p G0 (iω 0 )p
Phase margin:
ϕ m = π + arg G0 (iω c )
Delay margin:
L m = ϕ m /ω c
13
State feedback and Kalman filtering
State feedback
If the system
dx
= Ax + Bu
dt
y = Cx
has the control law
u = − Lx + {r r
then the closed-loop system is given by
dx
= ( A − B L) x + B {r r
dt
y = Cx
Criterion for controllability. The controllable states belong to the li-
near subspace which is spanned by the columns of the matrix
n−1
Ws = B AB ⋅⋅⋅ A B
A system is controllable if and only if the matrix Ws has rank n.
Kalman filtering
Assume that only the output signal y can be directly measured. Introduce
the model
d x̂
= A x̂ + Bu + K ( y − C x̂)
dt
The reconstruction error x̃ = x − x̂ satisfies
d x̃
= ( A − K C) x̃
dt
Criterion for observability. The subspace of unobservable states is the
null space of the matrix
C
CA
Wo =
.
.
.
n−1
CA
A system is observable if and only if the matrix W0 has rank n.
14
Lead-lag compensation
Lag compensator
s+a 1 + s/a
G K (s) = =M M >1
s + a/ M 1 + sM /a
The rule of thumb
a = 0.1ω c
guarantees that the phase margin is reduced by less than 6○ .
Lead compensator
s+b 1 + s/b
G K (s) = K K N = KK N>1
s + bN 1 + s/(bN )
The maximum phase advance is given by the figure below:
60
50
40
∆ϕ m
30
20
10
0
1 2 3 4 5 6 7 8 9 10
The peak of the phase curve is located at the frequency
√
ω =b N
The gain of the compensator at this frequency is
√
KK N
15
The Ziegler–Nichols methods
The Ziegler–Nichols step response method
Consider the step response for the open-loop system. The tangent is drawn
from the point on the step response with the maximal slope. From the
intersection of the tangent and the coordinate axes the gain a and time b
are found. The PID-parameters are calculated from the table below.
a t
Controller K Ti Td
P 1/a
PI 0.9/a 3b
PID 1.2/a 2b 0.5b
The Ziegler–Nichols frequency method
This method is based on observations of the closed-loop system. Outline of
the procedure:
1. Disconnect the integral and the derivative part of the PID-controller.
2. Adjust K until the system oscillates with constant amplitude. Denote
this value of K as K 0 .
3. Measure the period T0 for the oscillation. The different settings for
the controller parameters are given in the table below.
Controller K Ti Td
P 0.5K 0
PI 0.45K 0 T0 /1.2
PID 0.6K 0 T0 /2 T0 /8
16