ESE 531: Digital Signal Processing Lec 19: Apr 2, 2019 Discrete Fourier Transform Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
ESE 531: Digital Signal Processing
Lec 19: Apr 2, 2019 Discrete Fourier Transform
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Today
! Discrete Fourier Series ! Discrete Fourier Transform (DFT) ! DFT Properties ! Circular Convolution
2 Penn ESE 531 Spring 2019 - Khanna
Discrete Fourier Series
Penn ESE 531 Spring 2019 - Khanna 3
Reminder: Eigenvalue (DTFT)
! x[n]=ejωn
4 Penn ESE 531 Spring 2019 - Khanna
y[n]= x[n− k]h[k]k=−∞
∞
∑
= e jω (n−k )h[k]k=−∞
∞
∑
= e jωn h[k]k=−∞
∞
∑ e− jωk
= H (e jω )e jωn
H (e jω ) = h[k]k=−∞
∞
∑ e− jωk
! Describes the change in amplitude and phase of signal at frequency ω
! Frequency response ! Complex value
" Re and Im " Mag and Phase
Discrete Fourier Series
! Definition: " Consider N-periodic signal:
" Frequency-domain also periodic in N:
" “~” indicates periodic signal/spectrum
5 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Series
! Define:
! DFS:
6 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Series
! Properties of WN: " WN
0 = WNN = WN
2N = ... = 1 " WN
k+r = WNkWN
r and, WNk+N = WN
k
7 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Series
! Properties of WN: " WN
0 = WNN = WN
2N = ... = 1 " WN
k+r = WNkWN
r and, WNk+N = WN
k
! Example: WNkn (N=6)
8 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Series
! Properties of WN: " WN
0 = WNN = WN
2N = ... = 1 " WN
k+r = WNkWN
r and, WNk+N = WN
k
! Example: WNkn (N=6)
9 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Transform
! By convention, work with one period:
10
Same, but different!
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Transform
! The DFT
! It is understood that,
11 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFS vs. DFT
12 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFS vs. DFT
13 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
14 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
15 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Discrete Fourier Series
! Properties of WN: " WN
0 = WNN = WN
2N = ... = 1 " WN
k+r = WNkWN
r and, WNk+N = WN
k
! Example: WNkn (N=6)
16 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
17 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
! Q: What if we take N=10? ! A: where is a period-10 seq.
18 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
! Q: What if we take N=10? ! A: where is a period-10 seq.
19 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
! Now, sum from n=0 to 9
20
9
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
! Now, sum from n=0 to 9
21
9
4
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT vs. DTFT
! For finite sequences of length N: " The N-point DFT of x[n] is:
" The DTFT of x[n] is:
22 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT vs. DTFT
! The DFT are samples of the DTFT at N equally spaced frequencies
23 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
4
DFT vs DTFT
! Back to example
24 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
4
DFT vs DTFT
! Back to example
25 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
4
DFT vs DTFT
! Back to example
26
Use fftshift to center around dc
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
27 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
28 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
29 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
30 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
31 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! Use the DFT to compute the inverse DFT. How?
32 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! So
33 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! So
34 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT and Inverse DFT
! So
! Implement IDFT by:
" Take complex conjugate " Take DFT " Multiply by 1/N " Take complex conjugate
35 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT as Matrix Operator
36 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT as Matrix Operator
37 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT as Matrix Operator
38 N2 complex multiples Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
DFT as Matrix Operator
! Can write compactly as
39 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Properties of the DFT
! Properties of DFT inherited from DFS ! Linearity
! Circular Time Shift
40 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Circular Shift
41 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Circular Shift
42 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Properties of DFT
! Circular frequency shift
! Complex Conjugation
! Conjugate Symmetry for Real Signals
43 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example: Conjugate Symmetry
44 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example: Conjugate Symmetry
45 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example: Conjugate Symmetry
46 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example: Conjugate Symmetry
47 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example: Conjugate Symmetry
48 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Example
49 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Properties of the DFS/DFT
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Properties (Continued)
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Duality
52 Penn ESE 531 Spring 2019 - Khanna
Duality
53 Penn ESE 531 Spring 2019 - Khanna
Proof of Duality
54 Penn ESE 531 Spring 2019 - Khanna
Discrete Fourier Series
! Properties of WN: " WN
0 = WNN = WN
2N = ... = 1 " WN
k+r = WNkWN
r and, WNk+N = WN
k
! Example: WNkn (N=6)
55 Penn ESE 531 Spring 2018 – Khanna Adapted from M. Lustig, EECS Berkeley
Circular Convolution
! Circular Convolution:
For two signals of length N
56 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
57 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
58 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
59 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
y[0]=2
Compute Circular Convolution Sum
60
y[0]=2
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
61
y[0]=2 y[1]=2
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
62
y[0]=2 y[1]=2 y[2]=3
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Compute Circular Convolution Sum
63
y[0]=2 y[1]=2 y[2]=3 y[3]=4
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Result
64
y[0]=2 y[1]=2 y[2]=3 y[3]=4
Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Circular Convolution
! For x1[n] and x2[n] with length N
" Very useful!! (for linear convolutions with DFT)
65 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Multiplication
! For x1[n] and x2[n] with length N
66 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Linear Convolution
! Next.... " Using DFT, circular convolution is easy " But, linear convolution is useful, not circular " So, show how to perform linear convolution with circular
convolution " Use DFT to do linear convolution
67 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Big Ideas
! Discrete Fourier Transform (DFT) " For finite signals assumed to be zero outside of defined
length " N-point DFT is sampled DTFT at N points " Useful properties allow easier linear convolution
! DFT Properties " Inherited from DFS, but circular operations!
68 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley
Admin
! HW 8 out now " Due Sunday
69 Penn ESE 531 Spring 2019 – Khanna Adapted from M. Lustig, EECS Berkeley