You are on page 1of 5

Windows and Windowing

Windows and Windowing

Windows and Windowing


Dr. Deepa Kundur
Texas A&M

Reference: Section 10.2 of John G. Proakis and Dimitris G. Manolakis, Digital Signal Processing: Principles, Algorithms, and Applications, 4th edition, 2007.

Fall 2011

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

1 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

2 / 18

Classical Application of Windowing

Rectangular Window

In many DSP applications, very long (or even innite) signal samples must be processed. In order to practically manage the data, localized processing is applied to a subset of samples. This subset is often generated through the process of windowing.

A straightforward or naive approach is to window by simply ignoring all points before a certain time instant and after a certain time instant. This amounts to what we call a rectangular window. Q: What is the problem with a rectangular window?
A: Spectral leakage.

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

3 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

4 / 18

Windows and Windowing

Windows and Windowing

Windowing
In most applications, windowing is applied by multiplying a long data sequence x(n) by a nite duration window function w (n); thus we have: xw (n) = x(n)w (n) Although this has the intended eect in the time domain of obtaining a subset of the input sequence, the reduction in information has the following spectral implication: Xw (f ) = X (f )W (f )

Xw (f ) = X (f )W (f )
Convolution with W (f ) broadens the support of the resulting signal. Convolution with W (f ) has the eect of smoothing certain regions of the spectrum and causing rippling in others. Applying a window has the eect of terminating it somewhat sharply that redistributes the signal to higher frequencies, which is known as spectral leakage. Dierent window shapes w (n) demonstrate dierent compromises.

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

5 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

6 / 18

Most Common Windows


Rectangular: w (n) = Hamming: 1 0 0n M 1 otherwise
2n M1

Most Common Windows


Rectangular
1 0.75 0.5 0.25 0

Magnitude

Hanning: w (n) = Blackman: w (n) =

Hamming Hanning Blackman 0 Sample


Windows and Windowing

Magnitude M-1
Fall 2011

w (n) =

0.54 0.46 cos 0 0.5 0.5 cos 0


2n M1

0n M 1 otherwise 0n M 1 otherwise
4n M1

0.75

2n M1

0.5

0.25

0.42 0.5 cos 0

+ 0.08 cos

0n M 1 otherwise

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

7 / 18

Dr. Deepa Kundur (Texas A&M)

8 / 18

Windows and Windowing

Windows and Windowing

Other Common Windows


Bartlett: w (n) =
2|n M1 | 2 M1

Other Common Windows


Kaiser:

1 0

0n M 1 otherwise

I0

((M1)/2)2 (n(M1)/2)2 I0 [((M1)/2)]

w (n) = 0

0n M 1 otherwise

Tukey: w (n) = 1
1 2

where I0 is the zeroth order modied Bessel function of the rst kind.
M1 2 M1 2

M1 2 n
M1 2

1 + cos

n(1+)(M1)/2 (1)(M1)/2

M1 2

Lanczos: w (n) = 0 where L > 0.


sin(2(n(M1)/2)/(M1) 2(n(M1)/2)/((M1)/2) L

for 0 < < 1.

otherwise

0n M 1 otherwise

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

9 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

10 / 18

Other Common Windows


1 0.75 0.5 0.25 0

Window Spectral Characterisitics


Tukey
(in dB scale) Main Lobe (causes smoothing)
peak height of sidelobes

Kaiser

Magnitude

Sidelobes (causes ringing e ect)


width of main lobe

Lanczos Sample
Windows and Windowing

Bartlett M-1
Fall 2011 11 / 18 Dr. Deepa Kundur (Texas A&M) Windows and Windowing Fall 2011 12 / 18

M-1

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Windows and Windowing

Window Spectral Characterisitics


Window type Rectangular Bartlett Hanning Hamming Blackman Main lobe width 4/M 8/M 8/M 8/M 12/M Peak sidelobe (dB) -13 -25 -31 -41 -57

Example Related to Lab


Consider an audio equalizer application in which a bell-type lter is used that is centered around a given center frequency.
center frequency width peak amplitude

1
-8000 -3000 -1000 -20 20 1000 3000

8000

Note: the larger the main lobe, the greater the smoothing the larger the peak sidelobe, the higher the degree of ringing

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

13 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing Windows and Windowing

Fall 2011

14 / 18

Example Related to Lab


Suppose the shape of the bell is given by WM (f ), the spectrum of window wM (n) where M is the length of the window.
the passband is given by the main lobe region the stopband is given by the side lobe region
center frequency width peak amplitude

Example Related to Lab


Design a window wM (n) whose cut-o frequency is fc .
Determine a value of M that provides an appropriate location of the main lobe width.
PASSBAND
center frequency

STOPBAND
center frequency

width

peak amplitude

STOPBAND

0
peak amplitude

STOPBAND

width

STOPBAND

PASSBAND

Cut-o frequency is a function of window length M

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

15 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

16 / 18

Windows and Windowing

Windows and Windowing

Example Related to Lab


What fraction of energy is passed in the stop-band for this window?
Note: the value of M determined previously is employed.
PASSBAND
center frequency

Example Related to Lab


What fraction of energy is passed in the stop-band for this window?
Note: the value of M determined previously is employed.
PASSBAND
center frequency peak amplitude

STOPBAND 0

width

STOPBAND

STOPBAND 0

width

peak amplitude

STOPBAND

Energy passed in the stopband

Energy passed in Total Energy in = the stopband Energy Main Lobe

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

17 / 18

Dr. Deepa Kundur (Texas A&M)

Windows and Windowing

Fall 2011

18 / 18

You might also like