0% found this document useful (0 votes)
13 views78 pages

Lect - 4

Chapter 4 discusses digital filter realizations, focusing on the Discrete Fourier Transform (DFT) and its efficient computation using the Fast Fourier Transform (FFT) algorithm. It explains the differences between Decimation in Time (DIT) and Decimation in Frequency (DIF) FFT algorithms, highlighting their computational advantages. The chapter provides detailed examples and calculations to illustrate the performance improvements of FFT over DFT.

Uploaded by

lee099629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views78 pages

Lect - 4

Chapter 4 discusses digital filter realizations, focusing on the Discrete Fourier Transform (DFT) and its efficient computation using the Fast Fourier Transform (FFT) algorithm. It explains the differences between Decimation in Time (DIT) and Decimation in Frequency (DIF) FFT algorithms, highlighting their computational advantages. The chapter provides detailed examples and calculations to illustrate the performance improvements of FFT over DFT.

Uploaded by

lee099629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Chapter 4:Digital Filter Realizations

Sem. II, 2017 E.C Electrical and Computer Engineering DSP By: Waltengus A.
DFT Algorithm
Conversion of DFT to FFT Algorithm
Decimation in Time (DIT) FFT algorithms
Implementation of the DIT-FFT algorithm
Decimation in frequency (DIF) FFT Algorithms
Comparison of DIT and DFT-FFT Algorithms
DFT and FFT
 FFT is an algorithm to convert a time domain signal

to DFT efficiently.

 FFT is not unique. Many algorithms are available.

 Each algorithm has merits and demerits.

 In each algorithm, depending on the sequence


needed at the output, the input is regrouped.

 The groups are decided by the number of samples.


DFT Algorithm
The Discrete Fourier Transform (DFT) of a discrete-time signal
x(n) is given by:

6
Performance of the DFT Algorithm
 The DFT requires N2 (N x N) complex multiplications:
 Each X(k) requires N complex multiplications.
 The DFT also requires (N-1)*N complex additions:
 Each X(k) requires N-1 additions.

 Can the number of computations required be reduced?


8
DFT  FFT
 The Fast Fourier Transform(FFT): a highly efficient
procedure for computing the DFT of a finite series and
requires less number of computations than that of direct
evaluation of DFT

 Generally, algorithms that exploit computational savings are


collectively called Fast Fourier Transforms
 It makes use of the symmetry and periodicity properties of
twiddle factor wN to effectively reduce the DFT computation
time.
 It is based on the fundamental principle of decomposing the
computation of DFT of a sequence of length N into
successively smaller DFT and combining them to get the total
transform.

9
 FFT algorithm provides speed increase factors, when compared
with direct computation of the DFT, of approximately 64 and 205
for 256-point and 1024-point transforms respectively.
 The number of multiplications and additions required to compute
N-point DFT using radix-2 FFT are N/2 log2N and Nlog2N
respectively.
Example: for n=64
The number of complex multiplications required using direct
computation is
N2=642 =4096
The number of complex multiplications required using FFT is
N/2log2 N=64/2log2 64=192
Speed improvement factor =4096/192= 21.33

10
Fast Fourier Transform Algorithms

There are basically two types of FFT algorithms.


1. Decimation in Time (DIT) FFT
2. Decimation in frequency (DIF) FFT

Decimation-in-time-frequency (DITF) FFT algorithm: a


new fast Fourier transform algorithm which reduces the
number of real multiplications and additions

11
1. Decimation in Time (DIT) FFT
DIT algorithm is used to calculate the DFT of a N-point
sequence.
The idea is to break the N-point sequence into two
sequences, the DFTs of which can be obtained to give the
DFT of the original N-point sequence.
Initially the N-point sequence is divided into N/2-point
sequences xe(n) and x0(n) ,which have even and odd
numbers of x(n) respectively.

The N/2-point DFTs of these two sequences are evaluated


and combined to give the N-point DFT.
Similarly the N/2-point DFTs can be expressed as a
combination of N/4-point DFTs.
This process is continued until we are left with two point
DFT.
This algorithm is called decimation in time because the
sequence x(n) is often split into smaller sequences 12
Complete decomposition into 2-point DFTs

37
FFT Implementation
 To efficiently implement the FFT algorithm a few observations are
made:
 Each stage has the same number of butterflies (number of butterflies =
N/2, N is number of points).
 The number of DFT groups per stage is equal to (N/2stage).
 The difference between the upper and lower leg is equal to 2stage-1.
 The number of butterflies in the group is equal to 2stage-1.

Number of Operations

 If N=2r, we have r=log2(N) stages. For each one we have:


• N/2 complex ‘×’ (some of them are by ‘1’).
• N complex ‘+’.
 Thus the grand total of operations is:
• N/2 log2(N) complex ‘×’.
• N log2(N) complex ‘+’.
40
Example: 8 point FFT(1) Number of stages : Nstages = 1

Stage 1

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1

W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1 43
Example: 8 point FFT (1) Number of stages: Nstages
=2
Stage 1 Stage 2

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1 44
Example: 8 point FFT (1) Number of stages: Nstages =
3
Stage 1 Stage 2 Stage 3

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1

W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1 45
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1:
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1

46
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1 (1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 1
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
47
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1 (1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
Block 2
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 2
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
48
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1 (1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
Block 2
W0 -1 W2 -1 (2) Blocks/stage:
Block 3 W0 -1  Stage 1: Nblocks = 3
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
49
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
Block 1 (1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
Block 2
W0 -1 W2 -1 (2) Blocks/stage:
Block 3 W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0
W0 -1 W2 -1
Block 4
W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1

50
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1
Block 1
W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 1
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
51
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1
Block 1
W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
Block 2 W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
52
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
Block 1
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1

 Decimation in time FFT:


 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
53
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1:
 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
54
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage
 Number of butterflies/block = 2stage-1
55
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 1
 Number of butterflies/block = 2stage-1
56
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 2
 Number of butterflies/block = 2stage-1
57
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 2
 Number of butterflies/block = 2stage-1  Stage 3: Nbtf = 1
58
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 2
 Number of butterflies/block = 2stage-1  Stage 3: Nbtf = 2
59
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Stage 1: Nbtf = 1
 Number of stages = log2N
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 2
 Number of butterflies/block = 2stage-1  Stage 3: Nbtf = 3
60
Stage 1 Stage 2 Stage 3
Example: 8 point FFT
(1) Number of stages:
W0 -1

W0 -1
 Nstages = 3
W0 -1 W2 -1 (2) Blocks/stage:
W0 -1  Stage 1: Nblocks = 4
W0 -1 W1 -1
W0  Stage 2: Nblocks = 2
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1
 Stage 3: Nblocks = 1
(3) B’flies/block:
 Decimation in time FFT:
 Number of stages = log2N
 Stage 1: Nbtf = 1
 Number of blocks/stage = N/2stage  Stage 2: Nbtf = 2
 Number of butterflies/block = 2stage-1
 Stage 3: Nbtf = 4
61
Stage 1 Stage 2 Stage 3

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

Start Index 0 0 0
Input Index 1 2 4
Twiddle Factor Index

62
Stage 1 Stage 2 Stage 3

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

Start Index 0 0 0
Input Index 1 2 4
Twiddle Factor Index N/2 = 4 4 /2 = 2

63
Stage 1 Stage 2 Stage 3

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1
W0 -1 W1 -1
W0
W0 -1 W2 -1

W0 -1 W2 -1 W3 -1

Start Index 0 0 0
Input Index 1 2 4
Twiddle Factor Index N/2 = 4 4 /2 = 2 2 /2 = 1

64
Stage 1 Stage 2 Stage 3

W0 -1

W0 -1

W0 -1 W2 -1

W0 -1
W0 -1 W1 -1
W0
W0 -1 W2 -1

Start Index W0 -1 W2 -1 W3 -1

Input Index
0 0 0
Twiddle Factor Index 1 2 4
Indicies Used N/2 = 4 4 /2 = 2 2 /2 = 1
W0 W0
W2

65
Example: Compute the eight DFT of the sequence below by using DIT
FFT algorithm.

Ans:
2. Decimation-in-Frequency (DIF) FFT
 In this the output sequence x(k) is divided into smaller and
smaller subsequences, that is why the name decimation in
frequency,

 Initially the input sequence x(n) is divided into two sequences


x1(n) and x2(n) consisting of the first n/2 samples of x(n) and
the last n/2 samples of x(n) respectively

67
68
69
70
71
72
74
Example: Compute the eight DFT of the sequence X(k) = [8,0,0,0,0,0,0,0,] by
76
using DIF FFT algorithm.
77

You might also like