# Practice Quiz 2

If you are a current student, please Log In for full access to the web site.

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

## Table of Contents

- 1) Problem 1: Transforms
- 2) Problem 2: 2D Convolution
- 3) Problem 3: Filtering
- 4) Problem 4: Bandpass Filter
- 5) Problem 5: 2D DFT

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

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[...]).

**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[...]).

**Part C**

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

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[...]).

**Part D**

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

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[...]).

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

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

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:

**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].

**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

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:

**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

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: