7/30/2019 DSP Lecture 13-14
1/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
EE 802-Advanced Digital SignalProcessing
Dr. Amir A. Khan
Office : A-218, SEECS
9085-2162; [email protected]
7/30/2019 DSP Lecture 13-14
2/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
Lecture Outline
Discrete Fourier Transform (DFT)
7/30/2019 DSP Lecture 13-14
3/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
Discrete Fourier Transform
Discrete Fourier Transform (DFT) not same as DTFT
DFT results from sampling of DTFT (at pre-defined frequencies),
generally for an aperiodic finite duration discrete sequence
Extension of Discrete Fourier Series (DFS)
Aperiodic Discrete
Why DFT? Efficient algorithms exist for DFT computation (Fast Fourier Transform)
7/30/2019 DSP Lecture 13-14
4/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
be a periodic sequence with periodNso that
Discrete Fourier Series-Revisit
[ ]x n [ ] [ ]x n x n rN
12 / 2 /
0
1 1[ ]Nj N kn j N kn
k N k
x n X k e X k eN N
Fourier Series : representation of signal as sum of complex exponentials
Periodicity of discrete time exponentials implies sum is finite duration
For convenience we define : 2 /j N
NW e
Analysis equation
Synthesis equation 1
0
1[ ]
Nkn
N
k
x n X k WN
1
0
[ ]N
kn
N
n
X k x n W
DFS Pair
][~
][~ kXnxDFS
7/30/2019 DSP Lecture 13-14
5/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
Discrete Fourier Series-Examples
1[ ] 0r
n rNx n n rN
else
1
2 /
0
1[ ]
Nj N kn
r k
x n n rN eN
[ ] [ ]r
Y k N k rN
10
0
1[ ] [ ] 1
Nkn
N N
k
y n N k W WN
Periodic impulse train
Coefficients form periodic impulse train
Coefficients constant
Sequence constant
DUALITY
Refer to your DSP Oppenheim Book for Summary of DFS properties
7/30/2019 DSP Lecture 13-14
6/17
Lectures 13-14 EE-802 ADSP SEECS-NUST
Relationship between DTFT/DFS
Periodic /Finite Duration signals Relationship between DTFT and DFS for periodic sequences
Periodic impulse train : strength proportional to DFS coefficients
2 2j
k
kX e X k
N N
Consider a finite length signal x[n] spanning from 0 to N-1
Convolve with periodic impulse train
[ ] [ ] [ ] [ ]r r
x n x n p n x n n rN x n rN
2
2 2
2 2
j j j j
k
kj
j N
k
kX e X e P e X e
N N
kX e X e
N N
2
2
kj
jNk
N
X k X e X e
Fourier Transform
DFS coeffs. correspond to sampling of
DTFT (in freq. domain) @every 2 /N
7/30/2019 DSP Lecture 13-14
7/17Lectures 13-14 EE-802 ADSP SEECS-NUST
Relationship between DTFT/DFS
Periodic /Finite Duration signals (Ex.)
1, 0 4
0 , otherwise
n
x n
42
0
sin 5 / 2
sin / 2
j j n j
nX e e e
x n represents one cycle of the following periodic signal
4 4
2 /10
10
0 0
j knkn
n n
X k W e
54 /1010
10
sin / 21
sin /101
kj k
k
kWX k e
kW
2 /10k Substitute
(4 /10)
sin / 2[ ]
sin /10j k
kX k e
k
DFS coeffs.
7/30/2019 DSP Lecture 13-14
8/17Lectures 13-14 EE-802 ADSP SEECS-NUST
Sampling the Fourier Transform
Time Domain : Periodic signal from finite duration sequence
Frequency-domain: Performing the sampling operation
Performing reverse operation : sampling of DTFT
2 /2 /
j N kj
N kX k X e X e
2 / 2 /j N k j N k
z eX k X z X e
Sampling the z-transform
1
0
1[ ] [ ]
N
knN
kx n X k W
N
Inverse DFS
*r r
x n x n n rN x n rN
Sampling of DTFT (aperiodic sequence) in frequency domain
generates a periodic repetition of the aperiodic sequence with period N
Periodicity of sequence evident from moving around unit circle
7/30/2019 DSP Lecture 13-14
9/17Lectures 13-14 EE-802 ADSP SEECS-NUST
Sampling the Fourier Transform-Time Aliasing
r
rNnxnx ][][~ One-period
Im(z)
Re(z)
12
2
Im(z)
Re(z)
DFS DTFT
7/30/2019 DSP Lecture 13-14
10/17Lectures 13-14 EE-802 ADSP SEECS-NUST
Sampling the Fourier Transform-Time Aliasing
r
rNnxnx ][][~ One-period
Im(z)
Re(z)
7
2
Im(z)
Re(z)
DFS DTFT
X
X
Aliasing in Time-Domain
7/30/2019 DSP Lecture 13-14
11/17Lectures 13-14 EE-802 ADSP SEECS-NUST
Summary
Samples of Fourier Transform of an aperiodic sequencex[n]can be
thought of as Fourier Series Coeffs. of periodic sequence obtained
by summing periodic replicas ofx[n]
Ifx[n]is finite duration and we take sufficient number of samples
of its Fourier Transform (greater than or equal to its length), thenx[n]
is recoverable from the periodic sequence
To recover or representx[n], it is therefore not necessary to knowX(ej )
at all the frequencies
Using DFS for purpose of recovering/representing a finite duration
sequence leads to DFT
][~ nx
][~ nx
7/30/2019 DSP Lecture 13-14
12/17Lectures 13-14 EE-802 ADSP SEECS-NUST
DFT-Fourier Representation ofFinite
Duration Sequences
Consider a finite length sequence x[n] of length N
Corresponding periodic sequence
To maintain duality between time and frequency
Fourier coefficients to associate with finite duration sequence x[n]
one period of
0 outside of 0 1x n n N
r
x n x n rN
mod NN
X k X k X k
mod N Nx n x n x n
No-overlap between the summation terms
[ ] 0 1[ ]
0 otherwise
x n n Nx n
One period of ][~ nx
][~
kX
[ ] 0 1[ ]
0 otherwise
X k k NX k
7/30/2019 DSP Lecture 13-14
13/17Lectures 13-14 EE-802 ADSP SEECS-NUST
DFT-Analysis and Synthesis Equations
12 /
0
1
[ ]
Nj N kn
kx n X k eN
12 /
0[ ]
Nj N kn
nX k x n e
DFS Pair
12 /
0
[ ] 0 1
0
Nj N kn
n
x n e k NX k
else
1
2 /
0
10 1
[ ]
0
Nj N kn
k
X k e n Nx n N
else
PERIODIC
ONE PERIOD ONLY
DFT
x n X k
1
0
[ ] ( ) , 0 1N
kn
N
n
X k x n W k N
1
0
1[ ] ( ) , 0 1
Nkn
N
k
x n X k W n NN
Analysis equation Synthesis equation
7/30/2019 DSP Lecture 13-14
14/17Lectures 13-14 EE-802 ADSP SEECS-NUST
DFT-Ex: Rectangular Pulse
Minimum Value of N ?
Minimum Value ofN = 5
42 /5
0
2
2 /5
1
1
5 0, 5, 10,...0
j k n
n
j k
j k
X k e
e
e
kelse
DFS
Required DFT
7/30/2019 DSP Lecture 13-14
15/17Lectures 13-14 EE-802 ADSP SEECS-NUST
DFT-Ex: Rectangular Pulse
Minimum Value of N ?
Minimum Value ofN = 5
42 /5
0
2
2 /5
1
1
5 0, 5, 10,...0
j k n
n
j k
j k
X k e
e
e
kelse
DFS
Required N = 5-point DFT
7/30/2019 DSP Lecture 13-14
16/17Lectures 13-14 EE-802 ADSP SEECS-NUST
DFT-Ex: Rectangular Pulse N = 10
4
2 /10
0
j kn
n
X k e
2 /10 5
2 /10
1
1
j k
j k
e
e
4 /10 sin / 2
sin /10j k ke
k
Required N = 10-point DFT
DFT not same as
prev. example althoughDTFT is same
7/30/2019 DSP Lecture 13-14
17/17
DFT- Frequency Interpretation
1
0
[ ] ( ) , 0 1N
kn
Nn
X k x n W k N
DFT determines the spectral content of input at Nequally spaced frequency points What are the exact frequencies in the DFT spectrum?
depends on the number of DFT points N and
on the sampling frequencyfs
, at which the original signal was sampled
X[k] : frequency content at discrete radial frequency: (rad/sample)
or cycles/sample
In real frequency terms (Hz) :
kN
k
2
N
kfk
Nkff sanalysis
In case your sampling frequency is not specified or not known, we talk of normalized
frequency (scale from -0.5 to 0.5)