Top Banner
1 Discrete Fourier Transform 3.1 Discrete Fourier Transform Dr Yvan Petillot Discrete Fourier Transform 3.2 Section Contents LTIs and DFT Discrete Fourier Transform Relation between DFT and Fourier Transform Effects of various parameters on DFT • Summary
24

Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

Aug 21, 2018

Download

Documents

nguyennhi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

1

Discrete Fourier Transform 3.1

Discrete Fourier Transform

Dr Yvan Petillot

Discrete Fourier Transform 3.2

Section Contents

• LTIs and DFT

• Discrete Fourier Transform

• Relation between DFT and Fourier Transform

• Effects of various parameters on DFT

• Summary

Page 2: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

2

Discrete Fourier Transform 3.3

Fourier Transform

• Used for spectral analysis

• Core to filtering (Convolution theorem)

• Core to signal modeling

• The Basic tool of digital signal processing

Discrete Fourier Transform 3.4

LTIs

h(t)x(n) y(n)= λ x(n)

Eigenfunctions of LTIs?eigenvalue

Are

∞<<∞= n- ,e)n(x jnw

As:

∑∑

−∞=

−∞=

−∞=

−∞

−∞=

=

λ===

=−==

k

jwkjw

jwnjwjwn

k

jwkjwn

k

)kn(jw

k

e)k(h)e(H

e)e(Hee)k(he

e)k(h)kn(x)k(h)n(x*)n(h)n(y

Discrete Time Fourier Transform

Page 3: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

3

Discrete Fourier Transform 3.5

Discrete Fourier Transform

Reminder

|A|

-fa fa -fa fa-fa fa-fs fs

fs,fat

|A|

FT

discrete signal

periodic spectra

|A|

-fa fa

fs,fat

|A|

FT

Periodic signal

Discrete spectrum

Discrete Fourier Transform 3.6

Fourier Series Construction

Original Signal (Sum of Sinusoidal Components)

Individual Pure Sinusoidal Components

Page 4: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

4

Discrete Fourier Transform 3.7

Discrete Fourier Transform

Discrete Fourier seriesGive representation for periodic signals

Real signal:Non periodic, finite length. We cannot use Fourier Series!

a non-periodic finite sequence can be considered as one period of a periodic

infinite sequence!

signalperiodic the of period the is T whereT/2w

dte)t(xT1

)n(X wheree)n(X)t(x

0

2/T

2/T

)tjnw(

k

tjww 00

π=

== ∫∑−

−∞

−∞=

Discrete Fourier Transform 3.8

Discrete Fourier Transform

Example ∞≤≤∞≤≤=+ k- 1,-Nn0 ),n(x)kNn(xp

≤≤

= elsewhere 0

1-Nn0 ),n(x)n(x p

Page 5: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

5

Discrete Fourier Transform 3.9

Discrete Fourier Transform

Discrete Fourier Transform:Discrete Fourier Series of the periodised signal xp(n)

Use only one period of the resulting sequence for x(n)

Definition of the DFT

1-Nn0 ,e )k(XN1

x(n)

1-Nk0 ,e )n(x X(k)

1-Nk0 ,e )n(x)k(X

N

kn2j1N

0k

N

kn2j1N

0n

N

kn2j1N

0np

≤≤=

≤≤=

≤≤=

π−

=

π−−

=

π−−

=

Inverse DFT

Discrete Fourier Transform 3.10

Discrete Fourier Transform

Example

Calculate the DFT

Page 6: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

6

Discrete Fourier Transform 3.11

Discrete Fourier Transform / Fourier Transform

Discrete Time Fourier Transform

θ−−

=

θ ∑=jn1N

0n

j e )n(x)e(Xn)

N

k2(j1N

0n

e )n(xX(k)

π−−

=∑=

Discrete Fourier Transform

θN

k2π

Discrete Fourier Transform 3.12

Record length/Frequency resolution/Sampling frequency

∑∑−

=

−∞=

=−δ=1N

0ks

kss )kT(x)kTt()t(x)k(x

nkN2

j1N

0k

nkN

2j-1N

0n

e )fk(XN1

)nT(x

e )nT(x)fk(X

π−

=

π−

=

∆=

=∆

Ts is the sampling frequency

∆f is the frequency spacing (resolution) of the DFT coefficients

Page 7: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

7

Discrete Fourier Transform 3.13

Record length/Frequency resolution/Sampling frequency

Example: )t600cos(B)t200cos(A)t(x π+π=

Sampled at 1kHz.

Find the period of the resulting sequence x(nT), i.e. N

Find the frequency resolution

Discrete Fourier Transform 3.14

Record length/Frequency resolution/Sampling frequency

Frequency resolution:

If x(nT) is made of frequency components spaced by less than ∆f Hertz, the DFT will NOT represent them

duration signal:T

T1

N

ff

0

0

s ==∆

Same example but k = 0,1,…,9

Notice folding around k = 5 = fs/2

Page 8: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

8

Discrete Fourier Transform 3.15

Record length/Frequency resolution/Sampling frequency

An analogue signal of 200ms length is sampled at 2.5 kHz.

What is the maximum frequency present is aliasing is to be avoided?

What is the frequency resolution of the DFT?

What analogue frequencies are represented by the DFT?

Discrete Fourier Transform 3.16

Record length/Frequency resolution/Sampling frequency

Solution: An analogue signal of 200ms length is sampled at 2.5 kHz.

What is the maximum frequency present is aliasing is to be avoided?

Nyquist: max frequency = fs/2 = 1.25kHz

What is the frequency resolution of the DFT?

What analogue frequencies are represented by the DFT?

0, 5, 10, 15 ,…, 1250, -1245, …, -5 Hz

Hz52.0

1T1

Nf

f0

s ====∆

Page 9: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

9

Discrete Fourier Transform 3.17

Examples of applications

Hold N constant with two sampling periods Ta, Tb=2 Ta.

Effect?

2f

NT21

NT1

T1

f ,NT

1T1

f a

ab0b

a0a

∆====∆==∆

Discrete Fourier Transform 3.18

Examples of applications

Page 10: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

10

Discrete Fourier Transform 3.19

DFT analysis

Discrete Fourier Transform 3.20

DFT analysis example

nk)6

2(j5

0n

e )n(xX(k)

π−

=∑=

Ts= 0.01sN 0 1 2 3 4 5x(n) 5 -1.5 6.5 -3 6.5 -1.5

Frequency content of the sequence?

Frequency resolution?

Page 11: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

11

Discrete Fourier Transform 3.21

Properties of the DFT

Linearity:

[ ] )k(bX)k(aXe (n)]bx)n(ax[(n)bx(n)axDFT 21

nk)N

2(j1N

0n2121 +=+=+

π−−

=∑

Symmetry

if x(n) is a sequence of real numbers:

[ ] [ ]

[ ] [ ]

)kN(X)k(X

k)-X(NX(k)

odd N ,2

1N1,2,..., k ,)kN(XIm)k(XIm

even N ,12N

1,2,..., k ,)kN(XRe)k(XRe

−−∠=∠

=

−=−−=

−=−=

Discrete Fourier Transform 3.22

Properties of the DFT

Circular shift

Page 12: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

12

Discrete Fourier Transform 3.23

Properties of the DFT

Circular shift

kmN

2j

12

12

e)k(X)k(X

)mn(x)n(xπ

=

+=

Demonstration

kmN

2j

12

112

e)k(X)k(X

)mn(*)n(x)mn(x)n(xπ

=

+δ=+=

Direct demonstration left as an exercise

Discrete Fourier Transform 3.24

Properties of the DFT

Alternate IDFT

*

N

kn2j1N

0k

*

N

kn2j1N

0k

e )k(XN1

x(n)

1-Nn0 ,e )k(XN1

x(n)

=

≤≤=

π−−

=

π−

=

Duality PARSEVAL THEOREM

)k(x)N(XN1

)k(X x(n)

−↔

? N1

Why ∑∑∞

−∞=

−∞=

=k

2

n

2)k(X

N1

x(n)

Page 13: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

13

Discrete Fourier Transform 3.25

Properties of the DFT

Example:

Complete the relationship using the duality principle:

elsewhere 0 x(n)

1-N 0,1,...,n n/N),cos(2 x(n)

==π=

?X(k) n/N)cos(2 x(n) =↔π=

? x(-k)? X(n)N1 =↔=

Discrete Fourier Transform 3.26

Properties of the DFT

Example:

elsewhere 0 x(n)

1-N 0,1,...,n n/N),cos(2 x(n)

==π=

Page 14: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

14

Discrete Fourier Transform 3.27

Discrete convolution

• Remember: Filtering is a linear convolution!

• Infinite signals uncommon!

• Can we do the same with finite, periodic signals?

∑∞

−∞=

−=∗=m

2121 )mn(x)m(x)n(x)n( x c(n) Discrete Linear convolution

Discrete Fourier Transform 3.28

Discrete convolution

Linear Convolution

∑∞

−∞=

−=∗=m

2121 )mn(x)m(x)n(x)n( x c(n) Linear convolution

Periodic Convolution

)k(X)k(X)k(X

e (n)xN1

(k)X

e (n)xN1

(k)X

p2p1p3

N

kn2j1N

0kp22p

N

kn2j1N

0kp11p

=

=

=

π−−

=

π−−

=

∑)n)(

Nk2

(j1N

0mp3p3

1N

0n

)mn)(N

k2(j1N

0m2pp1p2p1p3

e )n(x)k(X

e (m) x)n(x)k(X)k(X)k(X

π−−

=

=

+π−−

=

∑∑

=

==

∑−

=

−=1N

0mp2p1p3 )mn(x)m(x)n(x

Periodic convolution

Periodic Convolution: Same as linear convolution but over one period

Page 15: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

15

Discrete Fourier Transform 3.29

Periodic convolution

Periodic Convolution

Example: Find the periodic convolution of sequence below

)k(X)k(X)k(X p2p1p3 =∑−

=

−=1N

0mp2p1p3 )mn(x)m(x)n(x

DFT

Discrete Fourier Transform 3.30

Periodic convolution

Final result:

A bit tedious?

Page 16: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

16

Discrete Fourier Transform 3.31

Periodic convolution

Other solution:

Discrete Fourier Transform 3.32

Periodic convolution

Summary:

Periodic convolution of two sequences can be obtained by:

• Remaining in the time domain and using the convolution sum directly.

• Moving into the frequency domain using the following scheme:

x1p(n) DFT

x2p(n) DFTx x3p(n)= x1p(n)* x2p(n)IDFT

Page 17: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

17

Discrete Fourier Transform 3.33

Circular convolution

New Problem:

Can we perform linear convolution with finite length signals using DFTs ?

If we use DFT, we are dealing with sampled spectrum which implies … periodic signals!

Why not use the sum definition and forget about DFTs?

Discrete Fourier Transform 3.34

Circular convolution

A Parte:

Direct DFT Radix 2 FFT Direct Sum and addsconvolution

Numberof points

Complexmultiplies

Complexadditions

Complexmultiplies

Complexadditions

Complexmultiplies

Complexadditions

N N2 N2-N (N/2)log2(N)

Nlog2(N) 2 N2 N2

4 16 12 4 8 32 16

16 256 240 32 64 512 256

64 4096 4032 192 384 8192 4096

256 65536 65280 1024 2048 131072 65536

1024 1048576 1047552 5120 10240 2097152 1048576

DFTs in FFTs form are good for you!

Page 18: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

18

Discrete Fourier Transform 3.35

Circular convolution

Definition:

Consider x1(n) and x2(n) and x1p(n) and x2p(n) their periodic equivalent.

∑−

=

−=1N

0mp2p1p3 )mn(x)m(x)n(x

)n(x)n(x)mn(x)m(x)n(x 21

period one

1N

0mp2p13 ∗=

−= ∑

=Circular convolution

)k(X)k(X)k(X p2p1p3 =

x1(n) DFT

x2(n) DFTx x3(n)= x1(n)* x2(n)IDFT

Discrete Fourier Transform 3.36

Circular convolution

Is it what we want?

Different values

Different length

Linear convolution:

N1+N2-1 length

Circular convolution:

max(N1,N2).

Page 19: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

19

Discrete Fourier Transform 3.37

Circular convolution

Solution?Forcing linear and Circular

Convolution to be equivalent

Discrete Fourier Transform 3.38

Frequency Convolution

Use duality properties

)k(X)k(XN1

)n(x)n(x

)k(X)k(X)n(x (n)x

2121

2121

∗↔

↔∗

Page 20: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

20

Discrete Fourier Transform 3.39

Correlation

• Measure of similarity

• Target detection & classification

• Noise rejection

• Signal Modeling

• Related to the Power Spectral Density (PSD)

• Related to statistical description of signals (noise)

Discrete Fourier Transform 3.40

Correlation

Same as convolution but with no time reversal.

∑∞

−∞=

+=⊗=m

2121xx )mn(x)m(x)n(x (n)x(n)R21

∑∞

−∞=

+=⊗=m

11111xx )mn(x)m(x)n(x (n)x(n)R1

Crosscorrelation

Autocorrelation

Page 21: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

21

Discrete Fourier Transform 3.41

Correlation

Example

Discrete Fourier Transform 3.42

Correlation

Example

Page 22: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

22

Discrete Fourier Transform 3.43

Correlation

Properties

(-n)R(n)R1111 xxxx =

(-n)R(n)R1221 xxxx =

)n(x)n(x(p)R

)n(x)n(x(p)R

21xx

21xx

12

21

∗−=

−∗=

Convolution

Autocorrelation is always even

Cross correlation case

Discrete Fourier Transform 3.44

Correlation and DFTs

Circular correlation:

∑∑−

=

=

+=

+=

1N

0m21

period one

1N

0mp2p1xx )mn(x)m(x)mn(x)m(x(n)R~

21

Page 23: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

23

Discrete Fourier Transform 3.45

Correlation and DFTs

Can we perform circular correlation with DFTs ?

)n(x)n(x)mn(x)m(x)n(R~

21

period one

1N

0mp2p1xx 21

⊗=

+= ∑

=Circular correlation

[ ] )k(X)k(X)n(R~

DFT p2p1*

xx 21=

x1(n) DFT

x2(n) DFT*x IDFT )n(R

~21xx

Discrete Fourier Transform 3.46

Linear Correlation and DFTs

Page 24: Discrete Fourier Transform Dr Yvan Petillotceeyrp/WWW/Teaching/B39SE1/DSP2.pdf · Discrete Fourier Transform Dr Yvan Petillot ... Discrete Linear convolution Discrete Fourier Transform

24

Discrete Fourier Transform 3.47

Example of application

0 50 100 150 200 250 300-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

original signal0 100 200 300 400 500 600

-30

-20

-10

0

10

20

30

40

50

60

autocorrelation

0 50 100 150 200 250 300-4

-3

-2

-1

0

1

2

3

4

noisy signal (0db SNR) 0 100 200 300 400 500 600-30

-20

-10

0

10

20

30

40

50

60

cross-correlation

Discrete Fourier Transform 3.48

Learning outcomes

Discrete Fourier Transform, definition and properties

DFT analysis

Influence of parameters on frequency estimation

Discrete convolution: linear / circular

Discrete correlation: linear / circular