0% found this document useful (0 votes)
4 views7 pages

DSP Lab Spring 23 Exp-04

The document is a laboratory manual for a Digital Signal Processing lab focused on the Discrete Time Fourier Transform (DTFT). It outlines learning objectives, required equipment, and various tasks for students to evaluate and plot the DTFT using MATLAB, along with properties of DTFT. Additionally, it includes sections for student feedback and assessment rubrics for evaluating performance.

Uploaded by

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

DSP Lab Spring 23 Exp-04

The document is a laboratory manual for a Digital Signal Processing lab focused on the Discrete Time Fourier Transform (DTFT). It outlines learning objectives, required equipment, and various tasks for students to evaluate and plot the DTFT using MATLAB, along with properties of DTFT. Additionally, it includes sections for student feedback and assessment rubrics for evaluating performance.

Uploaded by

fakhar_fast
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

DIGITAL SIGNAL PROCESSING LAB

(EL-3031)
LABORATORY MANUAL

Discrete Time Fourir Transform(DTFT)


(LAB # 04)
Student Name: ______________________________________________

Roll No: ________________ Section: ____

Date performed: _____________, 2023

____________________________________________________________________________________________________________________________________________________________

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES, ISLAMABAD

Prepared by: Engr. Muhammad Asim


Last Edited by: Engr. Muhammad Asim, Feb 06, 2016
Verified by: Dr. Shahzad Saleem, Dr. Farhan Khalid Updated: Spring 2023
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________
Lab # 04: Discrete Time Fourir Transform
Learning Objectives
To study various properties of discrete time Fourier transform and verify these properties on
various signals in Matlab.
Equipment Required
1. PC
2. MATLAB

1. Introduction
If x [n] is absolutely summable, that is

∑|x [ n ]|< ∞
−∞
Then it’s discrete-time Fourier transform is given by

X ( e jw )= ∑ x [ n ] e− jwn
n=−∞

The inverse discrete-time Fourier transform (IDTFT) of X ( e jw ) is given by

π
1
x [n]= ∫ X ( e jw ) e jwn dw
2 π −π

The discrete-time Fourier transform (DTFT) X (e jw ) of a sequence x [n] is a continuous

function of ω. Since the data in MATLAB is in vector form, X (e jw ) can only be evaluated

at a prescribed set of discrete frequencies. Moreover, only a class of the DTFT that is

expressed as a rational function ine− jw in the form


− jw − jwm
p0 + p1 e + … … … … … … .. p m e
X ( e )=
jw
− jw − jwn
1¿
d 0 +d 1 e + … … … … … … .. d n e

can be evaluated.

2. DTFT Computation
The DTFT X ( e jw )of a sequence x [n]of the form of Eq. (1) can be computed easily
at a prescribed set of L discrete frequency points ω=ω l using the MATLAB function
freqz. Since X (e jw ) is a continuous function of ω, it is necessary to make L as large as
possible so that the plot generated using the command plot provides a reasonable replica
of the actual plot of the DTFT. In MATLAB, freqz computes the L-point DFT of the
_____________________________________________________________________________________________
Page 2 of 7
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________
sequences { p0 p 1 ... pM } and {d 0 d 1 ... d M } ,and then forms their ratio to arrive at X (e jwl )
l=1 , 2 , … … … … , L .For faster computation, L should be chosen as a power of 2, such as 256
or 512.

Task 01
1) Evaluate the DTFT of follwing in the range 0 ≤ w ≤ π (512 points)
− jw −2 jw −3 jw
0.7−0.5 e + 0.3 e +e
U ( e )=
jw
− jw −2 jw −3 jw
1+0.3 e −0.5 e +0.7 e
2) Compute and Plot the magnitude response, phase response, real part and imaginary part
w
of U ( e jw ) w.r.t. . Label your plots properly.
π
Hint : Commands used; “freqz”, “angle” ,”abs” , “imag”, “real”

Task 02
Is the DTFT a periodic function of ω? If it is, what is the period?

Project 4.1
% Compute the frequency samples of the DTFT
w = -4*pi:8*pi/511:4*pi;
num = [2 1];den = [1 -0.6];
h = freqz(num, den, w);
% Plot the DTFT
subplot(2,1,1)
plot(w/pi,real(h));grid
title('Real part of H(e^{j\omega})')
xlabel('\omega /\pi');
ylabel('Amplitude');
subplot(2,1,2)
plot(w/pi,imag(h));grid
title('Imaginary part of H(e^{j\omega})')
xlabel('\omega /\pi');
ylabel('Amplitude');
figure;
subplot(2,1,1)
plot(w/pi,abs(h));grid
title('Magnitude Spectrum |H(e^{j\omega})|')
xlabel('\omega /\pi');
ylabel('Amplitude');
subplot(2,1,2)
plot(w/pi,angle(h));grid
title('Phase Spectrum arg[H(e^{j\omega})]')
xlabel('\omega /\pi');
ylabel('Phase, radians');
Task 03:

1) What is the expression of the DTFT being evaluated in the above Program and on what
range this DTFT is computed in the program?

_____________________________________________________________________________________________
Page 3 of 7
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________
2) Comment on your results. Can you explain the jump in the phase spectrum ? The jump
can be removed using the MATLAB command “unwrap”. Evaluate the phase
spectrum with the jump removed.
3) Is the DTFT a periodic function of ω? If it is, what is the period?

Task 04:

1) Write matlab Program to evaluate and plot the magnitude and phase response of DTFT
of the following finite-length sequence in the range 0 ≤ w ≤ π (512 points)

g [ n ] =[1 3 57 91113 15 17]

2) Modify the your code to plot the phase response in degrees.


3) Explain the jumps in your phase spectrum?

DTFT Properties:
The DTFT satisfies a number of useful properties that are often uitilized in a number
of applications. A detailed listing of these properties and their analytical proofs can be
found in any text on digital signal processing. These properties can also be verified using
MATLAB. We list below a few selected properties that will be encountered later in this
exercise.
Time-Shifting Property – If G( e jω )denotes the DTFT of a sequence g[n] , then the DTFT

of the time-shifted sequence g[n−no] is given by e− jωn G ( e jω ) .


0

Frequency-Shifting Property – If G( e jω ) denotes the DTFT of a sequence g[n] , then the

DTFT of the sequence e j w n g[n] is given by G(e j(ω−ω ) ).


0 0

Convolution Property – If G(e jω )and H (e jω )denote the DTFTs of the sequences g[n] and

h [n ], respectively, then the DTFT of the sequence g[n]∗h [ n ] is given by G(e jω )H (e jω ).

Time-Reversal Property – If G(e jω ) denotes the DTFT of a sequence g[n], then the DTFT

of the time-reversed sequence g[−n] is given by G(e− jω ) .

Task 05:

1) Write matlab Program to evaluate and plot the magnitude and phase response of DTFT
of the following finite-length sequence in the range −π ≤ w ≤ π (256 points)

g [ n ] =[1 2 3 4 5 6 7 8 9]

_____________________________________________________________________________________________
Page 4 of 7
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________
2) Verify the time shifting property of of DTFT using n 0=10. Plot the magnitude and
phase response of the DTFT of time shifted sequence and then also plot the magnitude
and phase spectrum of e− jωn G ( e jω ) .
0

3) Verify the frequency shifting property of of DTFT using w 0=0.5 π . Plot the magnitude
and phase response of the DTFT of frequency shifted sequence and then also plot the
magnitude and phase spectrum of G ( e j (ω−ω ) ). 0

Task 06:

1) Write matlab Program to evaluate and plot the magnitude and phase response of DTFT
of the following finite-length sequences in the range −π ≤ w ≤ π (256 points)

g [ n ] =[1 2 3 4 5 6 7 8 9] , h [ n ] =[1−2 3−2 1]

2) Verify the Convolution property of DTFT by performing convolution on both of above


sequences. Plot the magnitude and phase response of the DTFT of convolved sequence
and then also plot the magnitude and phase response of G ( e jω ) H ( e jω ).

_____________________________________________________________________________________________
Page 5 of 7
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________

Student's feedback: Purpose of feedback is to know the strengths and weaknesses of the system
for future improvements. This feedback is for the 'current lab session'. Circle your choice:

[-3 = Extremely Poor, -2 = Very Poor, -1 = Poor, 0 = Average, 1 = Good, 2 = Very Good, 3 = Excellent]:
The following table should describe your experience with:
S# Field Rating Describe in words if required
1 Overall Session -
-2 -1 0 1 2 3
3
2 Lab Instructor -
-2 -1 0 1 2 3
3
3 Lab Staff -
-2 -1 0 1 2 3
3
4 Equipment -
-2 -1 0 1 2 3
3
5 Atmosphere -
-2 -1 0 1 2 3
3

Any other valuable feedback: ______________________________________________________


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Student's Signature: _________________________________


AWARDED

Correctness

Conclusion
Originality
of results

Initiative
Neatness
MARKS

Attitude

TOTAL

TOTAL 10 10 10 20 20 30 100

EARNED

_____________________________________________________________________________________________
Page 6 of 7
DSP - Lab National University Roll No: __________
04

Lab #
of Computer and Emerging Sciences
(EL3031) Islamabad Spring 2023
_____________________________________________________________________________________
Lab Instructor's Comments:________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Lab Instructor's Signature: _________________________________

Assessment Rubric
LLO Statement Assessment Exemplary Proficient Developing Beginning Worst
Method (20%) (20%) (20%) (20%) Performance
(20%)
1 Analysis of Practical Skill Able to attempt Able to attempt Able to attempt Able to attempt Able to attempt
discrete-time Observation complete lab with 80% of the lab 60% of the lab 40% of the lab 20% of the lab
signals and during proper tasks tasks tasks tasks
verifying their experimentati labeling/explanatio
properties i.e. on & Lab n of results and
Discrete Fourier Reports proper commenting
Transform of the code
(DFT), Discrete
Time Fourier
Transform
(DTFT) using
MATLAB.

_____________________________________________________________________________________________
Page 7 of 7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy