elen e4810: digital signal processing topic 3: fourier domain

59
2003-09-16 Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 3: Fourier domain 1. The Fourier domain 2. Discrete-Time Fourier Transform (DTFT) 3. Discrete Fourier Transform (DFT) 4. Convolution with the DFT

Upload: umay

Post on 17-Jan-2016

61 views

Category:

Documents


5 download

DESCRIPTION

ELEN E4810: Digital Signal Processing Topic 3: Fourier domain. The Fourier domain Discrete-Time Fourier Transform (DTFT) Discrete Fourier Transform (DFT) Convolution with the DFT. 1. The Fourier Transform. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 1

ELEN E4810: Digital Signal Processing

Topic 3: Fourier domain

1. The Fourier domain

2. Discrete-Time Fourier Transform (DTFT)

3. Discrete Fourier Transform (DFT)

4. Convolution with the DFT

Page 2: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 2

1. The Fourier Transform Basic observation (continuous time):

A periodic signal can be decomposed into sinusoids at integer multiples of the fundamental frequency

i.e. if

we can approach with Harmonicsof the

fundamental

˜ x (t) = ˜ x (t +T )

˜ x

˜ x (t) ≈ ak cos2πkT

t +φk

⎛ ⎝ ⎜

⎞ ⎠ ⎟

k=0

M

Page 3: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 3

Fourier Series For a square wave,

i.e.

ak cos2πkT

t +φk

⎛ ⎝ ⎜

⎞ ⎠ ⎟

k=0

M

φk = 0; ak = −1( )k−1

21k

k =1,3,5,...

0 o.w.

⎧ ⎨ ⎪

⎩ ⎪

x(t) = cos2πT

t ⎛ ⎝ ⎜

⎞ ⎠ ⎟−

13

cos2πT

3t ⎛ ⎝ ⎜

⎞ ⎠ ⎟+

15

cos2πT

5t ⎛ ⎝ ⎜

⎞ ⎠ ⎟− ...

Page 4: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 4

Fourier domain x is equivalently described

by its Fourier Series parameters:

Complex form:

k1 2 3 5 6 74

ak1.0

Negative ak is

equivalent to phase of k1 2 3 5 6 74

k π

ak = −1( )k−1

21k

k =1,3,5...

˜ x (t) ≈ ckej2πk

Tt

k=−M

M

Page 5: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 5

Fourier analysis How to find {|ck|}, {arg[ck]}?

Inner product with complex sinusoids:

ck =1

2πx(t)e

− j2πk

Ttdt

−T /2

T /2

=1

2πx t( )cos j 2πkt

T dt − j x t( )sin j 2πktT dt∫∫( )

Page 6: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 6

Fourier analysis Works if k1, k2 are positive integers,

cos k1t( ) ⋅cos k2t( )−π

π

∫ dt =1 k1 = k2

0 k1 ≠ k2

⎧ ⎨ ⎩

= 12π

cos(k1 + k2 )t + cos(k1 − k2 )t dt−π

π

=1

2πsin(k1 + k2 )t

k1 + k2

+sin(k1 − k2 )t

k1 − k2

⎣ ⎢

⎦ ⎥

−π

π

= sincπ (k1 + k2 ) + sincπ (k1 − k2 )

Page 7: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 7

sinc

= 1 when x = 0= 0 when x = r·, r ≠ 0, r = ±1, ±2, ±3,...

sincx =sin x

x∆

Page 8: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 8

Fourier Analysis

Thus,

because real & imag sinusoids in pick out corresponding sinusoidal components linearly combined in €

ck =1

2πx(t)e

− j2πk

Ttdt

−T /2

T /2

e− j

2πk

Tt

˜ x (t) = ak cos2πkT

t +φk

⎛ ⎝ ⎜

⎞ ⎠ ⎟

k=0

M

Page 9: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 9

Fourier Transform Fourier series for periodic signals

extends naturally to Fourier Transform for any (CT) signal (not just periodic):

Discrete index k continuous freq.

Inverse FourierTransform (IFT)

FourierTransform (FT)

X(Ω) =1

2πx(t)e− jΩtdt

−∞

x(t) = X(Ω)e jΩtdΩ−∞

Page 10: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 10

Fourier Transform Mapping between two continuous

functions:

2π ambiguity

Page 11: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 11

Fourier Transform of a sine Assume

Now, since

...we know

...where (x) is the Dirac delta function (continuous time) i.e.

f(x)

xx0

(x-x0)

x(t) = e jΩ0t

x(t) = X(Ω)e jΩtdΩ−∞

X(Ω) = δ (Ω −Ω0 )

x − x0( )∫ f x( )dt = f x0( )

x(t) = Ae jΩ0t

X(Ω) = Aδ (Ω −Ω0 )

Page 12: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 12

Fourier Transforms

Time Frequency

Fourier Series (FS)

Continuous periodic x(t)

Discrete infinite ck

Fourier Transform (FT)

Continuous infinite x(t)

Continuous infinite X()

Discrete-Time FT (DTFT)

Discrete infinite x[n]

Continuous periodic X(ej)

Discrete FT (DFT)

Discrete finite/pdc x[n]

Discrete finite/pdc X[k]

~

~

Page 13: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 13

2. Discrete Time FT (DTFT) FT defined for discrete sequences:

Summation (not integral) Discrete (normalized)

frequency variable Argument is ej, not plain

DTFT

X(e jω ) = x[n]e− jωn

n=−∞

Page 14: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 14

DTFT example e.g. x[n] = n·[n], || < 1

n-1 1 2 3 4 5 6 7

X(e jω ) = α nμ[n]e− jωn

n=−∞

∑= αe− jω

( )n

n=0

=1

1−αe− jω

S = cn

n=0

∑ ⇒ cS = cn

n=1

⇒ S − cS = c0 =1

⇒ S =1

1− c

Page 15: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 15

Periodicity of X(ej) X(ej) has periodicity 2 in

Phase ambiguity of ej makes it implicit €

X(e j (ω +2π ) ) = x[n]∑ e− j (ω +2π )n

= x[n]∑ e− jωn e− j 2πn = X(e jω )

Page 16: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 16

Inverse DTFT (IDTFT) Same basic form as other IFTs:

Note: continuous, periodic X(ej) discrete, infinite x[n] ...

IDTFT is actually forward Fourier Series (except for sign of )

IDTFT

x[n] =1

2πX(e jω )e jωndω

−π

π

Page 17: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 17

IDTFT Verify by substituting in DTFT:

= 0 unlessn = l

x[n] =1

2πX(e jω )e jωndω

−π

π

=1

2πx[l]e− jωl

l∑( )e

jωndω−π

π

= x[l]l

∑ 12π

e jω (n−l )dω−π

π

= x[l]sincl

∑ π (n − l)= x[n]

Page 18: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 18

sinc again

Same as cos imag jsin part cancels

12π

e jω (n−l )dω−π

π

∫ =1

2πe jω (n−l )

j n − l( )

⎣ ⎢

⎦ ⎥

−π

π

=1

2πe jπ (n−l ) − e− jπ (n−l )

j n − l( )

⎝ ⎜

⎠ ⎟

=1

2π2 j sin π (n − l)

j n − l( )

⎝ ⎜

⎠ ⎟= sincπ (n − l)

Page 19: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 19

x[n] = [n]

i.e. x[n] X(ej)

[n] 1

DTFTs of simple sequences

(for all )

n-2 2 31-1-3 -

x[n] X(ej)€

X(e jω ) = x[n]e− jωn

n=−∞

= e− jω 0 =1

Page 20: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 20

DTFTs of simple sequences :

over - < < but X(ej) must be periodic in

If 0 = 0 then x[n] = 1 n

so

IDTFT

x[n] = e jω0n

x[n] =1

2πX(e jω )e jωndω

−π

π

X(e jω ) = 2π ⋅δ (ω −ω0 )

e jω0n 2π ⋅δ (ω −ω0 − 2πk)k

1 2π ⋅δ (ω − 2πk)k

Page 21: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 21

[n]1

1 − e− jω+ πδ (ω + 2πk)

k∑

DTFTs of simple sequences

From before:

[n] tricky - not finite

( || < 1)

DTFT of 1/2

nμ[n]1

1−αe− jω

Page 22: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 22

DTFT properties Linear:

Time shift:

Frequency shift: ‘delay’in

frequency

g[n]+ βh[n] ↔ αG(e jω ) + βH (e jω )

g[n − n0 ] ↔ e− jωn0G(e jω )

e jω0ng[n] ↔ G e j ω−ω0( )( )

Page 23: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 23

DTFT example x[n] = [n] + n[n-1] ?

= [n] + n-1[n-1])

x[n] = n[n]

X(e jω ) =1+α e− jω⋅1 ⋅1

1 −αe− jω

⎛ ⎝ ⎜

⎞ ⎠ ⎟

=1+αe− jω

1 −αe− jω=

1−αe− jω +αe− jω

1 −αe− jω

=1

1 −αe− jω

Page 24: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 24

DTFT symmetry If x[n] X(ej) then...

x[-n] X(e-j)

x*[n] X*(e-j)

Re{x[n]} XCS(ej)

jIm{x[n]} XCA(ej)

xcs[n] Re{X(ej)}

xca[n] jIm{X(ej)}

conjugate symmetry cancels Im parts on IDTFT

from summation

(e-j)* = ej

=12

X e jω( ) + X * e− jω

( )[ ]

=12

X e jω( ) − X * e− jω

( )[ ]

Page 25: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 25

DTFT of real x[n] When x[n] is pure real, X(ej) = X*(e-j)

xcs[n] xev[n] = xev[-n] XR(ej) = XR(e-

j)

xca[n] xod[n] = -xod[-n] XI(ej) = -XI(e-j)x[n] real, even

X(ej) even, real

Page 26: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 26

DTFT and convolution Convolution:

Convolution becomes

multiplication

x[n] = g[n]∗h[n]

X(e jω ) = g[n]∗h[n]( )e− jωn

n=−∞

∑= g[k]h[n − k]

k∑( )n

∑ e− jωn

= g[k]e− jωk h[n − k]n

∑k

∑ e− jω (n−k )

= G(e jω ) ⋅H (e jω )

g[n]∗h[n] ↔ G(e jω )H (e jω )

Page 27: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 27

DTFT modulation Modulation:

Could solve if g[n] was just sinusoids...

Dual of convolution in time

x[n] = g[n] ⋅h[n]

X(e jω ) =1

2πG(e jθ )e jθndθ

−π

π

∫ ⎛ ⎝ ⎜

⎞ ⎠ ⎟

∀n∑ ⋅h[n]e− jωn

=1

2πG(e jθ ) h[n]e− j (ω−θ )n

∀n∑[ ]dθ

−π

π

g[n] ⋅h[n] ↔1

2πG(e jθ )H (e j (ω−θ ) )dθ

−π

π

Page 28: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 28

Parseval’s relation “Energy” in time and frequency domains

are equal:

If g = h, then g·g* = |g|2 = energy...

g[n]h*[n]∀n

∑ =1

2πG(e jω )H * (e jω )dω

−π

π

Page 29: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 29

Energy density spectrum Energy of sequence

By Parseval

Define Energy Density Spectrum (EDS)€

εg = g[n]∀n

∑2

εg =1

2πG(e jω )

2dω

−π

π

Sgg (e jω ) = G(e jω )2

Page 30: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 30

EDS and autocorrelation Autocorrelation of g[n]:

If g[n] is real, G(e-j) = G*(ej), so

Mag-sq of spectrum is DTFT of autoco

no phaseinfo.

rgg[l ] = g[n]g[n − l ]n=−∞

∑ = g[n]∗g[−n]

DTFT rgg[l ]{ } = G(e jω )G(e− jω )

DTFT rgg[l ]{ } = G(e jω )2

= Sgg (e jω )

Page 31: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 31

Convolution with DTFT Since

we can calculate a convolution by: finding DTFTs of g, h G, H multiply them: G·H IDTFT of product is result,

×g[n]

h[n]y[n]

DTFT

DTFT

IDTFT

G(e jω )

g[n]∗h[n] ↔ G(e jω )H (e jω )

g[n]∗h[n]

H (e jω )

Y (e jω )

Page 32: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 32

x[n] = n·[n]

h[n] = [n] - [n-1]

y[n] = x[n] h[n]

y[n] = [n] i.e. ...

DTFT convolution example

X(e jω ) =1

1−αe− jω

H (e jω ) =1−α e− jω⋅1( ) ⋅1

Y (e jω ) = H (e jω )X(e jω )

= 11−αe− jω

⋅ 1−αe− jω( ) =1

Page 33: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 33

3. Discrete FT (DFT)

A finite or periodic sequence has only N unique values, x[n] for 0 ≤ n < N

Spectrum is completely defined by N distinct frequency samples

Divide 0..2 into N equal steps, {k} = 2k/N

Discrete FT (DFT)

Discrete finite/pdc x[n]

Discrete finite/pdc X[k]

Page 34: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 34

Uniform sampling of DTFT spectrum:

DFT:

where i.e. 1/Nth of a revolution

DFT and IDFT

X[k] = X(e jω )ω=

2πk

N

= x[n]e− j

2πk

Nn

n=0

N−1

X[k] = x[n]WNkn

n=0

N−1

WN = e− j

N

Page 35: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 35

IDFT

Inverse DFT IDFT Check:

Sum of complete setof rotated vectors= 0 if l ≠ n; = N if l = n

re

im

WN

WN2

x[n] =1N

X[k]WN−nk

k=0

N−1

x[n] =1N

x[l]WNkl

l∑( )WN

−nk

k∑

=1N

x[l] WNk ( l−n )

k=0

N−1

∑l=0

N−1

= x[n]

Page 36: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 36

DFT examples Finite impulse

Periodic sinusoid:

(r I)

x[n] =1 n = 00 n =1..N −1 ⎧ ⎨ ⎩

X[k] = x[n]WNkn

n=0

N−1

∑ = WN0 =1 ∀k

x[n] = cos2πrn

N

⎛ ⎝ ⎜

⎞ ⎠ ⎟

=12

WN−rn +WN

rn( )

X[k] = 12 WN

−rn +WNrn

( )n=0

N−1

∑ WNkn

=N /2 k = r,k = N − r

0 o.w. ⎧ ⎨ ⎩

Page 37: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 37

DFT: Matrix form as a matrix multiply:

i.e.

X[k] = x[n] ⋅WNkn

n=0

N−1

X[0]X[1]X[2]

MX[N −1]

⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥

=

1 1 1 L 11 WN

1 WN2 L WN

(N−1)

1 WN2 WN

4 L WN2(N−1)

M M M O M1 WN

(N−1) WN2(N−1) L WN

(N−1)2

⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥

x[0]x[1]x[2]

Mx[N −1]

⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥

X = DN ⋅x

Page 38: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 38

Matrix IDFT If

then i.e. inverse DFT is also just a matrix,

=1/NDN*

X = DN ⋅x

x = DN−1 ⋅X

DN−1 =

1N

1 1 1 L 11 WN

−1 WN−2 L WN

−(N−1)

1 WN−2 WN

−4 L WN−2(N−1)

M M M O M1 WN

−(N−1) WN−2(N−1) L WN

−(N−1)2

⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥

Page 39: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 39

DFT and DTFT

DFT ‘samples’ DTFT at discrete freqs:

DTFT

DFT

• continuous freq • infinite x[n], -<n<

• discrete freq k=N• finite x[n], 0≤n<N

X(ej)

X[k]

k=1...

X(e jω ) = x[n]e− jωn

n=−∞

X[k] = x[n]WNkn

n=0

N−1

X[k] = X(e jω )ω=

2πk

N

Page 40: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 40

DFT and MATLAB MATLAB is concerned with sequences

not continuous functions like X(ej) Instead, we use the DFT to sample

X(ej) on an (arbitrarily-fine) grid: X = freqz(x,1,w); samples the DTFT

of sequence x at angular frequencies in w X = fft(x); calculates the N-point DFT

of an N-point sequence x M

Page 41: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 41

DTFT from DFT N-point DFT completely specifies the

continuous DTFT of the finite sequence

“periodicsinc”

interpolation

X(e jω ) =1N

X[k]WN−kn

k=0

N−1

∑ ⎛

⎝ ⎜

⎠ ⎟e

− jωn

n=0

N−1

=1N

X[k]k=0

N−1

∑ e− j ω−2πk

N( )n

n=0

N−1

=1N

X[k]k=0

N−1

∑ ⋅sin N Δωk

2

sin Δωk2

⋅e− j ( N−1)

2⋅Δωk

Δ k = ω − 2πkN

Page 42: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 42

Periodic sinc

= N when Δk = 0; = (-)N when Δk/2 = = 0 when Δk/2 = r·/N, r = ±1, ± 2, ...other values in-between...

e− jΔωkn

n=0

N−1

∑ =1− e− jNΔωk

1 − e− jΔωk

=e− jNΔωk /2

e− jΔωkn /2⋅e jNΔωk /2 − e− jNΔωk /2

e jΔωk /2 − e− jΔωk /2

= e− j ( N−1)

2⋅Δωk sin N Δωk

2

sin Δωk2

Page 43: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 43

Periodic sinc

Periodicsinc

interpolation

X[k]X(ej)

sin Nxsin x

Page 44: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 44

DFT from overlength DTFT

If x[n] has more than N points, can still

form

IDFT of X[k] will give N point

How does relate to x[n] ?€

X[k] = X(e jω )ω=

2πk

N

˜ x [n]

˜ x [n]

Page 45: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 45

DFT from overlength DTFT

=1 for n-l = rN, rI= 0 otherwise

all values shifted by exact multiples of N ptsto lie in 0 ≤ n < N

DTFTx[n]

sampleX(ej)

IDFTX[k]

0 ≤ n < N-A ≤ n < B

˜ x [n]

˜ x [n] = 1

Nx[l ]WN

kl

l =−∞

∑ ⎛

⎝ ⎜

⎠ ⎟

k=0

N−1

∑ WN−nk

= x[l ]l =−∞

∑ 1

NWN

k (n−l )

k=0

N−1

∑ ⎡

⎣ ⎢ ⎤

⎦ ⎥

⇒ ˜ x [n] = x[n − rN ]r=−∞

Page 46: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 46

DFT from DTFT example If x[n] = { 8, 5, 4, 3, 2, 2, 1, 1} (8 point) We form X[k] for k = 0, 1, 2, 3

by sampling X(ej) at = 0, /2, , 3/2

IDFT of X[k] gives 4 pt Overlap only for r = -1: (N = 4)

˜ x [n] = x[n − rN ]r=−∞

⇒ ˜ x [n] =8 5 4 3+ + + +2 2 1 1

⎧ ⎨ ⎪

⎩ ⎪

⎫ ⎬ ⎪

⎭ ⎪= 10 7 5 4{ }

Page 47: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 47

DFT from DTFT example x[n]

x[n+N] (r = -1)

is the time aliased or ‘folded down’

version of x[n].

n-1 1 2 3 4 5 6 7 8

n-1 1 2 3 4 5-2-3-4-5

n1 2 3

˜ x [n]

˜ x [n]

Page 48: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 48

Properties: Circular time shift DFT properties mirror DTFT, with twists: Time shift must stay within N-pt ‘window’

Modulo-N indexing keeps index between 0 and N-1:

0 ≤ n0 < N

g n − n0 N[ ] ↔ WNkn0G[k]

g n − n0 N[ ] =g n − n0[ ] n ≥ n0

g N + n − n0[ ] n < n0

⎧ ⎨ ⎩

Page 49: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 49

Circular time shift Points shifted out to the right don’t

disappear – they come in from the left

Like a ‘barrel shifter’:

5-pt sequence

‘delay’ by 2g[n]

1 2 3 4 n

g[<n-2>5]

1 2 3 4 n

Page 50: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 50

Circular time reversal Time reversal is tricky in ‘modulo-N’

indexing - not reversing the sequence:

Zero point stays fixed; remainder flips

1 2 3 4 n5 6 7 8 9 10 11-7 -6 -5 -4 -3 -2 -1

˜ x n[ ]

5-pt sequence made periodic

Time-reversedperiodic sequence

1 2 3 4 n5 6 7 8 9 10 11-7 -6 -5 -4 -3 -2 -1€

˜ x −nN[ ]

Page 51: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 51

4. Convolution with the DFT IDTFT of product of DTFTs of two N-pt

sequences is their 2N-1 pt convolution IDFT of the product of two N-pt DFTs

can only give N points! Equivalent of 2N-1 pt result time aliased:

i.e. must be, because G[k]H[k] are exact

samples of G(ej)H(ej) This is known as circular convolution

yc n[ ] = yl[n + rN ]r=−∞

Page 52: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 52

Circular convolution Can also do entire convolution with

modulo-N indexing Hence, Circular Convolution:

Written as

g[n]⊗h[n]N

g m[ ]h n − mN[ ]

m=0

N−1

∑ ↔ G[k]H[k]

Page 53: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 53

Circular convolution example 4 pt sequences: g[n]={1 2 0 1}

n1 2 3

h[n]={2 2 1 0}

n1 2 3

1

2

0

1

nh[<n - 0>4]1 2 3

nh[<n - 1>4]1 2 3

nh[<n - 2>4]1 2 3

nh[<n - 3>4]1 2 3

n

g[n] h[n]={4 7 5 4}

1 2 3

4

check: g[n] h[n]={2 6 5 4 2 1 0}

*

g m[ ]h n − mN[ ]

m=0

N−1

Page 54: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 54

Duality DFT and IDFT are very similar

both map an N-pt vector to an N-pt vector

Duality:

if

then i.e. if you treat DFT sequence as a time

sequence, result is almost symmetric

Circulartime reversal

g n[ ] ↔ G k[ ]

G n[ ] ↔ N ⋅g −kN[ ]

Page 55: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 55

DFT properties summary Circular convolution

Modulation

Duality

Parseval

G n[ ] ↔ N ⋅g −kN[ ]

g m[ ]h n − mN[ ]

m=0

N−1

∑ ↔ G[k]H[k]

g n[ ] ⋅h n[ ] ↔ 1N G[m]H[ k − m

N]

m=0

N−1

x n[ ]2

n=0

N−1

∑ = 1N X k[ ]

2

k=0

N−1

Page 56: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 56

Linear convolution w/ the DFT DFT fast circular convolution .. but we need linear convolution Circular conv. is time-aliased linear

conv.; can aliasing be avoided? e.g. convolving L-pt g[n] with M-pt h[n]:

y[n] = g[n] h[n] has L+M-1 nonzero pts Set DFT size N ≥ L+M-1 no aliasing

*

Page 57: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 57

Linear convolution w/ the DFT Procedure (N = L + M - 1):

pad L-pt g[n] with (at least) M-1 zeros N-pt DFT G[k], k = 0..N-1

pad M-pt h[n] with (at least) L-1 zeros N-pt DFT H[k], k = 0..N-1

Y[k] = G[k]·H[k], k = 0..N-1

IDFT{Y[k]}

n

g[n]

L

n

h[n]

M

n

yc[n]

N

= yL n + rN[ ]r=−∞

∑ = yL n[ ]

Page 58: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 58

Overlap-Add convolution Very long g[n] break up into segments,

convolve piecewise, overlap

bound size of DFT, processing delay

Make

Called Overlap-Add (OLA) convolution... €

gi n[ ] =g n[ ] i ⋅N ≤ n < i +1( ) ⋅N

0 o.w. ⎧ ⎨ ⎩

⇒ g n[ ] = gi n[ ]i

⇒ h[n]× g n[ ] = h[n]× gi n[ ]i

∑* *

Page 59: ELEN E4810: Digital Signal Processing Topic 3: Fourier domain

2003-09-16Dan Ellis 59

Overlap-Add convolution

n

g[n]

n

g0[n]

n

g1[n]

n

g2[n]

N 2N 3N

n

h[n] g0[n]

n

n

h[n]

n

h[n] g1[n]

h[n] g2[n]

nN 2N 3Nh[n] g[n]

valid OLA sum