11 DFT and FFT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Chapter

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

10.2 Design of IIR filters


The DFT of a discrete-time signal x(n) is a finite duration discrete frequency sequence. The DFT
sequence is denoted by X(k). The DFT is obtained by sampling one period of the DTFT X(ej) of the signal
x(n) at a finite number of frequency points. This sampling is conventionally perfomed at N equally spaced
points in the period 0    2 or at k = 2k/N ; 0    N  1 . We can say that DFT is used for transforming
discrete-time sequence x(n) of finite length into discrete freqency sequence X(k) of finite length.
The DFT is important for two reasons. First it allows us to determine the frequency content of a
signal, that is to perform spectral analysis. The second application of the DFT is to perform filtering opera-
tion in the frequency domain.
Let x(n) be a discrete-time sequence with fourier transform X (ej), then the DFT of x(n) denoted by
X(k) is defined as

 
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

GATE MASTERS PUBLICATION


444 Signals & Systems

N 1 N 1
 j 2nk / N
DFT {x(n)} = X  k    x  n  e   x  n WNnk ; for k = 0,1,2,..,N  1 ...(1)
n0 n0

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 2nk / N  N
 X  k WNnk ; for k = 0,1,2,..,N  1 ...(2)
n 0 n 0

Where WN = ej(2N) is called the twiddle factor.


The N-point DFT pair x(n) and X(k) is denoted as
DFT
x ( n ) 
N
 X(k )
Thus N point DFT of signal x[n] means we take N samples of DTFT. Taking N samples of DTFT
(X(e )) of x[n] means we multiply X(ej) with P(ej) where P(ej) is impulse train in frequency domain.
j


 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

non periodic signal x[n] is repeated to make periodic signal 


x  n  with period then it is DTFS coefficients are

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

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 445

Study Note
N 1 2
1 j nk
 x  n e because for 0  n  N1,   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 

And N point DFT of x[n] is N time DTFS fo x  n .

Method to find N point DFT of a sequence x  n

To find N point DFT of sequence 


x  n of length (L) where L < N. We will simply apply eq(1)
and for values of n for which x[n] is not known is to be taken as zero.

Example 10.1

Find N point DFT of


(a) x [ n ] = [ n ]
(b) x [ n ] = a n , 0  n  10
Solution 10.1
(a) Here

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
n0
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 

GATE MASTERS PUBLICATION


446 Signals & Systems

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

(a) Find the 4-point DFT of x ( n ) = {1, 1, 2, 2} directly.


( b ) Find the IDFT of X ( k ) = {4, 2, 0, 4} directly.

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.

We know that the DFT {x(n)} is given by


N 1 N 1 3
 j  2  / N  nk
  x  n  e   , k = 0,1,2,3
nk  j  /2 nk
X(k) =  x  n WN   x  n  e
n 0 n 0 n 0

N 1
 X(0) =  x  n  e0  x  0  x 1  x  2  x  3 = 11+2 2= 0
n 0

3
X(1) =  x  n  e j /2n  x  0  x 1 e j/2  x  2 e j  x(3)e j3/2
n 0

= 1+(1)(0 j ) +2(1 j 0) 2(0 +j )


= 1 j
3
X(2) =  x  n  e jn  x  0  x 1 e j  x  2 e j 2  x(3)e j3
n 0

= 11(1 j 0) +2(1j 0) 2(1 j 0) = 6


3
 j  3 /2  n
 x  0   x 1 e    x  2  e j 3  x(3)e  
 j 3 /2  j 9  /2
X(3) =  x  n  e
n 0

=11( j ) +2(1j 0) 2( j 0) = 1+j


 X(k) ={0, 1j, 6, 1 +j }
(b) Given DFT is X(k) = {4, 2, 0, 4}. The IDFT of X(k), i.e. x(n) is given by
N 1 N 1
1 1
x(n) =
N
 X  k WNnk  N  X  k  e j 2/ N nk
k 0 k 0

3
1
i.e. x(n) =
N
 X  k  e j / N nk
k 0

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 447

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 jk  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 j3/2k  4  X  0  X 1 e j3/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, 1j 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/3nk , 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 

GATE MASTERS PUBLICATION


448 Signals & Systems

= 2 + (0.5 + j0.866) + 2(0.5  j0.866)


= 0.5  j0.866
 3-point DFT of x(n) = X(k) = {5,0.5 + j0.866,0.5  j0.866}
To compute the 6-point DFT, convert the 3-point sequence x(n) into 6-point sequence by padding
with zeros.
x ( n ) = {2, 1, 2, 0, 0, 0}, N = 6
N 1 5
DFT {x(n)} = X  k    x  n WNnk   x  n  e j 2/ N nk , k = 0,1,2,3,4,5
n 0 n0

 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
= 2e
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

= 2   cos   j sin    2  cos 2  j sin 2 


=21+2=3
 j  4  /3
 x  2 e  
 j 8  /3
When k = 4, X(4) = 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.5j0.866 1.5j0.866
Since 6-point = 3  2-point
X(k) of 3-point sequence = X(2k) of 6-point sequence

10.3 Matrix Formulation of the DFT and IDFT


If we let WN = ej (2/N), the defining relations for the DFT and IDFT may be written as

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 449

N 1
X(k ) =  x  n WNnk , k = 0,1,...., N  1
n 0

N 1
1
x(n) =
N
 X  k WNnk , 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

The matrix x may be expressed in terms of the inverse of WN as:

x = WN1 X ...(8)

The matrix WN1 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

We can see that


REMEMBER

1
WN1 = WN* 
N 

Example 10.4

Find the DFT of the sequence


x ( n ) = { 1, 2, 1, 0}

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.

GATE MASTERS PUBLICATION


450 Signals & Systems

W40 W40 W40 W40   x(0)  1 1 1 1  1   0 


 0 
W4 W4
1
W42 W43   x(1)  1  j 1 j   2    j 2 
   
X(k) = W40 W42 W44 W46   x(2)  1 1 1 1 1   0 
      
W 0 W 3 W46 W49   x(3)  1 j 1  j  0   j 2 
 4 4

The result is DFT {x(n)} = X(k) = {4, j2, 0, j2}

10.4 Representation of discrete periodic signal on a circle


Looking at a discrete periodic signal of period N on a circle, that is let x[n] is discrete periodc signal
with period N. Now suppose we want to find value of x[k] then we move k steps on this circle anticlockwise
and get the vlaue. That is to get value of x[1] we move 1 step anticlockwise for x[10] we move 10 stpes.

x[2]
x[4]

x[3]
x[3] x[1]
Start point
x[2] Start point
x[N2]
x[N1] 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]

To right shift a signal x [ n ] periodic with period N by k units.


That is we need x[n-k, mod N] then we move all point on the circle of figure (10.1) anticlockwise
by k steps to get circular representation of x[n-k, mod N]

x[2]
x[1]
x[0]
x[N 1]

x[N  1] x[0] x[k  2]


x[3] x[N  3]
Start point Start point
x[1] Start point
x[2] x[k  1] x[N  2]
x[2]
x[N  1]
x[Nk1] x[k] x[1]
x[N  k] x[0]
Figure 10.3 Right shift of signal Figure 10.4 Left shift of signal Figure 10.5 Inversion of signal x[n]
by k units by k units

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 451

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.

Thus x[n, mod N] = x[N n], 0  n  N 1

10.5 Properties of DFT


In all the properties the assumption is that : x[n] which was non periodic and is made periodic with
period N corresponsing to N point DFT.

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 2n k  N / N   x  n  e j 2nk / N e j 2nN / N
n 0 n0

But ej2n = 1 for all n (Here n is an integer)

N 1
 X(k +N ) =  x  n  e j 2nk / 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 2nk / N
n 0

N 1 N 1
 j 2 nk / N
= a  x1  n  e  b  x2  n  e j 2nk / N
n0 n0
= aX1(k) + bX2(k)

10.4.2 Time reversal of the sequence


Since time domain signal x[n] is periodic with period N and when then reversal (x[-n]) is dare then
 
x [ n ] =  x  N  1 , x  0, x 1 , x  2....x  N  1 , x  0 , x 1...
  
To generate x[n] we take mirror image of x[n] about n = 0

GATE MASTERS PUBLICATION


452 Signals & Systems

 
 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(Nn)}
= X[(k),mod N] = X(Nk)

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

10.5.4 Circular frequency shift


If DFT {x(n)} = X(k)
Then, DFT {x(n)ej2mn/N} = X{(k m)}, (mod N )
N 1
Proof : DFT {x(n)e j2mn/N
} =  x  n e j 2mn/ N e j 2kn/ N
n 0

N 1 N 1
=  x  n  e j 2n k m / N   x  n  e j 2n N k m / N
n 0 n 0

= X(N +k  m) = X[(k  m), (mod N)]

The basic property to learn is


REMEMBER
DFT
If x [ n ]   X(k)
DFT
Then e j 2 mn / N x(n) 
 X(k  m)

10.5.5 Complex Conjugation Property


If DFT {x(n)} = X(k)
Then DFT {x*(n)}= X *(N  k) = X *[(k), mod N]
N 1
Proof DFT {x*(n)}=  x*  n  e j 2kn / N
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
 n0 

DFT {x*(N  n)} =X *(k)

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 453

N 1
1
Proof IDFT {X *(k)} =
N
 X *  k  e j 2kn / N
k 0

* *
1  N 1  j 2 kn / N  1  N 1 j 2kn /  N  n  / N 
=  X  k  e    X k e 
N  k 0  N  k 0 
= x*(N  n)

The basic property to learn is


REMEMBER
DFT
If x[n] 
 X(k)

Then x*[n] 


DFT
 X *(k)
Considering few cases :-
Case : 1. Signal x[n] is real
That is x [ n ] = x* [ n ]
then X(k) = X *[k]
Thus X(k) that is DFT will be conjugate symmetric

Case : 2. Signal x[n] is real and even


That is x [ n ] = x*[n] and x[n] = x[n]
Then X(k) = X *(k) and X(k) = X(k)
 X(k) = X(k) = X*(k)
Thus X(k) that is DFT will be real and even
Case : 3. Signal x[n] is real and odd
That is x [ n ] = x*[n] and x[n] = x[n]
 X(k) = X *(k) and X(k) = X(k)
 X(k) = X *(k) = X(k)
Thus X(k) that is DFT is imaginary and odd
Case : 4. If x[n] is real and it’s DFT is X(k) [X(k) = Re(X(k) + j Img (X(k)))] then DFT of even and
odd part of x[n] wil be
Since x [ n ] = xe[n]+xo[n]
Here x[n] is real
 X(k) = X *(k) or X(k)* = X(k)
x  n   x  n 
Since xe [ n ] =
2

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

GATE MASTERS PUBLICATION


454 Signals & Systems

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

10.5.6 DFT of Delayed Sequence -Time shifting property


Let x(n) be a discrete sequence, and x(nno) be a delayed or shifted sequence of x(n) by no units of
time.
If DFT {x(n)} = X(k)
 j 2no k / N
Then DFT {x[(nno)]} = X(k) e
Proof By the definition of IDFT

N 1 2
1 j nk
IDFT{X(k)} = x  n    X k e N
N k 0

Replacing n by n  no, we have


2 2
1 N 1 j  n  n0  k 1 N 1  j no k  j 2  nk
x(n  no) =
N
 X k e N
=
N
  X k e N
e N
k 0 
k 0  

 2
 j no k 
= IDFT  X  k  e N 
 

On taking DFT of both sides, we get


2
j kno
DFT [x(n  no)] = X  k  e N

The basic property to learn is


REMEMBER
DFT
If x [ n ] 
 X(k )

go with some sign 2


Then j , no k
x n  no 
DFT
 X k e N

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 455

10.5.7 Multiplication of two sequence


If DFT [ x1(n)] = X1(k)
and DFT [x2(n)] = X2(k)

1
Then DFT [x1(n)]x2(n) =  X 1  k   X 2  k  
N

Here X1  k   X 2  k  is circular convolution of two periodic signals.

10.5.8 Circular convolution of two sequence


The convolution property of DFT says that, the multiplication of DFTs of two sequences if eqivalent
to the DFT of the circular convolution of the two sequences.
Let DFT [x1(n)] = X1(k) and DFT [x2(n)] = X2(k), then by the convolution property
X1(k)X2(k) = DFT {x1(n)  x2(n)}.

10.5.9 Parseval’s theorem


Parseval’s theorem says that the DFT is an energy-conserving transformation and allows us to
find the signal energy either from the signal or its spectrum. This implies that the sum of squares of the
signal is related to the sum of squares of the magnitude of the DFT samples.
If DFT {x1(n)} = X1(k)
and DFT {x2(n)} = X2(k)

N 1 N 1
1
Then  x1  n x2*  n =
N
 X1  k  X 2*  k 
n0 k 0

If we take same signal then

N 1 N 1
1
 x1  n x1*  n =
N
 X1  k  X1*  k 
n0 k 0

N 1 N 1
2 1 2
 x1  n =
N
 X1  k 
n 0 k 0

We can see that LHS of his equation is energy of signal x(n).

10.5.10 Circular Correlation


For complex valued sequences x(n) and y(n),
If DFT {x(n)} = X(k)
and DFT {y(n)} = Y(k)
Then

 N 1 
DFT {rxy(l)} = DFT   x  n  y   n  l   , mod N   X  k  Y  k 
* *

 n 0 

here, rxy(l) is the circular cross correlation sequence.

GATE MASTERS PUBLICATION


456 Signals & Systems

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] =
n0 N k 0

Manipulating the first equation we get

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

Property Time domain Frequency domain


Periodicity x(n) = x(n + N) X(k) = X(k + N )
Linearity ax1(n) +bx2( n) aX1(k) + bX 2(k)
Time reversal x((n), mod N ) = x(N + n) X(N  k)
Circular time shift (delayed sequence) x(( n l), mod N ) X(k)ej2kl/N
j2ln/N
Circular frequency shift x(n)e X((k  l), mod N )
Circular convolution x1(n) x2(n) X1(k)X2(k)
1
Multiplication of two sequences x1(n)x2(n)
N
X1 k   X 2 k 
* *
Complex conjugate x (n) X (N k)
*
Circular correlation x1(n)  y (n) X(k)Y*(k)

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

10.6 Circular Convolution


Suppose x1[n] and x2[n] are two non periodic sequence, their N point DFT is X1(k) and X2(k). Since N

point DFT X1(k) will correspond to x1  n  and x1  n  where x1  n  and x1  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

convolution of x1[n] and x2[n] that is

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

 y [0] = x1[0]x2[0] + x1[1]x2[1] +x1[2]x2[2] +x1[3]x2[3]


Applying mod 4, y [0] = x1[0]x2[0] + x1[1]x2[] +x1[2]x2[2] +x1[3]x2[1]
Similarly we can write for y[1], y[2], y[3] but this is a lengthy method, this can be simplified as
First of all we write the terms of x1[n] and multiply then as we do in simple method.

x2 3 x2 2 x2 1 x2 0


x1 3 x1 2 x1 1 x1 0
x1[0]x2[3] x1[0]x2[2] x1[0]x2[1] x1[0]x2[0]
x1[1]x2[3] x1[1]x2[2] x1[1]x2[1] x1[1]x2[0] 
x1[2]x2[3] x1[2]x2[2] x1[2]x2[1] x1[2]x2[0]  
x1[3]x2[3] x1[3]x2[2] x1[3]x2[1] x1[3]x2[0]   

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]

Now perform addition and get result.

GATE MASTERS PUBLICATION


458 Signals & Systems

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

Let X ( k ) be a 12-point DFT of length 12 real sequence x ( n ). The first 7 samples of X ( k )


are given by X (0) = 8, X (1) = 1+ j 2, X (2) = 2 + j 3, X (3) = 1  j 4, X (4) = 2+ j 2, X (5) =
3+ j 1, X (6) = 1 j 3. Determine the remaining samples of X ( k ).
Solution 10.6

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 459

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

The DFT of a real signal is {1, A , 1, B , 0,  j 2, C , 1+ j }. Find A , B and C .

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*(81),X(2),X*(83),X(4),X(5),X*(86),X(7)}
= {1, 1 j, 1, j2, 0, j2, 1, 1+j }
A = 1j, B = j2 and C = 1

Example 10.8

Let x ( n ) = { A ,2,3,4,5,6,7, B }. If X (0) = 20 and X (4) = 0, find A and B .

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,1j, 1, j2,7, j2, 1, 1+j }

GATE MASTERS PUBLICATION


460 Signals & Systems

Using Parseval’s theorem, we have signal energy

N 1
2 1 N 1 2
=  x  n   X k 
n 0 N n0

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

Consider the length-6 sequence defined for 0  n < 6


x(n) = {1, 2, 3, 0, 1, 1}
with a 8-point DFT X ( k ). Evaluate the following functions of X ( k ) without computing
DFT:
(a) X (0), ( b )X(3),
5 5
2
(c)  X k  , (d)  X k 
k=0 k=0

Solution 10.10

N 1 2
j nk
(a) We know that X(k) =  x  n e N , k = 0, 1,..., N  1
n0

5 5
0
 X(0) =  x  n e   x  n   1  2  3  0  1  1  2
n0 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

(d) From Parseval’s theorem


5 5
2 2
 X k   N  x n 2 2 2 2 2 2
= 6 1   2    3   0    1  1 
k 0 n0  
= 6(1+4+9+0+1+1) = 96

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 461

Example 10.11

If the DFT { x ( n )} = X ( k ) = {4, - j 2, 0, j 2}, using properties of DFT, find


(a) DFT of x ( n - 2) ( b ) DFT of x (- n )
(c) DFT of x * ( n ) ( d ) DFT of x 2 ( n )
(e) DFT of x ( n )  x( n ) ( f ) Signal energy
Solution 10.11
(a) Using the time shift property of DFT, we have for N = 4
2
j 2k
DFT {x(n 2)} = e 4 X  k   e jk X  k 
= {X(0)e0,X(1)ej,X(2)ej2,X(3)ej3}
= {4(1), j2(1), 0(1), j2(1)} = {4, j2, 0, j2}
(b) Using the flipping (time reversal) property of DFT, we have
DFT {x(n)} = X(k) = X*(k) = {4, j2, 0, j2}* = {4, j2, 0, j2}
(c) Using the conjugate property of DFT, we have
DFT {x*(n)} = X*(k) = {4, j2, 0,2j }*= {4, j2, 0, j2}
Since DFT {x*(n)} = DFT {x(n)}, we can say that x(n) is real valued.
(d) Using the property of convolution of product of two signals, we have

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

If IDFT { X ( k )} = x ( n ) = {1,2,1,0}, using properties of DFT, find


(a) IDFT { X ( k 1)} ( b ) IDFT { X ( k ) X ( k )}
(c) IDFT { X ( k ) X ( k )} (d) Signal energy
Solution 10.12

Given IDFT {X(k)} = x(n) = {1,2,1,0}


(a) Using modulation property, we have

GATE MASTERS PUBLICATION


462 Signals & Systems

n
j
IDFT {X(k 1)} = x(n)ej2n/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

10.7 Insight into formulae of DFT


Formulae are

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

1 . Average value of periodic signal X(k) is

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 

3. The sun of all values of sequence x[n]


N 1

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

4 . Using DFT to find IDFT

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 463

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 N1 j .mk
Then
N

DFT  X *  k  = X  k  e N
N k0
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

y[n] =  x1 (0) x1[1] x1[2] x1[3]


6 . If x[n] is a discrete time signal and x1(k), x2(k), x3(k) are N point, 2N point 3N point DFT of x[n]

N 1 2
j . n. k
Then X1(k) =  x  n e
n0
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

n0

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

10.8 Linear Convolution Using The DFT


The DFT support only circular convolution . When two numbers of N-point sequence are circularly
convolved, it produce another N-point sequence. For circular convolution, one of the sequence should be
periodically exteneded. Also the resultant sequence is periodic with period N. The linear convolution of two
sequence of length N1 and N2 produces output sequence of length N1 + N21. To perform linear convolution
using DFT, both the sequence should be converted to N1 + N21 sequences by padding with zeros. Then
take N1 + N21 point DFT of both the sequences and determine the product of their DFTs. The resultant
sequence is given by the IDFT of the product of DFTs. [Actually the response is resultant sequence is given
by the circular convolution to the N1 + N21 sequences].
Let x(n) be an N1-point sequence and h(n) be an N2-point sequence. The linear convolution of
x(n) and h(n) produces a sequence h(n) of length N1 + N21. So pad x(n) with N21 zeros and h(n) with N11

GATE MASTERS PUBLICATION


464 Signals & Systems

zeros and make both of them of length N1 + N2 1. Let X(k) be an N1 + N21 point DFT of x(n), and H(k) be
an N1 + N21 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)}

10.9 Convolution of Long Sequence


The response of an LTI system for any arbitrary inputis given by linear convolution of the input and
the impulse response of the system. While implementing linear convolution in FIR filters, the input signal
sequence x(n) is much longer than the impulse response h(n) of a DSP system. If one of the sequence is very
much longer than the other, then it is very difficults to compute linear convolution using DFT for the
following reasons:
1. The entire sequence must be available before convolution can be carried out. This makes long
delay in getting in the output.
2. Large amouts of memory is required and computation of DFT becomes cumbersome. To overcome
these problems, we go to sectioned convolutions. In this technique, the longer sequence is sectioned (or
splitted) into the size of smaller sequence. If required, the longer sequence may be padded with zeros. Then
the linear convolution of each section (block) of longer sequence and the smaller sequence is performed. The
output sequence obtained from the convolutions of all the sections are combined to get the overall ouput
sequence. There are two of sectioned convolutions. They are overlap-add method and overlap-save method.

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

We would like to linearly convolve a 3000-point sequence with a linear shift-invariant


filter whose unit sample response is 60 point long. To utilize the computational efficiency of the
fast fourier transform algorithm, the filter is to implemented using 128-point discrete fourier
tranforms and inverse discrete fourier tranforms. If the overlap-add method is used, how many
DFTs are needed to complete the filtering operation?

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 465

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

Find the 10-point inverse DFT of

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

Similarly DFT of constant is a unit sample


DFT
x2(n ) = 1  X 2  k   N (k)

Therefore, it follows that

1
x(n) =  n
5

Example 10.16

Consider the finite-length sequence


x ( n ) = ( n ) + ( n  5)
( a ) Find the 10-point discrete fourier transfrom of x ( n ).
( b ) Find the sequence that has a discrete fourier transform


j2k
Y(k) = e 10 X k 

GATE MASTERS PUBLICATION


466 Signals & Systems

where X ( k ) is the 10-point DFT of x ( n ).


( c ) Find the 10-point sequence y ( n ) that has a discrete fourier transform
Y(k ) = X(k)W(k)
where X ( k ) is the 10-point DFT of x ( n ), and W ( k ) is the 10-point DFT of the
sequence

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(n3)+(n8)
(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

Consider the sequence


x ( n ) = 4( n )+ 3( n 1) + n ( n 3)
Let X ( k ) be the six-point DFT of x( n ).
( a ) Find the finite-length sequence y ( n ) that has a sixpoint DFT

Y ( k ) = W64k X  k 
( b ) Find the finite-length sequence w ( n ) that has sixpoint 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((n4))6
It follows that
y( n ) = 4(n4)+3(n5)+2(n)+(n1)
(b) The real part f X(k) is

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 467

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
 n0  n0

N 1 N 1
 N n k
*
=  x  n WN   x*   N  n   N WNnk
n 0 n 0

X*(k) is the DFT of x*((Nn))N. Therefore, the inverse DFT of Re {X(k)}is

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

10.10 Fast Fourier Transform (FFT)


The FFT is a method to compule DFT of any signal x[n] will less number of complex multiplication
and complex addition. Since N point DFT is

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  0WN0  x 1WNK  x  2WN2 K      x  N  1WN

Thus to calculate one terms of DFT (N1) complex addition and N complex multiplication are needed.
For N terms we need N2 complex multiplication and N(N1) 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

kN
 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

GATE MASTERS PUBLICATION


468 Signals & Systems

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(N1) 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

Since WNk 2 n = WNkn and WN 2 n 1 k  WNkWNnk


2 2

N N
1 1
2 2
nk
 X( k ) =  g  n W N  WNk  h  n  WNnk
n 0 2 n0 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).
n0 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

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 469

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 kN1
 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  1W nk
N
n0 4 2 n0 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

GATE MASTERS PUBLICATION


470 Signals & Systems

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  1W
n 0
N
4
is
4
point DFT of f2[n]

k
 G(k) = F1  k   WN F2  k 
2

F1(k) and F2(k) are periodic with period N 4

kN
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

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 471

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

Thus 3rd stage of FFT will be

 
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)

Figure 10.8: Third stage of FFT algorithm for N = 8.

The 8 point DFT using radix -2 FFT


The computation of 8-point DFT using radix-2 FFT involves three stages of computation. Here N =
8 = 23, therefore, r = 2 and m = 3. The given 8-point sequence is decimated into four 2-point sequence. For
each 2-point sequence, the two point DFT is computed. From the results of four 2-point DFTs, two 4-point
DFTs are obtained and from the result of two 4-point DFTs, the 8-point DFT is obtained
Let the given 8-sample sequence x(n) be {x(0),x(1),x(2),x(3),x(4),x(5),x(6),x(7)}. The 8-samples should
be decimated into sequences of two samples. Before decimation they are arranged in bit reversed order as
shown in Table (10.2)
Table 10.2 Normal and bit reversed order for N - 8

Normal order Bit reversed order


x(0) x(000) x(0) x(000)
x(1) x(001) x(100)
x(2) x(010) x(2) x(010)
x(3) x(011) x(6) x(110)
x(4) x(100) x(1) x(001)
x(5) x(101) x(5) x(101)
x(6) x(110) x(3) x(011)
x(7) x(111) x(7) x(111)

GATE MASTERS PUBLICATION


472 Signals & Systems

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.

x(0) Compute X(0)


x(4) 2-point DFT Combine 2-point X(1)
DFTs to get
x(2) Compute 4-point DFT X(2)
Combine
x(6) 2-point DFT X(3)
4-point
DFTs to
x(1) Compute get 8-point X(4)
x(5) 2-point DFT DFT
Combine 2-point X(5)
DFTs to get
x(3) Compute 4-point DFT X(6)
x(7) 2-point DFT X(7)

Figure 10.9 : Three stage of computation in 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

shown in figure (10.11)

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

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 473

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)
 

W80 W82 W83


x(7) X(7)
  

Figure 10.11 : A complete eight-point radix-2 decimation-in-time FFT.

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

GATE MASTERS PUBLICATION


474 Signals & Systems

N
= Log 2 N . .
2
Total Number of complex addition =Number of stageNumber 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 n0

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
n0 3 n0 3 n0 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 

Since F1(k), F2(k) and F3(k) are


N point DFT so they will be priodic with period N
3 3
N 2N
Thus for k  1, let m = k  N
3 3 3
 N k  N 2k  N
X(k) = F1  k    WN F2  k    WN F3  k  
 3  3  3
m N /3 2m 2 N /3
= F1  m   WN WN F2  m   WN WN F3  m 
2N
and for  k  N1, let m = k 2N/3
3

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 475

 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)

Figure 10.12 : First stage of 9 point DIT FFT(only one butterfly)

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

GATE MASTERS PUBLICATION


476 Signals & Systems

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 

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 477

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

10.12 Decimation in Frequency (DIF) Radix 2 FFT


In decimation in frequency algorithm, the frequency domain sequence X(k) is decimated. In this
algorithm, the N-point time domain sequence is converted to two numbers of N/2-point sequences. Then
each N/2-point is converted to two numbers of N/4-point sequences. This process is continued until we get
N/2 numbers of 2-point sequences. Finally, the 2-point DFT of each 2-point sequence is computed. The
2-point DFTs of N/2 numbers of 2-point sequence for N/2 will give N-samples, which is the N-point DFT of
the time domain sequence. Here the equaions for N/2-point sequence, N/4-point sequence, etc., are obtained
by decimation of frequency domain sequences. Hence this method is called DIF. The number of complex
multiplication and addition are same in DIT and DIF FFT. No need of analysis of DIF thats why we have
skipped it from the book.

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.

10.13 Computation of IDFT through FFT


The IDFT of an N-point sequence {X(k)}; k = 0, 1, ...., N  1 is defined as

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

GATE MASTERS PUBLICATION


478 Signals & Systems

N 1 * N 1
1  nk  1 * nk
x (n) =
*
N

 X  k W
k 0
N  N

 X  k W
k 0
N

Taking the conjugate of the above equation for x*(n), we get

*
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

Calculate the percentage saving in calculations in a 256-point radix-2 FFT, when


compared to direct DFT?

Solution 10.18
Direct computation of DFT
Number of complex multiplications = N2 = (256)2 = 65,356.
Number of complex addit ion = N(N1) = 256(2561) = 65,280
Radix2 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 = 256log228 = 2568 = 2048.
Percentage saving

Number of multiplications in radix-2 FFT


Percentage saving in multications = 100- ×100
Number of multiplications in direct FFT

1024
= 100   100  98.43%
65536

Number of multiplications in radix-2 FFT


Percentage saving in additions = 100- ×100
Number of multiplications in direct FFT

GATE MASTERS PUBLICATION


Discrete Fourier Transform and Fast Fourier Transform 479

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 1s 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 1s 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.1520102 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.496102 sec



GATE MASTERS PUBLICATION

You might also like