SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
April, 12th
2020
Discrete Fourier Transform and Fast Fourier Transform
1
auliakhalqillah.mail@gmail.com
Discrete Fourier Transform and Fast Fourier Transform
Fourier Transform (FT) is the most method that used in signal processing. FT is useful
to transform time domain to frequency domain and vice versa that we call Inverse
Fourier Transform (IFT). In this article, I want to explain about continuous and discrete
of FT also Fast Fourier Transform (FFT).
We start from the continues form of FT is
𝐹(𝜔) = ∫ 𝑓(𝑥)𝑒−𝑖𝜔𝑥
𝑑𝑥
∞
−∞
(1)
𝑓(𝑥) is the function of time/signal
𝑤 is the frequency domain
𝑥 is the time domain
variable of 𝑥 is replaced by 𝑡, then
𝐹(𝜔) = ∫ 𝑓(𝑡)𝑒−𝑖𝜔𝑡
𝑑𝑡
∞
−∞
(2)
where 𝜔 = 2𝜋𝑓𝑛 and 𝑓
𝑛 =
𝑛
𝑡
and 𝑡 = 𝑁. Δ𝑡
𝐹(𝜔) = ∫ 𝑓(𝑡)𝑒−𝑖2𝜋𝑓𝑛𝑡
𝑑𝑡
∞
−∞
(3)
Then, we can rewrite the equation (3) to discrete form
𝑋𝑛 = ∑ 𝑥𝑘𝑒−𝑖2𝜋𝑓𝑛𝑡𝑘
𝑁−1
𝑘=0 (4)
𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋
𝑛
𝑡
𝑡𝑘
𝑁−1
𝑘=0 (5)
where 𝑡𝑘 = 𝑘Δ𝑡 and 𝑡 = 𝑁Δ𝑡, then
𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋
𝑛
𝑁Δ𝑡
𝑘Δ𝑡
𝑁−1
𝑘=0 (6)
𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋
𝑛
𝑁
𝑘
𝑁−1
𝑘=0 (7)
𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖
2𝜋
𝑁
𝑘𝑛
𝑁−1
𝑘=0 (8)
we can write 𝑊𝑁 = 𝑒−
𝑖2𝜋
𝑁 , so equation (8) can be rewritten
𝑋𝑛 = ∑ 𝑓𝑘𝑊𝑁
𝑘𝑛
𝑁−1
𝑘=0 (9)
where 𝑛 = 0,1,2,3, … … 𝑁 − 1 and 𝑁 is number of samples
Cosine and Sine Form
The equation (8) is the final Discrete Fourier Transform (DFT). It can be written as
cosine (real part) and sine (imaginary part) term as follows
April, 12th
2020
Discrete Fourier Transform and Fast Fourier Transform
2
auliakhalqillah.mail@gmail.com
remember that
𝑒±𝑖𝜃
= cos(𝜃) ± 𝑖 sin (𝜃)
𝜃 =
2𝜋
𝑁
𝑘𝑛
𝑋𝑛 = ∑ 𝑥𝑘 [cos (
2𝜋
𝑁
𝑘𝑛) − 𝑖 sin (
2𝜋
𝑁
𝑘𝑛)]
𝑁−1
𝑘=0 (10)
𝑅𝑒𝑎𝑙 𝑋𝑛 = ∑ 𝑥𝑘 cos (
2𝜋
𝑁
𝑘𝑛)
𝑁−1
𝑘=0 (11)
𝐼𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦 𝑋𝑛 = ∑ 𝑥𝑘 i sin (
2𝜋
𝑁
𝑘𝑛)
𝑁−1
𝑘=0 (12)
Then, the equation (9) can be rewritten as
𝑋𝑛 = ∑ 𝑥𝑘[𝑅𝑒𝑎𝑙 𝑋𝑛 − 𝐼𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦 𝑋𝑛]
𝑁−1
𝑘=0 (13)
So, the equation (13) is called Discrete Fourier Transform (DFT)
How much times to process have to be done from equation (9)?
Let’s imagine if N =100 of data will be processed. It will take N times to process for
summation part from 𝑘 𝑡𝑜 𝑁 − 1 for each 𝑛 from 𝑛 𝑡𝑜 𝑁 − 1. In order words, the process
will take 𝑁𝑥𝑁 times or 𝑁2
times and for this example, 𝑁2
= 1002
= 10000 times.
If N = 1 has to take 1 millisecond to process. So, if 𝑁2
= 10000 has to take 10000
milliseconds or equal to 10 seconds. This process is good enough for 𝑁 = 100. The
next question is, how much times to process have to be done if 𝑁 = 5000? When 𝑁 =
5000, its means 𝑁2
= 25000000 will take 25000000 milliseconds or equal to 25000
second or equal to ≈ 416 minutes or equal to ≈ 6,9 hours. It takes a long time to
process if we use equation (9) for N very huge number.
What is the solution for this problem?
Even and Odd Method
The solution is, we can split to even and odd part of equation (9). We can rewrite the
equation (9) as follows:
𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0 + ∑ 𝑥2𝑚+1𝑊
𝑁
(2𝑚+1)𝑛
𝑁
2
−1
𝑚=0 (14)
𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0 + ∑ 𝑥2𝑚+1𝑊𝑁
2𝑚𝑛
𝑊𝑁
𝑛
𝑁
2
−1
𝑚=0
𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0 + 𝑊𝑁
𝑛 ∑ 𝑥2𝑚+1𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0 (15)
April, 12th
2020
Discrete Fourier Transform and Fast Fourier Transform
3
auliakhalqillah.mail@gmail.com
𝐸𝑣𝑒𝑛 𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0
𝑂𝑑𝑑 𝑋𝑛 = 𝑊𝑁
𝑛 ∑ 𝑥2𝑚+1𝑊𝑁
2𝑚𝑛
𝑁
2
−1
𝑚=0
How much times to process have to be done by using equation (15)?
For an example, we use N = 4 to process by using equation (15). By using N = 4, its
means 𝑛 = 0,1,2,3 and 𝑚 = 0,1 because the last boundary of 𝑚 is
𝑁
2
− 1 =
4
2
− 1 = 1.
Then, we input the index 𝑛 and 𝑚 to the equation (15)
𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 0, 𝑚 = 0,1
𝑋0 = [𝑥2(0)𝑊
4
2(0)(0)
+ 𝑥2(1)𝑊
4
2(1)(0)
] + [𝑊4
0
(𝑥2(0)+1𝑊
4
2(0)(0)
+ 𝑥2(1)+1𝑊
4
2(1)(0)
)]
𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 1, 𝑚 = 0,1
𝑋1 = [𝑥2(0)𝑊
4
2(0)(1)
+ 𝑥2(1)𝑊
4
2(1)(1)
] + [𝑊4
1
(𝑥2(0)+1𝑊
4
2(0)(1)
+ 𝑥2(1)+1𝑊
4
2(1)(1)
)]
𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 2, 𝑚 = 0,1
𝑋2 = [𝑥2(0)𝑊
4
2(0)(2)
+ 𝑥2(1)𝑊
4
2(1)(2)
] + [𝑊4
2
(𝑥2(0)+1𝑊
4
2(0)(2)
+ 𝑥2(1)+1𝑊
4
2(1)(2)
)]
𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 3, 𝑚 = 0,1
𝑋3 = [𝑥2(0)𝑊
4
2(0)(3)
+ 𝑥2(1)𝑊
4
2(1)(3)
] + [𝑊4
3
(𝑥2(0)+1𝑊
4
2(0)(3)
+ 𝑥2(1)+1𝑊
4
2(1)(3)
)]
From the equation above, we can simplify become
𝑋0 = [𝑥0𝑊4
0
+ 𝑥2𝑊4
0] + [𝑊4
0(𝑥1𝑊4
0
+ 𝑥3𝑊4
0)]
𝑋1 = [𝑥0𝑊4
0
+ 𝑥2𝑊4
2] + [𝑊4
1(𝑥1𝑊4
0
+ 𝑥3𝑊4
2)]
𝑋2 = [𝑥0𝑊4
0
+ 𝑥2𝑊4
4] + [𝑊4
2(𝑥1𝑊4
0
+ 𝑥3𝑊4
4)]
𝑋3 = [𝑥0𝑊4
0
+ 𝑥2𝑊4
6] + [𝑊4
3(𝑥1𝑊4
0
+ 𝑥3𝑊4
6)]
where 𝑊4
0
= 1 (produced from complex plane)
𝑋0 = [𝑥0 + 𝑥2𝑊4
0] + [𝑊4
0(𝑥1 + 𝑥3𝑊4
0)]
𝑋1 = [𝑥0 + 𝑥2𝑊4
2] + [𝑊4
1(𝑥1 + 𝑥3𝑊4
2)]
𝑋2 = [𝑥0 + 𝑥2𝑊4
4] + [𝑊4
2(𝑥1 + 𝑥3𝑊4
4)]
𝑋3 = [𝑥0 + 𝑥2𝑊4
6] + [𝑊4
3(𝑥1 + 𝑥3𝑊4
6)] Figure 1 Complex Plane for N = 4
April, 12th
2020
Discrete Fourier Transform and Fast Fourier Transform
4
auliakhalqillah.mail@gmail.com
From the complex plane in Figure 1, 𝑊4
4
= 𝑊4
0
and 𝑊4
6
= 𝑊4
2
, so we get
𝑋0 = [𝑥0 + 𝑥2𝑊4
0] + [𝑊4
0(𝑥1 + 𝑥3𝑊4
0)]
𝑋1 = [𝑥0 + 𝑥2𝑊4
2] + [𝑊4
1(𝑥1 + 𝑥3𝑊4
2)]
𝑋2 = [𝑥0 + 𝑥2𝑊4
0] + [𝑊4
2(𝑥1 + 𝑥3𝑊4
0)]
𝑋3 = [𝑥0 + 𝑥2𝑊4
2] + [𝑊4
3(𝑥1 + 𝑥3𝑊4
2)]
We can see, the equation is repeated. Its means, the process just take 8 times or
equal to 𝑁 log2 𝑁. If we calculate the 𝑁 = 4 → 𝑁 log2 𝑁 = 4 log2 4 = 8.
Back to the illustration, if we have 𝑁 = 5000, by using even and odd method of FT, its
means 𝑁 log2 𝑁 = 5000 log2 5000 ≈ 61439,56189 ≈ 61440 times will be processed. If
N = 1 has 1 millisecond to process, then for 𝑁 ≈ 61440 has 61440 millisecond or
61,440 second or 1.024 minutes. In other words, to process 𝑁 = 5000 points by using
even and odd method, it will take 1.024 minutes of time. Very short time than using 𝑁2
process, isn’t it?
Finally, the DFT by using 𝑁 log2 𝑁 process also called Fast Fourier Transform (FFT)
So, for the good process of FFT, the recommendation of N is power of two 𝑁 = 2𝑟
,
𝑁 = 2, 𝑁 = 4, 𝑁 = 8, 𝑁 = 16 and etc.
Sources
Paul Heckbert (1998) Fourier Transforms and the Fast Fourier Transform (FFT)
Algorithm
Michael T. Heideman, Don H. Johnson, C. Sidney Burrus (1984),Gauss and the
history of the fast Fourier transform
Amente Bekele (2016),Cooley-Tukey Algorithms
Jake VanderPlas (2013), Understanding the FFT algorithm
Sho Nakagome (2019), Fourier Transform 101 – Part 5: Fast Fourier Transform (FFT)

Mais conteúdo relacionado

Mais procurados

Integration basics
Integration basicsIntegration basics
Integration basics
Tarun Gehlot
 
10 merge sort
10 merge sort10 merge sort
10 merge sort
irdginfo
 

Mais procurados (20)

Properties of dft
Properties of dftProperties of dft
Properties of dft
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Dft,fft,windowing
Dft,fft,windowingDft,fft,windowing
Dft,fft,windowing
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Channel capacity of continuous memory less channel
Channel capacity of continuous memory less channelChannel capacity of continuous memory less channel
Channel capacity of continuous memory less channel
 
fuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzificationfuzzy fuzzification and defuzzification
fuzzy fuzzification and defuzzification
 
multi threaded and distributed algorithms
multi threaded and distributed algorithms multi threaded and distributed algorithms
multi threaded and distributed algorithms
 
Quicksort
QuicksortQuicksort
Quicksort
 
Estimating structured vector autoregressive models
Estimating structured vector autoregressive modelsEstimating structured vector autoregressive models
Estimating structured vector autoregressive models
 
Mergesort
MergesortMergesort
Mergesort
 
Integration basics
Integration basicsIntegration basics
Integration basics
 
Chapter 25 aoa
Chapter 25 aoaChapter 25 aoa
Chapter 25 aoa
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
 
Algorithms Lab PPT
Algorithms Lab PPTAlgorithms Lab PPT
Algorithms Lab PPT
 
CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
10 merge sort
10 merge sort10 merge sort
10 merge sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Ff tand matlab-wanjun huang
Ff tand matlab-wanjun huangFf tand matlab-wanjun huang
Ff tand matlab-wanjun huang
 
Chapter 26 aoa
Chapter 26 aoaChapter 26 aoa
Chapter 26 aoa
 
RNN and sequence-to-sequence processing
RNN and sequence-to-sequence processingRNN and sequence-to-sequence processing
RNN and sequence-to-sequence processing
 

Semelhante a Fast fourier transform

Engineering Analysis -Third Class.ppsx
Engineering Analysis -Third Class.ppsxEngineering Analysis -Third Class.ppsx
Engineering Analysis -Third Class.ppsx
HebaEng
 
Fibonacci_Hubble
Fibonacci_HubbleFibonacci_Hubble
Fibonacci_Hubble
Marc King
 

Semelhante a Fast fourier transform (20)

Note on fourier transform of unit step function
Note on fourier transform of unit step functionNote on fourier transform of unit step function
Note on fourier transform of unit step function
 
Numerical Solution Of Delay Differential Equations Using The Adomian Decompos...
Numerical Solution Of Delay Differential Equations Using The Adomian Decompos...Numerical Solution Of Delay Differential Equations Using The Adomian Decompos...
Numerical Solution Of Delay Differential Equations Using The Adomian Decompos...
 
Engineering Analysis -Third Class.ppsx
Engineering Analysis -Third Class.ppsxEngineering Analysis -Third Class.ppsx
Engineering Analysis -Third Class.ppsx
 
Laplace transformation
Laplace transformationLaplace transformation
Laplace transformation
 
lec07_DFT.pdf
lec07_DFT.pdflec07_DFT.pdf
lec07_DFT.pdf
 
Laplace & Inverse Transform convoltuion them.pptx
Laplace & Inverse Transform convoltuion them.pptxLaplace & Inverse Transform convoltuion them.pptx
Laplace & Inverse Transform convoltuion them.pptx
 
3. convolution fourier
3. convolution fourier3. convolution fourier
3. convolution fourier
 
Laplace Transform and its applications
Laplace Transform and its applicationsLaplace Transform and its applications
Laplace Transform and its applications
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
 
Matlab lab manual
Matlab lab manualMatlab lab manual
Matlab lab manual
 
Transforms
TransformsTransforms
Transforms
 
DFT and its properties
DFT and its propertiesDFT and its properties
DFT and its properties
 
Fibonacci_Hubble
Fibonacci_HubbleFibonacci_Hubble
Fibonacci_Hubble
 
Fourier series
Fourier series Fourier series
Fourier series
 
Hw1 solution
Hw1 solutionHw1 solution
Hw1 solution
 
Laplace
LaplaceLaplace
Laplace
 
Fourier transforms
Fourier transforms Fourier transforms
Fourier transforms
 
Mt3621702173
Mt3621702173Mt3621702173
Mt3621702173
 
PART I.4 - Physical Mathematics
PART I.4 - Physical MathematicsPART I.4 - Physical Mathematics
PART I.4 - Physical Mathematics
 
A Fifth-Order Iterative Method for Solving Nonlinear Equations
A Fifth-Order Iterative Method for Solving Nonlinear EquationsA Fifth-Order Iterative Method for Solving Nonlinear Equations
A Fifth-Order Iterative Method for Solving Nonlinear Equations
 

Último

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
Alexander Litvinenko
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
Krashi Coaching
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Último (20)

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Benefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptxBenefits and Challenges of OER by Shweta Babel.pptx
Benefits and Challenges of OER by Shweta Babel.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 

Fast fourier transform

  • 1. April, 12th 2020 Discrete Fourier Transform and Fast Fourier Transform 1 auliakhalqillah.mail@gmail.com Discrete Fourier Transform and Fast Fourier Transform Fourier Transform (FT) is the most method that used in signal processing. FT is useful to transform time domain to frequency domain and vice versa that we call Inverse Fourier Transform (IFT). In this article, I want to explain about continuous and discrete of FT also Fast Fourier Transform (FFT). We start from the continues form of FT is 𝐹(𝜔) = ∫ 𝑓(𝑥)𝑒−𝑖𝜔𝑥 𝑑𝑥 ∞ −∞ (1) 𝑓(𝑥) is the function of time/signal 𝑤 is the frequency domain 𝑥 is the time domain variable of 𝑥 is replaced by 𝑡, then 𝐹(𝜔) = ∫ 𝑓(𝑡)𝑒−𝑖𝜔𝑡 𝑑𝑡 ∞ −∞ (2) where 𝜔 = 2𝜋𝑓𝑛 and 𝑓 𝑛 = 𝑛 𝑡 and 𝑡 = 𝑁. Δ𝑡 𝐹(𝜔) = ∫ 𝑓(𝑡)𝑒−𝑖2𝜋𝑓𝑛𝑡 𝑑𝑡 ∞ −∞ (3) Then, we can rewrite the equation (3) to discrete form 𝑋𝑛 = ∑ 𝑥𝑘𝑒−𝑖2𝜋𝑓𝑛𝑡𝑘 𝑁−1 𝑘=0 (4) 𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋 𝑛 𝑡 𝑡𝑘 𝑁−1 𝑘=0 (5) where 𝑡𝑘 = 𝑘Δ𝑡 and 𝑡 = 𝑁Δ𝑡, then 𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋 𝑛 𝑁Δ𝑡 𝑘Δ𝑡 𝑁−1 𝑘=0 (6) 𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖2𝜋 𝑛 𝑁 𝑘 𝑁−1 𝑘=0 (7) 𝑋𝑛 = ∑ 𝑓𝑘𝑒−𝑖 2𝜋 𝑁 𝑘𝑛 𝑁−1 𝑘=0 (8) we can write 𝑊𝑁 = 𝑒− 𝑖2𝜋 𝑁 , so equation (8) can be rewritten 𝑋𝑛 = ∑ 𝑓𝑘𝑊𝑁 𝑘𝑛 𝑁−1 𝑘=0 (9) where 𝑛 = 0,1,2,3, … … 𝑁 − 1 and 𝑁 is number of samples Cosine and Sine Form The equation (8) is the final Discrete Fourier Transform (DFT). It can be written as cosine (real part) and sine (imaginary part) term as follows
  • 2. April, 12th 2020 Discrete Fourier Transform and Fast Fourier Transform 2 auliakhalqillah.mail@gmail.com remember that 𝑒±𝑖𝜃 = cos(𝜃) ± 𝑖 sin (𝜃) 𝜃 = 2𝜋 𝑁 𝑘𝑛 𝑋𝑛 = ∑ 𝑥𝑘 [cos ( 2𝜋 𝑁 𝑘𝑛) − 𝑖 sin ( 2𝜋 𝑁 𝑘𝑛)] 𝑁−1 𝑘=0 (10) 𝑅𝑒𝑎𝑙 𝑋𝑛 = ∑ 𝑥𝑘 cos ( 2𝜋 𝑁 𝑘𝑛) 𝑁−1 𝑘=0 (11) 𝐼𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦 𝑋𝑛 = ∑ 𝑥𝑘 i sin ( 2𝜋 𝑁 𝑘𝑛) 𝑁−1 𝑘=0 (12) Then, the equation (9) can be rewritten as 𝑋𝑛 = ∑ 𝑥𝑘[𝑅𝑒𝑎𝑙 𝑋𝑛 − 𝐼𝑚𝑎𝑔𝑖𝑛𝑎𝑟𝑦 𝑋𝑛] 𝑁−1 𝑘=0 (13) So, the equation (13) is called Discrete Fourier Transform (DFT) How much times to process have to be done from equation (9)? Let’s imagine if N =100 of data will be processed. It will take N times to process for summation part from 𝑘 𝑡𝑜 𝑁 − 1 for each 𝑛 from 𝑛 𝑡𝑜 𝑁 − 1. In order words, the process will take 𝑁𝑥𝑁 times or 𝑁2 times and for this example, 𝑁2 = 1002 = 10000 times. If N = 1 has to take 1 millisecond to process. So, if 𝑁2 = 10000 has to take 10000 milliseconds or equal to 10 seconds. This process is good enough for 𝑁 = 100. The next question is, how much times to process have to be done if 𝑁 = 5000? When 𝑁 = 5000, its means 𝑁2 = 25000000 will take 25000000 milliseconds or equal to 25000 second or equal to ≈ 416 minutes or equal to ≈ 6,9 hours. It takes a long time to process if we use equation (9) for N very huge number. What is the solution for this problem? Even and Odd Method The solution is, we can split to even and odd part of equation (9). We can rewrite the equation (9) as follows: 𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 + ∑ 𝑥2𝑚+1𝑊 𝑁 (2𝑚+1)𝑛 𝑁 2 −1 𝑚=0 (14) 𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 + ∑ 𝑥2𝑚+1𝑊𝑁 2𝑚𝑛 𝑊𝑁 𝑛 𝑁 2 −1 𝑚=0 𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 + 𝑊𝑁 𝑛 ∑ 𝑥2𝑚+1𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 (15)
  • 3. April, 12th 2020 Discrete Fourier Transform and Fast Fourier Transform 3 auliakhalqillah.mail@gmail.com 𝐸𝑣𝑒𝑛 𝑋𝑛 = ∑ 𝑥2𝑚𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 𝑂𝑑𝑑 𝑋𝑛 = 𝑊𝑁 𝑛 ∑ 𝑥2𝑚+1𝑊𝑁 2𝑚𝑛 𝑁 2 −1 𝑚=0 How much times to process have to be done by using equation (15)? For an example, we use N = 4 to process by using equation (15). By using N = 4, its means 𝑛 = 0,1,2,3 and 𝑚 = 0,1 because the last boundary of 𝑚 is 𝑁 2 − 1 = 4 2 − 1 = 1. Then, we input the index 𝑛 and 𝑚 to the equation (15) 𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 0, 𝑚 = 0,1 𝑋0 = [𝑥2(0)𝑊 4 2(0)(0) + 𝑥2(1)𝑊 4 2(1)(0) ] + [𝑊4 0 (𝑥2(0)+1𝑊 4 2(0)(0) + 𝑥2(1)+1𝑊 4 2(1)(0) )] 𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 1, 𝑚 = 0,1 𝑋1 = [𝑥2(0)𝑊 4 2(0)(1) + 𝑥2(1)𝑊 4 2(1)(1) ] + [𝑊4 1 (𝑥2(0)+1𝑊 4 2(0)(1) + 𝑥2(1)+1𝑊 4 2(1)(1) )] 𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 2, 𝑚 = 0,1 𝑋2 = [𝑥2(0)𝑊 4 2(0)(2) + 𝑥2(1)𝑊 4 2(1)(2) ] + [𝑊4 2 (𝑥2(0)+1𝑊 4 2(0)(2) + 𝑥2(1)+1𝑊 4 2(1)(2) )] 𝑓𝑜𝑟 𝑁 = 4, 𝑛 = 3, 𝑚 = 0,1 𝑋3 = [𝑥2(0)𝑊 4 2(0)(3) + 𝑥2(1)𝑊 4 2(1)(3) ] + [𝑊4 3 (𝑥2(0)+1𝑊 4 2(0)(3) + 𝑥2(1)+1𝑊 4 2(1)(3) )] From the equation above, we can simplify become 𝑋0 = [𝑥0𝑊4 0 + 𝑥2𝑊4 0] + [𝑊4 0(𝑥1𝑊4 0 + 𝑥3𝑊4 0)] 𝑋1 = [𝑥0𝑊4 0 + 𝑥2𝑊4 2] + [𝑊4 1(𝑥1𝑊4 0 + 𝑥3𝑊4 2)] 𝑋2 = [𝑥0𝑊4 0 + 𝑥2𝑊4 4] + [𝑊4 2(𝑥1𝑊4 0 + 𝑥3𝑊4 4)] 𝑋3 = [𝑥0𝑊4 0 + 𝑥2𝑊4 6] + [𝑊4 3(𝑥1𝑊4 0 + 𝑥3𝑊4 6)] where 𝑊4 0 = 1 (produced from complex plane) 𝑋0 = [𝑥0 + 𝑥2𝑊4 0] + [𝑊4 0(𝑥1 + 𝑥3𝑊4 0)] 𝑋1 = [𝑥0 + 𝑥2𝑊4 2] + [𝑊4 1(𝑥1 + 𝑥3𝑊4 2)] 𝑋2 = [𝑥0 + 𝑥2𝑊4 4] + [𝑊4 2(𝑥1 + 𝑥3𝑊4 4)] 𝑋3 = [𝑥0 + 𝑥2𝑊4 6] + [𝑊4 3(𝑥1 + 𝑥3𝑊4 6)] Figure 1 Complex Plane for N = 4
  • 4. April, 12th 2020 Discrete Fourier Transform and Fast Fourier Transform 4 auliakhalqillah.mail@gmail.com From the complex plane in Figure 1, 𝑊4 4 = 𝑊4 0 and 𝑊4 6 = 𝑊4 2 , so we get 𝑋0 = [𝑥0 + 𝑥2𝑊4 0] + [𝑊4 0(𝑥1 + 𝑥3𝑊4 0)] 𝑋1 = [𝑥0 + 𝑥2𝑊4 2] + [𝑊4 1(𝑥1 + 𝑥3𝑊4 2)] 𝑋2 = [𝑥0 + 𝑥2𝑊4 0] + [𝑊4 2(𝑥1 + 𝑥3𝑊4 0)] 𝑋3 = [𝑥0 + 𝑥2𝑊4 2] + [𝑊4 3(𝑥1 + 𝑥3𝑊4 2)] We can see, the equation is repeated. Its means, the process just take 8 times or equal to 𝑁 log2 𝑁. If we calculate the 𝑁 = 4 → 𝑁 log2 𝑁 = 4 log2 4 = 8. Back to the illustration, if we have 𝑁 = 5000, by using even and odd method of FT, its means 𝑁 log2 𝑁 = 5000 log2 5000 ≈ 61439,56189 ≈ 61440 times will be processed. If N = 1 has 1 millisecond to process, then for 𝑁 ≈ 61440 has 61440 millisecond or 61,440 second or 1.024 minutes. In other words, to process 𝑁 = 5000 points by using even and odd method, it will take 1.024 minutes of time. Very short time than using 𝑁2 process, isn’t it? Finally, the DFT by using 𝑁 log2 𝑁 process also called Fast Fourier Transform (FFT) So, for the good process of FFT, the recommendation of N is power of two 𝑁 = 2𝑟 , 𝑁 = 2, 𝑁 = 4, 𝑁 = 8, 𝑁 = 16 and etc. Sources Paul Heckbert (1998) Fourier Transforms and the Fast Fourier Transform (FFT) Algorithm Michael T. Heideman, Don H. Johnson, C. Sidney Burrus (1984),Gauss and the history of the fast Fourier transform Amente Bekele (2016),Cooley-Tukey Algorithms Jake VanderPlas (2013), Understanding the FFT algorithm Sho Nakagome (2019), Fourier Transform 101 – Part 5: Fast Fourier Transform (FFT)