0% found this document useful (0 votes)
21 views

Implementation of DFT FFT

The document discusses the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. The DFT transforms a time domain signal into its frequency domain representation. The FFT is a more efficient algorithm than the DFT, reducing the computational complexity from O(n2) to O(nlogn). It works by recursively breaking down the DFT into smaller transforms. The FFT has been widely adopted due to this improved efficiency and is considered one of the most important algorithms of the 20th century. Examples are given of implementing the FFT in NumPy and SciPy and comparing performance to a direct implementation of the DFT.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Implementation of DFT FFT

The document discusses the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. The DFT transforms a time domain signal into its frequency domain representation. The FFT is a more efficient algorithm than the DFT, reducing the computational complexity from O(n2) to O(nlogn). It works by recursively breaking down the DFT into smaller transforms. The FFT has been widely adopted due to this improved efficiency and is considered one of the most important algorithms of the 20th century. Examples are given of implementing the FFT in NumPy and SciPy and comparing performance to a direct implementation of the DFT.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

IMPLEMENTATION OF DFT & FFT

DISCRETE FOURIER TRANSFORM


The DFT can transform a sequence of evenly spaced signal to the information about
the frequency of all the sine waves that needed to sum to the time domain signal. It
is defined as:
DFT
FAST FOURIER TRANSFORM (FFT)
• The Fast Fourier Transform (FFT) is an efficient algorithm to
calculate the DFT of a sequence.

• It is a divide and conquer algorithm that recursively breaks


the DFT into smaller DFTs to bring down the computation.

• As a result, it successfully reduces the complexity of the DFT


from O(n2) to O(nlogn), where n is the size of the data. This
reduction in computation time is significant especially for
data with large N, therefore, making FFT widely used in
engineering, science and mathematics.

• The FFT algorithm is the Top 10 algorithm of 20th


century by the journal Computing in Science & Engineering.
FFT IN NUMPY

%timeit fft(x)
FFT IN SCIPY
PERFORMANCE COMPARISON

• Implemented DFT: ~120 ms


• Implemented FFT: ~16 ms
• Numpy FFT: ~40 µs
• Scipy FFT: ~12 µs
SAMPLE SINE WAVE
2D REPRESENTATION
FFT ON IMAGES

https://videopress.com/v/BMeLXPhR
FFT ON IMAGES
• https://videopress.com/v/Z9xWcJw4

• https://videopress.com/v/BMeLXPhR
The low-frequency components provide the overall background and
general shapes in the image. You can see this in the sequence of the
first few terms:

As more frequencies are added, more


detail is included in the image. The
fine detail comes in at the end with
the highest frequencies.

You might also like