0% found this document useful (0 votes)
15 views10 pages

ADC Lab2

The lab report explores the relationship between Discrete Fourier Transform (DFT) and Discrete-Time Fourier Transform (DTFT) by plotting a rectangular pulse in MATLAB. It demonstrates that DFT is a sampled version of DTFT, highlighting differences in their characteristics such as continuity and periodicity. The report concludes that DFT is more practical for digital signal processing due to its finite-length signal handling capabilities.

Uploaded by

aalyanzahid2005
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)
15 views10 pages

ADC Lab2

The lab report explores the relationship between Discrete Fourier Transform (DFT) and Discrete-Time Fourier Transform (DTFT) by plotting a rectangular pulse in MATLAB. It demonstrates that DFT is a sampled version of DTFT, highlighting differences in their characteristics such as continuity and periodicity. The report concludes that DFT is more practical for digital signal processing due to its finite-length signal handling capabilities.

Uploaded by

aalyanzahid2005
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/ 10

Name: Muhammad Abdullah Roll No:2022-EE-019

EE-322L Analog and Digital Communication Marks Obtained: ________


Lab Report

Experiment No.2

Relationship between DFT and DTFT


Note:
 Don’t forget to include the rubrics table (available at the end in this document),
otherwise reports will not be graded.
 Ensure proper comments are there in the source code of each task

Objectives
 To verify that DFT (Discrete Fourier Transform) is the sampled version of DTFT
(Dicrete Time Fourier Transform) by plotting both DFT and DTFT of a given pulse.

Technical Background
The Discrete Fourier Transform (DFT) and the Discrete-Time Fourier Transform (DTFT) are
both mathematical techniques for analyzing signals in the frequency domain, but they differ
in scope and usage. The DTFT gives a continuous frequency spectrum for a discrete-time
signal, while the DFT is a discrete counterpart of the DTFT, specifically designed for signals
of finite length.

Procedure
1. For the first task, we’ll plot the following rectangular pulse in MATLAB:

𝑢[𝑛] = [1,1,1,1,1], where 𝑛 = [0,1,2,3,4]

Write the following code in MATLAB’s new Script file:

Figure 1. MATLAB Code for given pulse


This code will produce the following plot:

Figure 2. Plot for the given pulse

For the DFT (Discrete Fourier Transform), we’ll write the following MATLAB code:

Figure 3. MATLAB code for DFT of given pulse


The above code will transform the given pulse into DFT as:

Figure 4. Plot of DFT for Given Pulse

Following code is written to plot the DTFT (Dicrete Time Fourier Transform) of the same
above signal:

Figure 5. MATLAB code to plot DTFT of given pulse


The DTFT of the given pulse will be plotted as:

Figure 6. DTFT plot of given pulse

2. Comparison of DFT and DTFT for given Pulse


The figure gives the plot of discrete time signal rectangular pulse, and the following
figure presents both DFT and DTFT of this discrete signal.
The main differences which can be observed in both plots can be described as:
 The DFT of signal is finite and non-continuous sequence while the DTFT of the
signal is infinite and continuous sequence.
 DFT is non-periodic while DTFT has periodicity over the interval [-2pi,2pi].
 DTFT contains both positive and negative values while DFT only contains positive
values.

3. DFT when N=Roll Number


Write the following code in MATLAB script which has N=19 which is ending digit of my
Roll number:
Figure 7. MATLAB code when N=19 (Roll No)

The above code will plot the following DFT for N=19 which is my Roll Number’s ending
digit:

Figure 8. DFT plot when N=19


Comparison between DFT in part-1 and part-3:
Following plots are of magnitudes and phases of DFTs plotted in part-1 and part-3 which are
plotted when N=5 and N=19(my Roll Number).

 It can be easily observed that as N icreases, the DFT samples the DTFT spectrum
more finely by providing more frequency details.
 With higher N, we obtain a better frequency resolution while on the opposite, we get
more compact resolution presenting basic spectrum ignoring the complex details.
 For N=5, we have less number of frequency components which make the spectrum
limited while for N=19, we get more frequency components presenting fine and more
visible components.
 In Phase spectrum, for N=5, we see a simplified phase resolution and relatively sharp
and sudden transitions while for N=19(with more points), we observe more detailed
relation between frequency components and their phases and smooth transitions
across a wider range of frequency components which make the plots more readable.

Figure 9. Magnitudes of DFTs when N=5 and N=19, respectively


Figure 10. Phase Spectrums of DFTs when N=5 & N=19, respectively

Comparion of DFT (when n=19) and DTFT (n=5)


By looking at the magnitudes of DTFT and DFT plots, the magnitude of DFT only exists for
the positive frequencies while DTFT can be seen in negative frequencies too.
The DFT is sampled version of DTFT. DFT samples the DTFT at sepcific points which are
determined by:
2 πk
ωk=
N
while DTFT is continuous over range of frequencies from -pi to pi.
Also, you can observe the overlapping of DFT at specific frequency points on the continuous
DTFT curve.
Figure 11. Magnitudes of DFT(n=19) and DTFT(n=5)

Figure 12. Phases of DFT(n=19) and DTFT(n=5)

Conclusion
The Discrete-Time Fourier Transform (DTFT) works with signals of infinite length and
provides a continuous frequency spectrum, which makes it challenging to use in real-time
applications. This is where the Discrete Fourier Transform (DFT) becomes valuable. As we
saw in this experiment, the DFT is essentially a sampled version of the DTFT. Unlike the
DTFT, the DFT works with finite-length signals, making it more practical and easier to
compute, especially using algorithms like the Fast Fourier Transform (FFT). By sampling the
2 πk
DTFT at specific frequencies, where k ranges from 0 to N-1, we obtain the DFT. This
N
makes the DFT a more efficient and usable tool for digital signal processing.
Rubrics for Experiment No.

Performance Exceeds Meets expectation Does not meet Marks


expectation (0.5)/(1)/(1) expectation
(1)/(2)/(2) (0)/(0)/(0)

R1: Knowledge of Has required Has partial Has no knowledge


required functions knowledge for knowledge for code for code
for code design. code
Marks: 0-1
R2: Simulation of Simulates all the Needs guidance toIncapable to
experiment tasks correctly by simulate the tasks
simulate the tasks
Marks: 0-2 himself correctly correctly by
himself even with
guidance
R3: Demonstrate Correct results are Results are Results are
proper results with provided with provided with provided with
justification required minor errors and/or major errors and/or
Marks: 0-2 justification with little with no
justification justification
Performa Exceeds Meets Does not meet Marks
nce expectation expectation expectation

(0.5)/(0.5)/ (-)/(0.25)/ (0)/(0)/(0)


(0.5) (0.25)

R1: Timely The submission --- Late submission


submissio is on time
nMarks:
0-0.5

R2: Report All relevant All the relevant Most of the


completen calculations, calculations, relevant graphs,
ess specifications, specifications, results,
code, graphs, code, graphs calculations,
Marks: 0-
and results are and results are specifications, and
0.5
provided with provided but code are missing,
proper with little as well as their
explanation. explanation proper explanation
and and justification is
justification. missing

R3: Error- The submitted Some parts of The submitted


free assignment is the submitted assignment is
writeup without any assignment mostly plagiarized
plagiarism and
contain and contain
Marks: 0- formatting
errors. formatting formatting errors.
0.5
errors and
plagiarized
material.

You might also like