Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

7.9 State-Space Realizations 7.9.

a Controllable Canonical Realization


• Realizations give digital filter or controller implementation. Possesses the property of controllability (discussed later).
• Realizations can be obtained from either the z-transfer functions
or the difference equation (discuss SISO transfer functions only) 7.9.a.1 Systems With no Input Differencing
c z n + c n − 1 z n − 1 +. . .+ c 1 z + c 0 Difference equation including the input at time k only
G( z) = n n
z + a n − 1 z n − 1 + a1 z + a 0 y ( k + n) + a n − 1 y ( k + n − 1) + ... + a 1 y ( k + 1) + a 0 y ( k ) = u( k ) (7.86)
n −1 n−2
cn − 1 z + cn − 2 z +. . .+ c1 z + c0 (7.84)
= cn + Define the state vector
z n + a n − 1 z n − 1 + . . . + a1 z + a 0
x( k ) = [ x1 ( k ) xn ( k )]
T
x 2 ( k ) ... x n − 1 ( k )
• cn and cn-1 can be zero and cn = cn (7.87)
= [ y( k ) y ( k + n − 1)]
T
• y ( k + 1) ... y ( k + n − 2)
Corresponding difference equation
y ( k + n) + a n − 1 y ( k + n − 1) + a 1 y ( k + 1) + a 0 y ( k ) Difference equation (7.86) can be rewritten as
= c n u( k + n) + c n − 1 u( k + n − 1) +...+ c 1 u( k + 1) + c 0 u( k ) xn ( k + 1) = −an − 1 xn − 1 ( k ) − ... − a1 x2 ( k ) − a0 x1 ( k ) + u( k ) (7.88)
(7.85)

1 2

State Equation State-space Equations


 x1 ( k + 1)   0 1 ... 0 0   x1 ( k )  0
 x ( k + 1)   0 0 ... 0 0   x ( k )  0  0 n − 1× 1 I n −1  0 n − 1 × 1 
 2    2    x( k + 1) =   x ( k ) +  1  u( k )
 .  =  ... ... ... ... ...   .  +  . u( k ) −
 0 a − a 1 ... ... − a n −1   
 x ( k + 1)   0 0 ... 0 1   x n − 1 ( k )  0
 n −1      
 x n ( k + 1)  − a 0 −a1 ... − a n − 2 − a n − 1   x n ( k )  1 y ( k ) = [1 0 1 × n − 1 ]x( k ) (7.91)
(7.89)
Output Equation State-space equations can be written by inspection from the
 x1 ( k )  transfer function
 x (k )  1
G ( z) = n (7.92)
 2  z + a n − 1 z n − 1 + ... + a1 z + a 0
y ( k ) = [1 0 ... 0 0] .  (7.90)
 x ( k )
 n −1  or from the corresponding difference equation because either
 x n ( k )  includes all the needed coefficients, ai , i = 0, 1, 2,..., n-1.

3 4
Example 7.14: Obtain the controllable canonical realization of State-space Equations
the difference equation  x1 ( k + 1)   0 1 0   x1 ( k )  0
 x ( k + 1)  =  0 0 1   x 2 ( k )  + 0u( k )
y ( k + 3) + 0.5 y ( k + 2) + 0.4 y ( k + 1) − 0.8 y ( k ) = u( k )  2      
 x 3 ( k + 1)  0.8 −0.4 −0.5  x 3 ( k )  1
using basic principles then show how the realization can be  x1 ( k ) 
written by inspection from the transfer function or the y ( k ) = [1 0 0] x 2 ( k ) 
 
difference equation.  x 3 ( k ) 
n = 3, n − 1=2 ⇒ orders of zero matrices
Solution: Select the state vector The coefficients of the last row appear in the difference equation
x( k ) = [ x1 ( k ) x 2 ( k ) x 3 ( k )]
T
with their signs reversed. The same coefficients appear in the
denominator of the transfer function
= [ y ( k ) y ( k + 1) y ( k + 2) ]
T
1
Difference Equation G ( z) =
x 3 ( k + 1) = −0.5x 3 ( k ) − 0.4 x 2 ( k ) + 0.8 x1 ( k ) + u( k ) z 3 + 0.5z 2 + 0.4 z − 0.8

5 6

7.9.a.2 Systems With Input Differencing State Variables


x( k ) = [ x1 ( k ) x 2 ( k ) ... x n − 1 ( k ) x n ( k )]
T

Assume that a constant term has been extracted from the


= [ p( k ) p( k + n − 1) ]
T
transfer function, if necessary, and we are left with the form p( k + 1) ... p( k + n − 2)
(7.96)
Y ( z)
G ( z) = = cn + G d ( z ) (7.93) Relate the state variables to the output
U ( z)
c z n − 1 + cn − 2 z n − 2 +...+ c1 z + c0
Gd ( z ) = n − 1 n (7.94) Y ( z ) = cnU ( z ) + Gd ( z )U ( z )
z + a n − 1 z n − 1 +...+ a1 z + a 0
cn − 1 z n − 1 + cn − 2 z n − 2 +...+ c1 z + c0
= cn U ( z ) + U ( z ) (7.97)
Define a new variable p(k) whose z-transform satisfies z n + a n − 1 z n − 1 +...+ a1 z + a 0
P( z)
=
1
(7.95) [ ]
= cnU ( z ) + cn − 1 z n − 1 + cn − 2 z n − 2 +...+ c1 z + c0 P ( z )
U ( z ) z n + a n − 1 z n − 1 +...+ a1 z + a 0

7 8
Inverse z-transform and use the definition of the state State-space equations can be written by inspection from the
variables difference equation or the transfer function.
y ( k ) = cn u( k ) + cn − 1 p( k + n − 1) + cn − 2 p( k + n − 2) +...+c1 p( k + 1) + c0 p( k )
= cn u( k ) + cn − 1 xn ( k ) + cn − 2 xn − 1 ( k ) +...+c1 x2 ( k ) + c0 x1 ( k ) • A simulation diagram for the system is shown in Figure 7.3.
(7.98) • The simulation diagram shows how the system can be
Output equation implemented in terms of summer, delay and scaling
 x1 ( k )  operations.
 x (k )  • The number of delay elements needed for implementation is
 2  equal to the order of the system. In addition, two summers
. 
y ( k ) = [ c0 c1 ... cn − 2 cn − 1 ] + du( k ) and at most 2 n + 1 gains are needed. These operations can
 . 
 x ( k ) be easily implemented using a microprocessor or digital
 n −1  signal processing chip.
 x n ( k ) 
(7.99)
where d = cn

9 10

cn
Example 7.15: Write the state-space equations in controllable
canonical form for the following transfer functions
O 0.5( z − 01
.)
G ( z) =
a) z + 0.5z + 0.4z − 0.8
3 2

c2 z 4 + 01
. z 3 + 0.7 z 2 + 0.2 z
b) G ( z ) =
c1
z + 0.5z 2 + 0.4 z − 0.8
4
xn(k)
x2(k)
u(k) y(k)
x1(k)
T T T T T c0 Solution:
a) Same denominator and same state equation as Example 7.14.
an − 1
Numerator =(−0.05 + 0.5 z + 0 z2) and the output equation is
an − 2
 x1 ( k ) 
y ( k ) = [ −0.05 0.5 0] x 2 ( k ) 
 
a0
 x 3 ( k ) 
Figure 7.3 Simulation diagram for the controllable canonical realization.

11 12
. z 3 + (0.7 − 0.5) z 2 + (0.2 − 0.4) z − ( −0.8)
01 7.9.b. Controllable Form in CAD Tools (MATLAB)
G( z ) = 1 +
z 4 + 0.5z 2 + 0.4z − 0.8 Using the command » P= ss(g)
b)
. z + 0.2 z 2 − 0.2z + 0.8
01 3
= 1+ 4 with the system of Example 7.15(b) gives
z + 0.5z 2 + 0.4z − 0.8  x1 ( k + 1)  0 −0.5 −0.4 0.8  x1 ( k )  1
Sate-space equations  x ( k + 1)  1 0 0 0   x 2 ( k )  0
 x1 ( k + 1)   0 1 0 0  x1 ( k )  0  2 =   +   u( k )
 x ( k + 1)   0 0 1 0  x 2 ( k )  0  x 3 ( k + 1)  0 1 0 0   x 3 ( k )  0
 2
=   +   u( k )  x ( k + 1)  0 0 1 0   x 4 ( k )  0
 x 3 ( k + 1)   0 0 0 1  x 3 ( k )  0  4  
 x ( k + 1)  0.8 −0.4 −0.5  1 k)
x (
 4   0  x 4 ( k )  1  x ( k )
 x1 ( k )  y ( k ) = [01 . 0.2 −0.2 0.8]  + u( k )
2

 x ( k )  x3 ( k ) 
y ( k ) = [ 0.8 −0.2 0.2 01 . ]  + u( k )  x ( k )
2

 x3 ( k )   4 
 x ( k ) xi in the MATLAB model are none other than the variables xn−i+1 , i
 4 
= 1, 2, … , n (same simulation diagram)

13 14

7.9.c Parallel Realization • z-transfer functions in each of the parallel branches


1 z −1
=
Parallel realization of a transfer function is based on the z + pi 1 − ( − pi z −1 )
partial fraction expansion

cn − 1 z n − 1 + cn − 2 z n − 2 +...+ c1 z + c0 n
Ki represented by a positive feedback loop with forward transfer
Gd ( z ) = n −1
= d +∑ function z−1 and feedback gain pi , as shown in Figure 7.5.
z + an − 1z
n
+...+ a1 z + a 0 z + pi
i =1
• z−1 is simply a time delay so that a physical realization of the
(7.100) transfer function in terms of constant gains and fixed time
delays is now possible.
The expansion is represented by the simulation diagram of
• Define the state variables as the outputs of the first order
Figure 7.4. The summation in (7.100) gives the parallel
blocks and inverse z-transform to obtain the state equations
configuration shown in the Figure which justifies the name
parallel realization.
xi ( k + 1) = − pi xi ( k ) + u( k ), i = 1, 2, L , n (7.101)

15 16
n

∑ K x ( k ) + d u( k )
X1(z)
Output y( k ) = i i (7.102)
i =1 1
K1
State-Space Representation z + p1
 x1 ( k + 1)  − p1 0 ... 0 0   x1 ( k )  1
 x ( k + 1)   0 − p2 ... 0 0   x 2 ( k )  1 U(z)
Y(z)
 2
 .
 
= M M ... M
  
M   M  + M  u ( k )
M M +
 x ( k + 1)   0 0 ... − pn − 1 0   x n − 1 ( k )  1
 n − 1      1
 x n ( k + 1)   0 0 ... 0 − pn   x n ( k )  1 Kn
z + pn
 x1 ( k ) 
 x (k ) 
 2  Xn(z)
.  (7.103)
y ( k ) = [ K1 K2 ... K n − 1 K n ] + d u( k ) d
 . 
 x ( k )
 n −1  Figure 7.4 Block diagram for parallel realization.
 x n ( k ) 

17 18

X1(z) Example 7.16: Obtain a parallel realization for the transfer


function
+ z−1 K1 2z 2 + 2z + 1
G ( z) = 2
−p1 z + 5z + 6
Y(z)
U(z)
M M + Solution: We first write the transfer function in the form
2 z 2 + 2 z + 1 − 2( z 2 + 5z + 6)
Xn(z) G( z) = 2 +
z 2 + 5z + 6
−1 Kn
+ z 8z + 11
= 2−
−pn ( z + 2)( z + 3)

d 5 13
Partial fraction expansion G ( z) = 2 + −
z+2 z+3
Figure 7.5 Simulation diagram for parallel realization. State-space equations

19 20
X1(z)
 x1 ( k + 1)  −2 0   x1 ( k )  1 1
 x ( k + 1)  =  0 −3  x ( k )  + 1u( k ) 5
 2    2    z+2
Y(z)
X2(z) +
 x1 ( k )  U(z)
y ( k ) = [5 −13]  + 2 u( k )
 x2 ( k ) 1
−13
z+3
The simulation diagram for the parallel realization is shown in
Figure 7.7. Clearly, the system is unstable with two
2
eigenvalues outside the unit circle.

Figure 7.6 Block diagram for Example 7.16.

21 22

X1(z) 7.9.d Observable Form


+ z−1 5
Obtain from the controllable realization as follows
−2 Y(z) 1- Transpose the state matrix A.
U(z)
+ 2- Transpose and interchange the input matrix B and the output
matrix C.
X2(z)
z−1 −13
+ Can be written in observable form directly from the TF
−3 0 1× n −1 −a 0   c0 
 − a1  c 
x( k ) +   u( k )
1
3 x( k + 1) = 
 I n −1 M   M 
Figure 7.7 Simulation diagram for Example 7.16.  −a n −1  c 
 n −1 

y ( k ) = [ 0 1× n −1 1]x( k ) + d u( k ) (7.104)

23 24
Example 7.17: Write the state-space equations in observable  x1 ( k + 1)  0 0 0 0.8   x1 ( k )   0.8 
canonical form for the transfer function of Example 7.15(b).  x ( k + 1)  1 0 0 −0.4   x 2 ( k )  −0.2 
 2 =  + u( k )
 x 3 ( k + 1)  0 1 0 −0.5  x 3 ( k )   0.2 
z 4 + 01
. z 3 + 0.7 z 2 + 0.2 z  x ( k + 1)  0 0
G( z) =  4   1 0   x 4 ( k )   01
. 
z + 0.5z 2 + 0.4 z − 0.8
4

Solution: The transfer function =constant + a transfer function  x1 ( k ) 


 x ( k )
with numerator order < denominator order (Example 7.15(b)). y ( k ) = [0 0 0 1]
2
 + u( k )
 x3 ( k ) 
Using (7.104) we obtain  x ( k )
 4 

The same realization is obtained from the controllable realization of


Example 7.15(b) by transposing the state matrix and transposing
then interchanging the matrices B and C.

25 26

7.10 Similarity Transformation Premultipying the state equation by T−1 gives


Given a state vector x(k) with state-space representation of the z( k + 1) = T −1 ATz( k ) + T −1 Bu( k ) (7.107)
form (7.3), we define a new state vector z(k)
State-space quadruple for the state vector z(k)
x( k ) = Tz( k ) ⇔ z( k ) = T −1x( k ) (7.105)
(A, B, C, D) = (T−1AT, T−1B, CT, D) (7.108)
where the transformation matrix T is assumed invertible.
The quadruple for the state vector x(k) can be obtained
Substituting for x(t) gives
from the quadruple of z(k) using the transformation T−1.
Tz( k + 1) = ATz( k ) + Bu( k )
(7.106) Continuous-time system state vector z(t)
y( k ) = CTz( k ) + Du( k )
x(t ) = Tz(t ) ⇔ z( t ) = T −1x(t ) (7.109)

27 28
Similarity transformation is identical for continuous-time and Example 7.18: Obtain the diagonal form for the state-space
discrete-time systems. equations
 x1 ( k + 1)  0 1 0   x1 ( k )  0
Transformation to diagonal form  x ( k + 1)  = 0 0 1   x 2 ( k )  + 0u( k )
 2      
 x 3 ( k + 1)  0 −0.04 −0.5  x 3 ( k )  1
A = VΛV−1⇔Λ = V−1AV (7.110)
 x1 ( k ) 
V = the modal matrix of eigenvectors of A

y ( k ) = [1 0 0] x 2 ( k ) 
 
 x 3 ( k ) 
Λ = diag{λ1, λ2, … ,λn } is the matrix of eigenvalues of A.
Solution: eig command of MATLAB
For A = Λ, T = V = modal transformation 1 −0.995 0.9184 
Λ = diag{0, − 01. , − 0.4} V = 0 0.0995 −0.3674 1 
 
0 0.00995 01469
. 

29 30

The state matrix is in companion form and the modal matrix is The commands yields
also known to be the Van der Monde matrix At = diag{0, −0.1, −0.4}, Bt = [25 33.5012 9.0738]T
Ct = [1.0000 −0.9950 0.9184] Dt =0
1 1 1  1 1 1 
V = λ 1 λ2 λ 31  = 0 −01
. −0.4  Transfer function: can be written by inspection since the
 2    system is given in controllable form.
λ 1 λ22 λ 3  0 0.01 016
2
. 
It can be easily verified that the above diagonal form is
different from that obtained using partial fraction expansion of
MATLAB command for similarity transformation the system transfer function.

» Pt = ss2ss(P, inv(v) )
7.10.a Invariance of Transfer Function and Characteristic
inverse T−1 of the similarity transformation matrix T. Equation

31 32
Similar systems can be viewed as different representations of The transfer function matrix is
the same systems. This is justified by the following theorem.
G1(s) = C1 [z In − A1]−1B1
Theorem 7.1: Similar systems have identical transfer = C T [z In − T−1 A T ]−1 T−1 B
functions and characteristic polynomial. = C [T (z In − T−1 A T) T−1]−1 B
= C [z In − A]−1 B = G(s)
Proof: Consider the characteristic polynomials of similar
realizations (A, B, C, D) and (A1, B1, C1, D) where we used the identity (A B C)−1 = C−1 B−1 A−1.
det[z In − A1] = det[z In − T−1 A T ] ▄
= det[T−1 (z In − A) T ]
= det[T−1] det[z In − A] det[T] = det[z In − A]

where we used the identity det[T−1] det[T] = 1

33 34

Equivalent Systems: systems with the same transfer function.

Example 7.19: Show that the following system is equivalent


to the system of 7.17(b).

x(k + 1) =0.8187 x(k) + 9.0635 × 10−2 u(k)


y(k) = x(k)

Solution: The transfer function of the system is

G(z) = 9.0635 × 10−2/(z− 0.8187)


which is identical to the reduced transfer function of Example
7.17(b).

35

You might also like