You are on page 1of 61

Digital Signal Processing

Lecture: DFT and FFT

1
1 - Frequency Domain Vs. Time Domain

CTFS DTFS

CTFT DTFT

2
2 - Discrete Fourier Transform (DFT)

• A finite or periodic sequence has only N unique values,


x[n] for 0  n p N
• Spectrum is completely defined by N distinct frequency
samples
• Divide 0..2π into N equal steps, {ω(k)} = 2πk/N
• Uniform sampling of DTFT spectrum:

3
4
DFT Example
Find the DFT for the 4 points time sequence {1 0 0 1},
3 3
➢ at k=0, X (0) =  x(n ) e− j 0 =  x(n)
n=0 n=0

= x(0) + x(1 ) + x(2) + x(3)


= 1+ 0 + 0 +1 = 2
3
➢ at k=1, X (1) =  x(n) e− jn ,  = 2 N
n=0
3
−j 2n
X (1)  x(n) e N

n=0
= 1+ 0 + 0 +1e − j 23 4 = 1+ e − j3 4

5
DFT Example
Find the DFT for the 4 points time sequence {1 0 0 1},
3 3
➢ at k=0, X (0) =  x(n ) e− j 0 =  x(n)
n=0 n=0

= x(0) + x(1 ) + x(2) + x(3)


= 1+ 0 + 0 +1 = 2
3
➢ at k=1, X (1) =  x(n) e− jn ,  = 2 N
n=0
3
−j 2n
X (1)  x(n) e N

n=0
= 1+ 0 + 0 +1e − j 23 4 = 1+ e − j3 4

6
DFT Example – contd.
− j 2 2n
3 3
➢ at k=2, X (2) =  x(n ) e − j2nT
=  x(n ) e N

n=0 n=0
3 −j 4n
=  x(n ) e N

n=0

= 1+ 0 + 0 +1e− j4 3 4
3
➢ at k=3, X (3) =  x(n) e − j 2Π3n N

n=0

= 1+ 0 + 0 +1e− j9Π 2

7
DFT Example – contd.
− j 2 2n
3 3
➢ at k=2, X (2) =  x(n ) e − j2nT
=  x(n ) e N

n=0 n=0
3 −j 4n
=  x(n ) e N

n=0

= 1+ 0 + 0 +1e− j4 3 4 = 1+ e− j3 = 1−1 = 0


3
X (3) =  x(nT ) e
− j 2 3n
N
➢ at k=3,
n=0

= 1+ 0 + 0 +1e− j9 2
= 1− j

X (k) = {2,1+ j, 0,1− j}


8
DFT Example – contd.
x(nT) |X(k)|
1 2
√2
x x x
0 125 250 375 t(µs) 0 12.57 25.14 37.71 50.28
kΩ(X 103 rad/s)
φ(k)(⁰)
x(n)={1,0,0,1} +45 Phase Angle
indeterminate

0 x 37.71 x
12.57 25.14 50.28
kΩ(X 103 rad/s)

‐45

X(k) ={2,1+ j,0,1− j}


9
2 - Discrete Fourier Transform (DFT) …
For x(n) = [x(0), x(1), x(2), x(3)]

𝑊𝑁𝑛𝑘 = 𝑒 −𝑗2Π𝑛𝑘/𝑁

10
2 - Discrete Fourier Transform (DFT) …

11
2 - Discrete Fourier Transform (DFT) …

12
2 - Discrete Fourier Transform (DFT) …

13
DFT Example

14
DFT Example

15
DFT Example

16
3 - Inverse Discrete Fourier Transform (IDFT)

17
3 - Inverse Discrete Fourier Transform (IDFT)

18
3 - Inverse Discrete Fourier Transform (IDFT)

19
DFT Properties

20
21
X(k+N)=X(k) for all k
Formula for DFT

X(k+N)=X(k) 22
x(n+N)=x(n) for all n
Formula for IDFT

23
If two finite duration sequence x1(n) & x2(n) are linearly
combined as

The DFT of x3(n)


is

24
25
The shifted version of x(n) is

Same Way
DFT{x(n)}=x(k)
26
Consider 1st part
1

N-m+n=l if n=0 then l=N-m


n=l+m-N if n=m-1 then l=N-m+m-1=N-1

2 27
Consider 2nd part

N-m+n=l if n=m then l=N


n=l+m-N if n=N-1 then l=N-m+N-1=2N-m-1

3
28
Add 1st and 2nd part of equation 2 & 3

29
30
31
32
33
34
35
36
37
38
39
N-n=m if n=0 then m=N
N-M=n if n=N-1 then m=1

40
41
42
43
44
45
46
47
48
49
Similarly

50
51
52
Example solved earlier

53
54
55
If two finite duration sequence x1(n) & x2(n) are finite duration
Sequence both of length N with DFTs X1(K)& X2(K)

Now we find x3(n) for which the DFT is X3(K) Where

Similarly

N
56
57
Let
n-m-l=PN
l=n-m-PN
-P=1
l=n-m+N=((n-m))N

n-m-l=PN
m=n-l-PN
m=n-l+N
if l=0→ m=n+N
if l=N-1→m=n+1

Arrange by circular shift


m=n+1→n+1-n-1=0
similarly m=n+N→n+N-n-1=N-1
58
59
60
61

You might also like