Sei sulla pagina 1di 6

Modeling of Discrete-Time Control Systems

Dr. Usman Ali

Consider the dynamics of linear and time invariant discrete-time system


given by the difference equation

y[k] + a2 y[k − 1] + a1 y[k − 2] + a0 y[k − 3] = b2 u[k − 1] + b1 u[k − 2] + b0 u[k − 3],


(1)

where u[k] denotes the input to the system and y[k] is the output of the system.
Changing the index, we can also rewrite the above equation as

y[k + 3] + a2 y[k + 2] + a1 y[k + 1] + a0 y[k] = b2 u[k + 2] + b1 u[k + 1] + b0 u[k],


(2)

1 Transfer Functions
If we take the Z-transform for the system (1), we get

Y (z) + a2 z −1 Y (z) + a1 z −2 Y (z) + a0 z −3 Y (z) = b2 z −1 U (z) + b1 z −2 U (z) + b0 z −3 U (z)


1 + a2 z −1 + a1 z −2 + a0 z −3 Y (z) = b2 z −1 + b1 z −2 + b0 z −3 U (z)
 

Y (z) b2 z −1 + b1 z −2 + b0 z −3
=
U (z) 1 + a2 z −1 + a1 z −2 + a0 z −3
b2 z 2 + b1 z 1 + b0
= 3
z + a2 z 2 + a1 z + a0

2 State Space Representations


Consider the following difference equation

y[k + 3] + a2 y[k + 2] + a1 y[k + 1] + a0 y[k] = u[k] (3)

Let us choose the state variables as follows:

x1 [k] = y[k]
x2 [k] = y[k + 1]
x3 [k] = y[k + 2]

1
Then we get the state space representation

x1 [k + 1] = x2 [k]
x2 [k + 1] = x3 [k]
x3 [k + 1] = −a2 x3 [k] − a1 x2 [k] − a0 x1 [k] + u[k]
y[k] = x1 [k]

If we let x = (x1 , x2 , x3 ) denote the state vector, then the above equations can
be written in matrix form as

x[k + 1] = Ax[k] + Bu[k]


y[k] = Cx[k] + Du[k]

with
   
0 1 0 0
A= 0 0 1 , B =  0 ,
−a0 −a1 −a2 1
 
C= 1 0 0 , D= 0

This form of state space representation is called the controller canonical repre-
sentation of the system.

3 Realization Theory
Realization theory is above how we can move between the state space represen-
tation and transfer function modeling of the system. For a given state space
representation, we have a unique transfer function. However for a given transfer
function, there are infinite number of state space realizations possible. However,
some of these representations are more useful than others and are referred to as
canonical forms, which we discuss next.

3.1 Transfer Function to State Space:


If we are given a transfer function
Y (z) 1
= 3 2
,
U (z) z + a2 z + a1 z + a0

we can write it in the form (3), and then convert it into the controller canonical
form as above, i.e.
   
0 1 0 0
x[k + 1] =  0 0 1  x +  0  u,
−a0 −a1 −a2 1
 
y[k] = 1 0 0 x + 0 u

2
If our transfer function is more general of the form
Y (z) b2 z 2 + b1 z + b0
G(z) = = 3 , (4)
U (z) z + a2 z 2 + a1 z + a0
we can write it as G(z) = G1 (z)G2 (z) with
W (z) 1
G1 (z) = = 3 ,
U (z) z + a2 z 2 + a1 z + a0
Y (z)
G2 (z) = = b2 z 2 + b1 z + b0 .
W (z)
G1 (z) has a structure similar to G(z) in previous example and hence with the
choice of state variables as
x1 [k] = w[k], x2 [k] = w[k + 1], x3 [k] = w[k + 2],
can be written as
   
0 1 0 0
x[k + 1] =  0 0 1 x +  0 u
−a0 −a1 −a2 1
= Ax[k] + Bu[k].
From the transfer function G2 (z), we have
Y (z) = (b2 z 2 + b1 z + b0 z)W (z).
Taking the inverse Z-transform, we get
y[k] = b2 w[k + 2] + b1 w[k + 1] + b0 w[k]
= b2 x3 [k] + b1 x2 [k] + b0 x1 [k]
= (b0 b1 b2 ) x[k] + 0u[k]
= Cx[k] + Du[k]
This is controller canonical representation of the transfer function. A system
in this representation is always completely controllable. Finding the gains of
controllers is easy if the system is represented in this form.
The choice of state variables is not unique. We can make another choice
for the state variables and obtain what is referred to as the observer canonical
form. We can manipulate the transfer function in (4) as follows:
Y (z) b2 z 2 + b1 z + b0
= 3
U (z) z + a2 z 2 + a1 z + a0
z 3 + a2 z 2 + a1 z + a0 Y (z) = b2 z 2 + b1 z + b0 U (z)
 

1 + a2 z −1 + a1 z −2 + a0 z −3 Y (z) = b2 z −1 + b1 z −2 + b0 z −3 U (z)
 

Y (z) = (−a2 Y (z) + b2 U (z)) z −1 + (−a1 Y (z) + b1 U (z)) z −2 + (−a0 Y (z) + b0 U (z)) z −3
Y (z) = z −1 (−a2 Y (z) + b2 U (z)) + z −1 (−a1 Y (z) + b1 U (z)) + z −1 [(−a0 Y (z) + b0 U (z))]
  

3
Now we choose the state variables according to follow strategy. We let (−a0 Y (z)+
b0 U (z)) correspond to x3 [k+1] via the inverse Z-transform, so that z −1 (−a0 Y (z)+
b0 U (z)) will then correspond to x3 [k]. Hence our first state equation is then

x3 [k + 1] = −a0 y[k] + b0 u[k].

Similarly, if we let [(−a1 Y (z) + b1 U (z)) + X3 (z)] correspond to x2 [k + 1], then

x2 [k + 1] = −a1 y[k] + b1 u[k] + x3 [k].

Continuing in the same manner by letting [(−a2 Y (z) + b2 U (z)) + X2 (z)] corre-
spond to x1 [k + 1], we have

x1 [k + 1] = −a2 y[k] + b2 u[k] + x2 [k]

and applying z −1 to x1 [k + 1] gives y[k] i.e.

y[k] = x1 [k]

In the above equations, we replace y[k] by x1 [k] and rearrange them to get

x1 [k + 1] = −a2 x1 [k] + x2 [k] + b2 u[k]


x2 [k + 1] = −a1 x1 [k] + x3 [k] + b1 u[k]
x3 [k + 1] = −a0 x1 [k] + b0 u[k].
y[k] = x1 [k]

We can write the state and outpute in matrix form as


   
−a2 1 0 b2
x[k + 1] =  −a1 0 1  x +  b1  u = Ax[k] + Bu[k],
−a0 0 0 b0
 
y[k] = 1 0 0 x + 0 u = Cx[k] + Du[k].

A system in this representation is always completely observable. Finding the


gains of observer is easy if the system is represented in this form. In fact we can
have infinite number of state space realizations possible for the same transfer
function through similarity transformations, as we shall see in the next section.

3.2 State Space to Transfer Function:


The transfer function corresponding to given state-space representation is unique.
Consider the state space representation

x[k + 1] = Ax[k] + Bu[k]


y[k] = Cx[k] + Du[k]

4
for which we are seeking the equivalent transfer function. If we take the Z-
transform of the state equation, we get

zX(z) = AX(z) + BU (z)


(zI − A)X(z) = BU (z)
X(z) = (zI − A)−1 BU (z).

Substituting this into the Z-transform of the output equation, we get

Y (z) = C(zI − A)−1 BU (z) + DU (z)


= C(zI − A)−1 B + D U (z)
 

Here
Y (z)
G(z) = = C(zI − A)−1 B + D
U (z)
is the discrete transfer function.

4 Similarity Transformation
Consider the state space representation of they system given by

x[k + 1] = Ax[k] + Bu[k]


y[k] = Cx[k] + Du[k]

Let V ∈ Rn×n be a square invertible matrix. Then by choosing z[k] = V −1 x[k],


we get another basis and a new state space representation. With this new choice
of basis, the state equation becomes

V z[k + 1] = AV z[k] + Bu[k]


or z[k + 1] = V −1 AV z[k] + V −1 Bu[k]

Similarly, the output equation is

y[k] = CV z[k] + Du[k]

Thus,

z[k + 1] = V −1 AV z[k] + V −1 Bu[k] = Âz[k] + B̂u[k]


y[k] = CV z[k] + Du[k] = Ĉz[k] + D̂u[k]

with
 = V −1 AV, B̂ = V −1 B, Ĉ = CV and D̂ = D
is the new state space representation of the system. Since the number of square
invertible matrices V is infinite, we can have infinite number of equivalent
state space representations for the same transfer function (Two state space

5
representations are equivalent if they have the same transfer function). Let
G(z) = C(zI − A)−1 B + D be the transfer function for the state space realiza-
ˆ = Ĉ(zI − Â)−1 B̂ + D̂ be
tion (A, B, C, D) of given transfer function and G(z)
the transfer function corresponding to the realization (Â, B̂, Ĉ, D̂) obtained via
similarity transformation. Then it is easy to show that

Ĝ(z) = G(z),

and the proof is left for the reader as a small exercise.


If we let the columns of similarity transformation matrix V to be eigen
vectors of A, then  = V −1 AV = D is a diagonal matrix with eigenvalues on
the diagonal of the matrix D (This is also referred to as eigenvalue decomposition
or EVD for brief). This kind of state space representation is then referred to as
modal canonical form (eigenvalues are also referred to as modes and hence the
name modal canonical form. The term spectrum is also used for the eigenvalues,
due its connection with spectrum associated with vibrating atoms – quantum
mechanics). The eigenvalues correspond to the poles of a system and hence can
be used to readily determine the stability of the system, if it is represented in
modal canonical form.

Potrebbero piacerti anche