SOLUTIONS MANUAL for Extra Homework Problems from Companion Website Discrete-Time Signal Processing, 3e by Alan V. Oppenheim and Ronald W. Schafer Prepared by B. A. Black, L. Lee, J. Rosenthal, M. Said, and G. Slabaugh Solutions – Chapter 2 Discrete-Time Signals and Systems 1 2.1. We use the graphical approach to compute the convolution: y[n] = x[n] ∗ h[n] ∞ X = x[k]h[n − k] k=−∞ (a) y[n] = x[n] ∗ h[n] y[n] = δ[n − 1] ∗ h[n] = h[n − 1] 2 1 0 1 2 3 2 -1 n (b) y[n] = x[n] ∗ h[n] 5 0 1 -2 n (c) y[n] = x[n] ∗ h[n] 5 5 5 4 5 4 4 3 3 2 2 4 3 2 3 2 2 1 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 (d) y[n] = x[n] ∗ h[n] 3 3 2 1 -2 1 1 -1 0 1 2 3 4 5 -1 2.2. The response of the system to a delayed step: y[n] = = = x[n] ∗ h[n] ∞ X x[k]h[n − k] k=−∞ ∞ X k=−∞ 2 u[k − 4]h[n − k] 6 n n y[n] = ∞ X k=4 Evaluating the above summation: For For For For For For For n < 4: n = 4: n = 5: n = 6: n = 7: n = 8: n ≥ 9: h[n − k] y[n] = 0 y[n] = h[0] = 1 y[n] = h[1] + h[0] = 2 y[n] = h[2] + h[1] + h[0] = 3 y[n] = h[3] + h[2] + h[1] + h[0] = 4 y[n] = h[4] + h[3] + h[2] + h[1] + h[0] = 2 y[n] = h[5] + h[4] + h[3] + h[2] + h[1] + h[0] = 0 2.3. The output is obtained from the convolution sum: y[n] = x[n] ∗ h[n] ∞ X = x[k]h[n − k] k=−∞ ∞ X = k=−∞ x[k]u[n − k] The convolution may be broken into five regions over the range of n: y[n] = 0, for n < 0 n X y[n] = ak k=0 1 − a(n+1) , for 0 ≤ n ≤ N1 1−a = y[n] = N1 X ak k=0 1 − a(N1 +1) , for N1 < n < N2 1−a = y[n] = N1 X ak + k=0 = = n X a(k−N2 ) k=N2 (N1 +1) 1−a 1 − a(n+1) + 1−a 1−a (N1 +1) (n+1) 2−a −a , for N2 ≤ n ≤ (N1 + N2 ) 1−a y[n] = N1 X k a + k=0 = N1 X k=0 NX 1 +N2 a(k−N2 ) k=N2 ak + X m=0 3 N 1 am = 2 N1 X ak k=0 = 2· 1 − a(N1 +1) 1−a , for n > (N1 + N2 ) 2.4. Recall that an eigenfunction of a system is an input signal which appears at the output of the system scaled by a complex constant. (a) x[n] = 5n u[n]: ∞ X y[n] = k=−∞ ∞ X = h[k]x[n − k] h[k]5(n−k) u[n − k] k=−∞ n X n = h[k]5−k 5 k=−∞ Becuase the summation depends on n, x[n] is NOT AN EIGENFUNCTION. (b) x[n] = ej2ωn : ∞ X y[n] = h[k]ej2ω(n−k) k=−∞ = ej2ωn = e j2ωn ∞ X h[k]e−j2ωk k=−∞ j2ω · H(e ) YES, EIGENFUNCTION. (c) ejωn + ej2ωn : y[n] = ∞ X ∞ X h[k]ejω(n−k) + k=−∞ h[k]ej2ω(n−k) k=−∞ ∞ X ∞ X = ejωn = ejωn · H(ejω ) + ej2ωn · H(ej2ω ) h[k]e−jωk + ej2ωn k=−∞ h[k]e−j2ωk k=−∞ Since the input cannot be extracted from the above expression, the sum of complex exponentials is NOT AN EIGENFUNCTION. (Although, separately the inputs are eigenfunctions. In general, complex exponential signals are always eigenfunctions of LTI systems.) (d) x[n] = 5n : y[n] = ∞ X h[k]5(n−k) k=−∞ ∞ X n = 5 k=−∞ YES, EIGENFUNCTION. 4 h[k]5−k (e) x[n] = 5n ej2ωn : y[n] = ∞ X h[k]5(n−k) ej2ω(n−k) k=−∞ = ∞ X 5n ej2ωn h[k]5−k e−j2ωk k=−∞ YES, EIGENFUNCTION. 2.5. • System A: 1 x[n] = ( )n 2 This input is an eigenfunction of an LTI system. That is, if the system is linear, the output will be a replica of the input, scaled by a complex constant. Since y[n] = ( 14 )n , System A is NOT LTI. • System B: x[n] = ejn/8 u[n] The Fourier transform of x[n] is ∞ X X(ejω ) = ejn/8 u[n]e−jωn n=−∞ ∞ X −j(ω− 81 )n = e n=0 1 = 1− 1 e−j(ω− 8 ) The output is y[n] = 2x[n], thus . 2 Y (ejω ) = 1− Therefore, the frequency response of the system is H(ejω ) = = 1 e−j(ω− 8 ) . Y (ejω ) X(ejω ) 2. Hence, the system is a linear amplifier. We conclude that System B is LTI, and unique. • System C: Since x[n] = ejn/8 is an eigenfunction of an LTI system, we would expect the output to be given by y[n] = γejn/8 , where γ is some complex constant, if System C were indeed LTI. The given output, y[n] = 2ejn/8 , indicates that this is so. Hence, System C is LTI. However, it is not unique, since the only constraint is that H(ejω )|ω=1/8 = 2. 5 2.6. (a) The homogeneous solution yh [n] solves the difference equation when x[n] = 0. It is in the form P yh [n] = A(c)n , where the c’s solve the quadratic equation c2 + 2 1 c− =0 15 5 So for c = 1/3 and c = −2/5, the general form for the homogeneous solution is: 2 1 yh [n] = A1 ( )n + A2 (− )n 3 5 (b) We use the z-transform, and use different ROCs to generate the causal and anti-causal impulses responses: 1 5/11 6/11 H(z) = 1 −1 1 −1 + 2 −1 = (1 − 3 z )(1 + 5 z ) 1 − 3z 1 + 25 z −1 6 2 5 1 n ( ) u[n] + (− )n u[n] hc [n] = 11 3 11 5 5 1 n 6 2 hac [n] = − ( ) u[−n − 1] − (− )n u[−n − 1] 11 3 11 5 (c) Since hc [n] is causal, and the two exponential bases in hc [n] are both less than 1, it is absolutely summable. hac [n] grows without bounds as n approaches −∞. (d) Y (z) = X(z)H(z) 1 1 · 1 − 35 z −1 (1 − 13 z −1 )(1 + 52 z −1 ) 55/12 27/20 −25/44 + + −1 −1 1 − 1/3z 1 + 2/5z 1 − 3/5z −1 −25 1 n 55 2 27 3 ( ) u[n] + (− )n u[n] + ( )n u[n] 44 3 12 5 20 5 = = y[n] = 2.7. We first re-write the system function H(ejω ): H(ejω ) = ejπ/4 · e−jω 1 + e−j2ω + 4e−j4ω 1 + 12 e−j2ω = ejπ/4 G(ejω ) Let y1 [n] = x[n] ∗ g[n], then x[n] πn ejπn/2 + e−jπn/2 )= 2 2 G(ejπ/2 )ejπn/2 + G(e−jπ/2 )e−jπn/2 2 = cos( y1 [n] = Evaluating the frequency response at ω = ±π/2: π π 1 + e−jπ + 4e−j2π = 8e−jπ/2 G(ej 2 ) = e−j 2 1 + 12 e−jπ π G(e−j 2 ) = 8ejπ/2 Therefore, and π π y1 [n] = (8ej(πn/2−π/2) + 8ej(−πn/2+π/2) )/2 = 8 cos( n − ) 2 2 π π y[n] = ejπ/4 y1 [n] = 8ejπ/4 cos( n − ) 2 2 6 2.8. (a) Notice that Since the system is LTI, x[n] = x0 [n − 2] + 2x0 [n − 4] + x0 [n − 6] y[n] = y0 [n − 2] + 2y0 [n − 4] + y0 [n − 6], and we get sequence shown here: 2 1 0 1 2 3 4 5 6 7 8 -1 -2 (b) Since y0 [n] = −1x0 [n + 1] + x0 [n − 1] = x0 [n] ∗ (−δ[n + 1] + δ[n − 1]), h[n] = −δ[n + 1] + δ[n − 1] 2.9. For (−1 < a < 0), we have X(ejω ) = (a) real part of X(ejω ): XR (ejω ) 1 1 − ae−jω 1 · [X(ejω ) + X ∗ (ejω )] 2 1 − a cos(ω) 1 − 2a cos(ω) + a2 = = (b) imaginary part: XI (ejω ) = = 1 · [X(ejω ) − X ∗ (ejω )] 2j −a sin(ω) 1 − 2a cos(ω) + a2 (c) magnitude: 1 |X(ejω )| = [X(ejω )X ∗ (ejω )] 2 12 1 1 − 2acos(ω) + a2 = (d) phase: 6 jω X(e ) = arctan −a sin(ω) 1 − a cos(ω) 2.10. x[n] can be rewritten as: x[n] = = = 5πn ) 2 πn cos( ) 2 πn πn ej 2 e−j 2 + . 2 2 cos( 7 We now use the fact that complex exponentials are eigenfunctions of LTI systems, we get: πn y[n] = = = πn −j 2 π e ej 2 + ej 8 2 2 πn πn π π e−j( 2 − 8 ) ej( 2 − 8 ) + 2 2 1 π cos( (n − )). 2 4 π e−j 8 2.11. First x[n] goes through a lowpass filter with cutoff frequency 0.5π. Since the cosine has a frequency of 0.6π, it will be filtered out. The delayed impulse will be filtered to a delayed sinc and the constant will remain unchanged. We thus get: w[n] = 3 sin(0.5π(n − 5)) + 2. π(n − 5) y[n] is then given by: y[n] = 3 sin(0.5π(n − 5)) sin(0.5π(n − 6)) −3 . π(n − 5) π(n − 6) 2.12. Since system 1 is memoryless, it is time invariant. The input, x[n] is periodic in ω, therefore w[n] will also be periodic in ω. As a consequence, y[n] is periodic in ω and so is A. 8 Solutions – Chapter 3 The z-Transform 9 3.1. (a) H(z) = = = h[n] = 1 − 21 z −2 (1 − 12 z −1 )(1 − 41 z −1 ) 5 + 72 z −1 1 − 34 z −1 + 81 z −2 2 7 −4 − + 1 − 12 z −1 1 − 14 z −1 n n 1 1 −4δ[n] − 2 u[n] + 7 u[n] 2 4 −4 + (b) 1 1 3 y[n] − y[n − 1] + y[n − 2] = x[n] − x[n − 2] 4 8 2 3.2. 3 − 7z −1 + 5z −2 1 3 =5+ − 5 −1 −1 −2 1 − 2z 1 − 2z + z 1 − 21 z −1 n 1 n u[n] h[n] stable ⇒ h[n] = 5δ[n] − 2 u[−n − 1] − 3 2 H(z) = (a) y[n] = = = h[n] ∗ x[n] = n X h[k] k=−∞ n X − 2k = −2n+1 k=−∞ n<0 k n −1 n X X 1 − ( 21 )n+1 1 1 k =4−3 2 +5− 3 = −2 + 3 1 − 2 2 1 − 2 k−∞ k=0 n 1 −2u[n] + 3 u[n] − 2n+1 u[−n − 1] 2 n≥0 (b) 1 1 1 1 H(z) = −2 +2 +3 , 1 − z −1 1 − z −1 1 − 2z −1 1 − 12 z −1 n 1 n y[n] = −2u[n] − 2(2) u[−n − 1] + 3 u[n] 2 Y (z) = 3.3. Y (z) = 2 z −1 + z −2 · + 31 z −1 ) 1 − z −1 (1 − 1 −1 )(1 2z Therefore using a contour C that lies outside of |z| = 1 we get I 1 2(z + 1)z n dz y[1] = 2πj C (z − 12 )(z + 13 )(z − 1) = = |z| > 1 2(− 13 + 1)(− 31 ) 2( 21 + 1)( 12 ) 2(1 + 1)(1) + + 1 1 1 1 1 1 ( 2 + 3 )( 2 − 1) (− 3 − 2 )(− 3 − 1) (1 − 12 )(1 + 31 ) 18 2 − − +6=2 5 5 10 1 < |z| < 2 2 3.4. (a) X(z) = 1 2 )(z (z − z 10 + 23 )2 (z + 52 )(z + 27 ) 3 10 2 ) (z − Stable ⇒ ROC includes |z| = 1. Therefore, the ROC is 21 < |z| < 23 . (b) x[−8] = Σ[residues of X(z)z −9 inside C], where C is contour in ROC (say the unit circle). z inside unit circle x[8] = Σ residues of (z − 12 )(z − 32 )10 (z + 32 )2 (z + 25 )(z + 72 ) First order pole at z = 1 2 is only one inside the unit circle. Therefore x[−8] = ( 12 − 3 10 1 2) (2 + 1 2 3 2 1 2) (2 + 25 )( 12 + 27 ) = 1 96 3.5. (a) X(z) = 4 − 31 3 + 1 − 2z −1 1 − 12 z −1 The ROC is 12 < |z| < 2. (b) The following figure shows the pole-zero plot of Y (z). Since X(z) has poles at 0.5 and 2, the poles at 1 and -0.5 are due to H(z). Since H(z) is causal, its ROC is |z| > 1. The ROC of Y (z) must contain the intersection of the ROC of X(z) and the ROC of H(z). Hence the ROC of Y (z) is 1 < |z| < 2. Pole−zero plot of Y(z) 1.5 Imaginary part 1 0.5 0 −1 −0.5 1 2 −0.5 −1 −1.5 −1 −0.5 0 0.5 1 Real part 1.5 2 (c) H(z) = = = = Y (z) X(z) 1+z −1 (1−z −1 )(1+ 12 z −1 )(1−2z −1 ) 1 (1−12z −1 )(1−2z −1 ) (1 + z −1 )(1 − 12 z −1 ) (1 − z −1 )(1 − 12 z −1 ) 2 − 32 3 1+ + 1 − z −1 1 + 21 z −1 Taking the inverse z-transform, we find 2 2 1 h[n] = δ[n] + u[n] − (− )n u[n] 3 3 2 (d) Since H(z) has a pole on the unit circle, the system is not stable. 11 Solutions – Chapter 4 Sampling of Continuous-Time Signals 12 4.1. (a) Keeping in mind that after sampling, ω = ΩT , the Fourier transform of x[n] is ω X c( j Ω) Ω1 X (e j ) Ω2 −π Ω Ω1 π Ω2 π ω (b) A straight-forward application of the Nyquist criterion would lead to an incorrect conclusion that the sampling rate is at least twice the maximum frequency of xc (t), or 2Ω2 . However, since the spectrum is bandpass, we only need to ensure that the replications in frequency which occur as a result of sampling do not overlap with the original. (See the following figure of Xs (jΩ).) Therefore, we only need to ensure 2π 2π < Ω1 =⇒ T < Ω2 − T ∆Ω X s(j Ω ) Ω1 > Ω 2− 2π Τ Ω2 Ω (c) The block diagram along with the frequency response of h(t) is shown here: x[n] convert sequence to impulse train bandpass filter h(t) Ω1 4.2. (a) ω = ΩT, T = 2π Ω0 X(e jω ) 1/Τ −π π ω 13 Ω2 x(t) Ω (b) To recover simply filter out the undesired parts of X(ejω ). x[n] Bandpass Filter xc (t) T −2π /T −π /T π/T 2π /T Ω (c) 2π Ω0 T ≤ 4.3. First we show that Xs (ejω ) is just a sum of shifted versions of X(ejω ): x[n], n = M k, k = 0, ±1, ±2 xs [n] = 0, otherwise ! M−1 1 X j(2πkn/M) e x[n] = M k=0 Xs (ejω ) = ∞ X xs [n]e−jωn n=−∞ = = = M−1 1 X x[n]ej(2πkn/M) e−jωn M n=−∞ ∞ X 1 M 1 M k=0 M−1 X ∞ X x[n]e−j[ω−(2πk/M)]n k=0 n=−∞ M−1 X k=0 X ej[ω−(2πk/M)] Additionally, Xd (ejω ) is simply Xs (ejω ) with the frequency axis expanded by a factor of M : Xd (ejω ) = = ∞ X Xs [M n]e−jωn n=−∞ ∞ X xs [l]e−j(ω/M)l l=−∞ = Xs ej(ω/M) (a) (i) Xs (ejω ) and Xd (ejω ) are sketched below for M = 3, ωH = π/2. 14 X s (e j ω ) 1/3 −π −2π/3 −π/2 −2π jω π/22π/3 j ω X d (e ) 1/3 −π π π 2π ω ω jω (ii) Xs (e ) and Xd (e ) are sketched below for M = 3, ωH = π/4. X s (e j ω ) 1/3 −π/4 −π −2π/3 −2π π/4 X d (e j ω ) 1/3 −π 2π/3 π 2π π ω ω (b) From the definition of Xs (ejω ), we see that there will be no aliasing if the signal is bandlimited to π/M . In this problem, M = 3. Thus the maximum value of ωH is π/3. 4.4. Parseval’s Theorem: ∞ X n=−∞ |x[n]|2 = 1 2π Z π |X(ejω )|2 dω −π When we upsample, the added samples are zeros, so the upsampled signal xu [n] has the same energy as the original x[n]: ∞ ∞ X X |x[n]|2 = |xu [n]|2 , n=−∞ n=−∞ |X(ejω )|2 dω = 1 2π and by Parseval’s theorem: 1 2π Z π −π Z π −π |Xu (ejω )|2 dω. Hence the amplitude of the Fourier transform does not change. When we downsample, the downsampled signal xd [n] has less energy than the original x[n] because some samples are discarded. Hence the amplitude of the Fourier transform will change after downsampling. 15 4.5. (a) Yes, the system is linear because each of the subblocks is linear. The C/D step is defined by x[n] = xc (nT ), which is clearly linear. The DT system is an LTI system. The D/C step consists of converting the sequence to impulses and of CT LTI filtering, both of which are linear. (b) No, the system is not time-invariant. For example, suppose that h[n] = δ[n], T = 5 and xc (t) = 1 for −1 ≤ t ≤ 1. Such a system would result in x[n] = δ[n] and yc (t) = sinc(π/5). Now suppose we delay the input to be xc (t − 2). Now x[n] = 0 and yc (t) = 0. 4.6. We can analyze the system in the frequency domain: X(e jω ) 2 X(e 2jω ) H1 (e jω ) X(e2jω )H1 (e jω ) 2 Y1 (e jω ) Y1 (ejω ) is X(e2jω )H1 (ejω ) downsampled by 2: o 1n X(e2jω/2 )H1 (ejω/2 ) + X(e(2j(ω−2π)/2 )H1 (ej(ω−2π)/2 ) Y1 (ejω ) = 2 o ω 1n X(ejω )H1 (ejω/2 ) + X(ej(ω−2π) )H1 (ej( 2 −π) ) = 2 o ω 1n H1 (ejω/2 ) + H1 (ej( 2 −π) ) X(ejω ) = 2 = H2 (ejω )X(ejω ) o ω 1n H1 (ejω/2 ) + H1 (ej( 2 −π) ) H2 (ejω ) = 2 4.7. Xc (jΩ) = 0 |Ω| ≥ 4000π Y (jΩ) = |Ω|Xc (jΩ), 1000π ≤ |Ω| ≤ 2000π Since only half the frequency band of Xc (jΩ) is needed, we can alias everything past Ω = 2000π. Hence, T = 1/3000 s. Now that T is set, figure out H(ejω ) band edges. ω 1 = Ω1 T ⇒ ω1 = 2π · 500 · ω 2 = Ω2 T ⇒ ω2 = 2π · 1000 · jω H(e ) = 1 3000 π 3 2π ⇒ ω2 = 3 ⇒ ω1 = 1 3000 |ω| π3 ≤ |ω| ≤ 2π 3 0 0 ≤ |ω| < π3 , 2π 3 < |ω| ≤ π 4.8. Xc (jΩ) = 0, yr (t) = Z |Ω| > π T t xc (τ )dτ =⇒ Hc (jΩ) = −∞ In discrete-time, we want H(ejω ) = 1 jω , 0, 16 −π ≤ ω ≤ π otherwise 1 jΩ |H(e jω )| −2π −π −2π π jω arg(H(e )) −π 2π ω π 2π ω −π 4.9. (a) The highest frequency is π/T = π × 10000. Magnitude Response (dB) 10 0 −10 −20 −30 −40 −50 −60 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 Normalized frequency (Nyquist == 1) 0.6 0.8 1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 Normalized frequency (Nyquist == 1) 0.6 0.8 1 Phase (degrees) 100 50 0 −50 −100 −1 (b) (c) To filter the 60Hz out, ω0 = T Ω = 3π 1 · 2π · 60 = 10, 000 250 4.10. (a) Since there is no aliasing involved in this process, we may choose T to be any value. Choose T = 1 for simplicity. Xc (jΩ) = 0, |Ω| ≥ π/T . Since Yc (jΩ) = Hc (jΩ)Xc (jΩ), Yc (jΩ) = 0, |Ω| ≥ π/T . Therefore, there will be no aliasing problems in going from yc (t) to y[n]. Recall the relationship ω = ΩT . We can simply use this in our system conversion: H(ejω ) = H(jΩ) = e−jω/2 e−jΩT /2 = e−jΩ/2 , T =1 Note that the choice of T and therefore H(jΩ) is not unique. (b) cos π 5π n− 2 4 = = i 5π π 1 h j( 5π n− π ) 4 + e−j( 2 n− 4 ) e 2 2 1 −j(π/4) j(5π/2)n 1 j(π/4) −j(5π/2)n e e + e e 2 2 17 Since H(ejω ) is an LTI system, we can find the response to each of the two eigenfunctions separately. 1 1 y[n] = e−j(π/4) H ej(5π/2) ej(5π/2)n + ej(π/4) H e−j(5π/2) e−j(5π/2)n 2 2 Since H(ejω ) is defined for 0 ≤ |ω| ≤ π we must evaluate the frequency at the baseband, i.e., 5π/2 ⇒ 5π/2 − 2π = π/2. Therefore, 1 −j(π/4) j(5π/2) j(5π/2)n 1 j(π/4) −j(5π/2) −j(5π/2)n e + e e e H e H e y[n] = 2 2 1 j[(5π/2)n−(π/2)] = e + e−j[(5π/2)n−(π/2)] 2 π 5π n− = cos 2 2 y[n] 1 n 0 -1 4.11. The frequency response H(ejω ) = Hc (jΩ/T ). Finding that Hc (jΩ) = H(ejω ) = = 1 , (jΩ)2 + 4(jΩ) + 3 1 (10jω)2 + 4(10jω) + 3 1 2 −100ω + 3 + 40jω 1 4.12. (a) Since ΩT = ω, (2π · 100)T = π2 ⇒ T = 400 (b) The downsampler has M = 2. Since x[n] is bandlimited to frequency axis simply expands by a factor of 2. For yc (t) = xc (t) ⇔ Yc (jΩ) = Xc (jΩ). 1 . Therefore ΩT 0 ⇒ 2π · 100T 0 ⇒ T 0 = 200 π M, there will be no aliasing. The 4.13. In both systems, the speech was filtered first so that the subsequent sampling results in no aliasing. Therefore, going s[n] to s1 [n] basically requires changing the sampling rate by a factor of 3kHz/5kHz = 3/5. This is done with the following system: s[n] 3 Digital LPF cutoff = π/3 gain = 3 s1[n] 5 4.14. Xc (jΩ) is drawn below. X c (j Ω ) 1/T Ω 18 xc (t) is sampled at sampling period T , so there is no aliasing in x[n]. X(e j ω ) 1/T −π π ω Inserting L − 1 zeros between samples compresses the frequency axis. V(e j ω ) 1/LT −π/ L π/L ω jω The filter H(e ) removes frequency components between π/L and π. W(e j ω ) 1/LT −π/ L π/L ω n The multiplication by (−1) shifts the center of the frequency band from 0 to π. Y(e j ω ) 1/LT −π π ω The D/C conversion maps the range −π to π to the range −π/T to π/T . Y c (j Ω ) 1/L −π L/T 4.15. (a) π L/T h[n] = 0, Ω |n| > (RL − 1) Therefore, for causal system delay by RL − 1 samples. (b) General interpolator condition: h[0] = 1 h[kL] = 0, k = ±1, ±2, . . . (c) (RL−1) y[n] = X k=−(RL−1) h[k]v[n − k] = h[0]v[n] + RL−1 X This requires only RL-1 multiplies, (assuming h[0] = 1.) 19 k=1 h[n](v[n − k] + v[n + k]) (d) n+(RL−1) y[n] = X k=n−(RL−1) v[k]h[n − k] If n = mL (m an integer), then we don’t have any multiplications since h[0] = 1 and the other non-zero samples of v[k] hit at the zeros h[n]. Otherwise the impulse response spans 2RL − 1 samples of v[n], but only 2R of these are non-zero. Therefore, there are 2R multiplies. 4.16. (a) See figures below. (b) From part(a), we see that Yc (jΩ) = Xc (j(Ω − 2π 2π )) + Xc (j(Ω + )) T T Therefore, yc (t) = 2xc (t) cos( 1/T 2π t) T X(e j ω ) −π 1/T −5π/4 −3π/4 −π/4 −3π/4 −π/4 −3π/Τ 3π/4 5π/4 ω Y e(e jω ) π/4 1 ω X e(e jω ) π/4 4/T π 3π/4 ω Y c(j Ω) −π/Τ π/Τ 3π/Τ Ω 4.17. (a) The Nyquist criterion states that xc (t) can be recovered as long as 2π 1 ≥ 2 × 2π(250) =⇒ T ≤ . T 500 In this case, T = 1/500, so the Nyquist criterion is satisfied, and xc (t) can be recovered. (b) Yes. A delay in time does not change the bandwidth of the signal. Hence, yc (t) has the same bandwidth and same Nyquist sampling rate as xc (t). 20 (c) Consider first the following expressions for X(ejω ) and Y (ejω ): 1 1 Xc (jΩ) |Ω= ω = Xc (j500ω) T T 500 1 1 Yc (jΩ) |Ω= ω = e−jΩ/1000 Xc (jΩ) |Ω= ω T T T T 1 −jω/2 e Xc (j500ω) 500 e−jω/2 X(ejω ) X(ejω ) = Y (ejω ) = = = Hence, we let H(ejω ) = 2e−jω , |ω| < π2 0, otherwise Then, in the following figure, R(ejω ) W (ejω ) Y (ejω ) x[n] 2 = X(ej2ω ) −jω 2e X(ej2ω ), = 0, |ω| < π2 otherwise = e−jω/2 X(ejω ) r[n] H w[n] 2 y[n] (d) Yes, from our analysis above, H2 (ejω ) = e−jω/2 4.18. (a) Notice first that 3 Fc (jΩ)|Haa (jΩ)|e−jΩ , |Ω| ≤ 400π 3 Xc (jΩ) = E (jΩ)|Haa (jΩ)|e−jΩ , 400π ≤ |Ω| ≤ 800π c 0, otherwise For the given T = 1/800, there is no aliasing from the C/D conversion. Hence, the equivalent CT transfer function Hc (jΩ) can be written as H(ejω )|ω=ΩT , |Ω| ≤ π/T Hc (jΩ) = 0, otherwise Furthermore, since Yc (jΩ) = Hc (jΩ)Xc (jΩ), the desired tranfer function is 3 ejΩ , |Ω| ≤ 400π Hc (jΩ) = 0, otherwise Combining the two previous equations, we find 3 ej(800ω) , |ω| ≤ π/2 H(ejω ) = 0, π/2 ≤ |ω| ≤ π (b) Some aliasing will occur if 2π/T < 1600π. However, this is fine as long as the aliasing affects only Ec (jΩ) and not Fc (jΩ), as we show below: 21 |X(e jω )| F is unchanged −2π 2π ω E is aliased In order for the aliasing to not affect Fc (jΩ), we require 2π 2π − 800π ≥ 400π =⇒ ≥ 1200π T T The minimum 2π T is 1200π. For this choice, we get 3 ej(600ω) , |ω| ≤ 2π/3 jω H(e ) = 0, 2π/3 ≤ |ω| ≤ π 4.19. (a) See the following figure: R(e jω ) 12000 −π π ω X(e jω ) 12000 −5π/3 −π −π/3 π/3 π 5π/3 ω (b) For this to be true, H(ejω ) needs to filter out X(ejω ) for π/3 ≤ |ω| ≤ π. Hence let ω0 = π/3. Furthermore, we want π/2 = 2π(1000) =⇒ T2 = 1/6000 T2 (c) Matching the following figure of S(ejω ) with the figure for Rc (jΩ), and remembering that Ω = ω/T , we get T3 = (2π/3)/(2000π) = 1/3000. S(e jω) 6000 −2π/3 2π/3 22 ω 4.20. Notice first that since xc (t) is time-limited, A= Z 10 xc (t)dt = 0 Z ∞ xc (t)dt = Xc (jΩ)|Ω=0 . −∞ To estimate Xc (j · 0) by DT processing, we need to sample only fast enough so that Xc (j · 0) is not aliased. Hence, we pick 2π/T = 2π × 104 =⇒ T = 10−4 . The resulting spectrum satisfies X(ej·0 ) = Further, X(ej·0 ) = 1 Xc (j · 0) T ∞ X x[n]. n=−∞ Therefore, we pick h[n] = T u[n], which makes the system an accumulator. Our estimate  is the output y[n] at n = 10/(10−4) = 105 , when all of the non-zero samples of x[n] have been added-up. This is an exact estimate given our assumption of both band- and time-limitedness. Since the assumption can never be exactly satisfied, however, this method only gives an approximate estimate for actual signals. The overall system is as follows: xc (t) C/D h[n] = T u[n] y[n] A = y[100000] T = 1/10000 4.21. (a) Notice that y0 [n] = x[3n] y1 [n] = x[3n + 1] y2 [n] = x[3n + 2], and therefore, n = 3k y0 [n/3], y1 [(n − 1)/3], n = 3k + 1 x[n] = y2 [(n − 2)/3], n = 3k + 2 (b) Yes. Since the bandwidth of the filters are 2π/3, there is no aliasing introduced by downsampling. Hence to reconstruct x[n], we need the system shown in the following figure: y0 [n] 3 3H 0(z) y1 [n] 3 3H 1(z) y2 [n] 3 3H 2(z) x[n] (c) Yes, x[n] can be reconstructed from y3 [n] and y4 [n] as demonstrated by the following figure: 23 x[n] H 3 (z) H 4 (z) w 3[n] 2 y3 [n] 2 v3 [n] w 4[n] 2 y4 [n] 2 v4 [n] In the following discussion, let xe [n] denote the even samples of x[n]: x[n], xe [n] = 0, 0, xo [n] = x[n], x[n] H 4 (z) s[n] samples of x[n], and xo [n] denote the odd n even n odd n even n odd In the figure, y3 [n] = x[2n], and hence, v3 [n] = = x[n], 0, n even n odd xe [n] Furthermore, it can be verified using the IDFT that the impulse response h4 [n] corresponding to H4 (ejω ) is −2/(jπn), n odd h4 [n] = 0, otherwise Notice in particular that every other sample of the impulse response h4 [n] is zero. Also, from the form of H4 (ejω ), it is clear that H4 (ejω )H4 (ejω ) = 1, and hence h4 [n] ∗ h4 [n] = δ[n]. Therefore, y4 [n/2], n even v4 [n] = 0, n odd w4 [n], n even = 0, n odd (x ∗ h4 )[n], n even = 0, n odd = xo [n] ∗ h4 [n] where the last equality follows from the fact that h4 [n] is non-zero only in the odd samples. Now, s[n] = v4 [n] ∗ h4 [n] = xo [n] ∗ h4 [n] ∗ h4 [n] = xo [n], and since x[n] = xe [n] + xo [n], s[n] + v3 [n] = x[n]. 24 Solutions – Chapter 5 Transform Analysis of Linear Time-Invariant Systems 25 5.1. H(z) = Y (z) 1 − a−1 z −1 = , −1 1 − az X(z) causal, so ROC is |z| > a (a) Cross multiplying and taking the inverse transform 1 y[n] − ay[n − 1] = x[n] − x[n − 1] a (b) Since H(z) is causal, we know that the ROC is |z| > a. For stability, the ROC must include the unit circle. So, H(z) is stable for |a| < 1. (c) a = 1 2 Im |z| > 1/2 1/2 Re 2 (d) H(z) = a−1 z −1 1 − , 1 − az −1 1 − az −1 |z| > a 1 h[n] = (a)n u[n] − (a)n−1 u[n − 1] a (e) H(ejω ) = H(z)|z=ejω = |H(ejω )|2 = H(ejω )H ∗ (ejω ) = jω |H(e )| = = = 1 − a−1 e−jω 1 − ae−jω 1 − a−1 e−jω 1 − a−1 ejω · 1 − ae−jω 1 − aejω 1 1 + a12 − a2 cos ω 2 1 + a2 − 2a cos ω 1 1 a2 + 1 − 2a cos ω 2 a 1 + a2 − 2a cos ω 1 a 5.2. (a) Type I: M/2 A(ω) = X n=0 cos 0 = 1, cos π = −1, so there are no restrictions. 26 a[n] cos ωn Type II: (M+1)/2 A(ω) = X n=1 cos 0 = 1, cos nπ − π 2 Type III: 1 b[n] cos ω n − 2 = 0. So H(ejπ ) = 0. M/2 A(ω) = X c[n] sin ωn n=0 sin 0 = 0, sin nπ = 0, so H(ej0 ) = H(ejπ ) = 0. Type IV: (M+1)/2 A(ω) = X n=1 sin 0 = 0, sin nπ − (b) Lowpass Bandpass Highpass Bandstop Differentiator π 2 1 d[n] sin ω n − 2 6= 0, so just H(ej0 ) = 0. Type I Y Y Y Y Y Type II Y Y N N N Type III N Y N N N Type IV N Y Y N Y 5.3. (a) Taking the z-transform of both sides and rearranging H(z) = − 1 + z −2 Y (z) = 4 1 −2 X(z) 1 − 4z Since the poles and zeros {2 poles at z = ±1/2, 2 zeros at z = ±2} occur in conjugate reciprocal pairs the system is allpass. This property is easy to recognize since, as in the system above, the coefficients of the numerator and denominator z-polynomials get reversed (and in general conjugated). (b) It is a property of allpass systems that the output energy is equal to the input energy. Here is the proof. 27 N −1 X n=0 |y[n]|2 ∞ X = |y[n]|2 n=−∞ Z π Y (ejω ) dω = 1 2π −π Z π H(ejω )X(ejω ) dω = 1 2π Z = 1 2π −π π n=−∞ = N −1 X n=0 (by Parseval’s Theorem) 2 2 X(ejω ) dω ( H(ejω ) 2 = 1 since h[n] is allpass) −π ∞ X = 2 |x[n]|2 (by Parseval’s theorem) |x[n]|2 = 5 5.4. The statement is false. A non-causal system can indeed have a positive constant group delay. For example, consider the non-causal system h[n] = δ[n + 1] + δ[n] + 4δ[n − 1] + δ[n − 2] + δ[n − 3] This system has the frequency response H(ejω ) = H(ejω ) 6 ejω + 1 + 4e−jω + e−j2ω + e−j3ω = = e−jω (ej2ω + ejω + 4 + e−jω + e−j2ω ) e−jω (4 + 2 cos(ω) + 2 cos(2ω)) = 4 + 2 cos(ω) + 2 cos(2ω) H(ejω ) = grd[H(ejω )] = −ω 1 5.5. Making use of some DTFT properties can aide in the solution of this problem. First, note that h2 [n] = (−1)n h1 [n] h2 [n] = e−jπn h1 [n] Using the DTFT property that states that modulation in the time domain corresponds to a shift in the frequency domain, H2 (ejω ) = H1 (ej(ω+π) ) Consequently, H2 (ejω ) is simply H1 (ejω ) shifted by π. The ideal low pass filter has now become the ideal high pass filter, as shown below. 28 H1(ejω) 1 −π 0 −π/2 π/2 π ω π/2 π ω H2(ejω) 1 −π 0 −π/2 5.6. (a) (z + 12 )(z − 21 ) 1 −2 −(M−2) =z H(z) = 1− z zM 4 1 M M−2 M−1 n −1/4 (b) 1 = x[n − (M − 2)] − x[n − M ] 4 1 y[n] = w[2n] = x[2n − (M − 2)] − x[2n − M ] 4 w[n] Let v[n] = x[2n], 1 y[n] = v[n − (M − 2)/2] − v[n − (M/2)] 4 Therefore, 1 g[n] = δ[n − (M − 2)/2] − δ[n − (M/2)], 4 M even 1 G(z) = z −(M−2)/2 − z −M/2 4 5.7. (a) H(z) = z −2 (1 − 1 −1 )(1 2z − 3z −1 ) , 29 stable, so the ROC is 1 2 < |z| < 3 x[n] = u[n] ⇔ X(z) = Y (z) = X(z)H(z) = y[n] = 4 5 1− 4 5 1 −1 2z + 1 , 1 − z −1 1 5 1− 3z −1 − |z| > 1 1 , 1 − z −1 1 < |z| < 3 n 1 1 u[n] − (3)n u[−n − 1] − u[n] 2 5 (b) ROC includes z = ∞ so h[n] is causal. Since both h[n] and x[n] are 0 for n < 0, we know that y[n] is also 0 for n < 0 H(z) = z −2 Y (z) = X(z) 1 − 27 z −1 + 32 z −2 3 7 Y (z) − z −1 Y (z) + z −2 Y (z) = z −2 X(z) 2 2 7 3 y[n] = x[n − 2] + y[n − 1] − y[n − 2] 2 2 Since y[n] = 0 for n < 0, recursion can be done: y[0] = 0, y[1] = 0, y[2] = 1 (c) Hi (z) = 1 7 3 = z2 − z + , H(z) 2 2 ROC: entire z-plane 3 7 hi [n] = δ[n + 2] − δ[n + 1] + δ[n] 2 2 5.8. (a) X(z) = S(z)(1 − e−8α z −8 ) H1 (z) = 1 − e−8α z −8 π There are 8 zeros at z = e−α ej 4 k for k = 0, . . . , 7 and 8 poles at the origin. Im |z|>0 1/α 8th order pole 30 Re (b) Y (z) = H2 (z)X(z) = H2 (z)H1 (z)S(z) H2 (z) = 1 1 = H1 (z) 1 − e−8α z −8 |z| > e−α stable and causal, |z| < e−α not causal or stable (c) Only the causal h2 [n] is stable, therefore only it can be used to recover s[n]. −αn e , n = 0, 8, 16, . . . h[n] = 0, otherwise (d) s[n] = δ[n] ⇒ x[n] = δ[n] − e−8α δ[n − 8] x[n] ∗ h2 [n] = δ[n] − e−8α δ[n − 8] + e−8α (δ[n − 8] − e−8α δ[n − 16]) + e−16α (δ[n − 16] − e−8α δ[n − 32]) + · · · = δ[n] 5.9. h[n] = n n 1 1 u[n] + u[n] 2 3 (a) H(z) = 1 1− 1 −1 2z + 1 1− 1 −1 3z = 2 − 65 z −1 , 1 − 56 z −1 + 16 z −2 |z| > Since h[n], x[n] = 0 for n < 0 we can assume initial rest conditions. y[n] = 5 1 5 y[n − 1] − y[n − 2] + 2x[n] − x[n − 1] 6 6 6 (b) h1 [n] = h[n], n ≤ 109 0, n > 109 (c) H(z) = N −1 X Y (z) = h[m]z −m , X(z) m=0 y[n] = N −1 X m=0 31 N = 109 + 1 h[m]x[n − m] 1 2 (d) For IIR, we have 4 multiplies and 3 adds per output point. This gives us a total of 4N multiplies and 3N adds. So, IIR grows with order N . For FIR, we have N multiplies and N − 1 adds for the nth output point, so this configuration has order N 2 . 5.10. (a) 20 log10 |H(ej(π/5) )| = ∞ ⇒ pole at ej(π/5) 20 log10 |H(ej(2π/5) )| = −∞ ⇒ zero at ej(2π/5) Resonance at ω = 3π 5 ⇒ pole inside unit circle here. Since the impulse response is real, the poles and zeros must be in conjugate pairs. The remaining 2 zeros are at zero (the number of poles always equals the number of zeros). Im Re (b) Since H(z) has poles, we know h[n] is IIR. (c) Since h[n] is causal and IIR, it cannot be symmetric, and thus cannot have linear phase. (d) Since there is a pole at |z| = 1, the ROC does not include the unit circle. This means the system is not stable. 5.11. Convolving two symmetric sequences yields another symmetric sequence. A symmetric sequence convolved with an antisymmetric sequence gives an antisymmetric sequence. If you convolve two antisymmetric sequences, you will get a symmetric sequence. A : h1 [n] ∗ h2 [n] ∗ h3 [n] = (h1 [n] ∗ h2 [n]) ∗ h3 [n] h1 [n] ∗ h2 [n] is symmetric about n = 3, (−1 ≤ n ≤ 7) (h1 [n] ∗ h2 [n]) ∗ h3 [n] is antisymmetric about n = 3, (−3 ≤ n ≤ 9) Thus, system A has generalized linear phase B : (h1 [n] ∗ h2 [n]) + h3 [n] h1 [n] ∗ h2 [n] is symmetric about n = 3, as we noted above. Adding h3 [n] to this sequence will destroy all symmtery, so this does not have generalized linear phase. 32 5.12. H(z) = (1 − 0.5z −1)(1 + 2jz −1 )(1 − 2jz −1 ) (1 − 0.8z −1)(1 + 0.8z −1) 2j Im −4/5 1/2 4/5 Re −2j (a) A minimum phase system has all poles and zeros inside |z| = 1 H1 (z) = (1 − 0.5z −1)(1 + 14 z −2 ) (1 − 0.64z −2) Im (1/2)j −4/5 1/2 4/5 −(1/2)j Hap (z) = (1 + 4z −2 ) (1 + 14 z −2 ) 2j Im (1/2)j Re −(1/2)j −2j 33 Re (b) A generalized linear phase system has zeros and poles at z = 1, −1, 0 or ∞ or in conjugate reciprocal pairs. H2 (z) = (1 − 0.5z −1) (1 − 0.64z −2)(1 + 41 z −2 ) Im (1/2)j −4/5 1/2 4/5 Re −(1/2)j 3rd order zero Hlin (z) = (1 + 14 z −2 )(1 + 4z −2 ) 2j Im (1/2)j Re −(1/2)j 4th order pole −2j 5.13. The input x[n] in the frequency domain looks like X(ejω) (10π) (10π) 5 −π −0.5π −0.4π 0 while the corresponding output y[n] looks like 34 0.4π 0.5π π ω Y(ejω) 10e−j10ω −π 0 −0.3π 0.3π π ω Therefore, the filter must be H(ejω) 2e−j10ω −π 0 −0.3π 0.3π π ω In the time domain this is h[n] = 2 sin[0.3π(n − 10)] π(n − 10) 5.14. (a) Property Stable Applies? No IIR Yes FIR No Minimum Phase Allpass No Generalized Linear Phase No Positive Group Delay for all w No No (b) 35 Comments For a stable, causal system, all poles must be inside the unit circle. The system has poles at locations other than z = 0 or z = ∞. FIR systems can only have poles at z = 0 or z = ∞. Minimum phase systems have all poles and zeros located inside the unit circle. Allpass systems have poles and zeros in conjugate reciprocal pairs. The causal generalized linear phase systems presented in this chapter are FIR. This system is not in the appropriate form. Property Stable Applies? Yes IIR FIR Minimum Phase No Yes No Allpass No Generalized Linear Phase Yes Positive Group Delay for all w Yes Comments The ROC for this system function, |z| > 0, contains the unit circle. (Note there is 7th order pole at z = 0). The system has poles only at z = 0. The system has poles only at z = 0. By definition, a minimum phase system must have all its poles and zeros located inside the unit circle. Note that the zeros on the unit circle will cause the magnitude spectrum to drop zero at certain frequencies. Clearly, this system is not allpass. This is the pole/zero plot of a type II FIR linear phase system. This system is causal and linear phase. Consequently, its group delay is a positive constant. (c) Property Stable Applies? Yes IIR Yes FIR No Minimum Phase Allpass No Yes Generalized Linear Phase No Positive Group Delay for all w Yes Comments All poles are inside the unit circle. Since the system is causal, the ROC includes the unit circle. The system has poles at locations other than z = 0 or z = ∞. FIR systems can only have poles at z = 0 or z = ∞. Minimum phase systems have all poles and zeros located inside the unit circle. The poles inside the unit circle have corresponding zeros located at conjugate reciprocal locations. The causal generalized linear phase systems presented in this chapter are FIR. Stable allpass systems have positive group delay for all w. 5.15. (a) Yes. By the region of convergence we know there are no poles at z = ∞ and it therefore must be causal. Another way to see this is to use long division to write H1 (z) as H1 (z) = 1 − z −5 = 1 + z −1 + z −2 + z −3 + z −4 , |z| > 0 1 − z −1 (b) h1 [n] is a causal rectangular pulse of length 5. If we convolve h1 [n] with another causal rectangular pulse of length N we will get a triangular pulse of length N + 5 − 1 = N + 4. The triangular pulse is symmetric around its apex and thus has linear phase. To make the triangular pulse g[n] have at least 9 nonzero samples we can choose N = 5 or let h2 [n] = h1 [n]. Proof: G(ejω ) = H1 (ejω )H2 (ejω ) = H12 (ejω ) 36 1 − e−j5ω 1 − e−jω 2 = = " = sin2 (5ω/2) −j4ω e sin2 (ω/2) e−jω5/2 ejω5/2 − e−jω5/2 e−jω/2 ejω/2 − e−jω/2 #2 (c) The required values for h3 [n] can intuitively be worked out using the flip and slide idea of convolution. Here is a second way to get the answer. Pick h3 [n] to be the inverse system for h1 [n] and then simplify using the geometric series as follows. 1 − z −1 1 − z −5 (1 − z −1 ) 1 + z −5 + z −10 + z −15 + · · · H3 (z) = = 1 − z −1 + z −5 − z −6 + z −10 − z −11 + z −15 − z −16 + · · · = This choice for h3 [n] will make q[n] = δ[n] for all n. However, since we only need equality for 0 ≤ n ≤ 19 truncating the infinite series will give us the desired result. The final answer is shown below. 1 h3[n] 0 5 10 15 n −1 5.16. (a) This system does not necessarily have generalized linear phase. The phase response, G1 (ejω ) = tan−1 Im(H1 (ejω ) + H2 (ejω )) Re(H1 (ejω ) + H2 (ejω )) is not necessarily linear. As a counter-example, consider the systems h1 [n] = δ[n] + δ[n − 1] h2 [n] = 2δ[n] − 2δ[n − 1] 6 g1 [n] = h1 [n] + h2 [n] = 3δ[n] − δ[n − 1] G1 (ejω ) = 3 − e−jω = 3 − cos ω + j sin ω sin ω G1 (ejω ) = tan−1 3 − cos ω Clearly, G1 (ejω ) does not have linear phase. (b) This system must have generalized linear phase. 37 G2 (ejω ) = G2 (ejω ) = 6 G2 (ejω ) = 6 H1 (ejω )H2 (ejω ) H1 (ejω ) H2 (ejω ) H1 (ejω ) + 6 H2 (ejω ) The sum of two linear phase responses is also a linear phase response. (c) This system does not necessarily have linear phase. Using properties of the DTFT, the circular convolution of H1 (ejw ) and H2 (ejw ) is related to the product of h1 [n] and h2 [n]. Consider the systems h1 [n] = h2 [n] = g3 [n] = G3 (ejω ) = 6 G3 (ejω ) = δ[n] + δ[n − 1] δ[n] + 2δ[n − 1] + δ[n − 2] h1 [n]h2 [n] = δ[n] + 2δ[n − 1] 1 + 2e−jω = 1 + 2 cos ω − j2 sin ω 2 sin ω −1 tan 1 + 2 cos ω Clearly, G3 (ejω ) does not have linear phase. 5.17. For all of the following we know that the poles and zeros are real or occur in complex conjugate pairs since each impulse response is real. Since they are causal we also know that none have poles at infinity. (a) (b) • Since h1 [n] is real there are complex conjugate poles at z = 0.9e±jπ/3 . • If x[n] = u[n] H1 (z) Y (z) = H1 (z)X(z) = 1 − z −1 We can perform a partial fraction expansion on Y (z) and find a term (1)n u[n] due to the pole at z = 1. Since y[n] eventually decays to zero this term must be cancelled by a zero. Thus, the filter must have a zero at z = 1. • The length of the impulse response is infinite. • Linear phase and a real impulse response implies that zeros occur at conjugate reciprocal locations so there are zeros at z = z1 , 1/z1 , z1∗ , 1/z1∗ where z1 = 0.8ejπ/4 . • Since h2 [n] is both causal and linear phase it must be a Type I, II, III, or IV FIR filter. Therefore the filter’s poles only occur at z = 0. • Since the arg H2 (ejw ) = −2.5ω we can narrow down the filter to a Type II or Type IV filter. This also tells us that the length of the impulse response is 6 and that there are 5 zeros. Since the number of poles always equal the number of zeros, we have 5 poles at z = 0. • Since 20 log H2 (ej0 ) = −∞ we must have a zero at z = 1. This narrows down the filter type even more from a Type II or Type IV filter to just a Type IV filter. With all the information above we can determine H2 (z) completely (up to a scale factor) H2 (z) = A(1 − z −1 )(1 − 0.8ejπ/4 z −1 )(1 − 0.8e−jπ/4 z −1 )(1 − 1.25ejπ/4 z −1 )(1 − 1.25e−jπ/4 z −1 ) (c) Since H3 (z) is allpass we know the poles and zeros occur in conjugate reciprocal locations. The impulse response is infinite and in general looks like H3 (z) = (z −1 − 0.8ejπ/4 )(z −1 − 0.8e−jπ/4 ) Hap (z) (1 − 0.8ejπ/4 z −1 )(1 − 0.8e−jπ/4 z −1 ) 38 5.18. (a) To be rational, X(z) must be of the form M Y (1 − ck z −1 ) b0 k=1 X(z) = N a0 Y (1 − dk z −1 ) k=1 Because x[n] is real, its zeros must appear in conjugate pairs. Consequently, there are two more zeros, at z = 12 e−jπ/4 , and z = 12 e−j3π/4 . Since x[n] is zero outside 0 ≤ n ≤ 4, there are only four zeros (and poles) in the system function. Therefore, the system function can be written as 1 jπ/4 −1 1 j3π/4 −1 1 −jπ/4 −1 1 −j3π/4 −1 X(z) = 1 − e 1− e 1− e 1− e z z z z 2 2 2 2 Clearly, X(z) is rational. (b) A sketch of the pole-zero plot for X(z) is shown below. Note that the ROC for X(z) is |z| > 0. Im X(z) Re 4th order pole (c) A sketch of the pole-zero plot for Y (z) is shown below. Note that the ROC for Y(z) is |z| > 12 . Im Y(z) Re 4th order zero 5.19. • Since x[n] is real the poles & zeros come in complex conjugate pairs. • From (1) we know there are no poles except at zero or infinity. • From (3) and the fact that x[n] is finite we know that the signal has generalized linear phase. • From (3) and (4) we have α = 2. This and the fact that there are no poles in the finite plane except the five at zero (deduced from (1) and (2)) tells us the form of X(z) must be X(z) = x[−1]z + x[0] + x[1]z −1 + x[2]z −2 + x[3]z −3 + x[4]z −4 + x[5]z −5 The phase changes byP π at ω = 0 and π so there must be a zero Pon the unit circle at z = ±1. The zero at z = 1 tells us x[n] = 0. The zero at z = −1 tells us (−1)n x[n] = 0. We can also conclude x[n] must be a Type III filter since the length of x[n] is odd and there is a zero at both z = ±1. x[n] must therefore be antisymmetric around n = 2 and x[2] = 0. P • From (5) and Parseval’s theorem we have |x[n]|2 = 28. 39 • From (6) Z π 1 Y (ejω )dω = 4 2π −π = x[n] ∗ u[n] |n=0 = x[−1] + x[0] y[0] = y[1] = = Z π 1 Y (ejω )ejw dω = 6 2π −π x[n] ∗ u[n] |n=1 = x[−1] + x[0] + x[1] (−1)n x[n] = 0 we already derived earlier. • Since the DTFT {xe [n]} = Re X(ejω ) we have • The conclusion from (7) that P x[5] + x[−5] 2 x[5] x[5] 3 2 = −3 + x[−5] = − = −3 Summarizing the above we have the following (dependent) equations (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) x[−1] + x[0] + x[1] + x[2] + x[3] + x[4] + x[5] = 0 −x[−1] + x[0] − x[1] + x[2] − x[3] + x[4] − x[5] = 0 x[2] = 0 x[−1] = −x[5] x[0] = −x[4] x[1] = −x[3] x[−1]2 + x[0]2 + x[1]2 + x[2]2 + x[3]2 + x[4]2 + x[5]2 = 28 x[−1] + x[0] = 4 x[−1] + x[0] + x[1] = 6 x[5] = −3 x[n] is easily obtained from solving the equations in the following order: (3),(10),(4),(8),(5),(9), and (6). 3 x[n] 2 1 −1 3 0 1 2 4 5 n −1 −2 −3 40 Solutions – Chapter 6 Structures for Discrete-Time Systems 41 6.1. Causal LTI system with system function: H(z) = 1 − 15 z −1 . (1 − 12 z −1 + 13 z −2 )(1 + 14 z −1 ) (a) (i) Direct form I. H(z) = so b0 = 1 , b1 = − x[n] - 1− 1 −1 4z 1 − 51 z −1 5 −2 + 24 z + 1 ( 12 z − 3) 1 1 5 1 and a1 = , a2 = − , a3 = − . 5 4 24 12 y[n] z −1 - - - ? −1 ?z 6 6 −1/5 1/4 −1 ?z 6 −5/24 6 −1/12 (ii) Direct form II. 42 −1 ?z - - - - x[n] y[n] 6 ?z 1/4 6 −5/24 −1 −1/5 - 6 ?z −1 ?z −1 −1/12 (iii) Cascade form using first and second order direct form II sections. H(z) = ( So a11 1 − 15 z −1 1 )( ). 1 + 14 z −1 1 − 21 z −1 + 13 z −2 b01 = 1 , b11 = − 15 , b21 = 0 , b02 = 1 , b12 = 0 , b22 = 0 and = − 41 , a21 = 0 , a12 = 21 , a22 = − 13 . x[n] y[n] - - z ? 6 −1/4 - - −1 6 −1/5 z ? 6 1/2 6 −1/3 43 −1 −1 ?z (iv) Parallel form using first and second order direct form II sections. We can rewrite the transfer function as: H(z) = So a11 1 27 125 + 41 z −1 + 1 98 36 −1 125 − 125 z . 1 −1 − 2 z − 13 z −2 27 , e11 = 0 , e01 = 125 98 36 e02 = 125 , e12 = − 125 , and 1 = − 4 , a21 = 0 , a12 = 21 , a22 = − 13 . - 6 27/125 −1 ?z - −1/4 6 ? x[n] y[n] - ? 6 - - −1 ?z 6 1/2 6 6 −36/125 −1 ?z 1/3 (v) Transposed direct form II We take the direct form II derived in part (ii) and reverse the arrows as well as exchange the input and output. Then redrawing the flow graph, we get: 44 w1 [n] - - - - x[n] y[n] z −1 6 ? w2 [n] −1/5 w3 [n] ? 1/4 z −1 6 ? −5/24 z −1 6 ? −1/12 (b) To get the difference equation for the flow graph of part (v) in (a), we first define the intermediate variables: w1 [n] , w2 [n] and w3 [n] . We have: (1) w1 [n] = x[n] + w2 [n − 1] 1 1 y[n] + w3 [n − 1] − x[n] 4 5 5 1 − y[n] − y[n − 1] 24 12 w1 [n]. (2) w2 [n] = (3) w3 [n] = (4) y[n] = Combining the above equations, we get: 5 1 1 1 y[n] − y[n − 1] + y[n − 2] + y[n − 3] = x[n] − x[n − 1]. 4 24 12 5 Taking the Z-transform of this equation and combining terms, we get the following transfer function: H(z) = 1− 1 − 51 z −1 5 −2 + 24 z + 1 −1 4z 1 −3 12 z which is equal to the initial transfer function. 6.2. (a) H(z) = 1 1 − az −1 y[n] x[n] z −1 ? a 45 y[n] = x[n] + ay[n − 1] HT (z) = (b) 1 = H(z) 1 − az −1 H(z) = 1 + 14 z −1 1 − 21 z −1 y[n] x[n] z −1 6 1/2 1/4 1 1 y[n] = x[n] + x[n − 1] + y[n − 1] 4 2 HT (z) = 1 + 41 z −1 = H(z) 1 − 12 z −1 (c) H(z) = a + bz −1 + cz −2 z −1 y[n] a z −1 b 6 c 6 6 x[n] y[n] = ax[n] + bx[n − 1] + cx[n − 2] HT (z) = a + bz −1 + cz −2 = H(z) (d) H(z) = r sin θz −1 1 − 2r cos θz −1 + r2 z −2 46 y[n] z −1 6 s r cos θ w[n] −r sin θ ? r cos θ 6 r sin θ x[n] z −1 6 u[n] X + z −1 U r cos θV − r sin θY V U = = W Y Y =⇒ X = = r sin θV + r cos θz −1 W z −1 W = HT (z) = = r sin θz −1 1 − 2r cos θz −1 + r2 z −2 H(z). 6.3. (a) H(z) = = 1 − 12 z −1 1 −1 −2 + 1 + 2z + z 1 − z −1 1 − 83 z −1 + 78 z −2 −3 2 + 89 z −1 + 89 z −2 + 11 + 87 z −4 8 z . −1 + 5 z −2 − 7 z −3 1 − 11 8 z 4 8 (b) y[n] = + 9 11 7 9 2x[n] + x[n − 1] + x[n − 2] + x[n − 3] + x[n − 4] 8 8 8 8 11 5 7 y[n − 1] − y[n − 2] + y[n − 3]. 8 4 8 (c) Use Direct Form II: 47 - 2 - - - x[n] y[n] ?z 6 11/8 −1 9/8 - 6 −5/4 7/8 ?z −1 9/8 - 6 ?z −1 11/8 - 6 ?z −1 7/8 - 48 6 Solutions – Chapter 7 Filter Design Techniques 49 7.1. (a) Using the bilinear transform frequency mapping equation, Ωp = ω 2 p tan Td 2 we have Td = = π 2 tan Ωp 4 2 Ωp (b) ωp = 2 tan−1 Ωp T d 2 π ωp 0 0 Td (c) Ωs T d ωs = 2 tan 2 Ωp T d −1 ωp = 2 tan 2 Ωs T d Ωp T d ∆ω = ωs − ωp = 2 tan−1 − tan−1 2 2 −1 50 π ∆ω 0 0 Td 7.2. We start with |Hc (jΩ)|, | Hc(jΩ) | 10π 0 −10π Ω 10π (a) By impulse invariance we scale the frequency axis by Td to get jω |H1 (e )| = ∞ X k=−∞ ω 2πk +j Hc j Td Td | H1(ejω) | 10π −π −0.1π 0.1π π ω Then, to get the overall system response we scale the frequency axis by T and bandlimit the result according to the equation |H1 (ejωT )|, |Ω| < Tπ |Heff 1 (jΩ)| = 0, |Ω| > Tπ 51 | Heff (jΩ) | 1 10π 0 −1000π Ω 1000π (b) Using the frequency mapping relationships of the bilinear transform, ω 2 tan , Td 2 ΩTd −1 , = 2 tan 2 Ω = ω we get jω |H2 (e )| = | tan 0, ω 2 |, |ω| < 2 tan−1 (10π) = 0.98π otherwise | H2(ejω) | 10π 0.98π π 0 −π ω Then, to get the overall system response we scale the frequency axis by T and bandlimit the result according to the equation |H2 (ejωT )|, |Ω| < Tπ |Heff 2 (jΩ)| = 0, |Ω| > Tπ | Heff (jΩ) | 2 10π 0 −9800π 7.3. (a) Since jω H(e ) = ∞ X k=−∞ ω 2πk Hc j + Td Td and we desire H(ejω ) |ω=0 = Hc (jΩ) |Ω=0 , 52 9800π Ω we see that H(ejω )|ω=0 = ∞ X 2πk ω |ω=0 = Hc (jΩ)|Ω=0 + Hc j Td Td k=−∞ requires ∞ X 2πk Hc j = 0. Td k=−∞ k6=0 (b) Since the bilinear transform maps Ω = 0 to ω = 0, the condition will hold for any choice of Hc (jΩ). 7.4. (a) s= s+1 1 + z −1 ←→ z = −1 1−z s−1 Now, we evaluate the above expressions along the jΩ axis of the s-plane z = |z| = jΩ + 1 jΩ − 1 1 (b) We want to show |z| < 1 if Re{s} < 0. z σ + jΩ + 1 σ + jΩ − 1 p (σ + 1)2 + Ω2 p (σ − 1)2 + Ω2 = |z| = Therefore, if |z| < 1 (σ + 1)2 + Ω2 σ < < (σ − 1)2 + Ω2 −σ it must also be true that σ < 0. We have just shown that the left-half s-plane maps to the interior of the z-plane unit circle. Thus, any pole of Hc (s) inside the left-half s-plane will get mapped to a pole inside the z-plane unit circle. (c) We have the relationship jΩ = = Ω |Ωs | |Ωp1 | |Ωp2 | = 1 + e−jω 1 − e−jω ejω/2 + e−jω/2 ejω/2 − e−jω/2 − cot(ω/2) = | cot(π/6)| = √ 3 = | cot(π/2)| = 0 = | cot(π/4)| = 1 Therefore, the constraints are 0.95 ≤ |Hc (jΩ)| ≤ 1.05, |Hc (jΩ)| ≤ 0.01, 53 0 ≤ |Ω| ≤ 1 √ 3 ≤ |Ω| 7.5. (a) Since H(ej0 ) 6= 0 and H(ejπ ) 6= 0, this must be a Type I filter. (b) With the weighting in the stopband equal to 1, the weighting in the passband is δ2 δ1 . W(ω) 1.6 1 0 0 0.4π π 0.58π ω (c) |E(ω)| δ2 0 ωs 0 π ωp ω −δ2 (d) An optimal (in the Parks-McClellan sense) Type I lowpass filter can have either L + 2 or L + 3 alternations. The second case is true only when an alternation occurs at all band edges. Since this filter does not have an alternation at ω = π it should only have L + 2 alternations. From the figure, we see that there are 7 alternations so L = 5. Thus, the filter length is 2L + 1 = 11 samples long. (e) Since the filter is 11 samples long, it has a delay of 5 samples. (f) Note the zeroes off the unit circle are implied by the dips in the frequency response at the indicated frequencies. Im Re 10th order pole 7.6. True. Since filter C is a stable IIR filter it has poles in the left half plane. The bilinear transform maps the left half plane to the inside of the unit circle. Thus, the discrete filter B has to have poles and is therefore an IIR filter. 54 Solutions – Chapter 8 The Discrete-Time Fourier Transform 55 8.1. For a finite-length sequence x[n], with length equal to N , the periodic repetition of x[−n] is represented by x[((−n))N ] = x[((−n + `N ))N ], `: integer where the right side is justified since x[n] (and x[−n]) is periodic with period N . The above statement holds true for any choice of `. Therefore, for ` = 1: x[((−n))n ] = x[((−n + N ))N ] 8.2. No. Recall that the DFT merely samples the frequency spectra. Therefore, the fact the Im{X[k]} = 0 for 0 ≤ k ≤ (N − 1) does not guarantee that the imaginary part of the continuous frequency spectra is also zero. For example, consider a signal which consists of an impulse centered at n = 1. x[n] = δ[n − 1], 0≤n≤1 The Fourier transform is: X(ejω ) = Re{X(ejω )} = e−jω cos(ω) Im{X(ejω )} − sin(ω) = Note that neither is zero for all 0 ≤ ω ≤ 2. Now, suppose we take the 2-pt DFT: X[k] = = So, Im{X[k]} = 0, W2k , ( 1, 0≤k≤1 k=0 −1, k = 1 ∀k. However, Im{X(ejω )} 6= 0. Note also that the size of the DFT plays a large role. For instance, consider taking the 3-pt DFT of x[n] = X[k] = = Now, Im{X[k]} 6= 0, for k = 1 or k = 2. δ[n − 1], W3k , 1, 0≤n≤2 0≤k≤2 k=0 −j(2π/3) e , k=1 e−j(4π/3) , k = 2 8.3. Both sequences x[n] and y[n] are of finite-length (N = 4). Hence, no aliasing takes place. From Section 8.6.2, multiplication of the DFT of a sequence by a complex exponential corresponds to a circular shift of the time-domain sequence. Given Y [k] = W43k X[k], we have y[n] = x[((n − 3))4 ] We use the technique suggested in problem 8.28. That is, we temporarily extend the sequence such that a periodic sequence with period 4 is formed. 56 1 3/4 1 1/2 3/4 1/4 1 1/2 3/4 1/4 1/2 1/4 x̃[n] n −4 −3 −2 −1 0 1 2 3 4 5 6 7 Now, we shift by three (to the right), and set all values outside 0 ≤ n ≤ 3 to zero. 3/4 1 1/2 y[n] 1/4 n −2 −1 0 1 2 3 4 5 8.4. (a) When multiplying the DFT of a sequence by a complex exponential, the time-domain signal undergoes a circular shift. For this case, Y [k] = W64k X[k], 0≤k≤5 Therefore, y[n] = x[((n − 4))6 ], 4 2 0≤n≤5 3 y[n] 1 n −1 0 1 2 3 4 5 6 7 (b) There are two ways to approach this problem. First, we attempt a solution by brute force. X[k] = W [k] = = = 4 + 3W6k + 2W62k + W63k , W6k = e−j(2πk/6) and 0 ≤ k ≤ 5 Re{X[k]} 1 (X[k] + X ∗ [k]) 2 1 4 + 3W6k + 2W62k + W63k + 4 + 3W6−k + 2W6−2k + W6−3k 2 Notice that WNk WN−k = e−j(2πk/N ) = ej(2πk/N ) = e−j(2π/N )(N −k) = WNN −k i 1h i h i 3h k W [k] = 4 + W6 + W66−k + W62k + W66−2k + W63k + W66−3k , 2 2 0≤k≤5 So, w[n] = w[n] = 3 δ[n − 1] + δ[n − 5] + δ[n − 2] + δ[n − 4] 4δ[n] + 2 1 + δ[n − 3] + δ[n − 3] 2 3 3 4δ[n] + δ[n − 1] + δ[n − 2] + δ[n − 3] + δ[n − 4] + δ[n − 5], 2 2 57 0≤n≤5 Sketching w[n]: 4 3/2 1 1 w[n] 1 3/2 n −1 0 1 2 3 4 5 6 7 As an alternate approach, suppose we use the properties of the DFT as listed in Table 8.2. W [k] = Re{X[k]} X[k] + X ∗ [k] 2 1 1 IDFT{X[k]} + IDFT{X ∗ [k]} 2 2 1 ∗ x[n] + x [((−n))N ] 2 = w[n] = = For 0 ≤ n ≤ N − 1 and x[n] real: w[n] = 1 x[n] + x[N − n] 2 4 1 2 3 x[N − n], for N = 6 n −1 0 1 2 3 4 5 6 7 So, we observe that w[n] results as above. (c) The DFT is decimated by two. By taking alternate points of the DFT output, we have half as many points. The influence of this action in the time domain is, as expected, the appearance of aliasing. For the case of decimation by two, we shall find that an additional replica of x[n] surfaces, since the sequence is now periodic with period 3. From part (b): 0≤k≤5 X[k] = 4 + 3W6k + 2W62k + W63k , Let Q[k] = X[2k], Q[k] = 4 + 3W3k + 2W32k + W33k , 0≤k≤2 Noting that W33k = W30k q[n] = 5δ[n] + 3δ[n − 1] + 2δ[n − 2], 5 3 2 q[n] n −1 0 1 2 3 4 58 5 0≤n≤2 8.5. (a) The linear convolution, x1 [n] ∗ x2 [n] is a sequence of length 100 + 10 − 1 = 109. 1 2 3 4 5 8 7 6 10 9 10 9 8 7 x1 [n] ∗ x2 [n] 6 5 ... 4 3 2 1 ... −1 0 1 2 3 4 5 6 7 8 n 9 99 100 101 102 103 104 105 106 107 108 109 (b) The circular convolution, x1 [n] 100 x2 [n], can be obtained by aliasing the first 9 points of the linear convolution above: 10 10 10 10 10 10 10 10 10 10 10 ... ... 0 1 2 3 4 5 6 7 8 n 9 99 (c) Since N ≥ 109, the circular convolution x1 [n] 110 x2 [n] will be equivalent to the linear convolution of part (a). 8.6. Circular convolution equals linear convolution plus aliasing. First, we find y[n] = x1 [n] ∗ x2 [n]: 8 6 6 5 4 4 3 y[n] 3 2 1 n 0 1 2 3 4 5 6 7 8 9 10 11 Note that y[n] is a ten point sequence (N = 6 + 5 − 1). (a) For N = 6, the last four non-zero point (6 ≤ n ≤ 9) will alias to the first four points, giving us y1 [n] = x1 [n] 6 x2 [n] 8 10 8 6 6 y1 [n] 4 n −1 0 1 2 3 4 59 5 6 7 (b) For N = 10, N ≥ 6 + 5 − 1, so no aliasing occurs, and circular convolution is identical to linear convolution. 8.7. We have a finite length sequence, whose 64-pt DFT contains only one nonzero point (for k = 32). (a) Using the synthesis equation Eq. (8.68): N −1 1 X X[k]WN−kn , N x[n] = k=0 0 ≤ n ≤ (N − 1) Substitution yields: x[n] = = = x[n] = 1 −32n X[32]W64 64 1 j 2π (32)n e 64 64 1 jπn e 64 1 (−1)n , 0 ≤ n ≤ (N − 1) 64 The answer is unique because we have taken the 64-pt DFT of a 64-pt sequence. (b) The sequence length is now N = 192. 191 x[n] = x[n] = 1 X −kn X[k]W192 , 0 ≤ n ≤ 191 192 k=0 ( 1 n 0 ≤ n ≤ 63 64 (−1) 0 64 ≤ n ≤ 191 This solution is not unique. By taking only 64 spectral samples, x[n] will be aliased in time. As an alternate sequence, consider 1 1 0 (−1)n , 0 ≤ n ≤ 191 x [n] = 64 3 We have a finite-length sequence, x[n] with N = 8. Suppose we interpolate by a factor of two. That is, we wish to double the size of x[n] by inserting zeros at all odd values of n for 0 ≤ n ≤ 15. Mathematically, y[n] = ( x[n/2], n even, 0, n odd, 0 ≤ n ≤ 15 The 16-pt. DFT of y[n]: Y [k] = = 15 X n=0 7 X kn y[n]W16 , 2kn x[n]W16 n=0 60 0 ≤ k ≤ 15 2kn Recall, W16 = ej(2π/16)(2k)n = e−j(2π/8)kn = W8kn , Y [k] = 7 X x[n]W8kn , 0 ≤ k ≤ 15 n=0 Therefore, the 16-pt. DFT of the interpolated signal contains two copies of the 8-pt. DFT of x[n]. This is expected since Y [k] is now periodic with period 8 (see problem 8.1). Therefore, the correct choice is C. As a quick check, Y [0] = X[0]. 8.9. (a) Since 8.8. x2 [n] = x[n], 0≤n≤N −1 −x[n − N ], N ≤ n ≤ 2N − 1 0, otherwise If X[k] is known, x2 [n] can be constructed by : X[k] - N -pt IDFT - x[n] ? Scale by −1 Shift by N - ? concatenate - 2N -pt DFT - X2 [k] (b) To obtain X[k] from X1 [k], we might try to take the inverse DFT (2N-pt) of X1 [k], then take the N-pt DFT of x1 [n] to get X[k]. However, the above approach is highly inefficient. A more reasonable approach may be achieved if we examine the DFT analysis equations involved. First, X1 [k] = 2N −1 X kn x1 [n]W2N , 0 ≤ k ≤ (2N − 1) n=0 = N −1 X kn x[n]W2N n=0 = N −1 X (k/2)n x[n]WN n=0 X1 [k] = X[k/2], , 0 ≤ k ≤ (N − 1) 0 ≤ k ≤ (N − 1) Thus, an easier way to obtain X[k] from X1 [k] is simply to decimate X1 [k] by two. 61 - X1 [k] - X[k] ?2 8.10. (a) The DFT of the even part of a real sequence: If x[n] is of length N , then xe [n] is of length 2N − 1: x[n] + x[−n] , (−N + 1) ≤ n ≤ (N − 1) xe [n] = 2 0 otherwise N −1 X x[n] + x[−n] kn W2N (−N + 1) ≤ k ≤ (N − 1) Xe [k] = −1 , 2 n=−N +1 = 0 X n=−N +1 N −1 X x[n] kn x[−n] kn W2N −1 + W2N −1 2 2 n=0 Let m = −n, Xe [k] = Xe [k] = Recall X[k] = N −1 X N −1 X x[n] x[n] −kn kn W2N −1 + W2N −1 2 2 n=0 n=0 N −1 X 2πkn x[n] cos 2N − 1 n=0 N −1 X x[n]WNkn , n=0 and Re{X[k]} = N −1 X n=0 (b) 0 ≤ k ≤ (N − 1) x[n] cos 2πkn N So: DFT{xe [n]} 6= Re{X[k]} Re{X[k]} = = = X[k] + X ∗ [k] 2 N −1 N −1 X 1 1 X x[n]WNkn + x[n]WN−kn 2 n=0 2 n=0 N −1 1 X (x[n] + x[N − n])WNkn 2 n=0 So, Re{X[k]} = DFT 62 1 (x[n] + x[N − n]) 2 8.11. From condition 1, we can determine that the sequence is of finite length (N = 5). Given: X(ejω ) = 1 + A1 cos ω + A2 cos 2ω A2 j2ω A1 jω (e + e−jω ) + (e + e−j2ω ) = 1+ 2 2 From the Fourier analysis equation, we can see by matching terms that: A1 A2 (δ[n − 1] + δ[n + 1]) + (δ[n − 2] + δ[n + 2]) 2 2 x[n] = δ[n] + Condition 2 yields one of the values for the amplitude constants of condition 1. Since x[n] ∗ δ[n − 3] = x[n − 3] = 5 for n = 2, we know x[−1] = 5, and also that x[1] = x[−1] = 5. Knowing both these values tells us that A1 = 10. For condition 3, we perform a circular convolution between x[((n−3))8 ] and w[n], a three-point sequence. For this case, linear convolution is the same as circular convolution since N = 8 ≥ 6 + 3 − 1. We know x[((n − 3))8 ] = x[n − 3], and convolving this with w[n] from Fig P8.35-1 gives: 22 3A2 2 + 11 A2 + 15 A2 2 5 + A2 + 13 3A2 2 A2 2 n 0 1 2 3 4 5 6 7 8 For n = 2, w[n] ∗ x[n − 3] = 11 so A2 = 6. Thus, x[2] = x[−2] = 3, and we have fully specified x[n]: 5 5 3 3 x[n] 1 n −3 −2 −1 8.12. We have the finite-length sequence: 0 1 2 3 x[n] = 2δ[n] + δ[n − 1] + δ[n − 3] (i) Suppose we perform the 5-pt DFT: X[k] = 2 + W5k + W53k , where W5k = e −j( 2π 5 )k . 63 0≤k≤5 (ii) Now, we square the DFT of x[n]: Y [k] = X 2 [k] = 2 + 2W5k + 2W53k + 2W5k + W52k + W55k + 2W53k + W54k + W56k , 0≤k≤5 Using the fact W55k = W50 = 1 and W56k = W5k Y [k] = 3 + 5W5k + W52k + 4W53k + W54k , 0≤k≤5 (a) By inspection, y[n] = 3δ[n] + 5δ[n − 1] + δ[n − 2] + 4δ[n − 3] + δ[n − 4], 0≤n≤5 (b) This procedure performs the autocorrelation of a real sequence. Using the properties of the DFT, an alternative method may be achieved with convolution: y[n] = IDFT{X 2 [k]} = x[n] ∗ x[n] The IDFT and DFT suggest that the convolution is circular. Hence, to ensure there is no aliasing, the size of the DFT must be N ≥ 2M − 1 where M is the length of x[n]. Since M = 3, N ≥ 5. 8.13. (a) g1 [n] = x[N − 1 − n], G1 [k] = N −1 X n=0 Let m = N − 1 − n, 0 ≤ n ≤ (N − 1) x[N − 1 − n]WNkn , G1 [k] = N −1 X 0 ≤ k ≤ (N − 1) k(N −1−m) x[m]WN m=0 = k(N −1) WN N −1 X x[m]WN−km m=0 k(N −1) Using WNk = e−j(2πk/N ) , WN = WN−k = ej(2πk/N ) G1 [k] = ej(2πk/N ) = G1 [k] = j(2πk/N e H7 [k] N −1 X x[m]ej(2πkm/N ) m=0 jω X(e )|ω=(2πk/N ) (b) g2 [n] = (−1)n x[n], 64 0 ≤ n ≤ (N − 1) N −1 X (−1)n x[n]WNkn , G2 [k] = 0 ≤ k ≤ (N − 1) n=0 N −1 X = ( N )n x[n]WN 2 WNkn n=0 N −1 X = (k+ N 2 )n x[n]WN n=0 X(ejω )|ω=2π(k+ N )/N = 2 G2 [k] = H8 [k] (c) g3 [n] = x[n], 0 ≤ n ≤ (N − 1) x[n − N ], N ≤ n ≤ (2N − 1) 0, otherwise 2N −1 X G3 [k] = kn x[n]W2N , 0 ≤ k ≤ (N − 1) n=0 N −1 X = kn + x[n]W2N n=0 N −1 X = n=N kn x[n]W2N + n=0 N −1 X = n=0 = = 2N −1 X N −1 X kn x[n − N ]W2N k(m+N ) x[m]W2N m=0 kn kN x[n] 1 + W2N W2N (kN/2) 1 + WN k 1 + (−1) G3 [k] = H3 [k] −1 NX (kn/2) x[n]WN n=0 jω X(e )|ω=(πk/N ) (d) g4 [n] = G4 [k] = ( x[n] + x[n + N/2], 0 ≤ n ≤ (N/2 − 1) 0, otherwise N/2−1 X x[n] + x[n + n=0 N/2−1 = kn + x[n]WN/2 X kn x[n]WN/2 + n=0 N −1 X X kn x[n + N/2]WN/2 n=0 n=0 = 0 ≤ k ≤ (N − 1) N/2−1 X N/2−1 = N kn , ] WN/2 2 N −1 X m=N/2 x[n]WN2kn n=0 65 k(m−N/2) x[m]WN/2 = X(ejω )|ω=(4πk/N ) G4 [k] = H6 [k] (e) x[n], g5 [n] = 0, 0, 2N −1 X G5 [k] = 0 ≤ n ≤ (N − 1) N ≤ n ≤ (2N − 1) otherwise kn x[n]W2N , 0 ≤ k ≤ (N − 1) n=0 N −1 X = kn x[n]W2N n=0 = X(ejω )|ω=(πk/N ) G5 [k] = H2 [k] (f) g6 [n] = ( G6 [k] = x[n/2], n even, 0, 0 ≤ n ≤ (2N − 1) n odd 2N −1 X kn x[n/2]W2N , 0 ≤ k ≤ (N − 1) n=0 = N −1 X x[n]WNkn n=0 = G6 [k] = X(ejω )|ω=(2πk/N ) H1 [k] (g) g7 [n] = x[2n], 0 ≤ n ≤ (N/2 − 1) N 2 G7 [k] = −1 X kn , x[2n]WN/2 0 ≤ k ≤ (N − 1) n=0 = N −1 X x[n] n=0 = N −1 X = G7 [k] = WNkn (N/2)n x[n] n=0 = 1 + (−1)n 2 1 + WN 2 ! WNkn N −1 1 X n(k+N/2) x[n] WNnk + WN 2 n=0 i 1h X(ej(2π/N ) ) + X(ej(2π/N )(k+N/2) ) 2 H5 [k] 66 8.14. From Table 8.2, the N-pt DFT of an N-pt sequence will be real-valued if x[n] = x[((−n))N ]. For 0 ≤ n ≤ (N − 1), this may be stated as, x[n] = x[N − n], 0 ≤ n ≤ (N − 1) For this case, N = 10, and x[1] = x[9] x[2] = x[8] .. . The Fourier transform of x[n] displays generalized linear phase (see Section 5.7.2). This implies that for x[n] 6= 0, 0 ≤ n ≤ (N − 1): x[n] = x[N − 1 − n] For N = 10, x[0] = x[9] x[1] = x[8] x[2] = x[7] .. . To satify both conditions, x[n] must be a constant for 0 ≤ n ≤ 9. 8.15. We have two 100-pt sequences which are nonzero for the interval 0 ≤ n ≤ 99. If x1 [n] is nonzero for 10 ≤ n ≤ 39 only, the linear convolution x1 [n] ∗ x2 [n] is a sequence of length 40 + 100 − 1 = 139, which is nonzero for the range 10 ≤ n ≤ 139. A 100-pt circular convolution is equivalent to the linear convolution with the first 40 points aliased by the values in the range 100 ≤ n ≤ 139. Therefore, the 100-pt circular convolution will be equivalent to the linear convolution only in the range 40 ≤ n ≤ 99. 8.16. (a) Since x[n] is 50 points long, and h[n] is 10 points long, the linear convolution y[n] = x[n] ∗ h[n] must be 50 + 10 − 1 = 59 pts long. (b) Circular convolution = linear convolutin + aliasing. If we let y[n] = x[n] ∗ h[n], a more mathematical statement of the above is given by x[n] N h[n] = ∞ X y[n + rN ], r=−∞ 0 ≤ n ≤ (N − 1) For N = 50, x[n] 50 h[n] = y[n] + y[n + 50], 67 0 ≤ n ≤ 49 We are given: x[n] 50 h[n] = 10 Hence, y[n] + y[n + 50] = 10, Also, y[n] = 5, 0 ≤ n ≤ 4. Using the above information: 0 ≤ n ≤ 49 n=0 .. . y[0] + y[50] = 10 n=4 y[4] + y[54] = 10 y[50] = 5 y[54] = 5 n=5 .. . y[5] + y[55] = 10 n=8 y[8] + y[58] = 10 y[55] = ? y[58] = ? n=9 .. . y[9] n = 49 = 10 y[49] = 10 To conclude, we can determine y[n] for 9 ≤ n ≤ 55 only. (Note that y[n] for 0 ≤ n ≤ 4 is given.) 8.17. We have B A n 0 9 30 39 C n 10 19 (a) The linear convolution x[n] ∗ y[n] is a 40 + 20 − 1 = 59 point sequence: B∗C A∗C n 10 28 68 40 58 Thus, x[n] ∗ y[n] = w[n] is nonzero for 10 ≤ n ≤ 28 and 40 ≤ n ≤ 58. (b) The 40-pt circluar convolution can be obtained by aliasing the linear convolution. Specifically, we alias the points in the range 40 ≤ n ≤ 58 to the range 0 ≤ n ≤ 18. Since w[n] = x[n] ∗ y[n] is zero for 0 ≤ n ≤ 9, the circular convolution g[n] = x[n] 40 y[n] consists of only the (aliased) values: w[n] = x[n] ∗ y[n], 40 ≤ n ≤ 49 Also, the points of g[n] for 18 ≤ n ≤ 39 will be equivalent to the points of w[n] in this range. To conclude, w[n] = g[n], 18 ≤ n ≤ 39 w[n + 40] = g[n], 0 ≤ n ≤ 9 8.18. (a) The two sequences are related by the circular shift: h2 [n] = h1 [((n + 4))8 ] Thus, H2 [k] = W8−4k H1 [k] and |H2 [k]| = |W8−4k H1 [k]| = |H1 [k]| So, yes the magnitudes of the 8-pt DFTs are equal. (b) h1 [n] is nearly like (sin x)/x. Since H2 [k] = ejπk H1 [k], h1 [n] is a better lowpass filter. 8.19. (a) Overlap add: If we divide the input into sections of length L, each section will have an output length: L + 100 − 1 = L + 99 Thus, the required length is L = 256 − 99 = 157 If we had 63 sections, 63 × 157 = 9891, there will be a remainder of 109 points. Hence, we must pad the remaining data to 256 and use another DFT. Therefore, we require 64 DFTs and 64 IDFTs. Since h[n] also requires a DFT, the total: 65 DFTs and 64 IDFTs (b) Overlap save: We require 99 zeros to be padded in from of the sequence. The first 99 points of the output of each section will be discarded. Thus the length after padding is 10099 points. The length of each section overlap is 256 − 99 = 157 = L. We require 65 × 157 = 10205 to get all 10099 points. Because h[n] also requires a DFT: 66 DFTs and 65 IDFTs (c) Ignoring the transients at the beginning and end of the direct convolution, each output point requires 100 multiplies and 99 adds. overlap add: # mult = 129(1024) = 132096 # add = 129(2048) = 69 264192 overlap save: # mult = 131(1024) = 134144 # add = 131(2048) = 268288 direct convolution: # mult = 100(10000) = # add = 99(10000) = 1000000 990000 8.20. First we need to compute the values Q[0] and Q[3]: Q[0] = X1 (1) = X1 (ejw )|w=0 ∞ X 1 = x1 [n] = 1 1 − 4 n=0 4 3 Q[3] = X1 (−1) = X1 (ejw) |w=π ∞ X = x1 [n](−1)n = n=0 4 3 = One possibility for Q[k], the six-point DFT, is: Q[k] = 4 4 δ[k] + δ[k − 3]. 3 3 We then find q[n], for 0 ≤ n < 6 : 5 2π 1X Q[k]e 6 kn 6 q[n] = k=0 1 4 4 ( + (−1)n ) 6 3 3 2 (1 + (−1)n ) 9 = = otherwise it’s 0. Here’s a sketch of q[n]: 4/9 4/9 4/9 q[n] n 0 1 2 3 4 5 70 8.21. We have: DF T7 {x2 [n]} = X2 [k] = 4 X x2 [n]e−j 2π 7 kn . 0 Then: 6 x2 [0] = = = = 1X X2 [k] 7 1 7 1 7 k=0 6 X k=0 6 X (Re{X2 [k]} + jIm{X2 [k]}) Re{X2[k]} , since x2 [0] is real. k=0 g[0]. To determine the relationship between x2 [1] and g[1], we first note that since x2 [n] is real: X(ejw ) = X ∗ (e−jw ). Therefore: X[k] = X ∗ [N − k] , k = 0, ..., 6. We thus have: 6 g[1] = = = = = = = = 1X Re{X2 [k]}W7−k 7 1 7 1 7 k=0 6 X k=0 6 X k=0 X2 [k] + X2∗ [k] −k W7 2 6 X2 [k] −k 1 X X2 [N − k] −k W7 + W7 2 7 2 k=0 6 1 1 X x2 [1] + X2 [k]W7k 2 14 1 1 x2 [1] + 2 14 k=0 6 X X2 [k]W7−6k k=0 1 (x2 [1] + x2 [6]) 2 1 (x2 [1] + 0) 2 1 x2 [1]. 2 8.22. (i) This corresponds to xi [n] = x∗i [((−n))N ], where N = 5. Note that this is only true for x2 [n]. (ii) Xi (ejw ) has linear phase corresponds to xi [n] having some internal symmetry, this is only true for x1 [n]. 71 (iii) The DFT has linear phase corresponds to x̃i [n] (the periodic sequence obtained from xi [n]) being symmetric, this is true for x1 [n] and x2 [n] only. 8.23. (a) No. x[n] only has N degrees of freedom and we have M ≥ N constraints which can only be satisfied if x[n] = 0. Specifically, we want X(ej 2πk M ) = DF TM {x[n]} = 0. Since M ≥ N , there is no aliasing and x[n] can be expressed as: x[n] = M−1 1 X kn X[k]WM , n = 0, ..., M − 1. M k=0 Where X[k] is the M -point DFT of x[n], since X[k] = 0, we thus conclude that x[n] = 0, and therefore the answer is NO. (b) Here, we only need to make sure that when time-aliased to M samples, x[n] is all zeros. For example, let x[n] = δ[n] − δ[n − 2] then, X(ejw ) = 1 − e−2jw . Let M = 2, then we have X(ej 2π 2 0 ) = j 2π 2 1 ) = X(e 1−1=0 1−1=0 8.24. x2 [n] is x1 [n] time aliased to have only N samples. Since 1 x1 [n] = ( )n u[n], 3 We get: x2 [n] = ( 31 )n 1−( 13 )N 0 , n = 0, ..., N − 1 , otherwise 72 Solutions – Chapter 9 Computation of the Discrete-Time Fourier Transform 73 9.1. Y [k] = 2N −1 X 2π y[n]e−j( 2N )kn n=0 = N −1 X 2 e−j(π/N )n e−j(2π/N )(k/2)n + n=0 = N −1 X = 2 e−j(π/N )n e−j(2π/N )(k/2)n n=N 2 e−j(π/N )n e−j(2π/N )(k/2)n + n=0 N −1 X 2N −1 X N −1 X 2 e−j(π/N )(l+N ) e−j(2π/N )(k/2)(l+N ) l=0 2 e−j(π/N )n e−j(2π/N )(k/2)n + e−jπk n=0 = N −1 X N −1 X e−j(π/N )(l 2 +2N l+N 2 ) −j(2π/N )(k/2)l e l=0 2 e−j(π/N )n e−j(2π/N )(k/2)n + (−1)k n=0 N −1 X 2 e−j(π/N )l e−j(2π/N )(k/2)l l=0 = (1 + (−1)k ) = ( N −1 X 2 e−j(π/N )n e−j(2π/N )(k/2)n n=0 2X[k/2], k even 0, k odd Thus, Y [k] = ( √ 2 2 N e−jπ/4 ej(π/N )k /4 , k even 0, k odd 9.2. (a) We offer two solutions to this problem. Solution #1: Looking at the DFT of the sequence, we find X[k] = N −1 X x[n]e−j2πkn/N n=0 (N/2)−1 = X x[n]e−j2πkn/N + n=0 (N/2)−1 X x[n]e X x[n][1 − (−1)k ]e−j2πkn/N −j2πkn/N n=0 n=0 = + X x[r + (N/2)]e−j2πk[r+(N/2)]/N r=0 (N/2)−1 = x[n]e−j2πkn/N n=N/2 (N/2)−1 = N −1 X 0, k even Solution #2: Alternatively, we can use the circular shift property of the DFT to find 2π N X[k] = −X[k]e−j( N )k( 2 ) = −(−1)k X[k] = (−1)k+1 X[k] When k is even, we have X[k] = −X[k] which can only be true if X[k] = 0. 74 (b) Evaluating the DFT at the odd-indexed samples gives us X[2k + 1] = N −1 X x[n]e−j(2π/N )(2k+1)n n=0 N/2−1 = X x[n]e−j2πn/N e−j2πkn/(N/2) + n=0 N −1 X x[n]e−j2πn/N e−j2πkn/(N/2) n=N/2 N/2−1 = o n X DFTN/2 x[n]e−j(2π/N )n + x[l + (N/2)]e−j2π[l+(N/2)]/N e−j2πk[l+(N/2)]/(N/2) l=0 = N/2−1 o n X DFTN/2 x[n]e−j(2π/N )n + (−1)(−1) x[l]e−j2πl/N e−j2πkl/(N/2) l=0 = n DFTN/2 2x[n]e−j(2π/N )n o for k = 0, . . . , N/2 − 1. Thus, we can compute the odd-indexed DFT values using one N/2 point DFT plus a small amount of extra computation. 75 Solutions – Chapter 10 Fourier Analysis of Signals Using the Discrete Fourier Transform 76 10.1. (a) Starting with definition of the time-dependent Fourier transform, Y [n, λ) = ∞ X y[n + m]w[m]e−jλm m=−∞ we plug in y[n + m] = M X k=0 to get Y [n, λ) = ∞ M X X m=−∞ k=0 = = M X h[k]x[n + m − k] h[k]x[n + m − k]w[m]e−jλm ∞ X h[k] x[n + m − k]w[m]e−jλm k=0 m=−∞ M X h[k]X[n − k, λ) k=0 = h[n] ∗ X[n, λ) where the convolution is for the variable n. (b) Starting with Y̌ [n, λ) = e−jλn Y [n, λ) we find Y̌ [n, λ) = e−jλn " M X k=0 = e −jλn " M X # h[k]X[n − k, λ) h[k]e j(n−k)λ k=0 = M X k=0 # X̌[n − k, λ) h[k]e−jλk X̌[n − k, λ) If the window is long compared to M , then a small time shift in X̌[n, λ) won’t radically alter the spectrum, and X̌[n − k, λ) ' X̌[n, λ) Consequently, Y̌ [n, λ) ' M X h[k]e−jλk X̌[n, λ) k=0 ' H(ejλ )X̌[n, λ) 77