ch8dtft dft fs

103
o Introduction o DTFS & Properties FT of periodic signals ELEC442: DSP DTFS, DTFT, DFS, DFT, FFT o FT of periodic signals o DFT & Properties: Sampling of the DTFT o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical o Summary Dr. Aishy Amer Concordia University Electrical and Computer Engineering Figures and examples in these course slides are taken from the following sources: A. Oppenheim, A.S. Willsky and S.H. Nawab, Signals and Systems, 2nd Edition, Prentice-Hall, 1997 A.V. Oppenheim, R.W. Schafer and J.R. Buck, Discrete-Time Signal Processing M.J. Roberts, Signals and Systems, McGraw Hill, 2004 J. McClellan, R. Schafer, M. Yoder, Signal Processing First, Prentice Hall, 2003 Slides 2-22 are from http://metalab.uniten.edu.my/~zainul/images/Signals&Systems

Upload: khatri-ravi

Post on 19-Jan-2016

40 views

Category:

Documents


0 download

DESCRIPTION

DTFT and DFT

TRANSCRIPT

Page 1: Ch8dtft Dft Fs

o Introduction

o DTFS & Properties

FT of periodic signals

ELEC442: DSP

DTFS, DTFT, DFS, DFT, FFT

o FT of periodic signals

o DFT & Properties: Sampling of the DTFT

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical

o Summary Dr. Aishy Amer

Concordia University

Electrical and Computer Engineering

Figures and examples in these course slides are taken from the following sources:

•A. Oppenheim, A.S. Willsky and S.H. Nawab, Signals and Systems, 2nd Edition, Prentice-Hall, 1997

•A.V. Oppenheim, R.W. Schafer and J.R. Buck, Discrete-Time Signal Processing

•M.J. Roberts, Signals and Systems, McGraw Hill, 2004

•J. McClellan, R. Schafer, M. Yoder, Signal Processing First, Prentice Hall, 2003

•Slides 2-22 are from http://metalab.uniten.edu.my/~zainul/images/Signals&Systems

Page 2: Ch8dtft Dft Fs

Periodic DT Signals

A DT signal is periodic with period

where is a positive integer if

The fundamental period of is the

2

The fundamental period of is the

smallest positive value of for which the

equation holds

Example:

is periodic with fundamental period

Page 3: Ch8dtft Dft Fs

Fourier representation of

signals The study of signals and systems using sinusoidal

representations is termed Fourier analysis, after Joseph Fourier (1768-1830)

The development of Fourier analysis has a long history involving a great many individuals and the investigation of

3

involving a great many individuals and the investigation of many different physical phenomena, such as the motion of a vibrating string, the phenomenon of heat propagation and diffusion

Fourier methods have widespread application beyond signals and systems, being used in every branch of engineering and science

The theory of integration, point-set topology, and eigenfunction expansions are just a few examples of topics in mathematics that have their roots in the analysis of Fourier series and integrals

Page 4: Ch8dtft Dft Fs

Approximation of Signals by

Sinusoids

A signal can be approximated by a sum of many sinusoids at harmonic frequencies of the signal f0with appropriate amplitude and phase

The more harmonic components are added, the

4

The more harmonic components are added, the more accurate the approximation becomes

Instead of using sinusoidal signals, mathematically, we can use the complex exponential functions with both positive and negative harmonic frequencies

A Fourier representation is unique, i.e., no two same signals in time domain give the same function in frequency domain

Page 5: Ch8dtft Dft Fs

Overview of Fourier Analysis

Methods

Periodic in Time

Discrete in Frequency

Aperiodic in Time

Continuous in Frequency

Continuous

in Time∫

−=

⇒⊗

T

tjk

k dtetxT

a 0)(1

DTP-CT :SeriesFourier CT

0

T

ω ∫∞

∞−

⇒⊗

=

⇒⊗

ω ωdtetxjX

tj

CTCT :TransformFourier CT Inverse

)()(

CTCT :TransformFourier CT

5

Aperiodic in

Frequency

Discrete in

Time

Periodic in

Frequency

∑∞

−∞=

=

⇒⊗

k

tjk

keatx 0)(

P-CTDT :SeriesFourier Inverse CT T

0

ω

=

⇒+⊗

=

+⇒⊗

−∞=

π

ωω

π

ωω

π

ωπ

2

2

2

)(2

1][

DT PCT :TransformFourier DT Inverse

][)(

PCTDT :TransformFourier DT

deeXnx

enxeX

njj

n

njj

=

=

=

⇒⊗

=

⇒⊗

1

0

NN

1

0

NN

0

0

][1

][

P-DTP-DT SeriesFourier DT Inverse

][][

P-DTP-DT SeriesFourier DT

N

k

knj

N

n

knj

ekXN

nx

enxkX

ω

ω

∫∞

∞−

=

⇒⊗

ωωπ

ωdejXtx

tj)(2

1)(

CTCT :TransformFourier CT Inverse

Page 6: Ch8dtft Dft Fs

Overview of Fourier Analysis

Methods

Variable Period Continuous

Frequency

Discrete

Frequency

DT x[n] n N kNkk /2πω =

ω

6

CT x(t) t T k

Nkk /2πω =

Tkk /2πω =

Ω

• DT-FS: Discrete in time; Periodic in time; Discrete in Frequency; Periodic in Frequency

• DT-FT: Discrete in time; Aperiodic in time; Continous in Frequency; Periodic in Frequency

• CT-FS: Continuous in time; Periodic in time; Discrete in Frequency; Aperiodic in Frequency

• CT-FT: Continuous in time; Aperiodic in time; Continous in Frequency; Aperiodic in Frequency

Page 7: Ch8dtft Dft Fs

Negative frequency?

7

Page 8: Ch8dtft Dft Fs

Negative Frequency?

8

Page 9: Ch8dtft Dft Fs

Negative Frequency?

9

Page 10: Ch8dtft Dft Fs

Outline

o Introduction

o DTFS & properties

o DTFT of periodic signals

o DFT: Sampling of the DTFT

10

o DFT: Sampling of the DTFT

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (Matlab)

o Summary

Page 11: Ch8dtft Dft Fs

Discrete-Time Fourier Series (DTFS)

Given a periodic sequence with period N so that

The FS can be written as

(Recall: the FS of continuous-time periodic signals require infinite many complex exponentials)

Not that for DT periodic signals we have

]n[x~

]rNn[x~

]n[x~

+=

[ ] ( )∑ π=k

knN/2jekX~

N

1]n[x

~

11

Not that for DT periodic signals we have

Due to the periodicity of the complex exponential we only need N exponentials

for DT FS

The FS coefficients can be obtained via

( )( ) ( ) ( ) ( )knN/2jmn2jknN/2jnmNkN/2j eeee πππ+π ==

[ ] ( )∑−

=

π=1N

0k

knN/2jekX~

N

1]n[x

~

[ ] ( )∑−

=

π−=1N

0n

knN/2je]n[x~kX~

Page 12: Ch8dtft Dft Fs

DTFS Pair

For convenience we sometimes use

Analysis equation

( )N/2jN eW π−=

[ ] ∑−

=

=1N

0n

knNW]n[x

~kX

~

12

Synthesis equation [ ]∑−

=

−=1N

0k

knNWkX

~

N

1]n[x

~

Page 13: Ch8dtft Dft Fs

Concept of DTFS

13

Page 14: Ch8dtft Dft Fs

The DTFS

Note: we could divide x[n] or X[k] by N

14

Page 15: Ch8dtft Dft Fs

The DTFS

15

Page 16: Ch8dtft Dft Fs

The DTFS

16

Page 17: Ch8dtft Dft Fs

The DTFS

17

Page 18: Ch8dtft Dft Fs

The DTFS

18

Page 19: Ch8dtft Dft Fs

The DTFS

19

Page 20: Ch8dtft Dft Fs

Example: periodic square

20

Page 21: Ch8dtft Dft Fs

Example: periodic square

- We know that

21

Page 22: Ch8dtft Dft Fs

Example: periodic square

22

Page 23: Ch8dtft Dft Fs

Example: periodic square

23

Page 24: Ch8dtft Dft Fs

Example: periodic square

DTFS of an periodic rectangular pulse train

The DTFS coefficients

[ ] ( )( )

( )( ) ( )

( )10/ksin

2/ksine

e1

e1ekX

~ 10/k4j

k10/2j

5k10/2j4

0n

kn10/2j

π

π=

−== π−

π−

π−

=

π−∑

24

( )10/ksine10n π−=

Page 25: Ch8dtft Dft Fs

Example: periodic impulse train

DFS of a periodic impulse train

Since the period of the signal is N

[ ] =

=−δ= ∑∞

−∞= else0

rNn1rNn]n[x~

r

[ ] ( ) ( ) ( ) 1ee]n[e]n[x~

kX~ 0kN/2j

1NknN/2j

1NknN/2j ==δ== π−

−π−

−π− ∑∑

25

We can represent the signal with the DTFS coefficients

as

[ ] ( ) ( ) ( ) 1ee]n[e]n[x~

kX~ 0kN/2j

0n

knN/2j

0n

knN/2j ==δ== π−

=

π−

=

π− ∑∑

[ ] ( )∑∑−

=

π∞

−∞=

=−δ=1N

0k

knN/2j

r

eN

1rNn]n[x

~

Page 26: Ch8dtft Dft Fs

Properties of DTFS

Linearity

Shifting

[ ] [ ][ ] [ ]

[ ] [ ] [ ] [ ]kX~bkX

~anx~bnx~a

kX~

nx~kX

~nx

~

21DFS

21

2DFS

2

1DFS

1

+ →←+

→←

→←

[ ] [ ][ ] [ ]

~~kX

~nx~ DFS →←

26

Shifting

Duality

[ ] [ ][ ] [ ]

[ ] [ ]mkX~

nx~e

kX~

emnx~kXnx

DFSN/nm2j

N/km2jDFS

− →←

→←−

→←

π

π−

[ ] [ ][ ] [ ]kx~NnX

~kX

~nx~

DFS

DFS

− →←

→←

Page 27: Ch8dtft Dft Fs

Properties of DTFS

27

Page 28: Ch8dtft Dft Fs

Summary of Properties

28

Page 29: Ch8dtft Dft Fs

Symmetry Properties

29

Page 30: Ch8dtft Dft Fs

Periodic Convolution

Take two periodic sequences

Form the product

[ ] [ ][ ] [ ]kXnx

kXnxDFS

DFS

22

11~~

~~

→←

→←

30

The periodic sequence with given DTFS can be written as

Periodic convolution is commutative

[ ] [ ] [ ]kXkXkX 213

~~~=

[ ] [ ] [ ]∑−

=

−=1

0

213~~~

N

m

mnxmxnx

[ ] [ ] [ ]∑−

=

−=1

0

123~~~

N

m

mnxmxnx

Page 31: Ch8dtft Dft Fs

Periodic Convolution

31

Page 32: Ch8dtft Dft Fs

Outline

o Introduction

o DTFS & properties

o DTFT of periodic signals

o DFT: Sampling of the DTFT

32

o DFT: Sampling of the DTFT

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (Matlab)

o Summary

Page 33: Ch8dtft Dft Fs

The DTFT

=

+⇒

−∞=

− ωω

π2

:TransformFourier DT Inverse

][)(

PCTDT

:TransformFourier DT

enxeXn

njj

• DTFT represents a DT aperiodic signal as

a sum of infinitely many complex

exponentials, with the frequency varying

continuously in (-π, π)

• DTFT is periodic

only need to determine it for

33

∫=

⇒+

π

ωω

π

ωπ

2

2

)(2

1][

DT PCT

:TransformFourier DT Inverse

deeXnxnjj

only need to determine it for

DTFT is continuous in frequency

Page 34: Ch8dtft Dft Fs

The DTFT

From the numerical computation viewpoint, the computation of DTFT by computer has several problems:

The summation over n is infinite

nj

n

jenxeX

ωω −∞

−∞=

∑= ][)(

34

The summation over n is infinite

The independent variable is continuous

DTFT and z-transform are not numerically

computable transforms

ω

Page 35: Ch8dtft Dft Fs

FS versus FT

Aperiodic signals can be viewed as a periodic signal

with an infinite period

FS: a representation of periodic signals as a linear

combination of complex exponentials

The FS cannot represent an aperiodic signal for all times

35

The FS cannot represent an aperiodic signal for all times

FT: apply to signals that are not periodic

The FT can represent an aperiodic signal for all time

NN

1

0

NN

1

0

P-DTP-DF ][1

][

P-DFP-DT ][][

:DTFS

0

0

⇒=

⇒=

∑−

=

=

N

k

knj

N

n

knj

ekXN

nx

enxkX

ω

ω

DT PCT )(2

1][

PCTDT ][)(

:DTFT

2

2

2

⇒+=

+⇒=

∑∞

−∞=

π

π

ωω

π

ωω

ωπ

deeXnx

enxeX

njj

n

njj

Page 36: Ch8dtft Dft Fs

The FT of Periodic Signals

Periodic sequences are not absolute or square summable: no DTFT exist

We can represent them as sums of complex exponentials: DTFS

We can combine DTFS and DTFT

Periodic impulse train with values proportional to DTFS coefficients

36

Periodic impulse train with values proportional to DTFS coefficients

This is periodic with 2π since DTFS is periodic

( ) [ ]∑∞

−∞=

−=

k

j

N

kkX

NeX

πωδ

πω 2~2~

Page 37: Ch8dtft Dft Fs

The FT of Periodic Signals

The inverse transform can be written as

( ) [ ]

[ ] [ ]∑∫∑

∫ ∑∫−−

−∞=

=

−=

1 22

0

2

0

2

0

~12~1

2~2

2

1~

2

1

N nN

kj

nj

nj

k

njj

ekXN

deN

kkX

N

deN

kkX

NdeeX

πω

επ

ε

ωεπ

ε

ωεπ

ε

ω

ωπ

ωδ

ωπ

ωδπ

πω

π

37

FT Pair:

Example:

( ) [ ]∑∞

−∞=

−=

k

j

N

kkX

NeX

πωδ

πω 2~2~

∑∫∑=

−−∞= 0

0kk NNN ε

[ ]∑−

=

=1

0

2

~ ~1][

N

k

nN

kj

X ekXN

n

π

Page 38: Ch8dtft Dft Fs

Example

Consider the periodic impulse train

The DTFS was calculated previously to be

[ ]∑∞

−∞=

−δ=r

rNn]n[p~

38

Therefore the FT is

[ ] k allfor 1kP~

=

( ) ∑∞

−∞=

ω

π−ωδ

π=

k

j

N

k2

N

2eP

~

Page 39: Ch8dtft Dft Fs

Finite-length x[n] & Periodic Signals

Convolve with periodic impulse train

The FT of the periodic sequence is

[ ] [ ]∑∑∞

−∞=

−∞=

−=−δ∗=∗=rr

rNnxrNn]n[x]n[p~

]n[x]n[x~

( ) ( ) ( ) ( )

π

−ωδπ

== ∑∞

ωωωω k22eXeP

~eXeX

~ jjjj

39

This implies that

DFS coefficients of a periodic signal = equally spaced samples of the FT of one period

( ) ( ) ( ) ( )

( )

π−ωδ

π=

−ωδ==

−∞=

π

ω

−∞=

N

k2eX

N

2eX

~

NNeXePeXeX

k

N

k2j

j

k

[ ] ( )N

k2jN

k2j

eXeXkX~

π=ω

ω

π

=

=

Page 40: Ch8dtft Dft Fs

Finite-length x[n] & Periodic Signals

40

Page 41: Ch8dtft Dft Fs

Example

Consider

≤≤

=else0

4n01]n[x

41

The FT is

The DFS

coefficients

( ) ( )( )2/sin

2/5sineeX 2jj

ω

ω= ω−ω

[ ] ( ) ( )( )10/ksin

2/ksinekX

~ 10/k4j

π

π= π−

Page 42: Ch8dtft Dft Fs

Outline

o Introduction to frequency analysis

o DTFS & properties

o DTFT of periodic signals

o DFT: Sampling of the DTFT

42

o DFT: Sampling of the DTFT

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (matlab)

o Summary

Page 43: Ch8dtft Dft Fs

Sampling the DTFT:Sampling in frequency domain

In the DTFT

The summation over n is infinite

nj

n

jenxeX

ωω −∞

−∞=

∑= ][)(

43

The independent variable is continuous

DTFT is not numerically computable transform

To numerically represent the continuous frequency DTFT, we must take samples of it DFT

ω

Page 44: Ch8dtft Dft Fs

Sampling the DTFT:

Review to sampling

Sampling is converting x(t) to x[n]

T : sampling period in second; fs = 1/T : sampling frequency in Hz

Ωs=2πfs : Sampling frequency in radian-per-second

In frequency domain: convolution of X(jw) with an impulse train

[ ] ( ) ∞<<∞−= nnTxnx c

( ) ( )( )∑∞

−∞=

Ω−Ω=Ωk

scs kjXT

jX1

44

Creates replica of the FT of x(t); Replica are periodic with Ωs

If Ωs< ΩN sampling maybe irreversible due to aliasing of images

−∞=kT

( )ΩjX c

( )ΩjX s

( )ΩjX s

ΩN-ΩN

ΩN-ΩN Ωs 2Ωs 3Ωs

-

2ΩsΩs3Ωs

ΩN-ΩN Ωs 2Ωs 3Ωs

-

2ΩsΩs

3Ωs

Ωs<2ΩN

Ωs>2ΩN

Page 45: Ch8dtft Dft Fs

Sampling the DTFT:Sampling in frequency domain

Consider an aperiodic x[n] with a DTFT

Assume a sequence is obtained by sampling the DTFT

Since the DTFT is periodic, the resulting sequence is also

[ ] ( )( )

( )( ) 10 ;~ /2

/2−≤≤==

=LkeXeXkX

kNj

kN

j π

πω

ω

( )ωjDTFTeXnx →←][

45

Since the DTFT is periodic, the resulting sequence is also

periodic

could be the DFS of a sequence

The corresponding sequence is

[ ]kX~

[ ] ( ) 10 and 10 ;~1

][~1

0

/2 −≤≤−≤≤= ∑−

=

LkNnekXN

nxN

k

knNj π

Page 46: Ch8dtft Dft Fs

Sampling the DTFT

We can also write it in terms of the z-transform

[ ] ( )( )

( )( )kNj

kN

jeXeXkX

/2

/2

~ π

πω

ω ===

[ ] ( ) ( )( )kNjeXzXkX

/2~ π==

46

The sampling points are shown in figure

[ ] ( ) ( )( )( )kNj

ezeXzXkX kN

/2/2

~ ππ ==

=

Page 47: Ch8dtft Dft Fs

Sampling the DTFT

The only assumption made on x[n]: its DTFT exist

Combine the equations gives

( ) [ ]∑∞

−∞=

−=m

mjjemxeX

ωω [ ] ( )∑−

=

=1

0

/2~1][~

N

k

knNjekX

Nnx

π[ ] ( )( )kNjeXkX

/2~ π=

[ ] ( ) ( )∑ ∑− ∞

=N

knNjkmNjeemxnx

1][~

1/2/2 ππ

47

Term in the parenthesis [] is

[ ] ( ) ( )

[ ] ( ) ( ) [ ] [ ]∑∑ ∑

∑ ∑∞

−∞=

−∞=

=

= −∞=

−=

=

=

mm

N

k

mnkNj

k

knNj

m

kmNj

mnpmxeN

mx

eemxN

nx

~1

1][~

1

0

/2

0

/2/2

π

ππ

[ ] ( ) ( ) [ ]∑∑∞

−∞=

=

− −−==−r

N

k

mnkNjrNmne

Nmnp δπ

1

0

/21~

[ ] [ ] [ ]∑∑∞

−∞=

−∞=

−=−∗=rr

rNnxrNnnxnx δ][~

Page 48: Ch8dtft Dft Fs

Sampling the DTFT

48

FS are samples of the FT of one period

FS are still samples of the FT; But, one period is no longer identical to x[n]

Page 49: Ch8dtft Dft Fs

Sampling the DTFT

DFS coefficients of a periodic sequence obtained through summing periodic replicas of aperiodic original sequence x[n]

If x[n] is of finite length & we take sufficient number of samples of its DTFT, x[n] can be recovered by

49

samples of its DTFT, x[n] can be recovered by

No need to know the DTFT at all frequencies, to recover

x[n]

DFT: Representing a finite length sequence by samples of DTFT

[ ][ ]

−≤≤

=else

Nnnxnx

0

10~

Page 50: Ch8dtft Dft Fs

Sampling in the frequency domain

The relationship between and one period of in the under-sampled case is considered a form of time domain aliasing

Time domain aliasing can be avoided only if has finite length

just as frequency domain aliasing can be avoided only for

][nx ][~ nx

][nx

50

just as frequency domain aliasing can be avoided only for signals being band-limited

If has finite length N and we take a sufficient number Lof equally spaced samples of its FT, then

the FT is recoverable from these samples

equivalently is recoverable from

Sufficient number L means: L>=N We must have at least as many frequency samples as the

signal’s length

][nx

][nx ][~ nx

Page 51: Ch8dtft Dft Fs

The DFT

Consider a finite length sequence x[n] of length N

For x[n] associate a periodic sequence

The DFS coefficients of the periodic sequence are samples of the DTFT of x[n]

[ ] 10 of outside 0 −≤≤= Nnnx

[ ] [ ]∑∞

−∞=

−= rNnxnx~

51

Since x[n] is of length N there is no overlap between terms of x[n-rN] and we can write the periodic sequence as

To maintain duality between time and frequency

We choose one period of as the DFT of x[n]

∑−∞=r

[ ] ( )[ ] ( )( )[ ]NkXkXkX == N mod ~

[ ]kX~

[ ][ ]

−≤≤

=else

NkkXkX

0

10~

[ ] ( )[ ] ( )( )[ ]N

nxnxnx == N mod ~

Page 52: Ch8dtft Dft Fs

The DFT

Consider the DFS pair

The equations involve only one period so we can

write

[ ] ( )∑−

=

=1

0

/2~1][~

N

k

knNjekX

Nnx

π

[ ] ( )∑−

=

−=1

0

/2][~~ N

n

knNjenxkX

π

−N ~1 1

52

write

The DFT pair

[ ]( )

−≤≤

= ∑−

=

else

NkenxkX

N

n

knNj

0

10][~1

0

/2π [ ] ( )

−≤≤

= ∑−

=

else

NkekXNnx

N

k

knNj

0

10~1

][

1

0

/2π

[ ] ( )

N, LLk

enxkXN

n

knNj

>=−≤≤

=∑−

=

10

][1

0

/2π [ ] ( )

NLwhereLk

ekXN

nxN

k

knNj

>=−≤≤

= ∑−

=

,10

1][

1

0

/2π

[ ] ][nxkXDFT →←

Page 53: Ch8dtft Dft Fs

DFT: x[n] finite duration

53

Page 54: Ch8dtft Dft Fs

DFT: Example 1

DFT of a rect. pulse x[n], N=5

Consider x[n] of any length L>5

Let L=N=5

Calculate the DFS of the

periodic form of x[n]

54

periodic form of x[n]

[ ] ( )

( )

±±=

=

−=

=

π−

π−

=

π−∑

else0

,...10,5,0k5

e1

e1

ekX~

5/k2j

k2j

4

0n

n5/k2j

Page 55: Ch8dtft Dft Fs

DFT: Example 1

Let L=2N=10

We get a different set

of DFT coefficients

Still samples of the

55

Still samples of the

DTFT but in different

places

x[n] = Inverse X[k]

depends on relation L

& N

Page 56: Ch8dtft Dft Fs

DFT: Example 1summary

56

The larger the DFT size K, the more details of the INVERSE DFT, i.e., x[n ] can be seen

Page 57: Ch8dtft Dft Fs

DFT: example 2

57

NLwhereLk >=−≤≤ ,10

Page 58: Ch8dtft Dft Fs

DFT: example 3

58

NLwhereLk >=−≤≤ ,10

Page 59: Ch8dtft Dft Fs

DFT: example 3

59

Page 60: Ch8dtft Dft Fs

Properties of DFT (very similar to that of DTFS)

Linearity [ ] [ ][ ] [ ]

[ ] [ ] [ ] [ ]kbXkaXnbxnax

kXnx

kXnx

DFT

DFT

DFT

2121

22

11

+ →←+

→←

→←

60

Duality[ ] [ ][ ] ( )( )[ ]N

DFT

DFT

kNxnX

kXnx

− →←

→←

Page 61: Ch8dtft Dft Fs

Example: Duality

61

Page 62: Ch8dtft Dft Fs

Circular Shift property

1-Nn0 range over the defined belonger nomay

m],-x[ny[n] shifted them,arbitrary an For -

Nn and 0nfor 0x[n]-

1-Nn0for defined ]length x[n-NConsider -

≤≤

=

>=<=

≤≤

62

( )( )[ ] ( )

( )N

NN

mN

Nnnmnxny

by shift circular toequivalent is mshift circular A -

m)-(Nby shift circular left a toequivalent is mby shift Circular -

modulo where, ][

1-Nn0 range in the be always bemust y[n] :shift"Circular "

m]-n[ :shiftlinear apply cannot We

>

=−=

≤≤−

∞≤≤∞−==>

Page 63: Ch8dtft Dft Fs

Circular Shift property[ ] [ ]

( )( )[ ] [ ] ( )mNkjDFT

N

DFT

ekXmnx

kXnx/21-Nn0 π− →←≤≤−

→←

63

Page 64: Ch8dtft Dft Fs

64

Page 65: Ch8dtft Dft Fs

Circular Shift property

65

Page 66: Ch8dtft Dft Fs

Circular Convolution Property

][~ nx

][ N ][][ 213 nxnxnx =

66

10 −≤≤ Nn

• Linear convolution: one sequence is multiplied by a time–

reversed and linearly-shifted version of the other

•Circular convolution: the second sequence is circularly time-reversed and circularly-shifted it is called an N-point circular

convolution

Page 67: Ch8dtft Dft Fs

Circular Convolution Property

( ) ( ) ( )

( ) ( )( ) )()()( so, is from DFT -

so, :nconvolutioCircular -

so h[n],* x[n] y[n] :nconvolutioLinear

/2 ==

==

==−

kHkXkYeYY(k) eY

X(k)H(k)W(k) n] x[n] N h[w[n]

eHeXeY

kNjj

jjj

πω

ωωω

67 aliasing en with timConvolutioLinear n ConvolutioCircular

0

10][][

thenN, period of sequence periodic a ][~y form :y[n] of DFTget To

)12 oflength max. has BUT length of

then,length of and If

===>

−≤≤−

=

∑∞

−∞=

else

NnrNnynw

nx

N-(y[n]Nw[n]

Nh[n]x[n]

r

Page 68: Ch8dtft Dft Fs

Circular Convolution:

example 1

Circular convolution of two finite length sequences

][][ 01 nnnx −= δ

][10WkX

kn

N=

][][ 01 nnnx −= δ

68

[ ] [ ] ( )( )[ ]∑−

=

−=1

0

213

N

m

Nmnxmxnx

[ ] [ ] ( )( )[ ]∑−

=

−=1

0

123

N

m

Nmnxmxnx

][][

][

23

1

0 kXWkX

WkX

kn

N

N

=

=

Page 69: Ch8dtft Dft Fs

Example 2: L=N

Two rect. X[n]: L=N=6

DFT of each sequence

[ ] [ ] −≤≤

==else

Knnxnx

0

10121

[ ] [ ] =

=== ∑− − kN

ekXkXN knj 01 2π

69

Multiplication of DFTs

Inverse DFT

[ ] [ ] =

=== ∑=

else

kNekXkX

n

knN

j

0

0

0

21

[ ] [ ] [ ] =

==else

kNkXkXkX

0

02

213

[ ] −≤≤

=else

NnNnx

0

103

Page 70: Ch8dtft Dft Fs

Example 2: L=2N

Augment zeros to each sequence L=2N=12

The DFT of each

sequence

[ ] [ ]N

Lk2j

e1kXkX

π−

−==

70

Multiplication of DFTs

[ ] [ ]N

k2j

N

21

e1

e1kXkX

π−

−==

[ ]

2

N

k2j

N

Lk2j

3

e1

e1kX

−=

π−

π−

x[n] = Inverse DFT X[k] is not unique; depends on L and N

Page 71: Ch8dtft Dft Fs

Circular convolution example

71

Page 72: Ch8dtft Dft Fs

72

Page 73: Ch8dtft Dft Fs

Symmetry Property

73

Page 74: Ch8dtft Dft Fs

Symmetry Properties

74

Page 75: Ch8dtft Dft Fs

Outline

o Introduction to frequency analysis

o DTFS & properties

o DTFT of periodic signals

o DFT: sampling of the DTFT

75

o DFT: sampling of the DTFT

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (matlab)

o Summary

Page 76: Ch8dtft Dft Fs

Discrete-time signal transforms

7676

Page 77: Ch8dtft Dft Fs

Numerical Calculation of FT

1. The original signal is digitized

2. A Fast Fourier Transform (FFT) algorithm is applied, which yields samples of the FT at equally spaced intervals

77

at equally spaced intervals

For a signal that is very long, e.g., a speech signal or a music piece, spectrogram is used

FT over successive overlapping short intervals

Page 78: Ch8dtft Dft Fs

Matlab examples: DTFT

Suppose that:

Analytically, the DTFT is

X(ejω): continuous function of ω

X(ejω): periodic with period 2π

78

X(e ): periodic with period 2π

Plot it using

78

Page 79: Ch8dtft Dft Fs

Matlab examples: DTFT

Signal x[n] DTFT

7979

Page 80: Ch8dtft Dft Fs

Matlab examples: DFT

Close form X(ejω) not always easy

To plot |X(ejω)|, we sampled from 0 to 2π

In code: w and X are vectors

Small step size 0.001 to simulate continuous frequency

80

Workaround: DFT

Uniform L-samples from DTFT from 0 to 2π

Takes discrete values and returns discrete values

No need to find |X(ejω)| analytically

Fast implementation using the fast Fourier transform (FFT)

Matlab: fft(x,L)• L: number of samples to take

• More L more resolution

• Default L is N=length(x)

80

Page 81: Ch8dtft Dft Fs

Matlab examples: DFT

Calculating the DFT

81

Plotting the DFT against k

81

Page 82: Ch8dtft Dft Fs

Matlab examples: DFT

Notes: Default L=32 gives bad

resolution

information lost

82

information lost

x-axis not useful

Cannot find fundamental frequency 3π/8

82

Page 83: Ch8dtft Dft Fs

Matlab examples: DFT

Effect of increasing L (better resolution)

• L=64

83

• L-128

83

Page 84: Ch8dtft Dft Fs

Matlab examples: DFT

Obtaining the frequency (x-axis)

84

Spike at 3π/8=1.17

Spike at 2π-3π/8 = 5.11

FFT calculates from 0 to 2π

More familiar to shift using fftshift

84

Page 85: Ch8dtft Dft Fs

Matlab examples: DFT

85

Spikes at 3π/8 and -3π/8

85

Page 86: Ch8dtft Dft Fs

Matlab examples: DFT

Sometimes we want

frequency in Hz

8686

Page 87: Ch8dtft Dft Fs

Matlab examples: DFT

87

|X[k]| vs. ωk

Discrete

DFT

87

|X(ejω)| vs. ω

Continuous

By interpolating DFT

|X(f)| vs. f

Continuous

f = (ω/ 2π) fs fs : sampling frequency

fft values divided by N

Peak at 0.5 (half our

amplitude of 1)

Page 88: Ch8dtft Dft Fs

Matlab examples: DFS

No special function

Same as DFT

Provided signal corresponds to 1 period

8888

Page 89: Ch8dtft Dft Fs

Matlab examples: z-Transform

Suppose that:

8989

Page 90: Ch8dtft Dft Fs

Matlab examples: z-Transform

9090

Page 91: Ch8dtft Dft Fs

Matlab examples: z-Transform

9191

Page 92: Ch8dtft Dft Fs

Matlab examples: z-Transform

Evaluate H2(ejω) directly from z-Transform

9292

Page 93: Ch8dtft Dft Fs

Matlab examples: z-Transform

Finding z-Transform analytically

9393

Page 94: Ch8dtft Dft Fs

Outline

o Introduction to frequency analysis

o DTFS & properties

o DTFT & properties

o FT of periodic signals

94

o FT of periodic signals

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (matlab)

o FTT

o Summary

Page 95: Ch8dtft Dft Fs

FFT: Fast Fourier transform

FFT is a direct computation of the DFT

FFT is a set of algorithms for the efficient and digital computation of the N-point DFT, rather than a new transform

95

rather than a new transform

Use the number of arithmetic multiplications and additions as a measure of computational complexity

Page 96: Ch8dtft Dft Fs

FFT

The DFT pair was given as

Baseline for computational complexity:

Each DFT coefficient requires

• N complex multiplications

[ ] ( )∑−

=

π=1N

0k

knN/2jekXN

1]n[x

[ ] ( )∑−

=

π−=1N

0n

knN/2je]n[xkX

96

• N-1 complex additions

All N DFT coefficients require

• N2 complex multiplications

• N(N-1) complex additions

Complexity in terms of real operations

• 4N2 real multiplications

• 2N(N-1) real additions

Page 97: Ch8dtft Dft Fs

FFT

Most fast methods are based on symmetry

properties

Conjugate symmetry( ) ( ) ( ) ( ) ( ) ( )knN/2jnkN/2jkNN/2jnNkN/2j eeee π−π−π−−π− ==

97

Periodicity in n and k

The Second Order Goertzel Filter

• Approximately N2 real multiplications and 2N2 real additions

• Do not need to evaluate all N DFT coefficients

Decimation-In-Time FFT Algorithms

(N/2)log2N complex multiplications and additions

eeee ==

( ) ( ) ( ) ( )( )nNkN/2jNnkN/2jknN/2j eee +π+π−π− ==

Page 98: Ch8dtft Dft Fs

Symmetry and periodicity of complex exponential

Complex conjugate symmetry

Periodicity in n and k

ImRe)( *][ kn

N

kn

N

kn

N

kn

N

nNk

N WjWWWW −=== −−

98

For example

The number of multiplications is reduced by a factor of 2

nNk

N

Nnk

N

kn

N WWW)()( ++ ==

Re])[Re][(Re

Re][ReRe][Re ][

kn

N

nNk

N

kn

N

WnNxnx

WnNxWnx

−+=

−+ −

Page 99: Ch8dtft Dft Fs

Outline

o Introduction to frequency analysis

o DTFS & properties

o DTFT & properties

o FT of periodic signals

99

o FT of periodic signals

o DTFT, DTFS, DFT, DFS, FFT, ZT: numerical (matlab)

o FTT

o Summary

Page 100: Ch8dtft Dft Fs

Overview of signal transforms

Variable Period Continuous

Frequency

Discrete

Frequency

DT x[n] n N kNkk /2πω =

ω

100

CT x(t) t T kTkk /2πω =Ω

• DT-FS: Discrete in time; Periodic in time; Discrete in Frequency; Periodic in Frequency

• DT-FT: Discrete in time; Aperiodic in time; Continous in Frequency; Periodic in Frequency

• CT-FS: Continuous in time; Periodic in time; Discrete in Frequency; Aperiodic in Frequency

• CT-FT: Continuous in time; Aperiodic in time; Continous in Frequency; Aperiodic in Frequency

• DFT: Discrete in time; Aperiodic in time; Discrete in Frequency; Periodic in Frequency;

finite-duration x[n]

• DFS: Discrete in time; Periodic in time (make finite-duration x[n] periodic);

Discrete in Frequency; Periodic in Frequency;

Page 101: Ch8dtft Dft Fs

Relationships between signal transforms

Continuous-time

analog signal

x(t)

Discrete-time

analog sequence

x [n]

Sample in time

Sampling period = Ts

ContinuousFourier Transform

X(f)

Discrete Fourier Transform

X(k)

Discrete-Time

Fourier Transform

Ω)

Laplace

Transformz-Transform

X(z)C

C D

101

Ω= j ez

ω=2πfΩ = ω Ts,

scale

amplitude

by 1/Ts

Sample in

frequency,Ω = 2πn/N,

N = Length

of sequence

X(f)

∞≤≤∞

∫∞

∞−

f-

dt e x(t) ft2 j- π

X(k)

10

e [n]x 1

0 =n

N

nk2j-

−≤≤

∑−

Nk

N π

X(Ω)

π20

e [n]x - =n

j-

≤Ω≤

∑∞

Ωn

Transform

X(s)s = σ+jω

∞≤≤∞

∫∞

∞−

s-

dt e x(t) st

X(z)

∞≤≤∞−

∑∞

∞−

z

=n

n- z [n]x

s = jω

ω=2πf

C CC

C

D

DC Continuous-variable Discrete-variable

Ω= j ez r

Page 102: Ch8dtft Dft Fs

Fourier versus Cosine Transform

Recall: the cosine wave starts out 1/4th later in its period

It has an offset Common to measure this offset in degree or radians

One complete period equals 360°or 2π radian

102

One complete period equals 360°or 2π radian

The cosine wave thus has an offset of 90°or π/2 This offset is called the phase of a sinusoid We cannot restrict a signal x(t) to start out at zero

phase or 90°phase all the time Must determine its frequency, amplitude, and phase to

uniquely describe it at any one time instant With the sine or cosine transform, we are restricted to

zero phase or 90°phase

Page 103: Ch8dtft Dft Fs

DCT: One Dimensional

+=

=

1

0 2

)12(cos

2

1 n

t n

ftxCX tff

π

103

>

==

0,1

0,2

1

f

fC f

where

n = size

x = signal

X = transform coefficients