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

Faculty of Engineering: Laboratory Report Cover Sheet

1. The laboratory report covers experiments on discrete Fourier series and discrete Fourier transforms. It includes definitions and equations for discrete Fourier series, discrete Fourier transforms, and their inverse transforms. 2. The experiments aim to give an in-depth understanding of discrete Fourier transforms through simulated examples. Examples calculate the discrete Fourier series and discrete Fourier transforms of different periodic signals and compare the results. 3. Procedures for the experiments are provided, including MATLAB code definitions for discrete Fourier series, discrete Fourier transforms and their inverses. Output is shown for examples calculating the transforms of signals and comparing results for different transform lengths.

Uploaded by

Na Hin
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)
55 views10 pages

Faculty of Engineering: Laboratory Report Cover Sheet

1. The laboratory report covers experiments on discrete Fourier series and discrete Fourier transforms. It includes definitions and equations for discrete Fourier series, discrete Fourier transforms, and their inverse transforms. 2. The experiments aim to give an in-depth understanding of discrete Fourier transforms through simulated examples. Examples calculate the discrete Fourier series and discrete Fourier transforms of different periodic signals and compare the results. 3. Procedures for the experiments are provided, including MATLAB code definitions for discrete Fourier series, discrete Fourier transforms and their inverses. Output is shown for examples calculating the transforms of signals and comparing results for different transform lengths.

Uploaded by

Na Hin
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/ 10

AMERICAN INTERNATIONAL UNIVERSITY BANGLADESH

Faculty of Engineering
Laboratory Report Cover Sheet
Students must complete all details except the faculty use part.

Please submit all reports to your subject supervisor or the office of the concerned faculty.

Laboratory Title: Discrete Fourier Series and Discrete Fourier Transform.


Experiment Number: ___07___ Due Date: 19-10-20 Semester: Summer 2019-2020
Subject Code: EEE_____ Subject Name: Digital Signal Processing Section: ___D__
Course Instructor: Tahia Fahrin Karim Degree Program: EEE_________

Declaration and Statement of Authorship:


1. I/we hold a copy of this report, which can be produced if the original is lost/ damaged.
2. This report is my/our original work and no part of it has been copied from any other student’s work or from
any other source except where due acknowledgement is made.
3. No part of this report has been written for me/us by any other person except where such collaboration has
been authorized by the lecturer/teacher concerned and is clearly acknowledged in the report.
4. I/we have not previously submitted or currently submitting this work for any other course/unit.
5. This work may be reproduced, communicated, compared and archived for the purpose of detecting
plagiarism.
6. I/we give permission for a copy of my/our marked work to be retained by the School for review and
comparison, including review by external examiners.
I/we understand that
7. Plagiarism is the presentation of the work, idea or creation of another person as though it is your own. It is a
form of cheating and is a very serious academic offence that may lead to expulsion from the University.
Plagiarized material can be drawn from, and presented in, written, graphic and visual form, including
electronic data, and oral presentations. Plagiarism occurs when the origin of the material used is not
appropriately cited.
8. Enabling plagiarism is the act of assisting or allowing another person to plagiarize or to copy your work

Individual Group
Group Number (if applicable): Submission Submission

Student
No. Student Name Student Number Signature Date
Submitted by:

1 NAHIN AKHTAR 17-34113-1 19-10-20

Group Members:
2
3
4
5

For faculty use only:


Total Marks: _______ Marks Obtained: _______
Title: Discrete Fourier series and Discrete Fourier Transform.

Introduction:

A Fourier series is a representation of a function in terms of a summation of an


infinite number of harmonically-related sinusoidal with different amplitudes and
phases. The Fourier series coefficients are periodic, and can therefore be described by
a finite set of complex numbers. That set is called a discrete Fourier transform (DFT).
The main objectives of this experiment is to
[1] Have an in-depth understanding of DFT using simulated environment.
[2] Representing DFS as a suitable tool for manipulating discrete-time signals.

Theory & Methodology:

If a discrete signal x(n) is periodic with a period of N. It means the signal satisfies the
following condition x(n) = x(n + kN) , where k is integer and N is the fundamental
period of the sequence. Then this signal can be expressed as

where n = 0 , ± 1 , ± 2 ,......... and X ( k ), k = 0 , ± 1 , ± 2 ,......... are called the


discrete Fourier series
Coefficients, which is given by

Where k = 0, ± 1, ± 2 ,......... . The discrete Fourier series coefficients X(k) is itself a


complexvalued periodic
Sequence with fundamental period of N. Using W N =exp(-2?/?), we express
equation (A) & (B) as

Discrete Fourier Transform (DFT) to compute the Fourier transform numerically on a


computer, discretization plus numerical integration are required. This is an
approximation of the true (i.e., mathematical), analytically-defined FT in a synthetic
(digital) environment, and is called Discrete Fourier Transformation (DFT). The DFT
of a continuous time signal sampled over the period of T, with a sampling rate of Δt
can be given as

Where Δf=1/T, and, is valid at frequencies up to fmax = 1/(2Δt). The Discrete Fourier
Series
(DFS) is practically equivalent to the Discrete Fourier Transform (DFT) when
0≤n≤N-1. [The students are asked to check the text book for proof] Therefore, the
implementation of DFT should be similar to that of DFS.

Apparatus:

1. Computer (Desktop/Laptop)
2. MATLAB (at least version 6)
Precautions:
Make sure that all the m-files are saved in the current directory of MATLAB.
Otherwise, the m-files will not be found and executed when they are called from the
command window.

Experimental Procedure:

Example 1: Find the DFT of a periodic discrete signal


defined by x(n)={ …….
0,1,2,3,0,1,2,3,0,1,2,3…………….}

Also find one period of the signal from the DFS coefficients implementing Inverse
Discrete Fourier Transform. [For the given signal, the fundamental period is N=4.
The signal can be defined one period as xn={0,1,2,3}. By calling the dfs function
written in Appendices section, compute the DFS]

Example 2: A periodic signal


is given by x ( n ) = 1;
mN≤n≤mN+L-1
= 0; mN+L≤n≤(m+1)N-1
where m=0,±1, ±2, ……, N is the fundamental period, L/N is the duty cycle. Find the
DFS of the signal and plot the magnitude spectrum for different L and N.

Example 3: Let x(n) be a 4-point sequence define by


x(n) = 1, 0≤n≤3
= 0, otherwise
a. Compute the Discrete Time Fourier Transform (DTFT) of x(n)
b. Compute the 4-point DFT.
c. Compute the 8-point, 16-point and 64 point DFT of x(n.)
d. Compare the results of all DFTs.

Simulation & Measurement:

Serial No Code Output


Example-1 dfs function
function
[Xk]=dfs(xn,N)
% Compute
Discrete
Fourier Series xk =
Co-efficients
6.0000 + 0.0000i -2.0000 + 2.0000i -2.0000 -
% [Xk]=DFS 0.0000i -2.0000 - 2.0000i
coefficients
array over
0<=k<=N-1 %
xn= one of
period of the
periodic
sequence % N=
fundamental
period n=[0:1:N-
1] k=[0:1:N-1]
WN=exp(j*2*pi/N); xn =
nk=n'*k
0.0000 - 0.0000i 1.0000 - 0.0000i 2.0000 -
WNnk=WN.^nk 0.0000i 3.0000 + 0.0000i
Xk=xn*WNnk end

idfs function
function
[Xk]=idfs(Xk,N
)
% Compute
Inverse
Discrete
Fourier Series
Co-efficients %
[xn]=one of period
of the periodic
sequence % [Xk]=DFS
coefficients error %
N= fundamental
period n=[0:1:N-1]
k=[0:1:N-1]
WN=exp(j*2*pi/N);
nk=n'*k;
WNnk=WN.^(nk);
Xk=(Xk*WNnk)/N
; end
xn=[0 1 2 3] N=4
xk=dfs(xn,N)
FINDING ONE
PERIOD OF THE
SIGNAL FROM THE
DFS
COEFFICIENTS:
N=4
Xk=[6.0000 -
2.0000+2.0000i
-2.0000-
0.0000i -
2.00002.0000i]
xn=idfs(xk,N)

Example-2 L=5; N=20; n=[-


N:N+1];
x1=[ones(1,L),
zeros(1,NL+1)];
x=[x1 x1]
subplot(221)
stem(n,x)
title('Signal'
)
% find the DFS
with period N=20
and duty cycle
=5 k=[-N/2:N/2]
xn=[ones(1,L),
zeros(1,N-L)]
Xk=dfs(xn,N);
magXk=abs([Xk(
N/2+1:N)
Xk(1:N/2+1)])
subplot(222)
stem(k,magXk)
title('DFS with
N=20,
L=5')
% find the DFS
with period
N=50 and duty
cycle=5 N=50;
L=5; k=[-
N/2:N/2]
xn=[ones(1,L),
zeros(1,N-L)]
Xk=dfs(xn,N);
magXk=abs([Xk(
N/2+1:N)
Xk(1:N/2+1)])
subplot(223)
stem(k,magXk)
title('DFS
with N=50,
L=5')
% find the DFS
with period
N=100 and duty
cycle=5
N=200 L=5 k=[-
N/2:N/2]
xn=[ones(1,L),
zeros(1,N-L)]
Xk=dfs(xn,N);
magXk=abs([Xk(
N/2+1:N)
Xk(1:N/2+1)])
subplot(224)
stem(k,magXk)
title('DFS
with N=200,
L=5');
Example-3 dft function
ALL function
[Xk]=dft(xn,N)
% Compute
Discrete
Fourier Series
Co-efficients %
[Xk]=DFS
coefficients
array over
0<=k<=N-1 % xn=
one of period of
the periodic
sequence % N=
fundamental
period n=[0:1:N-
1] k=[0:1:N-1]
WN=exp(j*2*pi/N);
nk=n'*k
WNnk=WN.^nk
Xk=xn*WNnk end

idft function
function
[Xk]=idft(Xk,N
)
% Compute
Inverse
Discrete
Fourier Series
Co-efficients %
[xn]=one of
period of the
periodic sequence
% [Xk]=DFS
coefficients
error % N=
fundamental period n=[0:1:N-1]
k=[0:1:N-1] WN=exp(j*2*pi/N);
nk=n'*k; WNnk=WN.^(nk);
Xk=(Xk*WNnk)/N end
-------------------------

w=0:pi/200:2*p i
H=1+exp(j*w)+exp(j*2*w)+exp(j*3
*w) subplot(111) plot(w,abs(H))
title('Magnitu de of DTFT of
x(n)') axis([0 6 0
4])

% computer the 4-point DFT x=[1


1 1 1] N=4 n=0:1:(N-1)
X4=dft(x,4) subplot(111)
stem(n,abs(X4)
) title('Magnitu de of 4-point
DFT') axis([0 3 0
4])
% compute the
16-point DFT N=16 x=[ones(1,4)
zeros(1,12)] n=0:1:(N-1)
X8=dft(x,N) subplot(111)
stem(n,abs(X8)
) hold on plot(n,abs(X8) ,'-
.k') title('Magnitu de of 16-
point DFT') axis([0 16 0
4])

% compute 32 point DFT N=32


x=[ones(1,4) zeros(1,28)] %
Note that x has been zero
padded n=0:1:(N-1) X8=dft(x,N)
subplot(111) stem(n,abs(X8)
) hold on plot(n,abs(X8) ,'-
.k') title('Magnitu de of 32-
point DFT') axis([0 32 0
4])
Discussion & conclusion:

In this lab Discrete Fourier Series and Discrete Fourier Transform were performed in
MATLAB. The theory concept of discrete Fourier transform and the discrete Fourier
series were successfully learned and implemented. The output was obtained
smoothly during experiment time. The code was written as instructed.

Reference(s):

[1] John G. Proakis & Dimitris G. Manolakis, “ Digital Signal Processing –


Principles, Algorithms and Applications”, Prentice – Hall India, 3rd Edition.
[2] AIUB DSP_LAB MANNUAl.

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