## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

FFT Windows

Julius O. Smith III (jos@ccrma.stanford.edu)

Center for Computer Research in Music and Acoustics (CCRMA)

Department of Music, Stanford University

Stanford, California 94305

March 28, 2005

Outline

• Rectangular, Hann, Hamming

• MLT Sine

• Blackman-Harris Window Family

• Kaiser

• Chebyshev

• Bartlett

• Poisson

• Gaussian

• Optimal Windows

1

The Rectangular Window

In Lecture 0, we looked at the rectangular window:

w

R

(n)

∆

=

1, |n| ≥

M−1

2

0, otherwise

−20 −15 −10 −5 0 5 10 15 20

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Zero−Phase Rectangular Window − M = 21

The window transform was found to be

W

R

(ω) =

sin

M

ω

2

sin

ω

2

∆

= M · asinc

M

(ω) (1)

where asinc

M

(ω) denotes the aliased sinc function.

asinc

M

(ω)

∆

=

sin(Mω/2)

M · sin(ω/2)

2

This result is plotted below:

−3 −2 −1 0 1 2 3

−4

−2

0

2

4

6

8

10

12

Normalized Frequency ω (rad/sample)

A

m

p

litu

d

e

DFT of a Rectangular Window of length M = 11

Note that this is the complete window transform, not just

its magnitude. We obtain real window transforms like this

only for symmetric, zero-phase windows.

3

More generally, we may plot both the magnitude and

phase of the window versus frequency:

−3 −2 −1 0 1 2 3

1

2

3

4

5

6

7

8

9

10

11

Normalized Frequency ω (rad/sample)

A

m

p

litu

d

e

DFT of a Rectangular Window − M = 11

PSfrag replacements

ω/ΩM

−3 −2 −1 0 1 2 3

−0.3927

0

0.3927

0.7854

1.1781

1.5708

1.9635

2.3562

2.7489

3.1416

3.5343

Normalized Frequency ω (rad/sample)

P

h

a

s

e

(

r

a

d

)

Phase of Rectangular Window Transform (M = 11)

Main Lobe

PSfrag replacements

ω/ΩM

4

In audio work, we more typically plot the window

transform magnitude on a decibel (dB) scale:

−3 −2 −1 0 1 2 3

−40

−35

−30

−25

−20

−15

−10

−5

0

13 dB down

sidelobes sidelobes

main lobe

nulls nulls

Normalized Frequency ω (rad/sample)

M

a

g

n

it

u

d

e

(

d

B

)

DFT of a Rectangular Window − M = 11

PSfrag replacements

ωT (radians per sample)

5

Since the DTFT of the rectangular window approximates

the sinc function, it should “roll oﬀ” at approximately 6

dB per octave, as veriﬁed in the log-log plot below:

0.1 0.2 0.4 0.8 1.6 3.2 6.4

−54.1854

−48.1648

−42.1442

−36.1236

−30.103

−24.0824

−18.0618

−12.0412

−6.0206

0

Ideal −6 dB per octave line

Normalized Frequency (rad/sample)

A

m

p

lit

u

d

e

(

d

B

)

DFT of a Rectangular Window − M = 20

Partial

Main

Lobe

PSfrag replacements

ωT (radians per sample)

As the sampling rate approaches inﬁnity, the rectangular

window transform converges exactly to the sinc function.

Therefore, the departure of the roll-oﬀ from that of the

sinc function can be ascribed to aliasing in the frequency

domain, due to sampling in the time domain.

6

Sidelobe Roll-Oﬀ Rate

In general, if the ﬁrst n derivatives of a continuous

function w(t) exist (i.e., they are ﬁnite and uniquely

deﬁned), then its Fourier Transform magnitude is

asymptotically proportional to

|W(ω)| →

constant

ω

n+1

(as ω →∞)

Proof: Papoulis, Signal Analysis, McGraw-Hill, 1977

Thus, we have the following rule-of-thumb:

n derivatives ↔−6(n + 1) dB per octave roll-oﬀ rate

(since −20 log

10

(2) = 6.0205999 . . .).

This is also −20(n + 1) dB per decade.

To apply this result, we normally only need to look at the

window’s endpoints. The interior of the window is usually

diﬀerentiable of all orders.

Examples:

• Amplitude discontinuity ↔ −6 dB/octave roll-oﬀ

• Slope discontinuity ↔ −12 dB/octave roll-oﬀ

• Curvature discontinuity ↔ −18 dB/octave roll-oﬀ

For discrete-time windows, the roll-oﬀ rate slows down at

high frequencies due to aliasing.

7

In summary, the DTFT of the M-sample rectangular

window is proportional to the ‘aliased sinc function’:

asinc

M

(ωT)

∆

=

sin(ωMT/2)

M · sin(ωT/2)

≈

sin(πfMT)

MπfT

∆

= sinc(fMT)

Some important points:

• Zero crossings at integer multiples of Ω

M

∆

=

2π

M

where Ω

M

∆

=

2π

M

= frequency sampling interval for a

length M DFT

• Main lobe width is 2Ω

M

=

4π

M

• As M gets bigger, the mainlobe narrows

(better frequency resolution)

• M has no eﬀect on the height of the side lobes

(Same as the “Gibbs phenomenon” for Fourier series)

• First sidelobe only 13 dB down from main-lobe peak

• Side lobes roll oﬀ at approximately 6dB per octave

• A phase term arises when we shift the window to

make it causal, while the window transform is real in

the zero-phase case (i.e., centered about time 0)

8

Generalized Hamming Window Family

Consider the following picture in the frequency domain:

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

A

m

p

lit

u

d

e

PSfrag replacements

Ω

M

ω/ΩM

We have added 2 extra aliased sinc functions (shifted),

which results in the following behavior:

• There is some cancellation of the side lobes

• The width of the main lobe is doubled

9

In terms of the rectangular window transform

W

R

(ω) = M · asinc

M

(ω) (zero-phase, unit-amplitude

case), this can be written as:

W

H

(ω)

∆

= αW

R

(ω) + βW

R

(ω −Ω

M

) + βW

R

(ω + Ω

M

)

Using the Shift Theorem, we can take the inverse

transform of the above equation:

w

H

= αw

R

(n) + βe

−jΩ

M

n

w

R

(n) + βe

jΩ

M

n

w

R

(n)

= w

R

(n)

¸

α + 2β cos

2πn

M

**Choosing various parameters for α and β result in
**

diﬀerent windows in the generalized Hamming family,

some of which have names.

10

Hann or Hanning or Raised Cosine

The Hann window is deﬁned by the settings α = 1/2 and

β = 1/4:

w

H

(n) = w

R

(n)

¸

1

2

+

1

2

cos(Ω

M

n)

= w

R

(n) cos

2

Ω

M

2

n

**−20 −15 −10 −5 0 5 10 15 20
**

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Hann Window, M = 21

−3 −2 −1 0 1 2 3

−70

−60

−50

−40

−30

−20

−10

0

Normalized Frequency (rad/sample)

M

a

g

n

it

u

d

e

(

d

B

)

−31.5 dB

2Ω

M+1

−2Ω

M+1

PSfrag replacements

ωT (radians per sample)

Hann

11

Hann window properties:

• Mainlobe is 4Ω

M

wide

• 1st side lobe is at -31dB

• Side lobes roll oﬀ at approx. 18dB / octave

Hamming

This window is determined by optimizing over α and β in

such a way as to reduce the worst-case side lobe level.

Doing this, results in the following values:

• α = .54

• β = (1 −α)/2 (for unit time-domain peak amplitude)

12

Hamming Window

−20 −15 −10 −5 0 5 10 15 20

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Hamming Window, M = 21

−3 −2 −1 0 1 2 3

−70

−60

−50

−40

−30

−20

−10

0

Normalized Frequency (rad/sample)

M

a

g

n

it

u

d

e

(

d

B

)

−40.6 dB

2Ω

M−1

−2Ω

M−1

PSfrag replacements

ωT (radians per sample)

13

Hamming Window Properties

• Discontinuous “slam to zero” at endpoints

• main lobe is 4Ω

M

• Roll oﬀ is approx. 6 dB / octave (aliased)

• 1st side lobe is improved over Hann

• side lobes closer to “equal ripple”

Note: The Hamming window could also be called the

“Chebyshev Generalized Hamming Window”. This is

because the Hamming window minimizes the sidelobe

level within the family. Chebyshev-type designs generally

exhibit equiripple error behavior, since the worst-case

error (sidelobe level in this case) is minimized.

14

Longer Hamming Window

−100 −80 −60 −40 −20 0 20 40 60 80 100

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Hamming Window, M = 101

−3 −2 −1 0 1 2 3

−70

−60

−50

−40

−30

−20

−10

0

Normalized Frequency (rad/sample)

M

a

g

n

it

u

d

e

(

d

B

)

−42.7 dB

2Ω

M−1

−2Ω

M−1

PSfrag replacements

ωT (radians per sample)

• Since the side-lobes nearest the main lobe are most

aﬀected by the Hamming optimization, we now have

a larger frequency region over which the spectral

envelope looks like that of the asinc function (an

“aliased -6 dB/octave roll-oﬀ”).

• The side-lobe level (-42.7 dB) is also improved over

that of the shorter window (-40.6 dB).

15

Window Transform Summary

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−60

−50

−40

−30

−20

−10

0

Window Transforms, Window length = 20

M

a

g

n

it

u

d

e

(

d

B

0

)

Normalized Frequency (cycles per sample)

Rectangular

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−60

−50

−40

−30

−20

−10

0

M

a

g

n

it

u

d

e

(

d

B

0

)

Normalized Frequency (cycles per sample)

Hanning

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−60

−50

−40

−30

−20

−10

0

M

a

g

n

it

u

d

e

(

d

B

0

)

Normalized Frequency (cycles per sample)

Hamming

16

The MLT Sine Window

The Modulated Lapped Transform (MLT) uses the sine

window:

w(n) = sin

¸

n +

1

2

π

2M

, n = 0, 1, 2, . . . , 2M −1 .

• Used in MPEG-1, Layer 3 (MP3 format),

MPEG-2 AAC, MPEG-4

• Sidelobes 24 dB down

• Asymptotically optimal coding gain

17

Blackman-Harris Window Family

• The Blackman-Harris family of windows is basically a

generalization of the Hamming family.

• In the case of the Hamming family, we constructed a

summation of 3 shifted sinc functions.

• The Blackman/Harris family is derived by considering

a more general summation of shifted sinc functions:

w

B

(n) = w

R

(n)

L−1

¸

l=0

α

l

cos(lΩ

M

n)

where Ω

M

∆

= 2π/M,

n = −(M −1)/2, . . . (M −1)/2 (M odd).

Special Cases:

• L = 1 ⇒ Rectangular

• L = 2 ⇒ Generalized Hamming

• L = 3 ⇒ Blackman Family

18

Frequency-Domain Implementation

The Blackman-Harris window family can be very

eﬃciently implemented in the frequency domain as a

(2L −1)-point convolution with the spectrum of the

unwindowed data. Examples:

• Start with a length M rectangular window

• Take an M-point DFT

• Convolve the DFT data with the 3-point smoother

[1/4, 1/2, 1/4] to implement a Hann window

• Note that the Hann window requires no multiplies in

linear ﬁxed-point data formats

• Implement any Blackman window as a 5-point

smoother in the frequency domain

19

Classic Blackman

The so-called “Blackman Window” is the speciﬁc case in

which α

0

= 0.42 α

1

= 0.5, and α

2

= 0.08

Properties:

• Sidelobes roll oﬀ about 18dB per octave (as T →0)

• −58dB sidelobe level (worst case)

• One degree of freedom used to increase the roll-oﬀ

rate from 6dB/octave to 18 dB per octave

• One degree of freedom used to minimize sidelobes

• One degree of freedom used to scale the window

Matlab:

N = 101; L = 3; No2 = (N-1)/2; n=-No2:No2;

ws = zeros(L,3*N); z = zeros(1,N);

for l=0:L-1

ws(l+1,:) = [z,cos(l*2*pi*n/N),z];

end

alpha = [0.42,0.5,0.08]; % Classic Blackman

w = alpha * ws;

20

Classic Blackman Window and Transform

20 40 60 80 100 120 140

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Classic Blackman Window: M = 51

100 200 300 400 500 600 700 800 900 1000

−120

−100

−80

−60

−40

−20

0

Frequency (bins)

M

a

g

n

it

u

d

e

(

d

B

)

21

Three-Term Blackman-Harris

Properties:

• α

0

= 0.4243801 α

1

= 0.4973406, and

α

2

= 0.0782793.

• Side-lobe level 71.48 dB.

• Side lobes roll oﬀ ≈ 6dB per octave in the absence of

aliasing (like rectangular and Hamming).

• All degrees of freedom (scaling aside) are used to

minimize side lobes (like Hamming).

Matlab:

N = 101; L = 3; No2 = (N-1)/2; n=-No2:No2;

ws = zeros(L,3*N); z = zeros(1,N);

for l=0:L-1

ws(l+1,:) = [z,cos(l*2*pi*n/N),z];

end

% 3-term Blackman-Harris(-Nuttall):

alpha = [0.4243801, 0.4973406, 0.0782793];

w = alpha * ws;

22

Three-Term Blackman-Harris Window and

Transform

20 40 60 80 100 120 140

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Three−Term Blackman−Harris Window: M = 51

100 200 300 400 500 600 700 800 900 1000

−120

−100

−80

−60

−40

−20

0

Frequency (bins)

M

a

g

n

it

u

d

e

(

d

B

)

23

Longer Three-Term Blackman-Harris Window

and Transform

100 200 300 400 500 600 700 800 900

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Three−Term Blackman−Harris Window: M = 301

200 400 600 800 1000 1200 1400 1600

−120

−100

−80

−60

−40

−20

0

Frequency (bins)

M

a

g

n

it

u

d

e

(

d

B

)

24

Power-of-Cosine

w(n) = w

R

(n) cos

L

πn

M

, n ∈

¸

−

M −1

2

,

M −1

2

• L = 0, 1, 2, . . .

• ﬁrst L terms of its Taylor expansion, evaluated at the

endpoints are identically 0

• roll-oﬀ rate ≈ 6(L + 1)dB/octave

• L = 0 ⇒ Rectangular window

• L = 1 ⇒ MLT sine window

• L = 2 ⇒ Hann window (“raised cosine” = “cos

2

”)

• L = 3 ⇒ Alternate Blackman (max roll-oﬀ rate)

Thus, cos

L

windows parametrize Lth-order

Blackman-Harris windows conﬁgured so as to use all L

degrees of freedom to maximize roll-oﬀ rate.

25

Miscellaneous Windows

Bartlett (“Triangular”)

w(n) = w

R

(n)

¸

1 −

|n|

(M −1)/2

**• Convolution of two half-length rectangular windows
**

• Window transform is sinc

2

=⇒

• First sidelobe twice as far down as rect (-26 dB)

• Main lobe twice as wide as that of a rectangular

window having the same length

(same as that of a half-length rect used to make it)

• Often applied to sample correlations of ﬁnite data

• Also called the “tent function”

26

Poisson (“Exponential”)

w

P

(n) = w

R

(n)e

−α

|n|

(M−1)/2

where: α determines the time constant ( τ =

M

2α

)

-20 -10 0 10 20

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

time (samples)

A

m

p

lit

u

d

e

Poisson Window M = 51

alpha = 1

alpha = 10

In the z-plane, the Poisson window has the eﬀect of

contracting the unit circle. Applied to a causal signal

h(n) having z transform H(z), we have

27

H

P

(z) =

∞

¸

n=0

[w(n)h(n)]z

−n

=

∞

¸

n=0

h(n)e

−

αn

M/2

z

−n

(let r

∆

= e

α

M/2

)

=

∞

¸

n=0

h(n)z

−n

r

−n

=

∞

¸

n=0

h(n)(zr)

−n

= H(zr)

1 r

z - plane

28

Hann-Poisson (“No Sidelobes”)

w(n) =

1

2

¸

1 + cos

π

n

(M −1)/2

e

−α

|n|

(M−1)/2

• Poisson window times Hann window

(exponential times raised cosine)

• “No sidelobes” for α ≥ 2

• Valuable for “hill climbing” optimization methods

(gradient-based)

Matlab:

function [w,h,p] = hannpoisson(M,alpha)

%HANNPOISSON - Length M Hann-Poisson window

Mo2 = (M-1)/2; n=(-Mo2:Mo2)’;

scl = alpha / Mo2;

p = exp(-scl*abs(n));

scl2 = pi / Mo2;

h = 0.5*(1+cos(scl2*n));

w = p.*h;

29

Hann-Poisson Window and Transform

−20 −15 −10 −5 0 5 10 15 20

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Hann−Poisson Window, M = 21, Alpha = 2.0

−3 −2 −1 0 1 2 3

−40

−30

−20

−10

0

M

a

g

n

it

u

d

e

(

d

B

)

PSfrag replacements

ωT (radians per sample)

30

Hann-Poisson Slope and Curvature

−4 −3 −2 −1 0 1 2 3 4

−0.03

−0.02

−0.01

0

0.01

0.02

0.03

d

B

M

a

g

n

it

u

d

e

S

l

o

p

e

Slope and Curvature of DTFT dB Magnitude, Hann−Poisson Window, M = 21, Alpha = 2.0

−4 −3 −2 −1 0 1 2 3 4

−5

0

5

x 10

−5

d

B

M

a

g

n

it

u

d

e

C

u

r

v

a

t

u

r

e

PSfrag replacements

ωT (radians per sample)

ωT (radians per sample)

31

Slope and Curvature for Larger Alpha

−4 −3 −2 −1 0 1 2 3 4

−0.02

−0.01

0

0.01

0.02

d

B

M

a

g

n

it

u

d

e

S

l

o

p

e

Slope and Curvature of DTFT dB Magnitude, Hann−Poisson Window, M = 21, Alpha = 3.0

−4 −3 −2 −1 0 1 2 3 4

−4

−2

0

2

x 10

−5

d

B

M

a

g

n

it

u

d

e

C

u

r

v

a

t

u

r

e

PSfrag replacements

ωT (radians per sample)

ωT (radians per sample)

32

Kaiser

Question: How do we use all M degrees of freedom

(sample values) in an M-point window w(n) to obtain

W(ω) ≈ δ(ω) in some optimal sense?

The Kaiser window maximizes the energy in the main

lobe of the window.

max

w

¸

main lobe energy

total energy

**The functions which maximize this ratio are known as
**

prolate spheroidal wave functions.

Kaiser discovered an approximation based upon Bessel

functions:

w

K

(n)

∆

=

I

0

β

1−

n

M/2

2

I

0

(β)

, −

M−1

2

≤ n ≤

M−1

2

0, elsewhere

The transform of this window is:

33

W(ω

k

) =

M

I

0

(β)

sinh

β

2

−

Mω

k

2

2

β

2

−

Mω

k

2

2

where I

0

is a Bessel function of the ﬁrst kind, and is

equal to

I

0

(x)

∆

=

∞

¸

k=0

¸

(x/2)

k

k!

2

(Compare this with e

x/2

=

∞

¸

k=0

(x/2)

k

k!

.)

Note: Sometimes you see the Kaiser window

parameterized by α where β

∆

= πα

34

1 1.5 2 2.5 3 3.5 4 4.5

−100

−90

−80

−70

−60

−50

−40

−30

−20

−10

SLL vs Main Lobe Width for the Kaiser Window (α=0,0.5,1,...,4)

Main lobe width in units of rectangular−window main−lobe widths

S

id

e

L

o

b

e

L

e

v

e

l

(

S

L

L

)

α = β = 0

α = 4.0

• β is equal to 1/2 ‘time-bandwidth product’

• β trades oﬀ side lobe level for main lobe width

larger β ⇒ lower S.L.L., wider mainlobe

35

β = [0, 2, 4, 6, 8, 10]

0 5 10 15 20 25 30 35 40 45 50

0

0.2

0.4

0.6

0.8

1

1.2

Length 50 Kaiser windows, 6 betas between 0 and 10

A

m

p

lit

u

d

e

Time (samples)

β = 0

β = 2

β = 4

β = 10

36

β = [0, 2, 4, 6, 8, 10]

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 0

Length 50 Kaiser windows, 6 betas between 0 and 10

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 2

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 4

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 6

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 8

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5

−100

−50

0

d

B

Normalized Frequency (cycles per sample)

β = 10

37

M = [20, 30, 40, 50]

0 0.05 0.1 0.15 0.2 0.25

−60

−40

−20

0

d

B

Normalized Frequency (cycles per sample)

M = 20

Kaiser window transforms, 4 window lengths between 20 and 50, beta=4

0 0.05 0.1 0.15 0.2 0.25

−60

−40

−20

0

d

B

Normalized Frequency (cycles per sample)

M = 30

0 0.05 0.1 0.15 0.2 0.25

−60

−40

−20

0

d

B

Normalized Frequency (cycles per sample)

M = 40

0 0.05 0.1 0.15 0.2 0.25

−60

−40

−20

0

d

B

Normalized Frequency (cycles per sample)

M = 50

38

Kaiser Windows and Transforms

α = [1, 2, 3] (β = [π, 2π, 3π])

−50 0 50

0

0.5

1

Time (samples)

A

m

p

lit

u

d

e

α = 1

−2 0 2

−100

−50

0

α = 1

M

a

g

n

it

u

d

e

(

d

B

)

−50 0 50

0

0.5

1

Time (samples)

A

m

p

lit

u

d

e

α = 2

−2 0 2

−100

−50

0

α = 2

M

a

g

n

it

u

d

e

(

d

B

)

−50 0 50

0

0.5

1

Time (samples)

A

m

p

lit

u

d

e

α = 3

−2 0 2

−100

−50

0

α = 3

M

a

g

n

it

u

d

e

(

d

B

)

PSfrag replacements

ωT (radians per sample)

ωT (radians per sample)

ωT (radians per sample)

39

Chebyshev

Minimize the Chebyshev norm of the side lobes:

min

w

sidelobes(W)

∞

∆

= min

w

{max

ω>ω

c

|W(ω)|}

Alternatively, minimize main lobe width subject to a

sidelobe spec:

max

w

(ω

c

)

|W(ω) |≤c

α

, ∀|ω|≥ω

c

Closed-Form Window Transform:

W(ω

k

) =

cos

¸

M cos

−1

β cos

πk

M

¸

cosh

M cosh

−1

(β)

, (|k| ≤ M −1)

β = cosh

¸

1

M

cosh

−1

(10

α

)

, (α ≈ 2, 3, 4)

[Note error in text, which says “β = cosh

−1

[· · · ]”]

• Window w = IDFT(W) [zero-phase case]

or IDFT of (−1)

k

W(ω

k

) for causal case

• α controls sidelobe level (“stopband ripple”):

Side-Lobe Level in dB = −20α.

• smaller ripple ⇒ larger ω

c

• see matlab function “chebwin(M,ripple)”

• also called the Dolph-Chebyshev Window

40

Chebyshev Window, Length 31, Ripple -40 dB

−25 −20 −15 −10 −5 0 5 10 15 20 25

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

l

i

t

u

d

e

Length 31 Chebyshev window

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−60

−50

−40

−30

−20

−10

0

10

rip = 40.0 dB

Normalized Frequency (cycles/sample)

M

a

g

n

i

t

u

d

e

(

d

B

)

41

Chebyshev Window, Length 31, Ripple -200 dB

−25 −20 −15 −10 −5 0 5 10 15 20 25

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

l

i

t

u

d

e

Length 31 Chebyshev window

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−300

−250

−200

−150

−100

−50

0

rip = 200.0 dB

Normalized Frequency (cycles/sample)

M

a

g

n

i

t

u

d

e

(

d

B

)

42

Chebyshev Window, Length 101, Ripple -40 dB

−60 −40 −20 0 20 40 60

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

l

i

t

u

d

e

Length 101 Chebyshev window

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−60

−50

−40

−30

−20

−10

0

10

rip = 40.0 dB

Normalized Frequency (cycles/sample)

M

a

g

n

i

t

u

d

e

(

d

B

)

43

Chebyshev and Hamming Windows Compared

−3 −2 −1 0 1 2 3

−70

−60

−50

−40

−30

−20

−10

0

Normalized Frequency (rad/sample)

M

a

g

n

i

t

u

d

e

(

d

B

)

DFT of Chebyshev and Hamming Window: M = 31, Ripple = −42 dB

Chebyshev

Hamming

PSfrag replacements

ωT (radians per sample)

For the comparison, we set the ripple parameter for

chebwin to 42 dB:

window = [ chebwin(31,42)’ zeros(1,1024-31) ];

44

Gaussian

The Gaussian “bell curve” is the only smooth function

that transforms to itself:

1

σ

√

2π

e

−t

2

/2σ

2

↔e

−ω

2

/2(1/σ)

2

It also achieves the minimum time-bandwidth product

σ

t

σ

ω

= σ ×(1/σ) = 1

when “width” of a function is deﬁned as the square root

of its second central moment. For even functions w(t),

σ

t

∆

=

∞

−∞

t

2

w(t)dt.

• Since the true Gaussian function has inﬁnite duration,

in practice we must window it with some ﬁnite

window, or at least truncate it.

• Philippe Depalle suggests using a triangular window

raised to some power α for this purpose.

• This choice preserves the absence of sidelobes for

suﬃciently large α.

• It also preserves non-negativity of the transform

45

The Gaussian Window in Spectral Modeling

Special Property: On a dB scale, the Gaussian is

quadratic ⇒ parabolic interpolation of a sampled

Gaussian transform is exact.

Conjecture: Quadratic interpolation of spectral peaks

is generally more accurate on a log-magnitude scale (e.g.,

dB) than on a linear magnitude scale. This has been

veriﬁed in a number of cases, and no counter-examples

are yet known. Exercise: Prove this is true for the

rectangular window.

Matlab for the Gaussian Window

function [w] = gausswin(M,sigma)

n=(-(M-1)/2:(M-1)/2)’;

w = exp(-n.*n./(2*sigma.*sigma));

46

Gaussian Window and Transform

−20 −15 −10 −5 0 5 10 15 20

0

0.2

0.4

0.6

0.8

1

Time (samples)

A

m

p

lit

u

d

e

Gaussian Window, M = 21, Sigma = M/8

−3 −2 −1 0 1 2 3

−100

−80

−60

−40

−20

0

M

a

g

n

it

u

d

e

(

d

B

)

DTFT

Parabola

PSfrag replacements

ωT (radians per sample)

47

Optimal Windows

Generally we desire

W(ω) ≈ δ(ω)

• Best results are obtained by formulating this as an

FIR ﬁlter design problem.

• In general, both time-domain and frequency-domain

speciﬁcations are needed.

• Equivalently, both magnitude and phase

speciﬁcations are necessary in the frequency domain.

48

Optimal Windows for Audio Coding

Recently, numerically optimized windows have been

developed by Dolby which achieve the following

objectives:

• Narrow the window in time

• Smooth the onset and decay in time

• Reduce sidelobes below the worst-case masking

threshold

Windows in Graphics

On Windowing for Gradient Estimation in Volume Visualization

1

1

http://www.cg.tuwien.ac.at/studentwork/CESCG99/TTheussl/paper.html

49

Conclusion

• There is rarely a closed form expression for an optimal

window in practice.

• The hardest task is formulating the ideal error

criterion.

• Given an error criterion, it is usually straightforward

to minimize it numerically with respect to the window

samples w.

50

- STAT015 Autumn2015 Lectures Lecture 9 (2)uploaded byMohamadFadi
- Probability and Statistics Notesuploaded byendu wesen
- FFT Fundamentalsuploaded byAzif Saly
- Mc for Financeuploaded byAnkitJain
- 02_StaDisTeluploaded byPedro Ramos
- Normal Practiceuploaded byYinny Chen
- Dsp Manualuploaded byMrjayanthi
- DSPLABuploaded byHardik Govani
- Filter Design - Guideuploaded byUditha Muthumala
- ch15testuploaded byDaniel Hunks
- Fdocslide.us Problem Probabilityuploaded byawesome112358
- 62 Microwaveuploaded byNagaraju Neela
- Uncertainty-Measurements-and-Error-Analysis-PowerPoint-2015.pdfuploaded byzilangamba_s4535
- Area Under Normal Curve Worksheet Answersuploaded byKhoon Yu Tan
- A_Lab_Report_onuploaded bypraveenrangare
- 4uploaded byRifat Khan
- AP Stats Chapter 9B Testuploaded byDavid Woods
- BBA(H)_Syllabusuploaded bybhai302
- 2 Interval Estimationuploaded byawedawed
- Implementation of Hybrid Wave-pipelined 2D DWT Using ASIC.docuploaded byNsrc Nano Scientifc
- Financial Modelling SBuploaded byYingPeng Puan
- Wallflower Principles and Practice of Background Maintenanceuploaded byPeter Вич Chondro
- Newsvendor.pptuploaded bysumeetgkd
- Fast Fourier Transformsuploaded byapi-3837905
- Frequency and Regression Analysis of Hydrologic Data_oosterbaanuploaded bykaren dejo
- SPSSTwoISampleTTestuploaded byVanusha Adihetty
- A Fourier Pseudospectral Method for Some Computational Aeroacoustics Problemsuploaded bygarridolopez
- Electric power qualityuploaded byswarnankur_ghosh
- Fourier Transform Applicationsuploaded byAbhineet Gupta
- Mc Practicalsuploaded byAchal Kumar

- 01 My Great Noveluploaded byjamesyu
- 01 My Great Novel With Numbersuploaded byjamesyu
- Menu at Sebo in San Franciscouploaded byjamesyu
- 01 thisisthebestuploaded byjamesyu
- Facebook Connect for Web Startups Design Guideuploaded byjamesyu
- 03-26 Entry Door copy 9uploaded byjamesyu
- 01 My Great Noveluploaded byjamesyu
- 01 My Great Novel With Numbersuploaded byjamesyu
- REST Cheatsheetuploaded byjamesyu
- test file text 1uploaded byjamesyu
- 03-26 Entry Door Copy 11uploaded byjamesyu
- 03-26 Entry Door Copy 4uploaded byjamesyu
- Parse Presentationuploaded byjamesyu
- Restaurants To Tryuploaded byjamesyu
- test file text 1uploaded byjamesyu
- 03-26 Entry Door Copy 8uploaded byjamesyu
- 03-26 Entry Door Copy 14uploaded byjamesyu
- 03-26 Entry Door copy 9uploaded byjamesyu
- 03-26 Entry Door Copy 13uploaded byjamesyu
- 03-26 Entry Door copy 12uploaded byjamesyu
- PDF Testuploaded byjamesyu
- 03-26 Entry Door Copy 9uploaded byjamesyu
- 03-26 Entry Door Copy 9uploaded byjamesyu
- 03-26 Entry Door Copy 15uploaded byjamesyu
- 03-26 Entry Door Copy 9uploaded byjamesyu
- 03-26 Entry Door Copy 16uploaded byjamesyu
- iPaper Animation -- Stick Figure Drawinguploaded byjamesyu
- 03-26 Entry Door Copy 12uploaded byjamesyu
- 03-26 Entry Door Copy 17uploaded byjamesyu
- 03-26 Entry Door Copy 14uploaded byjamesyu

Close Dialog## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

Loading