6.003 signal processing0 two ways to think about dft we can think about the dft in two different...

21
6.003 Signal Processing Week 5, Lecture B: Discrete Fourier Transform (II) 6.003 Fall 2020

Upload: others

Post on 03-Mar-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

  • 6.003 Signal Processing

    Week 5, Lecture B:Discrete Fourier Transform (II)

    6.003 Fall 2020

  • Discrete Fourier TransformA new Fourier representation for DT signals:

    The DFT has a number of features that make it particular convenientβ€’ It is not limited to periodic signals. β€’ It is discrete in both domains, making it computationally feasible

    Synthesis equation

    Analysis equation

    π‘₯ 𝑛 =

    π‘˜=0

    π‘βˆ’1

    𝑋 π‘˜ 𝑒𝑗2πœ‹π‘˜π‘ 𝑛

    𝑋 π‘˜ =1

    𝑁

    𝑛=0

    π‘βˆ’1

    π‘₯[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

    The FFT (Fast Fourier Transform) is an algorithm for computing the DFT efficiently.

  • π‘₯0 𝑛

    Two Ways to Think About DFTWe can think about the DFT in two different ways:

    1. Think about DFT as Fourier series of N samples of the signal, periodically extended.

    We can see why DFT of a single sinusoid is not concentrated in a single k component

    𝑋 π‘˜ =1

    𝑁

    𝑛=0

    π‘βˆ’1

    π‘₯[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

    DFT

    𝑋0 π‘˜iDFT

    π‘₯ 𝑛 =

    π‘˜=0

    π‘βˆ’1

    𝑋 π‘˜ 𝑒𝑗2πœ‹π‘˜π‘ 𝑛

    π‘₯𝑝 𝑛

  • Two Ways to Think About DFTWe can think about the DFT in two different ways:

    1. Think about DFT as Fourier series of N samples of the signal, periodically extended.

    2. Think about DFT as the scaled Fourier transform of a β€œwindowed” version of the original signal.

  • DFT: Relation to DTFT

    𝑋𝑀 Ξ© =

    𝑛=βˆ’βˆž

    ∞

    π‘₯𝑀[𝑛] βˆ™ π‘’βˆ’π‘—Ξ©π‘›

    DTFT

    𝑋𝑀 Ξ© =

    𝑛=0

    π‘βˆ’1

    π‘₯𝑀[𝑛] βˆ™ π‘’βˆ’π‘—Ξ©π‘›

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

    𝑋 π‘˜π‘‹ π‘˜ =

    1

    𝑁𝑋𝑀(

    2πœ‹π‘˜

    𝑁)

  • Effect of Windowing on Fourier RepresentationsExample: complex exponential signal π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛

    Compute the DTFT:

    π‘₯[𝑛] =1

    2πœ‹ΰΆ±2πœ‹

    𝑋(Ξ©) βˆ™ 𝑒𝑗Ω𝑛 𝑑Ω = 𝑒𝑗Ω0𝑛We need to find 𝑋(Ξ©) such that :

    π‘₯ 𝑛 =1

    2πœ‹ΰΆ±βˆ’πœ‹

    πœ‹

    𝑋 Ξ© βˆ™ 𝑒𝑗Ω𝑛 𝑑Ω = 𝑒𝑗Ω0𝑛

    𝑋 Ξ© =

    π‘š=βˆ’βˆž

    ∞

    2πœ‹π›Ώ(Ξ© βˆ’ Ξ©0 + 2πœ‹π‘š)

  • Effect of Windowing on Fourier Representations

    Apply a rectangular window

    π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛to the complex exponential signal

    What the Fourier Transform 𝑋𝑀 Ξ© look like?

    𝑋𝑀 Ξ© =

    𝑛=βˆ’βˆž

    ∞

    π‘₯𝑀[𝑛]π‘’βˆ’π‘—Ξ©π‘›

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

    such that π‘₯𝑀 𝑛 = π‘₯ 𝑛 βˆ™ 𝑀 𝑛 = 𝑒𝑗Ω0𝑛𝑀[𝑛]

    =

    𝑛=βˆ’βˆž

    ∞

    𝑒𝑗Ω0𝑛𝑀[𝑛]π‘’βˆ’π‘—Ξ©π‘› =

    𝑛=βˆ’βˆž

    ∞

    𝑀[𝑛]π‘’βˆ’π‘—(Ξ©βˆ’Ξ©0)𝑛

    = π‘Š(Ξ© βˆ’ Ξ©0)

    𝑒𝑗Ω0𝑛𝑀[𝑛]𝐷𝑇𝐹𝑇

    π‘Š(Ξ© βˆ’ Ξ©0)

  • Effect of Windowing on Fourier Representations

    Let As shown below for N=15

    What is the DTFT of 𝑀[𝑛]?

    π‘Š Ξ© =

    𝑛=βˆ’βˆž

    ∞

    𝑀[𝑛]π‘’βˆ’π‘—Ξ©π‘›

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

    =

    𝑛=0

    π‘βˆ’1

    π‘’βˆ’π‘—Ξ©π‘›

    π‘Š Ξ© =1 βˆ’ π‘’βˆ’π‘—Ξ©π‘

    1 βˆ’ π‘’βˆ’π‘—Ξ©=π‘’βˆ’π‘—Ξ©

    𝑁2(𝑒𝑗Ω

    𝑁2 βˆ’ π‘’βˆ’π‘—Ξ©

    𝑁2)

    π‘’βˆ’π‘—Ξ©12(𝑒𝑗Ω

    12 βˆ’ π‘’βˆ’π‘—Ξ©

    12)

    =sin(Ξ©

    𝑁2)

    sin(Ξ©2)π‘’βˆ’π‘—Ξ©

    π‘βˆ’12

    If Ξ©=0, π‘Š Ξ© = 0 = 𝑁

    If Ξ© β‰  0:

  • From Lecture 04B:

    𝑃𝑆(Ξ©) =sin(Ξ©(𝑆 +

    12)

    sin(Ξ©2)

  • Effect of Windowing on Fourier Representations

    Let As shown below for N=15

    What is the DTFT of 𝑀[𝑛]?

    π‘Š Ξ© =

    𝑛=βˆ’βˆž

    ∞

    𝑀[𝑛]π‘’βˆ’π‘—Ξ©π‘›

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

    =

    𝑛=0

    π‘βˆ’1

    π‘’βˆ’π‘—Ξ©π‘› =

    𝑁 Ξ© = 0

    sin(Ω𝑁2)

    sin(Ξ©2)π‘’βˆ’π‘—Ξ©

    π‘βˆ’12 , Ξ© β‰  0

  • Effect of Windowing on Fourier Representations

    The effect of windowing can be seen from this example of complex exponential signal:

    The frequency content of X(Ω) is at discrete frequencies Ω = Ωo + 2Ο€m

    The frequency content of Xw(Ω) is most dense at these same frequencies, but is spread out over almost all other frequencies as well.

    Effect of windowing: spectrum smear

    π‘₯𝑀 𝑛 = 𝑒𝑗Ω0𝑛𝑀[𝑛]

    𝐷𝑇𝐹𝑇 𝑋𝑀 Ξ© = π‘Š(Ξ© βˆ’ Ξ©0)

  • DFT: Relation to DTFT

    𝑋 π‘˜ =1

    𝑁

    𝑛=0

    π‘βˆ’1

    π‘₯[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘

    𝑛

    DFT

    𝑋𝑀 Ξ© =

    𝑛=βˆ’βˆž

    ∞

    π‘₯𝑀[𝑛] βˆ™ π‘’βˆ’π‘—Ξ©π‘›

    DTFT

    𝑋𝑀 Ξ© =

    𝑛=0

    π‘βˆ’1

    π‘₯𝑀[𝑛] βˆ™ π‘’βˆ’π‘—Ξ©π‘›

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

    𝑋 π‘˜π‘‹ π‘˜ =

    1

    𝑁𝑋𝑀(

    2πœ‹π‘˜

    𝑁)

  • Effect of Windowing on Fourier RepresentationsConsidering the example of π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛 and π‘₯𝑀 𝑛 = 𝑒

    𝑗Ω0𝑛𝑀 𝑛 with Ξ©0 =2πœ‹

    15:

    One sample is taken at the peak, and the others fall on zeros.

    Because the signal is periodic within the analysis window N.

    Ξ© =2πœ‹π‘˜

    𝑁

  • Effect of Windowing on Fourier RepresentationsConsidering the example of π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛 and π‘₯𝑀 𝑛 = 𝑒

    𝑗Ω0𝑛𝑀 𝑛 with Ξ©0 =4πœ‹

    15:

    One sample is taken at the peak, and the others fall on zeros.

    Because the signal is periodic within the analysis window N.

    Ξ© =2πœ‹π‘˜

    𝑁

  • Effect of Windowing on Fourier RepresentationsConsidering the example of π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛 and π‘₯𝑀 𝑛 = 𝑒

    𝑗Ω0𝑛𝑀 𝑛 with Ξ©0 =3πœ‹

    15:

    Ξ© =2πœ‹π‘˜

    𝑁

    Now none of the samples fall on zeros.

  • Effect of Windowing on Fourier RepresentationsConsidering the example of π‘₯ 𝑛 = 𝑒𝑗Ω0𝑛 and π‘₯𝑀 𝑛 = 𝑒

    𝑗Ω0𝑛𝑀 𝑛 with Ξ©0 =2.4πœ‹

    15:

    Ξ© =2πœ‹π‘˜

    𝑁

    Generally, the relation between the samples is complicated.

  • Spectral Blurring & Frequency ResolutionLonger windows provide finer frequency resolution.

    The width of the central lobe is inversely related to window length.

    π‘Š Ξ© =sin(Ξ©

    𝑁2)

    sin(Ξ©2)

    π‘’βˆ’π‘—Ξ©π‘βˆ’12

  • Spectral Blurring & Time/Frequency Tradeoff

    β†’ fundamental tradeoff between resolution in frequency and time.

    However, longer windows provide less temporal resolution.

    𝑀[𝑛] = ࡜1 0 ≀ 𝑛 < 𝑁0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

  • Other types of Windows

    𝑀2 𝑛 =ࡗ𝑁 2 βˆ’ ΰ΅—

    𝑁2 βˆ’ 𝑛

    ࡗ𝑁 2

    𝑀1[𝑛]

    triangular window

    Rectangular window

    Hann (or β€œHanning”) window

  • Effects of Different Types of WindowsThe DFT coefficients of π‘₯2 𝑛 = cos

    3πœ‹

    64𝑛 analyzed with N = 64:

    Triangular window

    Hann (or β€œHanning”) window:

  • SummaryThe Discrete Fourier Transform (DFT)

    The two different perspectives looking at DFT and insights gained

    Synthesis equation

    Analysis equation

    π‘₯ 𝑛 =

    π‘˜=0

    π‘βˆ’1

    𝑋 π‘˜ 𝑒𝑗2πœ‹π‘˜π‘ 𝑛

    𝑋 π‘˜ =1

    𝑁

    𝑛=0

    π‘βˆ’1

    π‘₯[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

    A central issue in using the DFT is understanding the tradeoff between time and frequency

    β€’ Long analysis windows N provide high resolution in frequency but poor resolution in time.

    β€’ Short analysis windows N provide high resolution in time but poor resolution in frequency.

    The effect of windowing and different types of windows