← Back to LINEAR SYSTEMS AND SIGNALS Overview
10.7 STATE-SPACE ANALYSIS OF DISCRETE-TIME SYSTEMS
We have shown that an N th-order differential equation can be expressed in terms of N first-order differential equations. In the following analogous procedure, we show that a general N th-order difference equation can be expressed in terms of N first-order difference equations.
Consider the z -transfer function
H [ z ] = b 0 z N + b 1 z N − 1 + ⋯ + b N − 1 z + b N z N + a 1 z N − 1 + ⋯ + a N − 1 z + a N H[z] = \frac{b_0 z^N + b_1 z^{N-1} + \dots + b_{N-1} z + b_N}{z^N + a_1 z^{N-1} + \dots + a_{N-1} z + a_N} H [ z ] = z N + a 1 z N − 1 + ⋯ + a N − 1 z + a N b 0 z N + b 1 z N − 1 + ⋯ + b N − 1 z + b N
The input x [n ] and the output y [n ] of this system are related by the difference equation
( E N + a 1 E N − 1 + ⋯ + a N − 1 E + a N ) y [ n ] = ( b 0 E N + b 1 E N − 1 + ⋯ + b N − 1 E + b N ) x [ n ] (EN + a1EN-1 + \dots + aN-1E + aN)y[n] = (b0EN + b1EN-1 + \dots + bN-1E + bN)x[n] ( E N + a 1 E N − 1 + ⋯ + a N − 1 E + a N ) y [ n ] = ( b 0 E N + b 1 E N − 1 + ⋯ + b N − 1 E + b N ) x [ n ]
The DFII realization of this equation is illustrated in Fig. 10.11.
Signals appearing at the outputs of N delay elements are denoted by q 1[n ], q 2[n ], … , qN [n ]. The input of the first delay is qN [n + 1]. We can now write N equations, one at the input of each delay:
q 1 [ n + 1 ] = q 2 [ n ] q_1[n+1] = q_2[n] q 1 [ n + 1 ] = q 2 [ n ]
\n
q 2 [ n + 1 ] = q 3 [ n ] q_2[n+1] = q_3[n] q 2 [ n + 1 ] = q 3 [ n ]
\n
⋮ \vdots ⋮
\n
q N − 1 [ n + 1 ] = q N [ n ] q_{N-1}[n+1] = q_N[n] q N − 1 [ n + 1 ] = q N [ n ]
\n
q N [ n + 1 ] = − a N q 1 [ n ] − a N − 1 q 2 [ n ] − ⋯ − a 1 q N [ n ] + x [ n ] q_N[n+1] = -a_Nq_1[n] - a_{N-1}q_2[n] - \dots - a_1q_N[n] + x[n] q N [ n + 1 ] = − a N q 1 [ n ] − a N − 1 q 2 [ n ] − ⋯ − a 1 q N [ n ] + x [ n ]
\n(10.60)
and
y [n ] = bNq 1[n ] +bN −1 q 2[n ]+···+b 1qN [n ] +b 0qN +1 [n ]
We can eliminate qN +1 [n ] from this equation by using the last equation in Eq. (10.60) to yield
y [ n ] = ( b N − b 0 a N ) q 1 [ n ] + ( b N − 1 − b 0 a N − 1 ) q 2 [ n ] + ⋯ + ( b 1 − b 0 a 1 ) q N [ n ] + b 0 x [ n ] y[n] = (b_N - b_0 a_N)q_1[n] + (b_{N-1} - b_0 a_{N-1})q_2[n] + \dots + (b_1 - b_0 a_1)q_N[n] + b_0 x[n] y [ n ] = ( b N − b 0 a N ) q 1 [ n ] + ( b N − 1 − b 0 a N − 1 ) q 2 [ n ] + ⋯ + ( b 1 − b 0 a 1 ) q N [ n ] + b 0 x [ n ]
= b ^ N q 1 [ n ] + b ^ N − 1 q 2 [ n ] + ⋯ + b ^ 1 q N [ n ] + b 0 x [ n ] \hat{b}_N q_1[n] + \hat{b}_{N-1} q_2[n] + \dots + \hat{b}_1 q_N[n] + b_0 x[n] b ^ N q 1 [ n ] + b ^ N − 1 q 2 [ n ] + ⋯ + b ^ 1 q N [ n ] + b 0 x [ n ] (10.61)
where b ˆ*i * = bi −b 0ai .
Equation (10.60) shows N first-order difference equations in N variables q 1[n ], q 2[n ], … , qN [n ]. These variables should immediately be recognized as state variables, since the specification of the initial values of these variables in Fig. 10.11 will uniquely determine the response y [n ] for a given x [n ]. Thus, Eq. (10.60) represents the state equations, and Eq. (10.61) is the output equation. In matrix form, we can write these equations as
[ q 1 [ n + 1 ] q 2 [ n + 1 ] ⋮ q N − 1 [ n + 1 ] q N [ n + 1 ] ] = [ 0 1 0 ⋯ 0 0 0 0 1 ⋯ 0 0 ⋮ ⋮ ⋮ ⋱ ⋮ ⋮ 0 0 0 ⋯ 0 1 − a N − a N − 1 − a N − 2 ⋯ − a 2 − a 1 ] [ q 1 [ n ] q 2 [ n ] ⋮ q N − 1 [ n ] q N [ n ] ] + [ 0 0 ⋮ 0 1 ] x [ n ] ( 10.62 ) \begin{bmatrix} q_{1}[n+1] \\ q_{2}[n+1] \\ \vdots \\ q_{N-1}[n+1] \\ \hline q_{N}[n+1] \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & \cdots & 0 & 0 \\ 0 & 0 & 1 & \cdots & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & 0 & 1 \\ -a_{N} & -a_{N-1} & -a_{N-2} & \cdots & -a_{2} & -a_{1} \end{bmatrix} \begin{bmatrix} q_{1}[n] \\ q_{2}[n] \\ \vdots \\ q_{N-1}[n] \\ \hline q_{N}[n] \end{bmatrix} + \begin{bmatrix} 0 \\ 0 \\ \vdots \\ 0 \\ 1 \end{bmatrix} x[n] \quad (10.62) q 1 [ n + 1 ] q 2 [ n + 1 ] ⋮ q N − 1 [ n + 1 ] q N [ n + 1 ] = 0 0 ⋮ 0 − a N 1 0 ⋮ 0 − a N − 1 0 1 ⋮ 0 − a N − 2 ⋯ ⋯ ⋱ ⋯ ⋯ 0 0 ⋮ 0 − a 2 0 0 ⋮ 1 − a 1 q 1 [ n ] q 2 [ n ] ⋮ q N − 1 [ n ] q N [ n ] + 0 0 ⋮ 0 1 x [ n ] ( 10.62 )
and
y [ n ] = [ b ^ N b ^ N − 1 ⋯ b ^ 1 ] ⏟ C [ q 1 [ n ] q 2 [ n ] ⋮ q N [ n ] ] + b 0 ⏟ D x [ n ] ( 10.63 ) \mathbf{y}[n] = \underbrace{\begin{bmatrix} \hat{b}_N & \hat{b}_{N-1} & \cdots & \hat{b}_1 \end{bmatrix}}_{C} \begin{bmatrix} q_1[n] \\ q_2[n] \\ \vdots \\ q_N[n] \end{bmatrix} + \underbrace{b_0}_{D} x[n] \qquad (10.63) y [ n ] = C [ b ^ N b ^ N − 1 ⋯ b ^ 1 ] q 1 [ n ] q 2 [ n ] ⋮ q N [ n ] + D b 0 x [ n ] ( 10.63 )
In general,
q [ n + 1 ] = A q [ n ] + B x [ n ] \mathbf{q}[n+1] = \mathbf{A}\mathbf{q}[n] + \mathbf{B}\mathbf{x}[n] q [ n + 1 ] = Aq [ n ] + Bx [ n ]
y [ n ] = C q [ n ] + D x [ n ] \mathbf{y}[n] = \mathbf{C}\mathbf{q}[n] + \mathbf{D}\mathbf{x}[n] y [ n ] = Cq [ n ] + Dx [ n ]
Here we have represented a discrete-time system with state equations for DFII form. There are several other possible representations, as discussed in Sec. 10.3. We may, for example, use the cascade, parallel, or transpose of DFII forms to realize the system, or we may use some linear transformation of the state vector to realize other forms. In all cases, the output of each delay element qualifies as a state variable. We then write the equation at the input of each delay element. The N equations thus obtained are the N state equations.
Consider the state equation
q [ n + 1 ] = A q [ n ] + B x [ n ] \mathbf{q}[n+1] = \mathbf{A}\mathbf{q}[n] + \mathbf{B}\mathbf{x}[n] q [ n + 1 ] = Aq [ n ] + Bx [ n ]
From this equation, it follows that
q [ n ] = A q [ n − 1 ] + B x [ n − 1 ] \mathbf{q}[n] = \mathbf{A}\mathbf{q}[n-1] + \mathbf{B}\mathbf{x}[n-1] q [ n ] = Aq [ n − 1 ] + Bx [ n − 1 ]
and
q [ n − 1 ] = A q [ n − 2 ] + B x [ n − 2 ] q[n-1] = Aq[n-2] + Bx[n-2] q [ n − 1 ] = A q [ n − 2 ] + B x [ n − 2 ]
\n
q [ n − 2 ] = A q [ n − 3 ] + B x [ n − 3 ] q[n-2] = Aq[n-3] + Bx[n-3] q [ n − 2 ] = A q [ n − 3 ] + B x [ n − 3 ]
\n:
\n:
\n
q [ 1 ] = A q [ 0 ] + B x [ 0 ] q[1] = Aq[0] + Bx[0] q [ 1 ] = A q [ 0 ] + B x [ 0 ]
956 CHAPTER 10 STATE-SPACE ANALYSIS
Substituting the expression for q [n −1] into that for q [n ], we obtain
q [ n ] = A 2 q [ n − 2 ] + A B x [ n − 2 ] + B x [ n − 1 ] \mathbf{q}[n] = \mathbf{A}^2 \mathbf{q}[n-2] + \mathbf{A} \mathbf{B} \mathbf{x}[n-2] + \mathbf{B} \mathbf{x}[n-1] q [ n ] = A 2 q [ n − 2 ] + ABx [ n − 2 ] + Bx [ n − 1 ]
Substituting the expression for q [n −2] in this equation, we obtain
q [ n ] = A 3 q [ n − 3 ] + A 2 B x [ n − 3 ] + A B x [ n − 2 ] + B x [ n − 1 ] q[n] = A^{3}q[n-3] + A^{2}Bx[n-3] + ABx[n-2] + Bx[n-1] q [ n ] = A 3 q [ n − 3 ] + A 2 B x [ n − 3 ] + A B x [ n − 2 ] + B x [ n − 1 ]
Continuing in this way, we obtain
q [ n ] = A n q [ 0 ] + A n − 1 B x [ 0 ] + A n − 2 B x [ 1 ] + ⋯ + B x [ n − 1 ] \mathbf{q}[n] = \mathbf{A}^n \mathbf{q}[0] + \mathbf{A}^{n-1} \mathbf{B} \mathbf{x}[0] + \mathbf{A}^{n-2} \mathbf{B} \mathbf{x}[1] + \dots + \mathbf{B} \mathbf{x}[n-1] q [ n ] = A n q [ 0 ] + A n − 1 Bx [ 0 ] + A n − 2 Bx [ 1 ] + ⋯ + Bx [ n − 1 ]
= A n q [ 0 ] + ∑ m = 0 n − 1 A n − 1 − m B x [ m ] \mathbf{A}^n \mathbf{q}[0] + \sum_{m=0}^{n-1} \mathbf{A}^{n-1-m} \mathbf{B} \mathbf{x}[m] A n q [ 0 ] + ∑ m = 0 n − 1 A n − 1 − m Bx [ m ]
The upper limit of this summation is nonnegative. Hence, n ≥ 1, and the summation is recognized as the convolution sum
A n − 1 u [ n − 1 ] ∗ B x [ n ] \mathbf{A}^{n-1}u[n-1]*\mathbf{B}\mathbf{x}[n] A n − 1 u [ n − 1 ] ∗ Bx [ n ]
Consequently,
q [ n ] = A n q [ 0 ] ⏟ zero input + A n − 1 u [ n − 1 ] ∗ B x [ n ] ⏟ zero state \mathbf{q}[n] = \underbrace{\mathbf{A}^n \mathbf{q}[0]}_{\text{zero input}} + \underbrace{\mathbf{A}^{n-1} u[n-1] * \mathbf{B} \mathbf{x}[n]}_{\text{zero state}} q [ n ] = zero input A n q [ 0 ] + zero state A n − 1 u [ n − 1 ] ∗ Bx [ n ]
(10.64)
and
y [ n ] = C q + D x \mathbf{y}[n] = \mathbf{C}\mathbf{q} + \mathbf{D}\mathbf{x} y [ n ] = Cq + Dx
= C A n q [ 0 ] + ∑ m = 0 n − 1 C A n − 1 − m B x [ m ] + D x \mathbf{C}\mathbf{A}^n \mathbf{q}[0] + \sum_{m=0}^{n-1} \mathbf{C}\mathbf{A}^{n-1-m} \mathbf{B}\mathbf{x}[m] + \mathbf{D}\mathbf{x} C A n q [ 0 ] + ∑ m = 0 n − 1 C A n − 1 − m Bx [ m ] + Dx
= C A n q [ 0 ] + C A n − 1 u [ n − 1 ] ∗ B x [ n ] + D x \mathbf{C}\mathbf{A}^n \mathbf{q}[0] + \mathbf{C}\mathbf{A}^{n-1}u[n-1] * \mathbf{B}\mathbf{x}[n] + \mathbf{D}\mathbf{x} C A n q [ 0 ] + C A n − 1 u [ n − 1 ] ∗ Bx [ n ] + Dx (10.65)
In Sec. 10.1-3, we showed that
A n = β 0 I + β 1 A + β 2 A 2 + ⋯ + β N − 1 A N − 1 \mathbf{A}^n = \beta_0 \mathbf{I} + \beta_1 \mathbf{A} + \beta_2 \mathbf{A}^2 + \dots + \beta_{N-1} \mathbf{A}^{N-1} A n = β 0 I + β 1 A + β 2 A 2 + ⋯ + β N − 1 A N − 1
(10.66)
where (assuming N distinct eigenvalues of A )
[ \n β 0 β 1 ⋮ β N − 1 \n ] = [ \n 1 λ 1 λ 1 2 ⋯ λ 1 N − 1 1 λ 2 λ 2 2 ⋯ λ 2 N − 1 ⋮ ⋮ ⋮ ⋯ ⋮ 1 λ N λ N 2 ⋯ λ N N − 1 \n ] − 1 [ \n λ 1 n λ 2 n ⋮ λ N n \n ] \begin{bmatrix}\n\beta_0 \\
\beta_1 \\
\vdots \\
\beta_{N-1}\n\end{bmatrix} = \begin{bmatrix}\n1 & \lambda_1 & \lambda_1^2 & \cdots & \lambda_1^{N-1} \\
1 & \lambda_2 & \lambda_2^2 & \cdots & \lambda_2^{N-1} \\
\vdots & \vdots & \vdots & \cdots & \vdots \\
1 & \lambda_N & \lambda_N^2 & \cdots & \lambda_N^{N-1}\n\end{bmatrix}^{-1} \begin{bmatrix}\n\lambda_1^n \\
\lambda_2^n \\
\vdots \\
\lambda_N^n\n\end{bmatrix} \n β 0 β 1 ⋮ β N − 1 \n = \n 1 1 ⋮ 1 λ 1 λ 2 ⋮ λ N λ 1 2 λ 2 2 ⋮ λ N 2 ⋯ ⋯ ⋯ ⋯ λ 1 N − 1 λ 2 N − 1 ⋮ λ N N − 1 \n − 1 \n λ 1 n λ 2 n ⋮ λ N n \n
\n(10.67)
and λ1, λ2, … , λ*N * are the N eigenvalues of A .
We can also determine A *n * from the z -transform formula, which will be derived later, in Eq. (10.71):
A n = Z − 1 [ ( I − z − 1 A ) − 1 ] \mathbf{A}^n = \mathcal{Z}^{-1}[(\mathbf{I} - z^{-1}\mathbf{A})^{-1}] A n = Z − 1 [( I − z − 1 A ) − 1 ]
EXAMPLE 10.13 State-Space Analysis of a Discrete-Time System
Give a state-space description of the system in Fig. 10.12. Find the output y [n ] if the input x [n ] = u [n ] and the initial conditions are q 1[0] = 2 and q 2[0] = 3.
6 Figure 10.12 System for Ex. 10.13.
Recognizing that q 2[n ] = q 1[n +1], the state equations are [see Eqs. (10.62) and (10.63)]
[ q 1 [ n + 1 ] q 2 [ n + 1 ] ] = [ 0 1 − 1 6 5 6 ] [ q 1 [ n ] q 2 [ n ] ] + [ 0 1 ] x \begin{bmatrix} q_1[n+1] \\ q_2[n+1] \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ -\frac{1}{6} & \frac{5}{6} \end{bmatrix} \begin{bmatrix} q_1[n] \\ q_2[n] \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix} x [ q 1 [ n + 1 ] q 2 [ n + 1 ] ] = [ 0 − 6 1 1 6 5 ] [ q 1 [ n ] q 2 [ n ] ] + [ 0 1 ] x
and
y [ n ] = [ − 1 5 ] [ q 1 [ n ] q 2 [ n ] ] y[n] = \begin{bmatrix} -1 & 5 \end{bmatrix} \begin{bmatrix} q_1[n] \\ q_2[n] \end{bmatrix} y [ n ] = [ − 1 5 ] [ q 1 [ n ] q 2 [ n ] ]
To find the solution [Eq. (10.65)], we must first determine A *n * . The characteristic equation of A is
∣ λ I − A ∣ = ∣ λ − 1 1 6 λ − 5 6 ∣ = λ 2 − 5 6 λ + 1 6 = ( λ − 1 3 ) ( λ − 1 2 ) = 0 |\lambda \mathbf{I} - \mathbf{A}| = \begin{vmatrix} \lambda & -1 \\ \frac{1}{6} & \lambda - \frac{5}{6} \end{vmatrix} = \lambda^2 - \frac{5}{6}\lambda + \frac{1}{6} = \left(\lambda - \frac{1}{3}\right)\left(\lambda - \frac{1}{2}\right) = 0 ∣ λ I − A ∣ = λ 6 1 − 1 λ − 6 5 = λ 2 − 6 5 λ + 6 1 = ( λ − 3 1 ) ( λ − 2 1 ) = 0
Hence, λ1 = 1/3 and λ2 = 1/2 are the eigenvalues of A and [see Eq. (10.66)]
A n = β 0 I + β 1 A \mathbf{A}^n = \beta_0 \mathbf{I} + \beta_1 \mathbf{A} A n = β 0 I + β 1 A
where [see Eq. (10.67)]
[ β 0 β 1 ] = [ 1 1 3 1 1 2 ] − 1 [ ( 1 3 ) n ( 1 2 ) n ] = [ 3 − 2 − 6 6 ] [ ( 3 ) − n ( 2 ) − n ] = [ 3 ( 3 ) − n − 2 ( 2 ) − n − 6 ( 3 ) − n + 6 ( 2 ) − n ] \begin{bmatrix} \beta_0 \\ \beta_1 \end{bmatrix} = \begin{bmatrix} 1 & \frac{1}{3} \\ 1 & \frac{1}{2} \end{bmatrix}^{-1} \begin{bmatrix} \left(\frac{1}{3}\right)^n \\ \left(\frac{1}{2}\right)^n \end{bmatrix} = \begin{bmatrix} 3 & -2 \\ -6 & 6 \end{bmatrix} \begin{bmatrix} (3)^{-n} \\ (2)^{-n} \end{bmatrix} = \begin{bmatrix} 3(3)^{-n} - 2(2)^{-n} \\ -6(3)^{-n} + 6(2)^{-n} \end{bmatrix} [ β 0 β 1 ] = [ 1 1 3 1 2 1 ] − 1 [ ( 3 1 ) n ( 2 1 ) n ] = [ 3 − 6 − 2 6 ] [ ( 3 ) − n ( 2 ) − n ] = [ 3 ( 3 ) − n − 2 ( 2 ) − n − 6 ( 3 ) − n + 6 ( 2 ) − n ]
and
A n = [ 3 ( 3 ) − n − 2 ( 2 ) − n ] [ 1 0 0 1 ] + [ − 6 ( 3 ) − n + 6 ( 2 ) − n ] [ 0 1 − 1 6 5 6 ] \mathbf{A}^{n} = [3(3)^{-n} - 2(2)^{-n}] \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} + [-6(3)^{-n} + 6(2)^{-n}] \begin{bmatrix} 0 & 1 \\ -\frac{1}{6} & \frac{5}{6} \end{bmatrix} A n = [ 3 ( 3 ) − n − 2 ( 2 ) − n ] [ 1 0 0 1 ] + [ − 6 ( 3 ) − n + 6 ( 2 ) − n ] [ 0 − 6 1 1 6 5 ]
=
[ 3 ( 3 ) − n − 2 ( 2 ) − n − 6 ( 3 ) − n + 6 ( 2 ) − n ( 3 ) − n − ( 2 ) − n − 2 ( 3 ) − n + 3 ( 2 ) − n ] \begin{bmatrix} 3(3)^{-n} - 2(2)^{-n} & -6(3)^{-n} + 6(2)^{-n} \\ (3)^{-n} - (2)^{-n} & -2(3)^{-n} + 3(2)^{-n} \end{bmatrix} [ 3 ( 3 ) − n − 2 ( 2 ) − n ( 3 ) − n − ( 2 ) − n − 6 ( 3 ) − n + 6 ( 2 ) − n − 2 ( 3 ) − n + 3 ( 2 ) − n ]
(10.68)
We can now determine the state vector q [n ] from Eq. (10.64). Since we are interested in the output y [n ], we shall use Eq. (10.65) directly. Note that
C A n = [ − 1 5 ] A n = [ 2 ( 3 ) − n − 3 ( 2 ) − n − 4 ( 3 ) − n + 9 ( 2 ) − n ] CAn = [-1 \quad 5]An = [2(3)-n - 3(2)-n -4(3)-n + 9(2)-n] C A n = [ − 1 5 ] A n = [ 2 ( 3 ) − n − 3 ( 2 ) − n − 4 ( 3 ) − n + 9 ( 2 ) − n ]
and the zero-input response is CA *n * q [0], with
q [ 0 ] = [ 2 3 ] \mathbf{q}[0] = \begin{bmatrix} 2 \\ 3 \end{bmatrix} q [ 0 ] = [ 2 3 ]
Hence, the zero-input response is
C A n q [ 0 ] = − 8 ( 3 ) − n + 21 ( 2 ) − n CAnq[0] = -8(3)-n + 21(2)-n C A n q [ 0 ] = − 8 ( 3 ) − n + 21 ( 2 ) − n
The zero-state component is given by the convolution sum of CA n −1 u [n −1] and Bx [n ]. We can use the shifting property of the convolution sum [Eq. (3.32)] to obtain the zero-state component by finding the convolution sum of CA *n u*[n ] and Bx [n ] and then replacing n with n − 1 in the result. We use this procedure because the convolution sums are listed in Table 3.1 for functions of the type x [n ]u [n ], rather than x [n ]u [n −1].
C A n u [ n ] ∗ B x [ n ] = [ 2 ( 3 ) − n − 3 ( 2 ) − n − 4 ( 3 ) − n + 9 ( 2 ) − n ] ∗ [ 0 u [ n ] ] \mathbf{CA}^{n}u[n] * \mathbf{B}x[n] = [2(3)^{-n} - 3(2)^{-n} - 4(3)^{-n} + 9(2)^{-n}] * \begin{bmatrix} 0 \\ u[n] \end{bmatrix} CA n u [ n ] ∗ B x [ n ] = [ 2 ( 3 ) − n − 3 ( 2 ) − n − 4 ( 3 ) − n + 9 ( 2 ) − n ] ∗ [ 0 u [ n ] ]
= -4(3)^{-n} * u[n] + 9(2)^{-n} * u[n]
Using Table 3.1 (pair 4), we obtain
C A n u [ n ] ∗ B x [ n ] = − 4 [ 1 − 3 − ( n + 1 ) 1 − 1 3 ] u [ n ] + 9 [ 1 − 2 − ( n + 1 ) 1 − 1 2 ] u [ n ] \mathbf{CA}^{n}u[n] * \mathbf{B}x[n] = -4 \left[ \frac{1 - 3^{-(n+1)}}{1 - \frac{1}{3}} \right] u[n] + 9 \left[ \frac{1 - 2^{-(n+1)}}{1 - \frac{1}{2}} \right] u[n] CA n u [ n ] ∗ B x [ n ] = − 4 [ 1 − 3 1 1 − 3 − ( n + 1 ) ] u [ n ] + 9 [ 1 − 2 1 1 − 2 − ( n + 1 ) ] u [ n ]
= [ 12 + 6 ( 3 − ( n + 1 ) ) − 18 ( 2 − ( n + 1 ) ) ] u [ n ] = [12 + 6(3^{-(n+1)}) - 18(2^{-(n+1)})]u[n] = [ 12 + 6 ( 3 − ( n + 1 ) ) − 18 ( 2 − ( n + 1 ) )] u [ n ]
Now the desired (zero-state) response is obtained by replacing n by n −1. Hence,
C A n u [ n ] ∗ B x [ n − 1 ] = [ 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ] u [ n − 1 ] CAnu[n] * Bx[n-1] = [12+6(3)-n - 18(2)-n]u[n-1] C A n u [ n ] ∗ B x [ n − 1 ] = [ 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ] u [ n − 1 ]
It follows that
y [ n ] = [ − 8 ( 3 ) − n + 21 ( 2 ) − n u [ n ] + [ 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ] u [ n − 1 ] y[n] = [-8(3)^{-n} + 21(2)^{-n}u[n] + [12 + 6(3)^{-n} - 18(2)^{-n}]u[n-1] y [ n ] = [ − 8 ( 3 ) − n + 21 ( 2 ) − n u [ n ] + [ 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ] u [ n − 1 ]
This is the desired answer. We can simplify this answer by observing that 12 + 6(3)−n − 18(2)−n = 0 for n = 0. Hence, u [n −1] may be replaced by u [n ], and
y [ n ] = [ 12 − 2 ( 3 ) − n + 3 ( 2 ) − n ] u [ n ] y[n] = [12 - 2(3)^{-n} + 3(2)^{-n}]u[n] y [ n ] = [ 12 − 2 ( 3 ) − n + 3 ( 2 ) − n ] u [ n ]
\n(10.69)
USING MATLAB TO OBTAIN A GRAPHICAL SOLUTION
MATLAB is equipped with tools to simulate digital systems, which makes it easy to obtain a graphical solution to the system. Let us use MATLAB simulation to determine the total system output over 0 ≤ n ≤ 25.
A = [0 1;-1/6 5/6]; B = [0; 1]; C = [-1 5]; D = 0;
N = 25; n = (0:N); x = ones(1,N+1); q0 = [2;3];
sys = ss(A,B,C,D,-1); % Discrete-time state space model
[y,q] = lsim(sys,x,n,q0); % Simulate output and state vector
clf; stem(n,y,‘k.’); xlabel(‘n’); ylabel(‘y[n]’); axis([-.5 25.5 11.5 13.5]);
The MATLAB results, shown in Fig. 10.13, exactly align with the analytical solution derived earlier. Also notice that the zero-input and zero-state responses can be separately obtained using the same code and respectively setting either x or q0 to zero.
The z -transform of Eq. (10.62) is given by
z Q [ z ] − z q [ 0 ] = A Q [ z ] + B X [ z ] z\mathbf{Q}[z] - z\mathbf{q}[0] = \mathbf{A}\mathbf{Q}[z] + \mathbf{B}\mathbf{X}[z] z Q [ z ] − z q [ 0 ] = AQ [ z ] + BX [ z ]
Therefore,
( z I − A ) Q [ z ] = z q [ 0 ] + B X [ z ] (z\mathbf{I} - \mathbf{A})\mathbf{Q}[z] = z\mathbf{q}[0] + \mathbf{B}\mathbf{X}[z] ( z I − A ) Q [ z ] = z q [ 0 ] + BX [ z ]
and
Q [ z ] = ( z I − A ) − 1 z q [ 0 ] + ( z I − A ) − 1 B X [ z ] Q[z] = (zI - A)^{-1}zq[0] + (zI - A)^{-1}BX[z] Q [ z ] = ( z I − A ) − 1 z q [ 0 ] + ( z I − A ) − 1 B X [ z ]
= ( I − z − 1 A ) − 1 q [ 0 ] + ( z I − A ) − 1 B X [ z ] = (I - z^{-1}A)^{-1}q[0] + (zI - A)^{-1}BX[z] = ( I − z − 1 A ) − 1 q [ 0 ] + ( z I − A ) − 1 B X [ z ]
Hence,
q [ n ] = Z − 1 [ ( I − z − 1 A ) − 1 ] q [ 0 ] ⏟ zero-input response + Z − 1 [ ( z I − A ) − 1 B X [ z ] ] ⏟ zero-state response \mathbf{q}[n] = \underbrace{\mathcal{Z}^{-1}[(\mathbf{I} - z^{-1}\mathbf{A})^{-1}]\mathbf{q}[0]}_{\text{zero-input response}} + \underbrace{\mathcal{Z}^{-1}[(z\mathbf{I} - \mathbf{A})^{-1}\mathbf{B}\mathbf{X}[z]]}_{\text{zero-state response}} q [ n ] = zero-input response Z − 1 [( I − z − 1 A ) − 1 ] q [ 0 ] + zero-state response Z − 1 [( z I − A ) − 1 BX [ z ]]
(10.70)
960 CHAPTER 10 STATE-SPACE ANALYSIS
A comparison of Eq. (10.70) with Eq. (10.64) shows that
A n = Z − 1 [ ( I − z − 1 A ) − 1 ] \mathbf{A}^{n} = \mathcal{Z}^{-1}[(\mathbf{I} - z^{-1}\mathbf{A})^{-1}] A n = Z − 1 [( I − z − 1 A ) − 1 ]
(10.71)
The output equation is given by
Y [ z ] = C Q [ z ] + D X [ z ] \mathbf{Y}[z] = \mathbf{C}\mathbf{Q}[z] + \mathbf{D}\mathbf{X}[z] Y [ z ] = CQ [ z ] + DX [ z ]
= C [ ( I − z − 1 A ) − 1 q [ 0 ] + ( z I − A ) − 1 B X [ z ] ] + D X [ z ] \mathbf{C}[(\mathbf{I} - z^{-1}\mathbf{A})^{-1}\mathbf{q}[0] + (z\mathbf{I} - \mathbf{A})^{-1}\mathbf{B}\mathbf{X}[z]] + \mathbf{D}\mathbf{X}[z] C [( I − z − 1 A ) − 1 q [ 0 ] + ( z I − A ) − 1 BX [ z ]] + DX [ z ]
= C ( I − z − 1 A ) − 1 q [ 0 ] + [ C ( z I − A ) − 1 B + D ] X [ z ] \mathbf{C}(\mathbf{I} - z^{-1}\mathbf{A})^{-1}\mathbf{q}[0] + [\mathbf{C}(z\mathbf{I} - \mathbf{A})^{-1}\mathbf{B} + \mathbf{D}]\mathbf{X}[z] C ( I − z − 1 A ) − 1 q [ 0 ] + [ C ( z I − A ) − 1 B + D ] X [ z ]
= C ( I − z − 1 A ) − 1 q [ 0 ] ⏟ zero-input response + H [ z ] X [ z ] ⏟ zero-state response \underbrace{\mathbf{C}(\mathbf{I} - z^{-1}\mathbf{A})^{-1}\mathbf{q}[0]}_{\text{zero-input response}} + \underbrace{\mathbf{H}[z]\mathbf{X}[z]}_{\text{zero-state response}} zero-input response C ( I − z − 1 A ) − 1 q [ 0 ] + zero-state response H [ z ] X [ z ] (10.72)
where
H [ z ] = C ( z I − A ) − 1 B + D \mathbf{H}[z] = \mathbf{C}(z\mathbf{I} - \mathbf{A})^{-1}\mathbf{B} + \mathbf{D} H [ z ] = C ( z I − A ) − 1 B + D
(10.73)
Note that H [z ] is the transfer function matrix of the system, and Hij [z ], the ij th element of H [z ], is the transfer function relating the output yi [n ] to the input xj [n ]. If we define h [n ] as
h [ n ] = Z − 1 [ H [ z ] ] \mathbf{h}[n] = \mathcal{Z}^{-1}[\mathbf{H}[z]] h [ n ] = Z − 1 [ H [ z ]]
then h [n ] represents the unit impulse function response matrix of the system. Thus, hij [n ], the ij th element of h [n ], represents the zero-state response yi [n ] when the input xj [n ] = δ[n ] and all other inputs are zero.
Use the z -transform to find the response y [n ] for the system in Ex. 10.13.
According to Eq. (10.72),
Y [ z ] = [ − 1 5 ] [ 1 1 6 z − 1 z 1 − z 6 z ] − 1 [ 2 3 ] + [ − 1 5 ] [ z 1 6 − 1 z − 5 6 ] − 1 [ 0 z z − 1 ] \mathbf{Y}[z] = [-1 \quad 5] \left[ \frac{1}{\frac{1}{6z}} \quad \frac{-\frac{1}{z}}{1 - \frac{z}{6z}} \right]^{-1} \left[ \frac{2}{3} \right] + [-1 \quad 5] \left[ \frac{z}{\frac{1}{6}} \quad \frac{-1}{z - \frac{5}{6}} \right]^{-1} \left[ \frac{0}{\frac{z}{z - 1}} \right] Y [ z ] = [ − 1 5 ] [ 6 z 1 1 1 − 6 z z − z 1 ] − 1 [ 3 2 ] + [ − 1 5 ] [ 6 1 z z − 6 5 − 1 ] − 1 [ z − 1 z 0 ]
\n
= [ − 1 5 ] [ z ( 6 z − 5 ) 6 z 2 − 5 z + 1 − z 6 z 2 − 5 z + 1 6 z 6 z 2 − 5 z + 1 6 z 2 − 5 z + 1 6 z 2 − 5 z + 1 ] [ 2 3 ] + [ − 1 5 ] [ z ( z − 1 ) ( z 2 − 5 6 z + 1 6 ) z 2 ( z − 1 ) ( z 2 − 5 6 z + 1 6 ) ] = [-1 \quad 5] \left[ \frac{\frac{z(6z - 5)}{6z^2 - 5z + 1}}{\frac{-z}{6z^2 - 5z + 1}} \quad \frac{\frac{6z}{6z^2 - 5z + 1}}{\frac{6z^2 - 5z + 1}{6z^2 - 5z + 1}} \right] \left[ \frac{2}{3} \right] + [-1 \quad 5] \left[ \frac{\frac{z}{(z - 1)(z^2 - \frac{5}{6}z + \frac{1}{6})}}{\frac{z^2}{(z - 1)(z^2 - \frac{5}{6}z + \frac{1}{6})}} \right] = [ − 1 5 ] [ 6 z 2 − 5 z + 1 − z 6 z 2 − 5 z + 1 z ( 6 z − 5 ) 6 z 2 − 5 z + 1 6 z 2 − 5 z + 1 6 z 2 − 5 z + 1 6 z ] [ 3 2 ] + [ − 1 5 ] ( z − 1 ) ( z 2 − 6 5 z + 6 1 ) z 2 ( z − 1 ) ( z 2 − 6 5 z + 6 1 ) z
\n
= 13 z 2 − 3 z z 2 − 5 6 z + 1 6 + ( 5 z − 1 ) z ( z − 1 ) ( z 2 − 5 6 z + 1 6 ) = \frac{13z^2 - 3z}{z^2 - \frac{5}{6}z + \frac{1}{6}} + \frac{(5z - 1)z}{(z - 1)(z^2 - \frac{5}{6}z + \frac{1}{6})} = z 2 − 6 5 z + 6 1 13 z 2 − 3 z + ( z − 1 ) ( z 2 − 6 5 z + 6 1 ) ( 5 z − 1 ) z
\n
= − 8 z z − 1 3 + 21 z z − 1 2 + 12 z z − 1 + 12 z z − 1 + 6 z z − 1 3 − 18 z z − 1 2 = \frac{-8z}{z - \frac{1}{3}} + \frac{21z}{z - \frac{1}{2}} + \frac{12z}{z - 1} + \frac{12z}{z - 1} + \frac{6z}{z - \frac{1}{3}} - \frac{18z}{z - \frac{1}{2}} = z − 3 1 − 8 z + z − 2 1 21 z + z − 1 12 z + z − 1 12 z + z − 3 1 6 z − z − 2 1 18 z
Therefore,
y [ n ] = [ − 8 ( 3 ) − n + 21 ( 2 ) − n ⏟ zero-input response + 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ⏟ zero-state response ] u [ n ] y[n] = \underbrace{[-8(3)^{-n} + 21(2)^{-n}}_{\text{zero-input response}} + \underbrace{12 + 6(3)^{-n} - 18(2)^{-n}}_{\text{zero-state response}}]u[n] y [ n ] = zero-input response [ − 8 ( 3 ) − n + 21 ( 2 ) − n + zero-state response 12 + 6 ( 3 ) − n − 18 ( 2 ) − n ] u [ n ]
The procedure for linear transformation is parallel to that in the continuous-time case (Sec. 10.5). If w is the transformed-state vector given by
w = Pq
then
w [ n + 1 ] = P A P − 1 w [ n ] + P B x \mathbf{w}[n+1] = \mathbf{P}\mathbf{A}\mathbf{P}^{-1}\mathbf{w}[n] + \mathbf{P}\mathbf{B}\mathbf{x} w [ n + 1 ] = PA P − 1 w [ n ] + PBx
and
y [ n ] = ( C P − 1 ) w + D x \mathbf{y}[n] = (\mathbf{C}\mathbf{P}^{-1})\mathbf{w} + \mathbf{D}\mathbf{x} y [ n ] = ( C P − 1 ) w + Dx
Controllability and observability may be investigated by diagonalizing the matrix, as explained in Sec. 10.5-1.