ECE 301 Fall 2011 ivision 1 Homework 5 Solutions Reading: Sections 2.4, 3.1, and 3.2 in the textbook. Problem 1. Suppose system S is initially at rest and satisfies the following input-output difference equation: y[n] 3y[n 1] + 2y[n 2] = x[n] (1) (a) Suppose that the input signal is x where x[n] = δ[n] for all integer n. Show that y[n] = A 2 n u[n] + Bu[n] is a solution to the system for some constants A and B, and calculate these constants. Solution. Substituting x = δ and the given form of y into the difference equation, we get: δ[n] = (A 2 n + B)u[n] 3(A 2 n 1 + B)u[n 1] + 2(A 2 n 2 + B)u[n 2] = (A + B)δ[n] + (2A + B)δ[n 1] 3(A + B)δ[n 1] +(A 2 n + B 3A 2 n 1 3B + 2A 2 n 2 + 2B)u[n 2] = (A + B)δ[n] (A + 2B)δ[n 1] +((4A 6A + 2A)2 n 2 + (B 3B + 2B))u[n 2] = (A + B)δ[n] (A + 2B)δ[n 1] Therefore, we must have A + B = 1 and A + 2B = 0. This means A = 2 and B = 1, and (b) Find the homogeneous solution of Eq. (1). y[n] = 2 n+1 u[n] u[n]. Solution. Guessing y h [n] = Cz n and substituting this into the homogeneous equation, we get Cz n 3Cz n 1 + 2Cz n 2 = 0 Cz n 2 (z 2 3z + 2) = 0 Cz n 2 (z 2)(z 1) = 0 Therefore, the homogeneous solution is y h [n] = C 1 2 n + C 2. (c) Show that the signal y found in Part (a) is the unique solution for the input x = δ under initial rest condition. (Hint. Assume there is another solution y 1 y, argue that then y y 1 satisfies the homogeneous equation, and use the initial rest condition to show that, in fact, y y 1 = 0.) Solution. To show this, suppose that there exists another signal y 1 y that satisfies Eq. (1) and the initial rest condition when the input is x = δ. Then the difference y y 1 must satisfy the homogeneous equation. As shown in Part (b), this means that y[n] y 1 [n] = C 1 2 n +C 2 for all n and for some constants C 1 and C 2. But on the other hand, because both y and y 1 are responses to x = δ under the initial rest condition, we must have that y[n] = 0 for n < 0 and y 1 [n] = 0 for n < 0. Therefore, y[n] y 1 [n] = C 1 2 n + C 2 = 0 for n < 0, which implies C 1 = C 2 = 0 and y = y 1. But this contradicts our assumption that y 1 y. Thus, y is the unique response of the system S to the input signal δ. In other words, y is the impulse response of S. 1
(d) Is S a stable system? Fully justify your answer. Solution. The unit impulse is a bounded signal. The response of S to this signal, found in Part (a), is unbounded. Therefore, the system is unstable. (e) Is S a causal system? Fully justify your answer. Solution. Since S is defined by a linear constant-coefficient difference equation under initial rest, S is a system for which the response to any input is the convolution of the input with the impulse response. Therefore, the system is causal if and only if its impulse response is zero for n < 0. In fact, the impulse response found in Part (a) does satisfy this condition. Therefore, the system is causal. (f) Is S an invertible system? Fully justify your answer. If your answer is yes, what is the impulse response of the inverse of S? If your answer is no, give an example of two distinct input signals that correspond to the same output signal. Solution. The system is invertible. The inverse system satisfies the following input-output equation (here, v is the input and w is the output): w[n] = v[n] 3v[n 1] + 2v[n 2] Its impulse response is h[n] = δ[n] 3δ[n 1] + 2δ[n 2]. To verify that this system is indeed the inverse of S, note that h y[n] = δ[n] where y is the impulse response of S found in Part (a). (g) raw a block diagram of Eq. (1). Use only additions, multiplications by numbers, and unit delay blocks. Solution. We can rewrite the difference equation in Eq. (1) as: y[n] = x[n] + 3y[n 1] 2y[n 2]. Using the above equation, the block diagram of the system is drawn in Fig. 1. x[n] y[n] 3 2 Figure 1: Block diagram of Eq. (1). Problem 2. Suppose system S is initially at rest and satisfies the following input-output differential equation: ÿ(t) 3ẏ(t) + 2y(t) = x(t). (2) Here, ẏ is the derivative of y, and ÿ is the second derivative of y. 2
(a) Find the homogeneous solution of Eq. (2). Solution. Guessing y h (t) = Ae st and substituting this into the homogeneous equation, we get: As 2 e st 3Ase st + 2Ae st = 0 Ae st (s 2 3s + 2) = 0 Ae st (s 2)(s 1) = 0 Therefore, y h (t) = A 1 e t + A 2 e 2t. (b) Find the particular solution of Eq. (2) only for t > 0, for the input x = u, where u is the continuous-time unit step. Solution. We guess a particular solution of the same form as the input, which is a constant for t > 0. So we guess y p (t) = C. Substituting this into the differential equation, we get 2C = 1, or C = 1/2. Therefore, y p (t) = 1/2. (c) Find the overall solution of Eq. (2) only for t > 0, for the input x = u, assuming that the system is initially at rest, and that the solution is continuously differentiable at zero. (Hint. The combination of the initial rest condition and continuous differentiability implies that ẏ(0) = y(0) = 0.) Solution. The overall solution for t > 0 is the sum of the particular solution and the homogeneous solution: y(t) = A 1 e t + A 2 e 2t + 1/2. Using the initial rest condition and the continuous differentiability of the solution, we have the initial conditions ẏ(0) = y(0) = 0: This means that A 1 = 1 and A 2 = 1/2, and A 1 + A 2 + 1/2 = 0 A 1 + 2A 2 = 0 y(t) = e t + (1/2)e 2t + 1/2 for t > 0. (d) Find the impulse response of system S. (Note that system S is assumed to be initially at rest.) Solution. The unit step response was found in part (c): s(t) = ( e t + (1/2)e 2t + 1/2)u(t). The unit impulse response is obtained by differentiating the unit step response: h(t) = ṡ(t) = ( e t + (1/2)e 2t + 1/2)δ(t) + ( e t + e 2t )u(t) = ( e t + e 2t )u(t) 3
(e) Is S stable? Fully justify your answer. Solution. The unit step is a bounded signal. The unit step response, found in Part (c), is unbounded. Therefore, the system is unstable. An alternative justification would be that the impulse response found in Part (d) is not absolutely integrable. This criterion can be used since the system satisfies the convolution relationship. Note that it would be incorrect to justify the answer by simply saying that the impulse response is unbounded, because the continuous-time unit impulse is not a bounded signal. (f) Is S causal? Fully justify your answer. Solution. The system satisfies the convolution relationship and has impulse response h such that h(t) = 0 for t < 0. Therefore, the system is causal. (g) raw a block diagram of Eq. (2), using only additions, multiplications by numbers, and differentiators. Solution. We can rewrite the differential equation in Eq. (2) as: y(t) = 1 3 1 x(t) + 2 2ẏ(t) 2ÿ(t). Using the above equation, the block diagram of the system is drawn in Fig. 2. x(t) 1/2 y(t) 3/2 1/2 Figure 2: Block diagram of Eq. (2) using unit differentiators. (h) raw a block diagram of Eq. (2), using only additions, multiplications by numbers, and integrators. Solution. One possible implementation is shown in Fig. 3. Calling the output to the first integrator w, we have that its input is ẇ. At the same time, its input is x 2y: ẇ = x 2y (3) The output of the second integrator is y. Its input is therefore ẏ. At the same time, the input is w + 3y: ẏ = w + 3y ifferentiating this equation, we get: ÿ = ẇ + 3ẏ 4
Substituting ẇ from Eq. (3), we have: ÿ = x 2y + 3ẏ, which is equivalent to Eq. (2). x(t) y(t) 2 3 Figure 3: Block diagram of Eq. (2) using unit integrators. Problem 3. The response y of a continuous-time system S to any input signal x is given by y(t) = x h(t) for all t, where h is the impulse response of S. It is known that h(τ)e 3jτ dτ = 2, and (4) h(τ)dτ = 1. (5) Nothing else is known about h. For each input signal below, either find the response of system S to that input signal, or explain why this response cannot be determined. (a) x 1 (t) = e 3jt (b) x 2 (t) = 1 (c) x 3 (t) = sin(3t) (d) x 4 (t) = 2e 3jt + 3 Solution. Signal x 1 is a complex exponential and therefore is an eigenfunction of system S. The corresponding eigenvalue is given in Eq. (4). Therefore, the response to x 1 is y 1, given by y 1 (t) = 2e 3jt for all t. Signal x 2 is also a complex exponential, since it can be written as x 2 (t) = 1 = e 0jt. It is therefore also an eigenfunction, and its eigenvalue is given in Eq. (5). Hence, the response to x 2 is y 2, given by y 2 (t) = 1 for all t. Signal x 3 is not an eigenfunction; however, it can be represented as a sum of two eigenfunctions: sin(3t) = 1 2j (e3jt e 3jt ). 5
We are given the eigenvalue corresponding to e 3jt ; however, we are not given the eigenvalue corresponding to e 3jt. Therefore, we cannot determine the response of the system to x 3. If the eignvalue corresponding to e 3jt is some finite number A, then the form of this response is 1 2j (2e3jt Ae 3jt ), where A = h(τ)e 3jτ dτ If this integral diverges, then A is undefined, and the response of the system to x 3 is also undefined. Finally, x 4 is a linear combination of x 1 and x 2, namely, x 4 = 2x 1 + 3x 2. Since the system is linear, the respose to x 4 is the same linear combination of the responses to x 1 and x 2 : y(t) = 2y 1 (t) + 3y 2 (t) = 4e 3jt + 3. Problem 4. The response y of a discrete-time system S to any input signal x is given by y[n] = x h[n] for all integer n, where h is the impulse response of S. It is known that h[k]j k = 3, and (6) k= k= h[k]j k = 3. (7) Nothing else is known about h. For each input signal below, either find the response of system S to that input signal, or explain why this response cannot be determined. (a) x 1 [n] = j n (b) x 2 [n] = j n (c) x 3 [n] = cos(πn/2) (d) x 4 [n] = 1 Solution. Signals x 1 and x 2 are both complex exponentials and hence eigenfunctions of S. Their respective eigenvalues happen to be given in Eqs. (6) and (7). Therefore, the respective responses to x 1 and x 2 are y 1 and y 2, given by y 1 [n] = 3j n and y 2 [n] = 3j n. Since cos(πn/2) = (e jπn/2 + e jπn/2 )/2 = (j n + j n )/2, we have that x 3 = (x 1 + x 2 )/2, and hence y 3 [n] = (y 1 [n] + y 2 [n])/2 = 3/2(j n + j n ). Finally, x 4 is an eigenfunction with eigenvalue A = k= which is not given to us. Therefore, the response y 4 to x 4 has the form y 4 [n] = A; however, we cannot determine the constant A based on the given information. Note that this response only exists if the infinite sum defining A converges. h[k], 6