full name: eel 4750 / eee 5502 (fall 2020) { hw #11 due: 4

3
Full Name: EEL 4750 / EEE 5502 (Fall 2020) – HW #11 Due: 4:00 PM ET, Nov. 23, 2020 Concept Questions 11 Question #1: Consider the DTFT of x[n] shown below (a) Sketch the DTFT of x[n] after downsampling by 2 (without an anti-aliasing filter) (b) Sketch the DTFT of x[n] after downsampling by 4 (without an anti-aliasing filter) (c) Sketch the DTFT of x[n] after downsampling by 2 (with an anti-aliasing filter) (d) Sketch the DTFT of x[n] after downsampling by 4 (with an anti-aliasing filter) Question #2: Consider the DTFT of x[n] shown below (a) Sketch the DTFT of x[n] after upsampling by 2 (without an interpolation filter) (b) Sketch the DTFT of x[n] after upsampling by 4 (without an interpolation filter) (c) Sketch the DTFT of x[n] after upsampling by 2 (with an interpolation filter) (d) Sketch the DTFT of x[n] after upsampling by 4 (with an interpolation filter) Question #3: One of the useful aspects of Noble properties is that they can help simplify complex expressions with downsampling and upsmapling. (a) Use the Noble properties for upsampling and downsampling to simplify the following block digram. Represent the results as a block diagram. It should use no more than one downsam- pling operation, one upsampling operation, and two filter operations. 4 8 1

Upload: others

Post on 14-Mar-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Full Name:

EEL 4750 / EEE 5502 (Fall 2020) – HW #11 Due: 4:00 PM ET, Nov. 23, 2020

Concept Questions 11

Question #1: Consider the DTFT of x[n] shown below

(a) Sketch the DTFT of x[n] after downsampling by 2 (without an anti-aliasing filter)

(b) Sketch the DTFT of x[n] after downsampling by 4 (without an anti-aliasing filter)

(c) Sketch the DTFT of x[n] after downsampling by 2 (with an anti-aliasing filter)

(d) Sketch the DTFT of x[n] after downsampling by 4 (with an anti-aliasing filter)

Question #2: Consider the DTFT of x[n] shown below

(a) Sketch the DTFT of x[n] after upsampling by 2 (without an interpolation filter)

(b) Sketch the DTFT of x[n] after upsampling by 4 (without an interpolation filter)

(c) Sketch the DTFT of x[n] after upsampling by 2 (with an interpolation filter)

(d) Sketch the DTFT of x[n] after upsampling by 4 (with an interpolation filter)

Question #3:One of the useful aspects of Noble properties is that they can help simplify complex expressionswith downsampling and upsmapling.

(a) Use the Noble properties for upsampling and downsampling to simplify the following blockdigram. Represent the results as a block diagram. It should use no more than one downsam-pling operation, one upsampling operation, and two filter operations.

4 8

1

Theory Questions 11

Question #1: Overlap-Add Theory

(a) Consider the rectangular window function

w[n] = u[n] − u[n−W ] .

Show that∞∑

k=−∞w

[n−

(W

2

)k

]= c1

for when W is even. Prove this for any even W . Determine c1.1

(b) Consider the Hann window function

w[n] =1

2

[1 − cos

(2πn

W − 1

)][u[n] − u[n−W ]] .

Show that∞∑

k=−∞w

[n−

(W − 1

2

)k

]= c2

for when W is odd. Prove this for any odd W . Determine c2.2

Question #2: Report – EEE5502 Only

Look through the report requirements here: http://smartdata.ece.ufl.edu/eee5502/hw/2020_eee5502_hw13_prob.pdf. Your writing from the last homework should have beenyour Methodology section. Now draft either the Introduction or the Results and Discussionsection. Your choice (if you did not write a methodology section before and instead wrote one ofthese, that’s okay – you can choose the methodology this time).

Note: Feel free to use figures in these section (this is true for the last section you wrote as well). Ifyou use figures from a paper, please cite that paper in the figure caption.

1Note: There is overlap between the windows. Probably the easiest way to prove this is to identify a singleoverlapping region and show that it satisfies the above. You can then argue this applies to other regions due toperiodicity.

2Note: There is overlap between the windows. Probably the easiest way to prove this is to identify a singleoverlapping region and show that it satisfies the above. You can then argue this applies to other regions due toperiodicity.

2

Implementation Questions 11

Question #1: Included is a low-pass filter function lpf_func(x,wc,P) that uses the impulseinvariance method to design and apply a P-th order Butterworth low pass filter to signal x with acut-off frequency of wc (normalized to be between 0 and π). Use P = 10.

(a) Create a function y = downsample_func(x, N) that downsamples signal x by N. Theoutput signal y should have a length of ceil(Nx/N), where Nx is the length of the originalsignal and ceil is the ceiling function. 3

(b) Create a function y = upsample_func(x, M) that upsamples signal x by M. The outputsignal y should have a length of Nx*M, where Nx is the length of the original signal.

(c) Use the provided low-pass filter function with your downsample function to create a functiony = downsample_antialias_func(x, N) that downsamples signal x by N after passingthru an anti-aliasing filter.

(d) Use the provided low-pass filter function with your upsample function to create a functiony = upsample_interp_func(x, N) that upsample signal x by M before passing thru aninterpolation filter.

Question #2: Use your chirp function (or use the one provided) to create a chirp signal x[n]

x[n] = cos(2π(f1/(2Nx))n2

)where nx=0:Nx-1, Nx = 64, and f1=1/8 as the maximum frequency. Compute and plot theresulting signal and frequency magnitude representation for the following scenarios.

(a) Compute x[n] after downsampling by 2 (with no anti-aliasing).

(b) Compute x[n] after downsampling by 5 (with no anti-aliasing).

(c) Compute x[n] after downsampling by 5 (with anti-aliasing).

(d) Compute x[n] after upsampling by 2 (with no interpolation).

(e) Compute x[n] after upsampling by 5 (with no interpolation).

(f) Compute x[n] after upsampling by 5 (with interpolation).

Question #3: Load commander.wav, which contains audio from the Ur-Quan Masters game(http://sc2.sourceforge.net/). Our goal in this assignment is to speed up the audio andwe will look at two methods.

(a) Use your downsample function to downsample (with anti-aliasing) the audio by 3.

(b) Use the provided stft_woverlap to compute the STFT of the audio with W = 600.Downsample (across time) the STFT for each frequency. Do not use an anti-aliasing filter.4

Then use the provided istft_woverlap function to compute the inverse STFT.

(c) How are your results different for the previous two questions?

3Hint/Reminder: x(1:3:10) will grab every 3 samples of x up until sample 10.4The filter distorts the audio too much. If (on your own) you do use the anti-aliasing filter, you will hear the audio

get more “robotic” in tone.

3