11 DFT and FFT
11 DFT and FFT
11 DFT and FFT
Discrete Fourier
Transform (DFT) and
Fast Fourier Transform 10
10.1 Introduction
We have seen that the frequency analysis of discrete signal is done by DTFT and DTFT is continuous
and periodic with period 2. Computation and storage of continuous signal is difficult and we convert it into
discrete to store them. The DFT is sampled version of DTFT and FFT is a method to calculate DFT will less
time required
X(k ) = X e j 2 k / N ; for k = 0,1,2,.., N 1
The DFT of x(n) is a sequency consisting of N samples of X(k). The DFT sequence starts at k = 0,
corresponding to = 0, but does not include k = N corresponding to = 2 (since the sample at = 0 is same
as the sample at = 2. Generally, the DFT is defnined along with number of samples and is called N-point
DFT. The number N for a finite duration sequence x(n) of length L should be such that N L.
The DTFT is nothing but the z-transform evaluated along the unit circle centred at the origin of the
z-plane. The DFT is nothing but the z-transform evaluated at a finite number of equally spaced points on
the unit circle centred at the origin of the z-plane.
To calculate the DFT of a sequence, it is not necessary to compute its fourier tranform, since the DFT
can be directly computed.
DFT - The N-point of a finite duration sequence x(n) of length L, where N L is defined as
N 1 N 1
j 2nk / N
DFT {x(n)} = X k x n e x n WNnk ; for k = 0,1,2,..,N 1 ...(1)
n0 n0
IDFT - The inverse discrete fourier transform (IDFT) of the sequence X(k) of length N is defined
as
N 1 N 1
1 1
IDFT {X(k)} =
N
X k e j 2nk / N N
X k WNnk ; for k = 0,1,2,..,N 1 ...(2)
n 0 n 0
2
j
P(e ) = N
k
The signal p[n] which has DTFT P(ej), p[n] will be impulse train with period N, that is
N
p[ n ] = n kN
2 k
x[n]* p[n ] = P(ej). X(ej)
N
Thus sampling in DTFT leads to convolution in time domain if we remove scaling factor for
2
understanding then in time domain signal becomes
x n * n kN = x n kN x n
k
k
Thus we can say that N point DFT of a nonperiodic signal x[n] actually correspond to periodic
signal
x n with period N made periodic by repeating x[n] at integer multiple of N.
Since DTFS is used for fourier or frequency analysis of periodic signal suppose a discrete
2
1 N 1 j
Ck = x n e N .nK
N n 0
...(3)
N 1 2
j
and x n = C e k
N .nK
...(4)
k 0
Study Note
N 1 2
1 j nk
x n e because for 0 n N1, n x n
N
Equation(3) is equal to Ck = x
N n 0
If we compare equation 1, 2, 3, and 4 then we get relationship between DFT and DTFS
X(k) = N Ck ...(5)
In other words if x[n] is a non periodic signal with length L, we generate a new signal
x n = x n kN
k
Example 10.1
1, n 0
x[n] = [n] =
0, n 0
To find N point DFT
N 1 2 N 1 2
j .nk j .nk
X(k ) = x n e
n0
N
n e
n 0
N
X(k ) = 1
n
(b) Here x[n] = a , 0 n 10 for N point DFT, obviously N > 10
N 1 2 10 2
j .nk j .nk
X( k ) = x n e ane
N N
n 0 n 0
11
a
1
j 2 k
e N
X( k ) =
a
1
j 2 k
e N
Study Note
Since N point DFT of x[n] is N time DTFS coefficients of
x n thus DFT is also periodic with period
N. X(k) is periodic with period N.
Example 10.2
Solution 10.2
(a) Given sequence is x(n) = {1, 1, 2, 2}. Here the DFT X(k) to be found is N = 4 point and length of
the sequence L = 4. So no padding of zeros is required.
N 1
X(0) = x n e0 x 0 x 1 x 2 x 3 = 11+2 2= 0
n 0
3
X(1) = x n e j /2n x 0 x 1 e j/2 x 2 e j x(3)e j3/2
n 0
3
1
i.e. x(n) =
N
X k e j / N nk
k 0
1 3 1
x(0) = X k e0 X 0 X 1 X 2 X 3
4 k 0 4
1
= 4 2 0 4 = 2.5
4
1 3 1
x(1) = X k e j /2 k X 0 X 1 e j /2 X 2 e j X 3 e j 3 /2
4 k 0 4
1
= 4 2 0 j 0 4 0 j = 1 j 0.5
4
1 3 1
x(2) = X k e jk 4 X 0 X 1 e j X 2 e j 2 X 3 e j 3/2
4 k 0
1
= 4 2 1 j 0 0 4 1 j 0 = 0.5
4
1 3 1
x(3) = X k e j3/2k 4 X 0 X 1 e j3/2 X 2 e j 3 X 3 e j 9/2
4 k 0
1
= 4 2 0 j 0 4 0 j = 1+ j 0.5
4
x(n) ={2.5, 1j 0.5, 0.5, 1+j 0.5}
Example 10.3
Compute the DFT of the 3-point sequence x ( n ) = {1, 2, 3}. Using the ssame sequence,
compute the 6-point DFT and compare the two DFTs.
Solution 10.3
The given 3-point sequence is x(n) = {2, 1, 2}, N = 3.
N 1 2
DFT x(n) = x n WNnk x n e j 2/3nk , k = 0, 1, 2
n 0 n 0
j 2 /3 k
x 2 e
j 4 /3 k
= x 0 x 1 e
2 2 4 4
= 2 cos k j sin k 2 cos k j sin k
3 3 3 3
When k = 0, X(k) = X(0) = 2 + 1 + 2 = 5
2 2 4 4
When k = 1, X(k) = X 1 2 cos j sin 2 cos j sin
3 3 3 3
= 2 + (0.5 j0.866) + 2(0.5 + j0.866)
= 0.5 + j0.866
4 4 8 8
When k = 2, X(k) = X 2 2 cos j sin 2 cos j sin
3 3 3 3
j 2 /6 k
x 2 e x 3 e x 4 e x 5 e
j 4 /6 k j 6 /6 k j 8 /6 j 10 /6 k
= x 0 x 1 e
j /3 k
2e
j 2 /3 k
= 2e
When k = 0, X(0) = 2 + 1 + 2 = 5
j /3
2e
j 2 /3
When k = 1, X(1) = 2 e
= 2+(0.5 j0.866)+2(0.5 j0.866) = 1.5 j2.598
2e
j 2 /3 j 4 /3
When k = 2, X(2) = 2 e
= 2+(0.5 j0.866)+2(0.5 j0.866) = 0.5 j0.866
j 3 /3
x 2 e
j 6 /3
When k = 3, X(3) = x 0 x 1 e
4 4 8 8
= 2 cos j sin 2 cos j sin
3 3 3 3
= 2+(0.5 + j0.866) +2(0.5 j0.866)
= 0.5 j0.866
j 5 /3
x 2 e
j 10 /3
When k = 5, X(5) = x 0 x 1 e
5 5 10 10
= 2 cos j sin 2 cos j sin
3 3 3 3
= 2 + (0.5 j0.866) + 2(0.5 + j0.866) = 1.5 j0.866
Tabulating the above 3-point and 6-point DFTs, we have
DFT X(0) X(1) X(2) X(3) X(4) X(5)
3-point 5 j j
6-point 5 j j 0.5j0.866 1.5j0.866
Since 6-point = 3 2-point
X(k) of 3-point sequence = X(2k) of 6-point sequence
N 1
X(k ) = x n WNnk , k = 0,1,...., N 1
n 0
N 1
1
x(n) =
N
X k WNnk , n = 0,1,2,.., N 1
n 0
The first set of N point DFT equations in N unknowns may be expressed in matrix as
X = WN x ...(6)
Here X and x are N 1 matrices, and WN is an N N square matrix called the DFT matrix.
The full matrix form is described by
X 0
WN0 WN0 WN0 WN0 x 0
WN x 1
N 1
X 1 WN0 WN1 WN2
0
WN2 WN4 WN x 2
X 2 2 N 1
WN
= ...(7)
X N 1
WN x N 1
2 N 1
WN0 WN0 WN N 1 N 1
x = WN1 X ...(8)
The matrix WN1 X is called the IDFT matrix. We may also obtain x directly from the IDFT relation
in mat r ix for m wher e t he change of index for m n to k and the change in the sign of the exponent in ej(2/N)nk
lead to the conjugate transpose of WN. We than have
1 T
x = WN* X ...(9)
N no transpose
1
WN1 = WN*
N
Example 10.4
Solution 10.4
The DFT X(k) of the given sequence x(n) = {1,2,1,0} may be obtained by solving the matrix product
as follows. Here N = 4.
x[2]
x[4]
x[3]
x[3] x[1]
Start point
x[2] Start point
x[N2]
x[N1] x[1]
x[0]
x[0]
Figure 10.1circular representation Figure 10.2 circular representation of
of signal x[n] signal with period 4
For example Let x[n] is periodic with period 4 then to find x[138] we move 138 steps
anticlockwise direction
x[136+2] = x [2]
x[2]
x[1]
x[0]
x[N 1]
Similarly to give left shift of k units to periodic signal x[n] with period N, that is we need
x[n+k, mod N] then we move all points in figure (10.1) clockwise by k steps to get circular representation
of x[n+k], that is shown in figure 10.4. Now for time reversal, suppose we want circular representation of
x[n] or x[n, mod N] then we can get by taking mirror image of figure (10.1) about starting point that is
shown in figure 10.5.
10.4.1 Perodicity
If a sequence x[n] is periodic with period N then DFT X(k) is also periodic with same period.
Then is both x[n] and X(k) have N samples in one period.
Proof : By definition of DFT, the (k +N )th coefficient of X(k) is given by
N 1 N 1
X(k +N ) = x n e j 2n k N / N x n e j 2nk / N e j 2nN / N
n 0 n0
N 1
X(k +N ) = x n e j 2nk / N X k
n 0
10.4.2 Linearity
If x1(n) and x2(n) are two finite duration sequences and if
DFT {x1(n)} = X1(k )
and DFT {x2(n)} = X2(k )
Then for any real valued or complex valued constants a and b,
DFT {ax1(n) + bx2(n)} = aX1(k) + bX2(k)
N 1
Proof : DFT {ax1(n)+bx2(n)} = ax1 n bx2 n e j 2nk / N
n 0
N 1 N 1
j 2 nk / N
= a x1 n e b x2 n e j 2nk / N
n0 n0
= aX1(k) + bX2(k)
x [ n ] = x 2 , x 1 , x 0, x N 1 , x N 2 , x N 3...x 1 , x 0....
The time reversal of an N point sequence x(n) is obtained by wrapping the sequence x(n) over the
circle in a clockwise direction. It is denoted by x[(n),mod N].
If DFT{x(n)} = X(k) then
DFT{x[(n),mod N]} = DFT{x(Nn)}
= X[(k),mod N] = X(Nk)
DFT
The property to learn is x[n]
X(k)
REMEMBER
Thus for even signal x[n] then X(k) = x(k) that is DFT will also be even similarly for odd
signal x[n] we have X(k) =X(k), that is DFT is also odd
N 1 N 1
= x n e j 2n k m / N x n e j 2n N k m / N
n 0 n 0
*
N 1 j 2 kn / N
= x n e
n 0
*
N 1 j 2 n N k / N *
= x n e X N k
n0
N 1
1
Proof IDFT {X *(k)} =
N
X * k e j 2kn / N
k 0
* *
1 N 1 j 2 kn / N 1 N 1 j 2kn / N n / N
= X k e X k e
N k 0 N k 0
= x*(N n)
X k X k
Then DFT of xe[n] will be
2
X k X * k
xe [ n ] Re X k
2
x n x n X k X k X k X * k
and xo[n] =
2 2 2
j Img {X(k)}
Study Note
If we recollect all then these properties are exactly similar to that of DTFS.
Time domain signal DFT of the signal
real conjugate symmetric
imaginary conjugate anti symmetric
even even
odd odd
real and even real and even
real and odd real and odd
imaginary and even imaginary and even
imaginary and odd imaginary and odd
imaginary and odd real and odd
Here all the properties have both sided arrows thus for example if signal is real then DFT is conjugate
symmmetric and if time domain signal is conjugate symmetric then DFT will be real
N 1 2
1 j nk
IDFT{X(k)} = x n X k e N
N k 0
2
j no k
= IDFT X k e N
1
Then DFT [x1(n)]x2(n) = X 1 k X 2 k
N
N 1 N 1
1
Then x1 n x2* n =
N
X1 k X 2* k
n0 k 0
N 1 N 1
1
x1 n x1* n =
N
X1 k X1* k
n0 k 0
N 1 N 1
2 1 2
x1 n =
N
X1 k
n 0 k 0
N 1
DFT {rxy(l)} = DFT x n y n l , mod N X k Y k
* *
n 0
10.5.11 Duality
In DFT the time domain signal x[n] is also discrete and periodic and X(k) is also discrete and periodic
thus periodic and can be easily seen by observing these equations
N 1 2 N 1 2
j nk 1 j nk
X(k ) = x n e X n e
N N
and x[n] =
n0 N k 0
N 1 2
j nk
X(n) = x k e
N
k 0
2
X n 1 N 1 j nk
N
= x k e N
N k 0
X n
The DFT of is x(k)
N
X n DFT
x (k )
N
DFT
Or X( n )
Nx(k)
DFT
If x [ n ]
X( k )
DFT
Then X[ n ]
Nx(-k)
TABLE (10.1) Properties of the DFT
N 1 N 1
1
Parseval’s theorem x n y* n N
X k Y * k
n 0 k 0
Discrete Fourier Transform and Fast Fourier Transform 457
point DFT X1(k) will correspond to x1 n and x1 n where x1 n and x1 n are two periodic signals made
periodic with period N by repeating x1[n] and x2[n]. If Y(k) = X1(k) X2(k) then the sequence that will Correspond
to Y(k) will be y n where y n is made periodic with period N by repeating y[n] where y[n] is circular
N 1
y [ n ] = x1 n x2 n x i x n i
1 2 mod N
i 0
The result of circular convolution of two sequence x1[n] and x2[n] of length N will be of length N
only.
Method To perform circular convolution
Suppose x1[n] and x2[n] have N = 4.
3
Then y[n] = x i x n i
i 0
1 2
But result will not be calculated by adding directly we first of all fill all X spaces as shown and then
we add. Thus we get
x1[0]x2[3] x1[0]x2[2] x1[0]x2[1] x1[0]x2[0]
x1[1]x2[2] x1[1]x2[1] x1[1]x2[0] x1[1]x2[3]
x1[2]x2[1] x1[2]x2[0] x1[2]x2[3] x1[2]x2[2]
x1[3]x2[0] x1[3]x2[3] x1[3]x2[2] x1[3]x2[1]
y[3] y[2] y[1] y[0]
For example : To perform circular convolution for [1,2,1,0] and [3,2,5,1] with N = 4
Thus
0 1 2 1
1 5 2 3
0 3 6 3
0 2 4 2
0 5 10 5
01 2 1
0 3 6 3
2 4 2 0
10 5 0 5
1 0 1 2
13 12 9 10
y [ n ] = [10,9,12,13]
Example 10.5
Find the circular convolution of these two signals [1,2,1] and [1,0,1,0,1] with N=5.
Solution 10.5
For circular convolution we need both the sequence of same length
x1[n ] = [1,2,1,0,0] and x2[n] = [1,0,1,0,1]
0 0 1 2 1
1 0 1 0 1
0 0 1 2 1
0 0 0 0 0
00 1 2 1
000 0 0
0 011 1
0 0 1 2 1
0 0 0 0 0
1 2 1 0 0
0 0 0 0 0
1 0 0 1 2
2 1 2 3 3
y [ n ] = [3,3,2,1,2]
Example 10.6
Given N = 12, we have X(k) = X *(N k) = X *(12 k). The first 7 samples of X(k) are given, the
remaining samples are:
X(7) = X *(12 7) = X *(5) = 3 j1
X(8) = X *(12 8) = X *(4) = 2 j2
X(9) = X *(12 9) = X *(3) = 1 j4
X(10) = X *(12 10) = X *(2) = 2 j3
X(11) = X *(12 11) = X *(1) = 1 j2
Example 10.7
Solution 10.7
Given X(k) = {1, A, 1, B, 0, j2, C, 1, j }, using conjugate symmetry, we have
X(k) = {X(0),X(1),X(2),X(3),X(4),X(5),X(6),X(7)}
= {X(0),X*(81),X(2),X*(83),X(4),X(5),X*(86),X(7)}
= {1, 1 j, 1, j2, 0, j2, 1, 1+j }
A = 1j, B = j2 and C = 1
Example 10.8
Solution 10.8
Using central ordinates, we have
7
X(0) = x n A 2 3 4 5 6 7 B A B 27 20
n 0
N 7 n
And X(4) = 1 x n A 2 3 4 5 6 7 B 0
X
2
n 0
i.e A B + 3 = 0
Therefore, A + B + 27 = 20 and A B + 3 =0
Solving the above two equations, we have A = 5 and B = 2
Example 10.9
The DFT of a real signal is X ( k ) = {1, A , 1, B , 7, j 2, C , 1+ j }. What is its signal
ener gy?
Solution 10.9
Using the conjugate symmetry property, we have
X(k) = {1, A, 1, B, 7, j2, C, 1+ j }
= {1,X*(8 1),1,X*(8 3), 7, j2, X*(8 6), 1+j }
= {1,1j, 1, j2,7, j2, 1, 1+j }
N 1
2 1 N 1 2
= x n X k
n 0 N n0
1 2 2 2 2 2 2 2 2
= 1 1 j 1 j 2 7 j 2 1 1 j
8
1
= 1 2 1 4 49 4 1 4 8.25
8
Example 10.10
Solution 10.10
N 1 2
j nk
(a) We know that X(k) = x n e N , k = 0, 1,..., N 1
n0
5 5
0
X(0) = x n e x n 1 2 3 0 1 1 2
n0 n 0
5 2 5
j 3n n
(b) X(3) = x n e 6 x n 1
n 0 n 0
= x(0)(1)+x(1)(1)+x(2)(1)+x(3)(1)+x(1)(1)+x(5)(1)
= (1)(1) 2(1)+3(1)+(0)(1)1(1)+1(1)
= 4
N 1 2
1 j nk
(c) We have x(n) =
N
X k e N , n = 0,1,..., N 1
k 0
N 1
X k = Nx(0) = 6(1) = 6
k 0
Example 10.11
1 1
DFT {x(n)x(n)} = X k X k 4, j 2,0, j 2 4, j 2, 0, j2
N 4
= {6, j4, 0, 4}
(e) Using the circular convolution property of DFT, we have
DFT {x(n) x(n)} = [X(k)X(k)] = {4, j2, 0, j2} {4, j2, 0, j2}
= {16, 4, 0, 4}
(f) Using Parseval’s theorem, we have
1 2 1 2
Signal energy = X k 4, j 2, 0, j 2
4 4
1
= 16 4 0 4 6
4
Example 10.12
n
j
IDFT {X(k 1)} = x(n)ej2n/4 = x n e 2
j 3
2 , x 2 e j , x 3 e 2
j
0
= x 0 e , x 1 e
= 1(1), 2( j ), 1(1), 0(j ) = {1, j2, 1, 0}
(b) Using periodic convolution property, we have
IDFT{X(k) X(k)} = Nx2(n) = 4{1,2,1,0}2 = {4,16,4,0}
(c) Using the convolution in time domain property, we have
IDFT {X(k)X(k)} = {1,2,1,0} {1,2,1,0} = {2,4,6,4}
N 1
2 2 2 2 2
(d) Signal energy x n = x 0 x 1 x 2 x 3
n 0
=(1)2+(2)2+(1)2+(0)2 = 6
N 1 2
j kn
X(k ) = x n e
N
n 0
N 1 2
1 j kn
And x[n] =
N
X k e
k 0
N
N 1
1
x [0] =
N
X k
k 0
2. If N even then
N 1 N 1
N 1 j k 1 n
x =
2 N
X k e
k 0
N
1
k 0
X k
Since X(0) = x n e
n 0
j k
Similary if N is even
N 1 N 1
Then X N 2 = x n e
n 0
j n
1 x n
n 0
n
1 *
IDFT{X(k)} =
N
DFT X * k
N 1 2
j .mk
*
Y(m) = DFT{X (k)} = X k e
* N
Let
k 0
2
1 * 1 N1 j .mk
Then
N
DFT X * k = X k e N
N k0
If we compare this with IDFT equation we get that this will be equal to x[m], x[m] = x[n] only
there is change of varialbe
5 . Another method to solve for circular convolutions
Let y [ n ] = x1[n]x2[n]
And N = 4 then
N 1 2
j . n. k
Then X1(k) = x n e
n0
N
2 N 1 2
j .n.k
X2(k) = x n e 2N
n 0
3 N 1 2
j nk
And X3(k) = x n e 3N
n0
The signal x[n] will be zero for n N because then only we are able to find N point DFT of x[n].
from above equation we can see that
X1(k) = X2(2k) = X3(3k)
Similar we get in example 10.3
zeros and make both of them of length N1 + N2 1. Let X(k) be an N1 + N21 point DFT of x(n), and H(k) be
an N1 + N21 point DFT of h(n). Now, the sequence y(n) is gives the inverse DFT of the product X(k) H(k).
y ( n ) = IDFT{X(k)H(k)}
Example 10.13
Two finite-length sequences, x 1( n ) and x 2( n ), that are zero outside the interval [0, 99]
are circularly convolved to form a new sequence y ( n ),
y ( n ) = x 1( n ) x 2( n )
Where N = 100. If x 1( n ) is nonzero only for 10 n 39. determine the values of n for
which y ( n ) is guranteed to be equal the linear convolution of x 1 ( n ) and x 2( n ).
Solution 10.13
Because
99
y(n) = x2 k x1 n k 100
k 0
the values of n for which y(n) is equal to the linear convolution of x1(n) are those values of n in
the interval [0,99] for which the circular shift x1((n k))100 is equal to the linear shift x1(n k). With x1(n)
nonzero only over the interval [10,39] we see that x1((n k)) for n in the interval [39,99]. Therefore, the
circular convolution and the linear convolution are equal for 39 n 99.
Example 10.14
Solution 10.14
With overlap-add, x(n) is partitioned into nonoverlapping sequence lf length M. If h(n) is of length
L, x1(n) * h(n) is of length L + M 1. Therefore, we must use a DFT of length N L + M 1. Here, we have
set N = 128, and h(n) is of length L = 60. Therefore, x(n) must be partitioned into sequence of length
M = N L 1= 69
Because x(n) is 3000 point long, we will have 44 sequences (with the last sequence containing only
33 nonzero vlaues). Thus, to perfrom convolution we need:
1. One DFT to compute H(k)
2. 44 DFTs for X1(k)
3. 44 inverse DFTs for Y(k) = H(k)Xi(k)
For a total of 45 DFTs and 44 inverse DFTs.
Example 10.15
3 k = 0
X(k) =
1 1 k 9
Solution 10.15
To find the inverse DFT, note that X(k) may be expressed as follows:
X(k) = 1+2(k) 0 n 9
Written in this way, the inverse DFT may be easily determined. Specifically, note that the inverse
DFT of a constant is a unit sample:
DFT
x1(n ) = n X1 k 1
1
x(n) = n
5
Example 10.16
2π
j2k
Y(k) = e 10 X k
1 0 n 6
w(n) =
0 otherwise
Solution 10.16
(a) The DFT of x(n) is easily seen to be
2
j 5k k
5k
X(k) = 1 2WN 1 2e 10 1 2 1
(b) Multiplying X(k) by a complex exponential of the from WNnk0 corresponds to a circular shift of
x(n) by n0. In this case, because n0 = 2, x(n) is circularly shifted to the left by 2, and we have
y ( n ) = x((n+2))10= 2(n3)+(n8)
(c) Multiplying X(k) by W(k) corresponds to the circular convolution of x(n) with w(n). The 10-point
circular convolution is
y ( n ) = [3, 3, 1, 1, 1, 3, 3, 2, 2, 2,]
Example 10.17
Y ( k ) = W64k X k
( b ) Find the finite-length sequence w ( n ) that has sixpoint DFT that is equal to the
real part of X( k )
W ( k ) = Re{ X ( k ) }
Solution 10.17
(a) The sequence y(n) is formed by multiplying the DFT of x(n) by the complex exponential W64 k .
Because this corresponds to a circular shift of x(n) by 4.
y ( n ) = x((n4))6
It follows that
y( n ) = 4(n4)+3(n5)+2(n)+(n1)
(b) The real part f X(k) is
1
Re{X(k)} = X k X * k
2
To find the inverse DFT of Re{X(k)}, we need to evaluate the inverse DFT of X *(k). Because
*
N 1 nk
N 1
* nk
X*(k) = x n WN x n WN
n0 n0
N 1 N 1
N n k
*
= x n WN x* N n N WNnk
n 0 n 0
1
w(n) =
2
x n x* N n N
With N = 6, this becomes
3 3
w ( n ) = 4, ,1,1,1,
2 2
N 1 2 2
j nk j
X( k ) = x n e
n 0
N
, if WN e N
N 1 K
X(k) = x 0WN0 x 1WNK x 2WN2 K x N 1WN
Thus to calculate one terms of DFT (N1) complex addition and N complex multiplication are needed.
For N terms we need N2 complex multiplication and N(N1) complex additions. Here we are taking
multiplication with 1 and -1 also as complex. The FFT is a method to compute DFT with less number of
computation. FFT uses the concept of divide and rule. There are two FFT algorithms : Decimation in time
and Decimation in frequency.
The properties of factor WN are
N
k K
Symmetry property W 2 = WN
N
kN
Periodic property W N = WNK
FFT exploits the above properties of WN and divide the N point DFT into smaller size DFTs
.
10.11 Decimation in Time (DIT) Radix -2 FFT
In decimation in time (DIT) algorithm, the time domain sequence x(n) is decimated and smaller
point DFTs are computed and they are combined to get result of N-point DFT.
In general, we can say that, in DIT algorithm the N-point DFT can be realized from two numbers of
N/2-point DFTs, the N/2-point can be realized form two numbers of N/4-point DFTs, and so on.
In DIT radix-2 FFT, the N-point time domain sequence is decimated into 2-point Sequences and the
2-point DFT for each decimated sequence is computed. From the results of 2-point DFTs, the 4-point DFTs,
from the results of 4-point DFTs, the 8-point DFTs and so on are computed until we get N-point DFT.
For performing radix-2 FFT, the value of r shold be such that, N =2m. Here, the decimation can be
performed m times, where m = log2N. In direct computation of N-point DFT, the total number of complex
additions are N(N1) and the total number of complex multiplications are N2. In radix-2 FFT, the total
number of complex additions are reduced to N log2N and the total number of complex multiplitcations are
reduced to (N/2) log2N.
Let x(n) be a sequence of length N = 2, and suppose that x(n) is split (decimated) into two
subsequences, each of length N/2. The first sequence, g(n), is formed form the even-index terms,
N
g ( n ) = x(2n) = n = 0,1,.... 1
2
and the second, h(n), is formed the odd-index terms,
N
h ( n ) = x(2n+1) = n = 0,1,.... 1
2
In terms of these sequences, the N-point DFT of x(n) is
N 1
X(k ) = x n WNnk x n WNnk x n WNnk
n 0 n even n odd
N N
1 1
2 2
X(k) = x 2n W k 2n
N x 2n 1 WN 2 n 1 k
n 0 n 0
N N
1 1
2 2
nk
X( k ) = g n W N WNk h n WNnk
n 0 2 n0 2
N N
1 1
2
nk N 2 N
We can see that g n WN is point DFT of g(n) and h n W nk
N
is point DFT of h(n).
n0 2 2 n 0 2 2
k
Thus X(k) = G k WN H k
N
Thus N point DFT can be written as sum of two point DFT wih a factor of WNk . G(k) and H(k)
2
N k N 2 k
will be periodic wih period 2, and WN = WN
N
Thus X(k) = G (k ) +WNk H ( k ) for 0 k 1
2
N k N N
And X(k ) = G k WN H k for kN1
2 2 2
Let N = 8 then FFT after decimation will be
G(0)
x(0) X(0)
x(2) G(1) W80
4-point X(1)
DFT G(2) W81
x(4) X(2)
G(3) W82
x(6) X(3)
W83
x(1) X(4)
H(0) W84
x(3) 4-point X(5)
DFT
H(1) W85
x(5) X(6)
H(2) W86
x(7) X(7)
H(3) W87
Figure 10.6: An eight-point decimation-in-time FFT algorithm after the first decimation
Now next stage of decimation we decimate to find G(k) and H(k). As before this lead to
G (k ) = g n W
n even
nk
N
2
g n W
n odd
nk
N
2
N N
1 1
4 4
g 2n 1 WN
2 nk 2 n 1 k
= g 2n W
n 0
N
2 n 0 2
N N
1 1
4 4
nk
G(k ) = g 2n W N WNk g 2n 1W nk
N
n0 4 2 n0 4
N
Let f1[n] = g(2n) for n = 0 to 1
4
N
And f2[n] = g(2n+1) for n = 0 1
4
N 1 N 1
4
nk N 4
nk N
Then g 2n W
n 0
N
4
is
4
point DFT of f1[n] and g 2n 1W
n 0
N
4
is
4
point DFT of f2[n]
k
G(k) = F1 k WN F2 k
2
kN
and WN 4
= WNk ,
2 2
k N
Thus, G(k) = F1 k WN 2 F2 k for 0 k 1
4
N k N N N
and G(k) = F1 k WN 2 F2 k for k 1
4 4 4 2
N
Similarly we can decompose H(k) into two point DFT F3(k) and F4(k), taking N = 8 as in previous
4
case we get the figure as
F1(0)
x(0) G(0)
N/4-point
x(4) DFT
F1(1) W40
G(1)
F2(0) W41
x(2) G(2)
N/4-point F2(1) W42
x(6) DFT G(3)
F3(0) W43
x(1) H(0)
N/4-point
DFT
F3(1) W40
x(5) H(1)
F4(0) W41
x(3) H(2)
N/4-point
DFT
F4(1) W42
x(7) H(3)
W43
F1(0)
x(0) G(0)
N/4-point
F1(1)
x(4) DFT G(1)
0
F2(0) W4
x(2) G(2)
N/4-point F2(1) W41
x(6) DFT G(3)
F3(0)
x(1) H(0)
N/4-point
F3(1)
x(5) DFT H(1)
F4(0) W40
x(3) H(2)
N/4-point
F4(1) W41
x(7) DFT H(3)
Figure 10.7: Flow graph for second stage FFT algorithm for N = 8.
The above decimation is done till we are left with 2 point DFT. Two point DFT for example for
N= 8 the 3rd stage of FFT will be to calculate F1(k), F2(k), F3(k) and F4(k).
Here for N = 8 f1(k) = 2 point DFT of points x(0) and x(4) that is g(2n), Let f1(n) = g(2n) and N = 8
1
nk
F1(k) = f n W
1 2 f1 0 W20 f 1 W2k
n 0
0
F1(0) = f1 0 f1 1 WN
1
and F1(1) = f1 0 f1 1 W2 f1 0 f1 1
x(0) F1(0)
x(4) W20
F1(1)
x(2) F2(0)
W20
x(6) F2(1)
x(1) F3(0)
W20
x(5) F3(1)
x(3) F4(0)
W20
x(7) F4(1)
The x(n) in bit reversed order is decimated into 4 numbers of 2-point sequence as shown below.
(ii) x(0) and x(4)
(ii) x(2) and x(6)
(iii) x(1) and x(5)
(iv) x(3) and x(7)
Using the decimated sequences as input, the 8-point DFT is computed. Figure (10.11) shows the
three stages of computation of an 8-point DFT.
The basic computational unit of the FFT, shown in figure (10.10) (a), is called a butterfly. This
structure may be simplified by factoring out a term WNr from the lower branch as illustrated in figure
(10.10) (b). The factor that remains is WNN / 2 = 1. A complete eight-point radix-2 decimation-in-time FFT is
WNr
WNr N /2 WNr
Figure 10.10 : (a) The butterfly, which is the basic computational element of the FFT
algorithm (b) A simplified butterfly, with only one complex multiplication .
Computing an N-point DFT using a radix-2 decimation-in-time FFT is much more efficient than
calculating the DFT directly. For example, if N = 2v, there are log2N = v stages of computation. Because each
stage requires N/2 complex multiplies by the twiddle factors WNr and N complex additions, there are a total
N
of log2N complex multiplications and N log2N complex additions.
2
From the structure of the decimation-in-time FFT algorithm, note that once a butterfly operations
has been perfomed on a pair of complex numbers, there is no need to save the input pair. Therefore, the
output pair may be stored in the same registers as the input. Thus, only one array of size N is required, and
it is said that the computations may be performed in place. To perform the computations in place, however,
the input sequence x(n) must be stored (or accessed) in nonsequential order as seen in figure 10.11.
To calculate number of complex multiplication and complex addition in FFT
Case 1 : Radix 2 FFT If N = 2v then these are log2 N = v number of stages and each stage has N / 2
number of butterflies. Each butterfly need one multiplication of twiddle factor WNr and 2 complex addition
thus
x(0) X(0)
W80
x(4) X(1)
W80
x(2) X(2)
W80 W82
x(6) X(3)
W80
x(1) X(4)
W80 W81
x(5) X(5)
W80 W82
x(3) X(6)
Study Note
Here we have taken multiplication with ± 1
Total number of complex multiplication =Number of stages butterflies in each stage Number
of complex multiplication in each butterfly
N
=v 1
2
N
=v
2
N
= Log 2 N . .
2
Total Number of complex addition =Number of stageNumber of butterflies in each
stage number of complex addition each stage
N
= Log 2 N 2
2
=N log2 N
Case 2 : Radix 3 FFT
If N = 3v then we use radix 3 FFT then we divide N point sequence into 3 sequence x(3n),
N
x(3n+1) and x(3n+2), n = 0, 1, --- 1 .Let F1(k) is N point DFT of x(3n), F2(k) is N DFT
3 3 3
N
of x(3n+1) and F3(k) is point DFT of x(3n+2) and
3
N 1
nk
X(k ) = x n W
n 0
N
N N N
1 1 1
3 3 3
x 3n 1 WN
3 n 1 k
x 3n 2 WN
3 nk 3n 2 k
= x 3n W
n 0
N
n 0 n0
N N N
1 1 1
3 3 3
nk
= x 3n W N WNk x 3n 1 WNnk WN2 k x 3n 2 WNnk
n0 3 n0 3 n0 3
k 2k
X(k) = F1 k WN F2 k WN F3 k
N
Here for 0 k 1, let m = k
3
k 2k
X(k) = F1 k WN F2 k WN F3 k
m 2m
= F1 m WN F2 m WN F3 m
2N k 2N 2k 2N
X(k) = F1 k WN F2 k WN F3 k
3 3 3
m 2 N /3
= F1 m WN WN F2 m WN2 mWN4 N /3 F3 m
Since there is no relation between each twiddle factor and WN2 N /3 , WNN /3 are complex thus for each
butterfly we need 6 complex multiplication
F1(0) X(0)
F1(1) X(1)
W91
W92
F1(2) X(2)
F2(0) X(3)
W94
F2(1) X(4)
W98
F2(2) X(5)
F3(0) X(6)
W97
F3(1) X(7)
W914
F3(2) X(8)
We can see that in one butterfly we need 6 complex multiplication (if we include ±1 multiplication)
and there is no relation between WNk and WN2k here so we cannot reduce number of complex
N
multiplication. Also each butterfly need 6 complex addition. There are butterfly in each stage
3
and log3N stages thus
Total number of complex multiplication are
N
Log3N 6 = 2 N log3N
3
Total number of complex addition are
N
Log3N 6 = 2N Log3N
3
Case 3: Radix 4 FFT
When N = 4v we use radix 4 FFT where in decimation in time FFT we divide N point input
N
sequence into four sequence x(4n), x(4n+1), x(4n+2), x(4n+3), n = 0, 1,2,---- 1 .Let F1(k)
4
N N point DFT of x(4n +1), F (k) is N point DFT of x(4n +2),
is point DFT of x(4n), F2(k) is 3
4 4 4
N
F4(k) is point DFt of x(4n+3).
4
N 1
nk
Since, X(k ) = x n W
n 0
N
N N N
1 1 1
4 4 4
4 n 1 k
= x 4n W 4 nk
N x 4n 1 W N x 4n 2 WN 4 n 2 k
n 0 n 0 n 0
N
1
4
x 4n 3 WN
4 n 3 k
n 0
N 1 N 1 N 1
4 4 4
nk k nk 2k nk
X(k ) = x(4n)W
n 0
N
4
W N x(4n 1)W
n 0
N
4
W N x 4n 2 W
n 0
N
4
N 1
4
3k nk
W N x 4n 3 W
n 0
N
4
k 2k 3k
X(k) = F1 k WN F2 k WN F3 k WN F4 k
Here F1(k), F2(k), F3(k), F4(k) will be periodic with period N/4.
N
Thus for 0 k 1 , let m = k
4
k 2k 3k
X(k) = F1 k WN F2 k WN F3 k WN F4 k
m 2m 3m
= F1 m WN F2 m WN F3 m WN F4 m
N N
For k 1, let m = k N/4
4 2
N k N 2k N 3k N
X(k) = F1 k WN F2 k WN F3 k WN F4 k
4 4 4 4
m N /4
= F1 m WN WN F2 m WN2 mWNN /2 F3 m WN3mWN3 N /2 F4 m
m 2m 3m
= F1 m j WN F2 m 1 WN F3 m j WN F4 m
N 3N
For k 1, let m = k N/2
2 4
Using same method we get
m 2m 3m
X(k) = F1 m WN F2 m WN F3 m WN F4 m
3N 3N
and for k N 1, let m = k
4 4
We get
m 2m 3m
X(k) = F1 m jWN F2 m 1 WN F3 m j WN F4 m
To find X(k) we need to multiply F2(m) with WN2m , F3(m) with WN3m and F4(m) and then for each X(k)
seperately we multiply with 1, j, j, thus we say that only 3 complex multplication needed in each 4 point
N
butterfly multiplication with 1, j, j are not taken as complex multiplication. Thus each stage has
4
butterflies and log4N number of stages, Thus total number of complex multiplication is
N 3N
3 Log 4 N = Log 4 N
4 4
In each butterfly we need 12 complex addition. Thus total number of complex addition will be
N
12 Log 4 N = 3N log4N
4
Study Note
Comparison of DIT (Decimation-in-time) and DIF (Decimation-in-frequency) algorithms
Diffrence between DIT and DIF
1. In DIT, the input is bit reversed while the output is in normal order. For DIF, the reverse is true, i.e. the
input is normal order, while the output is it reversed. However both DIT and DIF can go from normal to
shuffled data or vice versa.
2. Consider the butterfly operation, while in DIF, the complex multiplication takes place before the add
subtract operations, while in DIF, the complex multiplication takes place after the add subtract opera-
tions.
Similarities
1. Both algorithms reqire the same number of operations to compute DFT.
2. Both algorithms require bit reversal at some place during computation.
2
1 N 1 j nk 1 N 1
x(n) = X k e N X k WN nk
N k 0 N k 0
Taking the conjugate of the above eqation for x(n), we get
N 1 * N 1
1 nk 1 * nk
x (n) =
*
N
X k W
k 0
N N
X k W
k 0
N
*
1 N 1 *
x(n) = X k WN nk
N k 0
The term inside the square brackets in the above equation for x(n) is same as the DFT computa-
tion of a sequence X*(k) and may be computed using any FFT algorithm. So we can say that the IDFT of
X(k) can be obtained by finding the DFT of X*(k), taking the conjugate of that DFT and dividing by N.
Hence, to compute the IDFT of X(k) the following procedure can be followed
1. Take conjugate of X(k), i.e. determine X*(k).
2 . Compute the N-point DFT of X*(k) using radix-2 FFT.
3 . Take conjugate of the output sequence of FFT.
4 . Divide the sequence obtained in step-3 by N.
The resultant sequence is x(n)
Thus,a signal FFT algorithm serves the evaluation of both direct and inverse DFTs.
Example 10.18
Solution 10.18
Direct computation of DFT
Number of complex multiplications = N2 = (256)2 = 65,356.
Number of complex addit ion = N(N1) = 256(2561) = 65,280
Radix2 FFT
N 256
Number of complex multiplications = log 2 N log 2 256 128 log 2 28
2 2
= 1280
Number of complex additions = N log2N = 256 log2 256 = 256log228 = 2568 = 2048.
Percentage saving
1024
= 100 100 98.43%
65536
2048
= 100 100 96.86%
65280
Example 10.19
Speech that is sampled at a rate of 10 kHz is to be processed in real time. Part of the
computations required involve collecting blocks of 1024 speech values and computing a
1024-point DFT and a 1024 point inverse DFT. If it takes 1s for each real multiply. how
much time remains for processing the data after the DFT and the inverse DFT are
computed?
Solution 10.19
With a 10-kHz sampling rate. a block of 1024 samples is collected every 102.4 ms. With a radix-2
FFT, the number of complex multiplications for a 1024-point DFT is approximately 512 log2 1024 =
5120. With a complex multiply consisting of four real multiplies. this means that we have 5.120. 4 =
20,480 real multiplies for the DFT and the same number for the inverse DFT. With 1s per multiply.
this will take
t = 2 . 20.48 = 40.96 ms
which leaves 61.44 ms for anly additional processing
Example 10.20
If FFT processor take 20 sec to compute complex multiplication and negligible time to
comput complex addtion then calculate time to compute FFT when
1 . N = 4096 using radix 2 FFT (including ±1 multiplication as complex multiplication)
2 . N = 729 using radix 3 FFT (including ±1 multiplication as complex multiplications)
Solution 10.20
1. Here total number of complex multiplication in radix 2 FFT are
N N
Log 2 N 1 = Log 2 N
2 2
N
Thus total time = Log 2 N 20 sec
2
= 49.1520102 sec
N
2. Here total number of complex multiplication in radix 3 FFT are 6 Log3 N
3
= 2 N Log3N
Total time = 2 N Log3N 20 sec
= 17.496102 sec