EE-20. Signals and Systems Homework 7 Solutions Spring 200 Exercise Due Date th May. Problems Q Let H be the causal system described by the difference equation w[n] = 7 w[n ] 2 2 w[n 2] + x[n ] x[n 2] 2 x[n] w[n] y[n] H H 2 Figure : Q (a) Determine the system H 2 Fig. so that y[n] = x[n]. Is the inverse system H 2 causal? Solution H 2 (z) = H (z). Not causal. (b) Determine the system H 2 Fig. so that y[n] = x[n ]. Is the inverse system H 2 causal? Solution H 2 (z) = z H. Causal. (z) (c) Determine the difference equation for system H 2 in part (a) and (b) Solution i. y[n] = 7 y[n ] + w[n + ] 2 2 w[n] + w[n ] 2 ii. y[n] = 2 y[n ] + w[n] 7 2 w[n ] + w[n 2] 2 Q2 Let y(k) = sin (ωkt ), determine a so that y satisfies the difference equation y(k) ay(k ) + y(k 2) = 0 LUMS School of Science & Engineering, Lahore, Pakistan.
Solution if ω = 0 and/or T = 0, a can take any value. Otherwise, consider the characteristic equation. z 2 az + = z = a a 2 2 ± 4 = a 2 ± j a2 4 = e±jωt = cos ωt ± j sin ωt We get a = 2cosωT Q3 (a) Determine the circular convolution between x[n] = {,, 0, 0} and y[n] = {,,, } for N=4. Where α represents the value of signal at n = 0 Verify the result by using 4-point DFT and IDFT. Solution r[n] = { 2, 2, 2, 2} (b) If you want to calculate the linear convolution of x[n] = {, } and y[n] = {,, } using the fast Fourier transform (FFT). What is required minimum number of data points N in the FFT calculation? Solution N=4 Q4 Determine all possible signals x[n] and corresponding ROC associated with the two-sided z-transform 5z X(z) = ( 2z )(3 z ) Solution Partial fraction expansion gives X (z) X 2 (z) x[n] is given by X(z) = 5z ( 2z )(3 z ) = 2z }{{ } X (z) x = 2 n u(n), ROC = z > 2, x 2 = 2 n u( n ), ROC 2 = z < 2, x 2 = ( 3 )n u(n), ROC 2 = z > 3, x 2 = ( 3 )n u( n ), ROC 22 = z < 3, + 3 z }{{} X 2(z) x[n] = x i [n] + x 2j [n], ROC = ROC i ROC 2j Combinations with non-empty ROC are: x[n] = [2 n (/3) n ]u[n], ROC = z > 2, x[n] = 2 n u[ n ] (/3) n u[n], ROC = /3 < z < 2, x[n] = [ 2 n + (/3) n ]u[ n ], ROC = z < /3. 2
Q5 (a) The transfer function of a filter is and is valid of z < 4. Is the filter i. causal? - NO ii. stable? - YES H(z) = z + 4 (b) Find the stable impulse response of a system with the transfer function H(z) = (z 4)(z 0.) Solution Also, calculate the ROC where the expression is valid. H(z) = (z 4)(z 0.) = 0 39 [ z 4 z 0. ] = 0 39 [ /4 z/4 z 0.z ] = 0 (z/4) k 0 56 39 z (0.z ) k = 0 56 k=0 k= k=0 0 (4) k z k 00 (0.) k z k 39 k= But H(z)= k= h[k]z k, therefore { (0/56)4 k k 0 h[k] = (00/39)0. k k > 0 Region of Convergence: 0. < z < 4 Q6 Let x[n] and y[n] be two sequences with x[n] = 0 for n < 0, n 8 y[n] = 0 for n < 0, n 20 A 20-point DFT is performed on x[n] and y[n]. The two DFT s are multiplied and an inverse DFT is performed resulting in new sequence r[n]. (a) Which elements of r[n] correspond to a linear convolution of x[n] and y[n]? Solution The elements r[n], n = 0,..., 6 will be incorrect. The elements r[n], n = 7,..., 9 will be correct (b) How should the procedure be changed so that all elements of r[n] correspond to linear convolution of x[n] and y[n]? 3
Solution The error is caused by the 7 last values of y. This issue can be resolved by increasing the length of the sequences and the length of the DFTs to 27 by adding zeros. Q7 A signal is fed to a system that down-sample the input signal by factor D. The input and output are related by the equation y[n] = {..., x[0], x[d], x[2d], x[3d], x[4d],...} = x[nd] n = 0, ±, ±2, ±3,... (a) Find the DTFT of y[n] Solution First, define the signal x[k] = { x[n] n = 0, ±D, ±2D 0 otherwise which contains only the samples that will be left in the downsampled signal. Then, where, Y (f) = Y (f) = m= y(m)e j2πfm x[k] = y(m) if n = Dm x[k] = 0 m= otherwise x[n]e j2πfn/d = X( f D ) () In order to find an expression for X(f), define the selection function { n = 0, ±D, ±2D s[n] = 0 otherwise and note that s[n] can be written in the form s[n] = D k=0 e j2πkn/d 4
Solution Since x[n] = s[n]x[n], we get Putting eq. 2 in eq. X(f) = (b) Find the z-transform of y[n] = = D = D = D n= n= x[n]e j2πnf s[n]x[n]e j2πnf n= n=0 n=0 n= n=0 Y (f) = D Y (f) = D e j2πkn/d x[n]e j2πfn x[n]e j2πn(f k/d) X(f k D ) (2) n=0 n=0 X( f k D ) X(z /D e j2πk/d ) (c) By removing samples in down-sampling, some information is lost. This loss of information will lead to aliasing problems. Find H(f) so that aliasing can be avoided. x[n] H(f) D y[n] Figure 2: Q8 Solution H(f) = = HINT DTFT: X(f) = n= x[n]e j2πfn {, f = /2D 0, /2D < f /2 Y (f) = D X( f D ) f 2 5
x[m] U H(f) D y[n] Figure 3: Q8 Q8 Consider the system in Fig. 8. If U and D are prime integers, find H(f) so that aliasing can be avoided. Also find Y (f). Solution { U, f min [ H(f) = 2U, 2D ] 0, min [ 2U, 2D ] < f 2 = { U Y (f) = D X(f U D ), f min [ 2, D 2U ] 0, otherwise Q9 If the filter h[n] = {,0,0,5,0,0,3}, find g[n] such that both systems in Fig. 9 produce the same output. x[n] h[n] 2 3 y[m] x[n] 2 3 g[n] y[m] Figure 4: Q9 Solution H(z)= + 5z 3 + 3z 6. The equivalent diagram is x[m] 2 f[n] 3 y[n] for first system to be equivalent to this system, F (z) = H(z 2 ) = + 5z 6 + 3z 2 similarly the second system is equivalent to this system if, G(z 3 ) = F (z) G(z) = + 5z 2 + 3z 4 g[n] = {, 0, 5, 0, 3} Note that it is impossible to make the two systems equivalent if, for example, h[n] = {, 0, 3, 4} 6