Vous êtes sur la page 1sur 38

Advanced

Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Advanced Digital Signal Processing
Background
Lecture 4: The Discrete Fourier Transform ... III
FFT
Algorithms The Fast Fourier Transform (FFT)
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa- Dr. Ebtihal H. G. Yousif
tion

Decimation-
in-Frequency

Dec 2016

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
1 / 18
Outline

Advanced
1 Preliminaries
Digital Signal
Processing
Background
Dr. Ebtihal
2 FFT Algorithms
H. G. Yousif
Radix-2 FFT
Preliminaries Decimation-in-Time
Background
3 Flow Graph Representation
FFT
Algorithms 4 Decimation-in-Frequency
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
2 / 18
Background

Advanced
Digital Signal
Processing

Dr. Ebtihal
The DFT is the only transform that is discrete in both the
H. G. Yousif
time and the frequency domains, and is defined for
Preliminaries finite-duration sequences.
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
3 / 18
Background

Advanced
Digital Signal
Processing

Dr. Ebtihal
The DFT is the only transform that is discrete in both the
H. G. Yousif
time and the frequency domains, and is defined for
Preliminaries finite-duration sequences.
Background

FFT
Although it is a computable transform, the straightforward
Algorithms
Radix-2 FFT
implementation of its formulas is very inefficient especially
Decimation-in-
Time
when the length of the sequence is large.
Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
3 / 18
Background

Advanced
Digital Signal
Processing

Dr. Ebtihal
The DFT is the only transform that is discrete in both the
H. G. Yousif
time and the frequency domains, and is defined for
Preliminaries finite-duration sequences.
Background

FFT
Although it is a computable transform, the straightforward
Algorithms
Radix-2 FFT
implementation of its formulas is very inefficient especially
Decimation-in-
Time
when the length of the sequence is large.
Flow Graph
Representa-
In 1965 Cooley and Tukey [1] showed a procedure to
tion substantially reduce the amount of computations involved
Decimation-
in-Frequency
in the DFT.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
3 / 18
Background

Advanced
Digital Signal
Processing

Dr. Ebtihal
The DFT is the only transform that is discrete in both the
H. G. Yousif
time and the frequency domains, and is defined for
Preliminaries finite-duration sequences.
Background

FFT
Although it is a computable transform, the straightforward
Algorithms
Radix-2 FFT
implementation of its formulas is very inefficient especially
Decimation-in-
Time
when the length of the sequence is large.
Flow Graph
Representa-
In 1965 Cooley and Tukey [1] showed a procedure to
tion substantially reduce the amount of computations involved
Decimation-
in-Frequency
in the DFT.
This led to the development of other efficient algorithms,
known as fast Fourier transform (FFT) algorithms.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
3 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
−1
Flow Graph To obtain an entire DFT sequence {X(k)}N
k=0 we need
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
−1
Flow Graph To obtain an entire DFT sequence {X(k)}N
k=0 we need
Representa-
tion N 2 multiplications
Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
−1
Flow Graph To obtain an entire DFT sequence {X(k)}N
k=0 we need
Representa-
tion N 2 multiplications
Decimation- N (N − 1) ≈ N 2 additions
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
−1
Flow Graph To obtain an entire DFT sequence {X(k)}N
k=0 we need
Representa-
tion N 2 multiplications
Decimation- N (N − 1) ≈ N 2 additions
in-Frequency
Furthermore, we need to calculate and store N 2 roots of
unity

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Number of Computations

Advanced
Digital Signal Let us recall the DFT formula
Processing


N −1
Dr. Ebtihal
H. G. Yousif X(k) = x(n)WNnk , 0 ≤ k, ≤ N − 1
Preliminaries n=0
Background

FFT
To obtain one sample of DFT we need:
Algorithms N complex multiplications
Radix-2 FFT
Decimation-in-
Time
N − 1 complex additions
−1
Flow Graph To obtain an entire DFT sequence {X(k)}N
k=0 we need
Representa-
tion N 2 multiplications
Decimation- N (N − 1) ≈ N 2 additions
in-Frequency
Furthermore, we need to calculate and store N 2 roots of
unity
Hence, the calculation of a DFT sequence depends on N 2
(quadratically), i.e, CN = o(N 2 ) . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
4 / 18
Goals of Efficient DFT Computations

Advanced
Digital Signal
Processing

Dr. Ebtihal In an efficiently designed algorithm the number of


H. G. Yousif
computations should be constant per data sample, and
Preliminaries therefore the total number of computations should be
Background

FFT
linear with respect to N
Algorithms
Radix-2 FFT The quadratic dependence on N can be reduced by
Decimation-in-
Time realizing that most of the computations can be eliminated
Flow Graph
Representa-
using the periodicity and the symmetry properties, i.e,
tion
k(n+N ) (k+N )n
Decimation-
in-Frequency
WNkn = WN = WN
kn+N/2
WN = −WNkn

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
5 / 18
FFT Algorithms

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries Divide and conquer approach: break N -point DFT, where


Background
N = N1 N2 into 2 (or more) shorter DFTs and combine
FFT
Algorithms the results
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
6 / 18
FFT Algorithms

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries Divide and conquer approach: break N -point DFT, where


Background
N = N1 N2 into 2 (or more) shorter DFTs and combine
FFT
Algorithms the results
Radix-2 FFT
Decimation-in-
Time
Decimation-in-Time
Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
6 / 18
FFT Algorithms

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries Divide and conquer approach: break N -point DFT, where


Background
N = N1 N2 into 2 (or more) shorter DFTs and combine
FFT
Algorithms the results
Radix-2 FFT
Decimation-in-
Time
Decimation-in-Time
Flow Graph
Representa-
Decimation-in-Frequency
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
6 / 18
FFT Algorithms

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries Divide and conquer approach: break N -point DFT, where


Background
N = N1 N2 into 2 (or more) shorter DFTs and combine
FFT
Algorithms the results
Radix-2 FFT
Decimation-in-
Time
Decimation-in-Time
Flow Graph
Representa-
Decimation-in-Frequency
tion
Radix-r Algorithms
Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
6 / 18
Radix-2 FFT

Advanced
Digital Signal
Processing The radix-2 FFT algorithms are used for data vectors of
Dr. Ebtihal lengths N = 2K . They proceed by dividing the DFT into
H. G. Yousif
two DFTs of length N/2 each, and iterating.
Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
7 / 18
Radix-2 FFT

Advanced
Digital Signal
Processing The radix-2 FFT algorithms are used for data vectors of
Dr. Ebtihal lengths N = 2K . They proceed by dividing the DFT into
H. G. Yousif
two DFTs of length N/2 each, and iterating.
Preliminaries
Background There are several types of radix-2 FFT algorithms, the
FFT most common being the decimation-in-time (DIT) and the
Algorithms
Radix-2 FFT decimation-in-frequency (DIF).
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
7 / 18
Radix-2 FFT

Advanced
Digital Signal
Processing The radix-2 FFT algorithms are used for data vectors of
Dr. Ebtihal lengths N = 2K . They proceed by dividing the DFT into
H. G. Yousif
two DFTs of length N/2 each, and iterating.
Preliminaries
Background There are several types of radix-2 FFT algorithms, the
FFT most common being the decimation-in-time (DIT) and the
Algorithms
Radix-2 FFT decimation-in-frequency (DIF).
Decimation-in-
Time
Radix-2 FFT algorithms are based on two properties of
Flow Graph
Representa- WN
tion

Decimation-
in-Frequency WN2nk = WN/2
nk

k+N/2
WN = −WNk

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
7 / 18
Radix-2 FFT
Decimation-in-Time FFT

Advanced
Digital Signal
The radix-2 FFT algorithms is based on splitting the sum
Processing into two parts
Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
8 / 18
Radix-2 FFT
Decimation-in-Time FFT

Advanced
Digital Signal
The radix-2 FFT algorithms is based on splitting the sum
Processing into two parts
Dr. Ebtihal one part for the even-indexed values x0 (2n)
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
8 / 18
Radix-2 FFT
Decimation-in-Time FFT

Advanced
Digital Signal
The radix-2 FFT algorithms is based on splitting the sum
Processing into two parts
Dr. Ebtihal one part for the even-indexed values x0 (2n)
H. G. Yousif
one part for the odd-indexed values x1 (2n + 1)
Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
8 / 18
Radix-2 FFT
Decimation-in-Time FFT

Advanced
Digital Signal
The radix-2 FFT algorithms is based on splitting the sum
Processing into two parts
Dr. Ebtihal one part for the even-indexed values x0 (2n)
H. G. Yousif
one part for the odd-indexed values x1 (2n + 1)
Preliminaries n = 0, 1, . . . , N/2
Background

FFT
Algorithms ∑
N/2−1
−nk
Radix-2 FFT X0 (k) = x0 (n)WN/2 (4.1)
Decimation-in-
Time n=0
Flow Graph
Representa- ∑
N/2−1
−nk
tion X1 (k) = x1 (n)WN/2 (4.2)
Decimation- n=0
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
8 / 18
Radix-2 FFT
Decimation-in-Time FFT

Advanced
Digital Signal
The radix-2 FFT algorithms is based on splitting the sum
Processing into two parts
Dr. Ebtihal one part for the even-indexed values x0 (2n)
H. G. Yousif
one part for the odd-indexed values x1 (2n + 1)
Preliminaries n = 0, 1, . . . , N/2
Background

FFT
Algorithms ∑
N/2−1
−nk
Radix-2 FFT X0 (k) = x0 (n)WN/2 (4.1)
Decimation-in-
Time n=0
Flow Graph
Representa- ∑
N/2−1
−nk
tion X1 (k) = x1 (n)WN/2 (4.2)
Decimation- n=0
in-Frequency

The total DFT is the sum of the even & odd sums

X(k) = X0 (k) + WN−k X1 (k) (4.3)


. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
8 / 18
Radix-2 FFT
Decimation-in-Time FFT ... II

Advanced
Digital Signal The signal x0 (n) and x1 (n) are N/2 signals. Therefore,
Processing
for k > N/2, periodicity is used
Dr. Ebtihal
H. G. Yousif X0 (k) = X0 (k + N/2), X1 (k) = X1 (k + N/2)
Preliminaries
Background
Example: when N = 2, then x0 (n) and x1 (n) have length
FFT
of N/2 = 4. The total DFT is obtained as
Algorithms
Radix-2 FFT X(0) = X0 (0) + W80 X1 (0)
X(1) = X0 (1) + W8−1 X1 (1)
Decimation-in-
Time

Flow Graph
Representa- X(2) = X0 (2) + W8−2 X1 (2)
tion

Decimation- X(3) = X0 (3) + W8−3 X1 (3)


X(4) = X0 (4) + W8−4 X1 (4)
in-Frequency

X(5) = X0 (5) + W8−5 X1 (5)


X(6) = X0 (6) + W8−6 X1 (6)
X(7) = X0 (7) + W.8−7. X
. . (7)
1. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
9 / 18
Radix-2 FFT
Decimation-in-Time FFT ... III

Advanced
Digital Signal
Next, the weights are obtained using the property
k+N/2
Processing
WN = −WNk
Dr. Ebtihal
H. G. Yousif X(0) = X0 (0) + W80 X1 (0)
Preliminaries X(1) = X0 (1) + W8−1 X1 (1)
Background

FFT X(2) = X0 (2) + W8−2 X1 (2)


Algorithms
Radix-2 FFT X(3) = X0 (3) + W8−3 X1 (3)
Decimation-in-
Time
X(4) = X0 (4) − W80 X1 (4)
Flow Graph
Representa- X(5) = X0 (5) − W8−1 X1 (5)
tion

Decimation- X(6) = X0 (6) − W8−2 X1 (6)


in-Frequency
X(7) = X0 (7) − W8−3 X1 (7)

Computing an N -point DFT using a radix-2 decimation-in-time


FFT is more efficient and requires log2 N stages of computation
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
10 / 18
Decimation-in-Time FFT
Flow Graph Representation

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

Figure: Decimation of 4-point DFT into two points DFTS using DIT
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
11 / 18
Decimation-in-Time FFT
Flow Graph Representation ... II

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency
Figure: Flow Graph Representation of a 2-point DFT

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
12 / 18
Decimation-in-Time FFT
Flow Graph Representation ... III

Advanced
Digital Signal The basic computational unit of the FFT is called a butterfly.
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

Figure: An FFT Butterfly


. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
13 / 18
Decimation-in-Time FFT
Flow Graph Representation ... IV

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

Figure: Complete DIT for an 8-point Sequence


. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
14 / 18
Decimation-in-Frequency

Advanced
Digital Signal
The sequence is decimated (splited) into odd and even
Processing sequences.
Dr. Ebtihal
−1 [ ( )]
H. G. Yousif N

2
N nk
Preliminaries X(2k) = x(n) + x n + WN (4.4)
Background
n=0
2 2

FFT
Algorithms −1
N

2 [ ( )]
N
Radix-2 FFT
Decimation-in-
X(2k + 1) = WNn x(n) − x n + nk
WN (4.5)
Time
n=0
2 2

Flow Graph
Representa-
tion
Which becomes
Decimation- { ( )}
in-Frequency N
X(2k) = DFT N x(n) + x n +
2 2
{ ( ( ))}
N
X(2k + 1) = DFT N WN−n x(n) − x n +
2 2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . (4.6)
. . .
15 / 18
Decimation-in-Frequency ... II

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Figure: DiF of an 8-point DFT 16 / 18
Decimation-in-Frequency ... III

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT
Algorithms
Radix-2 FFT
Decimation-in-
Time

Flow Graph
Representa-
tion

Decimation-
in-Frequency

Figure: Full DiF of an 8-point DFT


. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
17 / 18
Biblography

Advanced
Digital Signal
Processing

Dr. Ebtihal
H. G. Yousif

Preliminaries
Background

FFT J. W. Cooley and J. W. Tukey, “An algorithm for the


Algorithms
Radix-2 FFT machine computation of complex fourier series.” vol. 19,
Decimation-in-
Time pp. 297–301.
Flow Graph
Representa-
tion

Decimation-
in-Frequency

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
18 / 18

Vous aimerez peut-être aussi