STATE-SPACE ANALYSIS OF DISCRETE-TIME SYSTEMS
10.6 STATE-SPACE ANALYSIS OF DISCRETE-TIME SYSTEMS
We have shown that an Nth-order differential equation can be expressed in terms of N first-order differential equations. In the following analogous procedure, we show that a general Nth-order difference equation can be expressed in terms of N first-order difference equations.
Consider the z-transfer function
The input x[n] and the output y[n] of this system are related by the difference equation
The DFII realization of this equation is illustrated in Fig. 10.10 . Signals appearing at the outputs of N delay elements are denoted by q 1 [n], q 2 [n], ..., q N [n]. The input of the first delay is q N [n + 1]. We can now write N equations, one at the input of each delay:
Figure 10.10: Direct form II realization of an Nth-order, discrete-time system. and
We can eliminate q N+1 [n] from this equation by using the last equation in the set (10.87) to yield
where . Equations (10.87) are N first-order difference equations in N variables q 1 [n], q 2 [n], ..., q N [n]. These variables should immediately be recognized as
state variables, since the specification of the initial values of these variables in Fig. 10.10 will uniquely determine the response y[n] for a given x[n]. Thus, Eqs. (10.87) represent the state equations, and Eq. (10.88) is the output equation. In matrix form we can write these equations as
and
In general,
Here we have represented a discrete-time system with state equations for DFII form. There are several other possible representations, as discussed in Section 10.2 . 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.
10.6-1 Solution in State-Space
Consider the state equation
From this equation it follows that
and
Substituting Eq. (10.92b) in Eq. (10.92a) , we obtain Substituting Eq. (10.92c) in this equation, we obtain Continuing in this way, we obtain
The upper limit on the summation in Eq. (10.93a) is nonnegative. Hence n ≥ 1, and the summation is recognized as the convolution sum Consequently
and
In Section B.6-5 , we showed that
where (assuming N distinct eigenvalues of A)
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.102) :
EXAMPLE 10.12
Give a state-space description of the system in Fig. 10.11 . 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.
Figure 10.11
Recognizing that q 2 [n] = q 1 [n + 1], the state equations are [see Eq. (10.89)]
and
To find the solution [Eq. (10.94)], we must first determine A n . The characteristic equation of
A is
Hence, λ 1 = ⅓ and ? 2 = 1/2 are the eigenvalues of
A and [see Eq. (10.95a) ]
where [see Eq. (10.95b) ]
and
We can now determine the state vector q[n] from Eq. (10.93b) . Since we are interested in the output y[n], we shall use Eq. (10.94b) directly. Note that
and the zero-input response is CA n q[0], with
Hence, the zero-input response is
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. (9.46) ] 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].
Using Table 3.1 (pair 4), we obtain
Now the desired (zero-state) response is obtained by replacing n by n − 1. Hence It follows that
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] in Eq. (10.99b) , and
COMPUTER EXAMPLE C10.7
Use MATLAB to find a graphical solution for Example 10.12 . >> A = [0 1;-1/6 5/6]; B = [0; 1]; C = [-1 5]; D = 0;
>> sys = ss(A,B,C,D,-1); % Discrete-time state space model >> N = 25; x = ones(1,N+1); n = (0:N); q0 = [2;3]; >> [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]);
Figure C10.7 COMPUTER EXAMPLE C10.8
Use MATLAB to plot the zero-state response of the system in Example 10.12 . >> A = [0 1;-1/6 5/6]; B = [0; 1]; C = [-1 5]; D = 0;
>> N = 25; x = ones(1,N+1); n = (0:N); >> [num,den] = ss2tf(A,B,C,D); >> y = filter(num,den,x); >> clf; stem(n,y,'k'); xlabel('n'); ylabel('y[n] (ZSR)'); >> axis([-.5 25.5 -0.5 12.5]);
Similar to Computer Example C10.7 , it is also possible to compute the output by using: >> A = [0 1;-1/6 5/6]; B = [0; 1]; C = [-1 5]; D = 0;
>> N = 25; x = ones(1,N+1); n = (0:N); >> sys = ss(A,B,C,D,-1); y = lsim(sys,x,n); >> clf; stem(n,y,'k'); xlabel('n'); ylabel('y[n] (ZSR)'); >> axis([-.5 25.5 -0.5 12.5]);
Figure C10.8
10.6-2 The z-Transform Solution
The z-transform of Eq. (10.91) is given by Therefore and
Hence
A comparison of Eq. (10.101b) with Eq. (10.93b) shows that
The output equation is given by
where
Note that H[z] is the transfer function matrix of the system, and H ij [z], the ijth element of H[z], is the transfer function relating the output y i [n] to the input x j [n]. If we define h[n] as
then h[n] represents the unit impulse function response response matrix of the system. Thus, h ij [n], the ijth element of h[n], represents the zero-state response y i [n] when the input x j [n] = δ[n] and all other inputs are zero.
EXAMPLE 10.13
Use the z-transform to, find the response y[n] for the system in Example 10.12 . According to Eq. (10.103a)
Therefore
LINEAR TRANSFORMATION, CONTROLLABILITY, AND OBSERVABILITY
The procedure for linear transformation is parallel to that in the continuous-time case ( Section 10.4) . If w is the transformed-state vector given by then
and Controllability and observability may be investigated by diagonalizing the matrix, as explained in Section 10.4-1 .