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

fft python

The document explains the Fast Fourier Transform (FFT) process, which efficiently converts time-samples into frequency bins using a divide and conquer approach. It involves splitting the input into even and odd samples, recursively computing their FFTs, and then combining the results using a 'butterfly' operation. This method reduces the computational complexity from O(N²) to O(N log₂N).

Uploaded by

fawad.sidd17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

fft python

The document explains the Fast Fourier Transform (FFT) process, which efficiently converts time-samples into frequency bins using a divide and conquer approach. It involves splitting the input into even and odd samples, recursively computing their FFTs, and then combining the results using a 'butterfly' operation. This method reduces the computational complexity from O(N²) to O(N log₂N).

Uploaded by

fawad.sidd17
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

A super-simple view of the “butterfly” in FFT

1. What are we doing?


We want to turn a list of time-samples (length N) into its “frequency
bins” quickly.

2. Divide & conquer

o Split the input into two halves: the samples at even indices and
those at odd indices.
o Recursively compute the FFT of each half (so you turn two
N/2-point problems into one N-point problem).

3. Butterfly combine
At each stage you have two lists of length N/2, call them

ini

CopyEdit

E = FFT(even_samples)

O = FFT(odd_samples)

Now you need to weave them back into one length-N list of frequency values.
You do that with a butterfly: for each index k from 0 to N/2–1,

mathematica

CopyEdit

upper[k] = E[k] + twiddle[k] * O[k]

lower[k] = E[k] – twiddle[k] * O[k]

where

cpp

CopyEdit

twiddle[k] = exp(2πi * k / N)

—that complex exponential “rotates” the odd-part appropriately.

o The “+” gives you the frequency bins 0…N/2–1

o The “–” gives you bins N/2…N–1 (because exp(2πi*(k+N/2)/N)=–


exp(2πi*k/N))

4. Why + and –?

o Sum ( + ) keeps the phase for the lower half of the spectrum.

o Difference ( – ) flips the phase by π (that’s the “high-frequency”


mirror).

5. Overall speedup
Because you halve the problem size at each step and do only N work
per stage, you go from O(N²) (naïve DFT) down to O(N log₂N).
FULL EXPLANATION:
1)

2)

3)
4)

5)
6)

You might also like