Professional Documents
Culture Documents
K XK XK X K XK Yk Yk Ykn Ykn: 7.9 State-Space Realizations 7.9.a Controllable Canonical Realization
K XK XK X K XK Yk Yk Ykn Ykn: 7.9 State-Space Realizations 7.9.a Controllable Canonical Realization
1 2
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 ) + 0u( 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 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
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
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 ) + 1u( 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.
21 22
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
25 26
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 ) + 0u( 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]
33 34
35