You are on page 1of 2

ELEC 2651 Signal Processing Fall 2021

HOMEWORK ASSIGNMENT #4
Assigned: 10/13/21
Due: 10/27/21 (11:59 PM)

1. LTI System: Please do Problem P-5.13 on page 191

2. Convolution: Please do Problem P-5.19 on page 193

3. Frequency Response: Please do Problem P-6.4 on page 231

4. Frequency Response I: Please do Problem P-6-9 on page 233

5. Frequency Response II: Please do Problem P-6.14 on page 234, parts (a) – (c) only, you do not need to do
part (d)

6. Creating and Applying Filters. Download and load into MATLAB the file HW4Problem6.mat. The
file contains a signal x and sampling frequency fs. The signal is the C major scale that we have looked at in
class.

a) Use the code spectrogram(y,256,250,[],Fs,'yaxis') to create a spectrogram of the


original signal x.
b) Create a low pass filter with cutoff frequency of 350 Hz using the MATLAB fir1 command. Make the
filter length be 1024. Use freqz to plot the filter response.
c) Apply the low pass filter to x and plot the spectrogram of the filtered signal
d) Create a stop band filter that block out frequencies between 300 Hz and 400 Hz using the MATLAB
fir1 command. Make the filter length be 1024. Use freqz to plot the filter response.
e) Apply the band pass filter to x and plot the spectrogram of the filtered signal

7. Secret Message from the Boss. Your supervisor has encoded a secret message for you in an audio
recording using AM modulation and interference so no one else can hear it. Download the file
HW4Problem7.mat, which has the variables x,fs and h2. h2 is the impulse response of one of the
filters you need. Apply the following systems to the input signal x to get the audio message y. You will
need to create the filter h1 on your own. Use sound(y, fs) to listen to the message. Submit an audio file of
the message signal y.

Mixer
(multiplication)
Lowpass filter h1
x[n] Interference y[n]
with cutoff at
removal
3000 Hz and 1024
filter h2 given
elements
in file

cos(2π4000t)
Hints:
 You can listen to the signal at any point using sound(y, fs)
 To do the multiplication in the mixer you will have to create a time vector of right length and with Δt=1/fs
 If you do all steps correctly you should not only hear a clear voice but also a phone ring in the
background at the beginning.

You might also like