Professional Documents
Culture Documents
Unit-3 (DSP)
Unit-3 (DSP)
0 20-May-19
Contents
1. Computation of DFT
4. Inverse FFT
1 20-May-19
Digital Signal Processing
2 20-May-19
Discrete Fourier Transform
• The DFT pair was given as
N 1 N 1
1
X k x[n]e j 2 / N kn
x[n]
N
X k e
k 0
j 2 / N kn
n 0
3 20-May-19
Discrete Fourier Transform
6 20-May-19
Radix-2 Decimation In Time FFT Algorithm implementation
7 20-May-19
Radix-2 Decimation In Time FFT Algorithm implementation
n 0 n even n odd
G k WNk H k
8 20-May-19
Radix-2 Decimation In Time FFT Algorithm implementation
10 20-May-19
Radix-2 DIT FFT Algorithm implementation Cont’d
11 20-May-19
Radix-2 DIT FFT Algorithm implementation Cont’d
• Final flow graph for 8-point decimation in time
• Complexity:
– Nlog2N complex multiplications and additions
12 20-May-19
Butterfly Computation
• Flow graph constitutes of butterflies
13 20-May-19
Radix-2 Decimation-In-Time FFT Algorithm
14 20-May-19
Digital Signal Processing
15 20-May-19
In-Place Computation and Bit reversal approach
• Decimation-in-time flow graphs require two sets of registers
– Input and output for each stage
• Note the arrangement of the input indices
– Bit reversed indexing
xi 0 xi 000 x000 x0
– Because no.of inputs N=8
xi 1 xi 001 x100 x4
– Use three bits(b2b1b0)
xi 2 xi 010 x010 x2
xi 3 xi 011 x110 x6
xi 4 xi 100 x001 x1
xi 5 xi 101 x101 x5
xi 6 xi 110 x011 x3
xi 7 xi 111 x111 x7
16 20-May-19
Digital Signal Processing
Computation comparison of
DFT and FFT
17 20-May-19
Computations Comparison
No of Complex Improvement
No of
Multiplications Factor
DFT FFT
Stages Points N N2/(N/2)log2N
(N2) ((N/2)log2N)
2 4 16 4 4
4 16 256 32 8
18 20-May-19
Digital Signal Processing
20 20-May-19
Example.1 Cont..d
Given sequence x[n]={1,2,3,4,4,3,2,1}
x[0]=1, x[1]=2, x[2]=3, x[3]=4, x[4]=4, x[5]=3, x[6]=2 and x[7]=1
21 20-May-19
Example.1 Cont..d
22 20-May-19
Practice example.1
Find DFT of the sequence x[n]={1,1,1,1,1,1,1,1}
using DIT FFT Algorithm
SOLUTION: Select N=23=8
The twiddle factors associated with the flow
graph are
j 28 0
W e
8
0
e0 1
j 28 1 j 4
W e
8
1
e 0.707 j 0.707
j 28 2 j 2
W e
8
2
e j
j 28 3 j 34
W e
8
3
e 0.707 j 0.707
23 20-May-19
Practice example.1 Cont..d
24 20-May-19
Digital Signal Processing
25 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
26 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
• Split the DFT equation into even and odd frequency indexes
N 1 N / 2 1 N 1
X 2r x[n]W n2r
N x[n]W n 2r
N x[n]WNn 2 r
n 0 n 0 n N / 2
N / 2 1 N / 2 1 N / 2 1
X 2r x[n]W n 2r
N x[n N / 2]WN n N / 22 r
x[n] x[n N / 2]W nr
N /2
n 0 n 0 n 0
( N / 2 ) 1 ( N / 2 ) 1
x[n]W
n 0
nk
N x[n N
n 0
2]WN( n N 2) k
( N / 2 ) 1 ( N / 2 ) 1
x[n]W
n 0
nk
N W ( N / 2) k
N x[n ( N / 2)]W
n 0
nk
N
x[n] (1)
( N / 2 ) 1
k
x[n ( N / 2)] WNnk
n 0
28 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
x[n] (1)
( N / 2 ) 1
X [k ] k
x[n ( N / 2)] WNnk
n 0
x[n] (1)
( N / 2 ) 1
X [ 2r 1] 2r
x[ n ( N / 2)] WNn ( 2 r 1)
n 0
( N / 2 ) 1
x[n] x[n ( N / 2)]W
n 0
n
N WNnr/ 2
29 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
30 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
Continuing by decomposing the odd and even output points we obtain
31 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm
32 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm implementation
33 20-May-19
In-Place Computation and Bit reversal approach
• Decimation-in-frequency flow graphs require two sets of
registers
– Input and output for each stage
• Note the arrangement of the output indices
– Bit reversed indexing X o 0 X i 000 X 000 X 0
– Because no.of inputs N=8 X o 1 X o 001 X 100 X 4
– Use three bits(b2b1b0) X o 2 X o 010 X 010 X 2
X o 3 X o 011 X 110 X 6
X o 4 X o 100 X 001 X 1
X o 5 X o 101 X 101 X 5
X o 6 X o 110 X 011 X 3
X o 7 X o 111 X 111 X 7
34 20-May-19
Digital Signal Processing
36 20-May-19
Example.2Cont..d
37 20-May-19
Example.2 Cont..d
38 20-May-19
Practice example.2
Find DFT of the sequence x[n]={1,1,1,1,1,1,1,1}
using DIF FFT Algorithm
SOLUTION: Select N=23=8
The twiddle factors associated with the flow
graph are
j 28 0
W e
8
0
e0 1
j 28 1 j 4
W e
8
1
e 0.707 j 0.707
j 28 2 j 2
W e
8
2
e j
j 28 3 j 34
W e
8
3
e 0.707 j 0.707
39 20-May-19
Example.2Cont..d
40 20-May-19
Digital Signal Processing
41 20-May-19
Example.3
Compute the 8-point DFT of the following sequence using
DIT and DIF FFT algorithms 1 for 0 n 7
x[n]
0 otherwise
Example.4
Compute the 8-point DFT of the following sequence using
DIT and DIF FFT algorithms 1 for 3 n 3
x[n]
0 otherwise
Example.5
Compute the 8-point DFT of the following sequence using
DIT and DIF FFT algorithms 1 for 0 n 6
x[n]
0 otherwise
42 20-May-19
Digital Signal Processing
43 20-May-19
Inverse FFT: Using FFTs for inverse DFTs
• We’ve always been talking about forward DFTs
in our discussion about FFTs …. what about the
inverse FFT?
N1 N1
1
x[n] N X[k]WNkn ; X[k] x[n]WNkn
k 0 n0
• One way to modify FFT algorithm for the inverse
DFT computation is:
– Replace W k
k wherever it appears
N by WN
X*[2] Nx*[2]
W80
X*[6] 0 W82 Nx*[3]
W 8
X*[7] 0 2 W3 Nx*[7]
W8 W 8 8
46 20-May-19
Example.6
Find IDFT of the following Sequence using DIT FFT Algorithm
x[n]={ 7, -0.707-j0.707, -j, 0.707-j0.707, 1,
0.707+j0.707, j, -0.707+j0.707}
SOLUTION: Select N=23=8
The twiddle factors associated with the flow
graph are W 0 e j 0 e0 1
2
8
8
j 28 1 j 4
W e
8
1
e 0.707 j 0.707
j 28 2 j 2
W82 e e j
j 28 3 j 34
W e
8
3
e 0.707 j 0.707
Answer x[n]={1, 1, 1, 1, 1, 1, 1, 0}
47 20-May-19
Input Stage-1 Stage-2 Stage-3 O/p
X*[0]=7 7+1(1)=8 5+5=10 10+10=20 X[0]
X*[4]=1 7-1(1)=6 5+5=10 (10-10)1= 0 X[4]
48 20-May-19
Digital Signal Processing
49 20-May-19
Radix-2 DIT FFT Algorithm with N=4
x[0] X(0)
x[2] X(1)
0
W
x[1]
4
0 X(2)
W
4
x[3] X(3)
0 W41
W4
52 20-May-19
Bit reversal approach
xi 0 xi 0000 x0000 x0
xi 1 xi 0001 x1000 x8
xi 2 xi 0010 x0100 x4
xi 3 xi 0011 x1100 x12
xi 4 xi 0100 x0010 x2
xi 5 xi 0101 x1010 x10
xi 6 xi 0110 x0110 x6
xi 7 xi 0111 x1110 x14
xi 8 xi 1000 x0001 x1
xi 9 xi 1001 x1001 x9
xi 10 xi 1010 x0101 x5
xi 11 xi 1011 x1101 x13
xi 12 xi 1100 x0011 x3
xi 13 xi 1101 x1011 x11
xi 14 xi 1110 x0111 x7
xi 15 xi 1111 x1111 x15
53 20-May-19
Radix-2 DIF FFT Algorithm with N=16
54 20-May-19
Digital Signal Processing
Alternate representation of
Radix-2 DIT FFT algorithm
implementation
55 20-May-19
Alternate DIT FFT Structure
• DIT structure with input natural, output bit-reversed
56 20-May-19
Alternate DIT FFT Structure
• DIT structure with both input and output natural
57 20-May-19
Alternate DIT FFT Structure
• DIT structure with same structure for each stage
58 20-May-19
Radix-2 Decimation-In-Frequency FFT Algorithm
59 20-May-19
Digital Signal Processing
Alternate Representations of
Radix-2 DIF FFT algorithm
implementation
60 20-May-19
Alternate DIF FFT structures
• DIF structure with input natural, output bit-reversed
61 20-May-19
Alternate DIF FFT structures
• DIF structure with input bit-reversed, output natural
62 20-May-19
Alternate DIF FFT structures
• DIF structure with both input and output natural
63 20-May-19
Alternate DIF FFT structures
• DIF structure with same structure for each stage
64 20-May-19
Digital Signal Processing
Comparison of
DIT FFT and DIF FFT algorithms
implementation
65 20-May-19
The DIF FFT is the transpose of the DIT FFT
• Comment:
– We will revisit transposed forms again in our discussion of filter
implementation
66 20-May-19
The DIF FFT is the transpose of the DIT FFT
67 20-May-19