You are on page 1of 80

Copyright 2005.

Shi Ping CUC


Chapter 4
Fast Fourier Transform
Content
Introduction
Radix-2 DIT- FFT Algorithm
Radix-2 DIF- FFT Algorithm
The fast algorithm of IDFT
Mixed Radix FFT Algorithm
Chirp-z FFT Algorithm
Applications of FFT Algorithms
Copyright 2005. Shi Ping CUC
Introduction
Problems
Although the DFT is a computable transform, the
straightforward implementation is very inefficient,
especially when the sequence length N is large.
Direct computation of the N-point DFT requires N
2

complex multiplications and N
2
N complex
additions; That means 4N
2
real multiplications and
4N
2
-2N real additions are required.

=

=
= =
1
0
1
0
) ( ) (
1
) ( , ) ( ) ( ) (
N
n
N
nk
N
N
n
N
nk
N
n R W k X
N
n x k R W n x k X
Copyright 2005. Shi Ping CUC
Introduction
How to reduce the computational complexity
In 1965, Cooley and Tukey showed a procedure to
substantially reduce the amount of computations involved
in the DFT. This led to the explosion of applications of the
DFT.
All these efficient algorithms are collectively known as
Fast Fourier Transform (FFT) algorithms.
Most of the computations can be eliminated using the
symmetry and periodicity properties of DFT.
Copyright 2005. Shi Ping CUC
Introduction
Symmetry
Periodicity
) ( ) (
) ( ) (
) (
k N n
N
n N k
N
kn
N
n N k
N
N n k
N
kn
N
kn
N
kn
N
W W W
W W W
W W

+ +
-
= =
= =
=
k
N
N/ k
N
N/
N
m nk
m N
nk
N
mnk
mN
nk
N
W W W
W W W W
= =
= =
+ ) 2 ( 2
/
/
, 1
,
Combine Decomposition
Copyright 2005. Shi Ping CUC
Introduction
FFT algorithm classification
DIT - FFT: Decimation-in-time FFT algorithm
DIF - FFT: Decimation-in-frequency FFT algorithm
return
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
Radix-2: the sequence length N satisfied:
L is an integer
L
N 2 =
How does DIT-FFT operate
To decompose an N point time domain signal into N
signals each containing a single point. Each decomposing
stage uses an interlace decomposition, separating the
even- and odd-indexed samples;
To calculate the N frequency spectra corresponding to
these N time domain signals;
To synthesize the N spectra into a single frequency
spectrum.
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
0 4 8 12 2 6 10 14 1 5 9 13 3 7 11 15
0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15
0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 signal of 16
points
0 2 4 6 8 10 12 14 1 3 5 7 9 11 13 15
2 signals of 8
points
4 signals of 4
points
8 signals of 2
points
16 signals of 1
point
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
Algorithm principle
To divide N-point sequence x(n) into two N/2-point
sequence x
1
(r) and x
2
(r)
1
2
, 2 , 1 , 0 , ) 1 2 ( ) ( ); 2 ( ) (
2 1
= + = =
N
r r x r x r x r x
To compute the DFT of x
1
(r) and x
2
(r)
) 1
2
~ 0 ( ) 1 2 ( ) ( ) (
) 1
2
~ 0 ( ) 2 ( ) ( ) (
1
2
0
2
1
2
0
2
2 2
1
2
0
2
1
2
0
2
1 1
= + = =
= = =

=
N
k W r x W r x k X
N
k W r x W r x k X
N
r
rk
N
N
r
rk
N
N
r
rk
N
N
r
rk
N
Copyright 2005. Shi Ping CUC
To compute the DFT of N-point sequence x(n)
) 1 , 2 , 1 , 0 ( ) ( ) (
) ( ) (
) 1 2 ( ) 2 (
) ( ) ( ) ( ) (
2 1
1
2
0
2
2
1
2
0
2
1
1
2
0
) 1 2 (
1
2
0
2
1
) ( 0
1
) ( 0
1
0
= + =
+ =
+ + =
+ = =

=
+

=
N k k X W k X
W r x W W r x
W r x W r x
W n x W n x W n x k X
k
N
N
r
rk
N
k
N
N
r
rk
N
N
r
k r
N
N
r
rk
N
N
odd n
nk
N
N
even n
nk
N
N
n
nk
N

Copyright 2005. Shi Ping CUC


) 1
2
, 1 , 0 ( ) ( ) (
)
2
( )
2
( )
2
(
) 1
2
, 1 , 0 ( ) ( ) ( ) (
2 1
2
)
2
(
1
2 1
= =
+ + + = +
= + =
+
N
k k X W k X
N
k X W
N
k X
N
k X
N
k k X W k X k X
k
N
N
k
N
k
N

) (n x
) (
1
r x
) (
2
r x
) (
1
k X
) (
2
k X
) (k X
Copyright 2005. Shi Ping CUC
Butterfly computation flow graph
) 1
2
, 1 , 0 ( ) ( ) ( )
2
(
) 1
2
, 1 , 0 ( ) ( ) ( ) (
2 1
2 1
= = +
= + =
N
k k X W k X
N
k X
N
k k X W k X k X
k
N
k
N

) (
1
k X
) (
2
k X
k
N
W
) ( ) (
2 1
k X W k X
k
N
+
) ( ) (
2 1
k X W k X
k
N

1
There are 1 complex multiplication and 2 complex additions
Copyright 2005. Shi Ping CUC
N/2-
point
DFT
N/2-
point
DFT
) 0 (
1
X
) 1 (
1
X
) 2 (
1
X
) 3 (
1
X
) 0 (
2
X
) 1 (
2
X
) 2 (
2
X
) 3 (
2
X
0
N
W
1
N
W
2
N
W
3
N
W
) 0 ( ) 0 (
1
x x =
) 2 ( ) 1 (
1
x x =
) 4 ( ) 2 (
1
x x =
) 6 ( ) 3 (
1
x x =
) 1 ( ) 0 (
2
x x =
) 3 ( ) 1 (
2
x x =
) 5 ( ) 2 (
2
x x =
) 7 ( ) 3 (
2
x x =
) (
1
r x
) (
2
r x
) 4 ( X
1
) 5 ( X
1
) 6 ( X
1
) 7 ( X
1
) 0 ( X
) 1 ( X
) 2 ( X
) 3 ( X
N-point DFT
Copyright 2005. Shi Ping CUC
) 0 ( X
) 1 ( X
) 2 ( X
) 3 ( X
) 4 ( X
) 5 ( X
) 6 ( X
) 7 ( X
) 0 ( x
) 2 ( x
) 4 ( x
) 6 ( x
) 1 ( x
) 3 ( x
) 5 ( x
) 7 ( x
0
N
W
1
N
W
2
N
W
3
N
W
1
1
1
1
0
N
W
2
N
W
1
1
0
N
W
2
N
W
1
1
1
0
N
W
1
0
N
W
1
0
N
W
1
0
N
W
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
for
3
2 = N
) (n x
2-point
DFT
2-point
DFT
2-point
DFT
2-point
DFT
Synthesize
the 2-point
DFTs into a
4-point DFT
Synthesize
the 2-point
DFTs into a
4-point DFT

Synthesize
the 4-point
DFTs into a
8-point DFT
) (k X
3-stage synthesize, each has N/2 butterfly computation
The computation complexity
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
for
L
N 2 =
There are L-stage synthesization, each has N/2
butterfly computations. Each butterfly computation has
1 complex multiplication and 2 complex additions.
The total number of complex multiplications is:


The total number of complex additions is:
N
N
L
N
m
F 2
log
2 2
= =
N N NL a
F 2
log = =
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
The characteristics of DIT-FFT algorithm
In-place computation
) (
1
k X
m
) (
1
j X
m
r
N
W
) ( ) ( ) (
1 1
j X W k X k X
m
r
N m m
+ =
1
) ( ) ( ) (
1 1
j X W k X j X
m
r
N m m
=
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
At the end of computation flow graph at any stage,
output variables can be stored in the same registers
previously occupied by the corresponding input
variables.
This type of memory location sharing is called in-place
computation which results in significant saving in overall
memory requirements.
Copyright 2005. Shi Ping CUC
Radix-2 DIT- FFT Algorithm
Bit-reversed order
In the DFT computation scheme, the DFT samples X(k)
appear at the output in a sequential order while the input
samples x(n) appear in a different order: a bit-reversed order.
Thus, a sequentially ordered input x(n) must be reordered
appropriately before the fast algorithm can be implemented.
Let m, n represent the sequential and bit-reversed order in
binary forms respectively, then:
m: 000 001 010 011 100 101 110 111
n: 000 100 010 110 001 101 011 111
Copyright 2005. Shi Ping CUC
Why is the input bit-reversed order
1
n
2
n
) (
0 1 2
n n n x
0
n
0
1
0
1
0
1
0
1
0
1
0
1
0
1
) 000 ( x
) 100 ( x
) 010 ( x
) 110 ( x
) 001 ( x
) 101 ( x
) 011 ( x
) 111 ( x
) (0 x
) (4 x
) (2 x
) (6 x
) (1 x
) (5 x
) (3 x
) (7 x
Copyright 2005. Shi Ping CUC
How to get the bit-reversed order
Let represent the natural order, the represent the
bit-reversed order, then:
n
n

( ) (

n x n x n n > , if
) 0 ( A ) 1 ( A ) 2 ( A ) 3 ( A ) 4 ( A ) 5 ( A ) 6 ( A ) 7 ( A
) 0 ( x ) 1 ( x ) 2 ( x ) 3 ( x ) 4 ( x ) 5 ( x ) 6 ( x ) 7 ( x n
n

) 0 ( x ) 7 ( x ) 1 ( x ) 4 ( x ) 6 ( x ) 2 ( x ) 3 ( x ) 5 ( x
Copyright 2005. Shi Ping CUC
The distance between two nodes in a butterfly
For there are L stages
L
N 2 =
Stage Distance
stage 1 1
stage 2 2
stage 3 4
stage L

1
2
L
return
Copyright 2005. Shi Ping CUC
Radix-2 DIF- FFT Algorithm
How does DIF-FFT operate
Copyright 2005. Shi Ping CUC
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
0 1 2 3 0 1 2 3
butterfly computation
0 1 2 3 0 1 2 3
butterfly computation butterfly computation
0 1 0 1 0 1 0 1
butterfly butterfly butterfly butterfly
0 4 2 6 1 5 3 7
0 1 0 1 0 1 0 1
) (n x
) (k X
Copyright 2005. Shi Ping CUC
Radix-2 DIF- FFT Algorithm
Algorithm principle
To divide N-point sequence x(n) into two N/2-point
sequence
1
2
0 ),
2
(
1
2
0 ), (
s s +
s s
N
n
N
n x
N
n n x The former N/2-point
The latter N/2-point
Copyright 2005. Shi Ping CUC
To compute the DFT of N-point sequence x(n)
) 1 , 1 , 0 ( )
2
( ) 1 ( ) (
)
2
( ) (
)
2
( ) (
) ( ) ( ) ( ) (
1
2
0
1
2
0
2
1
2
0
)
2
(
1
2
0
1
2
1
2
0
1
0
=
(

+ + =
(

+ + =
+ + =
+ = =

=
+

=
N k W
N
n x n x
W
N
n x W n x
W
N
n x W n x
W n x W n x W n x k X
N
n
nk
N
k
N
n
nk
N
k
N
N
N
n
k
N
n
N
N
n
nk
N
N
N
n
nk
N
N
n
nk
N
N
n
nk
N

Copyright 2005. Shi Ping CUC


Radix-2 DIF- FFT Algorithm
To separate the even and odd numbered samples
of X(k)
) 1
2
, , 1 , 0 ( , 1 2 , 2 let = + = =
N
r r k r k
) 1
2
, 1 , 0 ( )
2
( ) ( ) 2 (
1
2
0
2
=
(

+ + =

=
N
r W
N
n x n x r X
N
n
nr
N

) 1
2
, 1 , 0 ( )
2
( ) ( ) 1 2 (
1
2
0
2
=
(

+ = +

=
N
r W W
N
n x n x r X
N
n
nr
N
n
N

Copyright 2005. Shi Ping CUC
Radix-2 DIF- FFT Algorithm
) 1
2
, 1 , 0 ( ) ( ) 1 2 (
) 1
2
, 1 , 0 ( ) ( ) 2 (
1
2
0
2
2
1
2
0
2
1
= = +
= =

=
N
r W n x r X
N
r W n x r X
N
n
nr
N
N
n
nr
N

1
2
, 1 , 0
)
2
( ) ( ) (
)
2
( ) ( ) (
let
2
1
=

+ =
+ + =
N
n
W
N
n x n x n x
N
n x n x n x
n
N

Copyright 2005. Shi Ping CUC


Radix-2 DIF- FFT Algorithm
) (n x
)
2
(
N
n x +
n
N
W
1
)
2
( ) ( ) (
1
N
n x n x n x + + =
n
N
W
N
n x n x n x )
2
( ) ( ) (
2
(

+ =
Butterfly computation flow graph
There are 1 complex multiplication and 2 complex additions
Copyright 2005. Shi Ping CUC
for
3
2 = N
N/2-
point
DFT
N/2-
point
DFT
) 0 ( X
) 2 ( X
) 4 ( X
) 6 ( X
) 1 ( X
) 3 ( X
) 5 ( X
) 7 ( X
) 0 (
1
x
) 1 (
1
x
) 2 (
1
x
) 3 (
1
x
) 0 ( x
) 1 ( x
) 2 ( x
) 3 ( x
) 4 ( x
) 5 ( x
) 6 ( x
) 7 ( x
) 3 (
2
x
3
N
W
1
) 2 (
2
x
2
N
W
1
) 1 (
2
x
1
N
W
1
) 0 (
2
x
0
N
W
1
Copyright 2005. Shi Ping CUC
for
3
2 = N
) 0 ( x
) 2 ( x
) 1 ( x
) 3 ( x
) 4 ( x
) 6 ( x
) 5 ( x
) 7 ( x
) 0 ( X
) 4 ( X
) 2 ( X
) 6 ( X
) 1 ( X
) 5 ( X
) 3 ( X
) 7 ( X
1
1
1
1
0
N
W
1
N
W
2
N
W
3
N
W
1
1
1
1
1
0
N
W
1
0
N
W
0
N
W
2
N
W
1
0
N
W
1
0
N
W
0
N
W
2
N
W
Copyright 2005. Shi Ping CUC
Radix-2 DIF- FFT Algorithm
The comparison of DIT and DIF
The order of samples
DIT-FFT: the input is bit- reversed order and the output
is natural order
DIF-FFT: the input is natural order and the output is bit-
reversed order
The butterfly computation
DIT-FFT: multiplication is done before additions
DIF-FFT: multiplication is done after additions
Copyright 2005. Shi Ping CUC
Radix-2 DIF- FFT Algorithm
Both DIT-FFT and DIF-FFT have the identical
computation complexity. i.e. for , there are
total L stages and each has N/2 butterfly
computation. Each butterfly computation has 1
multiplication and 2 additions.
L
N 2 =
Both DIT-FFT and DIF-FFT have the characteristic
of in-place computation.
A DIT-FFT flow graph can be transposed to a DIF-
FFT flow graph and vice versa.
return
Copyright 2005. Shi Ping CUC
The fast algorithm of IDFT
Algorithm 1

=
=
=
1
0
1
0
) ( ) (
1
) (
) ( ) ( ) (
N
k
N
nk
N
N
n
N
nk
N
n R W k X
N
n x
k R W n x k X
In an FFT flow graph of DFT:
1/2 by multiplied is stage each

;
) ( ) ( ); ( ) (
1 1


N N
W W
n x k X k X n x
L
N 2 =
Copyright 2005. Shi Ping CUC
The fast algorithm of IDFT
Algorithm 2
) N- , , (k k X
N
W k X
N
W k X
N
n x
N
k
nk
N
N
k
nk
N
1 1 0 )] ( [ DFT
1
) (
1
) (
1
) (
1
0
1
0
= =
(

=
=
- -
-

=
-

return
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Mixed radix: the sequence length N satisfied:
M and L are integers.
ML N =
Algorithm principle
The input and output can be represented as 2-D arrays

=
=
+ =
index column
index row
,
1 , 1 , 0
1 , 1 , 0
0
1
0 1
M n
L n
n Mn n

=
=
+ =
index row
index column
,
1 , 1 , 0
1 , 1 , 0
0
1
0 1
L k
M k
k Lk k

Copyright 2005. Shi Ping CUC


Mixed Radix FFT Algorithm
) 3 4 ( 12 3 4 = = = = ,L M N For example:

=
=
= + + = + =
3 , 2 , 1 , 0
2 , 1 , 0
} 11 , 2 , 1 , 0 { } 8 , 4 , { 4
0
1
0 0 0 0 1
n
n
n n n n n n


0 1 2 3
0 x(0) x(1) x(2) x(3)
1 x(4) x(5) x(6) x(7)
2 x(8) x(9) x(10) x(11)
0
n
1
n
Copyright 2005. Shi Ping CUC

=
+ +

=
)
`

=
=
=
+ =
= = + =
1
0
1
0
0 1
1
0
1
0
0 1
1
0
1
0
0 1
1
0
1
0
) )( (
0 1
1
0
0 1 0 1
0
1 0 0 0
1
0 1
0 1
1 0 0 0 0 1
0 1
1 0 0 0 0 1 1 1
0 1
0 1 0 1
) , (
) , (
) , (
) (
) ( ) , ( ) ( ) (
M
n
k n
M
k n
N
L
n
k n
L
M
n
L
n
k Ln
N
k n
N
k Mn
N
M
n
L
n
k Ln
N
k n
N
k Mn
N
k MLn
N
M
n
L
n
k Lk n Mn
N
N
n
nk
N
W W W n n x
W W W n n x
W W W W n n x
W n Mn x
W n x k k X k Lk X k X
Mixed Radix FFT Algorithm
Copyright 2005. Shi Ping CUC
) 1 , , 1 , 0 ; 1 , , 1 , 0 (
) , ( ) , (
) , (
) , (
) , ( ) ( ) (
1 0
1 0 2
1
0
0 0 1
1
0
0 0 1
1
0
1
0
0 1
0 1 0 1
0
1 0
0
1 0 0 0
0
1 0 0 0
1
0 1
= =
=
'
=
=

=
= + =

=
M k L k
k k X W n k X
W W n k X
W W W n n x
k k X k Lk X k X
M
n
k n
M
M
n
k n
M
k n
N
M
n
k n
M
k n
N
L
n
k n
L

Mixed Radix FFT Algorithm
Copyright 2005. Shi Ping CUC
Computation procedures
Store the input signal row-wise
Mixed Radix FFT Algorithm
) 3 4 ( , 3 4 = = = ,L M N
suppose
) 3 , 2 , 1 , 0 ; 2 , 1 , 0 ( 4
0 1 0 1
= = + = n n n n n
0 1 2 3
0 x(0) x(1) x(2) x(3)
1 x(4) x(5) x(6) x(7)
2 x(8) x(9) x(10) x(11)
0
n
1
n
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Compute the L-point DFT at each column

=
=
1
0
0 1 0 0 1
1
0 1
) , ( ) , (
L
n
k n
L
W n n x n k X
0 1 2 3
0 x(0) x(1) x(2) x(3)
1 x(4) x(5) x(6) x(7)
2 x(8) x(9) x(10) x(11)
0
n
1
n
0 1 2 3
0 X
1
X
1
X
1
X
1
1 X
1
X
1
X
1
X
1
2 X
1
X
1
X
1
X
1
0
n
0
k
) , (
0 1
n n x ) , (
0 0 1
n k X
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Multiply the resulting array by twiddle factor
0 0
k n
N
W
0 1 2 3
0 X
1
X
1
X
1
X
1
1 X
1
X
1
X
1
X
1
2 X
1
X
1
X
1
X
1
0
n
0
k
) , (
0 0 1
n k X
0 0
) , ( ) , (
0 0 1 0 0 1
k n
N
W n k X n k X =
'
0 1 2 3
0 X
1
X
1
X
1
X
1

1 X
1
X
1
X
1
X
1

2 X
1
X
1
X
1
X
1

) , (
0 0 1
n k X
'
0
n
0
k
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Compute the M-point DFT of each row
0 1 2 3
0 X
1
X
1
X
1
X
1

1 X
1
X
1
X
1
X
1

2 X
1
X
1
X
1
X
1

) , (
0 0 1
n k X
'

=
'
=
1
0
0 0 1 1 0 2
0
1 0
) , ( ) , (
M
n
k n
M
W n k X k k X
0
n
0
k
0 1 2 3
0 X
2
X
2
X
2
X
2
1 X
2
X
2
X
2
X
2
2 X
2
X
2
X
2
X
2
) , (
1 0 2
k k X
1
k
0
k
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Read the resulting array column-wise
0 1 2 3
0 X
2
X
2
X
2
X
2
1 X
2
X
2
X
2
X
2
2 X
2
X
2
X
2
X
2
) , (
1 0 2
k k X
1
k
0
k

=
=
+ =
2 , 1 , 0
3 , 2 , 1 , 0
0
1
0 1
k
k
k Lk k
) (
) , ( ) (
0 1
0 1
k Lk X
k k X k X
+ =
=
) 0 ( X
) 1 ( X
) 3 ( X
) 5 ( X ) 2 ( X
) 4 ( X
) 6 ( X
) 7 ( X
) 8 ( X
) 9 ( X
) 10 ( X
) 11 ( X
3 4 = = ,L M
Copyright 2005. Shi Ping CUC
0
1
2
3
4
5
6
7
8
9
10
11
) , (
) (
0 1
n n x
n x
3
-
p
o
i
n
t

D
F
T

3
-
p
o
i
n
t

D
F
T

3
-
p
o
i
n
t

D
F
T

3
-
p
o
i
n
t

D
F
T

0 0
) , (
0 0 1
k n
N
W n k X
0
3
6
9
1
4
7
10
2
5
8
11
) , (
) (
1 0 2
k k X
k X
Copyright 2005. Shi Ping CUC
) (k X
) (n x
3-point
DFT
n
0
=0
3-point
DFT
n
0
=1
3-point
DFT
n
0
=2
3-point
DFT
n
0
=3
0 0
) , (
0 0 1
k n
N
W k n X
n
0
4
8
1
5
9
2
6
10
11
3
7
1
n
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
12
W
1
12
W
2
12
W
0
12
W
2
12
W
4
12
W
0
12
W
3
12
W
6
12
W
4-point
DFT
k
0
=0
0
k
0
1
2
0
12
W
0
12
W
0
12
W
4-point
DFT
k
0
=1
4-point
DFT
k
0
=2
1
k
0
1
2
3
0
1
2
3
0
1
2
3
k
0
3
6
9
1
4
7
10
11
5
8
2
k
0
3
6
9
1
4
7
10
2
5
8
11
Copyright 2005. Shi Ping CUC
4
3
2
3
2
0
2
3
2
3
1
3
2
0
3
2
0
2
0
3
) 2 ( ) 1 ( ) 0 ( ) ( ) 2 (
) 2 ( ) 1 ( ) 0 ( ) ( ) 1 (
) 2 ( ) 1 ( ) 0 ( ) ( ) 0 (
) ( ) (
W x W x x W n x X
W x W x x W n x X
x x x n x X
W n x k X
n
n
n
n
n
n
nk
+ + = =
+ + = =
+ + = =
=
=
=
=
=
) 0 ( X
) 1 ( X
) 2 ( X
) 0 ( x
) 1 ( x
) 2 ( x
0
3
0
3
0
3
W W W
2
3
1
3
0
3
W W W
4
3
2
3
0
3
W W W
3
-
p
o
i
n
t

D
F
T

Copyright 2005. Shi Ping CUC
9
4
6
4
3
4
3
0
3
4
6
4
4
4
2
4
3
0
2
4
3
4
2
4
1
4
3
0
4
3
0
) 3 ( ) 2 ( ) 1 ( ) 0 ( ) ( ) 3 (
) 3 ( ) 2 ( ) 1 ( ) 0 ( ) ( ) 2 (
) 3 ( ) 2 ( ) 1 ( ) 0 ( ) ( ) 1 (
) 3 ( ) 2 ( ) 1 ( ) 0 ( ) ( ) 0 (
W x W x W x x W n x X
W x W x W x x W n x X
W x W x W x x W n x X
x x x x n x X
n
n
n
n
n
n
n
+ + + = =
+ + + = =
+ + + = =
+ + + = =

=
=
=
=
0
4
0
4
0
4
0
4
W W W W
3
4
2
4
1
4
0
4
W W W W
4
-
p
o
i
n
t

D
F
T

) 1 ( X
) 0 ( X
) 2 ( X
) 3 ( X
) 0 ( x
) 1 ( x
) 2 ( x
) 3 ( x
6
4
4
4
2
4
0
4
W W W W
9
4
6
4
3
4
0
4
W W W W
Copyright 2005. Shi Ping CUC
Another alternative computation procedures:
Store the input signal column-wise
Compute the M-point DFT at each row
Multiply the resulting array by the twiddle factor
Compute the L-point DFT of each column
Read the resulting array row-wise
Mixed Radix FFT Algorithm
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Computation complexity
M L-point DFT
The number of complex multiplications is
The number of complex additions is
ML N =
Multiplication by twiddle factor
L M-point DFT
The number of complex multiplications is
The number of complex additions is
2
ML
) 1 ( L ML
2
LM
) 1 ( M LM
N
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
Mixed Radix FFT
Complex multiplications
Complex additions
Direct computation of the DFT
Complex multiplications
Complex additions
) 1 (
2 2
+ + = + + L M N LM N ML
) 2 ( ) 1 ( ) 1 ( + = + L M N M ML L ML
2
N
) 1 ( N N
1 ) 1 (
2
+ +
=
+ +
=

L M
N
L M N
N
R
2
1
) 2 (
) 1 (
+

=
+

=
+
L M
N
L M N
N N
R
Copyright 2005. Shi Ping CUC
Mixed Radix FFT Algorithm
L
N N N N
2 1
=
For
Mixed Radix FFT
Complex multiplications


Complex additions

(

+ |
.
|

\
|
=
1
1
L N N
L
i
i

(

|
.
|

\
|
=
L N N
L
i
i
1
i
N is a prime number, but 2 =
i
N
return
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
Suppose that we wish to compute the value of the z-
transform of x(n) at a set of points {z
k
, k=0,1,,M-1}
and these points {z
k
} fall on an arc, then:
Algorithm principle
) 1 0 ( ) ( ) (
1
0
s s =

=
M k z n x z X
n
N
n
k
k
0 0
0 0
, ,
| u j j k
k
e W W e A A AW z

= = =
) (
0 0 0 0
0 0 0 0
) )( (
| u | u k j k jk k j
k
e W A e W e A z
+
= =
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
) ( 1
0 0 1
0 0
| u +
=
j
e W A z
0
0 0
u j
e A z =
) (
0 0
0 0
| u k j k
k
e W A z
+
=
) 2 ( 2
0 0 2
0 0
| u +
=
j
e W A z

) Re(z
) Im( z
Unit
circle

] ) 1 ( [ ) 1 (
0 0 1
0 0
| u +

=
M j M
M
e W A z
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
) (
0 0
0 0
| u k j k
k
e W A z
+
=
If W
0
>1, the points fall on a contour
that spirals toward the origin;
If W
0
<1, the points fall on a contour
that spirals away from the origin;
will determined the position
of
is the frequency increment in
radians between two neighboring
samples
0 0
,u A
0
z
0
|
) Re(z
) Im( z
0
u
0
A
0
z
0
|
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
) (
0 0
0 0
| u k j k
k
e W A z
+
=
) Re(z
) Im( z
)
2
, 1 (
) 0 , 1 ( 1

0 0
2
0
0 0 0
0
0
N
W
e e W W
A e A A
N M if
N
j
j
j
t
|
u
t
|
u
= =
= =
= = = =
=

Chirp-z transform DFT


Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
) 1 0 ( ) (
) (
) ( ) ( ) (
1
0
2
) (
2 2
1
0
2 2
) (
2
1
0
1
0
2
2 2
2
2
2
s s
(

=
=
= =

M k W W A n x W
W W W A n x
W A n x z n x z X
N
n
n k
n
n
k
N
n
k
n k
n
n
N
n
nk n
N
n
n
k k
] ) ( [
2
1
let
2 2 2
n k k n nk + =
) (n g ) ( n k h
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
2
2
2
2
) (
) 1 0 ( ) ( ) ( let
n
n
n
W n h
N n W A n x n g

=
s s =
) 1 0 ( ] ) ( ) ( [
) ( ) ( ) (
2
1
0
2
2
2
s s - =
=

=
M k n h n g W
n k h n g W z X
k
N
n
k
k
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
Flow graph
h(n)
) (n x
) 1 0 ( s s N n
2
2
n
n
W A

) (n g
) (k f
2
2
k
W
) (
k
z X
) 1 0 ( s s M k
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
2 0
2
2 2
0
) ( , 1
n j
n
e W n h W if
|
= = =

is a complex exponential sequence

The phase

The frequency in radians
) (n h
2
0
2
| n
0
| n
The frequency of increases linearly with time.
Such signals are used in radar systems and are
called chirp-z signals.
) (n h
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
Implementation procedures
)} 2 ( ~ ) 1 ( {
2 2 : ) ( ) ( ) (
)} 1 ( ~ 1) - {-(N 1 - : ) (
) 1 ~ 0 ( : ) ( ) (
) 1 ~ 0 ( : ) (
2
2
+
+ - =
+
=

N M N
M N n h n g k f
M N M n h
N N W A n x n g
N N n x
n
n
If we want to compute this linear convolution with circular
convolution, the period L should be satisfied
1 + > M N L
m
L 2 =
Copyright 2005. Shi Ping CUC
2N+M-2
0
N+M-2 k -(N-1)
) (k f
M-1
N
0 N-1 n
) (n g
M
N+M-1
0
M-1 n -(N-1)
) (n h
N-1 N-1
Copyright 2005. Shi Ping CUC
2
2
n
n
W A

L-point
DFT
) (n g
Implementation scheme
) (n x
1 0 s s N n
) (r G
) (r H
L-point
DFT
) (n h
L
) (
k
z X
1 0 s s M k
) (k f
L-point
IDFT
) (r F
2
2
k
W
) ( )) (( ) ( n R n h n h
L L L
=
) (n h
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
Computation complexity
The number of complex multiplications
N N n W A n x n g
n
n
: ) 1 0 ( ) ( ) (
2
2
s s =

L
L
n g r G
2
log
2
: )] ( [ DFT ) ( =
L
L
n h r H
L 2
log
2
: )] ( [ DFT ) ( =
L r H r G r F : ) ( ) ( ) ( =
L
L
r F k f
2
log
2
: )] ( [ IDFT ) ( =
M M k W k f z X
k
k
: ) 1 0 ( ) ( ) (
2
2
s s =
Copyright 2005. Shi Ping CUC
Chirp-z Transform Algorithm
The total number of complex multiplications
M L N L L + + + 5 log
2
3
2
N W n h
n
2 : ) (
2
2

=
N W A
n
n
2 :
2
2

return
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Efficient computation of the DFT of two N-point real
sequence
Suppose that and are two real-valued sequences
of length N, and let be a complex-valued sequence
defined as
) (n x
) (
1
n x ) (
2
n x
) 1 0 ( ) ( ) ( ) (
2 1
s s + = N n n jx n x n x
) 1 0 ( ) ( ) ( )] ( DFT[ ) (
2 1
s s + = = N k k jX k X n x k X
)] ( )) (( ) ( [
2
1
) ( )] ( DFT[ ) (
*
1 1
k R k N X k X k X n x k X
N N ep
+ = = =
)] ( )) (( ) ( [
2
1
) (
1
)] ( DFT[ ) (
*
2 2
k R k N X k X
j
k X
j
n x k X
N N op
= = =
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Efficient computation of the DFT of a 2N-point real
sequence
) 1 0 ( ) ( ) ( ) (
2 1
s s + = N n n jx n x n x
is a real-valued sequences of length 2N
) (n g
Subdivide into two N-point real-valued sequences
) (n g
Let be the N-point complex-valued sequence
) (n x
)] ( )) (( ) ( [
2
1
)] ( DFT[ ) (
1 1
k R k N X k X n x k X
N N
+ = =
-
)] ( )) (( ) ( [
2
1
)] ( DFT[ ) (
2 2
k R k N X k X
j
n x k X
N N
= =
-
) 2 ( ) (
1
n g n x = ) 1 2 ( ) (
2
+ = n g n x
) 1 0 ( s s N n
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
) 1 0 ( ) ( ) (
) ( ) (
) 1 2 ( ) 2 (
) 1 2 ( ) 2 ( ) ( ) (
2 2 1
1
0
2 2
1
0
1
1
0
2
2 2
1
0
2
2
1
0
) 1 2 (
2
1
0
2
2
1 2
0
2
s s + =
+ =
+ + =
+ + = =

=
+

=
N k k X W k X
W n x W W n x
W n g W W n g
W n g W n g W n g k G
k
N
N
n
nk
N
k
N
N
n
nk
N
N
n
nk
N
k
N
N
n
nk
N
N
n
k n
N
N
n
nk
N
N
n
nk
N
) 1 0 ( ) ( ) ( ) (
2 2 1
s s = + N k k X W k X N k G
k
N
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Computation complexity
An N-point DFT and 2-stage butterfly computations
if computing the 2N-point real sequences directly
complex multiplications N N 2 log
2
complex additions
N N 2 log 2
2
complex multiplications N N
N
2 log
2
2
+
complex additions N N N 4 log
2
+
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
FFT algorithms for linear convolution
Linear convolution is a key operation in many signal
processing applications
Since a DFT can be efficiently implemented using FFT
algorithms, it is of interest to develop methods for the
implementation of linear convolution using the DFT
Let x(n) and h(n) be two sequences of length L and M,
respectively. Denote N = L+M-1

s s
s s
=
'
1 , 0
1 0 ), (
) (
N n L
L n n x
n x

s s
s s
=
'
1 , 0
1 0 ), (
) (
N n M
M n n h
n h
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Implementation scheme
) ( ) ( ) ( ) ( ) ( n h n x n h n x n y = - =
N
N-point
DFT
N-point
DFT
N-point
IDFT
Zero-padding
(N-L)
) (n x
Zero-padding
(N-M)
) (n h
) (n x
'
) (n h
'
) (n y
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
If x(n) is an infinite length sequence (or a finite length
sequence of length much greater than M ), then
We can first segment x(n) into a set of contiguous
finite-length subsequences x
i
(n) of length L each:
, 1 , 0
otherwise , 0
1 ) 1 ( ), (
) ( =

+ s s
= i
L i n iL n x
n x
i
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
+ - + - + - =
- = - =

=
) ( ) ( ) ( ) ( ) ( ) (
) ( ) ( ) ( ) ( ) (
2 1 0
0
n h n x n h n x n h n x
n h n x n h n x n y
i
i

=
=
0
) ( ) (
i
i
n x n x
There are two methods for computing these short
convolutions using DFT and fitting the outputs together
Overlap-add method
Overlap-save method
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Overlap-add method
, 1 , 0 ) ( ) ( ) ( = = i n h n x n y
i i
N
Each of these short convolutions can be implemented using
the DFT-based method discussed earlier, where now the
DFTs (and the IDFT) are computed on the basis of N points.
1 2 + > = M L N
m
The results of the short linear convolutions overlap and the
overlapped portions are added to get the correct final result.
+ + = =

=
) ( ) ( ) ( ) (
1 0
0
n y n y n y n y
i
i
Copyright 2005. Shi Ping CUC
L L L
) (n x
) (
0
n x 0
) (
1
n x
) (
2
n x
L
0
0
L M-1
N
) (
0
n y
) (
1
n y
) (
2
n y
) (n y
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
Overlap-save method
) 2 ( , 1
m
N M L N = + >
Each data block consists of the last M-1 data
points of the previous data block followed by L
new data points to form a data sequence of length N.
The first data block consists of M-1 zeros followed
by L data points.
An N-point DFT is computed for each data block.
) (n x
i
'
) (
1
n x
i
'
) (
0
n x
'
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
The first M-1 points of are corrupted by aliasing
and must be discarded.
To avoid loss of data due to aliasing, the last M-1 points
of each data block are saved and these points become
the first M-1 data points of the subsequent data block.
) (n y
i
'
) ( ) ( ) ( n h n x n y
i i
'
=
' N

s s
'
=
otherwise

, 0
1 1 ), (
) (
N n M n y
n y
i
i

=
+ =
0
)] 1 ( [ ) (
i
i
M N i n y n y
Copyright 2005. Shi Ping CUC
L
) ( )) (( ) ( ) ( ) ( n R n y n h n x n y
N N i i i
' '
=
'
=
'

N
1 ) ( ) ( ) ( + -
'
=
' '
M N n h n x n y
i i

) (n y
i
'
N+M-1
) (n y
i
' '
N N
N+M-1 N+M-1
N+M-1
M-1 M-1
L
) (n y
i
Copyright 2005. Shi Ping CUC
) (n x
0
M-1
M-1
) (
0
n x
'
) (
1
n x
'
) (
2
n x
'
M-1
) (
0
n y
'
) (
1
n y
'
) (
2
n y
'
) (n y
) (
0
n y
) (
1
n y
) (
2
n y
N
M-1
L L L L
) (
2
n x ) (
1
n x ) (
0
n x
) (
3
n x
N
Copyright 2005. Shi Ping CUC
Applications of FFT Algorithms
FFT algorithms for linear correlation
) 2 ( , 1
m
N M L N = + >
) (n x L-point sequence ) (n y M-point sequence
)] ( [ ) ( n x k X DFT = N-point FFT
)] ( [ ) ( n y k Y DFT = N-point FFT
N multiplication ) ( ) ( ) ( k Y k X k R
xy
-
=
N-point IFFT )] ( [ ) ( k R n r
xy xy
IDFT =

=
-
+ =
1
0
) ( ) ( ) (
M
m
xy
m y m n x n r
Linear correlation
return
Copyright 2005. Shi Ping CUC
) (n g 8-point real-valued sequence (2N=8)
) (n x 4-point complex-valued sequence (N=4)
) (k X
4-
point
DFT
) (n x
) ( )) (( k R k N X
N N

-
return
2 / 1
2 / 1
2 / 1
2 / 1
1
j 2 / 1
1
j 2 / 1
1
j 2 / 1
1
j 2 / 1
) (
2
k X
) (
1
k X
0
8
W
1
8
W
2
8
W
3
8
W
) 0 ( G
) 1 ( G
) 2 ( G
) 3 ( G
1
) 4 ( G
1
) 5 ( G
1
) 6 ( G
1
) 7 ( G

You might also like