Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ELEC 2651 Signal Processing Spring 2024

HOMEWORK ASSIGNMENT #7
Assigned: Mar 24, 2024
Due: Mar 29, 2023

1. Frequency Response I: An LTI filter’s frequency response can be represented as:


̂
1 1
H(𝑒 j𝜔 ) = (1 + 𝑒 −j𝜔𝑡 + 𝑒 −j2𝜔𝑡 + 𝑒 −j3𝜔𝑡 + 𝑒 −j4𝜔𝑡 )
2 2
a. Find the difference equation of the LTI Filter.
̂ ̂ ̂ no ̂
b. Express the frequency response in the form H(𝑒 j𝜔 ) = R(𝑒 j𝜔 )𝑒 j𝜔 . Where R(𝑒 j𝜔 ) is a real
function and no is an integer.
c. When the input signal is x(t) = 2cos(2π(500)t) + cos(2π(1000)t), determine the output signal when
the discrete signal is sampled at:
i. Fs = 100kHz
ii. Fs = 10kHz
iii. Fs = 5kHz

2. Frequency Response II: Suppose that three systems are connected in cascade, where the output of S1 is the
input of S2, and the output of S2 is the input of of S3. The three systems are specified as follows:
S1 = x1 [𝑛] − x1 [𝑛 − 2]
S2 = x2 [n] + x2 [n-2]
S3 = x3 [n-1] + x3 [n-2]
Where the output of Si is yi[n] and its input is xi[n].
a. Determine the frequency response of the three individual systems.
b. Determine the overall frequency response of the cascade system as a simple formula.
c. Determine the difference equation of the equivalent system. Thus, x[n] is x1[n] and y[n] is y3[n].

3. Creating and Applying Filters. Download and load into MATLAB the file HW7Problem3.mat. The
file contains a signal x and sampling frequency fs.

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

4. 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
HW7Problem4.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.
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