Fast Fourier Transform
Fast Fourier Transform
● From the results of r2-point DFT result of r3-point DFT computed and so on
until we get rm-point DFT.
● This FFT algorithm is called radix-r FFT. in computing N point DFT by this
method the number of stages of computations will be m times.
Radix-2 FFT
● For radix-2 FFT the value of N should be such that N=2m so that N point
sequence is decimated into 2-point sequences and 2-point DFT for each
decimated sequences can computed.
● From the results of 4-point DFT result of 8-point DFT computed and so on
until we get N-point DFT.
Radix-2 FFT
● We split the N-point data sequence into two N/2-point data sequences f1(n)
and f2(n), corresponding to the even-numbered and odd-numbered samples
of x(n), respectively, that is
● Thus f1(n) and f2(n) are obtained by decimating x(n) by a factor of 2, and
hence the resulting FFT algorithm is called a decimation-in-time algorithm
Radix-2 FFT
● Now the N-point DFT can be expressed in terms of the DFT's of the
decimated sequences as follows:
Radix-2 FFT
● But WN2 = WN/2. With this substitution, the equation can be expressed as
● where F1(k) and F2(k) are the N/2-point DFTs of the sequences f1(m) and
f2(m), respectively.
● Since F1(k) and F2(k) are periodic, with period N/2, we have
● Let x(n) nad X(k) be N-point DFT pair, now by the definition of inverse DFT,
Inverse FFT algorithm
● In the highlighted equation, the expression inside the bracket is similar to that
of the DFT computation of the sequence, with the following differences
1. The summation index is k instead of n
2. The input sequence is X(k) instead of x(n)
3. The Phase Factors are complex conjugate of the Face Factor used for DFT
● Hence in order to compute inverse DFT of X(k) the FFT algorithm can be
used by taking the complex conjugate of phase factor
● Also from the equation, it is observed that the output of FFT computation
should be divided by N to get x(n)
Inverse FFT algorithm
● The following procedure can be followed to compute inverse DFT using FFT
algorithm:
1. Take N-point Frequency domain sequence X(k) as input sequence
2. Compute FFT by using complex conjugate of phase factor.
3. Divide the output sequence obtained in FFT computations by N to get the
sequence x(n)
● Thus a single FFT algorithm can be used for evaluation of both DFT and
Inverse DFT
Comparison of number of computations in direct
DFT and FFT
Practice problem for IFFT
● If the signal and filter length are both length-N, we say the arithmetic
complexity is of order N2 , O(N2 ).
● The goal is to calculate this convolution or filtering faster than directly
implementing.
● The most common way to achieve “fast convolution” is to section or block the
signal and use the FFT on these blocks to take advantage of the efficiency of
the FFT.
Fast Linear Convolution Algorithm.
● The DFT / FFT supports only circular convolution.
● Hence to get the result of linear convolution from circular convolution the
sequences, x(n) and h(n) should be converted to the size of y(n) by
appending with zeros and circular convolution of x(n) and h(n) is performed
1. Given x(n) with N1 samples and h(n) with N2 samples
2. Compute length of output sequence y(n), L=N1+N2-1
3. The given sequences should be converted to the size of y(n) by appending
with zeros.
4. Compute X(k) and H(k) of padded signals using FFT
5. Compute X(k)*H(k) to get Y(k)
6. Compute IDFT of Y(k) to get y(n) using IFFT
Fast Circular Convolution Algorithm
● Step 1: Take the L samples of data sequence 𝑥(𝑛). Append M – 1 extra zeros
to this block of data so that its length is L + M – 1.
● Step 2: Append L – 1 extra zeros to the FIR filter so that its length is L+M–1.
● Step 3: Convolve the two sequences circularly using FFT as shown in Fig. 1
to obtain the output as L + M – 1.
● Step 4: Repeat steps 1 to 3 for all the blocks.
● Step 5: Accumulate the results by adding the overlapped samples of the
convolved output for successive blocks as shown in fig
Linear FIR Filtering by Overlap save method
The algorithm for overlap-save method can be written as follows:
● Step 1: Take L samples of the data sequence 𝑥(𝑛).
● Step 2: Append M – 1 last sample from the first block at the start of the
second block and so on so that the length of each block is L + M – 1.
● Step 3: For the first block, there is no previous block, append zeros at the
start of this block.
● Step 4: Append L – 1 extra zeros to the FIR of the filter so that its length is L +
M – 1.
● Step 5: Convolve the two sequences circularly using FFT to obtain the output.
● Step 6: Repeat steps 1 to 5 for all the blocks.
● Step 7: Accumulate the result by appending samples of the convolved output
for successive blocks. Discard first M – 1 samples from result of every block
and then append M – 1 samples of the first block at the end of the
accumulated result by circular shifting as shown in Fig.3
● Step 8: Overlap the input data samples and save the rest of the
non-overlapping result samples