Вы находитесь на странице: 1из 19

The Discrete Fourier Transform

Department of Engineering Physics


Gadjah Mada University

Introduction
Representation of periodic sequences: the discrete Fourier series
Properties of the DFS
The Fourier transform of periodic signals
Sampling the Fourier transform
Fourier representation of finite-duration sequences: the discrete
Fourier transform
Properties of the DFT
Linear convolution using the DFT
The discrete cosine transform (DCT)

2/17/2015 2

1
time continuous discrete

discrete-time
Fourier Fourier
aperiodic transform transform continuous

x(t) = (1/2) X(j)ejtd x[n] = (1/2) X(ej)ejnd

X(j) = x(t) e-jtdt X(ej) = x[n] e-jn

discrete
Fourier Fourier
series transform
periodic discrete
xp(t) = X[k] ejkt x[n] = (1/N)k=0 N-1 X[k]WN-kn

X[k] = (1/T) 0T xp(t) e-jktdt X[k] = n=0 N-1 x[n]WNkn

aperiodic periodic frequency

2/17/2015 3

Representation of Periodic Sequences: The Discrete


Fourier Series

Consider a periodic sequence xp[n] with period N, so that xp[n]


= xp[n + rN] for any integer values of n and r. The Fourier series
representation has the form:
xp[n] = (1/N) k=0N-1 Xp[k]ej(2/N)kn (a)
where Xp[k] = n=0N-1 xp[n]e-j(2/N)nk = Xp[k + N] (b)
Equations (a) and (b) are an synthesis-analysis pair and will be
referred to as the discrete Fourier series (DFS)
representation of a periodic sequence.
Where WN = ej(2/N) .

2/17/2015 4

2
Example: Discrete Fourier series of a periodic impulse train

Consider the periodic impulse train


xp[n] = r=- [n-rN] = 1, n = rN, r any integer
0, otherwise.
Since xp[n] = [n] for 0 n N-1, the DFS coefficients are found to be
Xp[k] = n=0N-1 [n]WNkn = WN0 = 1.
It means that Xp[k] is the same for all k. Thus,
xp[n] = r=- [n-rN] = (1/N) n=0N-1WN-kn = (1/N)n=0N-1ej(2/N)kn .

2/17/2015 5

Example: Duality in the discrete Fourier series

Let the discrete Fourier series coefficients be the periodic impulse train
Yp[k] = r=- N[k-rN] .
Substituting Yp[k] to obtain yp[n] gives
yp[n] = (1/N)k=0N-1 N[n]WN-kn = WN-0 = 1.
In this case, yp[n] = 1 for all n. When comparing this result with the
results of previous example, we see that
Yp[k] = Nxp[k] and yp[n] = Xp[n].

2/17/2015 6

3
Example: The discrete Fourier series of a periodic rectangular pulse train

xp[n] is the sequence shown in next chart, whose period is N=10.


We obtain
Xp[k] = n=04 W10kn = n=04 ej(2/10)kn .
This finite sum has the closed form
Xp[k] = [1 W105k]/[1 W10k] = ej(4k/10) [sin(k/2)/sin(k/10)] .

2/17/2015 7

2/17/2015 8

4
Properties of the Discrete Fourier Series
Periodic sequence (period N) DFS coefficient (period N)

xp[n] Xp[k] periodic with period N


xp1[n], xp2[n] Xp1[k], Xp2[k] periodic with period N
axp1[n] + bxp2[n] aXp1[k] + bXp2[k] Linearity
xp[n-m] WNkmXp[k] Shift of a sequence
WN-lnxp[n] Xp[k-l] Shift of a DFS coefficient
X[n] Nx[-k] Duality
m=0N-1xp1[m]xp2[n-m] Xp1[k]Xp2[k] Periodic convolution
xp1[n]xp2[n] (1/N)l =0N-1Xp1[l]Xp2[k-l] Periodic convolution
xp*[n] Xp*[-k]
xp*[-n] Xp*[k]
Re{xp[n]} Xpe[k] = (Xp[k] + Xp*[-k])
jIm{xp[n]} Xpo[k] = (Xp[k] Xp*[k])
xpe[n] = (xp[n] + xp*[-n]) Re{Xp[k]}
xpe[n] = (xp[n] + xp[-n]) Re{Xp[k]} when x[n] is real
xpo[n] = (xp[n] xp*[-n]) jIm{Xp[k])
xpo[n] = (xp[n] xp[-n]) jIm{Xp[k]) when x[n] is real
Symmetry properties for xp[n] real Xp[k] = Xp*[k]
Re{Xp[k]} = Re{Xp[-k]}
Im{Xp[k]} = -Im{Xp[-k]}
|Xp[k]| = |Xp[-k]|
Xp[k] = -Xp[-k]

2/17/2015 9

Periodic Convolution

Periodic convolution is different from aperiodic convolution.


The sum is over the finite interval 0 m N-1.
The values of xp[n-m] in the interval 0 m N-1 repeat periodically for
m outside of that interval.

xp3[n]=xp3[n-N] = m=0N-1 xp1[m]xp2[n-m] DFS Xp1[k]Xp2[k]=Xp3[k]

The multiplication of the DFS coefficients of two periodic sequences


corresponds to a periodic convolution of the sequences.

2/17/2015 10

5
2/17/2015 11

The Fourier Transform of Periodic Signals

The Fourier transform of periodic sequence xp[n] is defined to be the


impulse train:
Xp(ej) = k=- (2/N)Xp[k]( (2k/N)) .
Xp(e ) has the periodicity with period 2 while Xp[k] is periodic with
j

period N and the impulses are spaced at integer multiplies of 2/N, where
N is an integer.

(1/2) 02 Xp(ej)ejnd = (1/N)k=0N-1 Xp[k]ej(2/N)kn = xp[n].

the inverse Fourier transform the Fourier series representation


of the impulse train Xp(ej) for periodic sequence xp[n]

2/17/2015 12

6
Example: The Fourier transform of a periodic impulse train

Consider the periodic impulse train


ip[n] = r=- [n rN]
Its DFS coefficients will become
Ip[k] = n=0N-1 [n]WNkn = WN0 = 1, Since ip[n] = [n] for 0 n N-1.
The Fourier transform of ip[n] is
Ip(ej) = r=- (2/N)( (2k/N)) .

2/17/2015 13

Periodic sequence xp[n] formed by repeating a finite-length sequence,


x[n], periodically. Alternatively, x[n] = xp[n] over one period and is
zero otherwise.
xp[n] = r=- x[n rN] = x[n]*ip[n] = x[n]* r=- [n rN]
Xp(ej) = X(ej)Ip(ej) = k=- (2/N)X(ej(2/N)k)( (2k/N)).
Then, Xp[k] = X(ej(2/N)k) = X(ej) | = (2/N)k .
That is the periodic sequence Xp[k] of DFS coefficients has an inter-
pretation as equally spaced samples of the Fourier transform of the
finite-length sequence obtained by extracting one period of xp[n].

2/17/2015 14

7
Thus, when x[n] = xp[n] for 0 n N-1 and x[n] = 0 otherwise,

X(ej) = n=0N-1 x[n]e-jn = n=0N-1 xp[n]e-jn .

Then, Xp[k] = X(ej) | = (2k/N) .

That is it corresponds to sampling the Fourier transform at N equally


spaced frequencies between = 0 and = 2 with a frequency spacing of
2/N.

2/17/2015 15

Relationship between the Fourier series coefficients and the Fourier


transform of one period

2/17/2015 16

8
The Fourier Transform and Its Family
x(t) FT X(f)
Non periodic/continuous Non periodic/continuous/band limited: 2fc
x[n] = 2fci(2fct)x(t) DTFT Xp(f) = I(f/2fc)*X(f)
Non periodic/discrete: sample Periodic with period 2fc/continuous
spacing 1/ 2fc
xp(t) = i(t/2t0)*x(t) DFS X[k] = 2t0I(2t0f)X(f)
Periodic with period 2t0/continuous Non periodic/discrete: line spectrum
spacing 1/ 2t0
xp[n] = 2fci(2fct){i(t/2t0)*x(t)} Xp[k] = 2t0I(2t0f){I(f/2fc)*X(f)}
= i(t/2t0)*{2fci(2fct)x(t)} = I(f/2fc)*{2t0I(2t0f)X(f)}
= r=- x[n rN] = r=- X[k rN]
Periodic with period 2t0/discrete: sample Periodic with period 2fc/discrete: sample
spacing 1/ 2fc spacing 1/ 2t0
x[n] = (1/N) k=0N-1 X[k]WN-kn X[k] = n=0N-1 x[n]WNkn
x[n] DFT X[k]

i(t) = (t n2t0) I(f) = (f n2fc)


Impulse train with period 2t0 = 1/2fc Impulse train with period 2fc = 1/2t0

2/17/2015 17

-t0 t0 t -fc fc f

1/2fc

1/2t0

2/17/2015 18

9
2/17/2015 19

The Discrete Fourier Transform


The exponential Fourier series of a periodic signal of period T:
xp(t) = k=-Xkexp[jk0t]
where the coefficient Xk = (1/T) 0Txp(t)exp[-jk0t]dt
and 0 = 2/T.
If xp(t) is sampled at the sampling period of t as xs(nt), then
Xk = (1/T)n=0N-1 xs(nt)exp[-j2k(nt)/T]t
where t = T/N, 0 = 2/T, N is number of sample of xp(t) in one period T,
xs(nt) = x[n], and Xk = X[k]. Thus,
X[k] = (1/N)n=0N-1 x[n]e-j2kn/N ; k = 0, 1, , N-1.
X[k] will be a periodic sequence with period N due to e-j2kn/N.
So, x[n] = k=-0N-1X[k]ejk(2/T)n (T/N) = k=-0N-1X[k]ej2n/N.

X[k] = n=0N-1 x[n]e-j2kn/N

x[n] = (1/N)k=-0N-1X[k]ej2n/N

2/17/2015 20

10
Sequence x[n]
with N = 5.

Periodic
sequence of
X[n] with
period N = 5.

Fourier series
coefficients
Xk for periodic
sequence.

DFT
magnitude of
x[n].

2/17/2015 21

Sequence
x[n] with
N = 10.

Periodic
sequence
of x[n]
with period
N = 10.

DFT
magnitude

DFT
phase.

2/17/2015 22

11
Properties of the Discrete Fourier Transform

Finite-length sequence (length N) N-points DFT (length N)

x[n], x1[n], x2[n] X[k], X1[k], X2[k]


a x1[n] + b x2[n] aX1[n] + bX2[n] Linearity
X[n] Nx[((-k))N] Duality
x[((n-m))N] WNkmX[k] Circular shift of a sequence
WN-lnx[n] X[((k-l))N]
m=0N-1x1[m]x2[((n-m))N] X1[k]X2[k] Circular convolution
x1[n]x2[n] (1/N)l=0N-1X1[l]X2[((k-l))N]
x*[n] X*[((-k))N]
x*[((-n))N] X*[k]
Re{x[n]} Xep[k] = {X[((k))N] + X*[((-k))N]
jIm{x[n]} Xop[k] = {X[((k))N] - X*[((-k))N]
xep[n] = {x[n] + x*[((-n))N] Re{X[k]}
xep[n] = {x[n] + x[((-n))N] Re{X[k]} when x[n] is real
xop[n] = {x[n] - x*[((-n))N] jIm{X[k]}
xop[n] = {x[n] - x[((-n))N] jIm{X[k]} when x[n] is real
Symmetry properties, when x[n] is real X[k] = X*[((-k))N]
Re{X[k]} = Re{X[((-k))N]
x[((n))N] = x[n] is a periodic sequence. Im{X[k]} = -Im{X[((-k))N]
X[((k))N] = X[k] is a periodic sequence. |X[k]| = |X[((-k))N]|
{X[k]} = -{X[((-k))N]}

2/17/2015 23

Example:
Circular shift
of a sequence

2/17/2015 24

12
Duality
Real finite-length sequence x[n].

Real part of corresponding DFT X[k].

Imaginary part of X[k].

Real part of the dual sequence X[n].

Imaginary part of X[n].

The DFT of X[n] = x[k].

2/17/2015 25

Circular Convolution

The multiplication of the DFS coefficients of two periodic sequences


corresponds to a periodic convolution of the sequences.

2/17/2015 26

13
Example: Circular convolution
with a delayed impulse
sequence

2/17/2015 27

Correction
of the
result by
using
Zero
padding
with L
zero
values,
N = 2L

Result is not correct when


it is compared with that
obtained by linear convolution.

Example: Circular convolution of


two rectangular pulses with 5 values
each.
2/17/2015 28

14
Linear Convolution Using the Discrete Fourier Transform

Linear Convolution of Two Finite-Length Sequences


Compute the N-point DFT X1[k] and X2[k] of the two sequences x1[n]
and x2[n], respectively.
Compute the product X3[k] = X1[k] X2[k] for 0 k N-1.
Compute the sequence x3[n] = x1[n] N x2[n] as the IDFT of X3[k].
Circular Convolution as Linear Convolution with Aliasing
Implementing Linear Time-Invariant Systems Using the DFT

2/17/2015 29

Linear convolution
of two finite-length
sequences

x1[n]s length L points.


x2[n]s length P points.

x3[n] = m=-x1[m]x2[n-m],
has its maximum
length L+P-1 points.

Thus,
x3[n] = x1[n] N x2[n] ,
where N L+P-1.

2/17/2015 30

15
Example: Circular convolution
as linear convolution with
aliasing

Time aliasing in the circular


convolution of two finite-length
sequences can be avoided if
N L+P-1 .

It should be clear that if the


circular convolution is of
sufficient length relative to
the lengths of the sequences x1[n]
and x2[n], then aliasing with non-
zero values can be avoided, in
which case the circular and linear
convolutions will be identical.

2/17/2015 31

Example of linear
convolution of two
finite-length sequences.

2/17/2015 32

16
2/17/2015 33

Finite-length impulse response h[n] and indefinite-length signal x[n] to be


filtered.

Implementing Linear Time-Invariant Systems Using the DFT:


Theoretically, we store the entire samples and then implement the convolution
procedure using a DFT for a large number points which is generally impractical
to compute.
No filter samples can be computed until all the input samples have been
collected. Generally, we would like to avoid such a large delay in processing.
The solution of both problems is to use block convoltuion.

2/17/2015 34

17
Block Convolution Techniques

All of samples will be segmented into section of appropriate length (L).


Each section can then be convolved with the finite-length impulse response
and the filtered sections fitted together in an appropriate way.
Overlap-Add Method
Overlap-Save Method

2/17/2015 35

Overlap-add method is the


procedure of decomposition
of x[n] into nonoverlapping
sections of length L and the
result of convolving each
section with h[n] which are
overlapped and added to
construct the output.

2/17/2015 36

18
Overlap-save method is the
procedure of decomposition of
x[n] into overlapping sections
of length L and the result of
convolving each section with
h[n] which the portions of
each filtered section to be
discarded in forming the
linear convolution.

2/17/2015 37

Input signal
L L L L L L

M-1
zeros
x1[n] x1[n]
M-1 M-1
zeros zeros
x2[n] x2[n]
M-1
zeros
x3[n] x3[n]

Output signal
M-1 points add
together

M-1 points add


Discard M-1 points together

Overlap-save method Overlap-add method

2/17/2015 38

19

Вам также может понравиться