Professional Documents
Culture Documents
General format :
(valid for any nonlinear causal system)
ẋ = Ax + Bu
y = Cx + Du
ẋ R x
u B C y
Discrete-time system:
yk = Cxk + Duk
xk+1 xk
uk B z −1
C yk
A: n × n system matrix
B: n × m input matrix
C: p × n output matrix
&
D: p × m direct transmission matrix %
p1 p3 p2
D D
β r r β
J K K J
θ1 θ2
i1 i2
+ +
Kt e1 Kt e2
− −
dω1
capstan 1: J = T r − βω1 + Kti1,
dt
speed of x1: ṗ1 = rω1,
di1
motor 1: L = −Ri1 − Keω1 + e1,
dt
dω2
capstan 2: J = −T r − βω + Kti2,
dt
speed of x1: ṗ2 = rω2,
di2
motor 2: L = −Ri2 − Keω2 + e2,
dt
K D
Tension of tape: T = (p2 − p1) + (ṗ2 − ṗ1),
2 2
p1 + p2
Position of the head: p3 = .
2
& %
ẋ = Ax + Bu,
y = Cx + Du,
where
p 0 2 0 0 0 0
1
ω1 −0.1 −0.35 0.1 0.1 0.75 0
p 0 0 0 2 0 0
2
x = , A=
ω2
0.1
0.1 −0.1 −0.35 0 0.75
i
1
0 −0.03 0 0 −1 0
i2 0 0 0 −0.03 0 −1
00
0 0
" #
0 0 0.5 0 0.5 0 0 0
B= , C = ,
0
0 −0.2 −0.2 0.2 0.2 0 0
1 0
01
" # " # " #
0 0 p3 e1
D= , y= , u= .
0 0 T e2
& %
Continuous-time system:
( Laplace
state-space ẋ = Ax + Bu x(0)=0 Y (s)
−→ G(s) = = D + C(sI − A)−1B
equations y = Cx + Du U (s)
| {z }
transfer matrix
in practice : D = 0
⇓
∞
Laplace X
G(t) = Ce B At
←→ G(s) = CAi−1Bs−i
| {z }
i=1
impulse response matrix | {z }
transfer matrix
Discrete-time system:
( z − transf
state-space xk+1 = Axk + Buk x0 =0 Y (z)
←→ G(z) = = D + C(zI − A)−1B
equations yk = Cxk + Duk U (z)
| {z }
transfer matrix
( ⇓
∞
D : k = 0 z − transf X
G(k) = k−1
←→ G(z) = CAi−1Bz −i + D
CA B : k ≥ 1 i=1
| {z } | {z }
impulse response matrix transfer matrix
and obtain
dx d∆x
= = f (x, u) = f (xe + ∆x, ue + ∆u)
dt dt
and
& %
so,
" # " #
− cX
V
2
− cX
V
1
0 h i
A= cX2 cX1 ,B = 1
,C = 1 0 ,D = 0
−V −V V
& %
50
0
Phase (deg); Magnitude (dB)
−50
−250
−300
−350
−400
−3 −2 −1 0
10 10 10 10
& %
Frequency (rad/sec)
0.102
0.1
0.098
0.096
0 100 200 300 400 500 600 700 800 900 1000
time (s)
y(t)
0.2505
0.25
0.2495
0.249
0 100 200 300 400 500 600 700 800 900 1000
time (s)
& %
& %
0.245
mole/l
0.24
0.235
0 100 200 300 400 500 600 700 800 900 1000
y(t) : detail 1
0.2364
0.2362
mole/l
0.236
0.2358
0.2356
900 905 910 915 920 925 930 935 940 945 950
y(t) : detail 2
0.23574
0.23573
mole/l
0.23572
900 905 910 915 920 925 930 935 940 945 950
& %
time(s)
D/A A/D
clock
digital
controller
computer
• analog-to-digital converter :
clock
−1
−2
−3
−4
0 10 20 30 40 50 60 70 80 90 100
time
∗ introduces a delay
∗ frequency spectrum deformation
– first-order hold
– n-th order polynomial (more general case) : fit a n-
th order polynomial through the n+1 most recent
samples and extrapolate to the next time instance
& %
ẋ(t) = e(t)
⇔
sX(s) = E(s)
can be approximated using
• the forward rectangular rule or Euler’s method
xk+1 − xk
= ek with xk = x(kTs)
Ts e(t)
⇔
z−1
X(z) = E(z)
Ts
k-1 k k+1 t
• the backward rectangular rule
xk+1 − xk
= ek+1 e(t)
Ts
⇔
z−1
X(z) = E(z)
zTs k-1 k k+1 t
& %
xk+1 − xk ek+1 + ek
= e(t)
Ts 2
⇔
2 z−1
X(z) = E(z)
Ts z + 1 k-1 k k+1 t
Re Re Re
ẋ = Ax + Bu sX = AX + BU
⇔
y = Cx + Du Y = CX + DU
z−1
following Euler’s method s is replaced by Ts , so
z−1
X = AX + BU
Ts
or
zX = (I + ATs)X + BTsU
the output equation Y = CX + DU remains. A similar
calculation can be done for the backward rectangular rule
and the bilinear transformation resulting in the following
table :
Euler backward rect. bilinear transf.
Ad I + ATs (I − ATs )−1 (I − AT2 s )−1(I + AT2 s )
Bd BTs (I − ATs )−1BTs (I − AT2 s )−1BTs
Cd C C(I − ATs)−1 C(I − AT2 s )−1
Dd D D + C(I − ATs )−1BTs D + C(I − AT2 s )−1 BT2 s
& %
ẋ = Ax + Bu
⇒ Z t
x(t) = eAtx(0) + eA(t−τ )Bu(τ )dτ
|0 {z }
convolution integral
& %
0
frequency amplitude spectrum
−50
0
10
−100
__ : continuous system __ : continuous system
−1
10 −2 −1 −2 −1
10 10 10 10
frequency (Hz) frequency (Hz)
& %
fs ≥ 2BWcl
fs > 20BWcl
fs > 2fr
& %
& %
b1
b2
y
bn−1
x1 x2 xn−1 xn bn
u R R R R
−a1
−a2
−an−1
−an
& %
R x1
r1
−s1
R x2
r2
u y
−s2
R xn
rn
−sn
& %
x = T x̄, det(T ) 6= 0,
ẋ = Ax + Bu X −1 x = z ż = Λz + X −1Bu
=⇒
y = Cx + Du y = CXz + Du
& %
Controllability matrix:
h i
C = B AB · · · An−1B
Then
xk+1 = Ak+1x0 + Ak Bu0 + · · · + Buk
such that
uk
h i
uk−1
k+1 k
xk+1 − A x0 = B AB · · · A B .
.
u0
& %
for k ≥ n − 1 (Cayley-Hamilton
Theorem).
uk
uk−1
.. if rank(C) = n.
There exists always a vector
u0
Remarks: Controllability matrices for a continuous time
system and a discrete time system are of the same form.
& %
Observability matrix:
C
CA
O=
..
CAn−1
rank(O) = n ⇔ (A, C) observable
Explanation:
Consider an autonomous system
xk+1 = Axk
yk = Cxk
Then we find easily
yk = CAk x0
& %
& %
AT q = qλ
BT q = 0
In other words, (A, B) is controllable if and only if there is
no left eigenvector q of A that is orthogonal to B.
If there is a λ and q satisfying the PBH test, then we
say that the mode corresponding to eigenvalue λ is uncon-
trollable (uncontrollable mode), otherwise it is controllable
(controllable mode).
How to understand (for SISO) ? Put A in the modal canon-
ical form:
∗ ∗ 0
A = λi , B = 0 , ⇒ q = 1
∗ ∗ 0
Uncontrollable mode: ẋi = λixi.
& %
Ap = pλ
Cp = 0
If there is a λ and p satisfy the PBH test, then we say that
the mode corresponding to eigenvalue λ is unobservable
(unobservable mode), otherwise it is observable (observable
mode).
& %
Stability:
A system with system matrix A is unstable if A has an
eigenvalue λ with real(λ) ≥ 0 for a continuous time system
and |λ| ≥ 1 for a discrete time system.
Stabilizability:
(A, B) is stabilizable if all unstable modes are controllable.
Detectability:
(A, C) is detectable if all unstable modes are observable.
& %
& %
Kalman decomposition
Given a state space system [A, B, C, D]. Then we can
always find an invertible similarity transformation T such
that the transformed matrices have the structure
r1 r2 r3 r4
r1 Aco 0 A13 0
r2
A21 Aco A23 A24
T AT −1 =
r3
0 0 Aco 0
r4 0 0 A43 Aco
m
r1 Bco
r1 r2 r3 r4
r2 Bco
−1
TB = , CT = p Cco 0 Cco 0
r3 0
r4 0
where
r1 = rank (OC), r2 = rank (C) − r1,
r3 = rank (O) − r1, r4 = n − r1 − r2 − r3.
& %
[ Aco , 0, 0, D ]
& %
u y
CO
C Ō
C̄O
C̄ Ō
& %
T ⇓ ⇑ T −1
h i
A2 B2 C2 D
with
T = C1C2T (C2C2T )−1
& %
Poles
Characteristic polynomial of matrix A:
α(ξ) = det(ξI − A)
= αn ξ n + αn−1ξ n−1 + · · · + α1ξ + α0
Characteristic equation:
α(ξ) = 0
& %
s(b1c1 + b2c2) + β(b2c1 − b1c2) − α(b1c1 + b2c2)
= L−1
s2 − 2αs + α2 + β 2
= (Am cos(βt) + Bm sin(βt))eαt = Cmeαt cos(βt + γ)
α + jβ
β
θ ζ = sin θ
ωn
r
α
stability degree
α − jβ
& %
Ameαt cos(βt + γ)
)
Am: amplitude
determined by B and C.
γ: phase
& %
Gd(k) = CdAk−1
d Bd , k≥1
Cmbk−1 cos(ω(k − 1) + γ)
& %
β
⇒ ω = atan
α
−Bm
⇒ γ = atan
Am
& %
& %
(ζI − A)w − Bv = 0, Cw + Dv = 0
⇓
Aw + Bv = wζ, v = −D−1Cw
⇓
(A − BD−1C)w = wζ
ζ = eigenvalue of A − BD−1C,
w = corresponding eigenvector !
y(t) = 0.
Let
Πni=1(1 − ζsi )
G(s) = s ,
Πn+r
i=1 (1 − λi
)
where r = relative degree of G(s). Let y(t) be the step
response.
y(0) and its first r − 1 derivative are 0;
Fact : y (r) is the first non-zero derivative;
y(∞) = G(0).
The system has undershoot ⇔ the steady state value
y(∞) has a sign opposite to y (r)(0), i.e.
y (r)(0)y(∞) < 0.
& %
Controllability/observability
& %
& %
& %
& %
c2d
c2dm
canon
expm
tf2ss
ss2tf
(d)impulse
(d)step
minreal
tzero
ctrb
obsv
ctrbf
obsvf
(d)lsim
ss
ssdata
& %