0% found this document useful (0 votes)
19 views

DSP Lab Report 05 - ACS

1) The document describes an experiment on discrete time Fourier transforms performed by a student named Mamtaz Sadia at American International University-Bangladesh. 2) The experiment aimed to compute and interpret the discrete time Fourier transform of discrete signals and investigate basic properties such as periodicity, symmetry, and linearity. 3) MATLAB code was used to simulate the discrete time Fourier transform and various properties were demonstrated through plots of frequency spectra.

Uploaded by

Navid AfzL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

DSP Lab Report 05 - ACS

1) The document describes an experiment on discrete time Fourier transforms performed by a student named Mamtaz Sadia at American International University-Bangladesh. 2) The experiment aimed to compute and interpret the discrete time Fourier transform of discrete signals and investigate basic properties such as periodicity, symmetry, and linearity. 3) MATLAB code was used to simulate the discrete time Fourier transform and various properties were demonstrated through plots of frequency spectra.

Uploaded by

Navid AfzL
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB)

Faculty of Engineering
Department of Electrical and Electronic Engineering

DIGITAL SIGNAL PROCESSING LAB

Title: Discrete Time Fourier Transform.

Section: D Experiment No.: 05

Date of Performance: 24-08-2020 Date of Submission: 19-09-2020

Submitted by
Name: Mamtaz, Sadia ID: 17-33259-1

Course Instructor: Tahia Fahrin Karim


Semester: Summer 2019-2020

© Dept. of EEE & COE, FE, AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB)


Introduction:Discrete Time Fourier Transform is an important feature of DSP system. It helps us
to determine different frequency component of any discrete time signal. This experiment will guide
to
01) learn how to compute and interpret the Discrete Time Fourier Transform (DTFT) of a discrete
signal;
02) investigate basic properties of DTFT.
Theory and Methodology: Discrete-time Fourier transform (DTFT) transforms a time-domain function
into the frequency domain. The DTFT requires an input function that is discrete signal to transfer it to
frequency domain. The DTFT is a special case of the Z-transform that has been introduced in previous
lab. Z-transform is defined as:

So the special case is z = e jω . If x(n) is absolutely summable ,then its DTFT is given by

The inverse Discrete Time Fourier Transform (IDFT) is defined as

IDFT converts frequency domain signal to time domain. Some of the important properties of the DTFT
are as follows:
01)Periodicity: The Discrete Time Fourier Transform (DTFT) of a signal x(n) is periodic in ω with a
period of 2π.

02)Symmetry: For a real valued signal x(n) , its DTFT X ( e jω ) is a conjugate symmetric.

03)Linearity: The DTFT is a linear transformation; that is

04)Time Sifting: A shift in the time domain corresponds to the phase shifting in frequency domain.

05)Frequency Shifting: Multiplication by a complex exponential corresponds to a shift in the frequency


domain.

06)Convolution Property: Convolution in time domain corresponds to the multiplication in frequency


domain.

Apparatus:
1. Computer (Desktop/Laptop)
2. MATLAB (at least version 6)
00483 - DIGITAL SIGNAL PROCESSING [D] 2
Simulation and Results:
Code Results
clc;
n=0:10;
x=(0.9*exp(j*pi/3)).^n;
w=-pi:pi/100:pi;
P=freqz(x,1,w);
subplot(211)
plot(w,abs(P))
grid on
subplot (212)
plot(w,angle(P))
grid on

x1=rand(1,11); % generate
random number x1
x2=rand(1,11); % generate
random number x2
alpha=2;
beta=3;
x3=alpha*x1+beta*x2;
w = -pi:pi/200: pi;
X1=freqz(x1,1,w);
X2=freqz(x2,1,w)
X3=freqz(x3,1,w);
subplot(2,1,1);
plot(w/pi, X3)
xlabel('frequency in pi units');
ylabel('DTFT of x3');
title('DTFT of
"alpha*x1+beta*x2"');
X_check=alpha*X1+beta*X2;
% generate right side of
property ?X1(m)+ ? X2(m)
subplot(2,1,2);
plot(w/pi, X_check)
xlabel('frequency in pi units');
ylabel('DTFT of X _ check');
title('DTFT of alpha*x1+
beta*DTFT of x2');

© Dept. of EEE & COE, FE, AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB)


x=rand(1,11);
w=-pi:pi/250:pi;
X_L= freqz([0 0 x],1,w);
subplot(2,1,1)
plot(w/pi, abs(X_L))
xlabel('frequency in pi units');
ylabel('DTFT of x(n-k)');
X= freqz(x,1,w);
X_R= exp(-j*2*w).*X;
subplot(2,1,2)
plot(w/pi, abs(X_R))

clc;
n=0:99;
x=cos(n*pi/4);
w=-pi:pi/250:pi;
z=sigshift(x,n,10);
X_L=freqz(z,1,w);
subplot(211)
plot(w/pi,abs(X_L))
xlabel('frequency in pi units');
ylabel('DTFT ofx(n-k))');
X=freqz(x,l,w);
X_R=exp(-j*2*w).*X;
subplot(212)
plot(w/pi,abs(X_R))

00483 - DIGITAL SIGNAL PROCESSING [D] 4


clc
x=rand(1,11); % generate
random number
w=-pi:pi/100:pi;
X_L= freqz([0 0 x],1,w);
%DTFT of left part of
equation
subplot(2,1,1)
plot(w/pi, abs(X_L))
xlabel('frequency in pi units');
ylabel('DTFT of x(n-k)');
X= freqz(x,1,w);
X_R= exp(-j*2*w).*X;
%DTFT of right part of
equation
subplot(2,1,2)
plot(w/pi, abs(X_R))
xlabel('frequency in pi units');
ylabel('X(w)exp(-jwk)');

w=-pi:pi/256:pi;
x=[1 3 5 7 9 11 13 15 17];
h=[1 -2 3 -2 1];
X=freqz(x,1,w);
H=freqz(h,1,w);
XP=X.*H;
subplot(221)
plot(w/pi,abs(XP))
title('Product of magnitude
spectrum')
subplot(222)
plot(w/pi, angle(XP))
title('Phase spectum')
y=conv(x,h);
Y=freqz(y,1,w);
subplot(223);
plot(w/pi,abs(Y))
title('Magnitude spectrum of
convolved sequence')
subplot(224);
plot(w/pi,angle(Y))
title(' Phase of convolved
sequence')

© Dept. of EEE & COE, FE, AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB)


clc;
n=0:100;
x=cos(pi*n/2);
w= -pi:pi/100:pi;
X=freqz(x,1,w); % DTFT of x
subplot(211)
plot(w,abs(X))
title(' DTFT of signal vs
frequency')
y=exp(-j*pi*n/4).*x
Y=freqz(y,1,w) ;
subplot(212)
plot(w,abs(Y))
title('Frequency shift due to
multiplying exp(jwn)')

Discussion and Conclusion: In this lab the using of Discrete Time Fourier Transform in MATLAB
was described. The general concept Discrete Time Fourier Transform was successfully learned and
implemented the code carefully. A mathematical problem was done successfully and the output was
expected.
References:
[1] Lab Manual
[2] John G. Proakis & Dimitris G. Manolakis, “ Digital Signal Processing – Principles, Algorithms and
Applications”, Prentice – Hall India, 3rd Edition.
[3] Class Lecture

00483 - DIGITAL SIGNAL PROCESSING [D] 6

You might also like