0% found this document useful (0 votes)
16 views3 pages

LAB3

معالجة الإشارات الرقميه

Uploaded by

nbylzan
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)
16 views3 pages

LAB3

معالجة الإشارات الرقميه

Uploaded by

nbylzan
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/ 3

LAB3

Title: Discrete Time Fourier Transform

Student Name:
Reg. No. :
Date :
Signature :

Objectives:

1) What is meant by DTFT


2) The matrix form of calculating the coefficients of DTFT.
3) Important properties of DTFT
4) The matrix form of calculating the coefficients of IDTFT.

Preparation: (15 mins)

The DTFT:

The operation for computing frequency spectrum can be generalized for any
discrete-time sequence x[n] as

This function is the discrete-time Fourier transform (DTFT) of x[n], which we may denote as:

The DTFT is a complex function of frequency, with magnitude |X (e^ jω)| and phase θ(ω), related
by:

Properties of the DTFT:

The DTFT has the following important properties:


1. Periodicity:The DTFT is a periodic function of ω with period 2π radians.
2. Conjugate Symmetry: The DTF exhibits a conjugate symmetry for real-valued signals.
Computing the DTFT in Matlab:

Suppose we are given a finite x[n], n1<= n <=n2, and we want to plot its DTFT X(e^jω) over the
range ω0 ≤ ω ≤ ωM . One problem we have is that ω is a continuous variable, but Matlab can only
handle a finite number of values of ω. The solution to this problem is to sample the frequency axis.

We can often set ω0 = - π and ωM = π so for the kth frequency sample:

The above expression gives the DTFT for one frequency sample, i.e. the one for ω = ωk . If we
wish to determine the DTFT for multiple frequency samples, we can replace the above vector-vector
multiplication with the following vector-matrix multiplication:

The DTFT can then be found from the vector-matrix operation:

The matrix V can be efficiently computed using the vector outer product:

Procedure:

Step 1: Open a new script file and write the DTFT function. (15 Minutes)

function [X] = dtft( x, n, omega )


% Computes the DTFT
% X = dtft( x, n, omega )
V = exp(-j.* n'* omega);
X = x * V;

Save the file in current folder, LAB3, with the name dtft.m

Using your function, compute and plot the DTFT of the following signal over −2π ≤ ω ≤ 2π:
w = linspace(-2*pi,2*pi,101);
x = [-3 2 5 6 4];
n = [-1:3];
X = dtft(x,n,w);
subplot(2,1,1),plot(w,abs(X)),xlabel('w'),ylabel('Magnitude Spectrum');
grid on;
subplot(2,1,2),plot(w,angle(X)),xlabel('w'),ylabel('Phase Spectrum');
grid on;

Q1) Check the values of DTFT,X? Look at X(1), X(2),X(51),X(52) is X periodic? What is the
fundamental period?

Q2) Compare between X(50) & X(52) and X(49) & X(53), give your note?

Step2: Inverse Discrete Fourier Transform. (15 Minutes)

The IDTFT can then be found from the vector-matrix operation

Open a new script file and write the IDTFT function

function [x] = idtft( X, omega, n )


V = exp(-j.* n'* omega);
x = X * pinv(V);

After that, write down the following command which call the above function
x_inv = idtft(X,w,n)

Q3) Write down the values of x signal and x_inv, Are they similar?

Homework:
1) After you have completed LAB3, you had the following Matlab function in LAB3 folder:
(dtft.m, idtft.m), use them to obtain the magnitude and phase spectrum for the rectangular
pulse:

x(n) = 1 , for 0 <= n =< 9


and x(n) = 0 , otherwise

You might also like