A. Karamancıo Glu Electrical Engineering Department
A. Karamancıo Glu Electrical Engineering Department
= e
FT
= I +FT +(FT)
2
/2!+(FT)
3
/3!+ ,
=
_
T
0
e
F
dG
A. Karamanco glu Electrical Engineering Department
Numerical Calculation of the Matrices
= I + FT + (FT)
2
/2! + (FT)
3
/3! +
= I + F (IT + FT
2
/2! + F
2
T
3
/3! + )
. .
S
= I + AS
=
_
T
0
e
F
dG = (IT + FT
2
/2! + F
2
T
3
/3! + )
. .
S
G = SG
A. Karamanco glu Electrical Engineering Department
= e
FT
= I + FT + (FT)
2
/2! + (FT)
3
/3! + ,
The above expression evaluated exactly by taking inverse Laplace
transform of (sI F)
1
and evaluating at T.
The state space model
x = Fx + Gu
y = Cx + Du
now becomes
x(k + 1) = x(k) + u(k)
y(k) = H(x(k) + Ju(k)
A. Karamanco glu Electrical Engineering Department
Example
x =
_
0 1
0 0
_
. .
F
x +
_
0
1
_
. .
G
u
y =
_
1 0
. .
H
x + [0]
..
J
u
This is a double integrator in state space form. In scalar notation
it is y = u and y = x
1
.
Let the sampling period be T = 0.5 sec.
A. Karamanco glu Electrical Engineering Department
Exact Discretization
Continued from the previous page
= L
1
_
(sI F)
1
_
t=T
= L
1
_
s 1
0 s
_
1
t=T
= L
1
_
1
s
1
s
2
0
1
s
_
t=T
=
_
1 t
0 1
_
t=T
=
_
1 0.5
0 1
_
= L
1
_
(sI F)
1
1
s
G
_
t=T
= L
1
_
_
s 1
0 s
_
1
1
s
_
0
1
_
_
t=T
L
1
__
1
s
3
1
s
2
__
t=T
=
_
T
2
2
T
_
=
_
0.125
0.5
_
H = [1], J = [0]
A. Karamanco glu Electrical Engineering Department
Using MATLAB for Discretization
>> A=[ 0 1 ; 0 0];
>> B=[0;1];
>> C=[1 0];
>> D=0
>>sys=ss(A,B,C,D)
a =
x1 x2
x1 0 1
x2 0 0
b =
u1
x1 0
x2 1
c =
x1 x2
y1 1 0
A. Karamanco glu Electrical Engineering Department
Continued from the previous page
d =
u1
y1 0
>> sysd=c2d(sys,0.5)
a =
x1 x2
x1 1 0.5
x2 0 1
b =
u1
x1 0.125
x2 0.5
c =
x1 x2
y1 1 0
d =
u1
y1 0
A. Karamanco glu Electrical Engineering Department
Discretization by Eulers Method
Consider the state space model
x = Fx + Gu
y = Cx + Du
and let x =
x(k+1)x(k)
T
. Then:
x(k+1)x(k)
T
= Fx(k) + Gu(k)
y(k) = Cx(k) + Du(k)
This results in:
x(k + 1) = (I + FT)x(k) + GTu(k)
y(k) = Cx(k) + Du(k)
A. Karamanco glu Electrical Engineering Department
z-Domain Transfer Function
x(k + 1) = x(k) + u(k)
y(k) = H(x(k) + Ju(k)
Take the z-transforms throughout (assume that i.c.s are zero):
zIX(z) = X(z) + U(z)
Y(z) = HX(z) + jU(z)
X(z) = (zI )
1
U(z) Y(z) = (zI )
1
U(z) + JU(z)
Transfer Function of the system:
G(z) =
Y(z)
U(z)
= (zI )
1
+ J
A. Karamanco glu Electrical Engineering Department
A. Karamanco glu Electrical Engineering Department
A. Karamanco glu Electrical Engineering Department
A. Karamanco glu Electrical Engineering Department
A. Karamanco glu Electrical Engineering Department