0% found this document useful (0 votes)
4 views17 pages

Discrete State Space Modeling Techniques

Copyright
© All Rights Reserved
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)
4 views17 pages

Discrete State Space Modeling Techniques

Copyright
© All Rights Reserved
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

State – Space Representation of

Linear Discrete - Data Systems


Just as for continuous-data systems, the modern way of modeling a
discrete-data system is by discrete state equations.
Let us consider the discrete-data control system with an sample-and-hold
(S/H) device, as shown in Fig.(1).

Fig.(1).
\

Now we let the linear process transfer function Gp be described by the


discrete state and output equations as:
x (k + 1) T = A x (k T) + B r (k T) (discrete state equation)
y (kT) = C x (kT) + D r (kT) (discrete output equation)
Or simply:
x (k + 1) = A x (k ) + B r (k ) (1)
y (k ) = C x (k ) + D r (k ) (2)
where x(t) is the state vector, and r(t) and y(t) are the scalar input and
output, respectively. The matrices A, B, C, and D are coefficient matrices.

The z-Transform Solution of Discrete State Equations:


In this section, the discrete state equations in vector-matrix form of an
nth-order system are solved by z transformation. Consider the discrete
state equations:
x (k + 1) = A x (k ) + B r (k ) (3)
Taking the z-transform on both sides of the last equation, we get:
z X ( z ) − z x ( 0) = A X ( z ) + B R ( z )
 z X ( z ) − A X ( z ) = z x ( 0) + B R ( z )
 ( z I − A ) X ( z ) = z x ( 0) + B R ( z )
 X(z) = (z I − A) −1 z x (0) + (z I − A) −1 B R (z) (4)

40
Taking the inverse z-transform on both sides of Eq.(4), we have:
  
X(kT) = Z −1 (z I − A) −1 z x (0) + Z −1 (z I − A) −1 B R (z)  (5)

Transfer-Function Matrix and the Characteristic Equation:


Once a discrete-data system is modeled by the dynamic equations of
Eqs.(1) and (2), the transfer-function relation of the system can be
expressed in terms of the coefficient matrices. By setting the initial state
x(0) to zero as follows:

Consider the discrete state equation, Eqn(1):


x (k + 1) = A x (k ) + B r (k )
Taking the z-transform on both sides of this equation with neglecting the
initial conditions, we get:
z X(z) = A X(z) + B R (z)
 z X(z) − A X(z) = B R (z)
 (z I − A) X(z) = B R (z)
 X(z) = (z I − A) −1 B R (z) (6)

Consider the discrete output equation, Eqn(1):


y (k ) = C x (k ) + D r (k )

Taking the z-transform of this equation, we get:


Y (z) = C X(z) + D R (z) (7)
Substituting Eq.(6) into Eq.(7), we have:
 Y (z) = C (z I − A) −1 B R (z) + D R (z)


 Y (z) = C (z I − A) −1 B + D R (z) (8)

where the transfer-function matrix of the system is defined as:


Y (z)
G (z) = = C (z I − A ) −1 B + D (9)
R (z)

41
The characteristic equation of the system is defined as:
zI − A = 0 (10)

The poles of the system are the eigenvalues of this characteristic equation.

Example (1):
Consider that a discrete-data system is described by the difference
equation:
y (k + 2) + 5 y (k + 1) + 3 y (k ) = r (k ) (14)
For this system, obtain:
(a) State space model.
(b) Transfer function and the characteristic equation.
Solution:
(a) The state variables of the system may be defined as:
x1 (k ) = y(k ) (15)
x 2 (k ) = y(k + 1) (16)
From equation (15) and (16):
x1 (k + 1) = x 2 (k ) (17)
x 2 (k + 1) = y(k + 2) (18)
Substituting equations (17) and (18) into equation (14) gives:
x 2 (k + 1) = − 3 x1 (k ) − 5 x 2 (k ) + r (k ) (19)

From equations (17) and (19), the discrete state equation can be written
as:
x (k + 1) = A x (k ) + B r (k )

where:
0 1  0
A=  , B= 
 − 3 − 5   1
The discrete output equation is:
y (k ) = C x (k ) + D r (k )
where:
C = 1 0, D =  0

42
(b)
* The transfer function of the system is obtained as:
Taking z-transform of Eq.(14) with neglecting initial conditions, we get:
z 2 Y(z) + 5 z Y(z) + 3 Y(z) = R (z)
 (z 2 + 5 z + 3) Y(z) = R (z)
Then, the transfer function of the system is:
Y ( z) 1
= 2
R (z) z + 5 z + 3

Another method:
Y (z)
G (z) = = C (z I − A ) −1 B + D
R (z)
0 1  0
Where A = 
− −  , B =  1 , C = 1 0, D =  0
 3 5   

Y ( z) 1
 = 2 (prove)
R ( z) z + 5 z + 3

* The characteristic equation of the system is:


z2 + 5 z + 3 = 0

Another method:
The characteristic equation can be obtained from the matrix A as follows:
z −1
zI − A = 0  = 0  z2 + 5 z + 3 = 0
3 z+5
Example (2):
Consider the system defined by the following state - space equations:
 x1 (k + 1)   0 1   x1 (k )   1   x1 ( k ) 
= +
 x (k + 2)  − 3 − 2  x (k )  − 3 u ( k ) , y = 1 0   x (k ) 
 2    2     2 

Find:
(a) Eigenvalues of the matrix A.
(b) Transfer function of the system.

43
Solution:
0 1   1
A= 
− −  , B =  − 3, C = 1 0  and D = 0 
 3 2   

(a) The eigenvalues of the system are obtained as:


 −1
I − A = 0  =0
3 +2
  ( + 2) + 3 = 0  2 + 2 + 3 = 0
− 2  4 − 12 − 2 − 8 − 2 2 − 2
 1, 2 = = =
2 2 2
 1, 2 = −1  j 2
(b) The transfer function of the system is given by:
Y (z)
G (z) = = C (z I − A) −1 B + D
U (z)
where
−1 
z I− A = 
z
 ,  z I− A −1
=
1
adj( ZI − A)
 3 z + 2  zI − A
z −1 z + 2 1
zI − A = = z 2 + 2z + 3 , adj(zI − A) =  
3 z+2  − 3 z
 z + 2 1
 z I− A −1 = 2
1
 
z + 2z + 3  − 3 z 
  z + 2 1   1 
 G (z) = 1 0  2
1
   
 z + 2z + 3  − 3 z   − 3
   z + 2 1  1 
 1 0 
1
= 2  
 z + 2z + 3   − 3 z  − 3
  1
= 2
1
 z + 2 1 − 3
 z + 2z + 3   
z −1
 G (z) = 2 (Transfer function of the system)
z + 2z +3

44
2- Alternative forms of State Equation:
One can arrive at state-space representations having identical input-
output relationship but different (A, B, C, D) matrices.
Therefore, for a given transfer function, the state – space representation is
not unique. Different state – space representations for a given pulse
transfer function are possible. The state equations are related to each other
by the similarity transformation.

To see this, analyze the transformation of:


x (k + 1) = A x (k ) + B u (k ) (14)
y (k ) = C x (k ) + D u (k ) (15)
where we assume:

x (k ) = P x̂ (k )  P −1 x (k ) = P −1 P x̂ (k )  x̂ (k ) = P −1 x (k )
Where P is a similarity transformation matrix.
Then substituting in equations (14) and (15), we get:
P x̂ (k + 1) = A P x̂ (k ) + B u (k ) (16)
y (k ) = C P x̂ (k ) + D u (k ) (17)

Multiplying equation (16) by P-1 gives:


P −1 P x̂ (k + 1) = P −1 A P x̂ (k ) + P −1 B u (k ) (18)
y (k ) = C P x̂ (k ) + D u (k ) (19)
or:
x̂ (k + 1) = Â x̂ (k ) + B̂ u (k ) (20)

y (k ) = Ĉ x̂ (k ) + D̂ u (k ) (21)
−1
Where  = P A P, B̂ = P −1 B , Ĉ = C P, D̂ = D
The state – space representation given by equations (14) and (15) is
equivalent to the state – space representation given by equations (20) and
(21) and the transfer function is not changed by similarity transform, i.e.:
G (z) = C (z I − A) −1 B + D = Ĉ (z I − Â) −1 B̂ + D̂ (22)

45
The state vectors x(k) and x̂ (k ) are related to each other by equation by
the relation x (k ) = P x̂ (k ) since matrix P can be nonsingular n × n
matrix, there are an infinity number of state – space representations for a
given system.

The eigenvalues of the matrix A are invariant under this


transformation, i.e.:
 I − Â =  I − A (23)

Proof:
 I − Â =  I − P −1A P =  P −1 P − P −1A P

= P −1 ( I − A ) P = P −1  I − A P

= P −1 P  I − A = P −1 P  I − A

Note that:
P −1 P = P −1 P = I = 1

  I − Â =  I − A

In some applications, we may desire to diagonalize the state matrix A by


done properly choosing a matrix P such that:
P −1 A P = diagonal matrix

In the case where diagonalization is not possible, P −1A P may be


transformed into a Jordan canonical form:
P −1 A P = Jordan canonical form
The state matrix becomes diagonal if all the poles involved are distinct
and it becomes Jordan canonical form if multiple poles are involved in the
pulse transfer function as follows:

Case 1: If the matrix A has distinct eigenvalues and in phase


variable form:
Assume that the matrix A has distinct eigenvalues 1 ,  2 ,,  n and in
following phase variable canonical form:

46
 0 1 0  0 
 0 0 1  0 
 
A=       (24)
 
 0 0 0  1 
− a n − a n −1 − a n − 2  − a1 

Then using the transformation x (k ) = P x̂ (k ) , where P has the following


form:
 1 1 1  1 
 2 3   n 
 1 
P =  1 2
22
3   n 
2 2
(25)
 
      
n1−1 n2−1 n3−1  nn−1 

The transformed state equation is given by equation (20), where:


 1 0
 2 
 
−1
 = P A P =  3  (26)
 
  
 0  n 

Example (1):
Consider the system defined by the following state - space equations:
 x1 (k + 1)   0 1   x1 (k )  1  x1 
= +
 x (k + 2)  − 2 − 3  x (k )  1 u ( k ) , y = 1 2  x 
 2    2     2
Therefore:
0 1  1
A= 
− −  , B =  1, C = 1 2 and D = 0 
 2 3  

* The transfer function of the system is:


Y (z)
G (z) = = C (z I − A ) −1 B + D
U (z)

47
−1 
z I− A = 
z

2 z + 3
z I− A−1 = 1
adj( ZI − A)
zI − A
z −1  z + 3 1
zI − A = = z 2 + 3z + 2 , adj(zI − A) = 
2 z+3  − 2 z
 z + 3 1
 z I− A −1 = 2
1
 
z + 3z + 2  − 2 z 
  z + 3 1   0 
 G (z) = 1 0  2
1
   
 z + 3z + 2  − 2 z   1
   z + 3 1  0 
 1 0 
1
= 2  
 z + 3z + 2   − 2 z  1
  0 
= 2
1
 z + 3 1 1
 z + 3z + 2   
1
 G (z) = 2
z + 3z + 2
* The eigenvalues of the system are:
 −1
I − A = 0  =0
2 +3
  ( + 3) + 2 = 0  2 + 3 + 2 = 0
 ( + 1) ( + 2) = 0  1, 2 = − 1, − 2
* Transformation:
 1 1   1 1  −1  2 1 
with P= =
    P =  −1 −1 
 1  2   − 1 − 2   
 2 1  0 1  1 1 
 = P −1 A P =    
− 1 − 1   − 2 − 3   − 1 − 2 
− 2 − 1   1 1 
=
2 2   − 1 − 2 

48
 −1 0   1 0 
 Â =   =  0  
 0 −2  2 

 2 1  0   1 
B̂ = P −1 B =     = 
 − 1 − 1  1   − 1 
 1 1 

Ĉ = C P = 1 0    = 1 1 
 −1 − 2 
D̂ = D =  0 

We can find the transfer function of this new form as:


G (z) = Ĉ (z I − Â) −1 B̂ + D̂

z I− Â = z 0+ 1 0 
z + 2

 z + 2 0
 z I− A−1 = 1

z 2 + 3z + 2  0 1

 z + 2 0   1 
 G (z) = 1 1  2
1
 
 z + 3z + 2  0 z + 1  − 1
  z + 2 0 1
 1 1 
1
= 2
 z + 3z + 2   0 z + 1 − 1
  1
= 2
1
 z + 2 z + 1 − 1
 z + 3z + 2   
1
 G (z) = 2
z + 3z + 2

which was the transfer function we started with before transformation.

Example (2)"
Repeat example (1) for the systems defined by:
 x (k + 1)   0 1   x1 (k )   1  x 
(a)  1  − 3 − 4  x (k )  + − 1 u (k ) ,
= y = 1 1  1 
 2
x ( k + 2 )    2    x2 

49
 x 1   0 1 0   x1  0 
(b)  x 2  =  0 0 1  x 2  + 0  u ,
      
 x 3  − 6 − 11 − 6  x 3  6 
 x` 
y = 1 0 0  x 2  (Hint: The eigenvalues are  i = − 1 , − 2 , − 3 ).
 
x3 

Case 2: If the matrix A has multiple eigenvalues and in phase


variable form (Jordan Canonical Form)
When the matrix A has multiple eigenvalues, the matrix A can not be
diagonalized. However, there exists a similar transformation:
−1
J = P AP
such that the matrix A is almost a diagonal matrix. The matrix J is called
"Jordan canonical form".

When A is in phase variable form, the Jordan canonical form when the
eigenvalue 1 is repeated two times and three times, respectively, for a 5th
order system is:

(27)

(28)
When the eigenvalue 1 is repeated three times and the eigenvalue 4 is
repeated two times, the Jordan canonical form is:

50
(29)

Example (1):
 0 1 0 
 
For A =  0 0 1  with eigenvalues 1 , 1 ,  3
− a − a2 − a1 
 3

1 0 1
P = 1 1 3  ,
 
21 2 1  3 
2

Example (2):
Consider the system defined by the following state - space equations:
 x1 (k + 1)   0 1   x 1 ( k )  0   x1 
=
 x (k + 2)  − 4 − 4  x (k )  1+ u ( k ) , y = 1 0  x 
 2    2     2
Therefore:
0 1   0
A= 
− −  , B =  1, C = 1 0  and D = 0 
 4 4   
* The eigenvalues of the system are:
 −1
I − A = 0  =0
4 +4
  ( + 4) + 4 = 0  2 + 4 + 4 = 0
 ( + 2) 2 = 0  1, 2 = − 2 , − 2

51
* Transformation:
 1 0  1 0 1 0
with P =   =−2 1  P −1 =  

 1 1    2 1
1 0   0 1  1 0
 = P −1 A P =    
2 1   − 4 − 4   − 2 1 
0 1  1 0
=  
− 4 − 2   − 2 1 
−2 1   1 1 
 Â =   =  0  
 0 −2  1

 1 0  1   1 
B̂ = P −1 B =   1  =  3 
 2 1    
 1 0
Ĉ = C P = 1 2    = −3 2 
 − 2 1 
D̂ = D =  0 

Example (3):
Repeat example (2) for the systems defined by:
 x1 (k + 1)   0 1   x1 (k )  1  x1 (k ) 
= +
 x (k + 2)  − 1 − 2  x (k )  1 u ( k ) , y = 1 0   x (k ) 
 2    2     2 
Example (4)"
Consider a linear system with the state – space equations:
x (k + 1) = A x (k ) + B u (k
y( k ) = C x ( k ) + D u ( k
where:
 0 1 0  0 
A= 0 0 1  , B = 0 , C = 1 0 0 and D = 0
   
− 25 − 35 − 11 1
The eigenvalues areso P. Find the transformation 1 = −1,  2 =  3 = −5
that A is transformed into Jordan canonical form. The transformed system
is:. Â and B̂ , find x̂ (k + 1) = Â x̂ (k ) + B̂ u (k )

52
Canonical Forms for Discrete - Time State-Space Equations:
Consider the discrete – time system:
y(k + n ) + a1 y (k + n − 1) + a 2 y (k + n − 2) +  + a n −1 y (k + 1) + a n y (k )
= b 0 u (k + n ) + b1 u (k + n − 1) + b 2 u (k + n − 2) +  + b n −1u (k + 1) + b n u (k )
(1)

where u(k) is the input and y(k) is the output of the system at the kth
sampling instant. Equation (1) can be written in the form of pulse transfer
function as:
Y (z) b 0 z n + b1 z n −1 + b 2 z n − 2 +  + b n −1 z + b n
= n (2)
U (z) z + a1 z n −1 + a 2 z n − 2 +  + a n −1 z + a n

There are many ways to realize state-space representations for the


discrete-time systems described by equations (1), and (2) such as:
1- Controllable canonical form
2- Observable canonical form
3- Diagonal canonical form
4- Jordan canonical form

1- Controllable canonical form:


The state-space representations for the discrete-time systems described by
equations (1), (2) and (3) may be put in the form given by the following
equations:
 x1 (k + 1)   0 1 0 0 0   x1 (k )   0 
 x (k + 1)   0 0 1 0 0   x (k )   0 
 2     2   
  =          +  0  u (k )
       
 x n −1 ( k + 1)   0 0 0  1   x n −1 ( k )  0
 x n (k + 1)   −a n − a n −1 − a n − 2  − a1   x n (k )   1 
(3)
 x1 (k ) 
 x 2 (k ) 
y(k ) =  b n − a n b 0  b n −1 − a n −1 b0    b1 − a1 b0     + b0 u (k )
 x (k ) 
 xn −1(k ) 
 n 
(4)

53
Equations (4) and (5) are the state equations and output equations,
respectively. The state-space representations given by equations (4) and
(5) is commonly called controllable canonical form.

2- Observable canonical form:


The state-space representations for the discrete-time systems described by
equations (1), (2) and (3) may be put in the following form:
 x1 (k + 1)  0 0  0 0 − an   x1 ( k )   b n − a n b 0 
 x (k + 1)  1 0  0 0 − a n −1   x ( k )  b − a n −1 b 0 
 2     2   n −1 
   =         + 0  u (k )
       
 x n −1 (k + 1) 0 0  1 0 − a2   x n −1 (k )   b 2 − a 2 b 0 
 x n (k + 1)  0 0  0 1 − a1   x n (k )   b1 − a1 b 0 

(5)
 x1 (k ) 
 x (k ) 
 2 
y(k ) =  0 0 0 0 1    + b 0 u (k ) (6)
 
 x n −1 ( k ) 
 x n (k ) 

The state-space representations given by equations (5) and (6) is


commonly called observable canonical form.

3- Diagonal canonical form:


If the poles of the pulse transfer function given by equations (1), (2) and
(3) are all distinct, then the state-space representations for the discrete-
time systems may be put in diagonal canonical form as follows:
 x1 (k + 1)  p1 0  0 0  x1 (k )   1
 x (k + 1)   0 p  0 0  x (k )   1
 2   2   2   
  =        +   u ( k ) (7)
       
 x n −1 ( k + 1)  0 0  p n −1 0  x n −1 ( k )   1
 x n (k + 1)   0 0  0 p n   x n (k )   1

54
 x1 (k ) 
 x (k ) 
 2 
y(k ) =  c1 c 2  c n −1 cn     + b 0 u (k ) (8)
 
 x n −1 ( k ) 
 x1 (k ) 

The state-space representations given by equations (7) and (8) is


commonly called diagonal canonical form.

4- Jordan canonical form:


If the poles of the pulse transfer function given by equations (1), (2) and
(3) involve a multiple pole of order m at z = p1 and all other poles are
distinct, then the state-space representations for the discrete-time systems
may be given as follows:

(9)
 x1 (k ) 
 x (k ) 
 2 
y(k ) =  c1 c 2  c n −1 cn     + b 0 u (k ) (10)
 
 x n −1 (k ) 
 x1 (k ) 

The state-space representations given by equations (9) and (10) is


commonly called Jordan canonical form.

55
Example:
Consider the following system:
Y (z) z +1
= 2
U (z) z + 1 .3 z + 0 .4
The state - space representations in controllable canonical form,
observable canonical form, and diagonal canonical are as follows:
Controllable canonical form
 x1 (k + 1)   0 1   x1 (k )  0
=
 x (k + 1)   − 0.4 − 1.3   x (k )  + 1 u (k )
 2    2   
y(k ) =  0 1   1
x (k ) 
 x 2 (k ) 
Observable canonical form
 x1 (k + 1)  =  0 − 0.4   x1 (k )  + 1 u (k )
 x 2 (k + 1)   1 − 1.3   x 2 (k )  1

y(k ) =  0 1   1
x (k ) 
 x 2 (k ) 
Diagonal canonical form
The given pulse transfer function can be expanded as follows:
Y (z) (5 / 3) (−2 / 3)
= +
U (z) z + 0. 5 z + 0.8
 x1 (k + 1)  =  − 0.5 0   x1 (k )  + 1 u (k )
 x 2 (k + 1)   0 − 0.8   x 2 (k )  1
 5 2   x1 ( k ) 
y( k ) =  −
 3 3   x 2 (k ) 

56

You might also like