# Practice Quiz 2

The questions below are due on Monday May 17, 2021; 10:00:00 PM.

You are not logged in.

Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.

You will have one hour and fifty minutes to complete this quiz. During the quiz, you may reference one sheet (front and back) of hand-written or printed notes, but you may not make use of other outside resources, including other pages on the Internet. You may use as much scratch paper as you like during the quiz, and your scratch work will not be collected.

This practice quiz consists of 5 questions. Please make sure to submit your answer to each question (you may submit as many times as you like during the quiz).

## 1) Problem 1: Transforms

Part A

Find the Fourier series coefficients of the signal x_1(\cdot), analyzed with T chosen to be the fundamental period of x_1(\cdot).

x_1(t) = 2\cos\left({\pi\over 2}t\right) + 4\cos\left({\pi\over 3}t\right)

In the box below, write a simple, closed-form answer for X_1[k]. Your expression can depend on e, pi, j, sin, cos, k, omega, OMEGA, and/or delta(...) (to represent \delta[...]).

X_1[k] =~

Part B

Find the Fourier series coefficients of the signal x_2[\cdot], shown below, which is periodic in N=10.

In the box below, write a simple, closed-form answer for X_2[k]. Your expression can depend on e, pi, j, sin, cos, k, omega, OMEGA, and/or delta(...) (to represent \delta[...]).

X_2[k] =~

Part C

Find the Fourier transform of the signal x_3(\cdot) as defined below:

x_3(t) = \begin{cases} 1 & \text{if}~-1\leq t \leq 2\\ 0 & \text{otherwise} \end{cases}

In the box below, write a simple, closed-form answer for X_3(\omega). Your expression can depend on e, pi, j, sin, cos, k, omega, OMEGA, and/or delta(...) (to represent \delta[...]).

X_3(\omega) =~

Part D

Find the Fourier transform of the signal x_4[\cdot], defined below:

x_4[n] = \delta[n+3] + \delta[n+1] - \delta [n-1] + \delta[n-3]

In the box below, write a simple, closed-form answer for X_4(\Omega). Your expression can depend on e, pi, j, sin, cos, k, omega, OMEGA, and/or delta(...) (to represent \delta[...]).

X_4(\Omega) =~

## 2) Problem 2: 2D Convolution

For this problem, we will consider the following 2D signals, labeled x_0 through x_{10}, each of which is 9 rows \times 13 columns. Note that the color scale is different between some of the signals.

For each circular convolution below, indicate which of the graphs that follow most closely matches the result by entering a single letter in each box. Note that, for each graph on the facing page, black corresponds to the lowest value in the signal (not necessarily 0), and white corresponds to the highest value in the signal (not necessarily 1).

x_{1}\circledast x_0 matches graph:

x_{2}\circledast x_0 matches graph:

x_{3}\circledast x_0 matches graph:

x_{4}\circledast x_0 matches graph:

x_{5}\circledast x_0 matches graph:

x_{6}\circledast x_0 matches graph:

x_{7}\circledast x_0 matches graph:

x_{8}\circledast x_0 matches graph:

x_{9}\circledast x_0 matches graph:

x_{10}\circledast x_0 matches graph:

## 3) Problem 3: Filtering

In this problem, we'll look at the results of applying various filters to an image. Our input image x[r,c] is the following 201\times 201 image, where dark grey represents 0 and white represents 1 (this image only contains 0's and 1's):

Each of the images below is a representation of the (purely real) DFT of a filter, where dark grey represents 0 and white represents 1. Match each filter with the spatial-domain result below that most closely matches the result of applying that filter to the image above. For each filter, enter the name of the best matching signal from below.

Filter A:

matching image:

Filter B:

matching image:

Filter C:

matching image:

Filter D:

matching image:

Filter E:

matching image:

Filter F:

matching image:

y_{1}[r, c] y_{2}[r, c] y_{3}[r, c]

y_{4}[r, c] y_{5}[r, c] y_{6}[r, c]

y_{7}[r, c] y_{8}[r, c] y_{9}[r, c]

y_{10}[r, c] y_{11}[r, c] y_{12}[r, c]

## 4) Problem 4: Bandpass Filter

Part 1

Let h[n] represent a discrete-time signal whose DTFT H(\Omega) is zero in the interval [-\pi,\pi] except when 0.09\pi\le|\Omega|\le0.15\pi where its value is 1. H(\Omega) is also periodic in 2\pi as illustrated in the following plot.

We would like to use H(\Omega) as a filter to select a narrow band of frequencies from an input signal that will be acquired using a sampling frequency of f_s samples/second.

What sampling frequency should we use so that the narrow band of frequencies is centered on 600Hz? Enter a single integer representing f_s in the box below:

Determine a closed form expression for the unit-sample response h[n] of this filter. Enter your answer as a Python expression in the box below:

h[n] =~

Part 2

We would like to implement the bandpass filter in part 1 using a DFT of length N, where N is 10, 20, 50, or 100.

For each of these values of N, we can create the DFT version of the filter H_N[k] by sampling H(\Omega) uniformly across frequency, such that H_N[0] = H(0), H_N[1] = H\left({2\pi\over N}\right), H_N[2] = H\left({4\pi\over N}\right), etc.

For each of these values of N, calculate the unit-sample response h_N[n], which is the inverse DFT of H_N[k].

h_{10}[n] =~
h_{20}[n] =~
h_{50}[n] =~
h_{100}[n] =~

Part 3

Which of the following statements best describes the relation between h_N[n] (from part 2) and h[n] (from part 1)?

 h_N[n] is an "aliased" version of h[n] as follows: h_N[n] = N\!\!\sum_{m=-\infty}^\infty h[n{-}mN] h_N[n] is a truncated version of h[n] as follows: h_N[n] = \begin{cases}h[n]&\text{if}~0\le n\lt N\\0&\text{otherwise}\end{cases} h_N[n] is equal to h[n], but we must circularly convolve with h_N[n] to get the same answer that we would get by regular convolution with h[n]. h_N[n] is a sampled and rescaled version of h[n] as follows: h_N[n] = Nh[n/N] None of the above.

## 5) Problem 5: 2D DFT

Part 1

Let f_1[r, c] represent a 2D signal defined on the region 0\le r\lt16 and 0\le c\lt16 where

f_1[r,c]=\delta[r-3]\delta[c-2]

Let F_1[k_r,k_c] represent the 2D DFT of this signal over the region 0\le k_r\lt16 and 0\le k_c\lt16. Enter closed-form expressions for each of the values below:

|F_1[3, 0]| =~

|F_1[3, 3]| =~

{\rm Re}\left(F_1[4, 4]\right) =~

{\rm Im}\left(F_1[4, 4]\right) =~

Part 2

Let f_2[r, c] represent a 2D signal defined on the region 0\le r\lt16 and 0\le c\lt16 where

f_2[r, c]=\delta[r-3]+\delta[c-2]

Let F_2[k_r,k_c] represent the 2D DFT of this signal over the region 0\le k_r\lt16 and 0\le k_c\lt16. Enter closed-form expressions for each of the values below:

|F_2[3, 0]| =~

|F_2[3, 3]| =~

{\rm Re}\left(F_2[5, 0]\right) =~

{\rm Im}\left(F_2[5, 5]\right) =~