Chapter Four
Chapter Four
CHAPTER-FOUR
DISCRETE TIME FOURIER TRANSFORM (DTFT) &
DISCRETE FOURIER TRANSFORM (DFT)
Definition
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 1
EENG-3151 DSP
(or)
X[n] X(ejω)
SEQUENCE DTFT
[] 1
[ − ]
1 2()
2( − )
[], || < 1 1
1 −
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 2
EENG-3151 DSP
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 3
EENG-3151 DSP
DFT plays an important role in the implementation of many signal processing algorithms.
Definition
If () = 0 EAF < 0 G ≥ I, then N point DFT is given by
--------------------- (1)
Then Inverse DFT is given by
--------------------- (2)
which is known as a twiddle factor, and substituting in equations (1) & (2)
we get
----------------------------------- (3)
------------------------------ (4)
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 4
EENG-3151 DSP
If we
assume that the inverse of WN exists, then the above equation can be inverted by
premultiplying both sides by JKB . Thus we obtain
------------------- ---- **
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 5
EENG-3151 DSP
Sol:-
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 6
EENG-3151 DSP
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 7
EENG-3151 DSP
&' ( @ O
P
----------------------
------------ (5)
----------------
-------------- (6)
Comparing equations (5) & (6) we find that the DFT of is a sampled version of
the Fourier Transform of the sequence and is given by
&L @ Q&'
' (R CST L @ 0,1,2, ,
I 1.
P
K
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 8
EENG-3151 DSP
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 9
EENG-3151 DSP
------ (7)
The expression in the above equation has the form of a convolution sum. However it is not the
ordinary linear convolution, because the convolution sum involves the index 'V (K and is
called circular convolution. Thus we conclude that multiplications of the DFTs of two sequences are
equivalent to the circular convolution of two sequences in the time-domain.
Example 1
Solution: Each sequence consists of four nonzero points. For the purposes of illustrating the
operations involving in circular convolution, it is desirable to graph sequence as points on a circle.
We note that the sequences are graphed in a counter clockwise direction on a circle. This establishes
the reference direction in rotating one of the sequences relative to the other.
Now, U V is obtained by circularly convolving B G C as specified by equation (7).
C ((−))W is simply the sequence C () folded and graphed on a circle as illustrated in fig. 3.1b. In
other words, the folded sequence is simply C () graphed in a clockwise direction.
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 10
EENG-3151 DSP
The product sequence is obtained by multiplying B with C W , point by point. The
sequence is also illustrated in fig. 3.1b. Finally, we sum the values in the product sequence to obtain
U 0) = 14
It is easily verified that C ((1 − ))W is simply the sequence C ((−))W rotated counter clockwise by
one unit in time as illustrated in fig 3.1c. This rotated sequence multiplies B () to yield the product
sequence, also illustrated in fig. 3.1c. Finally, we sum the values in the product sequence to obtain
U (1). Thus
U (1) = 16
Now C ((2 − ))W is the folded sequence in fig.3.1b rotated two units of time in the counter
clockwise direction. The resultant sequence is illustrated in fig 3.1d along with the product sequence
B ()C ((2 − ))W. By summing the four terms in the product sequence, we obtain
U (2) = 14
For m= 3 we have
U
The folded sequence C ((−))W is now rotated by three units in time to yield C ((3 − ))W and the
resultant sequence is multiplied by B () to yield the product sequence as illustrated in fig. 3.1e. The
sum of the values in the product sequence is
U (3) = 16
We observe that if the computation above is continued beyond m=3, we simply repeat the sequence
of four values obtained above. Therefore, the circular convolution of the two sequences B () and
C () yields the sequence
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 11
EENG-3151 DSP
Figure 3.1
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 12
EENG-3151 DSP
Note that each row of the matrix in the above equation is a circular right-shift
right of the previous
row.
DFT:
IDFT:
Where,
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 13
EENG-3151 DSP
1
K
Substitution of n = 2r for n even and n = 2r+1 for n odd, where r=0, 1,- - -,
C
` `
B B
Where, ](L) = ∑ a
P _[] J` G b(c) = ∑
T a
P ℎ[] J`T
a a
K
_[] = [2] G ℎ[] = [2 + 1], = 0, 1, − − − − 1
C
&(L) = ](L) + JKT b(L)
`
K Tf
& dL + e = ](L) + JK a
b(L)
C
K CS K CS CS
Tf
JK C = K
(Tf )
C = K . CS
T
= − K
T
= −JKT
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 14
EENG-3151 DSP
K
& dL + e = ]L JKT bL
C
Properties of JK :
`
Tf
Symmetry property: JK @ JKT a
Below figure depicts the Computation of N = 8 point DFT. We observe that computation is
performed in three stages, beginning with the computations of four two-point DFTs, then two four-
point DFTs and finally one eight-point DFT.
The combination of the smaller DFTs to form the larger DFT is illustrated in figure for N=8.
The below figure shows the basic butterfly computation in the decimation-in-time FFT algorithm.
The basic computation is performed at every stage as illustrated in the below figure.
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 15
EENG-3151 DSP
BUTTERFLY DIAGRAM
Below figure depicts the Computation of N = 8 point DFT. We observe that computation is
performed in three stages, beginning with the computation of one eight-point DFT, then two four-
point DFTs and finally four two-point DFTs.
BUTTERFLY DIAGRAM
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 16
EENG-3151 DSP
NOTE:
In case of DIT-FFT algorithm, output sequence is in order and input sequence is in bit-reversal order.
In case of DIF-FFT algorithm, input sequence is in order and output sequence is in bit-reversal order.
Generally the twiddle factor hi JKT for both DIT and DIF algorithms, where k value is given by
Ij
JKT , c= ; j = 0,1,2, − − − − −, (2mB − 1).
2k
R is the index of stage (R=1 for stage 1, R=2 for stage 2,R=3 for stage 3 and so on).
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 17
EENG-3151 DSP
npo @ q; nqo @ r; nps @ q; nqs @ p. tpt − rp. tpt; nus = −r; nvs = −p. tpt − rp. tpt
EXAMPLE
Compute the DFT of a sequence w(x) = Mq, −q, q, −q} using DIT algorithm.
Sol:- Let w() = M1, −1,1, −1} ; Length N=4.
Twiddle factors are npo = q; nqo = −r;
Butterfly diagram
EXAMPLE
Compute the DFT of a sequence () = M0,1,2,3} using DIT and DIF algorithms.
Sol:- Let w() = M0,1,2,3} ; Length N=4.
Twiddle factors are npo = q; nqo = −r;
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 18
EENG-3151 DSP
EXAMPLE
Compute the DFT of a sequence @ M1,1,1,1,1,1,1,1} using DIT and DIF
algorithms.
Sol:- Let w() = M1,1,1,1,1,1,1,1} ; Length N=8
Twiddle factors are
Jy = 1; JyB = 0.707 − {0.707; JyC = −{; JyU = −0.707 − {0.707
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 19
EENG-3151 DSP
where .
Taking complex conjugate and multiply by N, we obtain,
KB
∗
I @ O & ∗ LJKT
TP
The right hand side of the equation is DFT of the sequence & ∗ L and may be computed using any
FFT algorithm.
The desired output sequence x(n) can then be found by complex conjugating the DFT and dividing by
N to give
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 20
EENG-3151 DSP
KB ∗
1
@ |O & ∗ (L)JKT }
I
TP
Example
Find the IDFT of the sequence &(L ) = M10, −2 + 2{, −2, −2 − 2{} using DIT & DIF
algorithms.
Sol: - Let &(L) = M10, −2 + 2{, −2, −2 − 2{} ; N=4; JW = 1; JWB = −{;
ELECTRICAL & COMPUTER ENG. DEPT., SCHOOL OF ENGINEERING, ASTU, ADAMA Page 21