The main contents of this chapter include all of the following: Direct computation of the DFT, decimation-in-time FFT algorithms, decimation-in-frequency FFT algorithms, fourier analysis of signals using the DFT.
Digital Signal Processing, Fall 2005 - E-Study - Lecture 10: Fast Fourier Transform Zheng-Hua Tan Department of Communication Technology Aalborg University, Denmark zt@kom.aau.dk Digital Signal Processing, X, Zheng-Hua Tan, 2005 Course at a glance MM1 Discrete-time signals and systems MM2 Fourier-domain representation Sampling and reconstruction MM4 z-transform MM3 DFT/FFT System System analysis System structure MM6 MM5 Filter design MM7, MM8 MM9, MM10 Digital Signal Processing, X, Zheng-Hua Tan, 2005 Digital computation of the DFT The DFT of a finite-length sequence of length N N −1 X [k ] = ∑ x[n]WNkn , k = 0,1, , N − n =0 The inverse DFT N −1 x[n] = ∑ X [k ]WN− kn , n = 0,1, , N − N k =0 Due to the duality, focus on the DFT only Use the number of arithmetic multiplications and additions as a measure of computational complexity Fast Fourier transform (FFT) is a set of algorithms for the efficient and digital computation of the Npoint DFT, rather than a new transform Digital Signal Processing, X, Zheng-Hua Tan, 2005 Part I: Direct computation of the DFT Direct computation of the DFT Decimation-in-time FFT algorithms Decimation-in-frequency FFT algorithms Fourier analysis of signals using the DFT Digital Signal Processing, X, Zheng-Hua Tan, 2005 Direct computation of the DFT The DFT of a finite-length sequence of length N N −1 X [k ] = ∑ x[n]WNkn , k = 0,1, , N − x[n] X [k ] n =0 Direct computation: N2 complex multiplications and N(N-1) complex additions Compute and store (only over one period) WNk = e − j ( 2π / N ) k = cos(2πk / N ) + j sin(2πk / N ), k = 0,1, , N − Compute the DFT using stored WNk and input x[n] N −1 X [k ] = ∑ x[n]WNkn , k = 0,1, , N − n =0 WNk and x[n] may be complex Digital Signal Processing, X, Zheng-Hua Tan, 2005 Direct computation of the DFT For each k N −1 X [k ] = ∑ [(Re{x[n]} Re{WNkn } − (Im{x[n]} Im{WNkn }) n =0 + j (Re{x[n]} Im{WNkn } + Im{x[n]} Re{WNkn }), k = 0,1, , N − Therefore, for each value of k, the direct computation of X[k] requires 4N real multiplications and (4N-2) real additions The direct computation of the DFT requires 4N real multiplications and N (4 N − 2) real additions The efficiency can be improved by exploiting the symmetry and periodicity properties of WNkn Digital Signal Processing, X, Zheng-Hua Tan, 2005 Symmetry and periodicity of complex exponential Complex conjugate symmetry WNk [ N − n ] = WN− kn = (WNkn )* = Re{WNkn } − j Im{WNkn } Periodicity in n and k WNkn = WNk ( n + N ) = WN( k + N ) n For example Re{x[n]} Re{WNkn } + Re{x[ N − n]} Re{WNk [ N − n ]} = (Re{x[n]} + Re{x[ N − n]}) Re{WNkn } The number of multiplications is reduced by a factor of Digital Signal Processing, X, Zheng-Hua Tan, 2005 Part II: Decimation-in-time FFT algorithms Direct computation of the DFT Decimation-in-time FFT algorithms Decimation-in-frequency FFT algorithms Fourier analysis of signals using the DFT Digital Signal Processing, X, Zheng-Hua Tan, 2005 FFT Cooley and Tukey (1965) published an algorithm for the computation of the DFT that is applicable when N is a composite number, i.e., the product of two or more integers Later, it resulted in a number of highly efficient computational algorithms The entire set of such algorithms are called the fast Fourier transform, FFT FFT decomposes the computation of the DFT of a sequence of length N into successively smaller DFTs Digital Signal Processing, X, Zheng-Hua Tan, 2005 Decimation-in-time FFT algorithms Where decomposition is done by decomposing the sequence into successively smaller subsequences, and both the symmetry and periodicity of complex exponential WNkn = e − j ( 2π / N ) kn are exploited Consider N = 2v point sequences and separate x[n] into two (N/2)- N −1 X [k ] = ∑ x[n]WNkn , k = 0,1, , N − n =0 X [k ] = ∑ x[n]W n even kn N + ∑ x[n]WNkn n odd Digital Signal Processing, X, Zheng-Hua Tan, 2005 10 Decimation-in-time FFT algorithms X [k ] = ∑ x[n]W kn N n even = = = + ∑ x[n]WNkn n odd ( N / ) −1 ( N / ) −1 r =0 r =0 ∑ x[2r ]WN2rk + ∑ x[2r + 1]W ( r +1) k N ( N / ) −1 ( N / ) −1 r =0 r =0 ∑ x[2r ](WN2 ) rk + WNk ∑ x[2r + 1](W ( N / ) −1 ( N / ) −1 r =0 r =0 ∑ x[2r ]WNrk/ + WNk rk N ) ∑ x[2r + 1]W rk N /2 = G[k ] + WNk H [k ], k = 0,1, , N − (only compute for k = 0,1, , N / − 1) due to the periodicity Digital Signal Processing, X, Zheng-Hua Tan, 2005 11 Flow graph of the decimation-in-time Periodicity is applied, e.g G[7]=G[3] Digital Signal Processing, X, Zheng-Hua Tan, 2005 12 Decimation-in-time FFT Further break down G[k ] = ( N / ) −1 ∑ g[r ]W r =0 = ( N / ) −1 ∑ g[2l ]W lk N /4 l =0 H [k ] = rk N /2 = + WNk / ( N / ) −1 ∑ g[2l ]W + lk N /2 l =0 ( N / ) −1 ( N / ) −1 ∑ g[2l + 1]W l =0 ( l +1) k N /2 ∑ g[2l + 1]W lk N /4 l =0 ( N / ) −1 ( N / ) −1 l =0 l =0 ∑ h[2l ]WNlk/ + WNk / ∑ h[2l + 1]W lk N /4 Digital Signal Processing, X, Zheng-Hua Tan, 2005 13 Combination of Fig 9.3 and 9.4 Digital Signal Processing, X, Zheng-Hua Tan, 2005 14 2-point DFT Digital Signal Processing, X, Zheng-Hua Tan, 2005 15 Flow graph log N stages and each stage has N complex multiplications and N complex additions In total, N log N complex multiplications and additions e.g N = 210 = 1024 N = 1,048,576 N log N = 10,240 A reduction of orders! Digital Signal Processing, X, Zheng-Hua Tan, 2005 16 Flow graph of butterfly computation Digital Signal Processing, X, Zheng-Hua Tan, 2005 17 Flow graph The number of complex multiplications are reduced by a factor of over the number in Fig 9.7 Digital Signal Processing, X, Zheng-Hua Tan, 2005 18 Part III: Decimation-in-frequency FFT algorithms Direct computation of the DFT Decimation-in-time FFT algorithms Decimation-in-frequency FFT algorithms Fourier analysis of signals using the DFT Digital Signal Processing, X, Zheng-Hua Tan, 2005 19 Decimation-in-frequency FFT algorithms Fig 9.20 Digital Signal Processing, X, Zheng-Hua Tan, 2005 20 10 Part IV: Fourier analysis of signals using the DFT Direct computation of the DFT Decimation-in-time FFT algorithms Decimation-in-frequency FFT algorithms Fourier analysis of signals using the DFT Digital Signal Processing, X, Zheng-Hua Tan, 2005 21 Fourier analysis of signals using the DFT Finite-duration requirement of DFT Æ windowing Digital Signal Processing, X, Zheng-Hua Tan, 2005 22 11 Fourier analysis of signals using the DFT Tapers off but is not band-limited Fig 10.2 Not ideal Low-pass filtered and modified X ( e jω ) = T ∞ ∑ r = −∞ Digital Signal Processing, X, Zheng-Hua Tan, 2005 Xc( j ω T +j 2πr ) T 23 Fourier analysis of signals using the DFT Windowing V ( e jω ) = 2π π ∫−π X (e N −1 jθ )V (e j (ω −θ ) )dθ V (k ) = ∑ v[n]e − j ( 2π / N ) kn , k = 0,1, , N − n =0 = V (e jω ) |ω = 2πk / N Digital Signal Processing, X, Zheng-Hua Tan, 2005 24 12 Effect of Windowing on Fourier analysis Effect of Windowing on Fourier analysis A rectangular window of length 64 Fig 10.3 sc (t ) = A0 cos(Ω t + θ ) + A1 cos(Ω1t + θ1 ) x[n] = A0 cos(ω0 n + θ ) + A1 cos(ω1n + θ1 ) v[n] = A0 w[n] cos(ω0 n + θ ) + A1 w[n] cos(ω1n + θ1 ) A0 jθ e W ( e j (ω −ω ) ) + A + e jθ1W (e j (ω −ω1 ) ) + V ( e jω ) = Digital Signal Processing, X, Zheng-Hua Tan, 2005 A0 − jθ e W ( e j (ω + ω ) ) A1 − jθ1 e W (e j (ω +ω1 ) ) 25 Effect of Windowing on Fourier analysis Fig 10.3 The DTFT of a sinusoidal signal is a pair of impulses Windowing broadens the impulses and reduces the distinction of signals that are close in frequency Digital Signal Processing, X, Zheng-Hua Tan, 2005 26 13 Summary Direct computation of the DFT Decimation-in-time FFT algorithms Decimation-in-frequency FFT algorithms Fourier analysis of signals using the DFT 27 Digital Signal Processing, X, Zheng-Hua Tan, 2005 Course at a glance MM1 Discrete-time signals and systems MM2 Fourier-domain representation Sampling and reconstruction MM4 z-transform MM3 DFT/FFT System System analysis System structure MM6 MM5 Filter design MM7, MM8 MM9, MM10 Digital Signal Processing, X, Zheng-Hua Tan, 2005 28 14 The end Thanks for your attention! Digital Signal Processing, X, Zheng-Hua Tan, 2005 29 15 ... /4 Digital Signal Processing, X, Zheng-Hua Tan, 2005 13 Combination of Fig 9.3 and 9.4 Digital Signal Processing, X, Zheng-Hua Tan, 2005 14 2-point DFT Digital Signal Processing, X, Zheng-Hua Tan, ... periodicity Digital Signal Processing, X, Zheng-Hua Tan, 2005 11 Flow graph of the decimation-in-time Periodicity is applied, e.g G[7]=G[3] Digital Signal Processing, X, Zheng-Hua Tan, 2005 12... 210 = 102 4 N = 1,048,576 N log N = 10, 240 A reduction of orders! Digital Signal Processing, X, Zheng-Hua Tan, 2005 16 Flow graph of butterfly computation Digital Signal Processing, X, Zheng-Hua