









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










III. Fast Fourier transform
2007 Syllabus : Fast Fourier Transform (FFT) – Radix-2 decimation in time and decimation in frequency FFT Algorithms, Inverse FFT, and FFT for composite N.
Contents: 3.1 Introduction 3.2 Radix-2 decimation-in-time FFT (Cooley-Tukey) 3.3 Radix-2 decimation-in-frequency FFT (Sande-Tukey) 3.4 Inverse DFT using the FFT algorithm 3.5 *Decimation-in-time algorithm for N = 4 (Cooley-Tukey formulation) 3.6 *Decimation-in-frequency algorithm for N = 4 (Sande-Tukey formulation) 3.7 FFT with general radix
For a finite-duration sequence x(n) of length N , the DFT sum may be written as
X(k) =
1
0
N
n
kn xnWN , k = 0, 1, …, N – 1
where WN = e j^2 / N. There are a total of N values of X(.) ranging from X(0) to X(N–1). The
calculation of X(0) involves no multiplications at all since every product term involves W N^0 =
e j^0 = 1. Further, the first term in the sum always involves^0 W N or e j^0 = 1 and therefore does
not require a multiplication. Each X(.) calculation other than X(0) thus involves ( N– 1 ) complex multiplications. And each X(.) involves ( N– 1 ) complex additions. Since there are N values of X(.)
the overall DFT requires ( N 1 )^2 complex multiplications and N(N–1) complex additions. For
large N we may round these off to N^2 complex multiplications and the same number of complex additions. Each complex multiplication is of the form
(A + jB) (C + jD) = (AC – BD) + j(BC + AD)
and therefore requires four real multiplications and two real additions. Each complex addition is of the form
(A + jB) + (C + jD) = (A + C) + j(B + D)
and requires two real additions. Thus the computation of all N values of the DFT requires 4 N^2 real multiplications and 4 N^2 (= 2 N^2 + 2 N^2 ) real additions. Efficient algorithms which reduce the number of multiply-and-add operations are known by the name of fast Fourier transform (FFT). The Cooley-Tukey and Sande-Tukey FFT
algorithms exploit the following properties of the twiddle factor (phase factor), WN = e j^2 / N
(the factor e j^2 / N is called the N th^ principal root of 1):
k^ N WN
= – WNk
To illustrate, for the case of N = 8, these properties result in the following relations:
0 W 8 = – 4 W 8 = 1 1 W 8 = – 5 W 8 = 2
1 j
2 W 8 = – 6 W 8 = – j 3 W 8 = – 7 W 8 = 2
1 j
The use of these properties reduces the number of complex multiplications from N^2 to
N
log 2 2
(actually the number of multiplications is less than this because several of the
multiplications by WNr are really multiplications by ±1 or ± j and don’t count); and the number of
complex additions are reduced from N^2 to N log 2 N. Thus, with each complex multiplication
requiring four real multiplications and two real additions and each complex addition requiring two real additions, the computation of all N values of the DFT requires
Procedure and important points
is N
log 2 2
A + BWNk
A – BWNk
k WN
Separation of 1
Separation of 2
Separation of 4
Stage 1 Stage 2 Stage 3
Example 3.2.1 [2002] Radix-2, 8-point, decimation-in-time FFT for the sequence
n → 0 1 2 3 4 5 6 7 x(n) = {1, 2 3 4 – 4 – 3 – 2 – 1}
Solution The twiddle factors are
0 W 8 = 1 1 W 8 = e j^2 /^8 = e j^ /^4 = 2
2
j 2 / 82
j 2 / 83 e = e j^3 /^4 = – 2
One of the elementary computations is shown below:
The signal flow graph follows:
A + BWNk = 1 – 4 = – 3
A – BWNk = 1 + 4 = 5
0 W 8 = 1
0
2
1
3
2
0
2
0
0
0
0
0
000 000 x(0) = 1 X(0) = 0
001 100 x(4) = – 4
111 111 x(7) = – 1
110 011 x(3) = 4
101 101 x(5) = – 3
100 001 x(1) = 2
010 010 x(2) = 3
011 110 x(6) = – 2
Stage 3 ↓
Bit-reversed order ↓
Natural Stage 1 ↓ Stage 2 ↓ ↓ order
Procedure and important points
is N
log 2 2
( A – B ) WNk
k WN
Example 3.3.1 [Cf. Example 2.1] Radix-2, 8-point, decimation-in-frequency FFT for the sequence
n → 0 1 2 3 4 5 6 7 x(n) = {1, 2 3 4 – 4 – 3 – 2 – 1}
Solution The twiddle factors are the same as in the DIT FFT done earlier (both being 8-point DFTs):
0 W 8 = 1 1 W 8 = e j^2 /^8 = 2
2
j 2 / 82
j 2 / 83 e = e j^3 /^4 = – 2
One of the elementary computations is shown below:
The signal flow graph follows:
( A – B ) WNk = (1 + 4) 1 = 5
0 W 8 = 1
2
1
0
0
0
2
0
0
0
2
0
3
x(0) = 1
Natural order ↓ (^) Stage 1 ↓ Stage 2 ↓ Stage 3 ↓
x(7) = – 1
x(6) = – 2
x(5) = – 3
x(4) = – 4
x(3) = 4
x(2) = 3
x(1) = 2
Bit-reversed ↓ order
(DIT Template) The elementary computation (Butterfly):
The signal flow graph:
A + BWNk
A – BWNk
k WN
(DIF Template) The elementary computation (Butterfly):
The signal flow graph:
( A – B ) WNk
k WN
The inverse DFT of an N -point sequence { X(k) , k = 1, 2, … , ( N – 1)} is defined as
x(n) = N
(^1)
0
N
k
kn X kWN , n = 0, 1, … , N – 1
where WN = e j^2 / N. Take the complex conjugate of x(n) and multiply by N to get
N x*(n) =
1
0
k
kn X kWN
The right hand side of the above equation is simply the DFT of the sequence X*(k) and can be computed by using any FFT algorithm. The desired output sequence is then found by taking the conjugate of the result and dividing by N
x(n) = N
1 *
0
N
k
kn X kWN
Example 3.4.1 Given the DFT sequence X(k) = {0, (– 1 – j), j, (2+j), 0, (2–j), – j, (–1+j)} obtain the IDFT x(n) using the DIF FFT algorithm. Solution This is an 8-point IDFT. The 8-point twiddle factors are, as calculated earlier,
0 W 8 = 1 1 W 8 = e j^2 /^8 = 2
2
j 2 / 82
j 2 / 83 e = e j^3 /^4 = – 2
The elementary computation (Butterfly) is shown below:
The signal flow graph follows:
( A – B ) WNk
k WN
Natural order ↓ (^) Stage 1 ↓ Stage 2 ↓ Stage 3 ↓
X*(6) = j
X*(2) =–j
8 x*(0) =
Bit-reversed ↓ order
8 x*(4) =
8 x*(2) =
8 x*(6) =
8 x*(1) =
8 x*(5) =
8 x*(3) =
8 x*(7) =
0
x(n) =
x(n) = {0.25, – 0.78, 0.5, 0.78, – 0.25, 0.28, – 0.5, – 0.28}
Note Because of the conjugate symmetry of { X(k) }, we should expect the sequence { x(n) } to be real-valued. The MATLAB program:
X = [0, (-1-j), j, (2+j), 0, (2-j), -j, (-1+j)], x = ifft(X)
Example 3.4.2 [2002] Given the DFT sequence X(k) = {0, (1–j), j, (2+j), 0, (2–j), (–1+j), – j} obtain the IDFT x(n) using the DIF FFT algorithm. Solution There is no conjugate symmetry in { X(k) }. Using MATLAB
X = [0, 1-1j, 1j, 2+1j, 0, 2-1j, -1+1j, -1j] x = ifft(X) The IDFT is
x(n) = {0.5, (-0.44 + 0.037i), (0.375 - 0.125i), (0.088 + 0.14i), (-0.75 + 0.5i), (0.44 + 0.21i), (-0.125 - 0.375i), (-0.088 - 0.39i)}
As mentioned in the introduction, if the number of points, N , can be expressed as N = (^) rm , and if the computation algorithm is carried out by means of a succession of r -point transforms, the resultant FFT is called a radix- r algorithm. In a radix- r FFT, an elementary computation ( EC ) consists of an r -point DFT followed by the multiplication of the r results by the appropriate twiddle factor. The number of EC s required is
Cr = N r
log r
which decreases as r increases. Of course, the complexity of an EC increases with increasing r. For r = 2, the EC (the butterfly) consists of a single complex multiplication and two complex additions; for r = 4, the EC requires three complex multiplications and several complex additions. Suppose that we desire an N -point DFT where N is a composite number that can be factored into the product of integers
N = N 1 N 2 … Nm
If, for instance, N = 64 and m = 3, we might factor N into the product 64 = 4 x 4 x 4, and the 64- point transform can be viewed as a three-dimensional 4 x 4 x 4 transform. If N is a prime number so that factorization of N is not possible, the original signal can be zero-padded and the resulting new composite number of points can be factored. We illustrate in the table below the situation for N = 64. Since 64 = 2^6 , we can have a radix-2 FFT; alternatively, since 64 = 4^3 , we can also have a radix-4 FFT.
N = 64 = 2^6 = 4^3 = 8^2 Radix-2 Radix-4 Radix- No. of stages (^) log 264 = 6 log 464 = 3 log 864 = 2 No. of EC s per stage 64/2 = 32 64/4 = 16 64/8 = 8