You are on page 1of 5

[Spring 2014] [FOURIER TRANSFORM OF DISCRETE TIME SIGNALS] Signals and Systems

LAB # 12

Fourier Transform of
Discrete Time Signals

Lab Instructor: Khuram Naveed

1 | Khuram Naveed
[Spring 2014] [FOURIER TRANSFORM OF DISCRETE TIME SIGNALS] Signals and Systems

Lab 12-Fourier Analysis of Discrete Time Signals


In this lab, we will discuss how Fourier transform can be implemented to discrete time signals.
There are two types of Fourier transform applicable to discrete time signals: the discrete-time
Fourier transform and the discrete Fourier transform.

12.1 Discrete-Time Fourier Transform:


Discrete time Fourier transform (DTFT) is the counterpart transform to the continuous time
Fourier transform (CTFT) when dealing with discrete time signals i.e., when dealing when signals
described by function x[n], n  , the mathematical expression (12.1) of the DTFT is


X ( )   x[n]e
n 
 j n

The DTFT is a continuous complex valued function of the cyclic frequency  . A sufficient
condition for the existence of the DTFT X ( ) of the signal x[n] is


n 
x[n]  

Moreover, the DTFT is always periodic function with period 2 . In order to return from the
frequency domain  to the discrete domain n , we apply inverse DTFT. The mathematical
expression of the inverse DTFT is

1 1
 X ( )e jn d   X ( )e d
j n
x[n] 
2 2
2 

Example:

Compute the DTFT X ( ) of a signal x[n]  0.8n , 0  n  20 and plot X ( ) over the frequency
interval      and 5    5 .

Commands Results Comments


syms w Definition of
n= 0:20;
x=0.8.^n; x[n]  0.8n , 0  n  20
X=sum(x.*exp(-j*w*n)); Computation of x[n]
according to equation 12.1

2 | Khuram Naveed
[Spring 2014] [FOURIER TRANSFORM OF DISCRETE TIME SIGNALS] Signals and Systems

ezplot(abs(X),[-pi pi]) Graph of magnitude of X ( )


title(' Magnitude of
DTFT') for      .
ylim([0 5.4])

w1=-pi:.01:pi; Graph of phase of X ( ) for


XX=subs(X,w,w1)
plot(w1,angle(XX));      .
xlim([-pi pi])
title('Phase of DTFT')

ezplot(abs(X),[-5*pi Graph of magnitude of X ( )


5*pi]);
title('Magnitude of DTFT for 5    5 .
in 5 periods')
ylim([0 5.8])

figure Graph of phase of X ( ) for


w1=-5*pi:.01:5*pi;
XX=subs(X,w,w1); 5    5 .
plot(w1,angle(XX));
xlim([-5*pi 5*pi])
title(' Phase of DTFT in 5
periods')

The two graphs show that DTFT is a periodic function with period 2 .

3 | Khuram Naveed
[Spring 2014] [FOURIER TRANSFORM OF DISCRETE TIME SIGNALS] Signals and Systems

12.2 Parseval’s Discrete-Time Fourier Transform:


Parseval’s theorem is also valid for discrete time signals. It states that the energy of the discrete
time signal x[n] is computed in the frequency domain according to (12.2)

 2 
1 1
Ex   x[n]   X ( ) d    X ( ) d 
2 2

n  2 2
2 

where, X ( ) is the DTFT of x[n] and X ( ) is the energy spectral density of the signal x[n] .
2

To verify Parseval’s theorem we will use the DTFT pair a nu[n]  1 (1  ae j ), a  1 .

Commands Results Comments


syms n w E=1.5625 The energy of the signal
a=0.6;
x=a^n; x[n]  0.6n u[n] is computed in
E=symsum(abs(x)^2,n,0,inf); time domain according to
E=eval(E) 
 x[ n ] .
2
n 
X=1/(1-a*exp(-j*w)); E=1.5625 The energy of x[n] is computed
Esd=abs(X)^2;
E=1/(2*pi)*int(Esd,w,- in the frequency domain
pi,pi); according to 1 2  X ( ) d ,
2

E=eval(E)
2

and since the two derived


results are equal, Parseval’s
theorem is verified.

4 | Khuram Naveed
[Spring 2014] [FOURIER TRANSFORM OF DISCRETE TIME SIGNALS] Signals and Systems

Tasks
Task 01: Compute and plot the DTFT of the signal x[n]  0.6n u[n] .

i. Plot the magnitude Graph


ii. Plot the phase Graph

Task 02: Write a function that computes the DTFT a sequence x[n] . Compute through function the
DTFT of the discrete time sequence x[n]  0.8n u[n  1] .

i. Plot the magnitude Graph


ii. Plot the phase Graph

Task 03: Proof the Parseval’s theorem by taking any input signal.

5 | Khuram Naveed

You might also like