
ECE4330 Lecture 21 Linear Discrete-Time Systems: Solution of Difference Equations by Iteration, by the Z-transform and by Convolution Prof. Mohamad Hassoun Linear Time-Invariant Discrete-Time (LTID) System Analysis Consider a linear discrete-time system. We are interested in solving for the complete response 푦[푘] given the difference equation governing the system, its associated initial conditions and the input 푓[푘]. It will be shown that 푦[푘] is a sequence of numbers that can be obtained explicitly by simple recursion (iteration). Alternatively, an analytic solution of the linear difference equation can be obtained based on the Z- transform method. The analytic solution can also be obtained based on a systematic time-domain method, as covered in the next lecture. There are two equivalent formulations for a difference equation: The advance operator formulation and the delay operator formulation. The following analysis illustrates how to convert one formulation to the other. Delay Operator Formulation The following is an example of a delay formulation, second-order linear difference equation. Here, the signal 푦[푘] appears right shifted, 푦[푘] − 5푦[푘 − 1] + 6푦[푘 − 2] = 푓[푘 − 1] − 5푓[푘 − 2] (1) with the initial conditions 푦[−1] = 2 and 푦[−2] = 1. Let the input signal be the causal signal 푓[푘] = (3푘 + 5)푢[푘]. Solve for 푦[푘], 푘 ≥ 0 Advance Operator Formulation The advance operator formulation for the above difference equation can be obtained by simply shifting the difference equation so that the largest difference term 푦[푘 − 2] becomes 푦[푘]. Which requires replacing 푘 by 푘 + 2 throughout the equation, to obtain: 푦[푘 + 2] − 5푦[푘 + 1] + 6푦[푘] = 푓[푘 + 1] − 5푓[푘] (2) Next, we need to establish a set of appropriate initial conditions, 푦[0] and 푦[1]. This can be done by setting 푘 to 0 and then to 1 in Equation (1) and solving for 푦[0] and 푦[1], respectively, as follows. Set 푘 = 0 in Eqn. (1) to obtain 푦[0], 푦[0] = 5푦[−1] − 6푦[−2] + 푓[−1] − 5푓[−2] 푦[0] = 5(2) − 6(1) + 0 − 0 = 10 − 6 → 푦[0] = 4 Set 푘 = 1 in Eqn. (1) to obtain 푦[1], 푦[1] = 5푦[0] − 6푦[−1] + 푓[0] − 5푓[−1] 푦[1] = 5(4) − 6(2) + 5 − 0 = 13 → 푦[1] = 13 It is important to note that when we derived the initial conditions for this system, one of them (푦[1]) depended on the input value 푓[0]. So we say that the initial conditions are tainted by the input. When that occurs, the advance formulation should be avoided if we are looking for decoupled solutions of the form 푦[푘] = 푦푧푠[푘] + 푦푧[푘]. This will be illustrated through an example later in this lecture. Analysis Methods for Computing 푦[푘] Iterative method (numerical solution; also works for non-linear systems) Z-transform method; allows for finding 푦푧푠[푘] and 푦푧[푘]. Time-domain convolution for finding 푦푧푠[푘]. (Refer to the last section.) Time-domain analysis. (Refer to the classical method of solution of difference equations covered in Lecture 22.) Solve the above advance-formulation, second-order linear difference equation using the iterative method. First, we solve for the highest delay term in the difference equation to arrive at the recursion formula 푦[푘 + 2] = 5푦[푘 + 1] − 6푦[푘] + [3(푘 + 1) + 5]푢[푘 + 1] −5(3푘 + 5)푢[푘] and then start iterating with 푦[0] = 4 and 푦[1] = 13, as is shown below. 푘 = 0: 푦[2] = 5푦[1] − 6푦[0] + (3 + 5)(1) − 5(0 + 5)(1) 푦[2] = 5(13) − 6(4) + 8 − 25 = 24 푘 = 1: 푦[3] = 5푦[2] − 6푦[1] + (6 + 5)(1) − 5(3 + 5)(1) 푦[3] = 5(24) − 6(13) + 11 − 40 = 13 Repeat for 푘 = 2, 3, 4, … to generate the solution sequence (푘 ≥ 0) 푦[푘] = 4, 13, 24, 13, −120, … Next, we illustrate the iterative solution applied to the delay formulation equation, Eqn. (1). First, we obtain the recursion formula for 푦[푘] as, 푦[푘] = 5푦[푘 − 1] − 6푦[푘 − 2] + (3푘 + 2)푢[푘 − 1] − 5(3푘 − 1)푢[푘 − 2] and start iterating with 푦[−1] = 2 and 푦[−2] = 1 as follows, 푘 = 0: 푦[0] = 5푦[−1] − 6푦[−2] + 2푢[−1] − 5(−1)푢[−2] 푦[0] = 5(2) − 6(1) + 0 + 0 푦[0] = 4 푘 = 1: 푦[1] = 5푦[0] − 6푦[−1] + 5푢[0] − 5(2)푢[−1] 푦[1] = 5(4) − 6(2) + 5 − 0 푦[1] = 13 Repeat for 푘 = 2, 3, 4, … to generate the solution sequence (푘 ≥ 0) 푦[푘] = 4, 13, 24, 13, −120, … This sequence is identical to the one obtained earlier using the advance formulation. Mathcad numerical solution for the advance operator difference equation (note: press ‘[‘ to input the subscript): Mathcad numerical solution for the delay operator difference equation Note how the above Mathcad solution automatically performs the required iterations to compute the sequence (vector) 푦. Mathcad allows the user to redefine the array origin. For the above delay operator recursion we had to set the origin at −2 in the Math Options menu, as illustrated below. (For the advance formulation solution the array origin has to be set to 0.) Solving for the Complete Response 푦[푘] = 푦푧푠[푘] + 푦푧[푘] using the Z-Transform Method The Z-transform method can be applied to the difference equation to (analytically) generate the complete response. However, if we intend to use it to generate the decoupled response 푦[푘] = 푦푧푠[푘] + 푦푧[푘], we have to make sure that the initial conditions we use are not dependent on the input signal. As pointed out earlier, one of the advance formulation initial conditions (for our example system) is dependent on the input. Therefore, for that advance formulation system the Z-transform method can be applied to generate 푦[푘], but not 푦푧푠[푘] and 푦푧[푘]. On the other hand, the Z- transform method can be used to generate 푦[푘] = 푦푧푠[푘] + 푦푧[푘] for the delay formulation system. Example. Z-transform analysis for the delay formulation system: 푦[푘] − 5푦[푘 − 1] + 6푦[푘 − 2] = 푓[푘 − 1] − 5푓[푘 − 2] 푦[−1] = 2 , 푦[−2] = 1 푓[푘] = (3푘 + 5)푢[푘] We will find 푦푧푠[푘] first by Z-transforming the difference equation, assuming zero initial conditions, to obtain 퐻(푧) and then employ the formula, −1 푦푧푠[푘] = 푍 {퐻(푧)퐹(푧)} But first, we must be clear about the meaning of the shifted signals 푦[푘 − 1] and 푦[푘 − 2]. Do they mean 푦[푘 − 1]푢[푘] and 푦[푘 − 2]푢[푘] or 푦[푘 − 1]푢[푘 − 1] and 푦[푘 − 2]푢[푘 − 2]? Well, since our Z-transform is one-sided it means that we are considering the situation for 푘 ≥ 0. So, every signal is assumed to be causal and is counted from 푘 = 0. Therefore, the terms 푦[푘 − 푚] mean 푦[푘 − 푚]푢[푘], for integer 푚. Transforming (and using the right-shift property) we obtain 1 1 1 푌(푧) − 5 ( 푌(푧) + 푦[−1]) + 6 ( 푌(푧) + 푦[−1] + 푦[−2]) 푧 푧2 푧 1 1 1 = ( 퐹(푧) + 푓[−1]) − 5 ( 퐹(푧) + 푓[−1] + 푓[−2]) 푧 푧2 푧 which, with the requirement that the initial conditions are zero (zero-state) and by noting that 푓[푘] is a causal signal {푓[−1] = 푓[−2] = 0}, reduces to 5 6 1 5 (1 − + ) 푌 (푧) = ( − ) 퐹(푧) 푧 푧2 푧푠 푧 푧2 Next, multiplying the above equation by 푧2, leads to 2 (푧 − 5푧 + 6)푌푧푠(푧) = (푧 − 5)퐹(푧) which has the form 푄(푧)푌푧푠(푧) = 푃(푧)퐹(푧). The transfer function is then, 푌 (푧) 푃(푧) 퐻(푧) ≜ 푧푠 = 퐹(푧) 푄(푧) which results in 푧−5 퐻(푧) = → The poles are at 푧 = 2 , 푧 = 3 (푧−2)(푧−3) 1 2 The system is unstable since |푧| > 1. Before we proceed to solve for 푦푧푠[푘], let us determine the unit-impulse response, ℎ[푘] = 푍−1{퐻(푧)} 퐻(푧) First, perform partial fraction expansion on (say, using Mathcad): 푧 z 5 5 3 2 convert parfrac z z(z 2) (z 3) 6z 2(z 2) 3(z 3) Next, multiply by z and use the table of Z-transforms to find the inverse Z- transform: 3 2 5 푧 푧 퐻(푧) = − + 2 − 3 6 푧 − 2 푧 − 3 5 3 2 ℎ[푘] = − 훿[푘] + (2)푘푢[푘] − (3)푘푢[푘] 6 2 3 The zero-state response 푦푧푠[푘] may now be obtained using convolution sums, 푦푧푠[푘] = ℎ[푘] ∗ 푓[푘] , where 푓[푘] = 3푘푢[푘] + 5푢[푘] [Your turn: Employ the Convolution Table for discrete-time signals, Page 590, to solve for 푦푧푠[푘]. Refer to the last section (last three slides of this lecture) for an example.] Alternatively, we may use the inverse Z-transform to obtain 푦푧푠[푘] as follows, −1 −1 푦푧푠[푘] = 푍 {푌푧푠(푧)} = 푍 {퐻(푧)퐹(푧)} 푧 − 5 푧(5푧 − 2) 푦 [푘] = 푍−1 { } 푧푠 (푧 − 2)(푧 − 3) (푧 − 1)2 where the following transform pair was used to obtain 퐹(푧), 3푧 5푧 푧(5푧 − 2) 푓[푘] = (3푘 + 5)푢[푘] ↔ 퐹(푧) = + = (푧 − 1)2 푧 − 1 (푧 − 1)2 푌 (푧) Your turn: Apply partial fraction expansion to 푧푠 , multiply the result 푧 by 푧, then employ the Z-transform Table to obtain the following result, 35 13 푦 [푘] = (− − 6푘 − (3)푘 + 24(2)푘) 푢[푘] 푧푠 2 2 Next, we solve for the zero-input response, 푦푧[푘].
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages41 Page
-
File Size-