0% found this document useful (0 votes)
56 views16 pages

A. Karamancıo Glu Electrical Engineering Department

This document discusses discrete state space control. It begins by presenting the general state space model and solution for the state vector over time. It then shows how to discretize the model by sampling the state at time intervals to obtain discrete-time state space models in terms of the transition matrix Φ and input matrix Γ. An example double integrator system is discretized both exactly and using Euler's method. MATLAB is also used to discretize the example system. The discretized model is then represented in terms of the z-transform and transfer function.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views16 pages

A. Karamancıo Glu Electrical Engineering Department

This document discusses discrete state space control. It begins by presenting the general state space model and solution for the state vector over time. It then shows how to discretize the model by sampling the state at time intervals to obtain discrete-time state space models in terms of the transition matrix Φ and input matrix Γ. An example double integrator system is discretized both exactly and using Euler's method. MATLAB is also used to discretize the example system. The discretized model is then represented in terms of the z-transform and transfer function.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Discrete State Space Control

Consider the state space system model


x = Fx + Gu
y = Cx + Du
where x R
n
, y R
p
, u R
m
. The rst row is called the state
equations, and the second is called the output equations. For a
known input u state equations have the solution
x(t) = e
F(tt
0
)
x(t
0
) +
_
t
t
0
e
F(t)
Gu()d
A. Karamanco glu Electrical Engineering Department
x(t) = e
F(tt
0
)
x(t
0
) +
_
t
t
0
e
F(t)
Gu()d
Notice that the solution has two parts:
First part e
F(tt
0
)
x(t
0
) is due to the initial values at t
0
. This part
does not exist if the initial conditions are zero.
The second part
_
t
t
0
e
F(t)
Gu()d is due to the applied input u.
This part does not exist if no input is applied to the system.
A. Karamanco glu Electrical Engineering Department
Let us make the initial time t
0
= kT (current sampling instant)
and calculate the state vector T seconds later:
x(kT + T) = e
FT
x(kT) +
_
kT+T
kT
e
F(kT+T)
Gu()d
Recall that the general solution was
x(t) = e
F(tt
0
)
x(t
0
) +
_
t
t
0
e
F(t)
Gu()d
A. Karamanco glu Electrical Engineering Department
Let the index k denote the k-th sampling instant and x(k) denote
the value of x at time kT. The equation
x(kT + T) = e
FT
x(kT) +
_
kT+T
kT
e
F(kT+T)
Gu()d
after some change of variables, can be written as
x(k + 1) = e
FT
x(k) +
_
T
0
e
F
dGu(k)
or in a compact notation
x(k + 1) = x(k) + u(k)
where


= 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

You might also like