You are on page 1of 20

Discrete Fourier Transform (DFT)

1
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Lecture 3
Discrete Fourier Transform (DFT)

Lecture delivered by:


Vasanthavalli.S

2
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Objectives
At the end of this lecture, student will be able to:

• Compute DFT in matrix and equation method


• Explain the principle of linear convolution via circular convolution
• Compute linear convolution of sequences using DFT
• Compute circular convolution sequences using DFT
• State the relation between DFT and DFS
• State the relation between DFT and Ƶ transform

3
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Topics
• Computation of DFT
• Linear Convolution of Two finite Sequences using DFT
• FIR filter –Liner Filtering using DFT
• Linear Convolution of sequences using DFT
• Relation between DFT and DFS
• Relation between DFT and Ƶ transform

4
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Computation of DFT
• DFT can be formulated as matrix-is a complex matrix around unit circle
 N 1
 x(n)WNkn 0  n  N 1
X (k )   n 0

0 otherwise

5
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example:1 Computation of 4 Point DFT

6
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Linear Convolution of Two Finite Sequences using DFT
• DFT supports circular convolution

N−1
• y(n)= m=0 x m h n − m modN

y(n )=IDFT{DFT(x(n).DFT(h(n)}
• The linear convolution of two sequences of length N1 and N2produces an
output of N1+N2-1
• To perform linear convolution via circular convolution both sequences
should be converted to N1+N2-1 point sequences by zero padding
• The resultant sequence of circular convolution will be the same as that of
linear convolution of N1and N2 point sequences
7
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Linear Convolution via Circular Convolution

8
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Linear Convolution via Circular Convolution - cont’d

Convolution of x(n) and h(n)


x(n) X[K]
Zero padding with
N1+N2-1 point DFT
(N2-1) zeros
Length N1 N1+N2-1 y(n)
point
IDFT
h(n)
Zero padding with
(N1-1) zeros N1+N2-1 point DFT
Length N2
H[K]

9
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
FIR Filter –Liner Filtering using DFT
• FIR filter which uses linear convolution : Output y(n) is a linear convolution
of input x(n) and unit sample response h(n)

x(n) of length N1 FIR Filter system h(n) y(n) of length N +N -1


1 2
of length N2
x(0),x(1),…x(N1-1) y(0),y(1),…y(N1+N2 -2)
h(0),h(1),h(2)…h(N2-1)

10
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example :2 Circular Convolution using DFT and IDFT

• Compute circular convolution between following sequences using DFT and


IDFT method.
x(n)={1,2,3,4} y(n)={-1,-2,-3,-4}
x(n) and y(n) are periodic with period N=4.
• Solution: The DFT of the sequences and their product as follows

By the circular convolution property

11
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example:3 Linear Convolution using DFT and IDFT
• An FIR filter has the impulse response of h(n)={1,2,3}.Determine the
response of the filter to the input sequence x(n)={1,2}.Use DFT and IDFT
and verify the results using direct computation of linear convolution.
• Solution:
a)Direct computation of y(n) using linear convolution
y(n)=x(n)*h(n)={1,4,,7,6}
b)Computation of y(n) using DFT and IDFT
1) length of DFT N=4
2) Zero padding x(n) and h(n)to make length N=4
x(n)={1,2,3,0} h(n)={1,2,0,0}
3)Calculation of DFT of X(K)
X4=[W4]x4 =[3 1-j2 -1 1+j2]
12
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example: 4 cont’d
4) Calculation of DFT of H(K)
H4= [W4]h4 = [6 -2-j2 2 -2+j2]
5) To multiply two
Y(K)=X(K).H(K)
Y4= X4 H4=[ 18 -6+j2 -2 -6-j2]
6) To obtain y(n) from Y(K)
Let us calculate Inverse DFT (IDFT) of Y4
1
yN = [WN∗ ] YK
N
1
y4 = [W4∗ ] Y4 =[ 1 4 7 6]
N
Conclusion : Linear convolution can be obtained using DFT and IDFT

13
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example :4 Linear Convolution of Two Finite
Sequences using DFT
• Use DFT to compute the linear convolution of the signals as shown in
Figure 2.

Figure :2
• Solution:
The length of x(n)=L=3
The length of h(n)=M=3
N=L+M-1=3+3-1=5
Now the sequences are x(n)={1,-1,1,0,0}, y(n)={2, 2, 1,0,0}

14
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Example :4 cont’d

• N=5 point DFT is given as

• X(0)=1, X(1)=-0.118+j0.364, X(2)=2.118+j1.5387,


X(3)= 2.118-j1.5387 , X(4)=-0.118-j0.364
• H(0)=5, H(1)=1.809-j2.489, H(2)=0.691-j0.223
H(3)= 0.691+j0.223 , H(4 )=1.809-j2.489,
• Y(K)=X(K).H(K)
• IDFT of Y(K) is
y(n)={2,0,1,1,1}

15
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Relation between DFT and DFS

• The DFS coefficients for a periodic sequence xp(n) over period N is given as
𝟏 𝑵−𝟏 −𝐣𝟐𝛑𝐤𝐧/𝐍
C(K)=
𝐍 𝒏=𝟎 𝐱𝐩(𝐧)𝐞 , where k=0,1,2,..N-1
• N point DFT pair is defined as,

1
• C(K)= X(K), K=0,1,2,..N-1
N

X(K)= N C(K)
• DFS coefficient is one sample of DFT or One period of DFT is equal to DFS
coefficient
16
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Relation between DFT and Ƶ transform

• The Z transform of N point sequence x(n) is given by


Z{x(n)}=X(Z)= 𝑁−1
𝑛=0 𝑥 𝑛 Z
−𝑛

• Let us evaluate X(z) at N equally spaced points on unit circle , i.e.


at Z= 𝐞−𝐣𝟐𝛑𝐤/𝐍
By the definition N point DFT
𝟏 𝑵−𝟏 −𝐣𝟐𝛑𝐤𝐧/𝐍
X(K)= 𝒏=𝟎 𝐱(𝐧)𝐞 , K=0,1,2,..N-1
𝐍

X(K)=X(Z) │z= 𝐞−𝐣𝟐𝛑𝐤/𝐍

• The N point can be obtained from z transform of the sequence, by


evaluating the Ƶ transform of the sequence at N equally spaced points
around unit circle
17
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Summary
• The DFT supports only circular convolution and so linear convolution
using DFT has to computed via circular convolution
• The complex valued phase factor or twiddle factor WN is defined as
WN =𝐞−𝐣𝟐𝛑/𝐍
• The term W in phase factor represents a complex 1∠2π
• The DFT defined along with number of samples is called N point DFT
• In circular convolution the length of the input sequences should be
same
• In linear convolution the length of the input sequences need not be
same
• The circular convolution is periodic and the linear convolution is
aperiodic

18
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Summary cont’d
• The linear convolution of two sequences of length N1 and N2 produces
an output of N1+N2-1
• The infinite sequence is splitted into smaller sections and their
convolution is performed is called sectioned convolution
• The methods of sectioned convolutions are overlap save and overlap
add
• In overlap add method ,overlapped samples of output sequences are
added
• In overlap save method, the overlapped samples in one of the output
sequences are discarded
• N point DFT provides the exact line spectrum of a periodic sequences
with fundamental period N

19
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences
Summary cont’d

• The N point DFT can be obtained from the Ƶ transform of the


sequence by evaluating the Ƶ transform at N equally spaced points
around unit circle

20
Faculty of Engineering & Technology © Ramaiah University of Applied Sciences

You might also like