0% found this document useful (0 votes)
45 views3 pages

MATLAB Assignment 2

Uploaded by

Pranav Chaitanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

MATLAB Assignment 2

Uploaded by

Pranav Chaitanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Department of Electrical Engineering

IIT Madras, Chennai 600 036.


EE 5130 Digital Signal Processing
July – November 2025

Computer Assignment Submission Instructions

• You can work individually of as a team of two students


• Please submit the following
o Required plots
o Include brief explanation of observations, as appropriate
o Listing of code written by you

• The submitted file should be in .pdf format

• Please ensure name and roll number of both team members are
clearly written

• Use following naming convention for file you


o Roll-number1_assign# . pdf
o example: EE22Mxxx_assign1. pdf

• Assignment submission via Moodle


o Do not send via email

• Honour Code:
o Add this line to your assignment and an electronic signature
o I certify that this assignment submission is my own work and
not from obtained from any other source

Prof. David Koilpillai Phone: +91-44-2257-4405


koilpillai@[Link]
Department of Electrical Engineering
IIT Madras, Chennai 600 036.

EE 5130 DSP (July – Nov 2025)

MATLAB Assignment #2
(Submission Deadline: August 24, 2025)

1. Frequency response of Rectangular Window


Consider the rectangular window given by
1
 , 0  n  M −1
h[n] =  M
 0, otherwise
M −1
Compute the DTFT H (e j ) =  h[n] e
n =0
− j n
, for M = 5 and  in range [ − , 2 ] in

steps of 0.01 .
a) Plot H (e j ) versus  in the range [0, 2 ]
b) Plot 20 log 10 H (e j ) in the range [ − ,  ]
c) Repeat Step (b) for M = 10 and M = 20
d) For each case, obtain (approx.) location of the first zero in [0,  ] , Estimate the
height of the peak of 20 log 10 H (e j ) between the first zero of the frequency
response and  = 

2. Notch Filter
Consider a LTI system with the transfer function
H (e j  ) =
( )( )
1 − e − j ( − ) 1 − e − j ( + )
, where r = 0.9 and  =
2
(
1 − re )(
− j ( − )
1 − re )
− j ( + )
5
j
a) Plot 20 log 10 H (e ) in the range [ − ,  ] , in steps of 0.01 . Comment on the
type of the response
b) Consider a signal x[n] which is a sum of two sinusoids with frequencies 60 Hz
1
and 35 Hz, sampled with a sampling period Ts = sec., i.e.,
300
x(t ) = cos(2 60t ) + cos(2 35t ) t = nT which yields the sequence
s

 n   n 
x[n] = cos 2 60  + cos 2 35  . Generate 160 samples of x[n] and pass
 300   300 
it through the filter described above. Plot the input x[n] and the corresponding
time-domain output y[n] = x[n]  h[n] , in the range n = [10, 150 ] . Explain your
observations.
c) Comment on the frequency response of the filter for r=0.5 and r=0.99

Prof. David Koilpillai Phone: +91-44-2257-4405


koilpillai@[Link]
Department of Electrical Engineering
IIT Madras, Chennai 600 036.

3. Effect of Windowing
Let h[n] = a n u[n] be the impulse response of a discrete-time LTI system and
H (e j  ) be its DTFT.
e) For the case with a = 0.977 , plot the log-magnitude of the DTFT 20 log 10 H (e j )
for  in the range [ − ,  ] , in steps of 0.01 .
f) Plot the log-magnitude of the DTFT of the truncated impulse response for
lengths L = 32, 64, 128 , and 256 . Plot all four results together with a four-panel
subplot. Overlay each plot with the true DTFT (untruncated sequence).
Comment on the changes observed as the length L of the sequence increases.
Explain the observed effect in terms of a window transform W (e j  ) operating
on the true spectrum.

Prof. David Koilpillai Phone: +91-44-2257-4405


koilpillai@[Link]

You might also like