0% found this document useful (0 votes)
74 views6 pages

Signals and Systems: Laboratory Manual

This document describes Lab #13 on the discrete Fourier transform (DFT) and Fourier transform and their properties using MATLAB. The objectives are to compute Fourier series coefficients using MATLAB, plot the magnitude and phase spectrum of the Fourier series, use Laplace transforms to compute Fourier coefficients, and use the fast Fourier transform (FFT) to compute Fourier coefficients. The lab covers computing the DFT of a periodic signal, the continuous-time Fourier transform (CTFT) of signals like the Dirac delta and other functions, and properties of the DFT like linearity for sampled signals. Students are asked to complete tasks calculating CTFTs and DFTs and proving properties.

Uploaded by

Sana Hassan
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)
74 views6 pages

Signals and Systems: Laboratory Manual

This document describes Lab #13 on the discrete Fourier transform (DFT) and Fourier transform and their properties using MATLAB. The objectives are to compute Fourier series coefficients using MATLAB, plot the magnitude and phase spectrum of the Fourier series, use Laplace transforms to compute Fourier coefficients, and use the fast Fourier transform (FFT) to compute Fourier coefficients. The lab covers computing the DFT of a periodic signal, the continuous-time Fourier transform (CTFT) of signals like the Dirac delta and other functions, and properties of the DFT like linearity for sampled signals. Students are asked to complete tasks calculating CTFTs and DFTs and proving properties.

Uploaded by

Sana Hassan
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
You are on page 1/ 6

Signals and Systems

(EE-223)

LABORATORY MANUAL

Engr. Warda Shafiq

DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS


PROPERTIES USING MATLAB

(LAB # 13)
Student Name: ______________________________________________

Roll No: ________________ Section: ____

Date performed: _____________, 2018

MARKS AWARDED: ________ / 10

____________________________________________________________________________________________________________________________________________________________

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES, ISLAMABAD

Prepared by: Engr. Aneela Sabir Version: 1.00


Last Edited by:
Verified by: Dr. Mukhtar Ullah Updated: Spring 2018
DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS PROPERTIES USING MATLAB_______Lab9

Lab # 13:
DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS
PROPERTIES USING MATLAB
Objective: In this lab, you will learn:
 Campute Fourier series coefficients using MATLAB
 Plotting the magnitude and phase spectrum of fourier series
 how to use laplace to compute fourier coffiecients
 how to use fft to compute fourier coffiecients

Tools Used: MATLAB 2017b

Description:
The discrete Fourier transform, or DFT, is the primary tool of digital signal processing. The foundation of the
product is the fast Fourier transform (FFT), a method for computing the DFT with reduced execution time.
Many of the toolbox functions (including Z-domain frequency response, spectrum and cepstrum analysis, and
some filter design and implementation functions) incorporate the FFT.

DFT of a signal using MATLAB:


% DFT of a periodic signal described over one period by
% x(t) = sqrt(1-t^2), -1 < t < 1
N = 128 ; % Number of samples
T = 2 ; % Representation time
Ts = T/N ; % Time between samples
fs = 1/Ts ; % Sampling rate
n = 0:N-1 ; % Time index for sampling
t = n*Ts ; % Sampling times
x = sqrt(2-t.^2)
cx = fft(x)/N ; % DFT of samples
k = [0:N/2-1] ;
subplot(3,1,1) ;
p = plot(t,x,'k'); set(p,'LineWidth',2); grid on ; axis('equal');
axis([0,4,0,1.5]) ;
xlabel('Time, t (s)') ; ylabel('x(t)') ;
subplot(3,1,2) ;
p = stem(k,abs(cx(1:N/2)),'k') ; set(p,'LineWidth',2,'MarkerSize',4) ;
grid on ;
xlabel('Harmonic Number, k') ; ylabel('|c_x[k]|') ;
subplot(3,1,3) ;
p = stem(k,angle(cx(1:N/2)),'k') ; set(p,'LineWidth',2,'MarkerSize',4) ;
grid on ;
xlabel('Harmonic Number, k') ; ylabel('Phase of c_x[k]') ;

SIGNALS AND SYSTEMS LAB NUCES FAST, ISLAMABAD Page 2 of 6


DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS PROPERTIES USING MATLAB_______Lab9

CTFT of a signal:
syms t
f = dirac(t);
f_FT = fourier(f ,'s')

Task-1:
Fill the following table, first one is done for you:

Function Code Output

Unit impulse (Dirac delta) f = dirac(t); f_FT = 1


f_FT = fourier(f ,'s')

Rectangular pulse

Hint: you can use rectangularPulse


Function in matlab
Step (Heaviside)
Cosine
Sine
Sign
Triangle
Hint: you can use triangularPulse
Function in matlab

SIGNALS AND SYSTEMS LAB NUCES FAST, ISLAMABAD Page 3 of 6


DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS PROPERTIES USING MATLAB_______Lab9

Task-02:
You are given the following signals x(t) = rect(t+2) and y(t) = 1+ rect(t+3). Find its CTFT. Prove the
following property for these signals:

Task-03:
You are given the following signals x(n) = rect(n+2) and y(n) = 1+ rect(n+3). Find its DFT. Prove the
following properties for these signals:
Lineraity:

SIGNALS AND SYSTEMS LAB NUCES FAST, ISLAMABAD Page 4 of 6


DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS PROPERTIES USING MATLAB_______Lab9

Submission Declaration by the Student:


In submitting this lab write-up to the Lab Engineer/Instructor, I hereby declare that:
 I have performed all the practical work myself
 I have noted down actual measurements in this writeup from my own working
 I have written un-plagarised answers to various questions
 I have/have not obtained the desired objectives of the lab.
Reasons of not obtaining objectoves (if applicable): _________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________
Student’s signature and Date

Student Evaluation by the Lab Engineer:


The Lab Engineer can separate this page from the writeup and keep it for his/her own record. It must
be signed by the student with date on it.
 Lab Work: objectives achieved (correctness of measurements, calculations, answers to questions
posed, conclusion) ________/30
 Lab Writeup: Neatness, appropriateness, intime submission ________/10
 Troubleshooting: Were the student able to troubleshoot his/her work when it was purposedly
changed? ________/10
 TOTAL: ________/50

Feedback on student behaviour:


Encircle your choice. -2 means poorest/worst/extremely inadequate/irrevlevant, 0 gives an average
score, and +2 means best/most relevant/most adequate.

 Did the student join the lab at the start/remained in lab? -2 -1 0 1 2


 Did the student remain focused on his/her work during lab? -2 -1 0 1 2
 Rate student's behaviour with fellows/staff/Lab Engineer? -2 -1 0 1 2
 Did the student cause any distraction during the Lab? -2 -1 0 1 2
 Was the student found in any sort of plagiarism? -2 -1 0 1 2
Additional comments (if any) by the Lab Engineer:
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
___________________________
Lab Engineer’s signature and Date

Student's feedback: [Separate this page; fill it; drop in the Drop Box.]

SIGNALS AND SYSTEMS LAB NUCES FAST, ISLAMABAD Page 5 of 6


DFT AND FOURIER TRANSFORM INTRODUCTION AND ITS PROPERTIES USING MATLAB_______Lab9

 Providing feedback for every lab session is optional. No feedback means you are satisified
 The Lab Committee will consider only duly filled forms submitted within one week after the lab
 This feedabck is for LAB session: LAB Number: _____, Date: _____________________
 General (to provide feedback on a persistent practice/ocurrence in LABs).
 Your current CGPA is in the range 4.00 to 3.00/2.99 to 2.00/1.99 to 1.00/0.99 to 0.00
This feedback is:
 For a Particular
 Who conducted the LAB? __________________________________________________
 Actual Start time: _______________ Total Duration of Lab: _______________________
 Instruction Duration: _________________ Practical Duration: _____________________
 LAB writeup available before LAB? Yes/No with the Photocopier/in LAB/in SLATE
 Had the theory related to lab been covered in theory class? Yes/No
Encircle your choice. -2 means poorest/worst/extremely inadequate/irrevlevant, 0 gives an average
score, and +2 means best/most relevant/most adequate.

Was duration of instruction session adequate? -2 -1 0 +1 +2


Instruction How much did you understand about the practical? -2 -1 0 +1 +2
Session How much content was irrelevant to the practical? -2 -1 0 +1 +2
Did the instructor allowed Q/A and discussion? -2 -1 0 +1 +2
Practical Did you get sufficient time for practical? -2 -1 0 +1 +2
Presence in lab at all time? -2 -1 0 +1 +2
Ability to convey? -2 -1 0 +1 +2
Lab Readiness to help during practical? -2 -1 0 +1 +2
Engineer Readiness to discuss theoretical aspects? -2 -1 0 +1 +2
Helps in troubleshooting? -2 -1 0 +1 +2
Guides hows & whys of troubleshooting? -2 -1 0 +1 +2
How friendly was the lab staff? -2 -1 0 +1 +2
Staff Presence of staff throughout the lab session? -2 -1 0 +1 +2
Impact of availability of staff on your practical? -2 -1 0 +1 +2
Performance of Electronic Instruments? -2 -1 0 +1 +2
Equipment Performance of Breadboard/experiment kit? -2 -1 0 +1 +2
Performance of circuit components esp. ICs? -2 -1 0 +1 +2
Overall Your overall rating for the whole lab session? -2 -1 0 +1 +2
Other comments:
_________________________________________________________________________________
________________________________________________________________________.

SIGNALS AND SYSTEMS LAB NUCES FAST, ISLAMABAD Page 6 of 6

You might also like