EE3660 Homework #4 Solved

35.00 $

Category:

Description

5/5 - (1 vote)

  1. Determine DFS coefficients of the following periodic sequences:
    • 𝑥𝑥[𝑛𝑛] = 2 cos(𝜋𝜋𝑛𝑛/4)
    • 𝑥𝑥[𝑛𝑛] = 3 sin(0.25𝜋𝜋𝑛𝑛) + 4cos(0.75𝜋𝜋𝑛𝑛)
  1.  Let x[n] be an N-point sequence with an N-point DFT X[k].
    • If N is even and if x[n] = −x[〈𝑛𝑛 + 𝑁𝑁/2〉𝑁𝑁] for all n, then show that X[k] = 0 for even k.
    • Show that if N=4m where m is an integer and if x[n] = −x[〈𝑛𝑛 + 𝑁𝑁/4〉𝑁𝑁] for all n, then

X[k]=0 for k 4                     

  1.  Let 𝑥𝑥1[n],0 ≤ n ≤ 𝑁𝑁1 − 1, be an 𝑁𝑁1-point sequence and let 𝑥𝑥2[n], 0 ≤ n ≤ 𝑁𝑁2 − 1, be an 𝑁𝑁2 -point sequence. Let 𝑥𝑥3[n] = 𝑥𝑥1[n] ∗ 𝑥𝑥2[n] and let 𝑥𝑥4[n] = 𝑥𝑥1[n]A○N 𝑥𝑥2[n] , N ≥

max (𝑁𝑁1, 𝑁𝑁2)

  • Show that

𝑥𝑥                         (7.209)

  • Let e[n] = 𝑥𝑥4[n] −𝑥𝑥3[n], show that

e[n] = 𝑥𝑥3[n + N], max(𝑁𝑁1, 𝑁𝑁2) ≤ 𝑁𝑁 < 𝐿𝐿 0,                   𝑁𝑁 ≥ 𝐿𝐿

where L = 𝑁𝑁1 + 𝑁𝑁2 − 1

  • Verify the results in (a) and (b) for 𝑥𝑥1 = {1𝑛𝑛=0, 2,3,4}, 𝑥𝑥2 = {4𝑛𝑛=0, 3,2,1}, and N=5 and N=8

 

  1. Let 𝑥𝑥[𝑛𝑛] be a periodic sequence with fundamental period N and let 𝑋𝑋[𝑘𝑘] be its DFS. Let

𝑥𝑥3[𝑛𝑛] be periodic with period 3N consisting of three periods of 𝑥𝑥[𝑛𝑛] and let 𝑋𝑋3[𝑘𝑘] be its DFS.

Determine 𝑋𝑋3[𝑘𝑘] in terms of 𝑋𝑋[𝑘𝑘].

 

  1. The first five values of the 9-point DFT of a real-valued sequence x[n] are given by

{4, 2 − 𝑗𝑗3,3 + 𝑗𝑗2, −4 + 𝑗𝑗6,8 − 𝑗𝑗7}

Without computing IDFT and then DFT but using DFT properties only, determine the DFT of each of the following sequences:

  • 𝑥𝑥1[n] = x[〈𝑛𝑛 + 2〉9]
  • 𝑥𝑥2[n] = 2x[〈2 −𝑛𝑛〉9]
  • 𝑥𝑥3[n] = x[n]A○9 x[〈−𝑛𝑛〉9]
  • 𝑥𝑥4[n] = x2[𝑛𝑛]
  • 𝑥𝑥5[n] = x[𝑛𝑛]e−j4πn/9

 

II Program Assignment

  1. Let x[n] = n(0.9)𝑛𝑛𝑢𝑢[𝑛𝑛],
    • Determine the DTFT 𝑋𝑋(𝑒𝑒𝑗𝑗𝑗𝑗) of x[n]. Please write your calculations and answer on your .mlx file.
    • Choose first N = 20 samples of x[n] and compute the approximate DTFT 𝑋𝑋𝑁𝑁(𝑒𝑒𝑗𝑗𝑗𝑗) using the fft Plot magnitudes of 𝑋𝑋(𝑒𝑒𝑗𝑗𝑗𝑗) and 𝑋𝑋𝑁𝑁(𝑒𝑒𝑗𝑗𝑗𝑗) in one plot and compare your results.
    • Repeat part (b) using N = 50.
    • Repeat part (b) using N = 100.

 

  1. (Let x[n] = 𝑥𝑥1[n] + 𝑗𝑗𝑥𝑥2[n] where sequences 𝑥𝑥1[n] and 𝑥𝑥2[n] are real-valued.
    • Show that 𝑋𝑋1[k] = 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐[𝑘𝑘] 𝑎𝑎𝑛𝑛𝑎𝑎 𝑗𝑗𝑋𝑋2[k] = 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐[𝑘𝑘]. Please write your calculations and answer on your .mlx file.
    • Write a MATLAB function [X1,X2] = tworealDFTs(x1,x2) that implements the results in part (a).
    • Verify your function on the following two sequences: 𝑥𝑥1[n] = 0.9𝑛𝑛, 𝑥𝑥2[n] = (1 − 0.8𝑛𝑛);

0 ≤ n ≤ 49

 

  1.  Let 𝑥𝑥1[n] = {1𝑛𝑛=0, 2,3,4,5} be a 5-point sequence and let 𝑥𝑥2[n] = {2𝑛𝑛=0, −1,1, −1} be a 4-point sequence.
    • Determine 𝑥𝑥1[n]A○5 𝑥𝑥2[n] using hand calculations. Please write your calculations and answer on your .mlx file.
    • Verify your calculations in (a) using the circonv
    • Verify your calculations in (a) by computing the DFTs and IDFT.

 

  1. Let 𝑥𝑥1[n] be an 𝑁𝑁1-point and 𝑥𝑥2[n] be an 𝑁𝑁2-point sequence. Let N ≥ max(N1,N2). Their N-point circular convolution is shown to be equal to the aliased version of their linear convolution in (7.209) in Program Assignment 3. This result can be used to compute the circular convolution via the linear convolution.
    • Develop a MATLAB function

y = lin2circonv(x,h) that implements this approach.

  • For x[n] = {1𝑛𝑛=0, 2,3,4} and h[n] = {1𝑛𝑛=0, −1,1, −1} determine their 4-point circular convolution using the lin2circonv function and verify using the circonv

 

  1. (15%) Let a 2D filter impulse response h[m, n] be given by

1     − 𝑚𝑚2+2𝑛𝑛2

h[m,n] = 2𝜋𝜋𝜎𝜎2 𝑒𝑒    2𝜎𝜎                  , −128 ≤ m, n ≤ 127

0         , 𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒

where σ is a parameter. For this problem use the “Lena” image.

  • For σ = 4, determine h[m, n] and compute its 2D-DFT H[k, l] via the fft2 function taking care of shifting the origin of the array from the middle to the beginning (using the ifftshift function). Show the log-magnitude of H[k, l] as an image.
  • Process the “Lena” image in the frequency domain using the above H[k, l]. This will involve taking 2D-DFT of the image, multiplying the two DFTs and then taking the inverse of the product. Comment on the visual quality of the resulting filtered image.
  • Repeat (a) and (b) for σ = 32 and comment on the resulting filtered image as well as the difference between the two filtered images.
  • The filtered image in part (c) also suffers from an additional distortion due to a spatialdomain aliasing effect in the circular convolution. To eliminate this artifact, consider both the image and the filter h[m, n] as 512 × 512 size images using zero-padding in each dimension. Now perform the frequency-domain filtering and comment on the resulting filtered image.
  • Repeat part (b) for σ = 4 but now using the frequency response 1 H[k, l] for the filtering.

Compare the resulting filtered image with that in (b).

  • HW4-fwwzuc.zip