Professional Documents
Culture Documents
DSP FFT Dit Dif PDF
DSP FFT Dit Dif PDF
t .
Fast Fourier Transform u b e
e t
c s
/ /
p :
t t
h
http://csetube.weebly.com/
1
Fast Fourier Transform
http://csetube.weebly.com/
4
Butterfly Operation
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
5
Bit Reversal
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
6
8-Point Radix-2 FFT Example
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
7
8-Point Radix-2 FFT Example
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
8
FFT Implementation
• To efficiently implement the FFT algorithm a few
observations are made:
• Each stage has the same number
/kof butterflies
t
(number of butterflies = N/2,bN e.is number of points).
• The number of DFT groups t u per stage is equal to
s e
(N/2stage). / c
/
:between the upper and lower leg is
• The differencep
equal toht
t
2stage-1.
• The number of butterflies in the group is equal to
2stage-1.
http://csetube.weebly.com/
9
FFT Implementation
Example: 8 point FFT
W0 -1
W0 -1
k /
W0 -1 W2 -1
.t
b e
W0 -1
t u
W0 -1 e
cs
W1 -1
W0
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
10
FFT Implementation
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k /
W0 -1 W2 -1
.t
b e
W0 -1
t u
W0 -1 e
cs
W1 -1
W0
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
11
FFT Implementation
Stage 1
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k/Nstages = 1
W0 -1 W2 -1
.t
b e
W0 -1
t u
W0 -1 e
cs
W1 -1
W0
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
12
FFT Implementation
Stage 1 Stage 2
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k/Nstages = 2
W0 -1 W2 -1
.t
b e
W0 -1
t u
W0 -1 e
cs
W1 -1
W0
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
13
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
kN/stages = 3
W0 -1 W2 -1
.t
b e
W0 -1
t u
W0 -1 e
cs
W1 -1
W0
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
14
FFT Implementation
Stage 1 Stage 2 Stage 3
W0 -1 u b
t Stage 1:
W0 -1
W0
W1
c se-1
W0 -1
/ /
W2 -1
W0 -1 W2
p :
-1 W3 -1
t
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
15
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1
W0 -1 (1) Number of stages:
W0 -1
kN/stages = 3
t
(2)e.Blocks/stage:
W0 -1 W2 -1
W0 -1 u b
t Stage 1: Nblocks = 1
W0 -1
W0
W1
s
-1e
c
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
16
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1
W0 -1 (1) Number of stages:
Block 2
W0 -1
kN/stages = 3
t
(2)e.Blocks/stage:
W0 -1 W2 -1
W0 -1 u b
t Stage 1: Nblocks = 2
W0 -1
W0
W1
s
-1e
c
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
17
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1
W0 -1 (1) Number of stages:
Block 2
W0 -1
kN/stages = 3
t
(2)e.Blocks/stage:
W0 -1 W2 -1
W0 -1 u b
Block 3 t Stage 1: Nblocks = 3
W0 -1
W0
W1
s
-1e
c
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
18
FFT Implementation
Stage 1 Stage 2 Stage 3
Block 3 W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
c se-1
Block 4
W0 -1
/ /
W2 -1
W0 -1 W2
p :
-1 W3 -1
t
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
19
FFT Implementation
Stage 1 Stage 2 Stage 3
Block 1
W0 -1 (1) Number of stages:
W0 -1
k /Nstages = 3
t
e.Blocks/stage:
W0 -1 W2 -1
(2)
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
c se-1
W0 -1 /
W2 -1 Stage 2: Nblocks = 1
: /
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
20
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
Block 1
W0 -1
kN/stages = 3
t
(2)e.Blocks/stage:
W0 -1 W2 -1
W0 -1 u b
t Stage 1: Nblocks = 4
Block 2
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
t p-1 W3 -1
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
21
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k /Nstages = 3
t
e.Blocks/stage:
W0 -1 W2 -1
Block 1 (2)
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht
• Decimation in time FFT:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
22
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k /Nstages = 3
t
e.Blocks/stage:
W0 -1 W2 -1
(2)
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1:
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
23
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
kN/stages = 3
t
(2)e.Blocks/stage:
W0 -1 W2 -1
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
• Number of blocks/stage = N/2stage
• Number of butterflies/block = 2stage-1
http://csetube.weebly.com/
24
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k /Nstages = 3
t
e.Blocks/stage:
W0 -1 W2 -1
(2)
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
Stage 2: Nbtf = 1
• Number of blocks/stage = N/2 stage
W0 -1 u b
t Stage 1: Nblocks = 4
W0 -1
W0
W1
s
-1e
c Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
Stage 2: Nbtf = 2
• Number of blocks/stage = N/2 stage
W0 -1
(1) Number of stages:
W0 -1 / Nstages = 3
t k
W0 -1 W2 -1
.(2) Blocks/stage:
be
W0 -1
t u Stage 1: Nblocks = 4
W0 -1 W1
s
-1e
W0
c Stage 2: Nblocks = 2
W0 -1 W2
/ / -1
: Stage 3: Nblocks = 1
tp
W0 -1 W2 -1 W3 -1
ht (3) B’flies/block:
• Decimation in time FFT: Stage 1: Nbtf = 1
• Number of stages = log2N Stage 2: Nbtf = 2
• Number of blocks/stage = N/2stage Stage 3: N = 1
btf
• Number of butterflies/block = 2 stage-1
http://csetube.weebly.com/
27
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k / Nstages = 3
W0 -1 W2 -1 t
. (2)
e Blocks/stage:
W0 -1 ub
t Stage 1: Nblocks = 4
W0 -1 e
cs
W1 -1
W0
Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
Stage 2: Nbtf = 2
• Number of blocks/stage = N/2 stage
Stage 3: Nbtf = 2
• Number of butterflies/block = 2 stage-1
http://csetube.weebly.com/
28
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k / Nstages = 3
W0 -1 W2 -1
. t
e(2) Blocks/stage:
W0 -1 ub
t Stage 1: Nblocks = 4
W0 -1 e
cs
W1 -1
W0
Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
Stage 2: Nbtf = 2
• Number of blocks/stage = N/2 stage
Stage 3: Nbtf = 3
• Number of butterflies/block = 2 stage-1
http://csetube.weebly.com/
29
FFT Implementation
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
W0 -1 (1) Number of stages:
W0 -1
k / Nstages = 3
W0 -1 W2 -1 t
. (2)
e Blocks/stage:
W0 -1 ub
t Stage 1: Nblocks = 4
W0 -1 e
cs
W1 -1
W0
Stage 2: Nblocks = 2
W0 -1
: //
W2 -1
W0 -1 W2
p-1 W3 -1 Stage 3: Nblocks = 1
t
ht (3) B’flies/block:
• Decimation in time FFT:
Stage 1: Nbtf = 1
• Number of stages = log2N
Stage 2: Nbtf = 2
• Number of blocks/stage = N/2 stage
Stage 3: Nbtf = 4
• Number of butterflies/block = 2 stage-1
http://csetube.weebly.com/
30
FFT Implementation
Stage 1 Stage 2 Stage 3
W0 -1
W0 -1
W0 -1
k /
W2 -1
.t
W0 -1 b e W0 -1
tu W0 W1 -1
se
W0 -1 W2 -1
/c
W0 -1 W2 -1 W3 -1
Start Index : / 0 0 0
Input Index t p 1 2 4
h t
Twiddle Factor Index N/2 = 4
http://csetube.weebly.com/
31
FFT Implementation
Stage 1 Stage 2 Stage 3
W0 -1
W0 -1
W0 -1
k /
W2 -1
.t
W0 -1 b e W0 -1
tu W0 W1 -1
se
W0 -1 W2 -1
/c
W0 -1 W2 -1 W3 -1
Start Index : / 0 0 0
Input Index t p 1 2 4
h t
Twiddle Factor Index N/2 = 4 4/2=2
http://csetube.weebly.com/
32
FFT Implementation
Stage 1 Stage 2 Stage 3
W0 -1
W0 -1
W0 -1
k /
W2 -1
.t
W0 -1 b e W0 -1
tu W0 W1 -1
se
W0 -1 W2 -1
/c
W0 -1 W2 -1 W3 -1
Start Index : / 0 0 0
Input Index t p 1 2 4
h t
Twiddle Factor Index N/2 = 4 4/2=2 2/2=1
http://csetube.weebly.com/
33
FFT Implementation
Stage 1 Stage 2 Stage 3
W0 -1
W0 -1
W0 -1
k /
W2 -1
.t
W0 -1 b e W0 -1
tu W0 W1 -1
se
W0 -1 W2 -1
/c
W0 -1 W2 -1 W3 -1
Start Index : / 0 0 0
Input Index t p 1 2 4
h t
Twiddle Factor Index N/2 = 4 4/2 = 2 2/2 = 1
W0
Indicies Used W0 W0
W1
W2
W2
http://csetube.weebly.com/ W3 34
Decimation-in-time Radix-2 FFT
• Split x(n) into even and odd samples and perform smaller FFTs
• f1(n) = x(2n)
• f2(n) = x(2n+1) /
• n=0, 1, … N/2-1 t k
e .
• Derivation performed in class b
t u
• Radix-2 Decimation-in-time (DIT) algorithm
s e
• In radix-2, the "butterfly" element
c takes in 2 inputs and produces 2
outputs / /
:
p2-point FFT
• Butterfly implementst
• Computations: h t
• (N/2)log2N complex multiplications
• Nlog2N complex additions
http://csetube.weebly.com/
35
Decimation-in-time Radix-2 FFT (N=8)
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
36
Radix-2 DIT Basic Butterfly
k /
.t
b e
t u
se
/ c
:/
a (complex) A (complex)
t p
h t
b (complex) B (complex)
W N (complex)
http://csetube.weebly.com/
37
Decimation-in-time Radix-2 FFT (N=8)
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
38
The decimation-in-frequency (DIF)
FFT algorithm
http://csetube.weebly.com/
39
DIF – FFT structure:
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
40
Continuing by decomposing the odd and
even output points we obtain …
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
41
… and replacing the N/4-point DFTs by
butterflys we obtain
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
42
The DIF FFT is the transpose of the DIT FFT
http://csetube.weebly.com/
43
The DIF FFT is the transpose of the DIT FFT
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
45
Alternate DIF FFT structures (continued)
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
46
Alternate DIF FFT structures (continued)
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
47
Alternate DIF FFT structures (continued)
k /
.t
b e
t u
se
/ c
: /
tp
h t
http://csetube.weebly.com/
48
k /
.t
Thank you u b e
e t
c s
/ /
p :
t
ht
http://csetube.weebly.com/
49