Upload
sridhar-koneru-venkkat
View
224
Download
0
Tags:
Embed Size (px)
Citation preview
The Discrete Fourier Transform
Content Introduction Representation of Periodic Sequences
– DFS (Discrete Fourier Series) Properties of DFS The Fourier Transform of Periodic Signals Sampling of Fourier Transform Representation of Finite-Duration Sequences
– DFT (Discrete Fourier Transform) Properties of the DFT Linear Convolution Using the DFT
The Discrete Fourier Transform
Introduction
Signal Processing Methods
Time
Continuous
Discrete
PeriodicityPeriodic Aperiodic
Fourier SeriesFourier Series Continuous-TimeFourier Transform
Continuous-TimeFourier Transform
DFSDFS
DurationFinite Infinite
Discrete-TimeFourier Transformand z-Transform
Discrete-TimeFourier Transformand z-Transform
Frequency-Domain Properties
Time
Continuous
Discrete
PeriodicityPeriodic Aperiodic
Fourier SeriesFourier Series Continuous-TimeFourier Transform
Continuous-TimeFourier Transform
DFSDFS
DurationFinite Infinite
Discrete-TimeFourier Transformand z-Transform
Discrete-TimeFourier Transformand z-Transform
Discrete &
Aperiodic
Discrete &
Aperiodic
Continuous &
Aperiodic
Continuous &
Aperiodic
Continuous &
Periodic (2)
Continuous &
Periodic (2)??
Frequency-Domain Properties
Time
Continuous
Discrete
PeriodicityPeriodic Aperiodic
Fourier SeriesFourier Series Continuous-TimeFourier Transform
Continuous-TimeFourier Transform
DFTDFT
DurationFinite Infinite
Discrete-TimeFourier Transformand z-Transform
Discrete-TimeFourier Transformand z-Transform
Discrete &
Aperiodic
Discrete &
Aperiodic
Continuous &
Aperiodic
Continuous &
Aperiodic
Continuous &
Periodic (2)
Continuous &
Periodic (2)??
Relation?
Relation?
Relation?Relation?
Frequency-Domain Properties
Time
Continuous
Discrete
PeriodicityPeriodic Aperiodic
Fourier SeriesFourier Series Continuous-TimeFourier Transform
Continuous-TimeFourier Transform
DFTDFT
DurationFinite Infinite
Discrete-TimeFourier Transformand z-Transform
Discrete-TimeFourier Transformand z-Transform
Discrete &
Aperiodic
Discrete &
Aperiodic
Continuous &
Aperiodic
Continuous &
Aperiodic
Continuous &
Periodic (2)
Continuous &
Periodic (2)
Discrete &
Periodic
Discrete &
Periodic
The Discrete Fourier Transform
Representation of Periodic Sequences --- DFS
Periodic Sequences
Notation: a sequence with period N
)(~)(~ rNnxnx )(~)(~ rNnxnx
where r is any integer.
HarmonicsknNj
k ene )/2()( knNjk ene )/2()(
)()(),()( 110 nenenene NN
Facts:)()( rNnene kk
,2,1,0 k
Each has Periodic N.
N distinct harmonics e0(n), e1(n),…, eN1(n).
Synthesis and Analysis
Notation )/2( NjN eW )/2( Nj
N eW
Synthesis
1
0
)(~
)(~N
k
knNWkXnx
1
0
)(~
)(~N
k
knNWkXnx
Analysis1
0
1( ) ( )
Nkn
Nn
X k x n WN
1
0
1( ) ( )
Nkn
Nn
X k x n WN
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
Both have Period N
Example
r
rNnnx )()(~
r
rNnnx )()(~ A periodic impulse train with period N.
1)(~)(~ 1
0
knN
N
n
WnxkX
1
0
)/2(1
0
11)(~
N
k
knNjN
k
knN e
NW
Nnx
Example
k
k
n
kn
W
WWkX
10
510
4
010 1
1)(
~
0 1 2 3 4 5 6 7 8 9 n
)10/sin(
)2/sin()10/4(
k
ke kj
Example
k
k
n
kn
W
WWkX
10
510
4
010 1
1)(
~
0 1 2 3 4 5 6 7 8 9 n
)10/sin(
)2/sin()10/4(
k
ke kj
Example
k
k
n
kn
W
WWkX
10
510
4
010 1
1)(
~
0 1 2 3 4 5 6 7 8 9 n
)10/sin(
)2/sin()10/4(
k
ke kj
DFS vs. FT)(~ nx )(~ nx
0 N nN
0 n
)(nx )(nx
0
)()(n
njj enxeX
1
0
)(N
n
njenx
1
0
)/2()(~)(~ N
n
knNjenxkX
Nk
jeXkX/2
)()(~
Example
0 1 2 3 4 5 6 7 8 9 n
0 1 2 3 4 5 6 7 8 9 n
)(~ nx )(~ nx
)(nx )(nx
)2/sin(
)2/5sin(
1
1)( 2
54
0
jj
j
n
njj ee
eeeX
)10/sin(
)2/sin()()(
~ )10/4(
10/2 k
keeXkX kj
k
j
Example
0 1 2 3 4 5 6 7 8 9 n
0 1 2 3 4 5 6 7 8 9 n
)(~ nx )(~ nx
)(nx )(nx
)2/sin(
)2/5sin(
1
1)( 2
54
0
jj
j
n
njj ee
eeeX
)10/sin(
)2/sin()()(
~ )10/4(
10/2 k
keeXkX kj
k
j
Example
0 1 2 3 4 5 6 7 8 9 n
0 1 2 3 4 5 6 7 8 9 n
)(~ nx )(~ nx
)(nx )(nx
)2/sin(
)2/5sin(
1
1)( 2
54
0
jj
j
n
njj ee
eeeX
)10/sin(
)2/sin()()(
~ )10/4(
10/2 k
keeXkX kj
k
j
The Discrete Fourier Transform
Properties of DFS
Linearity
)(~
)(~11 kXnx DFS )(
~)(~
11 kXnx DFS
)(~
)(~22 kXnx DFS )(
~)(~
22 kXnx DFS
)(~
)(~
)(~)(~2121 kXbkXanxbnxa DFS )(
~)(
~)(~)(~
2121 kXbkXanxbnxa DFS
Shift of A Sequence
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
)(~
)(~ kXWmnx kmN DFS )(
~)(~ kXWmnx km
N DFS
Change Phase (delay)
)(~
)]([~ kXWlNmnx kmN DFS )(
~)]([~ kXWlNmnx km
N DFS
Shift of Fourier Coefficient
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
)(~
)(~ lkXnxW nlN DFS )(
~)(~ lkXnxW nl
N DFS
Modulation
Duality
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
)(~)(~
kxNnX DFS )(~)(~
kxNnX DFS
Periodic Convolution
)(~
)(~11 kXnx DFS )(
~)(~
11 kXnx DFS
)(~
)(~
)(~)(~21
1
021 kXkXmnxnx
N
m
DFS )(~
)(~
)(~)(~21
1
021 kXkXmnxnx
N
m
DFS
)(~
)(~22 kXnx DFS )(
~)(~
22 kXnx DFS
Both have Period N
Periodic Convolution
)(~
)(~11 kXnx DFS )(
~)(~
11 kXnx DFS
1
02121 )(
~)(
~1)(~)(~
N
l
lkXlXN
nxnx DFS
1
02121 )(
~)(
~1)(~)(~
N
l
lkXlXN
nxnx DFS
)(~
)(~22 kXnx DFS )(
~)(~
22 kXnx DFS
Both have Period N
The Discrete Fourier Transform
The Fourier Transform of Periodic Signals
Fourier Transforms of Periodic Signals
Time
Continuous
Discrete
PeriodicityPeriodic Aperiodic
Fourier SeriesFourier Series Continuous-TimeFourier Transform
Continuous-TimeFourier Transform
DFTDFT
DurationFinite Infinite
Discrete-TimeFourier Transformand z-Transform
Discrete-TimeFourier Transformand z-Transform
Discrete &
Aperiodic
Discrete &
Aperiodic
Continuous &
Aperiodic
Continuous &
Aperiodic
Continuous &
Periodic (2)
Continuous &
Periodic (2)DFSDFSSampling
Sampling
Fourier Transforms of Periodic Signals
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
)(~ nx )(~ nx
0 N nN
0 n
)(nx )(nx
Nk
jeXkX/2
)()(~
Nk
jeXkX/2
)()(~
k
j
N
kkX
NeXnx
2)(
~2)(
~)(~ FT
The Discrete Fourier Transform
Sampling of
Fourier Transform
Equal Space Sampling of Fourier Transform
)()( jeXnx FT )()( jeXnx FT
Nk
jeXkX/2
)()(~
Nk
jeXkX/2
)()(~
jez
zX )(
z-plane z-planekNjez
zXkX)/2(
)()(~
0 n
)(nx )(nx
N’1
?)(~ nx
N N’>=<
Equal Space Sampling of Fourier Transform
Nk
jeXkX/2
)()(~
Nk
jeXkX/2
)()(~
)()()(~ )/2(
)/2(
kNj
ezeXzXkX
kNj
1
0
)(~1
)(~N
k
knNWkX
Nnx
1
0
)/2( )(1 N
k
knN
kNj WeXN
1
0
)/2()(1 N
k
knN
m
kmNj WemxN
m
N
k
mnkNW
Nmx
1
0
)(1)(
r
N
k
mnkN rNmnW
N)(
1 1
0
)(
r
N
k
mnkN rNmnW
N)(
1 1
0
)(
m r
rNmnmx )()( ( )* ( )r
x n n rN
Equal Space Sampling of Fourier Transform
kNjezzXkX
)/2()()(
~
kNjezzXkX
)/2()()(
~
( ) ( )* ( )r
x n x n n rN
( ) ( )* ( )r
x n x n n rN
z-plane
Example
n
)(~ nx )(~ nx
0 8
N=12
12
n
)(nx )(nx
0 8
N’=9
n0 8
N=7
12
)(~ nx )(~ nx
n
)(~ nx )(~ nx
0 8
N=12
12
n
)(nx )(nx
0 8
N’=9
n0 8
N=7
12
)(~ nx )(~ nx
Example
Time-Domain AliasingTime-Domain Aliasing
Time-Domain Aliasing vs. Frequency-Domain Aliasing
To avoid frequency-domain aliasing– Signal is bandlimited– Sampling rate in time-domain is high enough
To avoid time-domain aliasing– Sequence is finite– Sampling interval (2/N) in frequency-
domain is small enough
DFT vs. DFS Use DFS to represent a finite-length sequence
is call the DFT (Discrete Fourier Transform). So, we represent the finite-duration sequence
by a periodic sequence. One period of which is the finite-duration sequence that we wish to represent.
otherwise
Nnnxnx
0
10)(~)(
otherwise
Nnnxnx
0
10)(~)(
The Discrete Fourier Transform
Representation of
Finite-Duration Sequences --- DFT
Definition of DFT
Synthesis
1
0
)(~
)(~N
k
knNWkXnx
1
0
)(~
)(~N
k
knNWkXnx
Analysis
1
0
)(~)(~ N
n
knNWnxkX
1
0
)(~)(~ N
n
knNWnxkX
)(~
)(~ kXnx DFS )(~
)(~ kXnx DFS
otherwise
NnWkXnx
N
k
knN
0
10)()(
1
0
otherwise
NnWkXnx
N
k
knN
0
10)()(
1
0
otherwise
NnWnxkX
N
n
knN
0
10)()(
1
0
otherwise
NnWnxkX
N
n
knN
0
10)()(
1
0
)()( kXnx DFT )()( kXnx DFT
Example)(nx )(nx
5 ),(~ Nnx 5 ),(~ Nnx
)(~
kX )(~
kX
)(kX )(kX
Example)(nx )(nx
10 ),(~ Nnx 10 ),(~ Nnx
|)(| kX |)(| kX
)(kX )(kX
The Discrete Fourier Transform
Properties of the DFT
Linearity
n
)(1 nx )(1 nx
0 N11
Duration N1
n)(2 nx )(2 nx
0 N21
Duration N2
),max( 21 NNN ),max( 21 NNN )()( 11 kXnx DFT )()( 11 kXnx DFT
)()( 22 kXnx DFT )()( 22 kXnx DFT
)()()()( 2121 kbXkaXnbxnax DFT )()()()( 2121 kbXkaXnbxnax DFT
Circular Shift of a Sequence
0n
)(nx )(nx
N
n
)(~ nx )(~ nx
0 N
n
)(~)(~1 mnxnx )(~)(~
1 mnxnx
0 N
otherwise
Nnmnxnxnx N
0
10))(()(~)( 1
1
otherwise
Nnmnxnxnx N
0
10))(()(~)( 1
1
Circular Shift of a Sequence
otherwise
Nnmnxnxnx N
0
10))(()(~)( 1
1
otherwise
Nnmnxnxnx N
0
10))(()(~)( 1
1
)()( kXnx DFT )()( kXnx DFT
)(10 ,))(( )/2( kXeNnmnx mNjN
DFT )(10 ,))(( )/2( kXeNnmnx mNjN
DFT
Duality
)()( kXnx DFT )()( kXnx DFT
10 ,))(()( NkkNxnX NDFT 10 ,))(()( NkkNxnX NDFT
ExampleChoose N=10Choose N=10
Re[X(k)]Re[X(k)]
Im[X(k)]Im[X(k)]
Re[x1(n)]= Re[X(n)]Re[x1(n)]= Re[X(n)]
Im[x1(n)]= Im[X(n)]Im[x1(n)]= Im[X(n)]
X1(k) = 10x((k))10X1(k) = 10x((k))10
Linear Convolution (Review)
)(*)()()()( 2113 nxnxmnxmxnxm
)(*)()()()( 2113 nxnxmnxmxnxm
)()( 11 jeXnx FT )()( 11
jeXnx FT)()( 22
jeXnx FT )()( 22 jeXnx FT
)()()()(*)()( 213213 jjj eXeXeXnxnxnx FT )()()()(*)()( 213213
jjj eXeXeXnxnxnx FT
Circular Convolution
)()())(()()( 21
1
013 nxnxmnxmxnx
N
mN
)()())(()()( 21
1
013 nxnxmnxmxnx
N
mN
)()( 11 kXnx DFT )()( 11 kXnx DFT)()( 22 kXnx DFT )()( 22 kXnx DFT
)()()()()()( 213213 kXkXkXnxnxnx DFT )()()()()()( 213213 kXkXkXnxnxnx DFT
both of length N
Example
)()( 01 nnnx )()( 01 nnnx
)(2 nx )(2 nx
)(*)( 21 nxnx )(*)( 21 nxnx0
0 N
0 n0 N
)()( 21 nxnx )()( 21 nxnx 0
n0=2, N=5n0=2, N=5
Example
)()( 01 nnnx )()( 01 nnnx
)(2 nx )(2 nx
)(*)( 21 nxnx )(*)( 21 nxnx0
0 N
0 n0 N
)()( 21 nxnx )()( 21 nxnx
n0=2, N=7n0=2, N=7
0
Example
otherwise
Lnnxnx
0
101)()( 21
otherwise
Lnnxnx
0
101)()( 21
)()()( 213 nxnxnx )()()( 213 nxnxnx
L=N=6L=N=6
otherwise
kN
WkXkXN
n
knN
0
0
)()(1
021
otherwise
kN
WkXkXN
n
knN
0
0
)()(1
021
otherwise
kNkXkXkX
0
0)()()(
2
213
otherwise
kNkXkXkX
0
0)()()(
2
213
0 L
)(1 nx )(1 nx
0 L
)(2 nx )(2 nx
0 L
)(3 nx )(3 nxN
Example
)()()( 213 nxnxnx )()()( 213 nxnxnx
otherwise
LkW
W
WkXkX
kL
LkN
L
n
knL
0
1201
1
)()(
2
1)1(
1
0221
otherwise
LkW
W
WkXkX
kL
LkN
L
n
knL
0
1201
1
)()(
2
1)1(
1
0221
otherwise
LkW
WkXkXkX k
L
LkL
0
1201
1 )()()(
2
2
1)1(2
213
otherwise
LkW
WkXkXkX k
L
LkL
0
1201
1 )()()(
2
2
1)1(2
213
otherwise
Lnnxnx
0
101)()( 21
otherwise
Lnnxnx
0
101)()( 21
L=2N=12L=2N=12
0 L
)(2 nx )(2 nx
N
0 L
)(1 nx )(1 nx
N
0
)(3 nx )(3 nx
N
N
The Discrete Fourier Transform
Linear Convolution Using the DFT
Why Using DFT for Linear Convolution?
FFT (Fast Fourier Transform) exists.
But., we have to ensure that circular convolving nature of DFT gives the linear convolving result.
The Procedure
Let x1(n) and x2(n) be two sequences of length L and P, respectively.
1. Compute N-point (N = ?) DFTs X1(k) and X2(k).
2. Let X3(k) = X1(k) X2(k), 0 k N1.
3. Let x3(n) = DFT1[X3(k)] = x1(n) x2(n).
x1(n) * x2(n) = x1(n) x2(n)?x1(n) * x2(n) = x1(n) x2(n)?
Linear Convolution ofTwo Finite-Length Sequences
m
nmxmxnxnxnx )()( )(*)()( 21213
m
nmxmxnxnxnx )()( )(*)()( 21213
0 L
x1(m)
m
0 P L
x2(m)
m
0P 1 Lm
x2(1 m)
L0 nP+1 nm
x2(n m)
0 n+P1n Lm
x2(L+P1 m)
x3(1) = 0
x3(n) 0
x3(L+P1) = 0
n = 0, 1, , L+P2
Linear Convolution ofTwo Finite-Length Sequences
m
nmxmxnxnxnx )()( )(*)()( 21213
m
nmxmxnxnxnx )()( )(*)()( 21213
0 L
x1(m)
m
0 P L
x2(m)
m
0P 1 Lm
x2(1 m)
L0 nP+1 nm
x2(n m)
0 n+P1n Lm
x2(L+P1 m)
x3(1) = 0
x3(n) 0
x3(L+P1) = 0
n = 0, 1, , L+P2
Length of x3(n) = x1(n)*x2(n) = L+P1Length of x3(n) = x1(n)*x2(n) = L+P1
Circular Convolution as Linear Convolution with Time Aliasing
x1(n) Length Lx2(n) Length P
x(n) = x1(n)*x2(n) Length L+P1
)()( 11 jeXnx FT )()( 11
jeXnx FT
)()( 22 jeXnx FT )()( 22
jeXnx FT
)()()()( 21 jjj eXeXeXnx FT )()()()( 21
jjj eXeXeXnx FT
otherwise
NkeXkX
Nkj
0
10)()(Let
)/2(
r
rNnxnx )()(~
otherwise
Nnnxnxp 0
10)(~)(Let ?)()( nxnxp ?)()( nxnxp
Circular Convolution as Linear Convolution with Time Aliasing
L0
x1(n)n
P
x2(n)
0n
L
0 Pn
L+P1
x (n)
L
N = L+P1
)()(~ nxnxp )()(~ nxnxp
0n
L+P1
x (n)
L
0n
L+P1
)(~ nx
L
0n
L+P1L
For Finite Sequences
L0
x1(n)n
P
x2(n)
0n
x p(n) = x1(n)*x2(n)
= x1(n)x2(n), 0 n L+P2
Zero padding to length L+P1
Zero padding to length L+P1
0n
L+P2
N = L
0 P1 nL+P1
x (n)
L
0 P1 nL+P1
)(~ nx
L L
0 P1 nL+P1L
otherwise
LnPnx
PnLnxnx
nxp
0
1)(
20)()(
)(~
otherwise
LnPnx
PnLnxnx
nxp
0
1)(
20)()(
)(~
N = L
0 P1 nL+P1
x (n)
L
0 P1 nL+P1
)(~ nx
L L
0 P1 nL+P1L
otherwise
LnPnx
PnLnxnx
nxp
0
1)(
20)()(
)(~
otherwise
LnPnx
PnLnxnx
nxp
0
1)(
20)()(
)(~
Corrupted(P1) points
Uncorrupted(LP+1) points
FIR Filter for Indefinite-Length Signals
Overlap-Add MethodOverlap-Save Method
x (n)
h (n)
Block Convolution
Overlay-Add Method
x (n)
h (n)
)(0 nx )(1 nx )(2 nx
otherwise
LnrLnxnxr 0
10)()(
otherwise
LnrLnxnxr 0
10)()(
0
)()(r
r rLnxnx
0
)()(r
r rLnxnx
Overlay-Add Method
otherwise
LnrLnxnxr 0
10)()(
otherwise
LnrLnxnxr 0
10)()(
0
)()(r
r rLnxnx
0
)()(r
r rLnxnx
0
)()(*)()(r
r rLnynhnxny
0
)()(*)()(r
r rLnynhnxny
)(*)()( nhnxny rr )(*)()( nhnxny rr
Overlay-Add Method
Set N = L+P1for each block convolution
Overlay-Save Method
• Each block is of length L.• P1 samples are overlaid btw.
adjacent blocks.• Set N = L+P1 for each block
convolution.• Save the last LP+1 values
for each block convolution.