The Discrete Fourier Transform

Similar documents
FFT Algorithms. Chapter 6. Contents 6.1

1.4 Fast Fourier Transform (FFT) Algorithm

Frequency Response of FIR Filters

L9: Cepstral analysis

By choosing to view this document, you agree to all provisions of the copyright laws protecting it.

Analysis/resynthesis with the short time Fourier transform

The Algorithms of Speech Recognition, Programming and Simulating in MATLAB

The Fourier Analysis Tool in Microsoft Excel

Design of FIR Filters

Discrete-Time Signals and Systems

Lab 1. The Fourier Transform

Final Year Project Progress Report. Frequency-Domain Adaptive Filtering. Myles Friel. Supervisor: Dr.Edward Jones

1.1 Discrete-Time Fourier Transform

UNIVERSITY OF CALIFORNIA, SAN DIEGO Electrical & Computer Engineering Department ECE Fall 2009 Linear Systems Fundamentals

The continuous and discrete Fourier transforms

Solutions to Exam in Speech Signal Processing EN2300

Lecture 8 ELE 301: Signals and Systems

MATH 4330/5330, Fourier Analysis Section 11, The Discrete Fourier Transform

SIGNAL PROCESSING & SIMULATION NEWSLETTER

Polytechnic University of Puerto Rico Department of Electrical Engineering Master s Degree in Electrical Engineering.

SGN-1158 Introduction to Signal Processing Test. Solutions

Wavelet analysis. Wavelet requirements. Example signals. Stationary signal 2 Hz + 10 Hz + 20Hz. Zero mean, oscillatory (wave) Fast decay (let)

The Calculation of G rms

Convolution, Correlation, & Fourier Transforms. James R. Graham 10/25/2005

Course overview Processamento de sinais 2009/10 LEA

Lecture Notes on Polynomials

Trigonometric Functions and Equations

UNIVERSITY OF CALIFORNIA, SAN DIEGO Electrical & Computer Engineering Department ECE Fall 2010 Linear Systems Fundamentals

PYKC Jan Lecture 1 Slide 1

Advanced Signal Processing and Digital Noise Reduction

9 Fourier Transform Properties

CONVOLUTION Digital Signal Processing

Fast Fourier Transform: Theory and Algorithms

Continued Fractions and the Euclidean Algorithm

Introduction to IQ-demodulation of RF-data

Matrices and Polynomials

Design of Efficient Digital Interpolation Filters for Integer Upsampling. Daniel B. Turek

Introduction to Digital Filters

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Chapter 8 - Power Density Spectrum

ANALYZER BASICS WHAT IS AN FFT SPECTRUM ANALYZER? 2-1

This document is downloaded from DR-NTU, Nanyang Technological University Library, Singapore.

Class Note for Signals and Systems. Stanley Chan University of California, San Diego

Discrete Convolution and the Discrete Fourier Transform

Correlation and Convolution Class Notes for CMSC 426, Fall 2005 David Jacobs

THE Walsh Hadamard transform (WHT) and discrete

Signal to Noise Instrumental Excel Assignment

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Applications of the DFT

MUSICAL INSTRUMENT FAMILY CLASSIFICATION

5. Orthogonal matrices

TTT4110 Information and Signal Theory Solution to exam

RESULTANT AND DISCRIMINANT OF POLYNOMIALS

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

A Primer on Index Notation

B3. Short Time Fourier Transform (STFT)

Quotient Rings and Field Extensions

Auto-Tuning Using Fourier Coefficients

Math 4310 Handout - Quotient Vector Spaces

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Bits Superposition Quantum Parallelism

(Refer Slide Time: 01:11-01:27)

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

CM0340 SOLNS. Do not turn this page over until instructed to do so by the Senior Invigilator.

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Signals and Systems. Richard Baraniuk NONRETURNABLE NO REFUNDS, EXCHANGES, OR CREDIT ON ANY COURSE PACKETS

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

min ǫ = E{e 2 [n]}. (11.2)

MATH 289 PROBLEM SET 4: NUMBER THEORY

CONTROL SYSTEMS, ROBOTICS, AND AUTOMATION - Vol. V - Relations Between Time Domain and Frequency Domain Prediction Error Methods - Tomas McKelvey

Direct Methods for Solving Linear Systems. Matrix Factorization

High Quality Integrated Data Reconstruction for Medical Applications

SECTION 6 DIGITAL FILTERS

Frequency Domain and Fourier Transforms

Matlab GUI for WFB spectral analysis

Solving Systems of Linear Equations

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

ALFFT FAST FOURIER Transform Core Application Notes

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

Convolution. The Delta Function and Impulse Response

SOLVING LINEAR SYSTEMS

Structural Health Monitoring Tools (SHMTools)

Em bedded DSP : I ntroduction to Digital Filters

Introduction to the Z-transform

Nonlinear Iterative Partial Least Squares Method

SWISS ARMY KNIFE INDICATOR John F. Ehlers

Ericsson T18s Voice Dialing Simulator

PeakVue Analysis for Antifriction Bearing Fault Detection

Clutter Filter Design for Ultrasound Color Flow Imaging

Lecture 3: Finding integer solutions to systems of linear equations

Signal Detection C H A P T E R SIGNAL DETECTION AS HYPOTHESIS TESTING

Speech Signal Processing: An Overview

How To Understand The Discrete Fourier Transform

SPEECH SIGNAL CODING FOR VOIP APPLICATIONS USING WAVELET PACKET TRANSFORM A

Transcription:

The Discrete Fourier Transform Introduction The discrete Fourier transform (DFT) is a fundamental transform in digital signal processing, with applications in frequency analysis, fast convolution, image processing, etc. Moreover, fast algorithms exist that make it possible to compute the DFT very efficiently. The algorithms for the efficient computation of the DFT are collectively called fast Fourier transforms (FFTs). The historic paper [9] by Cooley and Tukey made well known an FFT of complexity log, where is the length of the data vector. A sequence of early papers [, 5, 7, 8, 9] still serve as a good reference for the DFT and FFT. In addition to texts on Digital Signal Processing, a number of books devote special attention to the DFT and FFT [, 3,,,,, 3,, 5]. The importance of Fourier analysis in general is put forth very well by Leon Cohen in []... Bunsen and Kirchhoff, observed (around 85) that light spectra can be used for recognition, detection, and classification of substances because they are unique to each substance. This idea, along with its extension to other waveforms and the invention of the tools needed to carry out spectral decomposition, certainly ranks as one of the most important discoveries in the history of mankind. Some of the most basic uses of the DFT is to compute the frequency responses of filters, to implement convolution, and spectral estimation. Definition The k th DFT coefficient of a length signal x(n) is defined as where X d (k) = n= W = e jπ/ = cos is the principal -th root of unity. Because W nk x(n) W kn, k =,..., () ( ) ( ) π π + j sin as a function of k has a period of, the DFT coefficients X d (k) are periodic with period when k is taken outside the range k =,...,. The original sequence x(n) can be retrieved by the inverse discrete Fourier transform (IDFT) x(n) = k= X d (k) W kn, n =,...,. The inverse DFT can be verified by using a simple observation regarding the principal -th root of unity W. amely, n= W nk = δ(k), k =,...,,

where δ(k) is the Kronecker delta function. For example, with = 5 and k =, the sum gives For k =, the sum gives + + + + = 5. + W 5 + W 5 + W 3 5 + W 5 = The sums can also be visualized by looking at the illustration of the DFT matrix in Figure. Because W nk as a function of k is periodic with period, we can write n= x(n) = W nk = δ( k ) where k denotes the remainder when k is divided by, i.e., k is k modulo. To verify the inversion formula, we can substitute the DFT into the expression for the IDFT: ( ) = = k= l= l= l= x(l) x(l) W kl k= W kn, () W k(n l), (3) x(l) δ( n l ), () = x(n). (5) 3 The DFT Matrix The DFT of a length signal x(n) can be represented as matrix-vector product. For example, a length 5 DFT can be represented as X d () x() X d () W W W 3 W x() X d () = W X d W W W 8 x() (3) W 3 W W 9 W x(3) X d () W W 8 W W x() where W = W 5, or as X d = F x, where F is the DFT matrix whose elements are given by (F ) l,m = W lm l, m. As the IDFT and DFT formulas are very similar, the IDFT represented as a matrix is closely related to F, F = F

where F represent the complex conjugate of F. It is very useful to illustrate the entries of the matrix F as in Figure, where each complex value is shown as a vector. In Figure, it can be seen that in the k th row of the matrix the elements consist of a vector rotating clockwise with a constant increment of πk/. In the first row k = and the vector rotates in increments of. In the second row k = and the vector rotates in increments of π/. Figure : The -point DFT matrix. An Example The DFT is especially useful for representing efficiently signals that are comprised of a few frequency components. For example, the length 8 signal shown in Figure is an electrocardiogram (ECG) recording from a dog. The DFT of this real signal, shown in Figure, is greatest at specific frequencies corresponding to the fundamental frequency and its harmonics. Clearly, the signal x(n) can be represented well even when many of the small DFT X d (k) coefficients are set to zero. By discarding, or coarsely quantizing, the DFT coefficients that are small in absolute value, one obtains a more efficient representation of x(n). Figure 3 illustrates the DFT coefficients when the 9 coefficients that are largest in absolute value are kept, and the remaining 39 DFT coefficients The dog ECG data is available on the Signal Processing Information Base (SPIB) at URL http://spib.rice.edu/. 3

are set to zero. Figure 3 also shows the signal reconstructed from this truncated DFT. It can be seen that the reconstructed signal is a fairly accurate depiction of the original signal x(n). For signals that are made up primarily of a few strong frequency components, the DFT is even more suitable for compression purposes. 5 ORIGIAL DOG HEART DATA 3 x(n) 8 8 n 3.5 x DFT OF DOG HEART DATA X(k) 3.5.5.5 8 8 k Figure : 8 samples recorded of a dog heart and its DFT coefficients. The magnitude of the DFT coefficients are shown. 5 DFT Frequency Analysis To formalize the type of frequency analysis accomplished by the DFT, it is useful to view each DFT value X d (k) as the output of a length FIR filter h k (n). The output of the filter is given by the convolution sum l y k (l) = x(n) h k (l n). n= When the output y k (l) is evaluated at time l =, one has y k ( ) = n= x(n) h k ( n).

3.5 x TRUCATED DFT OF DOG HEART DATA Y(k) 3.5.5.5 8 8 k 5 DOG HEART DATA AFTER DFT TRUCATIO 3 y(n) 8 8 n Figure 3: The truncated DFT coefficients and the time signal reconstructed from the truncated DFT. 5

If the filter coefficients h k (n) are defined as { W k(n +) h k (n) = n otherwise () then one has y k ( ) = n= x(n) W kn, (7) = X d (k). (8) ote that h k (n) = W k(n +) = W k W kn kn represents a reversal of the values W for n =,...,, which in turn, is the k-th row of the DFT matrix. Therefore, the DFT of a length signal x(n) can be interpreted as the output of a bank of FIR filters of length sampled at time l =. Moreover, the impulse responses h k (n) are directly related to each other through DFT - modulation: h k (n) = W k(n +) p(n) where the filter h (n) = p(n) is given by { p(n) = n otherwise. (9) This filter is called a rectangular window as it is not tapered at its ends. Z-transforms of the filters are also simply related: It follows that the H k (z) = = n= n= = W k = W k h k (n) z n () W k(n +) p(n) z n () n= n= W kn p(n) z n () ( W k z p(n) ) n (3) = W k P (W k z) () where P (z) = n= p(n) z n. That is, if each filter h k (n) in an -channel filter bank is taken to be the time-flip of the k-th row of the DFT matrix then their Z-transforms are given by H k (z) = W k k P (W z). H (z) = P (z), H (z) = W P (W z), etc. It is instructive to view the frequency responses of the filters h k (n), as the frequency responses of the filters H k (z) indicate the effect of the DFT on a signal. The magnitude of the frequency response of H k (z) and the zero plot in the

H (e j ).5.5 / H (e j ).5.5 / H (e j ).5.5 / H 3 (e j ).5.5 / H (e j ).5.5 / H 5 (e j ).5.5 / Figure : The magnitude of the frequency response of the filters h k (n) for k =,..., 5, corresponding to a -point DFT. Shown on the right are the zeros of H k (z). 7

z-plane are given in Figure. ote that the zeros of H k (z) in the z-plane are simply rotated by π/, and that the frequency responses are shifted by the same amount. The figure makes clear the way in which the DFT performs a frequency decomposition of a signal. The frequency response of the filter h k is given by H k (e jω ), the Discrete-time Fourier Transform (DTFT) of the impulse response: H k (e jω ) = The frequency response of of the rectangular window p(n) is given by P (e jω ) = n= n= h k (n) e jωn. (5) e jωn () = e jω e jω (7) ( = e jω/ e jω/ e jω/) e ( jω/ e jω/ e jω/) (8) = e jω()/ sin ω sin ω. (9) The function sin ( ω)/ sin ( ω) is called the digital sinc function, for its resemblance to the usual sinc function. Symmetric and Anti-symmetric Signals Because the DFT operates on finite-length data vectors, it is useful to define two types of symmetries as follows. When x(n) is periodically extended outside the range n =,...,, the following definitions for symmetric and anti-symmetric sequences are consistent with the their usual definitions for sequences which are not finite in length. Symmetry: Let x(n) be a real-valued length data sequence, for n =,...,, then x(n) is symmetric if x( n) = x(n), k =,...,. ote that an even-length symmetric sequence x(n) is fully described by its first / + values. For example, a length symmetric sequence is fully determined by its first values. On the other hand, an odd-length symmetric sequence x(n) is fully described by its first ( +)/ values. For example, a length 7 symmetric sequence is fully determined by its first values. For both evenand odd-length sequences, the number of values that determine a length symmetric sequence is / + where k denotes the greatest integer smaller than or equal to k. Anti-symmetry: A real-valued length data sequence is anti-symmetric if x() = and x( k) = x(k), k =,...,. 8

3 Figure 5: Illustration of even-length symmetric sequence. 3 Figure : Illustration of odd-length symmetric sequence. 5 5 Figure 7: Illustration of even-length anti-symmetric sequence. 9

ote that an even-length anti-symmetric sequence x(n) is fully described by / values. For example, a length anti-symmetric sequence is fully determined by values. On the other hand, an odd-length anti-symmetric sequence x(n) is fully described by ( )/ values. For example, a length 7 anti-symmetric sequence is fully determined by 3 values: For both even- and 5 5 Figure 8: Illustration of odd-length anti-symmetric sequence. odd-length sequences, the number of values that determine a length anti-symmetric sequence is / where k denotes the smallest integer greater than or equal to k. 7 Symmetry Properties of the DFT To state the symmetry properties of the DFT, it is useful to introduce the notation X d r (k) and X d i (k) for the real and imaginary parts of Xd (k). Similarly, x r (n) and x i (n) are used to denote the real and imaginary parts of x(n). If x(n) is a length data vector and.... if x(n) is real-valued, then X d (k) = X d ( k), k =,...,, i.e., the real part of X d (k) is symmetric, and the imaginary part of X d (k) is anti-symmetric.. if x(n) is real-valued and symmetric, then X d (k) = X d r (k), X d r (k) = X d r ( k), k =,...,, i.e., X d (k) is purely real and symmetric. 3. if x(n) is real-valued and anti-symmetric, then X d (k) = j X d i (k), X d i (k) = X d i ( k), k =,...,, i.e., X d (k) is purely imaginary and anti-symmetric.. if x(n) is purely imaginary, then X d (k) = X d ( k), k =,...,, i.e., the real part of X d (k) is anti-symmetric, and the imaginary part of X d (k) is symmetric.

Table : DFT Symmetry Properties x is purely real X d r is symmetric, X d i is anti-symmetric x is purely real, x r is symmetric X d r is symmetric, X d is purely real x is purely real, x r is anti-symmetric X d is purely imaginary, X d i is anti-symmetric x is purely imaginary X d r is anti-symmetric, X d i is symmetric x is purely imaginary, x i is symmetric X d is purely imaginary, X d i is symmetric x is purely imaginary, x i is anti-symmetric X d r is anti-symmetric, X d is purely real 5. if x(n) is purely imaginary and x i (n) is symmetric, then X d (k) = X d i (k), X d i (k) = X d i ( k), k =,...,, i.e., X d (k) is purely imaginary and symmetric.. if x(n) is purely imaginary and x i (n) is anti-symmetric, then X d (k) = X d r (k), X d r (k) = X d r ( k), k =,...,, i.e., X d (k) is purely real and anti-symmetric. These properties are summarized in Table. These properties explain why the total number of parameters needed to describe the original data sequence x(n) is the same after the DFT is performed. For example, consider a real-valued length sequence x(n) and its DFT: x = 3 5 7 X d =. 8.5.5..5 8.5 + j.8.598.598.8 It is clear that there are a total of distinct values in the DFT coefficients X d (k) for this example. In general, for a length real-valued sequence x(n), the symmetric Xr d (k) is determined by / + values, and the anti-symmetric Xi d (k) is determined by / values. Therefore, even though the DFT X d (k) of a length real-valued sequence x(n) is complex-valued, it is fully determined by exactly values. The number of parameters is the same in both x(n) and X d (k). Recall that an even-length real-valued symmetric sequence x(n) is determined by its first /+ values. By the symmetry property above, the same is true for the DFT X d (k). An odd-length real-valued symmetric sequence x(n) is determined by its first ( + )/ values. By the symmetry property above, the same is true for the DFT X d (k) The symmetry properties for real-valued symmetric sequences are especially useful because they can be used to develop useful DFT-based transforms that yield real-valued coefficients..

3 {x(n)} {X(k)}=DFT{x(n)} Figure 9: Illustration of DFT symmetric property. 3 {x(n)} {X(k)}=DFT{x(n)} Figure : Illustration of DFT symmetric property. 8 Other Properties of the DFT The text book also gives the other main properties of the DFT:. linearity. periodicity 3. time-reversal. circular time shift 5. circular frequency shift. complex conjugation 7. Parseval s theorem 8. convolution The convolution property of the DFT is somewhat different from the convolution property for the continuous-time Fourier transform, so it deserves special attention.

9 Circular Convolution Circular convolution is also called periodic or cyclic convolution. Suppose x(n) and g(n) are both finite length signals, and that they have the same length: Regular (linear) convolution can be written as x(n), n =,..., g(n), n =,...,. x(n) g(n) = x() g(n) + x() g(n ) + x() g(n )+ + x( ) g(n ( )) ow, for periodic, or cyclic, convolution, the shift g(n m) is taken to be a circular shift. So the circular convolution can be written out as v(n) = [x() x() x() x(3)] [g() g() g() g(3)] v(n) = x() [g() g() g() g(3)]+ x() [g(3) g() g() g()]+ x() [g() g(3) g() g()]+ x(3) [g() g() g(3) g()] Circular convolution property of the DFT The the DFT of the circular convolution of two finite (equal) length signals is the product of the DFT. If z(n) = x(n) y(n) then Z d (k) = X d (k) Y d (k) 9. Linear Convolution via Circular Convolution The linear convolution of two finite signals can be computed by appending zeros to each of the signals and then employing circular convolution. In this way, the DFT can be used to implement linear convolution. (See the text). Appending zeros is commonly called zero padding. References [] G. D. Bergland. A guided tour of the fast Fourier transform. IEEE Spectrum, : 5, 99. Also in []. [] R. E. Blahut. Fast Algorithms for Digital Signal Processing. Addison-Wesley, 985. 3

[3] E. O. Brigham. The Fast Fourier Transform and its Applications. Prentice-Hall, 988. [] C. S. Burrus and T. W. Parks. DFT/FFT and Convolution Algorithms. John Wiley and Sons, 985. [5] W. T. Cochran, J. W. Cooley, D. L. Favin, H. D. Helms, R. A. Kaenel, W. W. Lang, G. C. Maling, Jr., D. E. elson, C. M. Rader, and P. D. Welch. What is the Fast Fourier Transform? IEEE Trans. Audio Electroacoust., 5:5 55, 97. Also in []. [] L. Cohen. Time-Frequency Analysis. Prentice Hall, 995. [7] J. W. Cooley, P. A. W. Lewis, and P. D. Welch. Historical notes on the fast Fourier transform. IEEE Trans. Audio Electroacoust., 5:7 79, 97. Also in []. [8] J. W. Cooley, P. A. W. Lewis, and P. D. Welch. The finite Fourier transform. IEEE Trans. Audio Electroacoust., 7:77 85, 99. Also in []. [9] J. W. Cooley and J. W. Tukey. An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation, 9(9):97 3, 95. Also in []. [] D. F. Elliott and K. R. Rao. Fast Transforms: algorithms, analyses, applications. Academic Press, 98. [] C. Van Loan. Computational Frameworks for the Fast Fourier Transform. SIAM, 99. [] J. H. McClellan and C. M. Rader. umber Theory in Digital Signal Processing. Prentice Hall, 979. [3] H. J. ussbaumer. Fast Fourier Transform and Convolution Algorithms. Springer-Verlag, 98. [] L. R. Rabiner and C. M. Rader, editors. Digital Signal Processing. IEEE Press, 97. [5] W. W. Smith and J. M. Smith. Handbook of real-time Fast Fourier Transforms. IEEE Press, 995.