Example: air traffic controller

The Fast Fourier Transform and its Applications

The fast Fourier Transform and its ApplicationsGillian SmithAugust 2019 Contents1 Introduction22 Methods23 Results24 Discussion/conclusion35 Personal statement46 Summary47 Itinerary48 Acknowledgements4 Appendices5A The Fourier Transform and discrete Fourier Defining the Fourier Transform .. Existence of the Fourier Transform and inverse Fourier Transform .. The discrete Fourier Transform ..5B The fast Fourier The FFT algorithm .. FFT of real-valued vectors .. Multidimensional DFT and FFT .. 11C The Discrete Sine and Cosine Computing the Discrete Sine Transform .. Computing the Discrete Cosine Transform .. Multidimensional DST and DCT .. 16D Solving the heat equation .. JPEG compression .. 1811 IntroductionThe fast Fourier Transform (commonly abbreviated as FFT) is a fast algorithm for computing thediscrete Fourier Transform of a sequence. The purpose of this project is to investigate some of themathematics behind the FFT, as well as the closely related discrete sine and cosine transforms.

The Fast Fourier Transform (commonly abbreviated as FFT) is a fast algorithm for computing the ... as well as the algorithms for the discrete sine and cosine transforms. I dealt with this by re-reading the textbook [1] and trying each of the steps on a few small examples, or by guring it out for myself where ...

Tags:

  Fast, Transform, Fourier, Fast fourier

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of The Fast Fourier Transform and its Applications

1 The fast Fourier Transform and its ApplicationsGillian SmithAugust 2019 Contents1 Introduction22 Methods23 Results24 Discussion/conclusion35 Personal statement46 Summary47 Itinerary48 Acknowledgements4 Appendices5A The Fourier Transform and discrete Fourier Defining the Fourier Transform .. Existence of the Fourier Transform and inverse Fourier Transform .. The discrete Fourier Transform ..5B The fast Fourier The FFT algorithm .. FFT of real-valued vectors .. Multidimensional DFT and FFT .. 11C The Discrete Sine and Cosine Computing the Discrete Sine Transform .. Computing the Discrete Cosine Transform .. Multidimensional DST and DCT .. 16D Solving the heat equation .. JPEG compression .. 1811 IntroductionThe fast Fourier Transform (commonly abbreviated as FFT) is a fast algorithm for computing thediscrete Fourier Transform of a sequence. The purpose of this project is to investigate some of themathematics behind the FFT, as well as the closely related discrete sine and cosine transforms.

2 I willproduce a small library of MATLAB code which implements the algorithms discussed, and I will also lookinto two real-world Applications of the FFT: solving partial differential equations and JPEG MethodsI began by studying the Fourier Transform and the discrete Fourier Transform , by reading the textbook[1], which has a chapter dedicated to the FFT and related concepts. From here I gained an understandingof how the discrete Fourier Transform is related to the continuous Fourier Transform , as well as how theFFT Fourier Transform is an integral Transform given by the formulaF{f(t)}= f(k) = e 2 iktf(t) takes the functionf(t) as input and outputs the function f(k). We usually think offas a functionof timetand fas a function of frequencyk. The Fourier Transform has various properties whichallow for simplification of ODEs and PDEs. For example, iff(n)denotes thenth derivative off, thenF{f(n)(t)}(k) = (2 ik)nF{f(t)}(k) = (2 ik)n f(k) [2].

3 The discrete Fourier Transform (DFT) of an array ofNcomplex numbersf0,f1,..,fN 1is anotherarray ofNcomplex numbersF0,F1,..,FN 1, defined byFn=N 1 j=0fje 2 DFT can provide an approximation to the continuous Fourier Transform of a functionf. Supposewe takeNsamplesfj=f(tj), wheretj=jh,j= 0,1,..,N 1, wherehis the sampling interval. Thenwe can estimate that f(kn) hFnat the frequencieskn=nNh,n= N2, N2+ 1,.., inspiration from the algorithms at [4] and [5], I implemented the FFT in two slightly differentways using the programming language MATLAB. I then used a MATLAB script to compare the runtimesof both an ODEdydt=f(t,y) and an initial conditiony(t0) =y0, we can approximate the solutionywith Euler s method. Fix a step sizeh, then lettn=t0+hn, forn= 0,1,..,N. Then perform therecurrence relationyn+1=yn+hf(tn,yn) forn= 0,1,..,N, to obtain the approximationy(tn) is the simplest method for numerically solving initial value problems, but with a small enough stepsize, it can be very accurate [6].

4 One final technique, which is the central idea behind the compression of JPEG image files, is thediscrete cosine Transform . The DCT is similar to the DFT, but one main difference is that it uses realnumbers only. The reason the DCT is well-suited to compression is because a signal can be reconstructedwith reasonable accuracy from just a few low-frequency components of its ResultsIf we consider the array offjs as a vector~f, and its DFT as a vector~F, then we can compute the DFTvia a matrix-vector multiplication:~F=W~f, whereW= 1111 11ww2w3 wN 11w2w4w6 w2(N 1)1w3w6w9 w3(N 1)..1wN 1w2(N 1)w3(N 1) w(N 1)2 .2 Multiplying a vector by a matrix requiresO(N2) operations, which can be very slow for largeN. TheDanielson-Lanczos Lemma states that the DFT of~fcan be rewritten in terms of two DFTs of lengthN/2. If we impose the restriction thatNis a power of 2, then this lemma can be applied recursivelyuntil we are left with theNtransforms of length 1, and the DFT of length 1 is just the identity the DFT in this manner reduces the number of operations toO(Nlog2N), and is the mainidea behind the fast Fourier Transform algorithm.

5 The steps in the algorithm are discussed in detail inappendix also investigated an even faster algorithm for computing the DFT in the special case where all ofthefjare real numbers. Making use of this, I have written a fast sine Transform and fast cosinetransform as explained in appendix now written my own FFT, I went on to explore how the FFT can be used to numerically solvethe PDE known as the heat equation, tu(x,t) = 2 2 x2u(x,t), given an initial conditionu(x,0) =f(x),and periodic boundary conditions. Taking the Fourier Transform of both sides of the equation withrespect to the spatial variablexreduces the problem to a first order ODE for each independent valueof the frequency variablek. Taking the Fourier Transform of the initial conditionu(x,0) turns this intoan initial value problem, which is solvable via Euler s method. Figure 1 shows a surface plot of thenumerical solution in the case whereu(x,0) = sinx.

6 More detail is given in appendix 1: Solution to the heat equation forx (0,2 ) andu(x,0) = sinxFinally, I investigated another real-world application of the FFT. The JPEG image file format worksby removing some of the detail in an image which will be barely noticed by the human eye, allowing theimage to take up significantly less space in memory. I studied the article [7] in order to find out howthis is done. The idea is to use the DCT and a process called quantization which disregards some ofthe higher frequency components, as shown in appendix I have written a MATLAB script whichdemonstrates the main steps in this MATLAB code I created during the course of this project is available on GitHub: Discussion/conclusionThe most difficult part of this project was figuring out how the FFT algorithms should be implemented,as well as the algorithms for the discrete sine and cosine transforms. I dealt with this by re-reading thetextbook [1] and trying each of the steps on a few small examples, or by figuring it out for myself wherethere was a lack of explanation in the book.

7 I also spent a lot of time finding where I had made mistakesin my chose to program in MATLAB because I have used it many times before for university courseworkand for personal programming projects. It is also fairly user-friendly, so I did not have to worry too muchabout the low-level aspects I might have had to consider if I had used another programming , MATLAB makes it relatively easy to produce figures and plots since it comes with variousin-built functions for doing biggest cultural impact of any of the topics covered in this project is that of the discrete cosinetransform and JPEG compression. The JPEG format is one of the most popular image file formats,3due to its ability to store large photographs in great detail in a relatively small amount of , a modified version of the discrete cosine Transform is used for encoding MP3 audio , the objectives of this project have been achieved. Given more time, I would have liked to trysolving another more complicated PDE using Fourier methods, or explore convolution, which is anotheruseful application of the Fourier Personal statementThis project has helped me to build on my existing programming skills and gain more experience withMATLAB.

8 Writing this report has tested my skills in communicating mathematics. It was also usefulto gain some experience of what it is like to do research. Additionally, I have had the opportunity toinvestigate an area of mathematics that I might not have studied in depth SummaryIn this project I aimed to understand and implement the fast Fourier Transform , an algorithm whichhas many important Applications . I also investigated some related algorithms, and how to use the FastFourier Transform to solve the heat equation, a physics problem which describes the distribution of heatin a material over time. Finally, I found out how JPEG files can compress detailed images so that theytake up less space in computer ItineraryApproximately 5 weeks were spent on researching the topics covered and writing MATLAB code, andthe final 1 week was spent writing the report, although part of the report was written during the researchphase. The financial support was used for AcknowledgementsI would like to thank my supervisor, Dr Ben Goddard, for his help and guidance throughout the would also like to thank the University of Edinburgh s College of Science and Engineering for awardingme a College Vacation The Fourier Transform and discrete Fourier Defining the Fourier transformThe Fourier Transform of an integrable functionf:R Cis an integral Transform , defined asF{f(t)}= f(k) = e 2 iktf(t) dt,(1)and the inverse Fourier Transform (when it exists) is defined asF 1{ f(k)}=f(t) = e2 ikt f(k) dk.

9 (2)One can think of the Fourier Transform as changing a function of time into a function of other words, iff(t) tells us the amplitude of a signal at timet, then f(k) tells us how much of eachfrequency is present in the signal. The functionsfand fare known as a Fourier Transform is worth mentioning that there are a few different ways to define the Fourier Transform . Onepossibility is to let 2 k= , so thatF{f(t)}= e i tf(t) dtandF 1{ f(k)}=12 ei t f(k) option is to multiply both the Fourier Transform and its inverse by1 2 : thenF{f(t)}=1 2 e i tf(t) dt, andF 1{ f(k)}=1 2 ei t f(k) dk[2].These various choices of definition are purely conventions and no particular definition is any morecorrect than the others, however most people have one that they prefer to use. The convention iscommonly used in physics because it represents angular frequency. I will stick to definitions 1, 2 for therest of this Existence of the Fourier Transform and inverse Fourier transformSince the Fourier Transform is defined as an improper integral, it is only defined under certain absolutely integrable, meaning that |f(t)|dt < , then it has a Fourier Transform .

10 This isbecause| f(k)|=| e 2 iktf(t) dt| |e 2 iktf(t)|dt= |e 2 ikt||f(t)|dt= |f(t)|dt. Soiffis absolutely integrable, then| f(k)|< for allk[2].It is also possible (and useful) to define Fourier transforms of sine and cosine functions, as well ascomplex exponentials, although the result is defined in terms of delta functions [3] [6, Chapter ]. Alist of properties of the Fourier Transform , as well as a list of common Fourier Transform pairs, can befound on The discrete Fourier transformThe discrete Fourier Transform (DFT) of a finite sequence ofNcomplex numbersf0,f1,..,fN 1isanother sequence ofNcomplex numbersF0,F1,..,FN 1, whereFn=N 1 j=0fje 2 inj/N.(3)We can recover thefjs from theFns via the inverse discrete Fourier Transform :fj=1NN 1 n=0 Fne2 inj/N.(4)To make intuitive sense of equation 3, suppose we want to estimate the Fourier Transform of a functionffrom a finite numberNof samplesfj=f(tj), wheretj=jh, forj= 0,1,2.


Related search queries