Outline
The Discrete Fourier Transform (DFT)
Properties of the DFT
Linear Filtering Methods Based on the DFT
Frequency Analysis of Signals using the DFT
Dr. Xinrong Li
x ( n )e
jwn
1
IFT : x(n)
2
X ( w)e
jwn
dw
Dr. Xinrong Li
Time Signals
Sample X(w) periodically in frequency at w = 2k/N:
2
j 2kn / N
,
X ( N k ) x ( n)e
n
X ( w)
x ( n )e
jwn
x p ( n)
N 1
k 0
N 1
x
n 0
lN N 1
x ( n)e
j 2kn / N
l n lN
x(n lN ) c e
1
ck
N
(n)e j 2kn / N ,
j 2kn / N
for k 0, 1, ..., N 1
2kn / N
x
(
n
lN
)
e
n 0 l
N 1
for k 0, 1, ..., N 1
1
2
c
X
(
k ), for k 0, 1, ..., N 1
k N
N
N 1
x p (n) 1 X ( 2 k )e j 2kn / N , for n 0, 1, ..., N 1
N k 0
N
xp(n)
is the periodic
extension of x(n). Thus, x(n) can be recovered from xp(n) if
there is no aliasing in the time domain, that is, if x(n) is time-limited to less than
the period N of xp(n).
X(w) can then be recovered from x(n).
Dr. Xinrong Li
1
x ( n)
N
X ( w)
N 1
X(
k 0
x ( n )e
2
k )e j 2kn / N ,
N
jwn
n
N 1
X(
k 0
1
P( w)
N
N 1
2
k)
N
jwn
n 0
1
n 0 N
0 n N 1
2
k )e j 2kn / N e jwn
k 0
1 N 1 j ( w 2k / N ) n N 1 2
2
e
X
(
k
)
P
(
w
k)
N k 0
N
N
k 0
1 1 e jwN sin( wN / 2) jw ( N 1) / 2
e
N 1 e jw
N sin( w / 2)
N 1
N 1
X( N
P(
1,
2
k)
N
0,
k 0
k 1, 2 , ..., N 1
2
formula: X ( w)
X
(
k)
w 2k / N
N
Dr. Xinrong Li
Example 7.1.1
x(n) a nu (n),
0 a 1
1
1 ae jw
n 0
2
1
X ( k)
, 0 k N 1
N
1 ae j 2k / N
X ( w) a n e jwn
x p ( n)
x(n lN )
a nlN a n a lN
l 0
a
, 0 n N 1
1 aN
x p (n),
0 n N 1
0,
otherwise
x (n)
N 1
N 1
n 0
n 0
1 a N 1 ae jw
2
2
X ( w) X ( w), but : X ( k ) X ( k )
N
N
Dr.
Xinrong
Li
6
1
IDFT : x(n)
N
N 1
X ( k )e
j 2kn / N
, 0 n N 1.
k 0
Dr. Xinrong Li
Example 7.1.2
1,
0,
x ( n)
0 n L 1
otherwise
L 1
sin( wL / 2) jw( L 1) / 2
e
sin(
w
/
2
)
n 0
X ( w) x(n)e jwn
2
k ), 0 k N 1
N
sin(kL / N ) jk ( L 1) / N
e
sin(k / N )
X (k ) X (
If N L, then :
L,
0,
X (k )
k 0
1 k L 1
Dr. Xinrong Li
Effects of zero-padding:
Dr. Xinrong Li
Effects of zero-padding:
10
Dr. Xinrong Li
1
DFT : X (k ) x(n)W , IDFT : x(n)
N
n 0
x ( 0)
x (1)
xN
kn
N
XN
X ( 0)
X (1)
X (k )W
k 0
1
1
WN
x
(
N
1
)
X
(
N
1
)
DFT : X N WN x N ,
1 *
1
IDFT
:
x
W
X
WN X N ,
N
N
N
N 1
0 k, n N 1
...
WN
...
WNN 1
N 1
1 WN
( WN1
kn
N
1 *
WN or WN WN* NI N )
N
Example 7.1.3
0
1
x4 ,
2
3
11
Dr. Xinrong Li
1
1
1 1
1 j 1 j
,
W4
1 1 1 1
1
j
X 4 W4 x 4
6
2 2 j
2
2 2 j
EENG 5610, UNT
x p ( n ) ck e
j 2nk / N
, n ;
k 0
1
ck
N
N 1
j 2nk / N
x
(
n
)
e
, 0 k N 1
p
n0
1 N 1
x(n) X (k )e j 2kn / N ,
N k 0
X (k ) Nck
N 1
X (k ) x(n)e j 2kn / N , 0 n, k N 1
n 0
X (k ) X ( w) w2k / N
Dr. Xinrong Li
j 2nk / N
0 k N 1
x p (n) IDFT{ X (k )}
12
x ( n )e
x(n lN ),
x p (n),
0 n N 1
0,
otherwise
x (n)
DFT sequence X(k) is N equally spaced samples of X(z) on the unit circle:
x (n) z
X ( z)
x ( n )e
X (k ) X ( z ) z e j 2k / N
j 2nk / N
0 k N 1
If x(n) has a finite duration of length L N, x(n) can be recovered from its N-
X ( z ) x ( n) z
n 0
1 z N
1
n 0 N
N 1
N 1
X ( k )e
j 2kn / N
k 0
N 1
N 1
k 0
n 0
X ( k ) (e
j 2k / N
z 1 ) n
N 1
X (k )
j 2k / N 1
z
k 0 1 e
xa (t )
c e
j 2ktF0
x(n) xa (nT )
ck e
j 2kn / N
X (k ) N ck lN
l
13
Fs 1 / T N / T p
Nc~k ,
j 2kn / N
c
k lN e
k 0 l
N 1
c~k
k lN
Dr. Xinrong Li
Properties of DFT
DFT and IDFT
X ( k ) x ( n)e
n 0
j 2kn / N
N 1
x(n)W ,
n 0
kn
N
1
x ( n)
N
N 1
X ( k )e
k 0
j 2kn / N
N 1
X (k )W
k 0
Periodicity Property
If x(n) and X(k) are DFT pair, then:
x(n + N) = x(n), for all n,
X(k + N) = X(k), for all k.
Linearity Property
For any real-valued or complex-valued constants a1 and a2:
DFT
a1 x1 (n) a2 x2 (n) a1 X 1 (k ) a2 X 2 (k )
N
14
Dr. Xinrong Li
kn
N
x(n lN ),
x p (n)
x p ' (n),
x ' ( n)
x p ' ( n) x p ( n k )
x(n k lN )
0 n N 1
otherwise
0,
x((n k ) modulo N ) x((n k )) N
x((0))4 = x(0),
x((1))4 = x(1)
X 1 ( k ) x1 (n)e
j 2nk / N
N 1
X 2 (k ) x2 ( n)e j 2nk / N ,
n 0
n 0
X 3 ( k ) X 1 (k ) X 2 (k ),
N 1
1
x3 (m)
N
X
k 0
( k )e
0 k N 1
j 2km / N
N 1 N 1
x (n)e
N 1
N 1
n 0
l 0
k 0
0 k N 1
n 0
X (k ) X
k 0
j 2nk / N
x1 (n) x2 (l )
N 1
N 1
x (l )e
l 0
(k )e j 2km / N
j 2lk / N
j 2km / N
e
N 1
k 0
e j 2k ( mnl ) / N
N 1
0 m N 1
[circular convolution]
n 0
N 1
DFT
n 0
Define a e j 2 ( m n l ) / N , then
N 1
16
e
k 0
j 2k ( m n l ) / N
N 1
a
k 0
N
a 1, for a 0.
N,
a 1 N , for m n l pN , where p is an integer;
or l m n pN ((m n)) N
1 aN
, a 1
EENG 5610, UNT
0
,
otherwise.
1 a
Example 7.2.1
Steps for circular convolution
Circular folding (time reversing)
Circular Shifting
Multiplying
Summing
x3 (0) 14
0 m N 1
n 0
x3 (1) 16
x3 (2) 14
x3 (3) 16
17
Dr. Xinrong Li
x((n)) N x( N n) X ((k )) N X ( N k )
N
DFT
DFT
DFT
N 1
DFT
~
Circular correlation: ~
*
rxy (l ) x(n) y ((n l )) N Rxy (k ) X (k )Y * (k )
N
n 0
18
Dr. Xinrong Li
N 1
X (k ) X
k 0
((l k )) N
Y ( w) X ( w) H ( w)
Dr. Xinrong Li
YmL(kpoints
) H of
(k ) X m (k are
), exactly
y m (n) the
IDFT{
0 k, n N 1
the last
sameYas
m ( k )},
the result from linear convolution.
y (n)
m
y m (n)
20
21
Dr. Xinrong Li
Overlap-Add Method
The size of the input data block is L points.
The size of DFT and IDFT is N = L + M 1.
Append M 1 zeros to each data
22
Dr. Xinrong Li
1, 0 n L 1
,
0, otherwise
w(n)
W ( w) F {w(n)}
sin( wL / 2) jw ( L 1) / 2
e
sin( w / 2)
X ( )W (w )d
1
X ( w) [W ( w w0 ) W ( w w0 )]
2
24
Dr. Xinrong Li
Hanning window
To reduce leakage, we can select a window w(n) that has lower sidelobes in
2
1
n)],
[1 cos(
w(n) 2
L 1
0,
0 n L 1
otherwise
Example:
25
Dr. Xinrong Li
Example:
26
Dr. Xinrong Li
Example:
27
Dr. Xinrong Li
to the signal spectrum X(w), the window function has only small (smoothing)
effect on the signal spectrum X(w).
On the other hand, if the
28
Dr. Xinrong Li