eleg 5173l digital signal processing ch. 4 the discrete ...€¢ matrix representation of idft...

40
Department of Electrical Engineering University of Arkansas ELEG 5173L Digital Signal Processing Ch. 4 The Discrete Fourier Transform Dr. Jingxian Wu [email protected]

Upload: dinhtuong

Post on 19-Jul-2018

223 views

Category:

Documents


5 download

TRANSCRIPT

Department of Electrical Engineering University of Arkansas

ELEG 5173L Digital Signal Processing

Ch. 4 The Discrete Fourier Transform

Dr. Jingxian Wu

[email protected]

OUTLINE

2

• The Discrete Fourier Transform (DFT)

• Properties

• Fast Fourier Transform

• Applications

DISCRETE FOURIER TRANSFORM (DFT)

• Review DTFT: Discrete-time Fourier transform

– Limitations for computer implementation:

• 1. Infinite number of time domain samples

– Requires infinite memory

• 2. is a continuous variable

– We can only approximate in a computer

– Possible solutions:

• 1. limit the number of time domain samples

• 2. Sample in the frequency domain:

3

nj

n

enxX

)()(

n)(nx

)(X

)(nx 10 Nn

njN

n

N enxX

1

0

)()(

nN

kjN

n

njN

n

kN enxenxX k

21

0

1

0

)()()(

)(NXN

kk

2 10 Nk

0

0

DISCRETE FOURIER TRANSFORM (DFT)

• Discrete Fourier Transform (DFT)

– Finite number time domain samples

– Discrete frequency domain signal

• Inverse Discrete Fourier Transform (IDFT)

4

N

knjN

n

enxkX21

0

)()(

)(nx 10 Nn

)(kX 10 Nk

N

knjN

k

ekXN

nx21

0

)(1

)(

DFT

• Periodicity in the frequency domain

– Recall: the DTFT is periodic

– The DFT is periodic with period N

• Proof

– Time domain sampling leads to frequency domain repetition.

5

)2()( XX

)()( NkXkX

)(kX

DFT

• Periodicity in the time domain

– The time domain signal from the IDFT is also periodic with period N

– Proof

– frequency domain sampling leads to time domain repetition.

6

)()( Nnxnx

)(nx

N

knjN

k

ekXN

nx21

0

)(1

)(

DFT

• Example

– Find the DTFT of

– Find the DFT of

– Plot the DTFT, and plot the DFT when N = 5, 10, 20, and 50, respectively.

7

),()8.0()(ˆ nunx n 10 Nn

),()8.0()( nunx n

DFT

• Example

– A finite-duration sequence of length L is given as follows. Find the N-

point DFT of this sequence for . Plot the frequency response.

8

otherwise,0

10,1)(

Lnnx

LN

DFT

• Relationship between DFT and DTFT

– DFT

– DTFT

– Relationship

• DFT index k angular digital frequency radians

• DFT index k angular analog frequency radians/sec

9

N

knjN

n

enxkX21

0

)()(

nj

n

enxY

)()( 0

N

kYkX 2)()(

10 Nk

N

k2

sNT

k2

]1

2,,2

,0[2N

N

NN

k

DFT

• Frequency domain resolution

– Freq. domain resolution: Space between 2 freq. domain samples

– Larger N smaller better frequency domain resolution

– Example:

10

N

kk 2

N

2

Nkk

21

otherwise,0

70,1)(

nnx

DTFT DFT N=16

DFT N=32 DFT N=64 N

2

DFT

• Matrix representation of DFT

– DFT: let

– Define DFT matrix

• The ( k+1, n+1)-th element is

11

kn

N

N

n

WnxkX

1

0

)()(

N

j

N eW2

)1)(1()1(210

1210

0000

NN

N

N

N

N

NN

N

NNNN

NNNN

WWWW

WWWW

WWWW

W

kn

NW

DFT

• Matrix representation of DFT

12

kn

N

N

n

WnxkX

1

0

)()(

)1(

)1(

)0(

)1(

)1(

)0(

)1)(1()1(210

1210

0000

Nx

x

x

WWWW

WWWW

WWWW

NX

X

X

NN

N

N

N

N

NN

N

NNNN

NNNN

WxX

DFT

• Matrix representation of IDFT

– DFT: let

– Define IDFT matrix

• The ( k, n)-th element is

: the complex transpose of W (transpose the matrix, then take the

complex conjugate of all the elements)

13

*1

0

)()(1

)( kn

N

N

n

WnXN

kx

N

j

N eW2

)1)(1()1(2)1(0

)1(210

0000

NN

N

N

N

N

NN

N

NNNN

NNNN

H

WWWW

WWWW

WWWW

W

nk

N

nk

N WW *

N

j

N eW2

*

HW

DFT

• Matrix representation of IDFT

14

kn

N

N

k

WkXN

nx

1

0

)(1

)(

)1(

)1(

)0(

1

)1(

)1(

)0(

)1)(1()1(2)1(0

)1(210

0000

NX

X

X

WWWW

WWWW

WWWW

N

Nx

x

x

NN

N

N

N

N

NN

N

NNNN

NNNN

XWxH

N

1

OUTLINE

15

• The Discrete Fourier Transform (DFT)

• Properties

• Fast Fourier Transform

• Applications

PROPERTIES

• Linearity

• Periodicity

– If

– Then

16

)()( 11 kXnx )()( 22 kXnx

)()()()( 2121 kbXkaXnbxnax

)()( kXnx

)()( Nnxnx

)()( NkXkX

• Circular shift

– circular shifting a length-N signal, x(n), to the right by positions

– Example: N = 4

, where p is an integer chosen such that

– Why circular shift?

• Recall: in DFT, x(n) is periodic in N

PROPERTIES

17

Nnnx )( 0

)]3(),2(),1(),0([)( xxxxnx

)]2(),1(),0(),3([)1( 4 xxxxnx

)]0(),3(),2(),1([)3( 4 xxxxnx

)]1(),0(),3(),2([)2( 4 xxxxnx

)3(),2(),1(),0(),3(),2(),1(),0(),3(),2(),1(),0( xxxxxxxxxxxx

)3(),2(),1(),0(),3(),2(),1(),0(),3(),2(),1(),0( xxxxxxxxxxxx

:)(nx

:)1( nx

0n

pNnnnn N 00 )( 10 0 NpNnn

PROPERTIES

• Time shifting

– If

– Then

– This is a circular shift

• because x(n) is periodic in N

18

)()( kXnx

00

2exp)()( kn

NjkXnnx N

PROPERTIES

• Example

– Consider a sequence

– Find the DFT

– If we circular shift x to the right by two locations, find the new sequence

and its DFT

19

]3,2,4,2,1,1[ x

PROPERTIES

• Circular convolution

– The circular convolution between two length-N sequences x(n) and h(n) is

– Graphical interpretation for N = 4

20

1

0

)()()(N

k

Nknhkxny

)]3(),2(),1(),0([)( xxxxkx

)]1(),2(),3(),0([)( hhhhkh N :0n )1()3()2()2()3()1()0()0()0( hxhxhxhxy

:1n )]2(),3(),0(),1([)1( hhhhkh N

)]3(),0(),1(),2([)2( hhhhkh N

)2()3()3()2()0()1()1()0()1( hxhxhxhxy

)3()3()0()2()1()1()2()0()2( hxhxhxhxy

)]0(),1(),2(),3([)3( hhhhkh N )0()3()1()2()2()1()3()0()3( hxhxhxhxy

:2n

:3n

PROPERTIES

• Example

– Find the circular convolution of the following two sequences

21

]1,2,1,2[)( nx ]4,3,2,1[)( nh

PROPERTIES

• Example

– Find the circular convolution of the two sequences

22

]4,5,2,1,3[)( nx ]5,4,3,2,1[)( nh

PROPERTIES

• Circular convolution and DFT

– Consider two length-N sequences x(n) and h(n). There N-point DFTs are

X(k) and H(k), respectively.

– Circular convolution in the time domain is equivalent to multiplication in

the discrete frequency domain

23

)()()()(1

0

kHkXmnhmxN

m

N

PROPERTIES

• Example

– Find the circular convolution of the two sequences by using DFT

24

• Example

– Find the circular convolution of the

]1,2,1,2[)( nx ]4,3,2,1[)( nh

PROPERTIES

• Multiplication of two sequences

– Consider two length-N sequences x(n) and h(n). Their N-point DFTs are

X(k) and H(k), respectively.

– Multiplication in the time domain is equivalent to circular convolution in

the discrete frequency domain

25

1

0

)()(1

)()(N

m

NmnHmXN

nhnx

PROPERTIES

• Example

– Consider two length-N sequences. Find the circular convolution of their 4-

point DFTs.

26

]4,5,1,3[)( nx ]3,1,6,2[)( nh

PROPERTIES

• Time-reversal

– If the N-point DFT of x(n) is X(k), then

– Example

• If the 6-point DFT of x(n) is X(k) = [3, -2, 4, -1, 5]. Find the DFT of

27

NN kXnx )()(

Nnx )(

PROPERTIES

• Parseval’s theorem

– If the N-point DFT of x(n) is X(k), then

– Example

• If , find

28

1

0

21

0

2|)(|

1)(

N

k

N

n

kXN

nx

]3,1,1,2[)( jjnx

3

0

2|)(|k

kX

OUTLINE

29

• The Discrete Fourier Transform (DFT)

• Properties

• Fast Fourier Transform

• Applications

FFT

• Fast Fourier Transform (FFT)

– A faster implementation of DFT (NOT a new transform!)

– The result is exactly the same as DFT, just the implementation is faster.

• Complexity of DFT

– For each k, there are N complex multiplications

– The above formula needs to be performed N times for k = 0, 1, …, N-1

– Total number of complex multiplications:

– Total number of complex multiplications for FFT:

30

kn

N

N

n

WnxkX

1

0

)()(

2N

)(log2 NN

FFT

• FFT

– There are many different ways of implementing FFT

• Decimation in time

• Decimation in frequency

• …

– It utilizes the following property

31

2

2

2/

2exp2

2exp

2/

2exp NN W

Nj

Nj

NjW

2

2/ NN WW

k

N

k

N WW 2

2/

FFT

• FFT: decimation in time

32

kn

N

oddn

kn

N

evenn

WnxWnxkX

)()()(

kr

N

N

r

rk

N

N

r

WrxWrxkX )12(12/

0

212/

0

)12()2()(

rk

N

N

r

k

N

rk

N

N

r

WrhWWrgkX 212/

0

212/

0

)()()(

)2()( rxrg )12()( rxrhlet

rk

N

N

r

k

N

rk

N

N

r

WrhWWrgkX 2/

12/

0

2/

12/

0

)()()(

)()()( kHWkGkX k

N

FFT

• FFT: decimation in time (cont’d)

– G(k) is the N/2-point DFT of the even-indexed samples

– H(k) is the N/2-point DFT of the odd-indexed samples

– Based on periodicity

– Butterfly

33

rk

N

N

r

k

N

rk

N

N

r

WrhWWrgkX 2/

12/

0

2/

12/

0

)()()(

)()()( kHWkGkX k

N

)2()( rxrg

)12()( rxrh

)2/()( NkGkG )2/()( NkHkH

)()()2/( 2/ kHWkGNkX Nk

N

FFT

• FFT: decimation in time

– The N-point DFT is decomposed into:

• 2 N/2-point DFTs

• N complex multiplications

34

FFT

• FFT: decimation in time

– Each N/2-point DFT can be decomposed into

• 2 N/4-point DFTs

• N/2 complex multiplications

35

FFT

• FFT: Decimation in time

– Example 8-point FFT

– Each stage requires N complex multiplications

– There are stages

– Total number of complex multiplications

36

)(log2 N)(log2 NN

OUTLINE

37

• The Discrete Fourier Transform (DFT)

• Properties

• Fast Fourier Transform

• Applications

APPLICATIONS

• Dual-tone multi-frequency (DTMF)

– In the touch tone telephone, pressing each key on the telephone will

generate a DTMF signal

• The signal contains two frequencies

38

APPLICATIONS

• DTMF

– Example

• There is a DTMF signal with sampling frequency Fs = 8 KHz. The

duration of the signal is 0.4 s. Performing FFT on the signal, and there

are two peaks in the frequency domain at k = 308 and k = 484

• How many samples are in the signal?

• What is the resolution of the analog freuqency (in Hz)?

• What are the analog frequencies (in Hz) corresponding to the two

peaks?

39

APPLICATIONS

• DTMF

– Example

• There is a DTMF signal with sampling frequency Fs = 8 KHz. The

duration of the signal is 0.5 s. The signal is generated by pressing the

key ‘9’. Performing FFT on the signal. Which digital frequency

indices (k) corresponding to the peaks in the frequency domain?

40