lecture 17: discrete fourier transform

10
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Derivation of the DFT Relationship to DTFT DFT of Truncated Signals Time Domain Windowing Resources: Wiki: Discrete Fourier Transform Wolfram: Discrete Fourier Transform DSPG: The Discrete Fourier Transform Wiki: Time Domain Windows ISIP: Java Applet LECTURE 17: DISCRETE FOURIER TRANSFORM URL:

Upload: moana-rosario

Post on 02-Jan-2016

459 views

Category:

Documents


33 download

DESCRIPTION

LECTURE 17: DISCRETE FOURIER TRANSFORM. Objectives: Derivation of the DFT Relationship to DTFT DFT of Truncated Signals Time Domain Windowing - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: LECTURE 17:  DISCRETE FOURIER TRANSFORM

ECE 8443 – Pattern RecognitionEE 3512 – Signals: Continuous and Discrete

• Objectives:Derivation of the DFTRelationship to DTFTDFT of Truncated SignalsTime Domain Windowing

• Resources:Wiki: Discrete Fourier TransformWolfram: Discrete Fourier TransformDSPG: The Discrete Fourier TransformWiki: Time Domain WindowsISIP: Java Applet

LECTURE 17: DISCRETE FOURIER TRANSFORM

URL:

Page 2: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 2

• The Discrete-Time Fourier Transform:

• Not practical for (real-time) computation on a digital computer.

• Solution: limit the extent of the summation to N points and evaluate the continuous function of frequency at N equispaced points:

• MATLAB code for the DFT:

• The exponentials can be precomputedso that the DFT can be computedas a vector-matrix multiplication.

• Later we will exploit the symmetryproperties of the exponential tospeed up the computation (e.g., fft()).

The Discrete-Time Fourier Transform

(analysis)][

)(synthesis2

1][

2

n

njj

njj

enxeX

deeXnx

1

0

/22 ][)(

N

n

Nknjkk

N

j enxXkXeX

Page 3: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 3

Computation of the DFT

• Given the signal:

31

20

11

06

)2

3sin()sin(2)

2sin(2

)2

3cos()cos(2)

2cos(21

3,2,1,0,1221

]3[]2[]1[]0[

3,2,1,0,][

]1,2,2,1[otherwise0][,1]3[,2]2[,2]1[,1]0[

2/32/

4/)3(24/)2(24/)1(24/)0(2

3

0

4/2

kj

k

kj

k

X

kk

kj

kk

k

keee

exexexex

kenxX

nxxxxx

k

kjkjkj

kjkjkjkj

n

knjk

x

Page 4: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 4

Symmetry

• The magnitude and phase functions are even and odd respectively.

• The DFT also has “circular” symmetry:

• When N is even, |Xk| is symmetric about N/2.

• The phase, Xk, has odd symmetry about N/2.

)ofconjugatecomplex(][

Therefore,

...,2,1,01

But,

][][

:Let

][

1

0

/2

2

1

0

2/21

0

/)(2

1

0

/2

kk

N

n

NknjkN

nj

N

n

njNknjN

n

NnkNjkN

N

n

Nknjk

XXenxX

nfore

eenxenxX

kNk

enxX

Page 5: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 5

Inverse DFT

• The inverse transform follows from the DT Fourier Series:

1...,,1,0,1

][1

0

/2

NneXN

nxN

k

Nknjk

Page 6: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 6

Computation of the Inverse DFT

14/41164

1

))(1()0())(1(64

1

4

1]3[

24/81164

1

)1)(1()0()1)(1(64

1

4

1]2[

24/81164

1

))(1()1)(0()1(64

1

4

1]1[

14

4116

4

1

4

1]0[

4

1][

31

20

11

06

4/183

32

2/310

33

2210

2/332

2/10

3210

4/)3(23

4/)2(22

4/)1(210

jj

jjjjeXeXeXXx

jj

jjeXeXeXXx

jj

jjjjeXeXeXXx

jjXXXXx

eXeXeXXnx

kj

k

kj

k

X

jjj

jjj

jjj

njnjnj

k

Page 7: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 7

Relationship to the DTFT

• The DFT and the DFT are related by:

• If we define a pulse as:

• The DFT is simply a sampling of theDTFT at equispaced points along thefrequency axis.

• As N increases, the sampling becomesfiner. Note that this is true even whenq is constant increasing N is a way ofinterpolating the spectrum.

1

0

/22 ][)(

N

n

Nknjkk

N

j enxXkXeX

otherwise

qnnx

,0

2...,,2,1,0,1][

)2/sin(

))2/1(sin(

)2/sin(

))2/1(sin(

qeX

eq

eX

j

jqj• q=5, N = 22

• q = 5, N = 88

• q = 5

Page 8: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 8

DFT of Truncated Signals• What if the signal is not time-limited?

We can think of limiting the sum toN points as a truncation of the signal:

• What are the implications of this in the frequency domain?(Hint: convolution)

• Popular Windows: Rectangular:

Generalized Hanning:

Triangular:

otherwise

Nnnw

nxnwnxw

,0

...,,2,1,0,1][

][][][

otherwise

Nnnw

,0

...,,2,1,0,1][

)1

2cos()1(][

N

nnw

)2

1

2(

2][

N

nN

Nnw

• Rectangular

• Generalized Hanning

• Triangular

Page 9: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 9

Impact on Spectral Estimation• The spectrum of a windowed

sinewave is the convolution of two impulse functions with the frequency response of the window.

• For two closely spaced sinewaves, there is “leakage” between each sinewave’s spectrum.

• The impact of this leakage can be mitigated by using a window function with a narrower main lobe.

• For example, consider the spectrum of three sinewaves computed using a rectangular and a Hamming window.

• We see that for the same number of points, the spectrum produced by te Hamming window separates the sinewaves.

• What is the computational cost?

Page 10: LECTURE 17:  DISCRETE FOURIER TRANSFORM

EE 3512: Lecture 17, Slide 10

Summary• Introduced the Discrete Fourier Transform as a truncated version of the

Discrete-Time Fourier Transform.

• Demonstrated both the forward and inverse transforms.

• Explored the relationship to the DTFT.

• Compared the spectrum of a pulse.

• Discussed the effects of truncation on the spectrum.

• Introduced the concept of time domain windowing and discussed the impact of windows in the frequency domain.