You are on page 1of 17

1.

State Space Models

• Model is of the form ẋ = F x(t) + Gu(t)


• x state
– denotes variables that characterize the state of
the system
– knowing the state, know everything about the
system until that time
• u(t) denotes the input to the system:
– disturbance variable
– manipulated or control variable

Digital Control 1 Kannan M. Moudgalya, Autumn 2007


2. State Space Models

• In the flow system,


– Inflow rate Fi is the disturbance variable
– We could use the valve position as the manipu-
lated variable or control effort
• Continuous time models: ẋ = F x(t) + Gu(t)
• Naturally discrete time models:
x(n + 1) = Ax(n) + Bu(n)
• All of above discussion holds good for discrete time
state space models also

Digital Control 2 Kannan M. Moudgalya, Autumn 2007


3. Unified view

• Continuous time models: ẋ = F x(t) + Gu(t)


• Discrete time controller cannot understand what
happens in a continuous time system
• Discretization of plant is one approach
• Discretization of analog unit (controller, signal pro-
cessor, etc.) is another option
• In this course, we will discretize continuous time
plants and work only with discrete time plants

Digital Control 3 Kannan M. Moudgalya, Autumn 2007


4. Exponential of a Matrix

• To discretize ẋ = F x(t) + Gu(t)


• Assume F to be square and constant. This method
works only if F were constant and square
• Define
F t 4 1 2 2 1 3 3
e = I + Ft + F t + F t + ...
2! 3!

Digital Control 4 Kannan M. Moudgalya, Autumn 2007


5. Example: Exponential of a Matrix
F t 4 1 2 2 1 3 3
e = I + Ft + F t + F t + ...
2! 3!
0 1
 
F =
0 −1
0 1 0 1 0 −1
    
2
F = =
0 −1 0 −1 0 1
1 0 0 t 1 0 −t 2 1 0 t3
      
F
e =t + + +
2
0 1 0 −t 2 0 t 3! 0 −t3
t2 t3
−t
" #
1 t − 2 + 3! + · · · 1 1−e
 
= = −t
t2 t3 0 e
0 1 − t + − + ···
2 3!

Digital Control 5 Kannan M. Moudgalya, Autumn 2007


6. Derivative of Exponential of a Matrix
F t 4 1 2 2 1 3 3
e = I + Ft + F t + F t + ...
2! 3!
Differentiate both sides:
d d 1 2 2 1 3 3

F t
 
e = I + Ft + F t + F t + ..
dt dt 2! 3!
1 2 1 3 2
= 0 + F + F 2t + F 3t + . . .
2! 3!
2 1 3 2
= F + F t + F t + ...
2!
1 2 2
= (I + F t + F t + . . .)F = eF tF
2!
Identical to scalar case!
Digital Control 6 Kannan M. Moudgalya, Autumn 2007
7. Solution to State Space Models
Ft 4 1 2 2 d
e = I + Ft + F t + ..., (eF t) = eF tF
2! dt
Want to solve ẋ(t) = F x(t) + Gu(t). Write it
as,
ẋ(t) − F x(t) = Gu(t)
Premultiply both sides by e−F t to obtain
e−F tẋ(t) − e−F tF x(t) = e−F tGu(t)
This can be written as
d −F t
(e x(t)) = e−F tGu(t)
dt
Digital Control 7 Kannan M. Moudgalya, Autumn 2007
8. Solution to State Space Models
d
(e−F tx(t)) = e−F tGu(t)
dt
Integrate both sides from t0 to t:
Z t
e−F tx(t) − e−F t0 x(t0) = e−F τ Gu(τ )dτ
t
Z 0t
e−F tx(t) = e−F t0 x(t0) + e−F τ Gu(τ )dτ
t0
Premultiply by eF t:
Z t
x(t) = eF (t−t0)x(t0) + eF (t−τ )Gu(τ )dτ
t0
Digital Control 8 Kannan M. Moudgalya, Autumn 2007
9. Solution to State Space Models
Z t
x(t) = eF (t−t0)x(t0) + eF (t−τ )Gu(τ )dτ
t0
• Interested in sampling instants only.
• Substitute (tn, tn+1) for (t0, t).

x(tn+1) = eF (tn+1−tn)x(tn)
Z tn+1
+ eF (tn+1−τ )Gu(τ )dτ
tn

Digital Control 9 Kannan M. Moudgalya, Autumn 2007


10. ZOH Equivalent of State Space Model
State space model: ẋ(t) = F x(t) + Gu(t)
Solution: x(tn+1)
Z tn+1
= eF (tn+1−tn)x(tn) + eF (tn+1−τ )Gu(τ )dτ
tn

Assumption: piecewise constant u is used, i.e.,


u(τ ) = u(tn), tn ≤ τ < tn+1
4
Use uniform sampling period of Ts: Ts = tn+1 − tn
Solution to state space equation becomes,
Z tn+1 
x(tn+1) = eF Ts x(tn) + eF (tn+1−τ )Gdτ u(tn)
tn

Digital Control 10 Kannan M. Moudgalya, Autumn 2007


11. ZOH Equivalent of State Space Model
Solution to state space equation is,
Z tn+1 
x(tn+1) = eF Ts x(tn) + eF (tn+1−τ )Gdτ u(tn)
tn

4
Define A = eF Ts
Z tn+1
4
B= eF (tn+1−τ )Gdτ
"tZn
Ts
#
= eF τ dτ G
0
A, B are constants: x(tn+1) = Ax(tn)+Bu(tn)

Digital Control 11 Kannan M. Moudgalya, Autumn 2007


12. ZOH Equivalent of State Space Model

x(tn+1) = Ax(tn) + Bu(tn)


Constant Ts ⇒ use sampling No.:
x(n + 1) = Ax(n) + Bu(n)
ZOH equivalent of
ẋ(t) = F x(t) + Gu(t)
Assumptions:
• Input is constant over every interval
• Uniform sampling
Digital Control 12 Kannan M. Moudgalya, Autumn 2007
13. Summary

ẋ(t) = F x(t) + Gu(t)


A = eF Ts
Ts
"Z #
B= eF τ dτ G
0
x(n + 1) = Ax(n) + Bu(n)

Digital Control 13 Kannan M. Moudgalya, Autumn 2007


14. Example

Calculate the ZOH equivalent of the following system


with Ts = 1s
d x1 0 1 x1 0
      
= + u(t)
dt x2 0 −1 x2 1
0 1 0
   
F = , G=
0 −1 1
1 1−e −t
 
F
e =t
0 e−t

1 1−e −1 1 0.632
   
A=e F Ts = =
0 e −1 0 0.368
Digital Control 14 Kannan M. Moudgalya, Autumn 2007
15. Example

1 1−e −t
 
eF t =
0 e−t
Z 1
B= eF τ dτ G
0
Z 1 −τ −τ
1 
1 1−e 0 τ τ +e
   
= −τ dτ = −τ
0 0 e 1 0 −e 0
−τ 1 −1
τ +e 1+e −1 0.368
     
= −τ = −1 =
−e 0 −e + 1 0.632

Digital Control 15 Kannan M. Moudgalya, Autumn 2007


22. Overall View
v

r e u y
Gc G

Digital Control 22 Kannan M. Moudgalya, Autumn 2007


23. Recursive Solution to State Space Equation

x(k + 1) =
Ax(k) + Bu(k)
{u(k)} =
{u(0), u(1), u(2), . . .}
x(1) =
Ax(0) + Bu(0)
x(2) =
Ax(1) + Bu(1)
=
A[Ax(0) + Bu(0)] + Bu(1)
A2x(0) + ABu(0) + Bu(1)
=
k−1
x(k) = Ak x(0) + Ak−(i+1)Bu(i), Ao = I
X

i=0
y(k) = Cx(k) + Du(k)
k−1
y(k) = CAk x(0) + CAk−(i+1)Bu(i) + Du(k)
X

i=0
Digital Control 23 Kannan M. Moudgalya, Autumn 2007

You might also like