Skip to content Skip to navigation


You are here: Home » Content » The DFT: Frequency Doman with a Computer Analysis


Recently Viewed

This feature requires Javascript to be enabled.


(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

The DFT: Frequency Doman with a Computer Analysis

Module by: Robert Nowak. E-mail the author

Summary: This module will take the ideas of samping CT signals farthur by examining how such operations can be performed in the frequency domain and by using a computer.

Note: You are viewing an old version of this document. The latest version is available here.


We just covered ideal (and non-ideal) time sampling of CT signals. This enabled DT signal processing solutions for CT applications:

Figure 1
Figure 1 (sec8_fig1.png)

Much of the theoretical analysis of such systems relied on frequency domain representations. How do we carry out these frequency domain analysis on the computer? Recall the following relationships: xn DTFT Xω x n DTFT X ω xt CTFT XΩ x t CTFT X Ω where ωω is the continuous frequency variable and ΩΩ is the continuous frequency variable.

Sampling DTFT

Consider the DTFT of a discrete-time (DT) signal xn x n . Assume xn x n is of finite duration N N (i.e., an N-point signal).

Xω= n =0N1xne(i)ωn X ω n N 1 0 x n ω n
where Xω X ω is the continuous function that is indexed by the real-valued parameter πωπ ω . The other function, xn x n , is a discrete function that is indexed by integers.

We want to work with Xω X ω on a computer. Why not just sample Xω X ω ?

Xk=X2πNk= n =0N1xne(i)2πkNn X k X 2 N k n N 1 0 x n 2 k N n
and in the above equation we sampled at ω=2πNk ω 2 N k where k=01N1 k 0 1 N 1 . In this equation, Xk X k for k=0N1 k 0 N 1 is called the Discrete Fourier Transform (DFT) of xn x n .

Example 1: Example 1

Figure 2
Finite Duration DT Signal
Finite Duration DT Signal (sec8_fig2.png)

The DTFT of the above image is written as follows:

Xω= n =0N1xne(i)ωn X ω n N 1 0 x n ω n
where ωω is any 2π 2 -interval, for example πωπ ω .

Figure 3
Sample X(w)
Sample X(w) (sec8_fig3.png)

where again we sampled at ω=2πNk ω 2 N k where k=01M1 k 0 1 M 1 . For example, we take M=10 M 10 . In the following section we will discuss in more detail how we should choose MM, the number of samples in the 2π 2 interval.

(This is precisely how we would plot Xω X ω in Matlab.)

Choosing M

Case 1

Given NN (length of xn x n ), choose M≫N to obtain a dense sampling of the DTFT:

Figure 4
Figure 4 (sec8_fig4.png)
Case 2

Choose MM as small as possible (to minimize the amount of computation).

In general, we require MN M N in order to represent all information in n ,n=0N1:xn n n 0 N 1 x n Let's concentrate on M=N M N : xn DFT Xk x n DFT X k for n=k=0N1 n k 0 N 1 numbers N  numbers numbersN  numbers

Discrete Fourier Transform (DFT)


Xk=X2πkN X k X 2 k N
where N=lengthxn N length x n and k=0N1 k 0 N 1 . In this case, M=N M N .


Xk= n =0N1xne(i)2πkNn X k n N 1 0 x n 2 k N n

Inverse DFT

xn=1N k =0N1Xkei2πkNn x n 1 N k N 1 0 X k 2 k N n


Represent xn x n in terms of a sum of NN complex sinusoids of amplitudes Xk X k and frequencies k ,k=0N1: w k =2πkN k k 0 N 1 w k 2 k N


Fourier Series with fundamental frequency 2πN 2 N

Remark 1

IDFT treats xn x n as though it were N-periodic.

xn=1N k =0N1Xkei2πkNn x n 1 N k N 1 0 X k 2 k N n

Exercise 1

What about other values of n?


xn+N=??? x n N ???

Remark 2

Proof that the IDFT inverts the DFT for n=0N1 n 0 N 1

1N k =0N1Xkei2πkNn=1N k =0N1 m =0N1xme(i)2πkNmei2πkNn=??? 1 N k N 1 0 X k 2 k N n 1 N k N 1 0 m N 1 0 x m 2 k N m 2 k N n ???

Example 2: Computing DFT

Given the following discrete-time signal with N=4 N 4 , we will compute the DFT using two different methods (the DFT Formula and Sample DTFT):

Figure 5
Figure 5 (sec8_fig5.png)

  1. DFT Formula
    Xk= n =0N1xne(i)2πkNn=1+e(i)2πk4+e(i)2πk42+e(i)2πk43=1=e(i)π2k X k n N 1 0 x n 2 k N n 1 2 k 4 2 k 4 2 2 k 4 3 1 2 k k 3 2 k
    Using the above equation, we can solve and get the following results: x0=4 x 0 4 x1=0 x 1 0 x2=0 x 2 0 x3=0 x 3 0
  2. Sample DTFT. Using the same figure, Figure 5, we will take the DTFT of the signal and get the following equations:
    Xω=n=03e(i)ωn=1e(i)4ω1e(i)ω=??? X ω n 3 0 ω n 1 4 ω 1 ω ???
    Our sample points will be: ω k =2πk4=π2k ω k 2 k 4 2 k where k=0123 k 0 1 2 3

Figure 6
Figure 6 (sec8_fig6.png)

Periodicity of the DFT

DFT Xk X k consists of samples of DTFT, so Xω X ω , a 2π-periodic DTFT signal, can be converted to Xk X k , an N-periodic DFT.

Xk= n =0N1xne(i)2πkNn X k n N 1 0 x n 2 k N n
where e(i)2πkNn 2 k N n is an N-periodic basis function.

Figure 7
Figure 7 (sec8_fig7.png)

Also, recall,

xn= n =0N1Xkei2πkNn= n =0N1Xkei2πkN(n+mN)=??? x n n N 1 0 X k 2 k N n n N 1 0 X k 2 k N n m N ???

Example 3: Illustration

Figure 8
Figure 8 (sec8_fig8.png)


When we deal with the DFT, we need to remember that, in effect, this treats the signal as an N-periodic sequence.

A Sampling Perspective

Think of sampling the continuous function Xω X ω , as depicted below. Sω S ω will represent the sampling function applied to Xω X ω and is illustrated below as well. This will results in our discrete-time sequence, Xk X k .

Figure 9
Figure 9 (sec8_fig9.png)


Remember the multiplication in the frequency domain is equal to convolution in the time domain!

Inverse DTFT of S(ω)

k =δω2πkN k δ ω 2 k N
Given the above equation, we can take the DTFT and get the following equation:
N m =δωmN=Sn N m δ ω m N S n

Exercise 2

Why does the above equation equal Sn S n ?


Sn S n is N-periodic, so it has the following Fourier Series:

c k =1NN2N2δne(i)2πkNnd n =1N c k 1 N n N 2 N 2 δ n 2 k N n 1 N
Sn= k =e(i)2πkNn S n k 2 k N n
where the DTFT of the exponential in the above equation is equal to δω2πkN δ ω 2 k N .

So, in the time-domain we have:

Figure 10
Figure 10 (sec8_fig10.png)


Figure 11
Figure 11 (sec8_fig11.png)

Combine these to see...

Figure 12
Figure 12 (sec8_fig11b.png)

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens


A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks