Sie sind auf Seite 1von 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Module 05
Discrete Time Systems
Ahmad F. Taha

EE 5143: Linear Systems and Control


Email: ahmad.taha@utsa.edu
Webpage: http://engineering.utsa.edu/taha

October 13, 2016

Ahmad F. Taha

Module 05 Discrete Time Systems

1 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

From CT to DT Systems
In the previous module, we discussed the basic idea of discretization
Basically, how to obtain state-space matrices for discretized
representation of CT systems
This necessitates understanding the calculus of DT systems, starting
from the difference equation
x (k + 1) = Ax (k) + Bu(k),

y (k) = Cx (k) + Du(k)

Note: A, B, C , D here are assumed to be discretized one (derived


from one the discretization methods in the previous module). In
B,
...
other words, theyre A,
In many situations, we arrive at a DT system after discretization
However, in many other situations, DT systems (difference
equations) depict the actual physics
Ahmad F. Taha

Module 05 Discrete Time Systems

2 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

DT Systems: An Example
The problem of compound interest/loan payment is a DT control
system
Suppose you owe $1000 to a bank at t = k = 0, and your monthly
interest rate is 1.5%
Also, suppose that the minimum payment is $50 and you never pay
more than the minimum payment
Hence, we can write:
x (k + 1) = 1.015x (k) + u(k),

x (0) = 1000

x (k) represents the amount of money you still owe; u(k) = 50 is


the constant monthly payment
Question 1: Compute your remaining debt after 10 payments
Question 2: How long it will take to pay it all off?
Ahmad F. Taha

Module 05 Discrete Time Systems

3 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Solution
x (k+1) = x (k)+u(k),

x (0) = x0 = 1000,

= 1.015, = 1 are given

x (2) = 2 x (0) + u(0) + u(1)

x (1) = x (0) + u(0),

x (3) = 3 x (0) + 2 u(0) + u(1) + u(2)


qk1
Hence, one can write: x (k) = k x (0) + j=0 j u(k 1 j)
For this particular problem, u(k) = u(j) = 50 = , therefore:

x (k) = k x (0) +

k1

j = k x (0) +

j=0

Question 1 Solution:

1 k
1

, k

4
1 1.01510
=$625.40
1 1.015
Question 2 Solution: find k such that x (k) = 0
3
4
1 1.015k
k
0 = (1.015) 1000 50
k 23.96 = 24 payments
1 1.015
x (10) = (1.015)10 1000 + (50 1)

Ahmad F. Taha

Module 05 Discrete Time Systems

4 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

DT Systems: Why do we need it?


As we saw in the previous example, we were able to compute two
important quantities via the accurate model of loan payments
We computed how many monthly payments is needed to pay off the
debt
We can also easily obtain how much is left at any k < 24
This case that we discussed is for the scalar case, i.e.,
x (k + 1) = x (k) + u(k)
What if we have n-dimensional state-space, i.e.,
x (k + 1) = Ax (k) + Bu(k)
How can we find x (k) at any k? How can we find k that would yield
x (k) = 0-vector?
To do that, we need to have theory that supports DT system, in
contrast with CT LTI systems and matrix exponentials
Ahmad F. Taha

Module 05 Discrete Time Systems

5 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

State Space of DT LTI Systems


x (k + 1) = Ax (k) + Bu(k),

y (k) = Cx (k) + Du(k)

To find x (k), we need to find A (analogous to matrix exponentials


for the CT case)
Lets consider that u(k) = 0, then its easy to see that:
x (1) = Ax (0), x (2) = Ax (1) = A2 x (0), x (k) = Ak x (0) y (k) = CAk x (0)
How to find Ak ? Can you simply raise the entries of A to the k-th
power?
No! You cannot! To find Ak , diagonalize A = TDT 1
Then1 , we can write Ak = TD k T 1
If the matrix is not diagonalizable, find the Jordan form,
(Ak = TJ k T 1 )
5 k
6
kk1
In that case, J k =
for a Jordan block of with size 2
0
k

1 We

Ahmad F. Taha

proved that in one of the homeworks.

Module 05 Discrete Time Systems

6 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

State Space of DT LTI Systems


So, what if we have a nonzero control u(k)?
We need to obtain an explicit solution x (k) given x (0) and u(k)
We can prove that for
x (k + 1) = Ax (k) + Bu(k)
the state solution is:
x (k) = Ak x (0) +

k1

Ak1j Bu(j) = Ak x (0) +

j=0

k1

j=0

This is very similar to x (t) = e At x (0) +


we derived before

st
0

Aj Bu(k 1 j) ()

e A(t ) Bu( )d which

Equation () can be proved via induction, or even by intuition


Ahmad F. Taha

Module 05 Discrete Time Systems

7 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Solutions of DT LTI Systems

x (k) = Ak x (0) +

k1

Ak1j Bu(j) = Ak x (0) +

j=0

k1

j=0

Aj Bu(k 1 j) ()

The above equation entails: (a) finding closed form solution to Ak


and (b) being clever with summations (instead of integrals)
Again, as mentioned earlier, to find Ak : either find the diagonal or
Jordan canonical forms
The complexity remains if the summation is difficult to analytically
compute
Lets do two examples to demonstrate that
Notice that theres two ways to compute x (k)look at ()
This means that you should pick the equation which is easy to
analytically evaluate
Ahmad F. Taha

Module 05 Discrete Time Systems

8 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

DT LTI Systems Example 2


x (k) = Ak x (0) +

k1

Ak1j Bu(j) = Ak x (0) +

j=0

k1

j=0

Consider this system:


x (k + 1) =

5
1
0

Aj Bu(k 1 j) ()

6
5 6
0
1
x (k) +
u(k)
2
1

u(k) = k1 , x (0) = 0, 1,2 = 1, 0, 1 = 2


qk1 j
1 k
Important summation rule 1:
assuming that
j=0 =
1
= 1
Find x (k). Solution:

k1
1
1 k
1
2
k1

1 1
2

Ahmad F. Taha

x (k) = U

! "

T
V

Module 05 Discrete Time Systems

9 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

DT LTI Systems Example 3


Consider this system:
x (k + 1) =

1
0.5
5

6
5 6
0.5
2
x (k) +
u(k)
0
2

6
2
u(k) = 1, x (0) =
, 1,2 = 1, 0, 1 = 2
2

Important summation rule 2:


k1

jj1 =

j=0

5
6
k1
d j
d 1 k
1 kk1 + (k 1)k
=
=
d j=0
d 1
(1 )2

Find x (k)

Ahmad F. Taha

Module 05 Discrete Time Systems

10 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Solution to Example 3
x (k) = Ak x (0) +

k1

Ak1j Bu(j) = Ak x (0) +

j=0

j=0

Aj Bu(k 1 j) ()

First, we can write A as:


5
65
1 1
0.5
A=
1 1
0

65
6
1
0.5 0.5
= TJT 1
0.5 0.5 0.5
5 k
6
0.5 k0.5k1
k
k 1
k
Find A = TJ T , with J =
, then:
0
0.5k
x (k) = TJ k T 1 x (0) + T

k1

j=0

k1

J j T 1 Bu(k 1 j)

#
T 1 Bu(k 1 j) = T 1 B = v = 0

Ahmad F. Taha

$
2 constant, hence:
Ak1 B

k 1
x (k) = TJ T x (0) + T
Jj v
j=0
Module 05 Discrete Time Systems

11 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Solution to Example 3 2
k

x (k) = TJ T

x (0) + T

Ak1

j=0

The only difficult term to evaluate in the above equation is the


summation
Everything else is given
5

0.5
J =
0
k

Recall that
6
k1

k0.5
0.5k

k1

j=0

J =

k1 5

0.5j
j=0

j0.5j1
=
0.5j

Cq

k1
j=0

0.5j

D
qk1
j0.5j1
j=0
qk1 j
j=0

This matrix has three summations, that can be immediately


evaluated via summation
S rules 1 kand 2, then:k1
T
1 0.5
1 k0.5
+ (k 1)0.5k
W 1 0.5
X
(1 0.5)2
Xv
x (k) = TJ k T 1 x (0) + T W
U
V
1 0.5k
0
1 0.5

Ahmad F. Taha

Module 05 Discrete Time Systems

0.5

12 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Final Solution to Example 3


5
1
x (k) =
1
+
5
1
=
1

5
1
1
Q

Ahmad F. Taha

65 k
0.5
0

6
k
1 U 10.5
10.5
1
0

6 5
1 a 0.5k
1
0
5
1
=
1

1
1
S

65 6
0.5
2
0.5 2
T
1 k0.5k1 + (k 1)0.5k 5 6
V 0
(1 0.5)2
2
k
10.5
k0.5k1
0.5k

6
10.5k
k0.5k1
U
+ 10.5
0.5k
0

65
0.5
0.5

10.5

TR
5 6
1 k0.5k1 + (k 1)0.5k
0
2
V
b
(1 0.5)
2
k
10.5
10.5

65
65 6
1
2 0.5k 4 3k0.5k1 + 4(k 1)0.5k 0
1
2
0
2 0.5k
5
65
6
k1
k
1 1
8 6k0.5
+ 8(k 1)0.5
=
1 1
4 2 0.5k
6 5
5
6
12 6k0.5k1 + (8k 10)0.5k
x1 (k)
=
=
x2 (k)
4 6k0.5k1 + (8k 6)0.5k
Module 05 Discrete Time Systems

13 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Remarks

What weve done so far is analyze state solutions (and you can easily
obtain output solutions) for DT systems
DT systems emerge naturally from systems where time is discrete
DT systems also emerge from discretization of CT systems
If a discretization is computed, and its very accurate, then
x (k) x (t) between two sampling instances

Ahmad F. Taha

Module 05 Discrete Time Systems

14 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Intro to TV DT Linear Systems


Previously, we assumed that the system is time invariant
x (k + 1) = Ax (k) + Bu(k)
x (k) = Ak x (0) +

k1

Ak1j Bu(j) = Ak x (0) +

j=0

k1

j=0

Aj Bu(k 1 j) ()

A, B, C , D were all constant matrices for the LTI DT systems


What if we have the following:
x (k + 1) = A(k)x (k) + B(k)u(k)
What will the state solution be?
To do that, lets get some help from the STM for DT systems

Ahmad F. Taha

Module 05 Discrete Time Systems

15 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

STM of DT Systems with no Inputs


STM of DT Autonomous Systems
The STM for DT systems x (k + 1) = A(k)x (k) is defined as (n, k)
such that for any x (k), we have
x (n) = (n, k)x (k)
So what is (n, k) in this case? We can easily derive it:
x (k+1) = A(k)x (k);

x (k+2) = A(k+1)x (k+1) = A(k+1)A(k)x (k), . . .

Hence:

n1

x (n) = A(n 1)A(n 2) A(k + 1)A(k)x (k) = a


STM of DT Autonomous Systems2
For the above system, the STM is (n, k) =
Ahmad F. Taha

rn1
j=k

j=k

A(j)b x (k)

A(j)

Module 05 Discrete Time Systems

16 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Properties of STM of DT Systems


x (k) = (k, 0)x (0) +

k1

(k, j + 1)B(j)u(j)

j=0

(n, k) =

n1

j=k

A(j) = A(n 1)A(n 2) A(k + 1)A(k)

For DT LTI systems, (n, k) = Ank

For DT LTI systems, if k = 0 (i.e., zero ICs), (n) = An

4
5
6

The STM (n, k) can be singular. If A(k), k is nonsingular, then


(n, k) is nonsingular
(n, n) = I, n

(k3 , k2 )(k2 , k1 ) = (k3 , k1 ), k3 k2 k1


STM satisfy the difference equation:

(k + 1, j) = A(k)(k, j)
Ahmad F. Taha

Module 05 Discrete Time Systems

17 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

TV DT Systems
State Solution of TVDT Systems
The state solution for time-varying DT systems
x (k + 1) = A(k)x (k) + B(k)u(k)
is defined as
x (k) = (k, 0)x (0) +

k1

(k, j + 1)B(j)u(j)

j=0

where (n, k) =

rn1
j=k

A(j).

Can you prove the above theorem? You can do that by induction
First, show that the formula is true for k = 0. Then, assume its
true for k, and prove it for k + 1
You should use the fact that DT systems satisfy the difference
equation: (k + 1, j) = A(k)(k, j)
Ahmad F. Taha

Module 05 Discrete Time Systems

18 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Example 4
Consider this dynamical system
x (k + 1) = Ax (k) + Bu(k),

y (k) = C (k)x (k) + Du(k)

For this system, only the C (k) matrix is time-varying


Question: Given that you have three sets of input-output data:
(y (k), u(k)), (y (k + 1), u(k + 1)), (y (k + 2), u(k + 2))
and x (k) is unknown, derive an equation that would allow you to
obtain x (k)
Solution:
T S
T
S
y (k)
C (k)
D
Uy (k + 1)V = U C (k + 1)A V x (k)+U C (k + 1)B
y (k + 2)
C (k + 2)A2
C (k + 2)AB
S

Ahmad F. Taha

0
D
C (k + 2)B

Module 05 Discrete Time Systems

TS
T
0
u(k)
0 V Uu(k + 1)V
D
u(k + 2)
19 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Example 4 (Contd)
S

T S
T
S
y (k)
C (k)
D
Uy (k + 1)V = U C (k + 1)A V x (k)+U C (k + 1)B
y (k + 2)
C (k + 2)A2
C (k + 2)AB

0
D
C (k + 2)B

TS
T
0
u(k)
0 V Uu(k + 1)V
D
u(k + 2)

Given the above equation, and since the input-output data is given,
we can write the following:
(k) + BU
(Y BU)

(k)
Y = Ax
= Ax
The LHS of the boxed equation is constant, and the only unknown
in this equation is x (k)
How to find x (k)?
This is similar to solving a linear systems of equations: Ax = b
When is this linear system solved for a unique x (k)?
is full row rank, then x (k) can be obtained
Answer: if A
Ahmad F. Taha

Module 05 Discrete Time Systems

20 / 21

Introduction to Discrete Time Systems

State Solutions of DT Systems

Time Varying DT Systems

Questions And Suggestions?

Thank You!

Ahmad F. Taha

Please visit
engineering.utsa.edu/taha
IFF you want to know more ,
Module 05 Discrete Time Systems

21 / 21

Das könnte Ihnen auch gefallen