AC_INF_2021
AC_INF_2021
xɺ (t ) f (x (t ),u (t ))
f (x ,u ) 0
In fact:
x (t ) x , t 0 xɺ(t ) xɺ f (x ,u ) 0, t 0
Bu Im( Ax )
x A 1B u
if det( A ) 0
x (t ) (t )
State vector* x (t ) 1 ɺ(t )
x 2 (t )
State and output equations
xɺ1 (t ) x 2 (t ) f 1 (x (t ), u (t ))
ɺ g 1
x 2 (t ) l sin(x 1 (t )) ml 2 x 2 (t ) ml 2 u (t ) f 2 (x (t ), u (t ))
y (t ) x 1 (t ) g (x (t ), u (t ))
0 x 2 sin x1 0
g x 2 u g
0 sin x 1
2
2 sin x1 x 2 0
l ml ml l
x k
x 1 , k 0, 1,…
x 2 0
At the equilibrium,
y (t ) y g (x ,u ), t 0
y x1 k , k 0, 1,…
xɺ (t ) f x (t ), u (t ) , u (t ) u u (t ), x (0) x x (0)
(*) The considered Cauchy problem admits a unique solution if f (x,u ) is Lipschitz continuous in
both x and u.
xɺ (t ) f x (t ), u (t )
y (t ) g ( x (t ), u (t ))
in a neighbourhood of the equilibrium point x , u
linearized model
xɺ (t ) f x (t ), u (t ) , u (t ) u u (t ), x (0) x x (0)
u (t ) u (t ) u ℝ p
y (t ) y (t ) y ℝq
xɺ (t ) xɺ (t ) xɺ f x (t ), u (t ) 0 f x (t ), u (t )
f x (t ), u (t ) f x x (t ), u u (t )
f ( x , u ) f ( x , u )
f x ,u (x (t ) x ) (u (t ) u ) …
x x x u x x
u u u u
f ( x , u ) f ( x , u )
x (t ) u (t ) …
f x ,u 0
x x x u x x
u u u u
f (x ,u ) f (x ,u )
f x (t ),u (t ) x (t ) u (t )
x x xɶ u x xɶ
u uɶ u uɶ
f (x ,u ) 1 1
f u … f 1 u p
n p Jacobian of f
B ⋮ ⋱ ⋮ ℝ :
u x x wrt u
u u n
f u 1 ⋯ f n u x x
p
u u
y (t ) y (t ) y g x (t ), u (t ) g x , u
g (x ,u ) g (x ,u )
x (t ) u (t )
x x x u x x
u u u u
C x (t ) D u (t )
g (x ,u ) 1 1
g u … g 1 u p
q p Jacobian of g
D ⋮ ⋱ ⋮ ℝ :
u x x wrt u
u u p
g u ⋯ g u
q 1 q x x
u u
y x1 g (x , u )
f1 f1
0 1
f (x ,u ) x x 2
A 1 g
x x x f 2 f 2
cos x 1
M l
2
u u x
1 x 2 x x l
u u
0 1 0 1
k even A g , k odd A g
l Ml 2 l Ml 2
f (x ,u) f1 0
B fu 1
u
u ux ux
x x 2
Ml
u u
2
g (x ,u )
C g g 1 0 D
g (x ,u )
g 0
x x x x 1 x 2 x x
u u u x x u x x
u u
u u u u
x (0) y
u (t )
y (t ) yɶ (t ) y y (t )
S
x (t )
x xɺ(t ) Ax (t ) Bu(t )
S :
y (t ) C x (t ) Du(t )
xɶ (t ) x x (t )
x 1 (t ) (t )
x (t ) ɺ
x 2 (t ) (t )
xɺ1 (t ) x 2 (t )
ɺ g 1
x 2 (t ) l sin( x 1 (t )) ml 2 x 2 (t ) ml 2 u (t )
y (t ) x 1 (t )
1 2
m 0.1 kg , l 0.5 m , 0.1 N s rad , g 9.81 ms
0.1
0
u 0, x , x (0) 180
0
0
0.008
1.5
0.006
1
0.004
d(t)/dt (rad/s)
0.5 0.002
(t) (rad)
0 0
-0.002
-0.5
-0.004
-1
-0.006
-1.5 -0.008
-0.01
-2 0 1 2 3 4 5
0 1 2 3 4 5 t (s)
t (s)
0.1
0
u 0, x , x (0) 180
0
0
0.015 0.01
0.01
0.005
0.005
d(t)/dt (rad/s)
d(t)/dt (rad/s)
0 0
-0.005
-0.005
-0.01
-0.015 -0.01
2 5
1 4
0 3
2
-5 -4 -3 -2 -1 0 1 2 3 4 -3 -1 1
x 10 -2 0
(t) (rad) -3
x 10 (t) (rad) time (s)
0.1
0
u 0, x , x (0) 180
0
0
x 0 : x 0 x x p (t ) x , t 0
x1
x0
x
x 1 (t ) (t )
x (t ) ɺ
x 2 (t ) (t )
xɺ1 (t ) x 2 (t )
ɺ g 1
x 2 (t ) l sin( x 1 (t )) ml 2 x 2 (t ) ml 2 u (t )
y (t ) x 1 (t )
1 2
m 0.1 kg , l 0.5 m , 0.1 N s rad , g 9.81 ms
5
0
u 0, x , x (0) 180
0
0
0.1
0.05
0.05
-0.05
d(t)/dt (rad/s)
(t) (rad)
-0.1
-0.15
0
-0.2
-0.25
-0.05
0 1 2 3 4 5 0 1 2 3 4 5
t (s) t (s)
5
0
u 0, x , x (0) 180
0
0
0.05
0
0.05
-0.05
d(t)/dt (rad/s)
d(t)/dt (rad/s)
-0.05
-0.1
-0.1
-0.15
-0.15
-0.2
-0.2
-0.25 5
4
-0.25 3
0.1 2
0.05 1
0
-0.05 0 0.05 0.1 -0.05 0
time (s)
(t) (rad) (t) (rad)
5
0
u 0, x , x (0) 180
0
0
a
x1
x x0
x 1 (t ) (t )
x (t ) ɺ
x 2 (t ) (t )
xɺ1 (t ) x 2 (t )
ɺ g 1
x 2 (t ) l sin( x 1 (t )) ml 2 x 2 (t ) ml 2 u (t )
y (t ) x 1 (t )
1 2
m 0.1 kg , l 0.5 m , 0.1 N s rad , g 9.81 ms
181
u 0, x , x (0) 180
0
0
1
3
0.5
2.5 0
-0.5
2
-1
d(t)/dt (rad/s)
(t) (rad)
1.5 -1.5
-2
1
-2.5
0.5 -3
-3.5
0
-4
-0.5 -4.5
0 1 2 3 4 5 0 1 2 3 4 5
t (s) t (s)
181
u 0, x , x (0) 180
0
0
0.5
0 1
-0.5
0
-1
d(t)/dt (rad/s)
d(t)/dt (rad/s)
-1
-1.5
-2 -2
-2.5 -3
-3
-4
-3.5 5
3 4
-4 2 3
1 2
-4.5 0 1
-0.5 0 0.5 1 1.5 2 2.5 3 0
(t) (rad) time (s)
(t) (rad)
181
u 0, x , x (0) 180
0
0
x1
asymptotic stability equilibrium solution
xe , ue
instability
x0 , ue
stability
x2
i : ℝe (li ( A )) 0 Unstability
0 1
k
A g x 0 ,u 0
l cosx 1 Ml 2
0 1 0 1
k even A g , k odd A g
l
Ml l Ml
2 2
k
all the equilibrium states of the form x , k even are
asymptotically stable 0
k
all the equilibrium states of the form x , k odd are
unstable 0
both the eigenvalues of the linearized system have null real part
no conclusion can be drawn on the stability properties of the
k
equilibrium states of the form: x
0 , k even
10
-10
0 20 40 60 80 100 t (s)
10
-10
0 10 20 30 40 50 k (samples)
e aT
0
-10 -5 0 5 10
k (samples)
x (k 1) Ax (k ) B u (k ) state equation
y (k ) C x (k ) Du (k ) output equation
A R n ,n B R n , p C Rq ,n D Rq , p
x (k 1) A x (k ) B u (k )
given u (k ), x (0)
y (k ) C x (k ) D u (k )
compute x (k ), y (k ), k 0
The solution can be computed using the time domain iterative relations
k 1
A
k i 1
x (k ) A
k
x (0) Bu (i ) x zi (k ) x zs (k )
i 0
x
zi
(k )
x (k )
zs
k 1
C A
k i 1
y (k ) CA
k
x (0) Bu (i ) Du (k ) y zi (k ) y zs (k )
i 0
y
zi
(k )
y (k )
zs
k0
In particular, for h = 1
Z f (k 1) zF ( z ) zf (0)
Convolution
The convolution product of the discrete time sequences f1 (k ), f2 (k )
with Z-transform F1 (z ) and F2 (z ) respectively
k k
f 1 (k ) f 2 (k ) f1 (k j ) f2( j ) f1 ( j ) f 2 (k j)
j 0 j 0
f (k ) F (z )
z
ak
z a
k k ℓ z
ℓ a ,ℓ 0 z a
ℓ 1
z sin( )
sin k , R
z 2 cos( )z 1
2
z zI A
1
A k , A Rn ,n
X zi ( z ) X zs ( z )
H (z )
Y (z ) C z zI A x (0) [C zI A B D ]U (z ) Y zi (z ) Y zs (z )
1 1
H (z ) C zI A B D transfer function
1
z 5 4
F (z )
(z 0.5)(z 0.4) z 0.5 z 0.4
-1 5
Z ??
z 0.5
4
Z -1 ??
z 0.4
10z 10z
F (z ) z Fɶ (z )
z 0.5 z 0.4
F (z ) Z 1 z
10z 10z
f (k ) Z 1
0.5
z 0.4
k
10 0.5 10 0.4 (k )
k
X (z ) z zI A x (0) zI A BU (z )
1 1
1
1
0
z 0 3 0 z 3
(zI A)1
0 z 3.5 0.5 3.5 1
(z 3)(z 0.5) z 0.5
1 1
0
z 3 1 z 3
X zi (z ) (zI A)1 x (0) z z
3.5 1 2 2z 2.5
(z 3)(z 0.5) z 0.5 (z 3)(z 0.5)
1
z 3
z
1 1
z 3 z 0.5
3k
x zi (k ) (k )
3 (0.5)
k k
3k 1
x zs (k ) (k )
3 4 (0.5) 5
k k
2 3k 1
x (k ) x zi (k ) x zs (k ) (k )
2 3 5 (0.5) 5
k k
X_i =
From input to output...
z
1: -----
(z-3)
-2 z (z-1.25)
2: -------------
(z-3) (z+0.5)
r1 =
1.0000
p1 =
3
k1 =
0
r2 =
-1.0000
-1.0000
p2 =
3.0000
-0.5000
k2 =
0
X_f =
4 z (z-4.75)
2: -------------------
(z-3) (z-1) (z+0.5)
N H (z ) bm z m bm 1z m 1 … b1z b0
H (z ) ,m n
DH (z ) z n a n 1z n 1 a n 2 z n 2 … a 0
H (z ) K
z z1 z z2 ⋯ z zm
z p1 z p2 ⋯ z pn
2z 2.1 z 1.05
Example: H (z ) 2
z 0.7z 0.1
2
(z 0.5)(z 0.2)
Y (z ) bm z m bm 1z m 1 … b1z b0
H (z ) ,m n
U (z ) z n a n 1z n 1 a n 2 z n 2 … a 0
Let’s divide both numerator and denominator by z n :
bm z m n bm 1z m n 1 … b0 z n
H (z )
1 a n 1z 1 a n 2 z 2 … a 0 z n
The Z-transform of Y (z ) is given by
Recalling that:
Z 1 {z ℓF (z )} f (k ℓ)
we can express the current output y (k ) by means of the finite
difference equation
y (k ) a n 1y (k 1) a n 2 y (k 2) … a 0 y (k n )
bmu (k n m ) bm 1u (k n m 1) … b0u (k n )
Y (z ) a1z 1 a 0 z 2 Y (z ) b1 b0 z 1 U (z )
z
H (z )
z 0.5z 0.25
2
Y (z ) H (z )U (z )
with
U (z ) 1
Y (z ) 1
Yɶ(z ) 2
z z 0.5z 0.25
R R*
, R 1.1547 j
z 0.25 0.433 j z 0.25 0.433 j
Rz R *z
Y (z ) zYɶ(z )
z 0.25 0.433 j z 0.25 0.433 j
then:
Rz R *z
f (k ) Z
1
*
2M n k cos q k
z z
M | R |, R
1.1547 j z 1.1547 j z
Y (z ) zYɶ(z )
z 0.25 0.433 j z 0.25 0.433 j
Rz R *z
Y (z ) , j n e jq
z z *
Y =
z
-------------------
(z^2 + 0.5z + 0.25)
Sample time: 1 seconds
Discrete-time zero/pole/gain model.
nu = 0.5000
theta = 2.0944
M = 1.1547
M2 = 2.3094
phi = -1.5708
3k
x zi (k ) k k
(k )
3 (0.5)
3 0 1 3
(A) 1k , 2k 3k ,(0.5)k
3.5 0.5 2 0.5
2 1k k
x zi (k ) (k )
1
k
X zi (z ) z zI A x (0)
1
z z z (z 2)
z 1 (z 1)2 1 (z 1)2
0 z 1 z
z 1 z 1
2z z
z 1 (z 1)2
z
z 1
2 1 k
k
x zi (k ) (k )
1
k
1k
x zi (k ) k (k )
1
xzi (k ) linear combination of the time sequence 1k
X zi (z ) z zI A x (0)
1
z z
z 1 0
1 z 1
0 z 1 z
z 1 z 1
1
k
x zi (k ) k (k )
1
1 1
z 1 ( z 1) 2
1
exam ple 3 ( zI A ) q A ( z ) ( z 1) 2 , 1,2 2
1
0 z 1
1
0
example 4 ( zI A ) 1
z 1 1
q A ( z ) ( z 1), 1,2
0 1
z 1
* for simplicity of notation and development, the Single Input Single Output case is considered here. The results can be
extended to MIMO systems. Details can be found in C.T. Chen, “Linear systems analysis and design”
Automatic Control – M. Canale AC_INF_L04 23
Appendix: natural modes and modal
analysis of discrete time LTI
systems
p A (z ) (z 1 ) (z 2 ) ⋯ (z r )
1 2 r
deg(pA (z )) = n
a ij (z ) (1) i j a ji (z )
1 0 0
A 0 1 1 , pA (z ) det(zI A) (z 1)2 (z 0.5),
0 0 0.5
1 1, 1 2, 2 0.5, 2 1
1
z 1 0 0
z (zI A) z 0
1 z 1 1
0 0 z 0.5
(z 1)(z 0.5) 0 0
z
0 (z 1)(z 0.5) z 1
(z 1) (z 0.5)
2
0 0 (z 1)2
Thus, the generic entry fi,j (z ) of the matrix (zI A)-1 is given by:
a ij (z )
f ij (z )
p A (z )
z
z 1 0 0
1 0 0
z z
A 0 1 1 z (zI A) 0
1
z 1 (z 1)(z 0.5)
0 0 0.5
0 z
0
z 0.5
z
z 1 0 0
z z
z (zI A) 0 1
z 1 (z 1)(z 0.5)
0 z
0
z 0.5
q A (z ) (z 1)(z 0.5)
we obtain:
r1,1z r1,2z r1, ' z
f ij (z ) … 1
z 1 (z 1 ) 2
(z 1 ) ' 1
rr ,1z rr ,2 z rr , ' z
… … r
z r (z r )2 (z r ) ' r
'1 1
1
k k ' 1
r2,12k r2,2k 2k 1 … r2, ' 2
2
…
'2 1
1
k k ' 1
rr ,1r k rr ,2k r k 1 … rr , ' r
r
r
r ' 1
f 11 (k ) f 12 (k ) ⋯ f 1n (k )
f 21 (k ) ⋱ f ij (k ) ⋮
x zi (k ) A x (0)
k
x (0)
⋮ ⋯ ⋱ ⋮
f n 1 (k ) … … f nn (k )
'1 1
1
k k ' 1
2 m 2,1 (k ) 2k , m 2,2 (k ) k 2k 1 ,… , m 2, ' (k ) 2
2
'2 1
2
…
k k ' 1
r m r ,1 (k ) r k , m r ,2 (k ) k r k 1 ,… , mr , ' (k ) r
r
'r 1
r
k k ' 1
mi ,0 (k ) i k , mi ,1 (k ) k i k 1 ,… , mi , ' (k ) i
i
'i 1
i
= ne jq C having
associated with the eigenvalue = j
minimal polynomial multiplicity ’ are:
• Geometrically convergent if || < n < 1
(Example k 0.5 k-1 cos(k-1 ))
• Polynomially divergent if || = n 1, Arg() = q 0
(Example: k cos(5(k-1)) )
• Geometrically divergent if || = n > 1
(Example: k 1.5 k-1 cos(k-1))
f (t )
f (t ) f (kT ) f (kT )
A/D
0 1 2 3 4 5 6 7 k
T
f (t ) f (kT )
f (t ) f * (t )
0 t 0 T 2T 3T 4T 5T 6T 7T t
f (t ) Since
f (t ) d (t kT ) f ( kT )d (t kT )
f * (t )
f *(t ) is a sequence of impulses with
0 T 2T 3T 4T 5T 6T 7T t amplitudes equal to the samples of
f (t ) at every T.
f * (t )
0 T 2T 3T 4T 5T 6T 7T t
f * (t ) f (t ) dT (t ) f (t ) d (t kT )
k 0
f (kT )d (t
k 0
kT )
f (t )d (t kT ) f ( kT )d (t kT )
T
f (t ) f * (t )
d T (t )
Since d (t
k
kT ) is periodic, it can be expressed through the
Fourier series
1 T /2 1
k
d (t
kT )
k
C k e jk ,
s
Ck
T T k d (t
/2
kT )e jk dt
s
T
2
s sampling angular frequency
T
1 1
f * (t ) f (t )e jk t L f * (t )
s
F (s jk s )
T k
T k
L f (t )e s 0t
F ( s s 0
)
f(kT)
f(t)
t (s)
F ( j )
- ω0 ω0 ω
* The pictures of this part are taken from C. Greco, M. Indri, Controlli Automatici, Politecnico di Torino - CELM
(2007)
Automatic Control – M. Canale AC_INF_L05 15
Signal sampling
The inverse Fourier transform is given by
1
F 1 {F ( j )} f (t ) F ( j )e j t d
2 0
1
F ( j ) cos(t
0
arg(F ( j )))d
Thus
f (t ) can be expressed as an infinite sum of harmonic (sinusoidal)
components with angular frequency .
Each harmonic component of f (t ) is weighted by |F(j)|/.
2 1 T /2
1
s
T
sampling "frequency" ,C k
T T
/2
k
d (t
kT )e jk dt
s
T
Then
1 1
f * (t ) f (t )e jk t
s
F f * (t ) F ( j ( k s ))
T k T k
F * ( j )
1
T
..... .....
- ωs - ω0 ω0 ωs ω
- ωs - ω0 ω0 ωs ω
s
s
2
N
2
N
1
T
-ω 0 ω0 ω
s
s
2 2
s 1 sin(s t / 2)
T , s
G I ( j )e j t d
G I ( j ) 2 2 g I (t )
2
s t / 2
0, elsewhere
sin(s (t ) / 2)
k f (kT ) d ( kT ) d
s (t ) / 2
d (t kT ) h (t )dt h ( kT )
sin(s (t kT ) / 2)
k f (kT )
s (t T ) / 2
To compute f (t ) past and future samples are needed ideal low
pass filtering is not a causal procedure it can not be realized in
practice.
F * ( j )
1
T
..... .....
-2ω s - ω -s ω0 ω0 ω s 2ω s ω
s
s
2 2
F * ( j )
1
T
..... .....
-2ω s - ω s- ω0 ω0 ω s 2ω s ω
s
s
2 2
1
T
F * ( j ( s ))
F * ( j )
ω0 ω s ω
1
It happens that, at frequency ω1, both the central band |F*(jω1)|,
and the side band |F *(j(ωs-ω1))| contributions affect the
computation of the spectrum of f * .
In this case, the frequency ωa= |ωs-ω1| of the side band spectrum
is referred to as an alias of 1
- ωs s s ωs ω
2 2
In such cases, spectra overlapping and aliasing effects can not be
avoided.
F ( j )
- ω s s - f f s ωs ω
2 2
e(kT) u(kT)
e(t) u(t)
r(t) Digital D/A and Actuator & y(t)
Filter A/D Plant
+ controller hold
-
T
T T
clock
Sensor
1
*see AC_INF_L05 20-21 and, for more details, e.g. G.F. Franklin, J.D. Powell, M. Workman, Digital
control of dynamic systems, Addison Wesley, 1997
Automatic Control – M. Canale AC_INF_L05 30
D/A conversion
The simplest and most widely employed data reconstruction
device is the zero-order hold (ZOH) filter.
The ZOH clamps the output to a value equal to the input at the
current sampling instant and keeps it until the next sampling.
1 e j T e j T /2 e j T /2 2T
G ZOH ( j ) e j T /2
j 2j T
collect e j T /2
multiply num and den by 2T
sin(T / 2) j T /2
T e
T / 2
sin(T / 2) T
G ZOH ( j ) T , G ZOH ( j ) (sin(T / 2))
T / 2 2
Note that
T sin(T / 2)
0 1 G ZOH ( j ) ≃ Te j T /2 , [0, N ]
2 T / 2
T 2
sin
G ZOH ( j N ) G ZOH ( j s / 2) 1 2 2T 2 ≃ 3 dB
T T T 2
2
s
T 2T
|GZOH(j)|/T (dB)
0
-20
The ZOH filter frequency -40
behavior is low pass -60
-80 -1 0 1 2
10 10 10 10
200
100
at s 0 -1
s = 6.28 rad/s
0 1 2
10 10 10 10
T
0.5
f(t)
0 continuous-time signal
-0.5
-1
0 20 40 60 80 100
t (s)
60
40
|F(j)|
20 spectrum
0
0 5 10 15 20 25
(rad/s)
ω0 = 17 rad/s, ωs ≥ 2 ω0 T ≤ 2π/ωs = π/ ω0 = 0.185 s
f(t)
f(t)
f(t)
0 0 0
-1 -1 -1
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20
t (s) t (s) t (s)
e(kT) u(kT)
U(z) bn bn 1z 1 … b0 z n
E (z) C (z )
C(z) 1 an 1z 1 an 2z 2 … a 0 z n
e(kT) u(kT)
e(t) u(t)
Digital D/A &
A/D
controller hold
e(kT) u(kT)
e(t) u(t)
C(z) ZOH
T
Note the presence of both continuous time and discrete time signals
and dynamic systems (hybrid system)
e(t)
1 1
T E * (e j T )
T
E s ( j )
T h
E ( j ( h s ))
Digital controller
e(kT) u(kT)
C(z) C (z ) C (e j T ) U * (e j T ) C (e j T )E * (e j T )
D/A conversion
u(kT)
u(t)
ZOH U ( j ) G ZOH ( j )U * (e j T )
1
U ( j ) G ZOH ( j )C (e j T ) E s ( j )
T
Supposing e(t) band limited and recalling that ZOH behaves like a low
pass filter
1 1
U ( j ) G ZOH ( j )C (e j T ) E ( j ) U (s ) G ZOH (s )C (e sT ) E (s )
T T
Cɶ ( s )
N
Now, the problem of designing the controller C(z) for the sampled data
control system structure below is considered.
1
Lɶ( j ) Cɶ ( j )G ( j ) G ZOH ( j )C (e j T ) G ( j )
T
• ZOH filter:
the D/A converter introduces a phase lag of
T
G ZOH ( j )
2
In order to limit the phase lag at the cross-over frequency to
small values (e.g. – 10° to – 5°), the following bound should be
considered
T
G ZOH ( j )
2 s
10 5 0.087 rad 0.17 rad
s s
18c s 36c
c
C (z ) C log z
1 1
s log z
T T
0
xɺ (t ) Ax (t ) Be (t ) U (s )
C (s ) C (sI A ) B D 1
u (t ) Cx (t ) De (t ) E (s ) 0
kT
xɺ (t )dt kT
Ax (t )dt kT
Be (t )dt
( k 1 ) T ( k 1 ) T
x (k 1) x (k ) A
* *
kT
x (t )dt B
kT
e (t )dt
x ( kT ) x * ( k )
x (( k 1)T ) x * ( k 1)
kT
f (t )dt ≃ [(1 )f (kT ) f ((k 1)T )]T , 0 1
= 1 Bacward Euler = 0 Forward Euler = 0.5 Tustin
B [(1 )e (k ) e (k 1)]T
* *
1 z 1
I A X (z ) BE (z )
* *
T z 1
1
1 z 1
X (z )
*
I A BE (z ) *
T z 1
u (k ) Cx (k ) De (k ) U (z ) CX (z ) DE (z )
* * * * * *
1
1 z 1
U (z ) C
*
I A B D E (z ) *
T z 1
C (z )
1 z 1
C (z ) C I A B D T z 1
T z 1 bilinear transformation
C (z ) C (s ) s 1 z 1
0
T z 1
2 z 1 2 1 z 1
0.5 Tustin : s
T z 1 T 1 z 1
1 z 1 1z 1
0 Forward Euler : s
T T z 1
2 z -1
s
T z 1
1 z -1
s
T z
1
10
35z 31.67
Tustin : C (z ) , K limC (z ) 2
z 0.6 c z 1
20z 18.18
Backward Euler : C (z ) , K limC (z ) 2
z 0.09 c z 1
200z 180
Forward Euler : C (z ) unstable
z 9
50
40
Magnitude (dB)
30
20
10
0
90
C0
C
tus tin
C
Ba ckEule r
60
Pha se (deg)
30
0
-3 -2 -1 0 1 2 3
10 10 10 10 10 10 10
Frequency (rad/sec )
0
s s p s p … s p
r
1 2 n r
C (z ) K
z e z e … z e , K
q1T q 2T q nT
K
q (1 e )
n
i 1 i
n r
i 1
pi T
z 1 z e z e … z e p (1 e )
d r d
p1T p 2T pn r T n r n q iT
i 1 i i 1
1
s s 10 c s 0 0
10
z e 0.1
z 0.9048
MPZ : C (z ) 21.0157 21.0157 ,lim C (z ) 2
z e 10
z 4.54 10 -5 z 1
50
40
Mag nitud e (dB)
30
20
10
0
90
C0
C Tustin
C BackE uler
60 C MPZ
Phas e (d eg)
30
0
-3 -2 -1 0 1 2 3
10 10 10 10 10 10 10
Frequenc y (rad/sec )
The Tustin approximation still provides the best frequency response
matching of the analog controller
METHOD:
'zoh' Zero-order hold
'foh' First-order hold
'imp' Impulse-invariant
'tustin' Tustin
'prewarp' Tustin approximation with frequency
prewarping
'matched' Matched pole-zero
e(kT) u(kT)
e(t) u(t)
r(t) y(t)
F(s) C(z) ZOH G(s)
+ T
-
1 g g ≪ 1
h
-5
arg(F(j)) (°)
-10
-15 n=1
n=2
n=3
-20 n=4
-25 -2 -1
10 10
/ f
n 2
f h g 1 / n 10 0.11 / 2 3.16 -5
arg(F(j)) (°)
-10
lag ≃ 5
-15 n=1
n 3 n=2
n=3
f h g 1 / n 10 0.11 / 3 4.64 -20 n=4
xɺ (t ) Ax (t ) Bu (t )
, x Rn , u Rp
, y
y (t ) Cx (t ) same number of
inputs and outputs
xɺ (t ) Ax (t ) Bu (t ) ( A BK )x (t ) BNr (t )
u Kx Nr
xɺ (t ) ( A BK )x (t ) BNr (t )
A suitable choice of K allows us to modify the system
eigenvalues and improve the dynamic properties of the system
(e.g. stabilize it).
The input r (t ) is a reference signal for the output.
The reference gain matrix N can be chosen to modify the dc-
gain of the controlled system.
xɺ (t ) ( A BK )x (t ) BNr (t )
However, is it always possible to find a matrix K able to
arbitrarily assign the eigenvalues of A BK ?
Result: Given the state space equation
xɺ (t ) Ax (t ) Bu (t ), A Rn ,n , B Rn , p
a matrix K ∈ Rp,n exists such that the n eigenvalues of A BK can
be assigned to arbitrary, real or complex-conjugate, locations if
and only if
(M R ) B AB ⋯ A n 1B n
>> Mr = ctrb(A,B);
>> rho_Mr = rank(Mr);
1 1 2
xɺ (t ) x (t ) u (t ), y (t ) 0 1 x (t )
0 1 0
2 2
M R B AB , (M R ) 1 n
0 0
xɺ (t ) Ax (t ) Bu (t )
G (s ) C (sI A ) 1 B
y (t ) Cx (t )
xɺ (t ) ( A BK )x (t ) Br (t )
y (t ) Cx (t )
Reachability test
1 5
MR (MR ) 2
2 0
1 3 1 1 k1 3 k2
A BK k 1 k 2
4 2 2 4 2k 1 2 2k 2
p A BK (l ) det l I A BK l 2
(3 k 1 2k 2 )l 8k 1 6k 2 10
pdes (l ) p A BK (l )
l 2 5l 6 l 2 (3 k 1 2k 2 )l 8k 1 6k 2 10
3 k 1 2k 2 5 k 1 8
K k 1 k 2 8 8
8k 1 6k 2 10 6 k 2 8
l1,2 0 j w0 zwn j wn 1 z 2
t s ,5% 1.8 1
t s ,5% 4.74 '' 0.37s wn'' 2.63 rad/s
4.74 4.74 ''
q (t )
u (t ) K aug x aug (t ) K q K x
x (t )
dim(K aug ) 1 (n 1), dim(K q ) 1, dim(K x ) 1 n
Kx
xɺ (t ) Ax (t ) Bu (t ) xˆɺ (t ) Axˆ(t ) Bu (t )
ɺ
eɺ (t ) xˆ(t ) xɺ (t ) Axˆ(t ) Bu (t ) Ax (t ) Bu (t )
A (xˆ(t ) x (t )) Ae (t )
eɺ (t ) xˆɺ (t ) xɺ (t )
Axˆ (t ) Bu (t ) L ( yˆ (t ) y (t )) Ax (t ) Bu (t )
Axˆ (t ) Bu (t ) LCx (t ) LCxˆ (t ) Ax (t ) Bu (t )
A LC xˆ (t ) x (t ) A LC e (t )
xɺ (t ) Ax (t ) Bu (t )
, x R n , u R p , y Rq
y (t ) Cx (t )
xɺ (t ) Ax (t ) Bu (t )
If (M O ) n the dynamic system
y (t ) Cx (t )
is said observable, or the couple (A,C ) is observable for short.
>> Mo = obsv(A,C);
>> rho_Mo = rank(Mo);
1 1 2
xɺ (t ) x (t ) u (t ), y (t ) 1 0 x (t )
0 1 1
C 0 1
MO , (M O ) 1 n 2
CA 0 1
Observability test C
CA
MO C 0 1 , M O 2 n
⋮ CA 1 2
n 1
CA
Desired characteristic polynomial of the observer
ℓ 0 1 ℓ 0 1ℓ
L 1 A LC 1 0 1 1
ℓ
2 1 2 ℓ 2 1 2 ℓ 2
pdes (l ) p A LC (l )
l 2 30l 200 l 2 (ℓ 2 2)l 1 ℓ 1
u (t ) Kxˆ(t ) Nr (t )
r + u x (xtɺ ()= Ax
t )Ax (t )(+
t )Bu Bu
(t )(t ) y
N
- y’y(k(t))= CCx (t ))
x (k
u (t )
xˆ xˆɺ (t ) A LC xˆ (t ) B L
K y (t )
y stim (t ) xˆ (t )
where:
A BK B
AI B I N C I C 0n 1
LC A BK LC B
where:
A BK BK B
AII B II N C II C 0n 1
0n n A LC 0n 1
u (t )
xˆ xˆɺ (t ) A LC xˆ (t ) B L
Kx y (t )
y stim (t ) xˆ (t )
u (t )
xˆ xˆɺ (t ) A LC xˆ (t ) B L
Kx y (t )
y stim (t ) xˆ (t )
0 C 0
Aaug 11 , B aug K aug K q K x
0n 1 A B