Fast Fourier Transform

Similar documents
PHYS 502 Lecture 3: Fourier Series

Computer Problems for Fourier Series and Transforms

CS711008Z Algorithm Design and Analysis

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case.

Mathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT

Today s lecture. The Fourier transform. Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm

More on Fourier Series

Periodic functions: simple harmonic oscillator

Analysis II: Fourier Series

Lecture 5. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

Transforms and Orthogonal Bases

Algorithms of Scientific Computing

Fig. 1: Fourier series Examples

Fast Fourier Transform

Weighted SS(E) = w 2 1( y 1 y1) y n. w n. Wy W y 2 = Wy WAx 2. WAx = Wy. (WA) T WAx = (WA) T b

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

MATH 124B: HOMEWORK 2

4.3 The Discrete Fourier Transform (DFT) and the Fast Fourier Transform (FFT)

Computational Methods CMSC/AMSC/MAPL 460

! Circular Convolution. " Linear convolution with circular convolution. ! Discrete Fourier Transform. " Linear convolution through circular

Power Series Solutions We use power series to solve second order differential equations

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

ECG782: Multidimensional Digital Signal Processing

The Fourier Transform (and more )

f (t) K(t, u) d t. f (t) K 1 (t, u) d u. Integral Transform Inverse Fourier Transform

Intelligent Visual Prosthesis

Image Filtering, Edges and Image Representation

Math 3150 HW 3 Solutions

6.003: Signals and Systems. Sampling and Quantization

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Time-Frequency Analysis

Design and Analysis of Algorithms

ESE 250: Digital Audio Basics. Week 4 February 5, The Frequency Domain. ESE Spring'13 DeHon, Kod, Kadric, Wilson-Shah

Topic 3: Fourier Series (FS)

5.6 Convolution and FFT

FOURIER SERIES, HAAR WAVELETS AND FAST FOURIER TRANSFORM

Emily Jennings. Georgia Institute of Technology. Nebraska Conference for Undergraduate Women in Mathematics, 2012

FOURIER SERIES. Chapter Introduction

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018

Sequential Fast Fourier Transform (PSC ) Sequential FFT

Scientific Computing: An Introductory Survey

SYDE 575: Introduction to Image Processing. Image Compression Part 2: Variable-rate compression

3 rd class Mech. Eng. Dept. hamdiahmed.weebly.com Fourier Series

ELEG 305: Digital Signal Processing

Properties of Fourier Cosine and Sine Transforms

Chapter 7: Techniques of Integration

CSCI 1290: Comp Photo

FOURIER ANALYSIS. (a) Fourier Series

Sequential Fast Fourier Transform

Fourier Series and the Discrete Fourier Expansion

EA2.3 - Electronics 2 1

Chapter 1 Divide and Conquer Polynomial Multiplication Algorithm Theory WS 2015/16 Fabian Kuhn

Ma 221 Eigenvalues and Fourier Series

VU Signal and Image Processing. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

The wave equation in one dimension

Lab Fourier Analysis Do prelab before lab starts. PHSX 262 Spring 2011 Lecture 5 Page 1. Based with permission on lectures by John Getty

LECTURE Fourier Transform theory

Contents. Signals as functions (1D, 2D)

EDISP (NWL2) (English) Digital Signal Processing Transform, FT, DFT. March 11, 2015

Mathematics for Engineers II. lectures. Power series, Fourier series

Contents. Signals as functions (1D, 2D)

3150 Review Problems for Final Exam. (1) Find the Fourier series of the 2π-periodic function whose values are given on [0, 2π) by cos(x) 0 x π f(x) =

The Gibbs Phenomenon

The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall Many slides borrowed from Steve Seitz

Fundamentals of the DFT (fft) Algorithms

Problem Set 8 - Solution

Math 489AB A Very Brief Intro to Fourier Series Fall 2008

Lecture # 06. Image Processing in Frequency Domain

Periodic motions. Periodic motions are known since the beginning of mankind: Motion of planets around the Sun; Pendulum; And many more...

University of Connecticut Lecture Notes for ME5507 Fall 2014 Engineering Analysis I Part III: Fourier Analysis

Physics 250 Green s functions for ordinary differential equations

The O () notation. Definition: Let f(n), g(n) be functions of the natural (or real)

Fourier Series and Recent Developments in Analysis

Continuous-time Fourier Methods

PARTIAL DIFFERENTIAL EQUATIONS (MATH417) SOLUTIONS FOR THE FINAL EXAM

PREMED COURSE, 14/08/2015 OSCILLATIONS

encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256

Chapter 6: Fast Fourier Transform and Applications

Representing a Signal

MATH 220 solution to homework 4

5 Trigonometric Functions

Fall 2011, EE123 Digital Signal Processing

/ (2π) X(e jω ) dω. 4. An 8 point sequence is given by x(n) = {2,2,2,2,1,1,1,1}. Compute 8 point DFT of x(n) by

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides)

EDISP (NWL3) (English) Digital Signal Processing DFT Windowing, FFT. October 19, 2016

Bernoulli Numbers and their Applications

Fourier Series User Guide

Fourier and Partial Differential Equations

Contents. Signals as functions (1D, 2D)

Fall Math 3410 Name (Print): Solution KEY Practice Exam 2 - November 4 Time Limit: 50 Minutes

Radar Systems Engineering Lecture 3 Review of Signals, Systems and Digital Signal Processing

Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

Algorithm Design and Analysis

Chapter 6: Applications of Fourier Representation Houshou Chen

7.2 Trigonometric Integrals

E The Fast Fourier Transform

The Pseudospectral Method

2. the basis functions have different symmetries. 1 k = 0. x( t) 1 t 0 x(t) 0 t 1

Math 5587 Midterm II Solutions

Transcription:

Fast Fourier Transform December 8, 2016 FFT

JPEG RGB Y C B C R (luma (brightness), chroma 2 (color)) chroma resolution is reduced image is split in blocks 8 8 pixels

JPEG RGB Y C B C R (luma (brightness), chroma 2 (color)) chroma resolution is reduced image is split in blocks 8 8 pixels DCT - Discrete Cosine Transform (1974) 2D spatial domain frequency domain Functions can be decomposed into sums of sines and cosines (i.e. waves or harmonics) of various frequencies.

JPEG RGB Y C B C R (luma (brightness), chroma 2 (color)) chroma resolution is reduced image is split in blocks 8 8 pixels DCT - Discrete Cosine Transform (1974) 2D spatial domain frequency domain Functions can be decomposed into sums of sines and cosines (i.e. waves or harmonics) of various frequencies. quantization (irreversible): discard high-frequency info (human eye is more sensitive to small variations in color or brightness over large areas than to the strength of high-frequency brightness variations) further compression with lossless algorithm

2D spatial domain frequency domain DCT - Discrete Cosine Transform, acts on the sample x k DFT - Discrete Fourier Transform, acts on the sample x k Fourier Transform, f (x) nonrepetitive signal, -period, f = Fourier series, f (x) repetitive signal, oscillation, 2π-period f (x)...... k=0

Spatial domain frequency domain Source: Wikipedia

History and Motivation 3rd century BC: empiric model of planetary motions, based on deferents and epicycles

History and Motivation 3rd century BC: empiric model of planetary motions, based on deferents and epicycles 1747 - d Alembert: wave equation - string oscillations Bernoulli: general solution of wave equation as harmonic series 1775 - Leonard Euler: relation between the coeffecient of the series and parameters of the string

History and Motivation 3rd century BC: empiric model of planetary motions, based on deferents and epicycles 1747 - d Alembert: wave equation - string oscillations Bernoulli: general solution of wave equation as harmonic series 1775 - Leonard Euler: relation between the coeffecient of the series and parameters of the string 1807 - Jean-Baptiste Joseph Fourier: solutions of the heat equation in a metal plate as a superposition (linear combination) of simple sine and cosine function Tomson, Michelson: mechanical harmonic analysor for tides predictions and optics Dirichlet and Riemann: math precision

Fourier Series Any 2π-periodic function f (x) can be expanded in Fourier series f (x) a 0 2 + a n cos(nx) + b n sin(nx) n=1

Fourier Series Any 2π-periodic function f (x) can be expanded in Fourier series f (x) a 0 2 + a n cos(nx) + b n sin(nx) n=1 = a 0 2 + a 1 cos x + b 1 sin x + a 2 cos(2x) + b 2 sin(2x) +... + a N cos(nx) + b N sin(nx) +...

Fourier Series Any 2π-periodic function f (x) can be expanded in Fourier series f (x) a 0 2 + a n cos(nx) + b n sin(nx) n=1 = a 0 2 + a 1 cos x + b 1 sin x + a 2 cos(2x) + b 2 sin(2x) +... + a N cos(nx) + b N sin(nx) +... where a 0 = 1 π a n = 1 π π π π π f (x) dx, f (x) cos(nx) dx, b n = 1 π π π f (x) sin(nx) dx

Example f (x) = 1 1 + x 2 cos 2 (x) on [0, π]

Example N = 0: f (x) 0.6332

Example N = 1: f (x) 0.6332 + 0.3926 cos x

Example N = 2: f (x) 0.6332 + 0.3926 cos x 0.1931 cos(2x)

Example N = 3: f (x) 0.6332 + 0.3926 cos x 0.1931 cos(2x) + 0.0531 cos(3x)

Example N = 4: f (x) + 0.1292 cos(4x)

Example N = 5: f (x) 0.0054 cos(5x)

Example N = 6: f (x) 0.0306 cos(6x)

Example N = 7: f (x) + 0.0153 cos(7x)

Example N = 8: f (x) + 0.0110 cos(8x)

Example N = 9: f (x) 0.0052 cos(9x)

Generalization to complex-valued functions: where f (x) = n= c n e inx c n = 1 π f (x)e inx dx 2π π Fourier series converges at each point x for piecewise smooth functions!! FFT

Nonperiodic Functions: Fourier Transform: time (sec) > frequency (hertz) For f (x) integrable on (, ) f (ξ) = f (x)e 2πixξ dx Inverse Fourier Transform f (x) = f (ξ)e 2πixξ dξ FFT

Discrete Fourier Transform Sequence of N complex numbers x 0, x 1,..., x N 1 is transformed into N-periodic sequence of complex numbers X k = N 1 n=0 Thus the domain in k [0, N 1] x k e 2πikn/N, k Z FFT

Discrete Fourier Transform - Linear C n C n Euler s formula gives X k = N 1 n=0 x n (cos( 2πk n N ) + i sin( 2πk n N )), k Z Inverse Fourier Transform: x n = 1 N N 1 k=0 X k (cos(2πk n N ) + i sin(2πk n N )), n Z N = number of time samples we have n = current sample we re considering (0,..., N 1) x n = value of the signal at time n k = current frequency we re considering (0 Hertz up to N 1 Hertz) X k = amount of frequency k in the signal (Amplitude and Phase, a complex number) FFT

Direct computation - Fourier Matrix 1 1 1 1 1 1 ω ω 2 ω 3 ω N 1 W N = 1 1 ω 2 ω 4 ω 6 ω 2(N 1) N 1 ω 3 ω 6 ω 9 ω 3(N 1),........ 1 ω N 1 ω 2(N 1) ω 3(N 1) ω (N 1)(N 1) Notice W N = W T N, complex number ω = ei2π/n, so ω N = 1 (N-th root of unity) Then Fourier transform X = W N x FFT

Example for N = 4 ω 0 ω 0 ω 0 ω 0 1 1 1 1 W 4 = ω 0 ω 1 ω 2 ω 3 ω 0 ω 2 ω 0 ω 2 = 1 i 1 i 1 1 1 1 ω 0 ω 3 ω 2 ω 1 1 i 1 i where ω = e πi 2 = iω = e πi 2 = i. Property: 1 4 W H 4 W 4 = I (so called hermitian trasnform) FFT

Example Single impulse at time 0 is x = [1 0 0 0] T DFT (x = X = W 4 x = 1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i 1 0 0 0 = 1 1 1 1 Meaning: A single impulse has all frequencies in equal amounts. Get back, inverse transform 1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i 1 1 1 1 = 4 0 0 0 = 4 1 0 0 0 FFT

Problem Direct computation X = W N x requires N 2 multiplications and N(N 1) additions. That s A LOT!!! Hence: FFT - Fast Fourier Transform: J.W. Cooley (IBM) and J.W. Tukey (Princeton) in 1960s Idea may be traced back to Gauss. FFT

The discrete Fourier transform (DFT): X k = N 1 n=0 x n e 2πi N nk, where 0 k N 1. For N as power of 2, N = 2 l, calculate separately ( decimation in time ) (x 2m = x 0, x 2,..., x N 2 ) (x 2m+1 = x 1, x 3,..., x N 1 ) Recursively: runtime O(N log N) FFT

Split: X k = = N/2 1 m=0 N/2 1 x 2m e 2πi N (2m)k + N/2 1 m=0 x 2m e 2πi N/2 mk m=0 }{{} DFT of even indexed part of x m x 2m+1 e 2πi N (2m+1)k + e 2πi N k N/2 1 m=0 x 2m+1 e 2πi N/2 mk }{{} DFT of odd indexed part of x m = EVEN k + e 2πi N k ODD k. Periodicity: and E k+ N 2 O k+ N 2 = E k = O k. FFT

For 0 k N/2: size-2 DFT ( butterfly ) X k = E k + e 2πi N k O k 0, 1,..., N/2 1 X k+ N 2 = E k e 2πi N k O k N/2, N/2 + 1,..., N 1 Recursive procedure: split even and odd x[2n] and x[2n + 1] compute DFT split divide and conquer algorithm - multi-branched recursion FFT

FFT

Fourier unit pulse FFT