Starting from:

$25

EE3660-Homework 4 Solved

Paper Assignment  
1.         Determine DFS coefficients of the following periodic sequences:

(a)   π‘₯π‘₯[𝑛𝑛] = 2 cos(πœ‹πœ‹π‘›π‘›/4)

(b)   π‘₯π‘₯[𝑛𝑛] = 3 sin(0.25πœ‹πœ‹π‘›π‘›) + 4cos(0.75πœ‹πœ‹π‘›π‘›)

 

2.         Let x[n] be an N-point sequence with an N-point DFT X[k].

(a)   If N is even and if x[n] = −x[⟨𝑛𝑛 + 𝑁𝑁/2⟩𝑁𝑁] for all n, then show that X[k] = 0 for even k.

(b)   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                  

 

3.         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)

(a)   Show that  

                     π‘₯π‘₯                          (7.209)

(b)   Let e[n] = π‘₯π‘₯4[n] −π‘₯π‘₯3[n], show that

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

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

(c)   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

 

4.         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 𝑋𝑋[π‘˜π‘˜].

 

5.         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:

(a)   π‘₯π‘₯1[n] = x[⟨𝑛𝑛 + 2⟩9]

(b)   π‘₯π‘₯2[n] = 2x[⟨2 −𝑛𝑛⟩9]

(c)   π‘₯π‘₯3[n] = x[n]Aβ—‹9 x[⟨−𝑛𝑛⟩9]

(d)   π‘₯π‘₯4[n] = x2[𝑛𝑛]

(e)   π‘₯π‘₯5[n] = x[𝑛𝑛]e−j4πn/9

 

II Program Assignment  
1.     Let x[n] = n(0.9)𝑛𝑛𝑒𝑒[𝑛𝑛],

(a)      Determine the DTFT 𝑋𝑋(𝑒𝑒𝑗𝑗𝑗𝑗) of x[n].  Please write your calculations and answer on your .mlx file. 

(b)      Choose first N = 20 samples of x[n] and compute the approximate DTFT 𝑋𝑋𝑁𝑁(𝑒𝑒𝑗𝑗𝑗𝑗)  using the fft function. Plot magnitudes of 𝑋𝑋(𝑒𝑒𝑗𝑗𝑗𝑗) and 𝑋𝑋𝑁𝑁(𝑒𝑒𝑗𝑗𝑗𝑗) in one plot and compare your results.

(c)      Repeat part (b) using N = 50.

(d)      Repeat part (b) using N = 100.

 

2.     Let x[n] = π‘₯π‘₯1[n] + 𝑗𝑗π‘₯π‘₯2[n] where sequences π‘₯π‘₯1[n] and π‘₯π‘₯2[n] are real-valued.

(a)      Show that 𝑋𝑋1[k] = 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐[π‘˜π‘˜] π‘Žπ‘Žπ‘›π‘›π‘Žπ‘Ž 𝑗𝑗𝑋𝑋2[k] = 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐[π‘˜π‘˜]. Please write your calculations and answer on your .mlx file. 

(b)      Write a MATLAB function [X1,X2] = tworealDFTs(x1,x2)  that implements the results in part (a).

(c)      Verify your function on the following two sequences: π‘₯π‘₯1[n] = 0.9𝑛𝑛, π‘₯π‘₯2[n] = (1 − 0.8𝑛𝑛);

0 ≤ n ≤ 49

 

3.     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.

(a)      Determine π‘₯π‘₯1[n]Aβ—‹5 π‘₯π‘₯2[n] using hand calculations. Please write your calculations and answer on your .mlx file. 

(b)      Verify your calculations in (a) using the circonv function.

(c)      Verify your calculations in (a) by computing the DFTs and IDFT.

 

4.     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.

(a)      Develop a MATLAB function

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

(b)      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 function.

 

5.     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.

(a)      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.

(b)      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.

(c)      Repeat (a) and (b) for σ = 32 and comment on the resulting filtered image as well as the difference between the two filtered images.

(d)      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.

(e)      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).

More products