Anda di halaman 1dari 55

Chapter 8 the discrete fourier transform

8.1 representation of periodic sequences:the discrete fourier series


8.2 the fourier transform of periodic signals
8.3 properties of the discrete fourier series
8.4 fourier representation of finite-duration sequences:
Definition of the discrete fourier transform
8.5 sampling the fourier transform(point of sampling)
8.6 properties of the fourier transform
8.7 linear convolution using the discrete fourier transform
8.8 the discrete cosine transform(DCT)

8.1 representation of periodic sequences:


the discrete fourier series

1
x[ n] N

X [k ]

N 1 ~

X [ k ]WN kn (1), n 0,..N 1

k 0
N 1 ~

kn
x
[
n
]
W

N ( 2), k 0,.. N 1
n 0

WNkn e j 2kn / N
N 1
( k rN ) n ~
~
~
X [ k rN ] x [ n]W
X [k ]
N
n 0

EXAMPLE.

Figure 8.1
~

X [k ]

n 0

kn
W10

N=10

j 4k / 10

sin(k / 2)
sin(k / 10)

phase X denotes magnitude=0 phase is indeterminate


Figure 8.2

8.2 the fourier transform of periodic signals


~ 2
N 1
2 ~
2k
~ j
X [k ]
X (e )
X [k ] (
)
N
N
N
k 0

k
N
other

dispersion in time domain results in periodicity in frequency domain;


Periodicity in time domain results in dispersion in frequency domain.

DFS is a method to calculate frequency spectrum of periodic signals.

FIGURE 8.5

8.3 properties of the discrete fourier series


DFS ~
DFS ~
DFS ~
~
~
~
x [ n]
X [k ], x1[n]
X 1[k ], x2 [n]
X 2 [k ]

DFS ~
~
~
~
1.linearity : ax1[n] bx2 [n]
aX 1[k ] bX 2 [k ]

N=4 12 points DFS


two periodic
sequences with
different period

N=6 12 points DFS

both period=12
compositive sequence N=12 12 points DFS

DFS km ~
~
2.shift of a sequence : x [n m]
W
X [k ]

N
nl ~ DFS ~
W
x [ n]
X [k l ]
N

~ DFS ~
3.duality : X [n]
Nx [ k ]

4.symmetry properties :
DFS ~
DFS ~
~
~
x * [n]
X * [ k], x * [ n]
X * [k]

DFS 1 ~
1 ~
~
~
~
~
Re{x[n]} (x[n] x * [n])
(X[k] X * [k]) X e [k]
2
2
DFS 1 ~
1 ~
~
~
~
~
jIm{x[n]} (x[n] x * [n])
(X[k] X *[k]) X o [k]
2
2
DFS 1 ~
1 ~
~
~
~
~
x e [n] (x[n] x * [n])
(X[k] X * [k]) Re{X[ k ]}
2
2
DFS 1 ~
1 ~
~
~
~
~
xo [n] ( x [n] x * [n])
( X [k ] X *[ k ]) j Im{X [ k ]}
2
2

For a real sequence:


~

x[n] x* [n]

~
~
X [k ] X * [k ]
~
~
Re{ X [ k ]} Re{ X [ k ]}
~
~
Im{X [ k ]} Im{X [k ]}
~
~
| X [k ] || X [ k ] |
~
~
X [k ] X [k ]

EXAMPLE.

DFS of real sequence

FIGURE 8.2

5. periodic convolution :
N 1

~
x3 [n] ~
x1[n] ~
x2 [ n ] ~
x1[m]~
x2 [ n m ] ~
x2 [ n ] ~
x1[n]
m 0

Periods of 3 sequences are all N.

(1)if : ~
x3 [ n ] ~
x1[n] ~
x 2 [ n]
~

then : X 3 [k ] X 1[k ] X 2 [k ]

~
~
~
(2)if : x3 [n] x1[ n] x2 [ n]
~

~
1
then : X 3 [k ]
X [k ] X 2 [k ]
N 1

graphic method to
calculate periodic
convolution

Figure 8.3

8.4 fourier representation of finite-duration


sequences:
Definition of the discrete fourier transform
The last two expressions are
~
x [ n]

x[n rN ] x[n mod N ] x[((n))

x[n] ~
x [ n ]RN [ n ]
EXAMPLE.

Figure 8.8

only suitable to no aliasing.

Two derivations of definition:


1. Periodic extension of the finite-duration sequence with
period N ;
DFS of the periodic sequence ;
DFT is the dominant period of DFS.
2. DTFT of the finite-duration sequence;
DFT is the N-points spectral sampling.

duration of sequence is N

X [k ]

N 1

x[n]WNkn , k 0,1,....N 1

n 0
N 1

1
x[n] N

X [k ]WN kn , n 0,1,...N

k 0
N 1

X [0] x[n]

x[0] 1

n 0
N 1

X [k ]
k 0

X [ k ] X ( e j ) |

2
k
N

X ( z) |

z e

2
k
N

EXAMPLE.

Figure 8.10
periodic
extension
with period 5

x[((n))5 ]

DFS{~
x [ n]}

X [k ]R5 [ k ]

explanations 1. DFT and DFS have the same expression, but


DFT are samples of frequency spectrum of the finite-duration
sequence , DFS is frequency spectrum of periodic sequence
2. the periods of DFS in time and frequency domain is N,
DFT in frequency domain is defined to be finite duration, but
has the immanent period N
3. the meaning of DFT not only is samples of frequency
spectrum , but also can reconstruct time-domain signal

8.5 sampling the fourier transform

EXAMPLE.

Figure 8.5
periodic
extension with
period 10

reflect
frequency
spectrum of
signal more
truly than
figure 8.10

conclusion sequence with length N is extended to M by filling


0 in time domain, then do M-points DFT. We can get more dense
samples of its FT, and can reconstruct time-domain signal by
taking the first N nonzero values from the reconstructed signal
contrarily, if we want to get M-points samples of FT by DFT,
we can use the method of filling 0 in time domain.

genetic instance
Sequence with length N or infinite length , sample M points
in frequency domain more than or less than or equal to N
then the reconstructed time-domain signal is dominant period of
the periodic extension with period M of original signal maybe

aliasing Viz. if
X ( e j ) |

x[ n]WMkn , k
2

k
M
n

0,1...M 1

then the result of IDFT is

x'[n] ( x[n rM ]) RN [n]


r

Conclusion when M<N, the reconstructed time-domain signal is


domain period of the periodic extension with aliasing of original
signal. Contrarily , if we want to get M (M<N) sample points of FT
by DFT we can extend the sequence with period M in time
domain, take the dominant period and do M-points DFT.

sampling theorem in frequency domain


If sampling points N in frequency domain is more than the length
of sequence the time-domain signal can be reconstructed
and the sampling spectral line can be constructed to be
continuous spectral function by ideal interpolation
j

X (e ) 1 e

jN

prove :
N 1

X (e ) x[ n]e
j

n0

N 1

N 1

k 0

n0

N 1

X [k ]
/ N
k j
k 0 1 WN e

j n

N 1

1
(
n 0 N

kn jn
X
[
k
](
W

N e )

N 1

X [k ]
k j
1

W
k 0
N e

1 e j N / N

N 1

kn
j n
X
[
k
]
W
)
e

N
k 0

DFT of a finite-duration sequence DFS of a periodic sequence are


both samples of FT of another sequence, then the relationship
among the three sequences in time domain

X [k ]

2
M
FT

x1[n] X1 (e

M points IDFT

x2 [ n ]

x[n rM ]

MIDFS
~
~
X
[
k
]

x3[n]
M 3

RM [n]

x[n rM ]

periodic extension in time domainsampling in frequency domain

summary 8.5
1. DFT is N-points samples of frequency spectrum of sequence with length N. the
more spectral sampling points, the more genuine to reflect the frequency spectrum
2. get M-points spectral samples of N-points sequence by M-points DFT:
1 M=N do M-points DFT directly
2 M>N extend x[n] to M points by filling 0 then do M-points DFT
3 M<N periodic extension of x[n] with period M and aliasing take the
dominant period with length M, then do M-points DFT
3. whether spectral sampling can reconstruct original time-domain signal
spectral sampling theorem if spectral sampling points is larger than or equal
to the length of signal, the time-domain signal can be reconstructed. Contrarily, it
can not be done.
4. If frequency spectrum is the same its samples are equal contrarily, it does
not come into existence
if frequency spectrum has linear phase, its samples has linear phase, too
contrarily, it does not come into existence

8.6 properties of the fourier transform


DFT
DFT
DFT
x[n]
X [k ], x1[n]
X 1[k ], x2 [n]
X 2 [k ]

DFT
1.linearity : ax1[ n] bx 2 [ n]
aX 1[ k ] bX 2 [ k ]

2.circular shift of a sequence


x1[n] x[((n m)) N ]R N [n] x[((n ( N m))) N ]R N [n]

DFT km
x[((n m)) N ]RN [n]
W X [k ]

N
ln
DFT
W
x[n]
X [((k l )) N ]RN [k ]
N

EXAMPLE.

circular
shift

Figure 8.12

EXAMPLE. 8.42

| H 1[ k ] |

8points DFT|

H 2 [k ] |

h1[n]
h2 [n]
j

| H 1 (e ) |

1024 points DFT

| H 2 ( e j ) |

DFT
3.duality : X [n]
Nx[(( k )) N ]RN [ k ] Nx[ N k ]

EXAMPLE.

x[ n] n cos(0.2n)

| X [k ] || DFT {x[n]} |

DFT { X [n]}

X '[k ] X [(( k )) N ]RN [k ] X [(( N k )) N ]RN [k ] X [ N k ]


X [k ]

X '[k ]

4. Symmetry properties:
*

x [ n]

DFT

X *[(( k )) N ]RN [k ] X *[(( N k )) N ]RN [k ] X *[ N k ]

DFT *
x [(( n)) N ]RN [n] x [ N n]
X [k ]

DFT 1
1
Re{x[n]} ( x[n] x * [n])
( X [k ] X * [ N k ]) X ep [k ]
2
2
DFT 1
1 ~
~
~
j Im{x [ n]} ( x [n] x * [n])
( X [k ] X * [ N k ]) X op [ k ]
2
2
DFT 1
1
xep [n] ( x[n] x * [ N n])
( X [k ] X * [k ]) Re{ X [k ]}
2
2
DFT 1
1
xop [n] ( x[n] x * [ N n])
( X [k ] X * [k ]) j Im{X [k ]}
2
2
*

definition
X ep [k ] : periodic conjugate - symmetric components
X op [k ] : periodic conjugate - antisymmetric components
sequence with length N can be decomposed
X [k ] X ep [k ] X op [k ]
while
1
X ep [k ] ( X [k ] X * [ N k ]) X ep *[ N k ]length N
2
real part is even symmetric , imaginary part is odd symmetric
1
X op [k ] ( X [k ] X * [ N k ]) X op * [ N k ]lenth N
2
real part is odd symmetric , imaginary part is even symmetric

For a real sequence:

x[n] x * [n]

X [k ] X * [ N k ]

Re{ X [k ]} Re{ X [ N k ]}
Im{X [k ]} Im{X [ N k ]}
| X [k ] || X [ N k ] |

X [k ] X [ N k ]

EXAMPLE. x[n] 0.5n cos(0.5n), n 0...9

Real{X[k]}

|X[k]|

N=10

DFT of real
sequence

Imag{X[k]}

arg{X[k]}

N=9

|X[k]|

Arg{X[k]}

5.circular convolution

y[n] x1[n]( N ) x2 [n]

( x1[((n)) N ] x2[((n)) N ]) RN [n]


N 1

x [((m))
1

N ] x2 [((n m)) N ]) RN [ n]

m 0

Length of x1[n],x2[n],y[n] are N.

DFT
(1) x1[n]( N ) x2 [n]
X 1[ k ] X 2 [ k ]

DFT 1
(2) x1[n]x2 [n]
X 1[k ]( N ) X 2 [k ]
N

EXAMPLE.
graphic
method to
calculate
circular
convolution

x[n]( N ) [n 1]
x[((n 1)) N ]RN [n]

Figure 8.14

convolution
result
depends on
N

EXAMPLE.

Figure 8.15
N=L

Figure 8.16 N=2L

EXAMPLE.

6.paswals theory
N 1

x[n] y * [n]

n 0

N 1

n 0

| x[ n] |2

1
N

1
N

N 1

k 0

N 1

X [k ]Y * [k ]
k 0

| X [k ] |2

8.7 linear convolution using the discrete fourier


transform
if : y[n] x[n] * h[n]

then : x[n
] Nh[n]

y[n rN ]R

N [ n]

PROVE

x[n] h[n]

y[n]

FT

X (e
according to
properties
of circular
convolution

) H (e

Y (e

N point sample

X [ k ]H [ k ]

IDFT

x[n]( N )h[n]

Y [k ]

according to
spectral
sampling

y[n rN ]RN [n]

r
If N>=N1+N2-1,then x[n]*h[n]=x[n](N)h[n]

EXAMPLE.

Figure 8.18
linear convolution

shift right of the


linear convolution

shift right of the


linear convolution
6 points circular convolution=
linear convolution with
aliasing

12 points circular convolution


= linear convolution

Conclusion:
(1)calculate N point circular convolution by linear convolution
(a) y[n] x[n] * h[n]

(b) x[n]( N )h[n]

y[n rN ]R

N [ n]

(2) calculate linear convolution by circular convolution


(a) zero padding x[n] and h[n] to length of N L1 L2 1

(b) x[ n] h[ n] x[n]( N ) h[n]

(3) calculate linear convolution by DFT


( a) zero padding x[n] and h[n] to length of N L1 L2 1

(b) N po int s DFT of x[n] and h[n]


(c) x[n]( N )h[n] IDFT { X [k ]H [k ]}
x[n] * h[n] x[n]( N )h[n]

implementing linear time-invariant FIR systems using the DFT

Figure 8.22
consideration
1 deal with data when input them
2 operation speed
3 the counts of input and output data are
equal

the following two methods is used


in the situation such that real-time
and speedy operation is required
time-domain method is commonly
used

overlap-add method
length of h[n] is P
(1)segment x(n) into sections of length L;
(2)fill 0 into h(n) and some section of x(n) ,
then do L+P-1 points FFT ;
(3) calculate
y (n) IFFT {H (k ) X (k )}n 0,...L P 2

(4)add the points n=0P-2 in y (n) to the


last P-1 points in the former section
y[n] the output for this section is the
points n=0L-1
y0 (n) 0 h[0] 0 h[1] 0 h[2] x[n 3]h[3] ...
n L,...L P 2

y1 (n) x[n] h[0] x[n 1] h[1] x[n 2] h[2]


0 h[3] 0 h[4] ..., n 0,..P 2

y2 (n) y1[n] y2 [n], n 0,...P 2

P-1
points

overlap-save method
the length of h[n] is P
(1)segment x(n) into sections of length L,
overlap P-1 points;
(2)fill 0 into h(n) and some section of x(n) ,
then do L points FFT ;
(3) calculate

y (n) IFFT {H (k ) X (k )}n 0,...L 1


(4) the output for this section is the L-P+1
points n=P-1,L-1 of y[n]
If do L+P-1 points DFT, then wipe off the
first and last P-1 points in the result,
respectively, output is the middle L-P+1
points
To guarantee the output is linear convolution
result, the minimum points of DFT is L

Figure 8.24

P-1 points

linear convolution
result

Conclusion : use of DFT


1 calculate spectral sample of signals
2 calculate sample of frequency response of systems
3 frequency-domain realization for FIR system

8.8 the discrete cosine transform(DCT)

DCT 1X [k ]
x[n]
DCT 2X [k ]
x[n]

2
ck
N 1

2
cn
N 1
2
ck
N
2
N

N 1

cn x[ n] cos(

n 0
N 1

ck X [ k ] cos(

n 0
N 1

n 0
N 1

n 0

kn
),0 k N 1
N 1

x[n] cos(

kn
),0 n N 1
N 1

k (2n 1)
),0 k N 1
2N

ck X [ k ] cos(

k (2n 1)
),0 n N 1
2N

DCT 3X [k ]
x[ n]
DCT 4X [k ]
x[ n]
1 / 2, k 0
1,1 k N 1

ck

2
N

N 1

cn x[ n] cos(

n 0
N 1

2
ck
N

X [ k ] cos(

n 0
N 1

x[n] cos(

2
N

X [k ] cos(

n 0

n(2k 1)
),0 n N 1
2N

(2n 1)(2k 1)
),0 k N 1
4N

2
N

n0
N 1

n( 2k 1)
),0 k N 1
2N

( 2n 1)(2k 1)
),0 n N 1
4N

symmetric and periodic extension of signal, then do DFS


and get DCT by taking the dominant period

DCT-1

-2
-21.
1.0.0.1.
1.2.
2.3.
3.4.
4.55

DCT-2

-4
-4
-43
3
3-2-1
-2-1
-2-10.
0.0.1.
1.1.2.
2.2.3.
3.3.4.
4.4.5.
5.5.6.
6.6.777

relationship between 2Npoinsts DFT of extended


sequence and N-points
DCT of original sequence

DCT 2
x[n], n 0,...N 1

y[ n]

X [2 N 1 n], n N ,...2 N 1
2 N 1

Y [k ]

y[n]W2knN

n 0

N 1

x[ n]W2knN

n 0

x[ n]W2knN

n 0

2W2Nk / 2

N 1

N 1

x[ n]W2kN( 2 N 1 n )

n 0

N 1

x[ n] cos(

n 0

2W2Nk / 2 X [k ] /(

(2n 1)k
)
2N

2
ck )
N

2 N 1

n N

x[2 N 1 n]W2knN

Compare with DFT:energy compaction property


DCT

012 345 67
DFT

012 345 67

summary
8.1 representation of periodic sequences: the discrete fourier series
8.2 the fourier transform of periodic signals
8.3 properties of the discrete fourier series
8.4 fourier representation of finite-duration sequences:
Definition of the discrete fourier transform
8.5 sampling the fourier transform (point of sampling)
8.6 properties of the fourier transform
8.7 linear convolution using the discrete fourier transform
8.8 the discrete cosine transform (DCT)

requirements
definition, calculation and properties of DFS;
derivation of definition of DFT DFS or spectral sampling;
concepts of spectral sampling, time-domain periodic
extension;
properties of DFT linearity circular shift , symmetry,
circular convolution paswals theory;
relationship between linear and circular convolution;
derivation of definition DCT and comparison with DFT.

key and difficulty spectral sampling and properties of DFT

exercises

8.26

8.29

8.39

8.45

8.49

Anda mungkin juga menyukai