40
1 Chapter 8 The Discrete Fourier Transform

1 Chapter 8 The Discrete Fourier Transform 2 Introduction In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

Embed Size (px)

Citation preview

Page 1: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

1

Chapter 8

The Discrete Fourier Transform

Page 2: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

2

Introduction

In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms of Fourier and z-transforms.

For finite duration sequences, it is possible to develop an alternative Fourier representation, called the discrete Fourier transform (DFT).

The DFT is a sequence rather than a function of a continuous variable. It corresponds to samples, equally spaced in frequency, of the Fourier transform of a signal.

DFT plays a central role in the implementation of a variety of DSP algorithms, because efficient algorithms exist for the computation of DFT (chapter 9).

We will begin by considering the Fourier series representation of periodic sequences. Then we will consider the relationship between periodic sequences and finite-length sequences.

Page 3: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

3

The Discrete Fourier Series (1)

We first review the Fourier series for periodic continuous-time signals.

For a continuous-time, T-periodic signal x(t), the Fourier series approximation can be written as

where 2/T is the fundamental frequency.

That is, a periodic signal can be represented by a Fourier series corresponding to a sum of harmonically related complex exponential sequences. Infinitely many harmonically related complex exponentials are required.

The frequency of the complex exponentials are integer multiples of the fundamental frequency (2/T).

ktTjk

k

eaT

tx )/2(1)(

Page 4: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

4

The Discrete Fourier Series (2)

Consider a sequence that is periodic with period N, so that

for any integer value of n and r.

As with continuous-time periodic signals, such sequences can be represented by a Fourier series corresponding to a sum of harmonically related complex exponential sequences.

The frequency of the complex exponentials are integer multiples of the fundamental frequency (2/N); i.e., the Fourier series representation has the form

][~ nx

][~][~ rNnxnx

knNj

k

ekXN

nx )/2(][~1

][~

Page 5: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

5

The Discrete Fourier Series (3)

The period is 2, and the fundamental frequency is 2/N.

Therefore, the discrete-time periodic signal case only requires N harmonically related complex exponentials.

Time Frequency

Continuous, aperiodic Aperiodic, continuous

Discrete, aperiodic Periodic, continuous

Continuous, Periodic Aperiodic, discrete

Discrete, Periodic Periodic, Discrete

Page 6: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

6

The Discrete Fourier Series (4)

Denote . Then, for any integer l, we have

Consequently, the set of N periodic complex exponentials e0[n], e1[n], …, eN-1[n] defines all the distinct periodic complex exponentials.

Thus, the Fourier series representation of a periodic sequenceneed contain only N of these complex exponentials. Therefore, it has the form

What is ?

knNjk ene )/2(][

][][ )/2(2))(/2( neeeene kknNjnljnlNkNj

lNk

][~ nx

knNjN

k

ekXN

nx )/2(1

0

][~1

][~

][~

kX

Page 7: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

7

The Discrete Fourier Series (5)

To obtain , we multiply both sides by , and summing from n = 0 to n = N –1, we obtain

Exploiting the orthogonality of the complex exponentials

Therefore, the Fourier series coefficients become

][~

kX rnNje )/2(

knNjN

k

enxkX )/2(1

0

][~][~

nrkNjN

k

N

n

rnNjN

n

ekXN

enx ))(/2(1

0

1

0

)/2(1

0

][~1

][~

otherwise,0

integeran ,,11 ))(/2(1

0

mmNrke

NnrkNj

N

n

][~1

][~

][~ ))(/2(1

0

1

0

)/2(1

0

rXeN

kXenx nrkNjN

n

N

k

rnNjN

n

Page 8: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

8

The Discrete Fourier Series (6)

is periodic with period N. For integer l, we have

For convenience of notation, we can define . Then the analysis and synthesis pair of discrete Fourier series (DFS) is expressed as

analysis equation

synthesis equation

We can also use the notation

][~

kX

knN

N

k

WnxkX ][~][~ 1

0

][~

][~

][~][~

)/2(21

0

))(/2(1

0

kXeenx

enxlNkX

knNjnljN

k

nlNkNjN

k

)/2( NjN eW

knN

N

k

WkXN

nx

][

~1][~

1

0

][~

][~ kXnxDFS

Page 9: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

9

Examples of DFS (1)

Example 1 - DFS of a Periodic Impulse Train

Consider the periodic impulse train

Since for 0 ≤ n ≤ N–1, the DFS coefficients are found as

If we synthesize the signal from the DFS coefficients, we have

1][][~ 0

1

0

N

knN

N

n

WWnkX

otherwise,0integerany ,,1

][][~ rrNnrNnnx

r

r

knN

N

k

knN

N

k

rNnWN

WkXN

nx ][1

][~1

][~1

0

1

0

][][~ nnx

Page 10: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

10

Examples of DFS (2)

Example 1 - DFS of a Periodic Impulse Train

(N=8)

Page 11: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

11

Examples of DFS (3)

Example 2 - Duality in the DFS

We see that the two equations of DFS pair are very similar, differing only in a constant multiplier and the sign of the exponents.

Consider the periodic impulse train

Then,

Compared with the previous example, we see that

][][~

rNkNkYr

1][][1

][~ 01

0

1

0

N

knN

N

k

knN

N

k

WWkWkNN

ny

][~][~

kxNkY ][~

][~ nXny

Page 12: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

12

Examples of DFS (4)

Example 3 – DFS of a Periodic Rectangular Pulse Train

Consider the sequence shown in figure, whose period is N=10.

The DFS coefficients become

4

0

)10/4(

10

510

10 )10/sin(

)2/sin(

1

1][

~

n

kjk

kkn

k

ke

W

WWkX

Page 13: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

13

Examples of DFS (5)

Example 3 – DFS of a Periodic Rectangular Pulse Train

Page 14: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

14

Properties of DFS (1)

It is not surprising that many of the basic properties are analogous to properties of the Fourier and z-transforms.

Linearity

Consider two periodic sequences and , both with period N, such that

then

Shift of a Sequence

If , then

][~1 nx ][~

2 nx

][~

][~11 kXnx

DFS

][~

][~22 kXnx

DFS

][~

][~

][~][~2121 kXbkXanxbnxa

DFS

][~

][~ kXnxDFS

][~

][~ kXWmnx kmN

DFS

][~

][~ lkXnxWDFS

klN

Page 15: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

15

Properties of DFS (2)

Symmetric Properties

If , then][~

][~ kXnxDFS

][~

][~ ** kXnxDFS

][~

][~ ** kXnxDFS

]}[~

][~

{][~

]}[~Re{ *21 kXkXkXnx e

DFS

]}[~

Re{}][~][~{][~ *21 kXnxnxnx

DFS

e

]}[~

][~

{][~

]}[~Im{ *21 kXkXkXnxj o

DFS

]}[~

Im{}][~][~{][~ *21 kXjnxnxnx

DFS

o

Page 16: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

16

Properties of DFS (3)

Symmetric Properties (cont.)

When is real, then][~ nx

][~

][~ * kXkX

]}[~

Re{}][~][~{][~21 kXnxnxnx

DFS

e

]}[~

Im{}][~][~{][~21 kXjnxnxnx

DFS

o

]}[~

Re{]}[~

Re{ kXkX

]}[~

Im{]}[~

Im{ kXkX

|][~

||][~

| kXkX

][~

][~

kXkX

Page 17: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

17

Properties of DFS (4)

Periodic Convolution

Consider two periodic sequences and , both with

period N, and their DFS coefficients are and ,

respectively. If we form the product , then

the periodic sequence with DFS coefficients is

A convolution in the above form is referred to as a periodic convolution.

The duality theorem suggests that, if , then

][~1 nx ][~

2 nx

][~

1 kX ][~

2 kX

][~

][~

][~

213 kXkXkX ][

~3 kX][~

3 nx

1

012

1

0213 ][~][~][~][~][~

N

m

N

m

mnxmxmnxmxnx

][~][~][~213 nxnxnx

][~

][~1

][~

][~1

][~

12

1

021

1

03 lkXlX

NlkXlX

NkX

N

l

N

l

Page 18: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

18

Properties of DFS (5)

Periodic Convolution

- Example

Page 19: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

19

Fourier Transform of Periodic Signals (1)

As discussed in Chapter 2, uniform convergence of the Fourier transform of a sequence requires that the sequence be absolutely summable, and mean-square convergence requires that the sequence be square summable. Periodic sequence satisfy neither condition.

However, in Chapter 2, we know that sequences that can be expressed as a sum of complex exponentials can be considered to have a Fourier transform representation in the form of a train of impulse.

Similarly, it is often useful to incorporate the DFS representation of periodic signals within the framework of the Fourier transform. This can be done by interpreting the Fourier transform of a periodic signal to be an impulse train in the frequency domain with the impulse values proportional to the DFS coefficients for the sequence.

Page 20: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

20

Fourier Transform of a Constant

Consider the sequence x[n]=1for all n. This sequence is neither absolutely summable not square summable, and the Fourier transform does not converge in either the uniform or mean-square sense for this case. However, it is possible and useful to define the Fourier transform of the sequence x[n] to be the periodic impulse train

The impulses in this case are functions of a continuous variable and therefore are of “infinite height, zero width, and unit area,” consistent with the fact that Fourier transform does not converge. The above equation is justifies principally because this result leads to correct inverse Fourier transform.

r

j reX )2(2)(

Page 21: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

21

Fourier Transform of Complex Exponential Sequences

Consider a sequence x[n] whose Fourier transform is the periodic impulse train

To obtain the inverse Fourier transform, we can assume that –<0< in this problem. Then, we need include only the r=0 term, and

For 0=0, this reduces to the sequence of a constant considered in the previous example.

njnj edenx 0)(22

1][ 0

r

j reX )2(2)( 0

Page 22: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

22

Fourier Transform of Periodic Signals (2)

If is periodic with period N and its DFS coefficients are

, then the Fourier transform of is defined to be the

impulse train

To show that is a Fourier transform representation of

, we obtain the inverse Fourier transform as (0<<2/N)

][~

kX

N

kkX

NeX

k

j 2][

~2)(

~

][~ nx

][~][~12

][~1

2][

~2

2

1)(

~

2

1

)/2(2

0

2

0

2

0

2

0

2

0

nxekXN

deN

kkX

N

deN

kkX

NdeeX

knNj

k

nj

k

nj

k

njj

][~ nx

)(~ jeX

][~ nx

Page 23: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

23

Fourier Transform of Periodic Signals (3)

Example – The Fourier Transform of a Periodic Impulse Train

Consider a periodic impulse train

we know that the DFS coefficients for this sequence are

Therefore, the Fourier transform of is

N

k

NeP

k

j 22)(

~

kkP allfor ,1][~

][][~ rNnnpr

][~ np

Page 24: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

24

Fourier Transform of Periodic Signals (4)

Consider a finite-length signal x[n] such that x[n] = 0 except in the intervals 0 ≤ n ≤ N–1, and consider the convolution of x[n] with the periodic impulse train ; i.e.,

][][*][][~*][][~ rNnxrNnnxnpnxnxrr

][~ np

Page 25: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

25

Fourier Transform of Periodic Signals (5)

Denote the Fourier transform of x[n] as X(ej), then the Fourier transform of becomes

Compare with the definition of , we conclude that

That is, DFS coefficients are the equally spaced samples of X(ej), the Fourier transform of

kN

jkNj eXeXkX)/2(

)/2( )()(][~

][~

kX

otherwise,0

10],[~][

Nnnxnx

][~ nx

N

keX

N

N

k

NeXePeXeX

k

kNj

k

jjjj

2)(

2

22)()(

~)()(

~

)/2(

)(~ jeX

Page 26: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

26

Fourier Transform of Periodic Signals (6)

Example – Relationship between the DFS Coefficients and the Fourier Transform of One Period

Again consider

the corresponding one period sequence is

otherwise,0

40,1][

nnx

Page 27: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

27

Fourier Transform of Periodic Signals (7)

Example – Relationship between the DFS Coefficients and the Fourier Transform of One Period (cont.)

The Fourier transform of x[n] is

and the DFS coefficients are

)2/sin(

)2/5sin(

)(

2

4

0

j

n

njj

e

eeX

)10/sin(

)2/sin(][

~ )10/4(

k

kekX kj

Page 28: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

28

Sampling of the Fourier Transform (1)

We consider in more detail the relationship between X(ej) and . Consider an aperiodic sequence x[n] with Fourier

transform X(ej) , and assume that a sequence is obtained by sampling X(ej) at frequencies k=2k/N; i.e.,

Since the Fourier transform is equal to the z-transform evaluated on the unit circle, it follows that can also be obtained by sampling X(z) at N equally spaced points on the unit circle; i.e.,

It is clear that the same sequence repeats

as k varies outside the range 0 ≤ k ≤ N –1.

][~

kX][

~kX

)()(][~ )/2(

)/2(

kNj

kN

j eXeXkX

][~

kX

)()(][~ )/2(

)/2(

kNj

ezeXzXkX kNj

Page 29: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

29

Sampling of the Fourier Transform (2)

The sequence of samples of X(z), being periodic with period N, could be the sequence of DFS coefficients of a sequence .

The sequence can be obtained as

][~

kX

][~ nx

][~][

1][

][1

)(1

][~1

][~

)(1

0

)/2(1

0

)/2(1

0

1

0

mnpmx

WN

mx

WemxN

WeXN

WkXN

nx

m

mnkN

N

km

knN

kmNj

m

N

k

knN

NkjN

k

knN

N

k

Page 30: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

30

Sampling of the Fourier Transform (3)

Since

We have

][][~ rNmnmnpr

][][*][][~*][][~ rNnxrNnnxnpnxnxrr

Page 31: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

31

Sampling of the Fourier Transform (4)

In this figure, the sequence x[n] is of length 9. Similar to the sampling problem of a continuous-time signal, when the value of N is larger than the length of x[n], the delayed replications of x[n] do not overlap, and one period of the sequence is recognizable as x[n].

On the other hand, when N is less than the length of x[n], the replicas of x[n] overlap and one period of is no longer identical to x[n]. The next figure shows the case with N = 7.

][~ nx

][~ nx

Page 32: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

32

Sampling of the Fourier Transform (5)

To summarize, if x[n] has finite length [cf. continuous-time

signal sampling: X(j) is bandlimited] and we take sufficient number [a number greater than or equal to the length of x[n] ] of equally spaced samples of its Fourier transform [cf. continuous-time signal sampling: sampling rate should be larger than the Nyquist rate], then the Fourier transform is recoverable from these samples, and equivalently, x[n] is recoverable from the corresponding periodic sequence through the relation

To recover x[n], it is not necessary to know X(ej) at all frequencies if x[n] has finite length.

][~ nx

otherwise,0

10],[~][

Nnnxnx

Page 33: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

33

Discrete Fourier Transform (1)

From the above discussion, we understand that, given a finite-length sequence x[n], we can form a periodic sequence , which can be represented by a DFS .

On the other hand, given the sequence of DFS coefficients , we can find and then obtain x[n].

When the DFS is used in this way to represent finite-length sequences, it is called the discrete Fourier transform (DFT).

It is always important to remember that the representation through samples of the Fourier transform is in effect a representation of the finite-duration sequences by a periodic sequence, one period which is finite-duration sequence that we wish to represent.

][~ nx][

~kX

][~

kX][~ nx

Page 34: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

34

Discrete Fourier Transform (2)

We assume that x[n] = 0 outside the range 0 ≤ n ≤ N – 1. In many instances, we will assume that a sequence has length N even if its length is M ≤ N. In such cases, we simply recognize that the last (N – M ) samples are zero.

When there is no aliasing, the finite-length sequence x[n] and the periodic sequence are associated by

An alternative expression is

For convenience, we will denote it as

][~ nx

][][~ rNnxnxr

)] modulo [(][~ Nnxnx

]))[((][~Nnxnx

Page 35: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

35

Discrete Fourier Transform (3)

The sequence of DFS coefficients are periodic with period N. To maintain a duality between the time and frequency domains, we will choose the Fourier coefficients that are associated with a finite-duration sequence to be a finite-duration sequence corresponding to the one period of . That is

and

][~

kX

][~

kX

otherwise,010],[

~][ NkkXkX

]))[((] modulo [][~

NkXNkXkX

Page 36: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

36

Discrete Fourier Transform (4)

Recall that and are related as

The DFT pairs become

otherwise,0

10,][][~

][

1

0

NkWnxkXkX

N

n

knN

1

0

][~][~ N

n

knNWnxkX

][~

kX ][~ nx

1

0

][~1

][~N

n

knNWkX

Nnx

otherwise,0

10,][1

][~][

1

0

NnWkXN

nxnx

N

n

knN

Page 37: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

37

Discrete Fourier Transform (5)

Generally, the DFT analysis and synthesis equations are written as follows

The relationship between x[n] and X[k] will sometimes be denoted as

It is noted that, if we evaluate x[n] outside 0 ≤ n ≤ N – 1, the result will not be zero, but rather a periodic extension of x[n]. Same can be said for X[k]. In defining the DFT representation, we are simply recognizing that we are only interested in values of x[n] for 0 ≤ n ≤ N – 1 and X[k] for 0 ≤ n ≤ N – 1.

1

0

][][N

n

knNWnxkX

1

0

][1

][N

k

knNWkX

Nnx

][][ kXnxDFT

Page 38: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

38

Discrete Fourier Transform (6)

Example – the DFT of a Rectangular Pulse

(N=5)

Page 39: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

39

Discrete Fourier Transform (7)

Example – the DFT of a Rectangular Pulse

(N=10)

Page 40: 1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms

40

Homework Assignments (10)

8.58.7

8.24