Lecture 20: Discrete Fourier Transform and FFT

Similar documents
Fall 2011, EE123 Digital Signal Processing

Lecture 19: Discrete Fourier Series

EE123 Digital Signal Processing

Digital Signal Processing. Midterm 2 Solutions

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

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

Discrete Fourier Transform

Module 3. Convolution. Aim

Discrete Fourier transform (DFT)

MAHALAKSHMI ENGINEERING COLLEGE-TRICHY

EE482: Digital Signal Processing Applications

Final Exam Solutions : Wednesday, Dec 13, Prof: J. Bilmes TA: Mingzhou Song

1. Calculation of the DFT

EEO 401 Digital Signal Processing Prof. Mark Fowler

INTRODUCTION TO THE DFS AND THE DFT

CSE 548: Analysis of Algorithms. Lecture 4 ( Divide-and-Conquer Algorithms: Polynomial Multiplication )

DFT-Based FIR Filtering. See Porat s Book: 4.7, 5.6

Lecture 7: z-transform Properties, Sampling and Nyquist Sampling Theorem

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

ELEG 305: Digital Signal Processing

Lecture 4: FT Pairs, Random Signals and z-transform

Frequency-domain representation of discrete-time signals

FFT: Fast Polynomial Multiplications

The Fourier transform allows an arbitrary function to be represented in terms of simple sinusoids. The Fourier transform (FT) of a function f(t) is

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

Lecture 13: Pole/Zero Diagrams and All Pass Systems

ECSE 512 Digital Signal Processing I Fall 2010 FINAL EXAMINATION

Discrete Fourier Transform

VII. Discrete Fourier Transform (DFT) Chapter-8. A. Modulo Arithmetic. (n) N is n modulo N, n is an integer variable.

HST.582J / 6.555J / J Biomedical Signal and Image Processing Spring 2007

Chapter 8 The Discrete Fourier Transform

Divide and Conquer: Polynomial Multiplication Version of October 1 / 7, 24201

Digital Signal Processing Lecture 10 - Discrete Fourier Transform

Computational Methods CMSC/AMSC/MAPL 460

x (2) k even h n=(n) + (n+% x(6) X(3), x (5) 4 x(4)- x(), x (2), Decomposition of an N-point DFT into 2 N/2-point DFT's.

The Fast Fourier Transform. Andreas Klappenecker

1 1.27z z 2. 1 z H 2

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences

Lecture 8: Signal Reconstruction, DT vs CT Processing. 8.1 Reconstruction of a Band-limited Signal from its Samples

Design and Analysis of Algorithms

DISCRETE FOURIER TRANSFORM

Lecture 10. Digital Signal Processing. Chapter 7. Discrete Fourier transform DFT. Mikael Swartling Nedelko Grbic Bengt Mandersson. rev.

8 The Discrete Fourier Transform (DFT)

CS 179: GPU Programming. Lecture 9 / Homework 3

Divide and Conquer algorithms

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

N-Point. DFTs of Two Length-N Real Sequences

5.6 Convolution and FFT

Fundamentals of the DFT (fft) Algorithms

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

The Fourier Transform (and more )

Algorithm Design and Analysis

EE123 Digital Signal Processing

Transforms and Orthogonal Bases

Divide and Conquer. Maximum/minimum. Median finding. CS125 Lecture 4 Fall 2016

CS 179: GPU Programming. Lecture 9 / Homework 3

CS S Lecture 5 January 29, 2019

Discrete-Time Signals and Systems

Digital Signal Processing Chapter 10. Fourier Analysis of Discrete- Time Signals and Systems CHI. CES Engineering. Prof. Yasser Mostafa Kadah

ELEG 305: Digital Signal Processing

The Discrete Fourier Transform

E The Fast Fourier Transform

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

Digital Signal Processing. Lecture Notes and Exam Questions DRAFT

/ (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

BME I5000: Biomedical Imaging

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering

The Fast Fourier Transform: A Brief Overview. with Applications. Petros Kondylis. Petros Kondylis. December 4, 2014

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

Contents. Digital Signal Processing, Part II: Power Spectrum Estimation

Summary of lecture 1. E x = E x =T. X T (e i!t ) which motivates us to define the energy spectrum Φ xx (!) = jx (i!)j 2 Z 1 Z =T. 2 d!

Topic 7. Convolution, Filters, Correlation, Representation. Bryan Pardo, 2008, Northwestern University EECS 352: Machine Perception of Music and Audio

DIVIDE AND CONQUER II

Digital Signal Processing

Lecture 14: Minimum Phase Systems and Linear Phase

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi.

The Discrete Fourier transform

Definition. A signal is a sequence of numbers. sequence is also referred to as being in l 1 (Z), or just in l 1. A sequence {x(n)} satisfying

LTI H. the system H when xn [ ] is the input.

Course Name: Digital Signal Processing Course Code: EE 605A Credit: 3

DSP Configurations. responded with: thus the system function for this filter would be

CS711008Z Algorithm Design and Analysis

E : Lecture 1 Introduction

1 Pheasant Lane December 1990 Ithaca, NY (607) AN INTUITIVE APPROACH TO FFT ALGORITHMS

LAB 2: DTFT, DFT, and DFT Spectral Analysis Summer 2011

Lecture 7 January 26, 2016

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

The DFT as Convolution or Filtering

Multiplying huge integers using Fourier transforms

The divide-and-conquer strategy solves a problem by: 1. Breaking it into subproblems that are themselves smaller instances of the same type of problem

Digital Signal Processing I Final Exam Fall 2008 ECE Dec Cover Sheet

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

DFT & Fast Fourier Transform PART-A. 7. Calculate the number of multiplications needed in the calculation of DFT and FFT with 64 point sequence.

! Review: Discrete Fourier Transform (DFT) ! DFT Properties. " Duality. " Circular Shift. ! Circular Convolution. ! Fast Convolution Methods

sinc function T=1 sec T=2 sec angle(f(w)) angle(f(w))

Algorithms and data structures

Digital Signal Processing: Signal Transforms

Chapter 5 Divide and Conquer

Lecture 3: Linear Filters

MA3232 Summary 5. d y1 dy1. MATLAB has a number of built-in functions for solving stiff systems of ODEs. There are ode15s, ode23s, ode23t, ode23tb.

Transcription:

EE518 Digital Signal Processing University of Washington Autumn 2001 Dept of Electrical Engineering Lecture 20: Discrete Fourier Transform and FFT Dec 10, 2001 Prof: J Bilmes <bilmes@eewashingtonedu> TA: Mingzhou Song <msong@uwashingtonedu> 201 Discrete Fourier Transform It is basically the same thing as DFS Start with finite length x[n] of length and associate x[n] r x[n r] otation x[n] x[(n modula )] x[((n)) ] OK when the length of x[n] is less than DFT is defined as X[k] x[n]w kn (201) x[n] 1 X[k]W kn (202) k0 Computation of point DFT or inverse DFT using this definition has a time complexity of O( 2 ) - basically saying we care not about the rest of x[n], since it is zero Pretend that it is periodic for analysis purpose since for the DFT it makes no difference - Defined only for 0 n,k 1 The rest is zero This means the inherent periodicity is not represented - otation x[n] DFT X[k] - Lots of properties (similar to DFS) - circular convolution is important Given x 1 [n] and x 2 [n], form x 1 [n] and x 2 [n] Periodic convolution is x 3 [n] x 1 [m] x 2 [n m] (0 n 1) x 1 [((m)) ]x 2 [((n m)) ] x 1 [n] x 2 [n] x 2 [n] x 1 [n] DFT 1 {X 1 [k]x 2 [k]} 20-1

20-2 Discrete Fourier transform is the same thing just working with finite signals otes: defined only for 0 n 1 must ignore rest of x[n] since it is zero similar properties to DFS Q: x[n] M points, DFT {x[n]} X[k] X[k] x[n]w kn (203) x[n] 1 X[k]W kn (204) k0 Zero pad > M, DFT 1 {X[k]}?, ie, in matlab what do we get? Ex: take x[n] and sample at > 2Ω FT?? (manuscript p1) take IFT, get back?? (manuscript p1) signal Ex: circular convolution otation x[n] x[(n modula )] x[((n)) ] n ((n)) n when both are positive?? Circular convolution is equivalent to periodic convolution of corresponding periodic signals So we can implement convolution by 1) taking the DFT of two signals 2) multiply them together 3) taking inverse DFT x 3 [n] x 1 [m] x 2 [n m] (0 n 1) x 1 [((m)) ]x 2 [((n m)) ] x 1 [n] x 2 [n] x 2 [n] x 1 [n] DFT 1 {X 1 [k]x 2 [k]} To have linear convolution, need to make sure that DFT length is long enough, ie, if x 1 [n] has length of L and x 2 [n] has length of P, the DFT length need to satisfy because x 1 [n] x 2 [n] has a length of L + P 1 L + P 1 For very long signals, ie, streaming media, with a relatively short filter, eg, stream Filter h output

20-3 can break stream into chunks of short length then do the combination There are two ways to combine 1 Overlap-add (very useful) use fully computed results accumulate partially computed results 2 Overlap-save only use fully computed results throw away partially computed results input windows need to overlap ote on final since we don t have time, but for future, these are very useful if you implement this system 202 Fast Fourier Transform Computation of X[k] x[n]w kn for k 0,, 1 need O( 2 ) operations Can we do better than this? Yes By divide and conquer approach, we can turn this into O( log 2 ()) operations Motivation from polynomial evaluation (polynomials of order ) Consider two -th order polynomials: A(x) j0 B(x) j0 a j x j a 0 + a 1 x + a 2 x 2 + + a x b j x j Evaluation of any one of them takes O() operations using Horner s rule A(x 0 ) a 0 + x 0 (a 1 + x 0 (a 2 + x 0 ( + x 0 (a 2 + x 0 a ) ))) Adding is also easily done in O() operations C(x) A(x) + B(x) (a 0 + b 0 ) + (a 1 + b 1 )x + + (a + b )x c 0 + c 1 x + + c x Multiplication is hard A(x)B(x) a 0 B(x) + a 1 xb(x) + a 2 x 2 B(x) + + a x B(x) There are a total of O( 2 ) operations This is like a convolution (time point corresponds to the degree of x) For multiplication, an alternate representation of the polynomial is better, ie, point-value representation {(x 0,y 0 ),(x 1,y 1 ),,(x 2,y 2 )} when y k A(x k ), k ote we need 2 1 points since degree after multiplication will be 2 1 For B(x), {(x 0,y 0),(x 1,y 1),,(x 2,y 2)}

20-4 So for x i, C(x i ) A(x i )B(x i ) y i y i takes one operation For C(x), {(x 0,y 0 y 0),(x 1,y 1 y 1),,(x 2,y 2 y 2)} So we just need an easy way to get from x 0,x 1,,x 2 to y 0,y 1,,y 2 The naive way is to evaluate every point A(x 0 ),A(x 1 ),,A(x 2 ) For each A(x), operations is needed So there has to be O( 2 ) operations We have gained nothing so far ote that any distinct values will work (not unique), but there is a unique polynomial for given point-value pairs Why? Matrix multiplication 1 x 0 x0 2 x0 1 x 1 x1 2 x 1 1 x x 2 x a 0 a 1 a The matrix in above equation is called Vandermonde matrix and we use V (x 0,x 1,,x ) to denote the matrix ote we require det(v ) 0 so V has inverse From above equation, point-values can determine the polynomial There are many possible point-values for a polynomial So we can choose any values of x 0,x 1,,x to form our point-value representation y 0 y 1 y How about we choose the complex roots of unity, ie, x 1 {x 0,x 1,,x }? We already have a name for this W e j2π/ (W k ) e j2π 1, k starting from A(x) in coefficient form So to do multiplication A(x) a n x n y k A(x k ) A(W) k a n W kn DFT {a 0,a 1,,a } a 0,a 1,,a b 0,b 1,,b Ordinary multiplication, or convolution O( 2 ) c 0,c 1,,c 2 2 O( log) Evaluation at points using DFT or FFT Inverse DFT O( log ) A(W2 0 ),B(W 2 0 ) A(W2 1 ),B(W 2 1 ) A(W 2 2 ),B(W 2 2 ) Pointwise multiplication O() C(W2 0 ) C(W2 1 ) C(W2 2 ) So if we can find a fast DFT then this is good FFT is O( log) At wwwfftworg there lots of FFT info, tutorials, various algorithms, Java demo, matlab code, etc There are many FFT algorithms A good text is Advanced Topics in Signal Processing (Lim & Oppenheim) ext, we assume that 2 l for integer l

20-5 Decimation in time FFT algorithm (Divide and Conquer) X[k] x[n]w nk x[n]w nk + x[n]w nk even n odd n G[k] +W k H[k] x[2r]w 2rk + x[2r](w 2 ) rk +W k x[2r]w/2 rk +W k x[2r + 1]W (2r+1)k x[2r + 1](W) 2 rk x[2r + 1]W rk /2 ote: this is the sum of two /2-point DFT s and some multiplications Original number of multiplications is 2 ow 2(/2) 2 + ( 2 /2) + < 2 (for > 2) See flow diagram on O&S pg 636 ote this can be represented for G[k] and H[k] Ex: G[k] (/4) 1 (/4) 1 g[r]w rk /2 g[2l]w 2lk g[r] x[2r] /2 + (/4) 1 (/4) 1 g[2l]w/4 lk +W /2 k g[2l + 1]W (2l+1)k /2 The same can be done for H[k] Show flow graphs on O & S pg 638, fig 95 Computation: O( log) vs O( 2 ) is a huge saving Ratio of speedup 2 2(/2) 2 + g[2l + 1]W lk /4 2[2(/4) 2 + /2] + 2 /4 + + 2[2[2(/8) 2 + /4] + /2] + 2 /8 + + + 1 + + + O( log) old time new time log

20-6 So the bigger gets, the better the speedup ote basic operation Butterfly is W r But W r+/2 W r+/2 WW r /2 We r j2π//2 We r jπ W r ow we get the optimal Butterfly which reduces the computation by a factor of 2 Ex: Recursive FFT algorithm: W r 1 Algorithm 1 RFFT(x) 1: length(x) 2: if 1 then 3: return x 4: end if 5: W e j2π/ 6: W 1 7: x 0 {x[0],x[2],,x[ 2]} 8: x 1 {x[1],x[3],,x[ 1]} 9: y 0 RFFT{x 0 } 10: y 1 RFFT{x 1 } 11: for k 0 to /2 1 do 12: y[k] y 0 [k] +Wy 1 [k] 13: y[k + /2] y 0 [k] Wy 1 [k] 14: W W W 15: end for 16: return y otes: (O&S) Fig 910 on page 640: input must be in bit reversed order storing them in arrays (O&S) Fig 914 on: output in bit reversed order Bit reverse order makes in place computation possible Bit reverse order:

20-7 bit bit reversed 0 000 000 0 1 001 100 4 2 010 010 2 3 011 110 6 4 100 001 1 5 101 101 5 6 110 011 3 7 111 111 7 Go over O&S Fig 915 & 916 on page 645 Decimation in Frequency Start with X[k] Compute X[2r] and X[2r + 1] See O&S Fig 917 x[n]w kn k 0,, 1 203 Final Exam Follow syllabus Open book / open note On topics that are covered in class be prepared to think