DFT FFT Notes
DFT FFT Notes
DFT FFT Notes
INTRODUCTION :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
Fourier transform X(W) of the signal x(n) at a finite number of frequency points. This sampling is
conventionally performed at N equally spaced points in the period 0 ≤w≤2w or at wk = 2πk/N;
0 ≤ k≤ N – 1. We can say that DFT is used for transforming discrete-time sequence x(n) of finite length
into discrete frequency 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 operation in the frequency domain. Let x(n) be a
discrete-time sequence with Fourier transform X(W), then the DFT of x(n) denoted by X(k) is defined
as
The DFT of x(n) is a sequence consisting of N samples of X(k). The DFT sequence starts at k = 0,
corresponding to w = 0, but does not include k = N corresponding to w = 2π (since the sample at w = 0
is same as the sample at w = 2 π). Generally, the DFT is defined as
EXAMPLE 2.1 (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:
(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
EXAMPLE 2.2 (a) Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
(b) Find the IDFT of X(k) = {1, 0, 1, 0}.
EXAMPLE 2.3 Compute the DFT of the 3-point sequence x(n) = {2, 1, 2}. Using the same sequence,
compute the 6-point DFT and compare the two DFTs.
To compute the 6-point DFT, convert the 3-point sequence x(n) into 6-point sequence by
padding with zeros.
MATRIX FORMULATION OF THE DFT AND IDFT
THE IDFT FROM THE MATRIX FORM
WN is called the IDFT matrix. We may also obtain x directly from the IDFT relation in matrix form,
where the change of index from n to k and the change in the sign of the exponent in e j(2/N)nk lead to
the conjugate transpose of WN. We then have
EXAMPLE 2.6. Find the 4-point DFT of x(n) = {1, –2, 3, 2}.
Solution: Given x(n) = {1, –2, 3, 2}, the 4-point DFT{x(n)} = X(k) is determined using matrix as
shown below.
EXAMPLE 2.6 Find the IDFT of X(k)={4, –j2, 0, j2} using DFT.
Solution: Given X(k) = {4, –j2, 0, j2} _ X*(k) = {4, j2, 0, –j2}
The IDFT of X(k) is determined using matrix as shown below.
To find IDFT of X(k) first find X*(k), then find DFT of X*(k), then take conjugate of DFT {X*(k)} and
divide by N.
PROPERTIES OF DFT
Like the Fourier and Z-transforms, the DFT has several important properties that are used to
process the finite duration sequences. Some of those properties are discussed as follows
Periodicity:
If a sequence x(n) is periodic with periodicity of N samples, then N-point DFT of the sequence, X(k) is
also periodic with periodicity of N samples.
Hence, if x(n) and X(k) are an N-point DFT pair, then
Linearity
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 samples is related to the sum of squares of the magnitude of the DFT
samples.
Circular Correlation
Linear Convolution using DFT
The DFT supports only circular convolution. When two numbers of N-point sequence are circularly
convolved, it produces another N-point sequence. For circular convolution, one of the sequence should
be periodically extended. Also the resultant sequence is periodic with period N. The linear convolution
of two sequences of length N1 and N2 produces an output sequence of length N1 + N2 – 1. To perform
linear convolution using DFT, both the sequences 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 given by the circular convolution of 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 y(n) of length N1 + N2 – 1. So pad x(n) with N2 – 1 zeros and h(n) with N1 – 1 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 given by the inverse DFT of the product X(k)
H(k).
y(n) = IDFT {X(k)H(k)}
This technique of convolving two finite duration sequences using DFT techniques is called fast
convolution. The convolution of two sequences by convolution sum formula. This technique of
convolving two finite duration sequences using DFT techniques is called fast convolution. The
convolution of two sequences by convolution sum formula.
Y(n)=∑∞
−∞ 𝑥(𝑘)ℎ(𝑛 − 𝑘)
is called direct convolution or slow convolution. The term fast is used because the DFT can be
evaluated rapidly and efficiently using any of a large class of algorithms called Fast Fourier Transform
(FFT). In a practical sense, the size of DFTs need not be restricted to N1 + N2 – 1-point transforms.
Any number L can be used for the transform size subject to the restriction L _ (N1 + N2 – 1). If
L > (N1 + N2 – 1), then y(n) will have zero valued samples at the end of the period.
EXAMPLE 2.1 Find the linear convolution of the sequences x(n) and h(n) using DFT.
x(n) = {1, 2}, h(n) = {2, 1}
Solution: Let y(n) be the linear convolution of x(n) and h(n). x(n) and h(n) are of length 2 each. So
the linear convolution of x(n) and h(n) will produce a 3 sample sequence (2 + 2 – 1 = 3). To avoid time
aliasing, we convert the 2 sample input sequences into 3 sample sequences by padding with zeros.
EXAMPLE 2.2 Find the linear convolution of the sequences x(n) and h(n) using DFT.
x(n) = {1, 0, 2}, h(n) = {1, 1}
Solution: Let y(n) be the linear convolution of x(n) and h(n). x(n) is of length 3 and h(n) is
of length 2. So the linear convolution of x(n) and h(n) will produce a 4-sample sequence
(3 + 2 – 1 = 4). To avoid time aliasing, we convert the 2-sample and 3-sample sequences
into 4-sample sequences by padding with zeros.
x(n) = {1, 0, 2, 0} and h(n) = {1, 1, 0, 0}
By the definition of N-point DFT, the 4-point DFT of x(n) is:
Therefore, the linear convolution of x(n) and h(n) is:
y(n) = x(n) * h(n) = {1, 1, 2, 2}
The linear convolution of x(n) = {1, 0, 2} and h(n) = {1, 1} is obtained using the tabular
method as shown below.
OVERLAP-ADD METHOD :
In overlap-add method, the longer sequence x(n) of length L is split into m number of smaller
sequences of length N equal to the size of the smaller sequence h(n). (If required zero padding may be
done to L so that L = mN). The linear convolution of each section (of length N) of longer sequence with
the smaller sequence of length N is performed. This gives an output sequence of length 2N – 1.
In t his method, the last N – 1 samples of each output sequence overlaps with the first N – 1
samples of next section. While combining the output sequences of the various sectioned convolutions,
the corresponding samples of overlapped regions are added and the samples of non-overlapped regions
are retained as such. If the linear convolution is to be performed by DFT (or FFT), since DFT supports
only circular convolution and not linear convolution directly, we have to pad each section of the longer
sequence (of length N) and also the smaller sequence (of length N) with N – 1 zeros before computing
the circular convolution of each section with the smaller sequence. The steps for this fast convolution
by overlap-add method are as follows:
Step 1: N – 1 zeros are padded at the end of the impulse response sequence h(n) which isof length N
and a sequence of length 2N – 1 is obtained. Then the 2N – 1 point FFT is performed and the output
values are stored.
Step 2: Split the data, i.e. x(n) into m blocks each of length N and pad N – 1 zeros to each block to
make them 2N – 1 sequence blocks and find the FFT of each block.
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of each of the selected block in
Step 2.
Step 4: A 2N – 1 point inverse FFT is performed on each product sequence obtained in Step 3.
Step 5: The first (N – 1) IFFT values obtained in Step 4 for each block, overlapped with the last N – 1
values of the previous block. Therefore, add the overlapping values and keep the non-overlapping
values as they are. The result is the linear convolution of x(n) and h(n).
OVERLAP-SAVE METHOD
In overlap-save method, the results of linear convolution of the various sections are obtained
using circular convolution. Let x(n) be a longer sequence of length L and h(n) be a smaller
sequence of length N. The regular convolution of sequences of length L and N has L + N – 1
samples. If L > N, we have to zero pad the second sequence h(n) to length L. So their linear
convolution will have 2L – 1 samples. Its first N – 1 samples are contaminated by
wraparound and the rest corresponds to the regular convolution. To understand this let L =
12 and N = 5. If we pad N by 7 zeros, their regular convolution has 23 (or 2L – 1) samples
with 7 trailing zeros (L – N = 7). For periodic convolution, 11 samples (L – 1 = 11) are
wrapped around. Since the last 7 (or L – N) are zeros only, first four samples (2L – 1) – (L)
– (L – N) = N – 1 = 5 – 1 = 4 of the periodic convolution are contaminated by wraparound.
This idea is the basis of overlap-save method. First, we add N – 1 leading zeros to the longer
sequence x(n) and section it into k overlapping (by N – 1) segments of length M. Typically
we choose M = 2N. Next, we zero pad h(n) (with trailing zeros) to length M, and find the periodic
convolution of h(n) with each section of x(n). Finally, we discard the first N – 1 (contaminated)
samples from each convolution and glue (concatenate) the results to give the required convolution.
Step 1: N zeros are padded at the end of the impulse response h(n) which is of length N and a sequence
of length M = 2N is obtained. Then the 2N point FFT is performed
and the output values are stored.
Step 2: A 2N point FFT on each selected data block is performed. Here each data block begins with the
last N – 1 values in the previous data block, except the first data
block which begins with N – 1 zeros.
Step 3: The stored frequency response of the filter, i.e. the FFT output sequence obtained in Step 1 is
multiplied by the FFT output sequence of each of the selected blocks
obtained in Step 2.
Step 4: A 2N point inverse FFT is performed on each of the product sequences obtained in
Step 3.
Step 5: The first N – 1 values from the output of each block are discarded and the remaining values are
stored. That gives the response y(n).
In either of the above two methods, the FFT of the shorter sequence need be found only once, stored,
and reused for all subsequent partial convolutions. Both methods allow online implementation if we
can tolerate a small processing delay that equals the time required for each section of the long sequence
to arrive at the processor
2.2 INTRODUCTION
The N-point DFT of a sequence x(n) converts the time domain N-point sequence x(n) to a
frequency domain N-point sequence X(k). The direct computation of an N-point DFT requires
N x N complex multiplications and N(N – 1) complex additions. Many methods were
developed for reducing the number of calculations involved. The most popular of these is the
Fast Fourier Transform (FFT), a method developed by Cooley and Turkey. The FFT may be
defined as an algorithm (or a method) for computing the DFT efficiently (with reduced
number of calculations). The computational efficiency is achieved by adopting a divide and
conquer approach. This approach is based on the decomposition of an N-point DFT into
successively smaller DFTs and then combining them to give the total transform. Based on
this basic approach, a family of computational algorithms were developed and they are
collectively known as FFT algorithms. Basically there are two FFT algorithms; Decimation- in-
time (DIT) FFT algorithm and Decimation-in-frequency (DIF) FFT algorithm. In this chapter,
we discuss DIT FFT and DIF FFT algorithms and the computation of DFT by these methods.
N 1
X ( K ) x(n)e j 2 nk / N , K 0,1, 2,....N 1 where
n 0
Let WN be the complex valued phase factor, which is an Nth root of unity given by
WN e j 2 nk / N
Thus,
X(k) becomes,
N 1
X ( K ) x(n)WN nk , K 0,1, 2,....N 1
n 0
FFT algorithm exploits the two symmetry properties and so is an efficient algorithm for DFT
computation.
By adopting a divide and conquer approach, a computationally efficient algorithm can
be developed. This approach depends on the decomposition of an N-point DFT into
successively smaller size DFTs. An N-point sequence, if N can be expressed as N = r1r2r3, ..., rm.
where r1 = r2 = r3 = ... = rm, then N = rm, can be decimated into r-point sequences. For each r-
point sequence, r-point DFT can be computed. Hence the DFT is of size r. The number r is
called the radix of the FFT algorithm and the number m indicates the number of stages in
computation. From the results of r-point DFT, the r2-point DFTs are computed. From the
results of r2-point DFTs, the r3-point DFTs are computed and so on, until we get rm-point
DFT. If r = 2, it is called radix-2 FFT.
N
Given sequence x(n) : x(0), x(1), x(2),.....x( 1)....x( N 1)
2
We know that the transform X(k) of the N-point sequence x(n) is given by
N 1
X ( K ) x(n)WN nk , K 0,1, 2,....N 1
n 0
Breaking the sum into two parts, one for the even and one for the odd indexed values, gives
N /2 1 N 1
X (K ) n 0
x(n)WN nk
n N /2
x(n)WN nk , K 0,1, 2,....N 1.
N /2 1 N 1
X (K )
n even
x(n)WN nk WN nk x(n)W
n odd
N
nk
When n is replaced by 2n, the even numbered samples are selected and when n is replaced by
2n + 1, the odd numbered samples are selected. Hence,
N /2 1 N /2 1
X (K ) x(2n)W
n 0
N
2 nk
x(2n 1)W
n 0
N
(2 n 1) k
2 nk
j 2
W 2 nk
N (W ) e N
2 nk
N WNnk/2 and WN(2 n 1) k (WNk )WNnk/2
We can write
N /2 1 N /2 1
X (K )
n 0
f1 (n)WNnk/2 WN k n 0
f 2 (n)WNnk/2
The implementation of this equation for X(k) is shown in the following Figure . This first step in
the decomposition breaks the N-point transform into two (N/2)-point transforms and the k WN
provides the N-point combining algebra. The DFT of a sequence is periodic with period given by
the number of points of DFT. Hence, F1(k) and F2(k) will be periodic with period N/2.
F1 (k N / 2) F1 ( K ), &F2 (k N / 2) F2 ( K )
F1 (k N / 2) F1 ( K ), &F2 (k N / 2) F2 ( K )
( k N /2)
In addition, the phase factor WN (WNk )
The implementation using the periodicity property is also shown in following Figure
Figure 2.1 Illustration of flow graph of the first stage DIT FFT algorithm for N = 8.
Having performed the decimation in time once, we can repeat the process for each of the
sequences f1(n) and f2(n). Thus f1(n) would result in two (N/4)-point sequences and f2(n) would
result in another two (N/4)-point sequences.
Figure 2.4 Illustration of complete flow graph obtained by combining all the three stages for N = 8.
The x(n) in bit reversed order is decimated into 4 numbers of 2-point sequences as
shown below.
(i) 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 7.5 shows the
three stages of computation of an 8-point DFT.
The computation of 8-point DFT of an 8-point sequence in detail is given below. The 8-
point sequence is decimated into 4-point sequences and 2-point sequences as shown below.
(a) (b) (c)
Figure 7.6 (a)–(c) Flow graphs for implementation of first, 2nd and 3rd stages of computation.
Butterfly Diagram
Observing the basic computations performed at each stage, we can arrive at the following
conclusions:
(i) In each computation, two complex numbers a and b are considered.
(ii) The complex number b is multiplied by a phase factor W kN.
(iii) The product bW kNis added to the complex number a to form a new complex number A.
(i) The product bW k N is subtracted from complex number a to form new complex
number B.
The above basic computation can be expressed by a signal flow graph shown in Figure 7.7.
The signal flow graph is also called butterfly diagram since it resembles a butterfly.
Figure 7.7 Basic butterfFy diagram or fFow graph of radix–2 DI† FF†.
The complete flow graph for 8-point DIT FFT considering periodicity drawn in a way
to remember easily is shown in Figure 7.8. In radix-2 FFT, N/2 butterflies per stage are
required to represent the computational process. In the butterfly diagram for 8-point DFT
shown in Figure 7.8, for symmetry, W 20 , W4 0 and W8 0 are shown on the graph eventhough they
are unity. The subscript 2 indicates that it is the first stage of computation. Similarly,
subscripts 4 and 8 indicate the second and third stages of computation.
Figure 7.8 †he signal flow graph or butterfly diagram for 8–point radix–2 DIT FFT.
N 1 N /2 1 N 1
X ( K ) x(n)WN nk x(n)WN nk WN nk x(n)WN nk
n 0 n 0 n N /2
N /2 1 N /2 1
x(n)W
n 0
N
nk
WN nk
n N /2
x(n N / 2)WN ( n N /2) k
It is important to observe that while the above equation for X(k) contains two summations
over N/2-points, each of these summations is not an N/2-point DFT, since WNnk rather than
nk N/2
W
N /2 1 N /2 1
X (K )
n 0
x(n)WN nk WN ( N /2) k n 0
x(n N / 2)WN nk
N /2 1
N
n 0
x ( n )WN
nk
( 1) nk
x ( n
2
)WN nk
N /2 1
N nk
n 0
x(n) (1) x(n 2 ) WN
nk
Let us split X(k) into even and odd numbered samples. For even values of k, the X(k) can be
written as
N /2 1
N
X (2 K )
n 0
x ( n ) ( 1) 2k
x ( n
2
)WN 2 nk
N /2 1
N nk
n 0
x(n) x(n 2 ) WN
The above equations for X(2k) and X(2k + 1) can be recognized as N/2-point DFTs. X(2k) is
the DFT of the sum of first half and last half of the input sequence, i.e. of
{x(n) + x(n + N/2)} and X(2k + 1) is the DFT of the product W Nn with the difference of first
n
half and last half of the input, i.e. of {x(n) x(n + N/2)}WN .
If we define new time domain sequences, u1(n) and u2(n) consisting of N/2-samples, such that
then the DFTs U1(k) = X(2k) and U2(k) = X(2k + 1) can be computed by first forming the
sequences u1(n) and u2(n), then computing the N/2-point DFTs of these two sequences to
obtain the even numbered output points and odd numbered output points respectively. The
procedure suggested above is illustrated in Figure 7.9 for the case of an 8-point sequence.
Figure 7.9 FFow graph of the DIF decomposition of an N–point DF† computation into two N/2–point
DF† computations N = 8.
Now each of the N/2-point frequency domain sequences, U1(k) and U2(k) can be decimated
into two numbers of N/4-point sequences and four numbers of new N/4-point sequences can be
obtained from them.
Let the new sequences be v11(n), v12(n), v21(n), v22(n). On similar lines as discussed
above, we can get
This process is continued till we get only 2-point sequences. The DFT of those 2-point
sequences is the DFT of x(n), i.e. X(k) in bit reversed order.
The third stage of computation for N = 8 is shown in Figure 7.11.
The entire process of decimation involves m stages of decimation where m = log2N.
The computation of the N-point DFT via the DIF FFT algorithm requires (N/2) log2N
complex multiplications and (N – 1) log2N complex additions (i.e. total number of
computations remains same in both DIF and DIT).
Observing the basic calculations, each stage involves N/2 butterflies of the type shown
in Figure 7.12.
The butterfly computation involves the following operations:
(i) In each computation two complex numbers a and b are considered.
(ii) The sum of the two complex numbers is computed which forms a new complex
number A.
(iii) Subtract the complex number b from a to get the term (a – b). The difference term
(a – b) is multiplied with the phase factor or twiddle factor W Nn to form a new
complex number B.
The signal flow graph or butterfly diagram of all the three stages together is shown in Figure
7.13.
Figure 7.13 SignaF fFow graph or butterfFy diagram for the 8–point radix–2 DIF FF† aFgorithm.
Figure 7.14 (a)–(c) †he first, second and third stages of computation of 8–point DF† by Radix–2 DIF FF†.
The term inside the square brackets in the above equation for x(n) is same as the DFT
computation 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 single FFT algorithm serves the evaluation of both direct and
inverse DFTs.
EXAMPLE 1 Draw the butterfly line diagram for 8-point FFT calculation and briefly explain.
Use decimation-in-time algorithm.
Solution: The butterfly line diagram for 8-point DIT FFT algorithm is shown in following
Figure
Solution: For 8-point DIT FFT
1. The input sequence x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)},
2. bit reversed order, of input as i.e. as xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}.
Since N = 2m = 23, the 8-point DFT computation
3. Radix-2 FFT involves 3 stages of computation, each stage involving 4 butterflies. The output
X(k) will be in normal order.
4. In the first stage, four 2-point DFTs are computed. In the second stage they are combined
into two 4-point DFTs. In the third stage, the two 4-point DFTs are combined into one 8-
point DFT.
5. The 8-point FFT calculation requires 8 log28 = 24 complex additions and (8/2) log28 = 12
complex multiplications.
Figure : Butterfly Fine diagram for 8–point DIT FFT algorithm for N = 8.
Figure 7.16 Butterfly Fine diagram for 8–point radix–2 DIF FFT algorithm.
EXAMPLE 7.4 What is FFT? Calculate the number of multiplications needed in the calculation
of DFT using FFT algorithm with 32-point sequence.
Solution: The FFT, i.e. Fast Fourier transform is a method (or algorithm) for computing
the DFT with reduced number of calculations. The computational efficiency is achieved by
adopting a divide and conquer approach. This approach is based on the decomposition of an N-
point DFT into successively smaller DFTs. This basic approach leads to a family of efficient
computational algorithms known as FFT algorithms. Basically there are two FFT algorithms. (i)
DIT FFT algorithm and (ii) DIF FFT algorithm. If the length of the sequence N = 2 m, 2
indicates the radix and m indicates the number of stages in the computation. In radix-2 FFT, the
N-point sequence is decimated into two N/2-point sequences, each N/2-point sequence is
decimated into two N/4-point sequences and so on till we get two point sequences. The DFTs
of two point sequences are computed and DFTs of two 2-point sequences are combined into
DFT of one 4-point sequence, DFTs of two 4-point sequences are combined into DFT of one
8-point sequence and so on till we get the N-point DFT.
The number of multiplications needed in the computation of DFT using FFT algorithm
N 32
with N = 32-point sequence is = log N = log 25 = 80 .
2 2
2 2
The number of complex additions
= N log2 N = 32 log2 32 = 32 log2 25 = 160
EXAMPLE 7.5 Explain the inverse FFT algorithm to compute inverse DFT of a 8-point
DFT. Draw the flow graph for the same.
Solution: The IDFT of an 8-point sequence {X(k), k = 0, 1, 2, ..., 7} is defined as
The term inside the square brackets in the RHS of the above expression for x(n) is the 8- point DFT
of X *(k). Hence, in order to compute the IDFT of X(k) the following procedure can be followed:
1. Given X(k), take conjugate of X (k) i.e. determine X *(k).
2. Compute the DFT of X*(k) using radix-2 DIT or DIF FFT, [This gives 8x*(n)]
From Figure 7.18, we get the 8-point DFT of X*(k) by DIT FFT as
8x*(n) = {8x* (0), 8x*(1), 8x* (2), 8x* (3), 8x*(4), 8x* (5), 8x* (6), 8x* (7)}
1
x(n) = {8x* (0), 8x* (1), 8x* (2), 8x* (3), 8x*(4), 8x* (5), 8x* (6), 8x* (7)}*
8
EXAMPLE 7.11 Compute the DFT of the sequence x(n) = {1, 0, 0, 0, 0, 0, 0, 0} (a) directly,
(b) by FFT.
Solution: (a) Direct computation of DFT
The given sequence is x(n) = {1, 0, 0, 0, 0, 0, 0, 0}. We have to compute 8-point DFT. So
N = 8.
N 1 2 N 1 7
DFT {x(n)} = X(k) = x(n) e j Nnk = x(n) Wnk = x(n) Wnk
N 8
n 0 n 0 n 0
= x(0)W80 + x(1)W 18 + x(2)W 28 + x(3)W 3 8+ x(4) W 4 8+ x(5)W 5 +8 x(6)W 6 +8 x(7)W 7 8
= (1) (1) + (0) (W8 1) + (0)W8 2 + (0) W8 3 + (0)W8 4 + (0)W 85 + (0)W 68 + (0)W 78= 1
X(k) = 1 for all k
X(0) = 1, X(1) = 1, X(2) = 1, X(3) = 1, X(4) = 1, X(5) = 1, X(6) = 1, X(7) = 1
X(k) = {1, 1, 1, 1, 1, 1, 1, 1}
(b) Computation by FFT. Here N = 8 = 23
The computation of 8-point DFT of x(n) = {1, 0, 0, 0, 0, 0, 0, 0} by radix-2 DIT FFT
algorithm is shown in Figure 7.31. x(n) in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {1, 0, 0, 0, 0, 0, 0, 0}
For DIT FFT input is in bit reversed order and output is in normal order.
From Figure 7.31, the 8-point DFT of the given x(n) is X(k) = {1, 1, 1, 1, 1, 1, 1, 1}
Figure 7.33 Computation of 8–point DF† of x(n) by radix–2 DIF FF† aFgorithm.
From Figure 7.33, we observe that the 8-point DFT in bit reversed order is
The magnitude and phase spectrum are shown in Figures 7.34(a) and (b).
EXAMPLE 7.13 Find the 8-point DFT by radix-2 DIT FFT algorithm.
x(n) = {2, 1, 2, 1, 2, 1, 2, 1}
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {2, 1, 2, 1, 2, 1, 2, 1}
For DIT FFT computation, the input sequence must be in bit reversed order and the output
sequence will be in normal order.
x(n) in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {2, 2, 2, 2, 1, 1, 1, 1}
The computation of 8-point DFT of x(n) by radix-2 DIT FFT algorithm is shown in Figure 7.35.
From Figure 7.35, we get the 8-point DFT of x(n) as X(k) = {12, 0, 0, 0, 4, 0, 0, 0}
Figure 7.35 Computation of 8–point DF† of x(n) by radix–2, DI† FF†.
EXAMPLE 7.14 Compute the DFT for the sequence x(n) = {1, 1, 1, 1, 1, 1, 1, 1}.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {1, 1, 1, 1, 1, 1, 1, 1}
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.36.
The given sequence in bit reversed order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {1, 1, 1, 1, 1, 1, 1, 1}
For DIT FFT, the input is in bit reversed order and output is in normal order.
From Figure 7.36, we get the 8-point DFT of x(n) as X(k) = {8, 0, 0, 0, 0, 0, 0, 0}.
EXAMPLE 7.15 Given a sequence x(n) = {1, 2, 3, 4, 4, 3, 2, 1}, determine X(k) using
DIT FFT algorithm.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {1, 2, 3, 4, 4, 3, 2, 1}
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.37. For DIT FFT, the input is in bit reversed order and the output is in normal
order.
The given sequence in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)} = {1, 4, 3, 2, 2, 3, 4, 1}
EXAMPLE 7.16 Given a sequence x(n) = {0, 1, 2, 3, 4, 5, 6, 7}, determine X(k) using
DIT FFT algorithm.
Solution: The given sequence is x(n) = {x(0), x(1), x(2), x(3), x(4), x(5), x(6), x(7)}
= {0, 1, 2, 3, 4, 5, 6, 7}
The computation of 8-point DFT of x(n), i.e. X(k) by radix-2, DIT FFT algorithm is shown
in Figure 7.38. For DIT FFT, the input is in bit reversed order and output is in normal order.
The given sequence in bit reverse order is
xr(n) = {x(0), x(4), x(2), x(6), x(1), x(5), x(3), x(7)}
= {0, 4, 2, 6, 1, 5, 3, 7}
Figure 7.38 Computation of 8–point DF† of x(n) by radix–2, DI† FF†.
X(k) = {7, 0.707 j0.707, j, 0.707 j0.707, 1, 0.707 + j0.707, 0.707 + j0.707}
j,
using DIT algorithm.
Solution: The IDFT x(n) of the given sequence X(k) can be obtained by finding X*(k), the
conjugate of X(k), finding the 8-point DFT of X*(k) using radix-2 DIT FFT algorithm to get
8x*(n), taking the conjugate of that to get 8x(n) and then dividing by 8 to get x(n). For DIT
FFT, the input X*(k) must be in bit reverse order. The output 8x*(n) will be in normal order.
For the given X(k).
EXAMPLE 7.20 Compute the IDFT of the square wave sequence X(k) = {12, 0, 0, 0, 4, 0,
0, 0} using DIF algorithm.
Solution: The IDFT x(n) of the given sequence X(k) can be obtained by finding X*(k), the
conjugate of X(k), finding the 8-point DFT of X*(k) using DIF algorithm to get 8x*(n) taking
the conjugate of that to get 8x(n) and then dividing the result by 8 to get x(n). For DIF
algorithm, the input X*(k) must be in normal order and the output 8x*(n) will be in bit
reversed order.
For the given X(k)
X*(k) = {12, 0, 0, 0, 4, 0, 0, 0}
The 8-point DFT of X*(k) using radix-2, DIF FFT algorithm is computed as shown in Figure
7.44.
8xr (n) = {16, 16, 16, 16, 8, 8, 8, 8}* = {16, 16, 16, 16, 8, 8, 8, 8}
1
x(n) = {16, 8, 16, 8, 16, 8, 16, 8} = {2, 1, 2, 1, 2, 1, 2, 1}