Starting from:

$30

EEL 3135 – Lab #06

Full Name:
EEL 3135 – Lab #06 
Question #1: (DTFT of Filters)
Download EEL3135 lab06 comment.m from Canvas, replace each of the corresponding comments
with the corresponding descriptions. This is designed to show you how to visualize and analyze the
frequency response of FIR filters by Discrete-Time Fourier Transform (DTFT) in MATLAB.
Note: You should run the code to help you understand how it works and help you write your
comments. You will use elements of this MATLAB code for the rest of the lab assignment.
Question #2: (DTFT of Common Functions)
Question #1 provides a DTFT(x,w) function to compute the frequency-domain of signal x across
normalized angular frequencies w. Note that this is exactly the same as your FreqResponse function from the previous lab. This question explores the frequency domains of common signals. Use
the DTFT function to compute the frequency-domain magnitudes and phases of the following signals. Plot the time-domain signal, the magnitude response, and the phase response. Use Question
#1 as a guide for plotting.
For each question, use only 20 values for n corresponding to n = 0 to n = 19.
For each question, answer if the data is predominantly low frequency, high frequency, or neither.
Note: Add all code into skeleton eel3135_lab06_skeleton.m from Canvas. Include all code
(and functions) in this one file so that everything is published to a single PDF.
(a) x[n] = δ[n]
(b) x[n] = δ[n − 3]
(c) x[n] = (1/2)nu[n]
(d) x[n] = (−1/2)nu[n]
(e) x[n] = u[n] − u[n − 5]
(f) x[n] = cos((π/4)n)
1
Question #3: (DTFT Properties)
This question explores the properties of the DTFT. Use the DTFT function to compute the frequencydomain magnitudes and phases of the following signals. Plot the time-domain signal, the magnitude
response, and the phase response. Use Question #1 as a guide for plotting. Each question uses the
following signal:
x[n] = (1 − cos((π/5)n)) (u[n] − u[n − 10])
For each question, use only 20 values for n corresponding to n = 0 to n = 19.
For each question, describe how each system changes the frequency domain.
(a) y[n] = x[n]
(b) y[n] = x[n − 5]
(c) y[n] = x[n] cos((π/2)n)
(d) y[n] = x[n] ∗ (x[n] cos((π/2)n))
(e) y[n] = x[n] + (x[n] cos(πn))
Question #4: (Nulling Filter)
In this problem, you will be given an audio signal with noise in Noisy.wav. Your goal is to design
and apply a nulling filter (also known as a notch or bandstop filter) to remove the noise.
(a) Use the DTFT function to calculate the DTFT of the audio file. Plot its frequency-domain
magnitude. Note: your magnitude plot should have at least 10000 points to properly identify
the noise (it may take a minute or so to compute).
(b) Identify the frequency that is contaminated with noise (Note: you can use “Tools→Data
Tips” to identify the values of specific points in the plot). Answer in your comments:
List this frequency in normalized angular frequency and continuous-time cyclic frequency.
(c) Consider the following nulling FIR filter:
y[n] = x[n] − 2 cos(wb0)x[n − 1] + x[n − 2], (1)
This filter can remove the normalized frequency specified by wb0. Design this filter to remove
the frequency that you identified in (b). Use subplot and the DTFT function to plot the
magnitude response and phase response of the filter.
(d) Apply (i.e., convolve) the nulling filter to the noisy audio data. Use the DTFT function to
plot the magnitude response of the filtered audio data. Answer in your comments: What
are the differences between the original audio and the output of the nulling filter?
(e) Listen to the output of the nulling filter. Have this audio checked off by a TA.
2

More products