Vous êtes sur la page 1sur 0

P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Module 4: Fourier Analysis
Digi doni a 13
n
0
Pra
2
aolo

Module Overview:

Modules 4.2: The Discrete Fourier Transform (DFT)

Modules 4.3: DFT in practice

Modules 4.4:

Modules 4.5:

Modules 4.6:

Modules 4.7: Sinusoidal modulation and applications

Modules 4.8: The Short-Time Fourier Transform

Modules 4.1: Introduction to Fourier Analysis

Modules 4.9: The FFT: History and Examples advanced topics: DTFT as a formal basis
expansion Relationships between transforms

ing
i
cess Vetterl
ro (DTFT)
The Discrete-Time Fourieral P
Transformtin
Sign nd Mar
l
DTFT properties ta
Digi doni a 13
an 20
Relationships between transforms
lo Pr
Pao

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a Module 4.1: Exploration via a change of basis
13
Pran 20
aolo

Overview:

4.1

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Frequency analysis as a changetofl basis
a
Digi doni a 13
The Fourier basis
an 20
lo Pr
Pao
The frequency domain

Overview:

4.1

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Frequency analysis as a changetofl basis
a
Digi doni a 13
The Fourier basis
an 20
lo Pr
Pao
The frequency domain

Overview:

4.1

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Frequency analysis as a changetofl basis
a
Digi doni a 13
The Fourier basis
an 20
lo Pr
Pao
The frequency domain

Oscillations are everywhere!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.1

Oscillations are everywhere

4.1

sustainable dynamic systems exhibit oscillatory behavior


ing

rli
ss
roce last: Vette
intuitively: things that dont move in circles cant tin
al P
Sign nd Mar
bombs
tal
Digi doni a 13
rockets
an 20
lo Pr
human beings... Pao

Oscillations are everywhere

4.1

sustainable dynamic systems exhibit oscillatory behavior


ing

rli
ss
roce last: Vette
intuitively: things that dont move in circles cant tin
al P
Sign nd Mar
bombs
tal
Digi doni a 13
rockets
an 20
lo Pr
human beings... Pao

Oscillations are everywhere

4.1

sustainable dynamic systems exhibit oscillatory behavior


ing

rli
ss
roce last: Vette
intuitively: things that dont move in circles cant tin
al P
Sign nd Mar
bombs
tal
Digi doni a 13
rockets
an 20
lo Pr
human beings... Pao

Oscillations are everywhere

4.1

sustainable dynamic systems exhibit oscillatory behavior


ing

rli
ss
roce last: Vette
intuitively: things that dont move in circles cant tin
al P
Sign nd Mar
bombs
tal
Digi doni a 13
rockets
an 20
lo Pr
human beings... Pao

Oscillations are everywhere

4.1

sustainable dynamic systems exhibit oscillatory behavior


ing

rli
ss
roce last: Vette
intuitively: things that dont move in circles cant tin
al P
Sign nd Mar
bombs
tal
Digi doni a 13
rockets
an 20
lo Pr
human beings... Pao

Oscillations are everywhere

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.1

Oscillations are everywhere

x(t)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.1

Oscillations are everywhere

x(t)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.1

x1 (t)

x2 (t)

You too can detect sinusoids!


the human body has two receptors for sinusoidal signals:
rods and cones (retina)

cochlea (inner ear)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

electromagnetic sinusoids

4.1

air pressure sinusoids


frequencies from 20Hz to 20KHz

frequencies from 430THz to 790THz


6

The intuition

4.1

g
P o in Vet
alat r artmultiple frequencies
we can build instruments that resonate
Sign one or
ital ni and M
(tuning fork vs piano)
Dig do
013
Pran
the frequency domain seems to be as 2
important as the time domain
lo
Pao

humans analyze complex signals (audio, images) essin ofterli sinusoidal components
c in terms their

The intuition

4.1

g
P o in Vet
alat r artmultiple frequencies
we can build instruments that resonate
Sign one or
ital ni and M
(tuning fork vs piano)
Dig do
013
Pran
the frequency domain seems to be as 2
important as the time domain
lo
Pao

humans analyze complex signals (audio, images) essin ofterli sinusoidal components
c in terms their

The intuition

4.1

g
P o in Vet
alat r artmultiple frequencies
we can build instruments that resonate
Sign one or
ital ni and M
(tuning fork vs piano)
Dig do
013
Pran
the frequency domain seems to be as 2
important as the time domain
lo
Pao

humans analyze complex signals (audio, images) essin ofterli sinusoidal components
c in terms their

Fundamental question

can we decompose any signal into sinusoidal elements?


yes, and Fourier showed us how to idogit exactly!
sn
rli

es
te
Proc tin Vet
al
ar
Sign
analysis
synthesis
ital ni and M
Dig domain

from time domain to frequency ndo


013from frequency domain to time domain
Pra
2
lo
create signals with known frequency
nd the contribution ofo
Pa dierent
frequencies

4.1

discover hidden signal properties

content

t signals to specic frequency regions

Fundamental question

can we decompose any signal into sinusoidal elements?


yes, and Fourier showed us how to idogit exactly!
sn
rli

es
te
Proc tin Vet
al
ar
Sign
analysis
synthesis
ital ni and M
Dig domain

from time domain to frequency ndo


013from frequency domain to time domain
Pra
2
lo
create signals with known frequency
nd the contribution ofo
Pa dierent
frequencies

4.1

discover hidden signal properties

content

t signals to specic frequency regions

Fundamental question

can we decompose any signal into sinusoidal elements?


yes, and Fourier showed us how to idogit exactly!
sn
rli

es
te
Proc tin Vet
al
ar
Sign
analysis
synthesis
ital ni and M
Dig domain

from time domain to frequency ndo


013from frequency domain to time domain
Pra
2
lo
create signals with known frequency
nd the contribution ofo
Pa dierent
frequencies

4.1

discover hidden signal properties

content

t signals to specic frequency regions

Fundamental question

can we decompose any signal into sinusoidal elements?


yes, and Fourier showed us how to idogit exactly!
sn
rli

es
te
Proc tin Vet
al
ar
Sign
analysis
synthesis
ital ni and M
Dig domain

from time domain to frequency ndo


013from frequency domain to time domain
Pra
2
lo
create signals with known frequency
nd the contribution ofo
Pa dierent
frequencies

4.1

discover hidden signal properties

content

t signals to specic frequency regions

The mathematical setup

4.1

lets start with nite-length signals (i.e. vectors in ssNng


Ci )

rli
roce in Vette
P
t
Fourier analysis is a simple change ofgnal
basis
Si
Mar
l
d
ta
a change of basis is a change of perspective 3
Digi doni an 1
Pran 20
a change of perspective olo reveal things (if the basis is good)
can
Pa

The mathematical setup

4.1

lets start with nite-length signals (i.e. vectors in ssNng


Ci )

rli
roce in Vette
P
t
Fourier analysis is a simple change ofgnal
basis
Si
Mar
l
d
ta
a change of basis is a change of perspective 3
Digi doni an 1
Pran 20
a change of perspective olo reveal things (if the basis is good)
can
Pa

The mathematical setup

4.1

lets start with nite-length signals (i.e. vectors in ssNng


Ci )

rli
roce in Vette
P
t
Fourier analysis is a simple change ofgnal
basis
Si
Mar
l
d
ta
a change of basis is a change of perspective 3
Digi doni an 1
Pran 20
a change of perspective olo reveal things (if the basis is good)
can
Pa

The mathematical setup

4.1

lets start with nite-length signals (i.e. vectors in ssNng


Ci )

rli
roce in Vette
P
t
Fourier analysis is a simple change ofgnal
basis
Si
Mar
l
d
ta
a change of basis is a change of perspective 3
Digi doni an 1
Pran 20
a change of perspective olo reveal things (if the basis is good)
can
Pa

Mystery signal

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

2
0

4.1

170

340

510

680

850

1020

10

Mystery signal in the Fourier basis

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

400

200

P
0
0

4.1

170

340

510

680

850

1020

11

The Fourier Basis for CN

ng
l Pro t Ve
gna n, k Mar1,in. . , N 1
j
Si
wk [n] = etalnk ,
d = 0, .
igi
D
ni an 13
do 2 basis
N
is ran
P an orthogonal 0 in C .

lo
Pao

Claim: the set of N signalsiin CN terli


cess
t
2
N

4.1

12

The Fourier Basis for CN

In vector notation:

ing
i
cess Vetterl
{w }k=0,1,...,N1
ro in
al P
t
Sign with Mar
l
d
ta
Digi doni an 13
j
an (k) =20 nk
lo Pr wn e
o
(k)

Pa

4.1

2
N

is an orthogonal basis in CN

13

Recall the complex exponential generating machine...


Im

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Re
ta
w [0]
Digi doni a 13
an 20
lo Pr
ao
1

4.1

14

Recall the complex exponential generating machine...


Im

ing
i
cess wV[1]tterl
ro in e
al P
t
Sign nd Mar
l
Re
ta
Digi doni a 13
an 20
lo Pr
ao
1

2/N

4.1

14

Recall the complex exponential generating machine...


Im
w1 [2]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Re
ta
Digi doni a 13
an 20
lo Pr
ao
2/N

4.1

14

Recall the complex exponential generating machine...


Im
w1 [3]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Re
ta
Digi doni a 13
an 20
lo Pr
ao
2/N

4.1

14

Recall the complex exponential generating machine...


Im
w1 [4]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Re
ta
Digi doni a 13
an 20
lo Pr
ao
2/N

4.1

14

Recall the complex exponential generating machine...


Im

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Re
ta
Digi doni a 13
an 20
lo Pr
ao
w1 [5]

2/N

4.1

14

Basis vector w(0) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
15

Basis vector w(1) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
16

Basis vector w(2) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
17

Basis vector w(3) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
18

Basis vector w(4) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
19

Basis vector w(5) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
20

Basis vector w(16) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
21

Basis vector w(20) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
22

Basis vector w(30) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
23

Basis vector w(31) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
24

Basis vector w(32) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
25

Basis vector w(33) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
26

Basis vector w(34) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
27

Basis vector w(60) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
28

Basis vector w(61) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
29

Basis vector w(62) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
30

Basis vector w(63) C64

Re

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

Im

1
0
4.1

32

64
31

Proof of orthogonality

N1

(k)

ing
i
cess Vetterl
n=0
ro in
al P
t
N1ign
S j (hk)n ar
M
l
d
ita e
Dig= doni an 13
n=0
an
20
lo Pr
o

,w

(h)

(e j

2
nk
N

) e j

2
nh
N

2
N

Pa

4.1

for h = k
N
1 e j2(hk)

= 0 otherwise
2
1 e j N (hk)
32

Proof of orthogonality

N1

(k)

ing
i
cess Vetterl
n=0
ro in
al P
t
N1ign
S j (hk)n ar
M
l
d
ita e
Dig= doni an 13
n=0
an
20
lo Pr
o

,w

(h)

(e j

2
nk
N

) e j

2
nh
N

2
N

Pa

4.1

for h = k
N
1 e j2(hk)

= 0 otherwise
2
1 e j N (hk)
32

Proof of orthogonality

N1

(k)

ing
i
cess Vetterl
n=0
ro in
al P
t
N1ign
S j (hk)n ar
M
l
d
ita e
Dig= doni an 13
n=0
an
20
lo Pr
o

,w

(h)

(e j

2
nk
N

) e j

2
nh
N

2
N

Pa

4.1

for h = k
N
1 e j2(hk)

= 0 otherwise
2
1 e j N (hk)
32

Proof of orthogonality

N1

(k)

ing
i
cess Vetterl
n=0
ro in
al P
t
N1ign
S j (hk)n ar
M
l
d
ita e
Dig= doni an 13
n=0
an
20
lo Pr
o

,w

(h)

(e j

2
nk
N

) e j

2
nh
N

2
N

Pa

4.1

for h = k
N
1 e j2(hk)

= 0 otherwise
2
1 e j N (hk)
32

Remarks

4.1

ing
i
cess Vetterl
ro in
N
N orthogonal vectors basis for C al P
n
rt
l Sig nd Ma would be 1/N
vectors are not orthonormal.igita
D Normalization factor
ni a
ndo 2013
Pra

aolo
P

33

Remarks

4.1

ing
i
cess Vetterl
ro in
N
N orthogonal vectors basis for C al P
n
rt
l Sig nd Ma would be 1/N
vectors are not orthonormal.igita
D Normalization factor
ni a
ndo 2013
Pra

aolo
P

33

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.1


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a Module 4.2: The Discrete Fourier Transform
13
Pran 20
aolo

Overview:

4.2

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
DFT examples
l
ta
Digi doni a 13
interpreting a DFT plot
an 20
lo Pr
Pao
The Discrete Fourier Transform

34

Overview:

4.2

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
DFT examples
l
ta
Digi doni a 13
interpreting a DFT plot
an 20
lo Pr
Pao
The Discrete Fourier Transform

34

Overview:

4.2

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
DFT examples
l
ta
Digi doni a 13
interpreting a DFT plot
an 20
lo Pr
Pao
The Discrete Fourier Transform

34

The Fourier Basis for CN

4.2

ing
i
cess Vetterl
j
ro 0, 1,n. . , N 1
P
in signal notation: wk [n] = e
, aln, k = ti .
Sign nd(k) ar j nk
al with M
in vector notation: {w(k) }Digit
k=0,1,...,N1ni a wn = e
do
13
Pran 20
lo
Pao
2
nk
N

2
N

35

The Fourier Basis for CN

4.2

ing
i
cess Vetterl
j
ro 0, 1,n. . , N 1
P
in signal notation: wk [n] = e
, aln, k = ti .
Sign nd(k) ar j nk
al with M
in vector notation: {w(k) }Digit
k=0,1,...,N1ni a wn = e
do
13
Pran 20
lo
Pao
2
nk
N

2
N

35

The Fourier Basis for CN

4.2

ing
i
cess Vetterl
ro in
al P

t
Sign nd Mar
vectors are not orthonormal. Normalization factor would be 1/ N
l
ta
Digi doni a 13
will keep normalization factor ran
explicit in DFT formulas
0
2
lo P
Pao
N orthogonal vectors basis for CN

36

Basis expansion
Analysis formula:

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
Synthesis formula:
an 20
lo Pr
o
Xk = w(k) , x

Pa

4.2

1
x=
N

N1

Xk w(k)
k=0

37

Change of basis in matrix form


2

Dene WN = e j N
(or simply W when N is evident from the context)

g
i
ssin
ceW[n, Vetterlnm :
Change of basis matrix W ro
with
m] = WN
al P
tin
Sign nd Mar
l
ta

D1igi do1 i a 131


n
1
1
n 2 20 3 . . .
1
1 lW Pra W
W
. . . W N1
ao o 2

W
W4
W6
. . . W 2(N1)
W = P
1

4.2

...

W N1

W 2(N1)

W 3(N1)

...

2
W (N1)

38

Change of basis in matrix form


2

Dene WN = e j N
(or simply W when N is evident from the context)

g
i
ssin
ceW[n, Vetterlnm :
Change of basis matrix W ro
with
m] = WN
al P
tin
Sign nd Mar
l
ta

D1igi do1 i a 131


n
1
1
n 2 20 3 . . .
1
1 lW Pra W
W
. . . W N1
ao o 2

W
W4
W6
. . . W 2(N1)
W = P
1

4.2

...

W N1

W 2(N1)

W 3(N1)

...

2
W (N1)

38

Change of basis in matrix form


Analysis formula:

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
Synthesis formula:
an 20
lo Pr
o
X = Wx

Pa

x=

4.2

1 H
W X
N

39

Basis expansion (signal notation)


Analysis formula:
N1

x[n] e j

X [k] =

2
nk
N

k = 0, 1, . . . , N 1
g

rli
ssin
roce in Vette
al P
t
N-point signalignthe frequency domain
S in nd Mar
l
ta
Digi doni a 13
an 20
lo Pr Synthesis formula:
ao
n=0

1
x[n] =
N

N1

X [k] e j
k=0

2
nk
N

n = 0, 1, . . . , N 1

N-point signal in the time domain


4.2

40

Basis expansion (signal notation)


Analysis formula:
N1

x[n] e j

X [k] =

2
nk
N

k = 0, 1, . . . , N 1
g

rli
ssin
roce in Vette
al P
t
N-point signalignthe frequency domain
S in nd Mar
l
ta
Digi doni a 13
an 20
lo Pr Synthesis formula:
ao
n=0

1
x[n] =
N

N1

X [k] e j
k=0

2
nk
N

n = 0, 1, . . . , N 1

N-point signal in the time domain


4.2

40

DFT is obviously linear

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar + DFT {y [n]}
DFT { x[n] + y [n]} = DFT {x[n]}
l
ta
Digi doni a 13
an 20
lo Pr
Pao

4.2

41

DFT of x[n] = [n],

x[n] CN
N1

[n] e j

X [k] =

2
nk
N

ing
i
cess Vetterl
= 1 l Pro
na
rtin
l Sig nd Ma
ta
Digi doni a 13 1
an 20
lo Pr
o
n=0

Pa
0

0
0

4.2

15

15
42

DFT of x[n] = 1,

x[n] CN
N1

e j N nk

X [k] =

ing
i
cess Vetterl
r
= N[k]o
al P
tin
Sign nd Mar
l
ta
Digi doni a 1316
an 20
lo Pr
o
n=0

Pa
0

0
0

4.2

15

15
43

DFT of x[n] = 3 cos(2/16 n),

x[n] C64
2
n
16

x[n] = 3 cos

sing

2 ces
tter
= 3 cosal Pro n tin Ve
4
Sign 64 ar

tal i d M
Digi =d3 ne jan +3 j
4n
o
e
ran 2 201
P
aolo
3
2
64

4.2

li

2
4n
64

e j 64 4n + e j 64 60n
2
3
= (w4 [n] + w60 [n])
2
=

44

DFT of x[n] = 3 cos(2/16 n),

x[n] C64
2
n
16

x[n] = 3 cos

sing

2 ces
tter
= 3 cosal Pro n tin Ve
4
Sign 64 ar

tal i d M
Digi =d3 ne jan +3 j
4n
o
e
ran 2 201
P
aolo
3
2
64

4.2

li

2
4n
64

e j 64 4n + e j 64 60n
2
3
= (w4 [n] + w60 [n])
2
=

44

DFT of x[n] = 3 cos(2/16 n),

x[n] C64
2
n
16

x[n] = 3 cos

sing

2 ces
tter
= 3 cosal Pro n tin Ve
4
Sign 64 ar

tal i d M
Digi =d3 ne jan +3 j
4n
o
e
ran 2 201
P
aolo
3
2
64

4.2

li

2
4n
64

e j 64 4n + e j 64 60n
2
3
= (w4 [n] + w60 [n])
2
=

44

DFT of x[n] = 3 cos(2/16 n),

x[n] C64
2
n
16

x[n] = 3 cos

sing

2 ces
tter
= 3 cosal Pro n tin Ve
4
Sign 64 ar

tal i d M
Digi =d3 ne jan +3 j
4n
o
e
ran 2 201
P
aolo
3
2
64

4.2

li

2
4n
64

e j 64 4n + e j 64 60n
2
3
= (w4 [n] + w60 [n])
2
=

44

DFT of x[n] = 3 cos(2/16 n),

x[n] C64
2
n
16

x[n] = 3 cos

sing

2 ces
tter
= 3 cosal Pro n tin Ve
4
Sign 64 ar

tal i d M
Digi =d3 ne jan +3 j
4n
o
e
ran 2 201
P
aolo
3
2
64

4.2

li

2
4n
64

e j 64 4n + e j 64 60n
2
3
= (w4 [n] + w60 [n])
2
=

44

DFT of x[n] = 3 cos(2/16 n),

x[n] C64

ing
i
cess Vetterl
ro in
3
= wk [n], g(w4 l P + war[n])
na[n] 60 t
l Si2 nd M
ta
3
3
Digi wkdoni4a + 3 wk [n], w60 [n]
= an [n], w [n] 01
2 2
2r

olo P

X [k] = wk [n], x[n]

Pa

4.2

96 for k = 4, 60
0 otherwise

45

DFT of x[n] = 3 cos(2/16 n),

x[n] C64

ing
i
cess Vetterl
ro in
3
= wk [n], g(w4 l P + war[n])
na[n] 60 t
l Si2 nd M
ta
3
3
Digi wkdoni4a + 3 wk [n], w60 [n]
= an [n], w [n] 01
2 2
2r

olo P

X [k] = wk [n], x[n]

Pa

4.2

96 for k = 4, 60
0 otherwise

45

DFT of x[n] = 3 cos(2/16 n),

x[n] C64

ing
i
cess Vetterl
ro in
3
= wk [n], g(w4 l P + war[n])
na[n] 60 t
l Si2 nd M
ta
3
3
Digi wkdoni4a + 3 wk [n], w60 [n]
= an [n], w [n] 01
2 2
2r

olo P

X [k] = wk [n], x[n]

Pa

4.2

96 for k = 4, 60
0 otherwise

45

DFT of x[n] = 3 cos(2/16 n),

x[n] C64

ing
i
cess Vetterl
ro in
3
= wk [n], g(w4 l P + war[n])
na[n] 60 t
l Si2 nd M
ta
3
3
Digi wkdoni4a + 3 wk [n], w60 [n]
= an [n], w [n] 01
2 2
2r

olo P

X [k] = wk [n], x[n]

Pa

4.2

96 for k = 4, 60
0 otherwise

45

DFT of x[n] = 3 cos(2/16 n),

x[n] C64

Re

100

ing
i
cess Vetterl 64
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

32

100

Im

100

0
0

32

64

100
4.2

46

x[n] C64

DFT of x[n] = 3 cos(2/16 n + /3),

n+
16
3

ing
i
cess Vetterl
ro in
a
2 l P t
= 3 cos ign 4 n + ar
S 64 nd M3
l
ta
Digi doni a 13
3
an j 4n e j20 j 4n e j
=
lo Pr 2 e + e
ao
x[n] = 3 cos

4.2

2
64

2
64

3
= (e j 3 w4 [n] + e j 3 w60 [n])
2

47

x[n] C64

DFT of x[n] = 3 cos(2/16 n + /3),

n+
16
3

ing
i
cess Vetterl
ro in
a
2 l P t
= 3 cos ign 4 n + ar
S 64 nd M3
l
ta
Digi doni a 13
3
an j 4n e j20 j 4n e j
=
lo Pr 2 e + e
ao
x[n] = 3 cos

4.2

2
64

2
64

3
= (e j 3 w4 [n] + e j 3 w60 [n])
2

47

x[n] C64

DFT of x[n] = 3 cos(2/16 n + /3),

n+
16
3

ing
i
cess Vetterl
ro in
a
2 l P t
= 3 cos ign 4 n + ar
S 64 nd M3
l
ta
Digi doni a 13
3
an j 4n e j20 j 4n e j
=
lo Pr 2 e + e
ao
x[n] = 3 cos

4.2

2
64

2
64

3
= (e j 3 w4 [n] + e j 3 w60 [n])
2

47

x[n] C64

DFT of x[n] = 3 cos(2/16 n + /3),

n+
16
3

ing
i
cess Vetterl
ro in
a
2 l P t
= 3 cos ign 4 n + ar
S 64 nd M3
l
ta
Digi doni a 13
3
an j 4n e j20 j 4n e j
=
lo Pr 2 e + e
ao
x[n] = 3 cos

4.2

2
64

2
64

3
= (e j 3 w4 [n] + e j 3 w60 [n])
2

47

x[n] C64

DFT of x[n] = 3 cos(2/16 n + /3),

ing
i
cess Vetterl
X [k] = wk [n], x[n]
ro in
lP
t
a
Sign j nd Mar = 4
l 96e
for k
ta i
Digi =do96ea 1for k = 60
n j 3
an
20
lo Pr 0
o
otherwise

Pa

4.2

48

DFT of x[n] = 3 cos(2/16 n + /3),

x[n] C64

Re

100

ing
i
cess Vetterl 64
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

32

100

Im

100

0
0

32

64

100
4.2

49

DFT of x[n] = 3 cos(2/16 n + /3),

x[n] C64

|X [k]|

100

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

X [k]

0
0

32

64

4.2

50

DFT of x[n] = 3 cos(2/10 n),

x[n] C64

ing
i
cess Vetterl
ro in
P 2 t
2 ignal
S 6 < 2d<Mar7
tal
10
64
Digi 64 oni an 13
d
an 20
lo Pr
o

Pa

4.2

51

DFT of x[n] = 3 cos(2/10 n),

x[n] C64

|X [k]|

100

50

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

X [k]

0
4.2

32

64
52

DFT of length-M step in CN

M1

x[n] =

n = 0, 1, . .g, N 1
.

[n h],

rli
ssin
roce in Vette
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
h=0

P
0
0

4.2

32

64

53

DFT of length-M step in CN

N1

x[n]e j

X [k] =

2
nk
N

M1

e j

2
nk
N

n=0ng
i
i
cess Vetterl
j kMPro
1 e nal
rtin
=
i j
lSeg knd Ma
a
t1
Digi doni a 13
an
e 0
P e j kM j 2kM e j kM
lo =r
o
n=0

2
N

2
N

Pa

e j N k e j N k e j N k

4.2

sin N Mk j (M1)k
e N

sin N k

54

DFT of length-M step in CN

N1

x[n]e j

X [k] =

2
nk
N

M1

e j

2
nk
N

n=0ng
i
i
cess Vetterl
j kMPro
1 e nal
rtin
=
i j
lSeg knd Ma
a
t1
Digi doni a 13
an
e 0
P e j kM j 2kM e j kM
lo =r
o
n=0

2
N

2
N

Pa

e j N k e j N k e j N k

4.2

sin N Mk j (M1)k
e N

sin N k

54

DFT of length-M step in CN

N1

x[n]e j

X [k] =

2
nk
N

M1

e j

2
nk
N

n=0ng
i
i
cess Vetterl
j kMPro
1 e nal
rtin
=
i j
lSeg knd Ma
a
t1
Digi doni a 13
an
e 0
P e j kM j 2kM e j kM
lo =r
o
n=0

2
N

2
N

Pa

e j N k e j N k e j N k

4.2

sin N Mk j (M1)k
e N

sin N k

54

DFT of length-M step in CN

N1

x[n]e j

X [k] =

2
nk
N

M1

e j

2
nk
N

n=0ng
i
i
cess Vetterl
j kMPro
1 e nal
rtin
=
i j
lSeg knd Ma
a
t1
Digi doni a 13
an
e 0
P e j kM j 2kM e j kM
lo =r
o
n=0

2
N

2
N

Pa

e j N k e j N k e j N k

4.2

sin N Mk j (M1)k
e N

sin N k

54

DFT of length-M step in CN

X [k] =

4.2

sin N Mk j (M1)k
g
i
e eN sin

c s Vetterl
sin N kPro

nal
rtin
S sum
ltheig nd Ma
ta
X [0] = M, from the denition iof
Dig doni a 13
n
X [k] = 0 if Mk/N integer o Pa < N) 20
l (0 r k
Pao
X [k] linear in k (except at sign changes for the real part)

55

DFT of length-M step in CN

X [k] =

4.2

sin N Mk j (M1)k
g
i
e eN sin

c s Vetterl
sin N kPro

nal
rtin
S sum
ltheig nd Ma
ta
X [0] = M, from the denition iof
Dig doni a 13
n
X [k] = 0 if Mk/N integer o Pa < N) 20
l (0 r k
Pao
X [k] linear in k (except at sign changes for the real part)

55

DFT of length-M step in CN

X [k] =

4.2

sin N Mk j (M1)k
g
i
e eN sin

c s Vetterl
sin N kPro

nal
rtin
S sum
ltheig nd Ma
ta
X [0] = M, from the denition iof
Dig doni a 13
n
X [k] = 0 if Mk/N integer o Pa < N) 20
l (0 r k
Pao
X [k] linear in k (except at sign changes for the real part)

55

|X [k]|

DFT of length-4 step in C64

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

X [k]

2
3
4
0
4.2

32

64
56

Wrapping the phase

sing
nV
al P
most numerical packages return wrapped phase arti
Sign nd M
l
gita multiples
Diadding oni a of32
phase can be unwrapped by
d
1
Pran 20
lo
Pao

Often the phase is displayed wrapped over the [,es interval.er


ett
roc ]

4.2

li

57

|X [k]|

DFT of length-4 step in C64 (phase wrapped)

ing
i
cess Vetterl
ro in
al P
t
Sign 32d Mar
l
64
ta
Digi doni an 13
an 20
lo Pr
ao

X [k]

0
4.2

32

64
58

Interpreting a DFT plot

|X [k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

N/2

N 1

frequencies < (counterclockwise)

4.2

59

Interpreting a DFT plot

|X [k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

N/2

N 1

frequencies > (clockwise)

4.2

59

Interpreting a DFT plot

|X [k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

low frequencies (slow)

4.2

N/2

N 1

low frequencies (slow)

59

Interpreting a DFT plot

|X [k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

N 1

N/2

low frequencies (slow)

low frequencies (slow)

high frequencies (fast)


4.2

59

Interpreting a DFT plot

|X [k]|

x[n] = 1 (slowest signal)


66
55
44
33
22
11
0
0

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
32

64

only lowest frequency

4.2

60

Interpreting a DFT plot

|X [k]|

x[n] = cos n = (1)n (fastest signal)


66
55
44
33
22
11
0
0

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
32

64

only highest frequency

4.2

61

Energy distribution

Recall Parseval (Module 3.3): x

|k |2

ing
i
cess Vetterl
ro in 2
P |Xt
a1
|x[n]|2n= l
Sig ndk=0ar [k]|
N M
n=0al
t
Digi doni a 13
an 20
lo Pr
ao
N1

N1

square magnitude of k-th DFT coecient


proportional to signals energy at frequency = (2/N)k

4.2

62

Energy distribution

Recall Parseval (Module 3.3): x

|k |2

ing
i
cess Vetterl
ro in 2
P |Xt
a1
|x[n]|2n= l
Sig ndk=0ar [k]|
N M
n=0al
t
Digi doni a 13
an 20
lo Pr
ao
N1

N1

square magnitude of k-th DFT coecient


proportional to signals energy at frequency = (2/N)k

4.2

62

Energy distribution

Recall Parseval (Module 3.3): x

|k |2

ing
i
cess Vetterl
ro in 2
P |Xt
a1
|x[n]|2n= l
Sig ndk=0ar [k]|
N M
n=0al
t
Digi doni a 13
an 20
lo Pr
ao
N1

N1

square magnitude of k-th DFT coecient


proportional to signals energy at frequency = (2/N)k

4.2

62

Interpreting a DFT plot

|X [k]|

x[n] = 3 cos(2/16 n) (sinusoid)


96
80
64
48
32
16
0
0

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
32

64

energy concentrated on single frequency


(counterclockwise and clockwise combine to give real signal)
4.2

63

Interpreting a DFT plot

x[n] = u[n] u[n 4] (step)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

5
|X [k]|

4
3
2
1
0
0

32

64

energy mostly in low frequencies

4.2

64

DFT of real signals


For real signals the DFT is symmetric in magnitude:
|X [k]| = |X [N k]| for k = 1, 2, . . . , N/2
g

rli
ssin
roce in Vette
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

N = 5, odd length
4.2

N = 6, even length
65

DFT of real signals


For real signals, magnitude plots need only N/2 + 1 points

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

N = 5, odd length

4.2

N = 6, even length

66

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.2


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Module 4.3: DFT in practice
Digi doni a 13
n
0
Pra
2
aolo

Overview:

4.3

ing
i
cess Vetterl
ro in
al P
t
Labeling the DFT axes
Sign nd Mar
l
ta
DFT synthesis
Digi doni a 13
an 20
o Pr
Inherent periodicities and lDFS
Pao
DFT analysis examples

67

Mystery signal revisited

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

2
0

4.3

170

340

510

680

850

1020

68

Mystery signal revisited

Re

500

ing
i
cess Vetterl
ro in
al P
t
Sign 512d Mar 768
256 l
1024
ta
Digi doni an 13
an 20
lo Pr
ao

Im

0
580
464
348
232
116
0

0
4.3

256

512

768

1024
69

Mystery signal revisited


500
Re

k = 64

ing
i
cess Vetterl
ro in
al P
t
Sign 512d Mar 768
256 l
1024
ta
Digi doni an 13
an 20
lo Pr
ao

Im

0
580
464
348
232
116
0

0
4.3

k = 960

256

512

768

1024
69

Mystery signal revisited

g
rli
c
ro in Vette
al P
t
Sign nd Mar
l
ta
a
Digi doni with 13
n
a
20
=
lo Pr 0
ao
+ [n]
x[n] = cos(n + )essin

4.3

2
64
1024

70

Mystery signal revisited

g
rli
c
ro in Vette
al P
t
Sign nd Mar
l
ta
a
Digi doni with 13
n
a
20
=
lo Pr 0
ao
+ [n]
x[n] = cos(n + )essin

4.3

2
64
1024

70

Mystery signal unveiled

ing
i
cess Vetterl
ro in
al P
t
Sign 512d Mar 768
256 l
1024
ta
Digi doni an 13
an 20
lo Pr
ao

P
0

0
4.3

256

512

768

1024
71

Solar spots

4.3

ing
i
cess Vetterl
ro spots
sunspot number: s = 10 # of clustersal # of tin
+P
Sign nd Mar
l
data set from 1749 to 2003,igita months
D 2904 doni a 13
an 20
lo Pr
Pao

72

Solar spots

4.3

ing
i
cess Vetterl
ro spots
sunspot number: s = 10 # of clustersal # of tin
+P
Sign nd Mar
l
data set from 1749 to 2003,igita months
D 2904 doni a 13
an 20
lo Pr
Pao

72

Solar spots

200

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

100

P
0
1736

4.3

1778

1820

1862

1904

1946

1988

73

Solar spots

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.3

10

20

30

40

50

60

70

80

90

100

74

Solar spots

ing
i
cess Vetterl
ro in
al P
t
main peak at k = 22 ar
Sign nd M
l
ta
Digi doni a 13
an 20
lo Pr
o

Pa
0

4.3

10

20

30

40

50

60

70

80

90

100

74

Solar spots

4.3

ing
i
cess Vetterl
ro in
al P
t
22 cycles over 2904 months
Sign nd Mar
l
ta
Digi doni a 13
2904
frequency:
11 years ran
0
22
2
lo P
Pao

DFT main peak for k = 22

75

Solar spots

4.3

ing
i
cess Vetterl
ro in
al P
t
22 cycles over 2904 months
Sign nd Mar
l
ta
Digi doni a 13
2904
frequency:
11 years ran
0
22
2
lo P
Pao

DFT main peak for k = 22

75

Solar spots

4.3

ing
i
cess Vetterl
ro in
al P
t
22 cycles over 2904 months
Sign nd Mar
l
ta
Digi doni a 13
2904
frequency:
11 years ran
0
22
2
lo P
Pao

DFT main peak for k = 22

75

Daily temperature (2920 days)

30
25
20
15
10
5
0
5

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.3

500

1000

1500
days

2000

2500

3000

76

Daily temperature: DFT

12

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

500

rst few hundred DFT coecients


(in magnitude and normalized by the length of the temperature vector)
4.3

77

Daily temperature: DFT


avg temp 12.3 C

12

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

500

rst few hundred DFT coecients


(in magnitude and normalized by the length of the temperature vector)
4.3

77

Daily temperature: DFT


avg temp 12.3 C

12

ing
i
cess Vetterl
ro in
P
peak at k = 8 nal
t
Sig nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

500

rst few hundred DFT coecients


(in magnitude and normalized by the length of the temperature vector)
4.3

77

Daily temperature

4.3

average value (0-th DFT coecient): 12.3 C

ing
i
cess Vetterl
DFT main peak for k = 8, value
ro in
al P
t
Sign nd Mar
l
8 cycles over 2920 days
ta
Digi doni a 13
2920
n
0
frequency:
= 365 daysPra
2
lo
8
Pao

6.4 C

temperature excursion: 12.3 C 12.8 C

78

Labeling the frequency axis

If we know the clock of the system Ts (see Module 2.2)

4.3

ing
i
cess Vetterl
o
rfull revolution
sinusoid at = needs two samples to al P
n do a
rtin
l Sig nd Ma
ta
time between samples: Ts Digi s seconds
= 1/F oni a
d
013
Pran 2Ts seconds
2
real-world period for fastest sinusoid:
lo
Pao
fastest (positive) frequency is =

real-world frequency for fastest sinusoid: Fs /2 Hz

79

Labeling the frequency axis

If we know the clock of the system Ts (see Module 2.2)

4.3

ing
i
cess Vetterl
o
rfull revolution
sinusoid at = needs two samples to al P
n do a
rtin
l Sig nd Ma
ta
time between samples: Ts Digi s seconds
= 1/F oni a
d
013
Pran 2Ts seconds
2
real-world period for fastest sinusoid:
lo
Pao
fastest (positive) frequency is =

real-world frequency for fastest sinusoid: Fs /2 Hz

79

Labeling the frequency axis

If we know the clock of the system Ts (see Module 2.2)

4.3

ing
i
cess Vetterl
o
rfull revolution
sinusoid at = needs two samples to al P
n do a
rtin
l Sig nd Ma
ta
time between samples: Ts Digi s seconds
= 1/F oni a
d
013
Pran 2Ts seconds
2
real-world period for fastest sinusoid:
lo
Pao
fastest (positive) frequency is =

real-world frequency for fastest sinusoid: Fs /2 Hz

79

Labeling the frequency axis

If we know the clock of the system Ts (see Module 2.2)

4.3

ing
i
cess Vetterl
o
rfull revolution
sinusoid at = needs two samples to al P
n do a
rtin
l Sig nd Ma
ta
time between samples: Ts Digi s seconds
= 1/F oni a
d
013
Pran 2Ts seconds
2
real-world period for fastest sinusoid:
lo
Pao
fastest (positive) frequency is =

real-world frequency for fastest sinusoid: Fs /2 Hz

79

Labeling the frequency axis

If we know the clock of the system Ts (see Module 2.2)

4.3

ing
i
cess Vetterl
o
rfull revolution
sinusoid at = needs two samples to al P
n do a
rtin
l Sig nd Ma
ta
time between samples: Ts Digi s seconds
= 1/F oni a
d
013
Pran 2Ts seconds
2
real-world period for fastest sinusoid:
lo
Pao
fastest (positive) frequency is =

real-world frequency for fastest sinusoid: Fs /2 Hz

79

Example: train whistle

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

Play
4.3

80

Example: train whistle


32768 samples (the clock of the system Fs = 8000Hz)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.3

16384

81

Example: train whistle


32768 samples (the clock of the system Fs = 8000Hz)

ing
i
cess Vetterl
ro in
al P
t
k = 2020
Sign nd Mar
l
a
igita
k D 3020 doni
=
n
013
Pra
2
lo
Pao
k = 2400

4.3

16384

81

Example: train whistle


the clock of the system Fs = 8000Hz

ing
i
cess Vetterl
ro in
al P
t
494Hz
Sign nd Mar
l
ta
Digi doni a 13
739Hz
an 20
lo Pr
Pao
559Hz

4.3

4KHz

82

Example: train whistle

if we look up the frequencies:

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

B minor chord

4.3

83

Synthesis: the sinusoidal generator


2

wk [n] = e j( N kn+k )
Im

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar w [0]
l
ta
Re
Digi doni a 13
ran 20
P
aolo
k

4.3

84

Synthesis: the sinusoidal generator


2

wk [n] = e j( N kn+k )
Im

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Re
Digi doni a 13
ran 20
P
aolo
wk [1]

2 k
N

4.3

84

Synthesis: the sinusoidal generator


2

wk [n] = e j( N kn+k )
Im
wk [2]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Re
Digi doni a 13
ran 20
P
aolo
2 k
N

4.3

84

Synthesis: the sinusoidal generator


2

wk [n] = e j( N kn+k )
Im

ing
i
cess Vetterl
ro in
al P
t
w [3]
Sign nd Mar
l
ta
Re
Digi doni a 13
ran 20
P
aolo
k

2 k
N

4.3

84

Synthesis: the sinusoidal generator


2

wk [n] = e j( N kn+k )
Im

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Re
Digi doni a 13
ran 20
P
aolo
2 k
N

4.3

wk [4]

84

Synthesis: the sinusoidal generator

ing
i
cess Vetterl
ro in
P
Sigknal Mart j( kn+ )
Ak
Ak e
k
ital ni and
Dig do
13
Pran 20
lo
Pao
2
N

4.3

85

DFT synthesis formula

A0
0

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar +
l2
ta
x[n]
Digi doni a 13
n
0
. . a
2
lo. Pr
ao

A1
1
A2
2

AN2
N2

N2

AN1
N1
4.3

N1

86

Initializing the machine

ing
i
cess Vetterl
ro in
Ak =al P
|X [k]|/N t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr k = X [k]
o

Pa

4.3

87

Example
x = [1 2 3 4 3 2 1]T
5

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4
3
2

1
0
0

4.3

88

Example

Ak

4
5
6

0.0919
0.0440
0.7213

1.7952
-0.8976
2.6928

ing
i
cess Vetterl
ro in
lP
0 2.2857 0.0000
igna Mart
S0.7213nd -2.6928
tal
1
Digi 2 doni a 13
0.0440 0.8976
Pra3n 0.091920-1.7952

aolo

4.3

89

Example
k=0

Ak e

j( 2 kn+k )
N

Ak e j( N kn+k )

Re
2
1
0
1
2

Im
2
1
0
1
2

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
3
2

1
0
4.3

1
90

Example
k=1

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

Example
k=2

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

Example
k=3

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

Example
k=4

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

Example
k=5

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

Example
k=6

Re
1

Ak e j( N kn+k )

Ak e j( N kn+k )

Im
1

ing
i
cess Ve0 terl
ro in t
al P
t
Sign nd Mar
l
1
1
ta
Digi doni a 13
Pran 20
1
4 olo
Pa
0

3
2

1
0
4.3

1
90

The machine before DSP

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

tide-predicting machine (originally invented by Lord Kelvin)


4.3

91

Running the machine too long...

ing
i
cess Vetterl
ro in
nal P x[n] t
Sig+ N] d Mar
=
tal x[n
Digi doni an 13
output signal 20
an is N-periodic!
lo Pr
o

Pa

4.3

92

Inherent periodicities in the DFT


the synthesis formula:
1
x[n] =
N

N1

X [k] e j

2
nk
N

n = 0, g . . . , N 1
1,

rli
ssin
roce in Vette
l P in the
t
produces an N-point a
Sign signalMar time domain
l
d
ta
Digi doni an 13
an 20
lo Pr the analysis formula:
Pao
k=0

N1

x[n] e j

X [k] =
n=0

2
nk
N

k = 0, 1, . . . , N 1

produces N-point signal in the frequency domain


4.3

93

Inherent periodicities in the DFT


the synthesis formula:
1
x[n] =
N

N1

X [k] e j

2
nk
N

n
gZ
ssin tterli
oce n Ve
al Pr in rthe time domain
produces an N-periodic signal a ti
Sign
ital ni and M
Dig do
13
n
Prathe analysis 0
2 formula:
lo
Pao
N1

x[n] e j

X [k] =
n=0

k=0

2
nk
N

k = 0, 1, . . . , N 1

produces N-point signal in the frequency domain


4.3

93

Inherent periodicities in the DFT


the synthesis formula:
1
x[n] =
N

N1

X [k] e j

2
nk
N

n
gZ
ssin tterli
oce n Ve
al Pr in rthe time domain
produces an N-periodic signal a ti
Sign
ital ni and M
Dig do
13
n
Prathe analysis 0
2 formula:
lo
Pao
,

k=0

N1

x[n] e j

X [k] =
n=0

2
nk
N

k Z

produces N-periodic signal in the frequency domain


4.3

93

Discrete Fourier Series (DFS)

ing
i
cess Vetterl
ro in
lP
t
igna N-periodic
Sonto and Mar sequence of Fourier coecients
l
the DFS maps an N-periodic signal
ta
Digi doni an 13
the inverse DFS maps an N-periodic sequence of Fourier coecients a set onto an
an 20
lo Pr
N-periodic signal
Pao
DFS = DFT with periodicity explicit

4.3

the DFS of an N-periodic signal is mathematically equivalent to the DFT of one period

94

Finite-length time shifts revisited

The DFS helps us understand how to dene time shifts for nite-length signals.

ing
i
cess Vetterl
ro in
For an N- periodic sequence x [n]:

lP
t
g a
SiN n nd Mar
x [n M] is well-dened for all M l

ta
Digi doni a 13
0
a (easy derivation)
DFS { [n M]} = e j Mk X [k] n
x
2
lo Pr
Pao

2
N

IDFS

4.3

X [k] = x [n M]

95

Finite-length time shifts revisited

The DFS helps us understand how to dene time shifts for nite-length signals.

ing
i
cess Vetterl
ro in
For an N- periodic sequence x [n]:

lP
t
g a
SiN n nd Mar
x [n M] is well-dened for all M l

ta
Digi doni a 13
0
a (easy derivation)
DFS { [n M]} = e j Mk X [k] n
x
2
lo Pr
Pao

2
N

IDFS

4.3

X [k] = x [n M]

95

Finite-length time shifts revisited

The DFS helps us understand how to dene time shifts for nite-length signals.

ing
i
cess Vetterl
ro in
For an N- periodic sequence x [n]:

lP
t
g a
SiN n nd Mar
x [n M] is well-dened for all M l

ta
Digi doni a 13
0
a (easy derivation)
DFS { [n M]} = e j Mk X [k] n
x
2
lo Pr
Pao

2
N

IDFS

4.3

X [k] = x [n M]

95

Finite-length time shifts revisited

The DFS helps us understand how to dene time shifts for nite-length signals.

ing
i
cess Vetterl
ro in
For an N- periodic sequence x [n]:

lP
t
g a
SiN n nd Mar
x [n M] is well-dened for all M l

ta
Digi doni a 13
0
a (easy derivation)
DFS { [n M]} = e j Mk X [k] n
x
2
lo Pr
Pao
j Mk

2
N

IDFS e

4.3

2
N

X [k] = x [n M]

95

Finite-length time shifts revisited

The DFS helps us understand how to dene time shifts for nite-length signals.

ing
i
cess Vetterl
ro in
lP
t
x [n M] is well-dened for all M igna

S N nd Mar
l
g ta
Di i (easy i a 13
DFS {[n M]} = e j Mk X [k] ndon derivation)
x
0
a
2
lo Pr
o
Pa
IDFS e j Mk X [k] = x [n M]

For an N- periodic sequence x [n]:

2
N

2
N

delay factor
4.3

95

Finite-length time shifts revisited

For an N-point signal x[n] :

4.3

ing
i
cess Vetterl
ro in
lP

build x [n] = x[n mod N] X [k]S= Xa

ign [k] d Mart


tal i n
Digi e jonMka [k]13 x [n M] = x[(n M)
j Mk
IDFT e
X [k] = IDFS nd
X 0 =
Pra
2
lo
Pao
x[n M] is not well-dened
2
N

2
N

mod N]

shifts for nite-length signals are naturally circular (see Module 2.1)

96

Finite-length time shifts revisited

For an N-point signal x[n] :

4.3

ing
i
cess Vetterl
ro in
lP

build x [n] = x[n mod N] X [k]S= Xa

ign [k] d Mart


tal i n
Digi e jonMka [k]13 x [n M] = x[(n M)
j Mk
IDFT e
X [k] = IDFS nd
X 0 =
Pra
2
lo
Pao
x[n M] is not well-dened
2
N

2
N

mod N]

shifts for nite-length signals are naturally circular (see Module 2.1)

96

Finite-length time shifts revisited

For an N-point signal x[n] :

4.3

ing
i
cess Vetterl
ro in
lP

build x [n] = x[n mod N] X [k]S= Xa

ign [k] d Mart


tal i n
Digi e jonMka [k]13 x [n M] = x[(n M)
j Mk
IDFT e
X [k] = IDFS nd
X 0 =
Pra
2
lo
Pao
x[n M] is not well-dened
2
N

2
N

mod N]

shifts for nite-length signals are naturally circular (see Module 2.1)

96

Finite-length time shifts revisited

For an N-point signal x[n] :

4.3

ing
i
cess Vetterl
ro in
lP

build x [n] = x[n mod N] X [k]S= Xa

ign [k] d Mart


tal i n
Digi e jonMka [k]13 x [n M] = x[(n M)
j Mk
IDFT e
X [k] = IDFS nd
X 0 =
Pra
2
lo
Pao
x[n M] is not well-dened
2
N

2
N

mod N]

shifts for nite-length signals are naturally circular (see Module 2.1)

96

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.3


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Module
Digi doni a 13 4.4: To each its own: DFT, DFS, DTFT
n
0
a
2
lo Pr
ao

Overview:

4.4

ing
i
cess Vetterl
ro in
Karplus-Strong revisited Part I: the DFSal P
n
rt
l Sig nd Ma
t
Karplus-Strong revisited PartgII: a DTFT
Di i the oni a 13
d
Pran 20
lo
Pao

97

Periodic sequences: a bridge to innite-length signals

4.4

ing
i
cess Vetterl
ro in
N-periodic sequence: N degrees of freedomP
nal
rt
l Sig nd Ma
t
DFS: only N Fourier coecientsacapturea the information
Digi doni all 13
an 20
lo Pr
Pao

98

Karplus-Strong revisited

x[n]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
z
Digi doni a M13
ran 20
P
aolo

y [n]

y [n] = y [n M] + x[n]

4.4

99

Karplus-Strong revisited

4.4

choose a signal x [n] that is nonzero only for 0 ns<ing

sM

rli
roce in Vette
al P
= 1 (for now)
t
Sign nd Mar
l
ita
a
y [n] = x [0], x [1], .D.igx [M doni x [0], x13 . . . , x [M 1], x [0], x [1], . . .

. ,

n 1], 20 [1],
ra

lo P
Pao

100

Karplus-Strong revisited

choose a signal x [n] that is nonzero only for 0 ns<ing

sM

rli
roce in Vette
al P
= 1 (for now)
t
Sign nd Mar
l
ita
a
y [n] = x [0], x [1], .D.igx [M doni x [0], x13 . . . , x [M 1], x [0], x [1], . . .

. ,

n 1], 20 [1],
ra

lo P
Pao
st
...
nd
1

4.4

period

period

100

Example: 32-tap sawtooth wave

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 16 13
an 20
lo Pr
ao

32

P
1

4.4

101

Example: DFT of 32-tap sawtooth wave

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

10

P
0
0

4.4

16

32

102

What if we take the DFT of two periods?

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0

4.4

16

32

48

64

103

Example: 64-point DFT of two periods

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

20
15
10

5
0
0

4.4

16

32

48

64

104

DFT of two periods: intuition

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.4

16

32

48

64

105

DFT of two periods: intuition

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

k=0

P
0

4.4

16

32

48

64

105

DFT of two periods: intuition

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

k=1

P
0

4.4

16

32

48

64

105

DFT of two periods: intuition

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

k=2

P
0

4.4

16

32

48

64

105

DFT of two periods: intuition

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

k=3

P
0

4.4

16

32

48

64

105

DFT of L periods

LM1

y [n]e j LM nk

XL [k] =

k = 0, 1, 2 . . . , LM 1

ing
i
cess Vetterl
ro (n+pM)k
P
=
y [n i+ nal j artin
S g pM]ed M
t l
p=0 n=0a
Digi doni an 13
L1 M1 n
0
a
2
lo Pr y [n]e j nk e j pk
a
P= o n=0
p=0
n=0

L1 M1

2
LM

2
LM

=
4.4

L1

e j
p=0

2
pk
L

M1

2
L

x [n] e j LM nk

n=0

106

DFT of L periods

LM1

y [n]e j LM nk

XL [k] =

k = 0, 1, 2 . . . , LM 1

ing
i
cess Vetterl
ro (n+pM)k
P
=
y [n i+ nal j artin
S g pM]ed M
t l
p=0 n=0a
Digi doni an 13
L1 M1 n
0
a
2
lo Pr y [n]e j nk e j pk
a
P= o n=0
p=0
n=0

L1 M1

2
LM

2
LM

=
4.4

L1

e j
p=0

2
pk
L

M1

2
L

x [n] e j LM nk

n=0

106

DFT of L periods

LM1

y [n]e j LM nk

XL [k] =

k = 0, 1, 2 . . . , LM 1

ing
i
cess Vetterl
ro (n+pM)k
P
=
y [n i+ nal j artin
S g pM]ed M
t l
p=0 n=0a
Digi doni an 13
L1 M1 n
0
a
2
lo Pr y [n]e j nk e j pk
a
P= o n=0
p=0
n=0

L1 M1

2
LM

2
LM

=
4.4

L1

e j
p=0

2
pk
L

M1

2
L

x [n] e j LM nk

n=0

106

DFT of L periods

LM1

y [n]e j LM nk

XL [k] =

k = 0, 1, 2 . . . , LM 1

ing
i
cess Vetterl
ro (n+pM)k
P
=
y [n i+ nal j artin
S g pM]ed M
t l
p=0 n=0a
Digi doni an 13
L1 M1 n
0
a
2
lo Pr y [n]e j nk e j pk
a
P= o n=0
p=0
n=0

L1 M1

2
LM

2
LM

=
4.4

L1

e j
p=0

2
pk
L

M1

2
L

x [n] e j LM nk

n=0

106

Weve seen this before

ing
i
cess Vetterl
ro in
L1
L if k art
nal P Mmultiple of L
e j apkSig
=
l
t
a d
p=0 ig
D i doni 0 n otherwise
an 2 13
Prorthogonality0
l
(remembero
proof for the DFT basis)
Pao the
2
L

4.4

107

DFT of L periods

ing
i
cess Vetterl
ro in
P

L X [k/L]al if k =art 2L, 3L, . . .


Sign nd M 0, L,
XL [k] = al
t
Digi 0 doni a otherwise
13
Pran 20
lo
Pao

4.4

108

DFT and DFS

4.4

ng
i
essi contained
csignal is etterl in the DFT
again, all the spectral information for a periodic
ro in V
al P
t
coecients of a single period
Sign nd Mar
l
igita
ia
to stress the periodicity ofD underlying signal, we use the term DFS
the ndon
013
Pra
2
lo
Pao

109

DFT and DFS

4.4

ng
i
essi contained
csignal is etterl in the DFT
again, all the spectral information for a periodic
ro in V
al P
t
coecients of a single period
Sign nd Mar
l
igita
ia
to stress the periodicity ofD underlying signal, we use the term DFS
the ndon
013
Pra
2
lo
Pao

109

The situation so far

ing
i
cess Vetterl
ro in
N-point nite-length: DFT
al P
t
Sign nd Mar
l
ta
N-point periodic: DFS
Digi doni a 13
an 20
innite length: ?
lo Pr
Pao

Fourier representation for signal classes:

4.4

110

The situation so far

ing
i
cess Vetterl
ro in
N-point nite-length: DFT
al P
t
Sign nd Mar
l
ta
N-point periodic: DFS
Digi doni a 13
an 20
innite length: ?
lo Pr
Pao

Fourier representation for signal classes:

4.4

110

The situation so far

ing
i
cess Vetterl
ro in
N-point nite-length: DFT
al P
t
Sign nd Mar
l
ta
N-point periodic: DFS
Digi doni a 13
an 20
innite length: ?
lo Pr
Pao

Fourier representation for signal classes:

4.4

110

Karplus-Strong revisited, part 2

generated signal is innite-length but not periodic:ssin


e

4.4

consider now < 1

what is a good spectral representation?

g
rli
c
ro in Vette
lP
g a
y [n] = x [0], x [1], . . . , x [M 1], Six [0], [1], .a. , [M 1], 2 x [0], 2 x [1], . . .

n x M . rt x

l
igita oni and 3
D
d
1
Pran 20
lo
Pao

111

Karplus-Strong revisited, part 2

generated signal is innite-length but not periodic:ssin


e

4.4

consider now < 1

what is a good spectral representation?

g
rli
c
ro in Vette
lP
g a
y [n] = x [0], x [1], . . . , x [M 1], Six [0], [1], .a. , [M 1], 2 x [0], 2 x [1], . . .

n x M . rt x

l
igita oni and 3
D
nd
01
st period Pra
...
2 2nd period
1
lo
Pao

111

Karplus-Strong revisited, part 2

generated signal is innite-length but not periodic:ssin


e

4.4

consider now < 1

what is a good spectral representation?

g
rli
c
ro in Vette
lP
g a
y [n] = x [0], x [1], . . . , x [M 1], Six [0], [1], .a. , [M 1], 2 x [0], 2 x [1], . . .

n x M . rt x

l
igita oni and 3
D
nd
01
st period Pra
...
2 2nd period
1
lo
Pao

111

DFT of increasingly long signals

4.4

Start with the DFT. What happens when N ? ing

rli
ss
roce in Vette
(2/N)k becomes denser in [0, 2]... al P
n
rt
l Sig nd Ma
In the limit (2/N)k : igita
D
ni a jn
ndox[n] e2013 R
Pra n
aolo
P

112

DFT of increasingly long signals

4.4

Start with the DFT. What happens when N ? ing

rli
ss
roce in Vette
(2/N)k becomes denser in [0, 2]... al P
n
rt
l Sig nd Ma
In the limit (2/N)k : igita
D
ni a jn
ndox[n] e2013 R
Pra n
aolo
P

112

DFT of increasingly long signals

4.4

Start with the DFT. What happens when N ? ing

rli
ss
roce in Vette
(2/N)k becomes denser in [0, 2]... al P
n
rt
l Sig nd Ma
In the limit (2/N)k : igita
D
ni a jn
ndox[n] e2013 R
Pra n
aolo
P

112

Discrete-Time Fourier Transform (DTFT)


Formal denition:

x[n] 2 (Z)

dene the function of R

ing
i
cess Vetterl
ro in
P
nal x[n] t
Sig= nd Mar e jn
F
tal () n=
Digi doni a 13
an 20
lo Pr
inversion (when F () exists):
Pao
x[n] =

4.4

1
2

F ()e jn d ,

nZ

113

Discrete-Time Fourier Transform (DTFT)


Formal denition:

x[n] 2 (Z)

dene the function of R

ing
i
cess Vetterl
ro in
P
nal x[n] t
Sig= nd Mar e jn
F
tal () n=
Digi doni a 13
an 20
lo Pr
inversion (when F () exists):
Pao
x[n] =

4.4

1
2

F ()e jn d ,

nZ

113

Discrete-Time Fourier Transform (DTFT)


Formal denition:

x[n] 2 (Z)

dene the function of R

ing
i
cess Vetterl
ro in
P
nal x[n] t
Sig= nd Mar e jn
F
tal () n=
Digi doni a 13
an 20
lo Pr
inversion (when F () exists):
Pao
x[n] =

4.4

1
2

F ()e jn d ,

nZ

113

DTFT periodicity and notation

4.4

ing
i
cess Vetterl
to stress periodicity (and for other reasons)Prowill write
we
nal
rtin

l Sig nd Ma
ta
Digi X (e jni= 13 e jn
x[n]
) a
ndo n=
20
ra

lo P
Pao
j

F () is 2-periodic

by convention, X (e ) is represented over [, ]

114

DTFT periodicity and notation

4.4

ing
i
cess Vetterl
to stress periodicity (and for other reasons)Prowill write
we
nal
rtin

l Sig nd Ma
ta
Digi X (e jni= 13 e jn
x[n]
) a
ndo n=
20
ra

lo P
Pao
j

F () is 2-periodic

by convention, X (e ) is represented over [, ]

114

DTFT periodicity and notation

4.4

ing
i
cess Vetterl
to stress periodicity (and for other reasons)Prowill write
we
nal
rtin

l Sig nd Ma
ta
Digi X (e jni= 13 e jn
x[n]
) a
ndo n=
20
ra

lo P
Pao
j

F () is 2-periodic

by convention, X (e ) is represented over [, ]

114

x[n] = n u[n],

|| < 1

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr 10 15 20 25 30 35
ao 5

0
5

4.4

40

115

DTFT of x[n] = n u[n],

|| < 1

X (e j ) =

x[n] e jn

ing
i
cess Vetterl
ro in
l P
g a e jnt
Si=n nn Mar
tal
a d
Digi donin=0 13

an 20
lo Pr
=
( e j )n
ao
n=

n=0

4.4

1
1 e j

116

DTFT of x[n] = n u[n],

|| < 1

X (e j ) =

x[n] e jn

ing
i
cess Vetterl
ro in
l P
g a e jnt
Si=n nn Mar
tal
a d
Digi donin=0 13

an 20
lo Pr
( e j )n
=
ao
n=

n=0

4.4

1
1 e j

116

DTFT of x[n] = n u[n],

|| < 1

X (e j ) =

x[n] e jn

ing
i
cess Vetterl
ro in
l P
g a e jnt
Si=n nn Mar
tal
a d
Digi donin=0 13

an 20
lo Pr
=
( e j )n
ao
n=

n=0

4.4

1
1 e j

116

DTFT of x[n] = n u[n],

|| < 1

X (e j ) =

x[n] e jn

ing
i
cess Vetterl
ro in
l P
g a e jnt
Si=n nn Mar
tal
a d
Digi donin=0 13

an 20
lo Pr
=
( e j )n
ao
n=

n=0

4.4

1
1 e j

116

DTFT of x[n] = n u[n],

|| < 1

ing
i
cess Vetterl
ro in
al P 1art
2 n
|X (e jl)|Sig
=
ta
nd 2M
Digi doni1a+ 1 2 cos
3
Pran 20
olo

Pa

4.4

117

Plotting the DTFT

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

/2

/2

positive frequencies (counterclockwise)

4.4

118

Plotting the DTFT

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

/2

/2

negative frequencies (clockwise)

4.4

118

Plotting the DTFT

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

/2

/2

low frequencies (slow)

4.4

118

Plotting the DTFT

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

/2

/2

low frequencies (slow)


high frequencies (fast)
high frequencies (fast)

4.4

118

DTFT of x[n] = n u[n],

|| < 1

|X (e j )|

10

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

/2

/2

= 0.9
4.4

119

Remember the periodicity!

ing
i
cess Vetterl
ro in
nal P Mart
5 l Sig
d
ta
Digi doni an 13
0
an
20
lo Pr 0

ao
10

4.4

120

Remember the periodicity!

ing
i
cess Vetterl
ro in
al P
t
5
Sign nd Mar
l
ta
Digi doni a 13
0
Pran 020
2lo

2
Pao
10

4.4

121

Remember the periodicity!

10
5
0
3

4.4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
Pran 020
2lo

2
Pao

122

Remember the periodicity!

10
5
0
4

4.4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
Pran 020
2lo

2
Pao

123

KS revisited, part 2: 32-tap sawtooth wave


x[n] = 2n/(M 1) 1,

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
16
ao

0
0

n = 0, 1, . . . , M 1

32

4.4

124

KS revisited, part 2: decay = 0.9


y [n] = n/M x [n mod M] u[n]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
1
0

4.4

166

332

498

664

830

996

125

DTFT of KS signal

Y (e ) =

y [n] e jn

ing
i
cess Vetterl
ro in
M1 l P
na M e rt
= l Sig p x [n] aj(pM+n)
ta n=0 d
Digi p=0 ni an 13
do
Pran 20 M1
olo
p jMp
jn
n=

Pa

p=0

x [n]e

n=0

= A(e jM )X (e j )

4.4

126

DTFT of KS signal

Y (e ) =

y [n] e jn

ing
i
cess Vetterl
ro in
M1 l P
na M e rt
= l Sig p x [n] aj(pM+n)
ta n=0 d
Digi p=0 ni an 13
do
Pran 20 M1
olo
p jMp
jn
n=

Pa

p=0

x [n]e

n=0

= A(e jM )X (e j )

4.4

126

DTFT of KS signal

Y (e ) =

y [n] e jn

ing
i
cess Vetterl
ro in
M1 l P
na M e rt
= l Sig p x [n] aj(pM+n)
ta n=0 d
Digi p=0 ni an 13
do
Pran 20 M1
olo
p jMp
jn
n=

Pa

p=0

x [n]e

n=0

= A(e jM )X (e j )

4.4

126

DTFT of KS signal

Y (e ) =

y [n] e jn

ing
i
cess Vetterl
ro in
M1 l P
na M e rt
= l Sig p x [n] aj(pM+n)
ta n=0 d
Digi p=0 ni an 13
do
Pran 20 M1
olo
p jMp
jn
n=

Pa

p=0

x [n]e

n=0

= A(e jM )X (e j )

4.4

126

We know the rst term


A(e j ) = DTFT {n u[n]} =

|A(e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

1
1e j

/2

/2

127

We know the rst term


A(e jM ) rescales the frequency axis: periodicity!

|A(e jM )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

M=1

/2

/2

128

We know the rst term


A(e jM ) rescales the frequency axis: periodicity!

|A(e jM )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

M=2

/2

/2

128

We know the rst term


A(e jM ) rescales the frequency axis: periodicity!

|A(e jM )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

M=3

/2

/2

128

We know the rst term


A(e jM ) rescales the frequency axis: periodicity!

|A(e jM )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

M = 12

/2

/2

128

Second term is left as an exercise

X (e j ) = e j

1 e j(M1)
1 e j(M+1)

(1 e j )2
(1 e j )2

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

M +1
M 1

/2

/2

129

DTFT of KS with decay

Y (e j ) = A(e jM )X (e j )

|Y (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.4

/2

/2

130

Recap of spectral representations:

4.4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
periodic sequences: DFS
l
ta
Digi doni a 13
innite sequences: DTFT
an 20
lo Pr
Pao
nite-length signals: DFT

131

Recap of spectral representations:

4.4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
periodic sequences: DFS
l
ta
Digi doni a 13
innite sequences: DTFT
an 20
lo Pr
Pao
nite-length signals: DFT

131

Recap of spectral representations:

4.4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
periodic sequences: DFS
l
ta
Digi doni a 13
innite sequences: DTFT
an 20
lo Pr
Pao
nite-length signals: DFT

131

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.4


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a Module 4.5: DTFT: intuition and properties
13
Pran 20
aolo

Overview:

4.5

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Properties
l
ta
Digi doni a 13
DTFT as basis expansion
an 20
lo Pr
Pao
Existence

132

Discrete-Time Fourier Transform

g
i
ssin
cee jnVetterl
X (e ) =
o
rx[n] in
al P
t
n=
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
o
j

4.5

when does it exist?

is it a change of basis?
Pa

133

Discrete-Time Fourier Transform

g
i
ssin
cee jnVetterl
X (e ) =
o
rx[n] in
al P
t
n=
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
o
j

4.5

when does it exist?

is it a change of basis?
Pa

133

Existence easy for absolutely summable sequences

|X (e j )| = |

x[n] e jn |

ing
i
cess Vetterl
ro in
P
l
g a Ma et
Sin nd |x[n] r jn |
l
ta
a
Digi donin= 13
n
0
a
2
lo Pr
o

Pa

n=

n=

|x[n]|

<

4.5

134

Existence easy for absolutely summable sequences

|X (e j )| = |

x[n] e jn |

ing
i
cess Vetterl
ro in
P
l
g a Ma et
Sin nd |x[n] r jn |
l
ta
a
Digi donin= 13
n
0
a
2
lo Pr
o

Pa

n=

n=

|x[n]|

<

4.5

134

Existence easy for absolutely summable sequences

|X (e j )| = |

x[n] e jn |

ing
i
cess Vetterl
ro in
P
l
g a Ma et
Sin nd |x[n] r jn |
l
ta
a
Digi donin= 13
n
0
a
2
lo Pr
o

Pa

n=

n=

|x[n]|

<

4.5

134

Existence easy for absolutely summable sequences

|X (e j )| = |

x[n] e jn |

ing
i
cess Vetterl
ro in
P
l
g a Ma et
Sin nd |x[n] r jn |
l
ta
a
Digi donin= 13
n
0
a
2
lo Pr
o

Pa

n=

n=

|x[n]|

<

4.5

134

Inversion easy for absolutely summable sequences

1
2

ing er i
t
cess x[k]eetjkl
P o ti
alr k=n V
ar
Sign
ital ni nd M e j(nk)
Dig do a x[k]3
=
d
1
Pran k= 0 2
2
olo

X (e j ) e jn d =

Pa

4.5

1
2

e jn d

= x[n]

135

Inversion easy for absolutely summable sequences

1
2

ing er i
t
cess x[k]eetjkl
P o ti
alr k=n V
ar
Sign
ital ni nd M e j(nk)
Dig do a x[k]3
=
d
1
Pran k= 0 2
2
olo

X (e j ) e jn d =

Pa

4.5

1
2

e jn d

= x[n]

135

Inversion easy for absolutely summable sequences

1
2

ing er i
t
cess x[k]eetjkl
P o ti
alr k=n V
ar
Sign
ital ni nd M e j(nk)
Dig do a x[k]3
=
d
1
Pran k= 0 2
2
olo

X (e j ) e jn d =

Pa

4.5

1
2

e jn d

= x[n]

135

A formal change of basis

formally DTFT is an inner product in C :

sing
li
al P
n=
tin V
Sign nd Mar
tal
basis is an innite, uncountable basis: a jn }3
Digi doni {e 1 R
an 20
l Pr
something breaks down:owe start with sequences but the transform is a function
Pao

4.5

s
x[n] e jn ocee jn , x[n] ter
et
r=

we used absolutely summable sequences but DTFT exists for all square-summable
sequences (proof is rather technical)

136

A formal change of basis

formally DTFT is an inner product in C :

sing
li
al P
n=
tin V
Sign nd Mar
tal
basis is an innite, uncountable basis: a jn }3
Digi doni {e 1 R
an 20
l Pr
something breaks down:owe start with sequences but the transform is a function
Pao

4.5

s
x[n] e jn ocee jn , x[n] ter
et
r=

we used absolutely summable sequences but DTFT exists for all square-summable
sequences (proof is rather technical)

136

A formal change of basis

formally DTFT is an inner product in C :

sing
li
al P
n=
tin V
Sign nd Mar
tal
basis is an innite, uncountable basis: a jn }3
Digi doni {e 1 R
an 20
l Pr
something breaks down:owe start with sequences but the transform is a function
Pao

4.5

s
x[n] e jn ocee jn , x[n] ter
et
r=

we used absolutely summable sequences but DTFT exists for all square-summable
sequences (proof is rather technical)

136

A formal change of basis

formally DTFT is an inner product in C :

sing
li
al P
n=
tin V
Sign nd Mar
tal
basis is an innite, uncountable basis: a jn }3
Digi doni {e 1 R
an 20
l Pr
something breaks down:owe start with sequences but the transform is a function
Pao

4.5

s
x[n] e jn ocee jn , x[n] ter
et
r=

we used absolutely summable sequences but DTFT exists for all square-summable
sequences (proof is rather technical)

136

Review: DFT

CN

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

CN

4.5

137

Review: DFT
X [k] = e j

2
nk
N

, x[n]

CN

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

CN

4.5

137

Review: DFT
X [k] = e j

2
nk
N

, x[n]

CN

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

CN

x[n] = (1/N)

4.5

X [k] e j

2
nk
N

137

Review: DFT
X [k] = e j

2
nk
N

, x[n]

ing
i
cess Vetterl
ro in
al P
t
basis: {e jd M}k
Sign n nk ar
l
ta
Digi doni a 13
an 20
lo Pr
o
2
N

CN

CN

Pa

x[n] = (1/N)

4.5

X [k] e j

2
nk
N

137

Review: DFS
2

X [k] = e j N nk , x [n]

ing
i
cess Vetterl
ro in
al P
t
basis: {e j M}kr
Sign nd nk a
l
ta
Digi doni a 13
an 20
lo Pr
o
2
N

CN

CN

Pa

x [n] = (1/N)

4.5

X [k] e j N nk

138

DTFT
X (e j ) = e jn , x[n]

2 (Z)

ing
i
cess Vetterl
ro in
al P a t
Sign {ed M r
basis: jn }
l
igita oni an 3
D
d
1
Pran 20
lo
ao

L2 ([, ])

x[n] = (1/2)

4.5

X (e j )e jn d

139

DTFT properties

time shift

4.5

linearity

modulation (dual)

j
DTFT{x[n] + y [n]} = X (e ng + Yr(e j )
li
ssi )

Pa

oce
ette
al Pr artin V
Sign
DTFT{x[n and Me jM X (e j )
ital ni M]} =
Dig do
13
Pran j 20
n
j( )
olo
DTFT{e

x[n]} = X (e

140

DTFT properties

time shift

4.5

linearity

modulation (dual)

j
DTFT{x[n] + y [n]} = X (e ng + Yr(e j )
li
ssi )

Pa

oce
ette
al Pr artin V
Sign
DTFT{x[n and Me jM X (e j )
ital ni M]} =
Dig do
13
Pran j 20
n
j( )
olo
DTFT{e

x[n]} = X (e

140

DTFT properties

time shift

4.5

linearity

modulation (dual)

j
DTFT{x[n] + y [n]} = X (e ng + Yr(e j )
li
ssi )

Pa

oce
ette
al Pr artin V
Sign
DTFT{x[n and Me jM X (e j )
ital ni M]} =
Dig do
13
Pran j 20
n
j( )
olo
DTFT{e

x[n]} = X (e

140

DTFT properties

conjugation

i
sing
ces(e j ) tterl
ro in Ve
DTFT{x[n]} = X
al P
t
Sign nd Mar
l
ta
Digi DTFT{x [n]} 13X (e j )
ni a
ndo 20 =
Pra

aolo

time reversal

4.5

141

DTFT properties

conjugation

i
sing
ces(e j ) tterl
ro in Ve
DTFT{x[n]} = X
al P
t
Sign nd Mar
l
ta
Digi DTFT{x [n]} 13X (e j )
ni a
ndo 20 =
Pra

aolo

time reversal

4.5

141

Some particular cases:

if x[n] is symmetric, the DTFT is symmetric:


x[n] = x[n] X (e j ) = g (e j )
X

rli
ssin
roce in Vette
if x[n] is real, the DTFT is Hermitian-symmetric: t
al P a
Sign nd Mj r j
al
x[n] t ni a
(e
Digi= xd[n] X13 ) = X (e )
n o 20
Pra

real,
special case: if x[n] is aolothe magnitude of the DTFT is symmetric:
P
x[n] R = |X (e j )| = |X (e j )|

4.5

more special case: if x[n] is real and symmetric, X (e j ) is also real and symmetric

142

Some particular cases:

if x[n] is symmetric, the DTFT is symmetric:


x[n] = x[n] X (e j ) = g (e j )
X

rli
ssin
roce in Vette
if x[n] is real, the DTFT is Hermitian-symmetric: t
al P a
Sign nd Mj r j
al
x[n] t ni a
(e
Digi= xd[n] X13 ) = X (e )
n o 20
Pra

real,
special case: if x[n] is aolothe magnitude of the DTFT is symmetric:
P
x[n] R = |X (e j )| = |X (e j )|

4.5

more special case: if x[n] is real and symmetric, X (e j ) is also real and symmetric

142

Some particular cases:

if x[n] is symmetric, the DTFT is symmetric:


x[n] = x[n] X (e j ) = g (e j )
X

rli
ssin
roce in Vette
if x[n] is real, the DTFT is Hermitian-symmetric: t
al P a
Sign nd Mj r j
al
x[n] t ni a
(e
Digi= xd[n] X13 ) = X (e )
n o 20
Pra

real,
special case: if x[n] is aolothe magnitude of the DTFT is symmetric:
P
x[n] R = |X (e j )| = |X (e j )|

4.5

more special case: if x[n] is real and symmetric, X (e j ) is also real and symmetric

142

Some particular cases:

if x[n] is symmetric, the DTFT is symmetric:


x[n] = x[n] X (e j ) = g (e j )
X

rli
ssin
roce in Vette
if x[n] is real, the DTFT is Hermitian-symmetric: t
al P a
Sign nd Mj r j
al
x[n] t ni a
(e
Digi= xd[n] X13 ) = X (e )
n o 20
Pra

real,
special case: if x[n] is aolothe magnitude of the DTFT is symmetric:
P
x[n] R = |X (e j )| = |X (e j )|

4.5

more special case: if x[n] is real and symmetric, X (e j ) is also real and symmetric

142

DTFT as basis expansion

Some things are OK:

4.5

DFT {[n]} = 1
DTFT {[n]} =

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
a
igita
e jn , [n]D= 1 doni
n
013
Pra
2
lo
Pao

143

DTFT as basis expansion

Some things are OK:

4.5

DFT {[n]} = 1
DTFT {[n]} =

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
a
igita
e jn , [n]D= 1 doni
n
013
Pra
2
lo
Pao

143

DTFT as basis expansion

ing
i
cess Vetterl
ro in
nal P Mart
DTFT {1} =
e jn =? al Sig
n=
d
t
Digi doni an 13
an 20
lo Pr
Pao
problem: too many interesting sequences are not square summable!

Some things arent:

4.5

DFT {1} = N[k]

144

DTFT as basis expansion

ing
i
cess Vetterl
ro in
nal P Mart
DTFT {1} =
e jn =? al Sig
n=
d
t
Digi doni an 13
an 20
lo Pr
Pao
problem: too many interesting sequences are not square summable!

Some things arent:

4.5

DFT {1} = N[k]

144

DTFT as basis expansion

ing
i
cess Vetterl
ro in
nal P Mart
DTFT {1} =
e jn =? al Sig
n=
d
t
Digi doni an 13
an 20
lo Pr
Pao
problem: too many interesting sequences are not square summable!

Some things arent:

4.5

DFT {1} = N[k]

144

The Dirac delta functional

Dened by the sifting property:


sing

rli
s
roce in Vette
al P art
Sign
tal and M
Digi (t ni s)f (t)dt = f (s)
do
13
Pran 20
aolo for all functions of t R.

4.5

145

Intuition

4.5

ssin
al P
tin
Sign nd Mar
support inversely proportional toak
l
t
Digi doni a 13
constant area
an 20
lo Pr
Pao

rli

family of localizing functions rk (t) with k Noce t Rette


r and V

146

Intuition

4.5

ssin
al P
tin
Sign nd Mar
support inversely proportional toak
l
t
Digi doni a 13
constant area
an 20
lo Pr
Pao

rli

family of localizing functions rk (t) with k Noce t Rette


r and V

146

Intuition

4.5

ssin
al P
tin
Sign nd Mar
support inversely proportional toak
l
t
Digi doni a 13
constant area
an 20
lo Pr
Pao

rli

family of localizing functions rk (t) with k Noce t Rette


r and V

146

Intuition

rect(t) =

1
0

for |t| < 1/2


otherwiseing
ss

rli
roce in Vette
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
Consider the localizing family rk (t)r= k rect(kt):
lo P
Pao
nonzero over [1/2k, 1/2k], i.e. support is 1/k

4.5

area is 1

147

Intuition

rect(t) =

1
0

for |t| < 1/2


otherwiseing
ss

rli
roce in Vette
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
Consider the localizing family rk (t)r= k rect(kt):
lo P
Pao
nonzero over [1/2k, 1/2k], i.e. support is 1/k

4.5

area is 1

147

The family rk (t) = k rect(kt)

40

20

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

k=1
0
1

4.5

148

The family rk (t) = k rect(kt)

40

20

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
1

4.5

k=5

148

The family rk (t) = k rect(kt)

40

20

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a k1315
=
Pran 20
aolo

P
0
1

4.5

148

The family rk (t) = k rect(kt)

40

k = 40

20

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
1

4.5

148

Extracting a point value

By the Mean Value theorem:

ing
i
cessf (t)dt tterl
ro in Ve

al P 1/2kt
ar
Sign =nfd M[1/2k,1/2k]
ital ni a ()|
Dig do
13
Pran 20
aolo

and so:

1/2k

rk (t)f (t)dt = k

lim

4.5

rk (t)f (t)dt = f (0)

149

The Dirac delta functional


The delta functional is a shorthand. Instead of writing

sing terli
et
k l P
a
tin V
Sign nd ar
ital ni awriteM
Dig do we 13
an
20
lo Pr
ao

lim

s
rk (t oce(t)dt
r s)f

(t s)f (t)dt.

as if limk rk (t) = (t),

4.5

150

The pulse train

ing
i
cess Vetterl
ro in
P
l

igna d(art2k)
() =S2
M
l
igita onk= 3
i an
D
d
2 1
Pran delta 0 the space of 2-periodic functions
just a technicality toolo the Dirac in
use
Pa

4.5

151

Graphical representation

4.5

Pa

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an
20
lo Pr 0
2

2
o

152

Now let the show begin!

in jn
()eg d i
cess Vetterl
l Pro in
gna Martjn d
l Si = d ()e
igita oni an 3
D
d
1
Pran e20 |=0
= jn
lo
o

IDTFT () =
2

Pa

4.5

=1

153

Now let the show begin!

in jn
()eg d i
cess Vetterl
l Pro in
gna Martjn d
l Si = d ()e
igita oni an 3
D
d
1
Pran e20 |=0
= jn
lo
o

IDTFT () =
2

Pa

4.5

=1

153

Now let the show begin!

in jn
()eg d i
cess Vetterl
l Pro in
gna Martjn d
l Si = d ()e
igita oni an 3
D
d
1
Pran e20 |=0
= jn
lo
o

IDTFT () =
2

Pa

4.5

=1

153

Now let the show begin!

in jn
()eg d i
cess Vetterl
l Pro in
gna Martjn d
l Si = d ()e
igita oni an 3
D
d
1
Pran e20 |=0
= jn
lo
o

IDTFT () =
2

Pa

4.5

=1

153

In other words

ing
i
cess Vetterl
ro in
al P t
Sign{1}d Mar
l
taDTFT = ()
Digi doni an 13
an 20
lo Pr
o

Pa

4.5

154

Does it make sense?

ing
i
cess Vetterl
ro in
k
al P art
Sign nd Mjn
S
e
talk () =
Digi doni an=k13
an 20
lo Pr
o

Partial DTFT sum:

Pa

4.5

155

Plotting |Sk ()|


k=5
80

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

60
40
20
0

4.5

/2

/2

156

Plotting |Sk ()|


k = 10
80

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

60
40
20
0

4.5

/2

/2

156

Plotting |Sk ()|


k = 15
80

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

60
40
20
0

4.5

/2

/2

156

Plotting |Sk ()|


k = 30
80

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

60
40
20
0

4.5

/2

/2

156

Plotting |Sk ()|


k = 40
80

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

60
40
20
0

4.5

/2

/2

156

Does it make sense?

ing e li
cess localizingrfunctions:
Partial DTFT sums look like a Pro of Vett
l family
gna Martin
l Si () n
igita Skni ad()
D
do
13
Pran 20
lo
Pao

4.5

157

Using the same technique

IDTFT ( 0 ) = e j0 n

So:

4.5

ing
i
cess Vetterl
ro in
al P
t

DTFT {1} = ()
Sign nd Mar
l
igita oni a
j n = ( D

d
DTFT e
13
0)
Pran 20
lo
ao

P
DTFT {cos 0 n} = [( 0 ) + ( + 0 )]/2
0

DTFT {sin 0 n} = j[( 0 ) ( + 0 )]/2

158

Using the same technique

IDTFT ( 0 ) = e j0 n

So:

4.5

ing
i
cess Vetterl
ro in
al P
t

DTFT {1} = ()
Sign nd Mar
l
igita oni a
j n = ( D

d
DTFT e
13
0)
Pran 20
lo
ao

P
DTFT {cos 0 n} = [( 0 ) + ( + 0 )]/2
0

DTFT {sin 0 n} = j[( 0 ) ( + 0 )]/2

158

Using the same technique

IDTFT ( 0 ) = e j0 n

So:

4.5

ing
i
cess Vetterl
ro in
al P
t

DTFT {1} = ()
Sign nd Mar
l
igita oni a
j n = ( D

d
DTFT e
13
0)
Pran 20
lo
ao

P
DTFT {cos 0 n} = [( 0 ) + ( + 0 )]/2
0

DTFT {sin 0 n} = j[( 0 ) ( + 0 )]/2

158

Using the same technique

IDTFT ( 0 ) = e j0 n

So:

4.5

ing
i
cess Vetterl
ro in
al P
t

DTFT {1} = ()
Sign nd Mar
l
igita oni a
j n = ( D

d
DTFT e
13
0)
Pran 20
lo
ao

P
DTFT {cos 0 n} = [( 0 ) + ( + 0 )]/2
0

DTFT {sin 0 n} = j[( 0 ) ( + 0 )]/2

158

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.5


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni a Module 4.6: Relationships between transforms
13
Pran 20
aolo

Overview:

4.6

ing
i
cess Vetterl
ro in
al P
t
DTFT of periodic sequences
Sign nd Mar
l
ta
DTFT of nite-support sequences oni a
Digi d
13
Pran 20
lo
Zero padding
Pao
DFT, DFS, DTFT

159

Transforms

4.6

DFT, DFS: change of basis in CN

ing
i
cess Vetterl
ro in
P
nal signal t
Siganynd Mar
basis vectors are building blocks for
tal
Digi doni a 13
ran 20
DFT: numerical algorithmlo P
(computable)
Pao
DTFT: formal change of basis in 2 (Z)

DTFT: mathematical tool (proofs)

160

Transforms

4.6

DFT, DFS: change of basis in CN

ing
i
cess Vetterl
ro in
P
nal signal t
Siganynd Mar
basis vectors are building blocks for
tal
Digi doni a 13
ran 20
DFT: numerical algorithmlo P
(computable)
Pao
DTFT: formal change of basis in 2 (Z)

DTFT: mathematical tool (proofs)

160

Transforms

4.6

DFT, DFS: change of basis in CN

ing
i
cess Vetterl
ro in
P
nal signal t
Siganynd Mar
basis vectors are building blocks for
tal
Digi doni a 13
ran 20
DFT: numerical algorithmlo P
(computable)
Pao
DTFT: formal change of basis in 2 (Z)

DTFT: mathematical tool (proofs)

160

Transforms

4.6

DFT, DFS: change of basis in CN

ing
i
cess Vetterl
ro in
P
nal signal t
Siganynd Mar
basis vectors are building blocks for
tal
Digi doni a 13
ran 20
DFT: numerical algorithmlo P
(computable)
Pao
DTFT: formal change of basis in 2 (Z)

DTFT: mathematical tool (proofs)

160

Transforms

4.6

DFT, DFS: change of basis in CN

ing
i
cess Vetterl
ro in
P
nal signal t
Siganynd Mar
basis vectors are building blocks for
tal
Digi doni a 13
ran 20
DFT: numerical algorithmlo P
(computable)
Pao
DTFT: formal change of basis in 2 (Z)

DTFT: mathematical tool (proofs)

160

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

Embedding nite-length signals

4.6

N-tap signal x[n]

ing
i
cess Vetterl
ro in
sequence: rt
two ways to embed x[n] into an innite al P
Sign
lmod N] nd Ma
periodic extension: x [n] =gita

Di x[n doni a 13
an
20
loxPr = x[n]0 n < N
nite-support extension: [n]
Pao
0
otherwise
natural spectral representation: DFT X [k]

how does X [k] relate to the DTFT of the embedded signals?

161

DTFT of periodic signals


x [n] = x[n

mod N]

ing
i
cess Vetterl
ro in

X (e j ) =
x [n]el P
a jn
t
Sign nd Mar
l
n=
ta
Digi doni aN1 13
1

P an 20X [k]e j nk e jn
lo = r
N
ao
P
n=
k=0

2
N

4.6

1
N

N1

X [k]
k=0

ej

2
nk
N

e jn

n=

162

DTFT of periodic signals


x [n] = x[n

mod N]

ing
i
cess Vetterl
ro in

X (e j ) =
x [n]el P
a jn
t
Sign nd Mar
l
n=
ta
Digi doni aN1 13
1

P an 20X [k]e j nk e jn
lo = r
N
ao
P
n=
k=0

2
N

4.6

1
N

N1

X [k]
k=0

ej

2
nk
N

e jn

n=

162

DTFT of periodic signals


x [n] = x[n

mod N]

ing
i
cess Vetterl
ro in

X (e j ) =
x [n]el P
a jn
t
Sign nd Mar
l
n=
ta
Digi doni aN1 13
1

P an 20X [k]e j nk e jn
lo = r
N
ao
P
n=
k=0

2
N

4.6

1
N

N1

X [k]
k=0

ej

2
nk
N

e jn

n=

162

Weve seen this before

ing
i
cess Vetterl
ro inj nk
jn P
e j nk egnal= DTFTt e
ar
Si
n= ital
nd M
Dig doni a 13 2
an =0 k)
2 (
lo Pr
N
ao
P

4.6

2
N

2
N

163

DTFT of periodic signals

ing
i
cess Vetterl
ro in
N1 P
l
ig a d Mart
(e j ) =S1 n X [k]( 2 k)
X
l N n
ta
N
ia
Digi donk=0 13
an 20
lo Pr
o

Pa

4.6

164

32-tap sawtooth

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 16 13
an 20
lo Pr
ao

32

P
1

4.6

165

DFT of 32-tap sawtooth

15

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

10

P
0
0

4.6

16

32

166

32-periodic sawtooth

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
96

4.6

64

32

32

64

96

167

DTFT of periodic extension

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

/2

/2
=

4.6

2
N

168

DTFT of nite-support signals

x [n] =

x[n]
0

0n<N
otherwise

g
i
ssin
ceN1 Vetterl

ro in
lP
jn

X (e j ) =
x [n]e jn = t
a
Sign nd Mar x[n]e
l
ta
Digi n= ni a 13 n=0
do N1
N1
Pran 1 20 j nk jn
lo
e
X [k]e
Pao =
N
2
N

n=0

1
=
N

4.6

k=0

N1

N1
k=0

e j( N k)n

X [k]
n=0

169

DTFT of nite-support signals

x [n] =

x[n]
0

0n<N
otherwise

g
i
ssin
ceN1 Vetterl

ro in
lP
jn

X (e j ) =
x [n]e jn = t
a
Sign nd Mar x[n]e
l
ta
Digi n= ni a 13 n=0
do N1
N1
Pran 1 20 j nk jn
lo
e
X [k]e
Pao =
N
2
N

n=0

1
=
N

4.6

k=0

N1

N1
k=0

e j( N k)n

X [k]
n=0

169

DTFT of nite-support signals

x [n] =

x[n]
0

0n<N
otherwise

g
i
ssin
ceN1 Vetterl

ro in
lP
jn

X (e j ) =
x [n]e jn = t
a
Sign nd Mar x[n]e
l
ta
Digi n= ni a 13 n=0
do N1
N1
Pran 1 20 j nk jn
lo
e
X [k]e
Pao =
N
2
N

n=0

1
=
N

4.6

k=0

N1

N1
k=0

e j( N k)n

X [k]
n=0

169

DTFT of nite-support signals

N1

2
ssi 2g
e j( N k)n = R(e j(n k) )
ce N

rli
ro in Vette
n=0
al P
t
Sign nd Mar
l of [n], the interval indicator signal:

where R(e j ) is theita


r
Dig DTFTni a 13
ndo 20
Pra

aolo
P
1 0n<N
[n] =
r

4.6

0 otherwise

170

Interval indicator signal


[n] =
r

1 0n<N
0 otherwise

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.6

N 1

171

DTFT of interval signal

N1

R(e j ) =

e jn

ing
i
cess Vetterl
ro in
lP
1 e jN
=Signa j Mart
tal 1 e d
Digi doji an j 13 j
n
0
ran e 2e e
lo P =
o
n=0

N
2

Pa

N
2

e j 2 e j 2 e j 2

4.6

N
2

sin N j (N1)
2
e 2
sin
2

172

DTFT of interval signal

N1

R(e j ) =

e jn

ing
i
cess Vetterl
ro in
lP
1 e jN
=Signa j Mart
tal 1 e d
Digi doji an j 13 j
n
0
ran e 2e e
lo P =
o
n=0

N
2

Pa

N
2

e j 2 e j 2 e j 2

4.6

N
2

sin N j (N1)
2
e 2
sin
2

172

DTFT of interval signal

N1

R(e j ) =

e jn

ing
i
cess Vetterl
ro in
lP
1 e jN
=Signa j Mart
tal 1 e d
Digi doji an j 13 j
n
0
ran e 2e e
lo P =
o
n=0

N
2

Pa

N
2

e j 2 e j 2 e j 2

4.6

N
2

sin N j (N1)
2
e 2
sin
2

172

DTFT of interval signal

N1

R(e j ) =

e jn

ing
i
cess Vetterl
ro in
lP
1 e jN
=Signa j Mart
tal 1 e d
Digi doji an j 13 j
n
0
ran e 2e e
lo P =
o
n=0

N
2

Pa

N
2

e j 2 e j 2 e j 2

4.6

N
2

sin N j (N1)
2
e 2
sin
2

172

DTFT of interval signal (N = 9)

{R(e j )}

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

173

DTFT of nite-support signals

ing
i
cess Vetterl
ro in
N1 l P
a
t

S n nd Mar 2 k)
X (e j )l =ig X [k](
ta
Digi dok=0a 13 N
ni
n
0
ra
2
lo P
with () = (1/N)R (e j ): smooth interpolation of DFT values.
Pao

4.6

174

32-tap sawtooth

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 16 13
an 20
lo Pr
ao

32

P
1

4.6

175

DFT of 32-tap sawtooth

15

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

10

P
0
0

4.6

16

32

176

Sawtooth: nite support extension

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
96

4.6

64

32

32

64

96

177

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension (sketch)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

178

DTFT of nite support extension

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

179

As a comparison...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.6

/2

/2

180

About zero-padding

ing
i
cess Vetterl
ro numerically
When computingal P DFT rtin
n the a
l Sig nd zeros to obtain nicer plots
one may pad the data vector withM
ta
Digi doni a 13
an 20
lo Pr
Pao

4.6

181

DFT of 32-tap sawtooth

15

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

10

P
0
0

16

32

x = [x0 x1 . . . x31 ]
4.6

182

DFT of 32-tap sawtooth, zero-padded

15

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

10

P
0
0

16

32

48

64

80

96

x = [x0 x1 . . . x31 0 . . . 0]
4.6

183

About zero-padding

M1

N1

x [n]e j M nh =

XM [h] =

x[n]e j M nh

g
i
n=0in
cess Vetterl
ro in
N1
N1l P
i a XN Ma t
S1gn nd [k]e j r nk e j nh
= tal
i
Dign=0 dN ni a 13
k=0
n o
raN1 20
N1
olo P1
j( h k)n
n=0

2
N

Pa

XN [k]

2
M

2
M

2
N

n=0

k=0

= X (e )|= 2 h
j

4.6

184

About zero-padding

M1

N1

x [n]e j M nh =

XM [h] =

x[n]e j M nh

g
i
n=0in
cess Vetterl
ro in
N1
N1l P
i a XN Ma t
S1gn nd [k]e j r nk e j nh
= tal
i
Dign=0 dN ni a 13
k=0
n o
raN1 20
N1
olo P1
j( h k)n
n=0

2
N

Pa

XN [k]

2
M

2
M

2
N

n=0

k=0

= X (e )|= 2 h
j

4.6

184

About zero-padding

M1

N1

x [n]e j M nh =

XM [h] =

x[n]e j M nh

g
i
n=0in
cess Vetterl
ro in
N1
N1l P
i a XN Ma t
S1gn nd [k]e j r nk e j nh
= tal
i
Dign=0 dN ni a 13
k=0
n o
raN1 20
N1
olo P1
j( h k)n
n=0

2
N

Pa

XN [k]

2
M

2
M

2
N

n=0

k=0

= X (e )|= 2 h
j

4.6

184

About zero-padding

M1

N1

x [n]e j M nh =

XM [h] =

x[n]e j M nh

g
i
n=0in
cess Vetterl
ro in
N1
N1l P
i a XN Ma t
S1gn nd [k]e j r nk e j nh
= tal
i
Dign=0 dN ni a 13
k=0
n o
raN1 20
N1
olo P1
j( h k)n
n=0

2
N

Pa

XN [k]

2
M

2
M

2
N

n=0

k=0

= X (e )|= 2 h
j

4.6

184

About zero-padding

4.6

ing
i
cess Vetterl
ro in
zero padding does not add information al P
n
rt
l Sig nd Ma
a
a zero-padded DFT is simplygitsampled DTFT of the nite-support extension
Di a doni a 13
an 20
lo Pr
Pao

185

DFT of 32-tap sawtooth, zero-padded


32-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

16

186

DFT of 32-tap sawtooth, zero-padded


32-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

186

DFT of 32-tap sawtooth, zero-padded


96-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

48

187

DFT of 32-tap sawtooth, zero-padded


96-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

187

DFT of 32-tap sawtooth, zero-padded


200-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

100

188

DFT of 32-tap sawtooth, zero-padded


200-point DFT

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

15

10

0
0

4.6

188

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.6


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Module 4.7: Sinusoidal Modulation
Digi doni a 13
n
0
Pra
2
aolo

Overview:

4.7

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
Sinusoidal modulation
l
ta
Digi doni a 13
Tuning a guitar
an 20
lo Pr
Pao
Lowpass, highpass and bandpass signals

189

Classifying signals in frequency

Three broad categories according to where most of the spectral energy resides:
sing
li

oces
ar
Sign
ital ni and M
Dig do
13
Pran 20
aolo

tter

highpass signals

4.7

e
lowpass signals (also known as baseband Pr
al signals) tin V
bandpass signals

190

Lowpass example

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

/2

/2

191

Highpass example

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

/2

/2

192

Bandpass example

|X (e j )|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

/2

/2

193

Sinusoidal modulation

1 jc n ing 1 jc n
e ssx[n] +tterli x[n]
e
2
roce
Ve 2
P

DTFT {x[n] cos(c n)} = DTFT

al
tin
S 1n (e j( r
l =ig Xnd Ma ) ) + X (e j(+ ) )
ta
Digi do2 i a 13
n
ran 20
lo P
usually x[n] baseband ao
P
c

4.7

c is the carrier frequency

194

Sinusoidal modulation

1 jc n ing 1 jc n
e ssx[n] +tterli x[n]
e
2
roce
Ve 2
P

DTFT {x[n] cos(c n)} = DTFT

al
tin
S 1n (e j( r
l =ig Xnd Ma ) ) + X (e j(+ ) )
ta
Digi do2 i a 13
n
ran 20
lo P
usually x[n] baseband ao
P
c

4.7

c is the carrier frequency

194

Sinusoidal modulation

1 jc n ing 1 jc n
e ssx[n] +tterli x[n]
e
2
roce
Ve 2
P

DTFT {x[n] cos(c n)} = DTFT

al
tin
S 1n (e j( r
l =ig Xnd Ma ) ) + X (e j(+ ) )
ta
Digi do2 i a 13
n
ran 20
lo P
usually x[n] baseband ao
P
c

4.7

c is the carrier frequency

194

Sinusoidal modulation

1 jc n ing 1 jc n
e ssx[n] +tterli x[n]
e
2
roce
Ve 2
P

DTFT {x[n] cos(c n)} = DTFT

al
tin
S 1n (e j( r
l =ig Xnd Ma ) ) + X (e j(+ ) )
ta
Digi do2 i a 13
n
ran 20
lo P
usually x[n] baseband ao
P
c

4.7

c is the carrier frequency

194

Example

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

195

Example

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

195

Example

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

195

Example

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

195

Again, explicitly showing the periodicity of the spectrum

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

196

Again, explicitly showing the periodicity of the spectrum

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

196

Again, explicitly showing the periodicity of the spectrum

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

196

Again, explicitly showing the periodicity of the spectrum

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

196

Careful when the modulation frequency is too large!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

197

Careful when the modulation frequency is too large!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

197

Careful when the modulation frequency is too large!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

197

Careful when the modulation frequency is too large!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

197

Careful when the modulation frequency is too large!

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

198

Sinusoidal modulation: applications

4.7

ing
i
cess Vetterl
ro in
P
t
radio channels are bandpass, in muchgnal frequencies
Si higherd Mar
l
ta
modulation brings the baseband signal inathe transmission band
Digi doni n 13
an 20
lo Pr
demodulation at the receiver brings it back
Pao
voice and music are lowpass signals

199

Sinusoidal demodulation
just multiply the received signal by the carrier again

y [n] = x[n] cos(c n)

Y (e j ) =

1
j(
X (esing c ) ) +rXi (e j(+c ) )
l
2oces
ette
r

al P
tin V
Sign nd Mar
tal
Digi(e j( i))a+ Y 13
j(+ )
DTFT {y [n] 2 cos(c n)} = Y andon
)
20 (e
r
P

lo
Pao = 1 X (e j(2 )) + X (e j() ) + X (e j() ) + X (e j(+2 ))
c

= X (e j() ) +

4.7

1
X (e j(2c ) ) + X (e j(+2c ) )
2

200

Sinusoidal demodulation
just multiply the received signal by the carrier again

y [n] = x[n] cos(c n)

Y (e j ) =

1
j(
X (esing c ) ) +rXi (e j(+c ) )
l
2oces
ette
r

al P
tin V
Sign nd Mar
tal
Digi(e j( i))a+ Y 13
j(+ )
DTFT {y [n] 2 cos(c n)} = Y andon
)
20 (e
r
P

lo
Pao = 1 X (e j(2 )) + X (e j() ) + X (e j() ) + X (e j(+2 ))
c

= X (e j() ) +

4.7

1
X (e j(2c ) ) + X (e j(+2c ) )
2

200

Sinusoidal demodulation
just multiply the received signal by the carrier again

y [n] = x[n] cos(c n)

Y (e j ) =

1
j(
X (esing c ) ) +rXi (e j(+c ) )
l
2oces
ette
r

al P
tin V
Sign nd Mar
tal
Digi(e j( i))a+ Y 13
j(+ )
DTFT {y [n] 2 cos(c n)} = Y andon
)
20 (e
r
P

lo
Pao = 1 X (e j(2 )) + X (e j() ) + X (e j() ) + X (e j(+2 ))
c

= X (e j() ) +

4.7

1
X (e j(2c ) ) + X (e j(+2c ) )
2

200

Sinusoidal demodulation
just multiply the received signal by the carrier again

y [n] = x[n] cos(c n)

Y (e j ) =

1
j(
X (esing c ) ) +rXi (e j(+c ) )
l
2oces
ette
r

al P
tin V
Sign nd Mar
tal
Digi(e j( i))a+ Y 13
j(+ )
DTFT {y [n] 2 cos(c n)} = Y andon
)
20 (e
r
P

lo
Pao = 1 X (e j(2 )) + X (e j() ) + X (e j() ) + X (e j(+2 ))
c

= X (e j() ) +

4.7

1
X (e j(2c ) ) + X (e j(+2c ) )
2

200

Sinusoidal demodulation
just multiply the received signal by the carrier again

y [n] = x[n] cos(c n)

Y (e j ) =

1
j(
X (esing c ) ) +rXi (e j(+c ) )
l
2oces
ette
r

al P
tin V
Sign nd Mar
tal
Digi(e j( i))a+ Y 13
j(+ )
DTFT {y [n] 2 cos(c n)} = Y andon
)
20 (e
r
P

lo
Pao = 1 X (e j(2 )) + X (e j() ) + X (e j() ) + X (e j(+2 ))
c

= X (e j() ) +

4.7

1
X (e j(2c ) ) + X (e j(+2c ) )
2

200

Demodulation in the frequency domain


DTFT {x[n]}

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
4

4.7

201

Demodulation in the frequency domain


DTFT {y [n]} = DTFT {x[n] cos c n}

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
4

4.7

201

Demodulation in the frequency domain


DTFT {y [n] 2 cos c n}

ing
i
cess Vetterl
ro in
al P a t

Sign nd M r
tal
Digi doni a 13
an 20
lo Pr
ao
c

P
4

4.7

201

Demodulation in the frequency domain


DTFT {y [n] 2 cos c n}

ing
i
cess Vetterl
ro in
al P
t

ig
S n nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao
c

P
4

4.7

201

Demodulation in the frequency domain


DTFT {y [n] 2 cos c n}

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
4

4.7

201

Demodulation in the frequency domain


DTFT {y [n] cos c n}

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.7

202

Demodulation in the frequency domain

4.7

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
but we have some spurious high-frequency components
l
ta
Digi doni a 13
in the next Module we will learn n to get 0 of them!
a how 2 rid
lo Pr
Pao
we recovered the baseband signal exactly...

203

Demodulation in the frequency domain

4.7

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
but we have some spurious high-frequency components
l
ta
Digi doni a 13
in the next Module we will learn n to get 0 of them!
a how 2 rid
lo Pr
Pao
we recovered the baseband signal exactly...

203

Demodulation in the frequency domain

4.7

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
but we have some spurious high-frequency components
l
ta
Digi doni a 13
in the next Module we will learn n to get 0 of them!
a how 2 rid
lo Pr
Pao
we recovered the baseband signal exactly...

203

Another application: tuning a guitar

ing
i
cess Vetterl
ro in
reference sinusoid at frequency 0
al P
t
Sign nd Mar
l
tunable sinusoid of frequencygta
Di i doni a 13
n
0
make = 0 by ear lo Pra
2
Pao

Problem (abstraction):

4.7

204

Another application: tuning a guitar

ing
i
cess Vetterl
ro in
reference sinusoid at frequency 0
al P
t
Sign nd Mar
l
tunable sinusoid of frequencygta
Di i doni a 13
n
0
make = 0 by ear lo Pra
2
Pao

Problem (abstraction):

4.7

204

Another application: tuning a guitar

ing
i
cess Vetterl
ro in
reference sinusoid at frequency 0
al P
t
Sign nd Mar
l
tunable sinusoid of frequencygta
Di i doni a 13
n
0
make = 0 by ear lo Pra
2
Pao

Problem (abstraction):

4.7

204

The procedure
1. bring close to 0 (easy)

ing
i
cess Vetterl
trigonometry comes to the rescue:
ro in
nal P Mart
Sign) +ncos(n)
al
x[n]igitcos(0 i a d
D = don
13
Pran 0 + 0 n cos 0 n
2
lo = 2 cos
2
2
Pao

2. when 0 play both sinusoids together


3.

2 cos( n) cos(0 n)

4.7

205

The procedure
1. bring close to 0 (easy)

ing
i
cess Vetterl
trigonometry comes to the rescue:
ro in
nal P Mart
Sign) +ncos(n)
al
x[n]igitcos(0 i a d
D = don
13
Pran 0 + 0 n cos 0 n
2
lo = 2 cos
2
2
Pao

2. when 0 play both sinusoids together


3.

2 cos( n) cos(0 n)

4.7

205

The procedure
1. bring close to 0 (easy)

ing
i
cess Vetterl
trigonometry comes to the rescue:
ro in
nal P Mart
Sign) +ncos(n)
al
x[n]igitcos(0 i a d
D = don
13
Pran 0 + 0 n cos 0 n
2
lo = 2 cos
2
2
Pao

2. when 0 play both sinusoids together


3.

2 cos( n) cos(0 n)

4.7

205

Lets see whats happening

x[n] 2 cos( n) cos(i0 n)


s ng

rli
s
roce in Vette
al P
t
error signal
Sign nd Mar
l
ta
Digi doni a 13
modulation at 0
an 20
lo Pris too low to be heard; modulation brings it up to hearing
when 0 , the error o
Pa signal
range and we perceive it as amplitude oscillations of the carrier frequency

4.7

206

Lets see whats happening

x[n] 2 cos( n) cos(0 n)


g

rli
ssin
roce in Vette
error signal
al P
t
Sign nd Mar
l
ta
modulation at 0
Digi doni a 13
ran 20
when 0 , the error olo P is too low to be heard; modulation brings it up to hearing
signal
Pa
range and we perceive it as amplitude oscillations of the carrier frequency

4.7

206

Lets see whats happening

x[n] 2 cos( n) cos(0 n)


g

rli
ssin
roce in Vette
error signal
al P
t
Sign nd Mar
l
ta
modulation at 0
Digi doni a 13
ran 20
when 0 , the error olo P is too low to be heard; modulation brings it up to hearing
signal
Pa
range and we perceive it as amplitude oscillations of the carrier frequency

4.7

206

Lets see whats happening

x[n] 2 cos( n) cos(0 n)


g

rli
ssin
roce in Vette
error signal
al P
t
Sign nd Mar
l
ta
modulation at 0
Digi doni a 13
ran 20
when 0 , the error olo P is too low to be heard; modulation brings it up to hearing
signal
Pa
range and we perceive it as amplitude oscillations of the carrier frequency

4.7

206

In the time domain...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0
1

2
0

100

0 = 2 0.2,
4.7

200

= 2 0.22,

300

= 2 0.0100
207

In the time domain...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0
1

2
0

100

0 = 2 0.2,
4.7

200

= 2 0.22,

300

= 2 0.0100
207

In the time domain...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0
1

2
0

100

0 = 2 0.2,
4.7

200

= 2 0.21,

300

= 2 0.0050
207

In the time domain...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0
1

2
0

100

0 = 2 0.2,
4.7

200

= 2 0.205,

300

= 2 0.0025
207

In the time domain...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

1
0
1

2
0

100

0 = 2 0.2,
4.7

200

= 2 0.201,

300

= 2 0.0005
207

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

Video demonstration
P

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.7


P

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
ta
Digi doni aModule 4.8: The Short-Time Fourier Transform
13
Pran 20
aolo

Overview:

4.8

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
The STFT and the spectrogramal
t
Digi doni a 13
Time-Frequency tilings
an 20
lo Pr
Pao
Time vs frequency representations

208

Dual-Tone Multi Frequency dialing

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.8

209

DTMF signaling
1209Hz

1336Hz

1477Hz

ing 3
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l 4
770Hz ita
6
Dig doni a 15
3
an 20
lo Pr
ao
697Hz

4.8

852Hz

941Hz

#
210

1-2-3 in time

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

Play

4.8

211

1-2-3 in time (detail)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.8

N/4

212

1-2-3 in frequency (magnitude)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

4.8

N/2

213

The fundamental tradeo

4.8

ing
i
cess Vetterl
ro in
time representation obfuscates frequencyal P
n
rt
l Sig nd Ma
ta
frequency representation obfuscates timea
Digi doni
13
Pran 20
lo
Pao

214

Short-Time Fourier Transform

Idea:

ing
i
cess Vetterl
ro in
al P
t
look at the DFT of each piece:
Sign nd Mar
l
ta
a
Digi doni L1 13
n k] = 2x[m + n] e j nk
0
Xa
lo Pr[m;
n=0
Pao
take small signal pieces of length L

2
L

4.8

215

Short-Time Fourier Transform

Idea:

ing
i
cess Vetterl
ro in
al P
t
look at the DFT of each piece:
Sign nd Mar
l
ta
a
Digi doni L1 13
n k] = 2x[m + n] e j nk
0
Xa
lo Pr[m;
n=0
Pao
take small signal pieces of length L

2
L

4.8

215

Short-Time Fourier Transform (L = 256)

0
4.8

16800

|X [m; k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
i
Digi don=a 13
n m 0 20
Pra

aolo

64

128
216

Short-Time Fourier Transform (L = 256)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi do= i2000 13
n a
nm
0
a
2
lo Pr
o

16800

|X [m; k]|

Pa

0
4.8

64

128
216

Short-Time Fourier Transform (L = 256)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi do= i8000 13
n a
nm
0
a
2
lo Pr
o

16800

|X [m; k]|

Pa

0
4.8

64

128
216

Short-Time Fourier Transform (L = 256)

0
4.8

16800

|X [m; k]|

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi do= 11900 13
ni a
nm
0
a
2
lo Pr
ao

64

128
216

The Spectrogram

Idea:

4.8

ing
i
cess Vetterl
rois large
color-code the magnitude: dark is small,al P
white
tin
Sign nd Mar
l (power in dBs)
ta
use 10 log10 (|X [m; k]|) to see better i a
Digi don
n
013
plot spectral slices one after Pra
another 2
lo
Pao

217

The Spectrogram

Idea:

4.8

ing
i
cess Vetterl
rois large
color-code the magnitude: dark is small,al P
white
tin
Sign nd Mar
l (power in dBs)
ta
use 10 log10 (|X [m; k]|) to see better i a
Digi don
n
013
plot spectral slices one after Pra
another 2
lo
Pao

217

The Spectrogram

Idea:

4.8

ing
i
cess Vetterl
rois large
color-code the magnitude: dark is small,al P
white
tin
Sign nd Mar
l (power in dBs)
ta
use 10 log10 (|X [m; k]|) to see better i a
Digi don
n
013
plot spectral slices one after Pra
another 2
lo
Pao

217

DTMF spectrogram

L/2

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

N
m

4.8

218

Labeling the Spectrogram

If we know the system clock Fs = 1/Ts we can labelssinaxis


the g

4.8

rli
roce in Vette
highest positive frequency: Fs /2 Hz
al P
t
Sign nd Mar
l
frequency resolution: Fs /L Hz ita
Dig doni a 13
n
0
width of time slices: LTs lo Pra
seconds
2
Pao

219

Labeling the Spectrogram

If we know the system clock Fs = 1/Ts we can labelssinaxis


the g

4.8

rli
roce in Vette
highest positive frequency: Fs /2 Hz
al P
t
Sign nd Mar
l
frequency resolution: Fs /L Hz ita
Dig doni a 13
n
0
width of time slices: LTs lo Pra
seconds
2
Pao

219

Labeling the Spectrogram

If we know the system clock Fs = 1/Ts we can labelssinaxis


the g

4.8

rli
roce in Vette
highest positive frequency: Fs /2 Hz
al P
t
Sign nd Mar
l
frequency resolution: Fs /L Hz ita
Dig doni a 13
n
0
width of time slices: LTs lo Pra
seconds
2
Pao

219

DTMF spectrogram (Fs = 8000)

4KHz

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

0
0

2.1s
m

4.8

220

The Spectrogram

ing
i
cess Vetterl
ro in
width of the analysis window?
al P
t
Sign nd Mar
l
ta
position of the windows (overlapping?) i a
Digi don
13
n
Pr the 20
shape of the window (weighing a samples)
lo
Pao

Questions:

4.8

221

The Spectrogram

ing
i
cess Vetterl
ro in
width of the analysis window?
al P
t
Sign nd Mar
l
ta
position of the windows (overlapping?) i a
Digi don
13
n
Pr the 20
shape of the window (weighing a samples)
lo
Pao

Questions:

4.8

221

The Spectrogram

ing
i
cess Vetterl
ro in
width of the analysis window?
al P
t
Sign nd Mar
l
ta
position of the windows (overlapping?) i a
Digi don
13
n
Pr the 20
shape of the window (weighing a samples)
lo
Pao

Questions:

4.8

221

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

Wideband vs Narrowband

Long window: narrowband spectrogram


long window more DFT points more frequency ng
resolution

rli
ssi
et e
roce precisiontin time
long window more things can happen P less
al
tin V
Sign nd Mar
tal
Digi doni a 13
0
Short window: wideband spectrogramn
a
2
lo Pr precise location of transitions
short window manyao
P time slices

4.8

short window fewer DFT points poor frequency resolution

222

DTMF spectrogram (wideband)


N = 16800, L = 32
16

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

525 32
m

4.8

223

DTMF spectrogram
N = 16800, L = 256
128

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

256 66
m

4.8

224

DTMF spectrogram (narrowband)


N = 16800, L = 1024
512

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

1024 16
m

4.8

225

Speech analysis

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0

2.5s

Play

4.8

226

Speech analysis
8ms analysis window (125Hz frequency bins) , 4ms shifts

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4KHz

0
0
4.8

2.5s
227

Speech analysis
32ms analysis window (31Hz frequency bins), 4ms shifts

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4KHz

0
0
4.8

2.5s
227

Time-Frequency tiling
L = 20

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

4.8

10

20

30

40

50

60

228

Time-Frequency tiling
L = 10

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

4.8

10

20

30

40

50

60

228

Time-Frequency tiling
L=4

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
0
0

4.8

10

20

30

40

50

60

228

Food for thought

4.8

ing
i
cess Vetterl
ro in
lP
t
frequency resolution f = 2/L Signa
Mar
l
d
ta
Digi doni an 13
tf = 2
an 20
lo Pr uncertainty principle!
Pao

time resolution t = L

229

Food for thought

4.8

ing
i
cess Vetterl
ro in
lP
t
frequency resolution f = 2/L Signa
Mar
l
d
ta
Digi doni an 13
tf = 2
an 20
lo Pr uncertainty principle!
Pao

time resolution t = L

229

Food for thought

4.8

ing
i
cess Vetterl
ro in
lP
t
frequency resolution f = 2/L Signa
Mar
l
d
ta
Digi doni an 13
tf = 2
an 20
lo Pr uncertainty principle!
Pao

time resolution t = L

229

Food for thought

4.8

ing
i
cess Vetterl
ro in
lP
t
frequency resolution f = 2/L Signa
Mar
l
d
ta
Digi doni an 13
tf = 2
an 20
lo Pr uncertainty principle!
Pao

time resolution t = L

229

Even more food for thought

ing
i
cess Vetterl
ro time-frequency planes
more sophisticated tilingsaofP
n l the rtin
l Sig nd Ma transform
can be obtained with the wavelet
ta
Digi doni a 13
an 20
lo Pr
Pao

4.8

230

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.8


P

Pa

ing
i
cess Vetterl Signal Processing
ro in Digital
al P
t
Sign nd Mar
l
gita 4.9: The FFT,
DiModule oni a 13 History, Factorizations and Algorithms
d
Pran 20
olo

Overview

A bit of history: From Gauss to the fastest FFT in the g


west

Small DFT matrices

4.9

rli
ssin
roce in Vette
al P
t
Sign nd Mar
l
The Cooley-Tukey FFT
ta
Digi doni a 13
Decimation-in-Time FFT forPran 2N 20
length
FFTs
aolo
P
Conclusions: There are FFTs for any length!

231

Fourier had the Fourier transform

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.9

232

But Gauss had the FFT all along ;)

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.9

233

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

History

Gauss computes trigonometric series eciently in 1805

Fourier invents Fourier series in 1807

4.9

ing
i
cess Vetterl
ro in
a P
People start computing Fourier series, andl developrtricks
t
Sign nd Ma
l
ta
Good comes up with an algorithm in 1958
Digi doni a 13
an
20
lo Pr
Cooley and Tukey (re)-discover the fast
Fourier transform algorithm in 1965 for N a
Pao
power of a prime
Winograd combines all methods to give the most ecient FFTs

234

The DFT matrix


2
N

WN = e j

powers of N can be taken modulo N, since W N = 1. ng

(or simply W when N is clear from the context)

rli
ssi
roce in Vette
DFT Matrix of size N by N:
al P
t
Sign nd Mar
l

1 Digita
1
1
ni1a 13 1 3 . . .
1
W 1 ndo W 2 20
W
. . . W N1
a

Pr2

W4
W6
. . . W 2(N1)
W = 1 lo W
ao

...
2

1 W N1 W 2(N1) W 3(N1) . . . W (N1)

4.9

235

The DFT matrix


2
N

WN = e j

powers of N can be taken modulo N, since W N = 1. ng

(or simply W when N is clear from the context)

rli
ssi
roce in Vette
DFT Matrix of size N by N:
al P
t
Sign nd Mar
l

1 Digita
1
1
ni1a 13 1 3 . . .
1
W 1 ndo W 2 20
W
. . . W N1
a

Pr2

W4
W6
. . . W 2(N1)
W = 1 lo W
ao

...
2

1 W N1 W 2(N1) W 3(N1) . . . W (N1)

4.9

235

The DFT matrix


2
N

WN = e j

powers of N can be taken modulo N, since W N = 1. ng

(or simply W when N is clear from the context)

rli
ssi
roce in Vette
DFT Matrix of size N by N:
al P
t
Sign nd Mar
l

1 Digita
1
1
ni1a 13 1 3 . . .
1
W 1 ndo W 2 20
W
. . . W N1
a

Pr2

W4
W6
. . . W 2(N1)
W = 1 lo W
ao

...
2

1 W N1 W 2(N1) W 3(N1) . . . W (N1)

4.9

235

Small DFT matrices: N = 2

ing
i
cess Vetterl
ro in
al 1P 1 t
Si 2 n n 1 r
Wg = d Ma
tal
1
Digi doni a 13
an 20
lo Pr
ao

4.9

236

Small DFT matrices: N = 3

1
1
W3 =
1

4.9

ng
i
e i
c ss 1 etterl
ro in V 1
1
1
1 al P 1
1
t
2 = 1 g W
Si n ndW 2 r= 1 1j 3
Ma
W W tal
2
D gi d1 nW 2 W3
W 2 W i4
o i a 01
1 1+j 3
2
an 2
lo Pr
Pao

1+j 3
2
1j 3
2

237

Small DFT matrices: N = 4

1 1
1 W
W4 =
1 W 2
1 W3

4.9

ing i
cess 1 Vetter1l
1
1
1 1Pro 1
l
2
1 W Wartin 3 1
W 2 W 3 Signa
=
l 1 W 2d M W 2 = 1

W 4 Dig6ta
W i
1
ni an3 3 W
6 W9
do1 W201W 2 W
W
1
an
lo Pr
Pao

1
1
1
j 1 j

1 1 1
j 1 j

238

Small DFT matrices: N = 5

1 1
1 W

W5 = 1 W 2

1 W 3
1 W4

sing

e
1
1
1
es
t1 rli 1 1
roc1 in1VetW 2 W 3 W 4
W 2 W 3 nal4 P 1 t W
W
ar
Sig W 8 = 1 W 2 W 4 W W 3
4
6

W ital
W
d
n M

ia
6
Dig Wd9onW 12 131 W 3 W W 4 W 2

W
n
2
8 ra 12 W 16 0
4 W3 W2
W
1 W
W
lo P W

Pao

4.9

239

Small DFT matrices: N = 6

1
1

1
W6 =
1

1
1

4.9

ng
1
1
1
1
1
1
s1si 1 erli 1
2
3
4
5 oc 1
r e in WettW 2 W 3
W W
W
W
W
al P t V

W 2 W 4 W 6 l S8gnW 10 Mar1 W 2 W 4 1
Wi

3
6
9ita 12 Wnd = 1 W 3
15
W
W
W
1 W3
Dig W 16ni a 20 13
do W 20 1 W 4 W 2 1
12 W

W 4 W 8 WPran
5 W 10olo 15 W 20 25
W
W
1 W5 W4 W3
Pa W

1
W4
W2
1
W4
W2

1
W 5

W 4

W 3

W 2
W

240

Divide et impera - Divide and Conquer (Julius Caesar)


Divide and conquer is a standard attack for developing fast algorithms.
simple
subproblem

ing e i
cess intermediate rl
o
ett
solution
spli
g
al Pr arrtein V
t
me
rge
Sign simple me
subproblem
ital ni and M
ig
D
do
13
Pran 20
olo
t
spli

mer
ge

subproblem

lit
sp

problem
sp
lit

Pa

t
spli

simple
subproblem

rge
me

mer
ge
intermediate
solution

subproblem
spli
t

4.9

solution

simple
subproblem

ge
mer

241

Divide and Conquer for DFT - One step

Recall: computing X = WN x has complexity O(N 2 ).

ing
i
cess Vetterl
Idea:
ro in
al P of 2. t
Take a problem of size N where N Sign
is a power Mar
ital
and
DigN/2doni use complexity N each,
Cut into two problems of size
that
13
4
Pran 20
lo
There might be some complexity to recover the full solution, say N.
Pao
2

4.9

The divide-and-conquer solution has complexity N 2 /2 + N for one step


For N 4 this is better than N 2 !
242

Divide and Conquer for DFT - One step

Recall: computing X = WN x has complexity O(N 2 ).

ing
i
cess Vetterl
Idea:
ro in
al P of 2. t
Take a problem of size N where N Sign
is a power Mar
ital
and
DigN/2doni use complexity N each,
Cut into two problems of size
that
13
4
Pran 20
lo
There might be some complexity to recover the full solution, say N.
Pao
2

4.9

The divide-and-conquer solution has complexity N 2 /2 + N for one step


For N 4 this is better than N 2 !
242

Divide and Conquer for DFT - One step

Recall: computing X = WN x has complexity O(N 2 ).

ing
i
cess Vetterl
Idea:
ro in
al P of 2. t
Take a problem of size N where N Sign
is a power Mar
ital
and
DigN/2doni use complexity N each,
Cut into two problems of size
that
13
4
Pran 20
lo
There might be some complexity to recover the full solution, say N.
Pao
2

4.9

The divide-and-conquer solution has complexity N 2 /2 + N for one step


For N 4 this is better than N 2 !
242

Divide and Conquer for DFT - One step

Recall: computing X = WN x has complexity O(N 2 ).

ing
i
cess Vetterl
Idea:
ro in
al P of 2. t
Take a problem of size N where N Sign
is a power Mar
ital
and
DigN/2doni use complexity N each,
Cut into two problems of size
that
13
4
Pran 20
lo
There might be some complexity to recover the full solution, say N.
Pao
2

4.9

The divide-and-conquer solution has complexity N 2 /2 + N for one step


For N 4 this is better than N 2 !
242

Divide and Conquer for DFT - One step

Recall: computing X = WN x has complexity O(N 2 ).

ing
i
cess Vetterl
Idea:
ro in
al P of 2. t
Take a problem of size N where N Sign
is a power Mar
ital
and
DigN/2doni use complexity N each,
Cut into two problems of size
that
13
4
Pran 20
lo
There might be some complexity to recover the full solution, say N.
Pao
2

4.9

The divide-and-conquer solution has complexity N 2 /2 + N for one step


For N 4 this is better than N 2 !
242

Divide and Conquer for DFT - One step

ing
i
cess Vetterl
ro in
Split DFT input into 2 pieces of size N/2 l P
na
rt
l Sig nd Ma
ta
Digi doni a 13
an 20
lo Pr
Pao

Graphically

4.9

243

Divide and Conquer for DFT - One step

ing
i
cess Vetterl
ro in
Split DFT input into 2 pieces of size N/2 l P
na
rt
l Sig nd Ma
ta
Compute two DFTs of size iN/2
D gi doni a 13
an 20
lo Pr
Pao

Graphically

4.9

243

Divide and Conquer for DFT - One step

ing
i
cess Vetterl
ro in
Split DFT input into 2 pieces of size N/2 l P
na
rt
l Sig nd Ma
ta
Compute two DFTs of size iN/2
D gi doni a 13
an 20
Merge the two results
lo Pr
Pao

Graphically

4.9

243

Divide and Conquer for DFT - One step


X [0]

x[1]

X [1]

DFT-N/2

x[0]
x[2]

P
x[N 4]

x[N 2]

x[N 1]

4.9

DFT-N/2

split

x[5]

X [3]
X [4]
X [5]

merge

x[4]

x[N 3]

X [2]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

x[3]

X [N 4]
X [N 3]
X [N 2]
X [N 1]

244

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps


Divide and conquer can be reapplied!

If it worked once, it will work again (recall, N = 2K )

g
ro in Vet
al Pthe fulltsolution, say N at each step
There might be some complexity to ign
ar
Srecover
ital ni and M
Dig 1 times, until problem of size 2 is obtained
You can do this log2 N 1 = K do
13
Pran 20
This requires order NPcomplexity each time
aolo
Cut the two problems of size N/2 into 4 problems ssin N/4rli
ce of size te

4.9

The divide-and-conquer solution has therefore complexity of order N log2 N


For N 4 this is much better than N 2 !
245

Divide and Conquer for DFT - Multiple steps

ing e i
cess N/4eand rl respectively
tt N/8,
Split DFT input into 2, 4 and 8 pieces of l ProN/2, in V
a sizes art
n
l Sig nd M
Compute 8 DFTs of size N/8ita
Dig doni a 13
n
20
Merge the results successively ra DFTs of size N/4, N/2 and nally N
lo P into
Pao

Graphically

4.9

246

Divide and Conquer for DFT - Multiple steps

ing e i
cess N/4eand rl respectively
tt N/8,
Split DFT input into 2, 4 and 8 pieces of l ProN/2, in V
a sizes art
n
l Sig nd M
Compute 8 DFTs of size N/8ita
Dig doni a 13
n
20
Merge the results successively ra DFTs of size N/4, N/2 and nally N
lo P into
Pao

Graphically

4.9

246

Divide and Conquer for DFT - Multiple steps

ing e i
cess N/4eand rl respectively
tt N/8,
Split DFT input into 2, 4 and 8 pieces of l ProN/2, in V
a sizes art
n
l Sig nd M
Compute 8 DFTs of size N/8ita
Dig doni a 13
n
20
Merge the results successively ra DFTs of size N/4, N/2 and nally N
lo P into
Pao

Graphically

4.9

246

Divide and Conquer for DFT - Multiple steps

split

DFT
N/8

DFT
N/8

DFT
N/8

merge
merge

merge

DFT
N/8

merge

DFT
N/8

x[0]
x[1]
x[2]
x[3]
x[4]
x[5]

merge

DFT
N/8

merge

split

split

split
split

split
4.9

4]
3]
2]
1]

DFT
N/8

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

P
x[N
x[N
x[N
x[N

DFT
N/8

merge

split

x[0]
x[1]
x[2]
x[3]
x[4]
x[5]

x[N
x[N
x[N
x[N

4]
3]
2]
1]
247

Divide and Conquer for DFT- Analysis of DIT-1/8


N1

x[n] W nk ,

X [k] =

k = 0, 1, . . . , N 1, W = e j N

ing
i
cess Vetterl
ro in
P
break input into even and odd indexed nal (so-called decimation in time):
terms
t
Sig nd Mar
l
ta
a
Digi 1 nix[2n] 13 x[2n + 1], n = 0, 1, . . . , N 1
x[n], n = 0, 1, . . . , N ando
0 and
2
2
lo Pr
Pao
n=0

Idea (a good guess is half of the answer!):

break output into rst and second half

X [k], k = 0, 1, . . . , N 1 X [k] and X [k + N/2], k = 0, 1, . . . ,

4.9

N
1
2

248

Divide and Conquer for DFT- Analysis of DIT-1/8


N1

x[n] W nk ,

X [k] =

k = 0, 1, . . . , N 1, W = e j N

ing
i
cess Vetterl
ro in
P
break input into even and odd indexed nal (so-called decimation in time):
terms
t
Sig nd Mar
l
ta
a
Digi 1 nix[2n] 13 x[2n + 1], n = 0, 1, . . . , N 1
x[n], n = 0, 1, . . . , N ando
0 and
2
2
lo Pr
Pao
n=0

Idea (a good guess is half of the answer!):

break output into rst and second half

X [k], k = 0, 1, . . . , N 1 X [k] and X [k + N/2], k = 0, 1, . . . ,

4.9

N
1
2

248

Divide and Conquer for DFT- Analysis of DIT-1/8


N1

x[n] W nk ,

X [k] =

k = 0, 1, . . . , N 1, W = e j N

ing
i
cess Vetterl
ro in
P
break input into even and odd indexed nal (so-called decimation in time):
terms
t
Sig nd Mar
l
ta
a
Digi 1 nix[2n] 13 x[2n + 1], n = 0, 1, . . . , N 1
x[n], n = 0, 1, . . . , N ando
0 and
2
2
lo Pr
Pao
n=0

Idea (a good guess is half of the answer!):

break output into rst and second half

X [k], k = 0, 1, . . . , N 1 X [k] and X [k + N/2], k = 0, 1, . . . ,

4.9

N
1
2

248

Divide and Conquer for DFT- Analysis of DIT-2/8


Consider even and odd inputs separately:
N/21

N/21
2nk

x[2n + 1] W (2n+1)k

ing
i
cess Vetterl
ro in
N/21
N/21 t
al P
r
2nk
Sign + d Max[2n + 1] W 2nk+k
l
=
x[2n] W
ita ni an
Dig do
n=0
n=0
13
Pran 20 N/21
N/21
lo
Pao x[2n] W nk + W k
x[2n + 1] W nk
=

X [k] =

x[2n] W

n=0

n=0

N/2

n=0

N/2

n=0

= Xk + W k X k , k = 0, 1, . . . , N 1

4.9

249

Divide and Conquer for DFT- Analysis of DIT-2/8


Consider even and odd inputs separately:
N/21

N/21
2nk

x[2n + 1] W (2n+1)k

ing
i
cess Vetterl
ro in
N/21
N/21 t
al P
r
2nk
Sign + d Max[2n + 1] W 2nk+k
l
x[2n] W
=
ita ni an
Dig do
n=0
n=0
13
Pran 20 N/21
N/21
lo
Pao x[2n] W nk + W k
=
x[2n + 1] W nk

X [k] =

x[2n] W

n=0

n=0

N/2

n=0

N/2

n=0

= Xk + W k X k , k = 0, 1, . . . , N 1

4.9

249

Divide and Conquer for DFT- Analysis of DIT-2/8


Consider even and odd inputs separately:
N/21

N/21
2nk

x[2n + 1] W (2n+1)k

ing
i
cess Vetterl
ro in
N/21
N/21 t
al P
r
2nk
Sign + d Max[2n + 1] W 2nk+k
l
x[2n] W
=
ita ni an
Dig do
n=0
n=0
13
Pran 20 N/21
N/21
lo
Pao x[2n] W nk + W k
=
x[2n + 1] W nk

X [k] =

x[2n] W

n=0

n=0

N/2

n=0

N/2

n=0

= Xk + W k X k , k = 0, 1, . . . , N 1

4.9

249

Divide and Conquer for DFT- Analysis of DIT-2/8


Consider even and odd inputs separately:
N/21

N/21
2nk

x[2n + 1] W (2n+1)k

ing
i
cess Vetterl
ro in
N/21
N/21 t
al P
r
2nk
Sign + d Max[2n + 1] W 2nk+k
l
x[2n] W
=
ita ni an
Dig do
n=0
n=0
13
Pran 20 N/21
N/21
lo
Pao x[2n] W nk + W k
=
x[2n + 1] W nk

X [k] =

x[2n] W

n=0

n=0

N/2

n=0

N/2

n=0

= Xk + W k X k , k = 0, 1, . . . , N 1

4.9

249

Divide and Conquer for DFT- Analysis of DIT-3/8

ing
i
cess Vetterl
ro in
P
t
2 half-size DFTs, which we call X and al
Sign Xnd Mar
l
ita
D by k
multiplying the second DFTig W doni a
13
Pran 20
lo
adding the result
Pao

In words: We can compute X with:

4.9

250

Divide and Conquer for DFT- Analysis of DIT-3/8

ing
i
cess Vetterl
ro in
P
t
2 half-size DFTs, which we call X and al
Sign Xnd Mar
l
ita
D by k
multiplying the second DFTig W doni a
13
Pran 20
lo
adding the result
Pao

In words: We can compute X with:

4.9

250

Divide and Conquer for DFT- Analysis of DIT-3/8

ing
i
cess Vetterl
ro in
P
t
2 half-size DFTs, which we call X and al
Sign Xnd Mar
l
ita
D by k
multiplying the second DFTig W doni a
13
Pran 20
lo
adding the result
Pao

In words: We can compute X with:

4.9

250

Divide and Conquer for DFT- Analysis of DIT-4/8


Consider now the rst and second half of the outputs separately:

X [k] = Xk + W k X k , k = 0, 1, . . . ,

N
1
2

ing
i
cess Vetterl
ro in
al P art N/21
N/21
Sign ndW k+N/2
n(k+N/2)
l
tan(k+N/2) + M
X [k + N/2] =
x[2n]iWN/2
x[2n + 1] WN/2
Dig doni a 13
n=0
n=0
0
Pran 2N/21
N/21 lo
Pao
=

n=0

nk
x[2n] WN/2 W k

nk
x[2n + 1] WN/2

n=0

= Xk W k X k , k = 0, 1, . . . ,

4.9

N
1
2
251

Divide and Conquer for DFT- Analysis of DIT-4/8


Consider now the rst and second half of the outputs separately:

X [k] = Xk + W k X k , k = 0, 1, . . . ,

N
1
2

ing
i
cess Vetterl
ro in
al P art N/21
N/21
Sign ndW k+N/2
n(k+N/2)
l
tan(k+N/2) + M
X [k + N/2] =
x[2n]iWN/2
x[2n + 1] WN/2
Dig doni a 13
n=0
n=0
0
Pran 2N/21
N/21 lo
Pao
=

n=0

nk
x[2n] WN/2 W k

nk
x[2n + 1] WN/2

n=0

= Xk W k X k , k = 0, 1, . . . ,

4.9

N
1
2
251

Divide and Conquer for DFT- Analysis of DIT-4/8


Consider now the rst and second half of the outputs separately:

X [k] = Xk + W k X k , k = 0, 1, . . . ,

N
1
2

ing
i
cess Vetterl
ro in
al P art N/21
N/21
Sign ndW k+N/2
n(k+N/2)
l
tan(k+N/2) + M
X [k + N/2] =
x[2n]iWN/2
x[2n + 1] WN/2
Dig doni a 13
n=0
n=0
0
Pran 2N/21
N/21 lo
Pao
=

n=0

nk
x[2n] WN/2 W k

nk
x[2n + 1] WN/2

n=0

= Xk W k X k , k = 0, 1, . . . ,

4.9

N
1
2
251

Divide and Conquer for DFT- Analysis of DIT-4/8


Consider now the rst and second half of the outputs separately:

X [k] = Xk + W k X k , k = 0, 1, . . . ,

N
1
2

ing
i
cess Vetterl
ro in
al P art N/21
N/21
Sign ndW k+N/2
n(k+N/2)
l
tan(k+N/2) + M
X [k + N/2] =
x[2n]iWN/2
x[2n + 1] WN/2
Dig doni a 13
n=0
n=0
0
Pran 2N/21
N/21 lo
Pao
=

n=0

nk
x[2n] WN/2 W k

nk
x[2n + 1] WN/2

n=0

= Xk W k X k , k = 0, 1, . . . ,

4.9

N
1
2
251

Divide and Conquer for DFT- Analysis of DIT-5/8

In words: We can compute X [k] and X [k + N/2] with:

4.9

ing
i
cess Vetterl
ro in
Divide input into even and odd indexed samples
al P
t
Sign nd Mar
l
Compute two DFTs of size N/2a
t
Digi doni a 13
Multiplication of the output Pran second 20 by W k using N/2 multiplications
of the
DFT
aolo
P
Combine output with sum/dierence

252

Divide and Conquer for DFT- Analysis of DIT-5/8

In words: We can compute X [k] and X [k + N/2] with:

4.9

ing
i
cess Vetterl
ro in
Divide input into even and odd indexed samples
al P
t
Sign nd Mar
l
Compute two DFTs of size N/2a
t
Digi doni a 13
Multiplication of the output Pran second 20 by W k using N/2 multiplications
of the
DFT
aolo
P
Combine output with sum/dierence

252

Divide and Conquer for DFT- Analysis of DIT-5/8

In words: We can compute X [k] and X [k + N/2] with:

4.9

ing
i
cess Vetterl
ro in
Divide input into even and odd indexed samples
al P
t
Sign nd Mar
l
Compute two DFTs of size N/2a
t
Digi doni a 13
Multiplication of the output Pran second 20 by W k using N/2 multiplications
of the
DFT
aolo
P
Combine output with sum/dierence

252

Divide and Conquer for DFT- Analysis of DIT-5/8

In words: We can compute X [k] and X [k + N/2] with:

4.9

ing
i
cess Vetterl
ro in
Divide input into even and odd indexed samples
al P
t
Sign nd Mar
l
Compute two DFTs of size N/2a
t
Digi doni a 13
Multiplication of the output Pran second 20 by W k using N/2 multiplications
of the
DFT
aolo
P
Combine output with sum/dierence

252

Divide and Conquer for DFT- Analysis of DIT-6/8


X [0]

x[0]
x[2]

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13 W
an 20
1
lo Pr
W
ao
DFT-N/2

x[4]
x[6]

0
N

x[1]
x[3]
x[5]
x[7]

4.9

1
N

DFT-N/2

2
WN
3
WN

1
1
1

X [1]
X [2]
X [3]
X [4]
X [5]
X [6]
X [7]

253

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-7/8

So, what is the complexity now?

4.9

ng erli
o
ett
al2Pr artin V
2 i or
Compute 2 DFT-N/2: twice (N/2)S, gn N /2 M
ital ni and
Dig do
Merge the two results: multiplication by N/2 13
complex numbers W k
ran 20
lo P
Total: N 2 /2 + N/2 which is indeed smaller than N 2 for any N 4,
Pao
Split DFT input into 2 pieces of size N/2: free!cessi

In general, about half the complexity of the initial problem!

254

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Divide and Conquer for DFT- Analysis of DIT-8/8

So, what if we repeat the process?

Go until DFT-2, since this is trivial (sum and dierence)

ing
i
cess Vetterl
Requires log2 N 1 steps
ro in
al P
t
Sign nd Mar
Each step requires a merger ofital N/2 multiplications and N additions
order
Dig doni a 13
Total: N/2(log 2 N 1) multiplications and N log2 N additions
an 20
lo Pr
Pao
Savings of order log2 N/N

Key Result: A DFT of size N requires order N log2 N operations!

4.9

255

Matrix factorization view of DFT, N = 4

Separate even and odd samples

Compute two DFTs of size 2 having output X [k] and X [k]

ing
i
cess Vetterl
Compute sum and dierence of
and Pro
nal
rtin
l Sig nd Ma
ta

Digi 1doni a 13 1 1 0 0 1
1 1
1
1
1
ran 0 20 0
1 j 1 olo P 0 1 0 j

1 1 0 0 0
a j
W4 =
1 1 1P 1 = 1 0 1 0 0 0 1 1 0
X [k]

1 j

0 1

This uses 8 additions and no multiplications!

4.9

W k X [k]

1 1

0
0
1
0 0

0
1
0
0

0
0

0
1

256

Matrix factorization view of DFT, N = 4

Separate even and odd samples

Compute two DFTs of size 2 having output X [k] and X [k]

ing
i
cess Vetterl
Compute sum and dierence of
and Pro
nal
rtin
l Sig nd Ma
ta

Digi 1doni a 13 1 1 0 0 1
1 1
1
1
1
ran 0 20 0
1 j 1 olo P 0 1 0 j

1 1 0 0 0
a j
W4 =
1 1 1P 1 = 1 0 1 0 0 0 1 1 0
X [k]

1 j

0 1

This uses 8 additions and no multiplications!

4.9

W k X [k]

1 1

0
0
1
0 0

0
1
0
0

0
0

0
1

256

Matrix factorization view of DFT, N = 4

Separate even and odd samples

Compute two DFTs of size 2 having output X [k] and X [k]

ing
i
cess Vetterl
Compute sum and dierence of
and Pro
nal
rtin
l Sig nd Ma
ta

Digi 1doni a 13 1 1 0 0 1
1 1
1
1
1
ran 0 20 0
1 j 1 olo P 0 1 0 j

1 1 0 0 0
a j
W4 =
1 1 1P 1 = 1 0 1 0 0 0 1 1 0
X [k]

1 j

0 1

This uses 8 additions and no multiplications!

4.9

W k X [k]

1 1

0
0
1
0 0

0
1
0
0

0
0

0
1

256

Matrix factorization view of DFT, N = 4

Separate even and odd samples

Compute two DFTs of size 2 having output X [k] and X [k]

ing
i
cess Vetterl
Compute sum and dierence of
and Pro
nal
rtin
l Sig nd Ma
ta

Digi 1doni a 13 1 1 0 0 1
1 1
1
1
1
ran 0 20 0
1 j 1 olo P 0 1 0 j

1 1 0 0 0
a j
W4 =
1 1 1P 1 = 1 0 1 0 0 0 1 1 0
X [k]

1 j

0 1

This uses 8 additions and no multiplications!

4.9

W k X [k]

1 1

0
0
1
0 0

0
1
0
0

0
0

0
1

256

Matrix factorization view of DFT, N = 8, 1/8

Now this is going to be big...

ing
i
cess Vetterl
ro in

al P1 art 1
1 1 l Sign
1
...
it 1 ni W M
1 igWa W 2 and 3 . . . W 7
D

o
3
W8 = 1 PW 2 d W 4 201 . . . W 14 = . . .
ran W 6
o

...
Pao
7
14
21
49

Too big for a single slide!

1 W

4.9

... W

257

Matrix factorization view of DFT, N = 8, 2/8


Step 1: separate even from odd indexed samples
Call this D8 for decimation of size 8

1 0 0 0 0 0 ing 0
s 0 0terli
s
0 0 1 0 oce0 0 et

Pr 0 0 tin V0
0 0 n0 l 0 1 r 0
a
a
l Sig

0 0 0 n0 M 0 1 0
a

igit oni a d 03
D8 =
D

0
0 0
nd 1 0 201 0 0 0
Pra 0 0 1 0 0 0 0

0
lo

Pao
0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1
This requires no arithmetic operations!

4.9

258

Matrix factorization view of DFT, N = 8, 3/8


Step 2: Compute two DFTs of size N/2 on the even and on the odd indexed samples
Each submatrix is W4 , and the matrix is block diagonal, where 04 stands for a matrix of 0s

1 1
1
1
sing terli
1 j 1 roces
j

Vet
l
1 1 na1 P 1artin

l Sig

a j 1d M

W4 04 igit1

i an j3
D= don
04 W4
01 1 1 1 1
n

2
1 j 1 j
lo Pr

Pao

1 1 1 1
1 j

This requires two DFT-4, or a total of 16 additions!

4.9

259

Matrix factorization view of DFT, N = 8, 4/8


Step 3: Multiply output of second DFT of size 4 by W k
This is a diagonal matrix, with I4 for the identity of size 4,

1
ing erli
1
ess
c
o
ett

al Pr artin V
1
1
n

l Sig nd M

W
I4 0 4
1 gita
=
Di 1 doni a 1 where 4 =

3
04 4
n

PraW 20
lo

Pao

W2

W2
W3

W3

This requires 2 multiplications (W 2 = j is free)


4.9

260

Matrix factorization view of DFT, N = 8, 5/8


Step 4: Recombine nal output X [k] and X [k + N/2] by sum and dierence, S8

1 0 0 0 1
0
g 0rli 0
0 1 0 0 essin 1
0
0
te 0

0 0 l 1 ro 0 in Vet 1
P 0c t 0
0
gna

0 0 0 Mar
Si
I4 I4 al
1 0
0
0
1
S8 =
it= 1 ni0and 0 1 0 0 0

I4 Dig
I4
0
do
n0 1 2013 0 1 0 0

a
lo Pr 0 0 0 0 0 1 0
0 1 0

Pao
0 0 0 1 0
0
0 1

This requires 8 additions!

4.9

261

Matrix factorization view of DFT, N = 8, 6/8

In total:
Product of 4 matrices

ing
i
cess Vetterl
ro in
lP
I4 I4 Sign4 04Mart 4 04
Ia
W
W8 =
d
ital4 n04 n4 04 W4 D8
I4
Dig I do i a 13
an 20
lo Pr
Pao

This requires 24 additions and 2 multiplications!

4.9

262

Flowgraph view of DFT, N = 8, 7/8


X [0]

x[0]
x[4]

0
WN

x[2]
x[6]

0
WN

4.9

X [2]

2
N

0
WN

1
N

x[3]
x[7]

X [1]

0
WN

X [3]

0
N

x[1]
x[5]

ing
i
cess Vetterl
1o
r
W
al P
tin
Sign n1Mar
l
d
1
ta
Digi doni a 13 W
an 20
lo Pr
W
Pao
1

0
WN

0
WN
2
WN

2
WN

1
1

3
WN

1
1
1
1

X [4]
X [5]
X [6]
X [7]

263

Matrix factorization view of DFT, N = 8, 8/8

ing
i
cess Vetterl
roone takes block of 8 by 8 pixels
In image processing (e.g. digital photography)
al P
tin
Sign nd Mar
l DCT) similar to a DFT
ta
One computes a transform (called
Digi doni a 13
0
an
It has a fast algorithm inspired by what 2just saw
we
lo Pr
Pao

Is this a big deal?

4.9

264

Matrix factorization view of DFT, N = 8, 8/8

ing
i
cess Vetterl
roone takes block of 8 by 8 pixels
In image processing (e.g. digital photography)
al P
tin
Sign nd Mar
l DCT) similar to a DFT
ta
One computes a transform (called
Digi doni a 13
0
an
It has a fast algorithm inspired by what 2just saw
we
lo Pr
Pao

Is this a big deal?

4.9

264

Matrix factorization view of DFT, N = 8, 8/8

ing
i
cess Vetterl
roone takes block of 8 by 8 pixels
In image processing (e.g. digital photography)
al P
tin
Sign nd Mar
l DCT) similar to a DFT
ta
One computes a transform (called
Digi doni a 13
0
an
It has a fast algorithm inspired by what 2just saw
we
lo Pr
Pao

Is this a big deal?

4.9

264

Some numbers

4.9

Direct: 642 = 4096 multiplications required (dominant g


rli
ssin cost, xed point multiplications)

oce
ette
al Prcolumnsnseparately, or 16 DFTs
ti V
The transform can be computed in rows and
Sign
Mar
ital ni andor a total of 32 multiplications
The algorithm we saw hasDig
2 multiplications, 3
do
1
Pran 20
lo
Saving of 2 orders of magnitude!
Pao

265

Some numbers

4.9

Direct: 642 = 4096 multiplications required (dominant g


rli
ssin cost, xed point multiplications)

oce
ette
al Prcolumnsnseparately, or 16 DFTs
ti V
The transform can be computed in rows and
Sign
Mar
ital ni andor a total of 32 multiplications
The algorithm we saw hasDig
2 multiplications, 3
do
1
Pran 20
lo
Saving of 2 orders of magnitude!
Pao

265

Some numbers

4.9

Direct: 642 = 4096 multiplications required (dominant g


rli
ssin cost, xed point multiplications)

oce
ette
al Prcolumnsnseparately, or 16 DFTs
ti V
The transform can be computed in rows and
Sign
Mar
ital ni andor a total of 32 multiplications
The algorithm we saw hasDig
2 multiplications, 3
do
1
Pran 20
lo
Saving of 2 orders of magnitude!
Pao

265

Some numbers

4.9

Direct: 642 = 4096 multiplications required (dominant g


rli
ssin cost, xed point multiplications)

oce
ette
al Prcolumnsnseparately, or 16 DFTs
ti V
The transform can be computed in rows and
Sign
Mar
ital ni andor a total of 32 multiplications
The algorithm we saw hasDig
2 multiplications, 3
do
1
Pran 20
lo
Saving of 2 orders of magnitude!
Pao

265

Conclusions
Dont worry, be happy!

The Cooley-Tukey is the most popular algorithm, mostly for N = 2N

Note that there is always a good FFT algorithm around the corner
ing

4.9

li
ess
tt ar
rocsize iequaletoe power of 2
Do not zero-pad to lengthen a vector to al P a
have
tnV
Sign nd Mar
tal
There are good packages outgthere (e.g. a
Di i doni Fastest Fourier Transform in the West, SPIRAL)
13
P an 20
It does make a BIG dierence!r
lo
Pao

266

And some people are obsessed with Fourier...

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

4.9

267

Exercise: Divide and Conquer for DFT- Analysis of DIF


Recall the computation of the DFT on an input x[n] of length N
N1

x[n] W nk ,

X [k] =

k = 0, 1, . . . , N 1, W = e j N

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
Idea:
ta
Digi doni a 13
0
Break input into rst and second Pran
2
lo half
Pao
n=0

with output X [k] of length N

N
1
2
Break output into even and odd indexed terms, or decimation in frequency (DIF)
x[n], n = 0, 1, . . . , N 1 x[n] and x[n + N/2], n = 0, 1, . . . ,

X [k], k = 0, 1, . . . , N 1 X [2k] and X [2k + 1], k = 0, 1, . . . ,


4.9

N
1
2
268

Divide and Conquer for DFT- Analysis of DIF


Initial computation
N1

x[n] W nk ,

X [k] =

k = 0, 1, . . . , N 1, W = e j N

ing er i
t
cessand secondl half
Consider even outputs rst, with inputs divided Pro rst n Vet
al into arti
Sign nd N/21
M
N/21 ital
2nk +
X [2k] =
x[n + N/2] W (n+N/2)2k
n=0 ig x[n] W ni a
n=0
D
N/21
N/21
do2nk +2013 x[n + N/2] W 2nk+Nk
n
=
x[n]
n=0 Pra W
n=0
lo x[n] W nk + N/21 x[n + N/2] W nk
N/21
= Pao
n=0
n=0
n=0

N/2

N/21
n=0 (x[n]

N/2

nk
+ x[n + N/2]) WN/2

nk
where we used again the fact that W 2nk = WN/2 and W Nk = 1.
In words: We can compute the even terms of the output with the help of a half-size DFT, by
summing x[n] and x[n + N/2].
4.9

269

Divide and Conquer for DFT- Analysis of DIF


Consider now odd outputs only, with inputs still divided into rst and second half

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
=
Digi doni a 13
20
P an
lokN r= 1 and N/2 = 1.
where we used the facts thato
W
Pa W
X [2k + 1] =
=
=

N/21
N/21
x[n] W n(2k+1) + n=0 x[n + N/2] W (n+N/2)(2k+1)
n=0
N/21
N/21
x[n] W n W 2nk + n=0 x[n + N/2] W n W 2nk W N/2 W Nk
n=0
N/21
N/21
n
nk
n
nk
n=0 (x[n] W )WN/2
n=0 (x[n + N/2] W )WN/2
N/21
n
nk
n=0 ((x[n] x[n + N/2]) W )WN/2

In words: We can compute the odd terms of the output with the help of a half-size DFT,
namely by considering x[n] x[n + N/2] and multiplying this dierence with W n before taking
the DFT of size N/2.

4.9

270

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4.9


P

ing
i
cess Vetterl
ro in
al P
t
Sign nd Mar
l
ta
Digi doni a 13
an 20
lo Pr
ao

END OF MODULE 4
P

Vous aimerez peut-être aussi