Skip to content Skip to navigation

Connexions

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

Navigation

Content Actions

Lenses

What is a lens?

Definition of a lens

Lenses

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

What is in a lens?

Lens makers point to Connexions 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 Connexions member, a community, or a respected organization.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice University OCW

    This module is included inLens: Rice University OpenCourseWare
    By: OpenCourseWare ConsortiumAs a part of collection:"Intro to Digital Signal Processing"

    Click the "Rice University OCW" link to see all content affiliated with them.

Tags

(What is a tag?)

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

The DFT: Frequency Domain with a Computer Analysis

Module by: Robert Nowak

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

Introduction

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
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 ωω and ΩΩ are continuous frequency variables.

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 NN-point signal).

Xω=n=0N-1xn-ωn X ω n N 1 0 x n ω n (1)
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=0N-1xn-2πkNn X k X 2 N k n N 1 0 x n 2 k N n (2)
In Equation 2 we sampled at ω=2πNk ω 2 N k where k=01N-1 k 0 1 N 1 and Xk X k for k=0N-1 k 0 N 1 is called the Discrete Fourier Transform (DFT) of xn x n .

Example 1

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

The DTFT of the image in Figure 2 is written as follows:

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

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

where again we sampled at ω=2πNk ω 2 N k where k=01M-1 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 MN M N to obtain a dense sampling of the DTFT (Figure 4):

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=0N-1: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=0N-1 n 0 N 1 and k=0N-1 k 0 N 1 numbers N  numbers numbersN  numbers

Discrete Fourier Transform (DFT)

Define

XkX2πkN X k X 2 k N (4)
where N=lengthxn N length x n and k=0N-1 k 0 N 1 . In this case, M=N M N .

DFT

Xk=n=0N-1xn-2πkNn X k n N 1 0 x n 2 k N n (5)

Inverse DFT (IDFT)

xn=1Nk=0N-1Xk2πkNn x n 1 N k N 1 0 X k 2 k N n (6)

Interpretation

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

Think:

Fourier Series with fundamental frequency 2πN 2 N

Remark 1

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

xn=1Nk=0N-1Xk2πkNn x n 1 N k N 1 0 X k 2 k N n (7)
where n0N-1 n 0 N 1

Problem 1

What about other values of nn?

Solution 1

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

[ Click for Solution 1 ]

Remark 2

Proof that the IDFT inverts the DFT for n0N-1 n 0 N 1

1Nk=0N-1Xk2πkNn=1Nk=0N-1m=0N-1xm-2πkNm2π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 ??? (8)

Example 2: Computing DFT

Given the following discrete-time signal (Figure 5) 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=0N-1xn-2πkNn=1+-2πk4+-2πk42+-2πk43=1+-π2k+-πk+-32πk 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 (9)
    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=03-ωn=1--4ω1--ω=??? X ω n 0 3 ω n 1 4 ω 1 ω ??? (10)
    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
Figure 6 (sec8_fig6.png)

Periodicity of the DFT

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

Xk=n=0N-1xn-2πkNn X k n N 1 0 x n 2 k N n (11)
where -2πkNn 2 k N n is an NN-periodic basis function (See Figure 7).

Figure 7
Figure 7 (sec8_fig7.png)

Also, recall,

xn=1Nn=0N-1Xk2πkNn=1Nn=0N-1Xk2πkNn+mN=??? x n 1 N n N 1 0 X k 2 k N n 1 N n N 1 0 X k 2 k N n m N ??? (12)

Example 3: Illustration

Figure 8
Figure 8 (sec8_fig8.png)

note:

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

A Sampling Perspective

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

Figure 9
Figure 9 (sec8_fig9.png)

Recall:

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 (13)
Given the above equation, we can take the DTFT and get the following equation:
Nm=-δn-mNSn N m δ n m N S n (14)

Problem 2

Why does Equation 14 equal Sn S n ?

Solution 2

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

c k =1N-N2N2δn-2πkNndn=1N c k 1 N n N 2 N 2 δ n 2 k N n 1 N (15)
Sn=k=--2πkNn S n k 2 k N n (16)
where the DTFT of the exponential in the above equation is equal to δω-2πkN δ ω 2 k N .

[ Click for Solution 2 ]

So, in the time-domain we have (Figure 10):

Figure 10
Figure 10 (sec8_fig10.png)

Connections

Figure 11
Figure 11 (sec8_fig11.png)

Combine signals in Figure 11 to get signals in Figure 12.

Figure 12
Figure 12 (sec8_fig11b.png)

Comments, questions, feedback, criticisms?

Send feedback