barthannwin -Modified
Bartlett-Hann window
Syntax
w=barthannwin(L)
Description
w = barthannwin(L)returns
an L-point
modified Bartlett-Hann window in the column
vector w.
Like Bartlett, Hann, and Hamming windows, this window has a
mainlobe at the origin and asymptotically decaying sidelobes on
both sides. It is a linear combination of weighted Bartlett and
Hann windows with near sidelobes lower than both Bartlett and Hann
and with far sidelobes lower than both Bartlett and Hamming
windows. The mainlobe width of the modified Bartlett-Hann window is
not increased relative to either Bartlett or Hann window
mainlobes.
Note The Hann window is
also called the Hanning window.
Examples
Create a 64-point Bartlett-Hann window and display the result using
WVTool:
L=64;
wvtool(barthannwin(L))
Algorithm
The equation for computing the coefficients of a Modified
Bartlett-Hanning window is
where and
the window length is .
References
[1] Ha, Y.H., and J.A. Pearce. "A New Window and Comparison to
Standard Windows." IEEE® Transactions
on Acoustics, Speech, and Signal
Processing. Vol. 37, No. 2, (February
1999). pp. 298-301.
[2] Oppenheim, A.V., and R.W.
Schafer. Discrete-Time
Signal Processing. Upper Saddle River,
NJ: Prentice-Hall, 1999, p. 468.
bartlett -Bartlett
window
Syntax
w=bartlett(L)
Description
w = bartlett(L) returns
an L-point
Bartlett window in the column vector w,
where L must
be a positive integer. The coefficients of
a Bartlett
window are computed as follows:
The window length .
The Bartlett window is very similar to a triangular window as
returned by the triang function.
The Bartlett window always ends with zeros at samples 1
and n,
however, while the triangular window is nonzero at those points.
For L odd,
the center L-2 points
ofbartlett(L) are
equivalent to triang(L-2).
Note If you specify a
one-point window (set L=1),
the value 1 is
returned.
Examples
Create a 64-point Bartlett window and display the result using
WVTool:
L=64;
wvtool(bartlett(L))
References
[1] Oppenheim, A.V., and R.W.
Schafer. Discrete-Time
Signal Processing. Upper Saddle River,
NJ: Prentice-Hall, 1999, pp. 468-471.
blackman -Blackman
window
Syntax
w=blackman(L)
w=blackman(L,'sflag')
Description
w = blackman(L) returns
the L-point
symmetric Blackman window in the column
vector w,
where L is
a positive integer.
w = blackman(L,'sflag')returns
an L-point
Blackman window using the window sampling specified by'sflag',
which can be either 'periodic' or 'symmetric' (the
default). The 'periodic' flag
is useful for DFT/FFT purposes, such as in spectral analysis. The
DFT/FFT contains an implicit periodic extension and the periodic
flag enables a signal windowed with a periodic window to have
perfect periodic extension. When 'periodic' is
specified, blackman computes
a length L+1 window
and returns the first L points.
When using windows for filter design,
the 'symmetric' flag
should be used.
Note If you specify a
one-point window (set L=1),
the value 1 is
returned.
Examples
Create a 64-point Blackman window and display the result using
WVTool:
L=64;
wvtool(blackman(L))
Algorithm
The equation for computing the coefficients of a Blackman window
is
The window length .
Blackman windows have slightly wider central lobes and less
sideband leakage than equivalent length Hamming and Hann
windows.
blackmanharris -Minimum
4-term Blackman-Harris window
Syntax
w=blackmanharris(L)
Description
w = blackmanharris(L) returns
an L-point,
minimum , 4-term Blackman-Harris window in the column
vector w.
The window is minimum in the sense that its maximum sidelobes are
minimized.
Examples
Create a 32-point Blackman-Harris window and display the result
using WVTool:
L=32;
wvtool(blackmanharris(L))
Algorithm
The equation for computing the coefficients of a minimum 4-term
Blackman-harris window of length N is:
The following table lists the coefficients:
Coefficient
Value
a0
0.35875
a1
0.48829
a2
0.14128
a3
0.01168
References
[1] Harris, F. J. "On the Use of Windows for Harmonic Analysis with
the Discrete Fourier Transform." Proceedings
of the IEEE.Vol. 66 (January 1978).
pp. 51-84.
bohmanwin -Bohman
window
Syntax
w=bohmanwin(L)
Description
w = bohmanwin(L) returns
an L-point
Bohman window in column vector w.
A Bohman window is the convolution of two half-duration cosine
lobes. In the time domain, it is the product of a triangular window
and a single cycle of a cosine with a term added to set the first
derivative to zero at the boundary. Bohman windows fall off as
1/w4.
Examples
Compute a 64-point Bohman window and display the result using
WVTool:
L=64;
wvtool(bohmanwin(L))
Algorithm
The equation for computing the coefficients of a Bohman window
is
where x is
a length L vector
of linearly spaced values generated using linspace.
The first and last elements of the Bohman window are forced to be
identically zero.
References
[1] Harris, F. J. "On the Use of Windows for Harmonic Analysis with
the Discrete Fourier Transform." Proceedings
of the IEEE.Vol. 66 (January 1978). p.
67.
chebwin -Chebyshev
window
Syntax
w=chebwin(L,r)
Description
w = chebwin(L,r) returns
the column vector w containing
the length L Chebyshev
window whose Fourier transform sidelobe magnitude
is r dB
below the mainlobe magnitude. The default value
for r is
100.0 dB.
Note If you specify a
one-point window (set L=1),
the value 1 is
returned.
Examples
Create a 64-point Chebyshev window with 100 dB of sidelobe
attenuation and display the result using WVTool:
L=64;
wvtool(chebwin(L))
Algorithm
An artifact of the equiripple design method used
in chebwin is
the presence of impulses at the endpoints of the time-domain
response. This is due to the constant-level sidelobes in the
frequency domain. The magnitude of the impulses are on the order of
the size of the spectral sidelobes. If the sidelobes are large, the
effect at the endpoints may be significant. For more information on
this effect, see
References
[1] IEEE
Programs for Digital Signal Processing. IEEE Press. New
York: John Wiley & Sons, 1979. Program5.2.
[2] Harris, Fredric J. Multirate
Signal Processing for Communication
Systems,New Jersey: Prentice Hall PTR,
2004, pp. 60-64.
flattopwin -Flat
Top weighted window
Syntax
w = flattopwin(L)
w = flattopwin(L,sflag)
Description
Flat Top windows have very low passband ripple (<
0.01 dB) and are used primarily for calibration purposes. Their
bandwidth is approximately 2.5 times wider than a Hann window.
w = flattopwin(L) returns
the L-point
symmetric flat top window in column
vector w.
w = flattopwin(L,sflag) returns
the L-point
symmetric flat top window using sflag window
sampling, wheresflag is
either 'symmetric' or 'periodic'.
The 'periodic' flag
is useful for DFT/FFT purposes, such as in spectral analysis. The
DFT/FFT contains an implicit periodic extension and the periodic
flag enables a signal windowed with a periodic window to have
perfect periodic extension. When 'periodic' is
specified,flattopwin computes
a length L+1 window
and returns the first L points.
When using windows for filter design,
the 'symmetric' flag
should be used.
Algorithm
Flat top windows are summations of cosines. The coefficients of a
flat top window are computed from the following equation
where and elsewhere
and the window length is L = N +1. The coefficient values are
Coefficient
Value
a0
0.21557895
a1
0.41663158
a2
0.277263158
a3
0.083578947
a4
0.006947368
Examples
Create a 64-point, symmetric Flat Top window and view the window
using WVTool:
w = flattopwin(64);
wvtool(w);
Reference
[1] D'Antona, Gabriele. and A.
Ferrero, Digital
Signal Processing for Measurement Systems, New York:
Springer Media, Inc., 2006, pp. 70–72.
[2] Gade, Svend and H. Herlufsen, "Use of Weighting Functions in
DFT/FFT Analysis (Part I)," Brüel &
Kjær,Windows
to FFT Analysis (Part I) Technical Review, No. 3, 1987,
pp. 19-21.
gausswin -Gaussian
window
Syntax
w=gausswin(N)
w=gausswin(N,Alpha)
Description
w = gausswin(N) returns
an N-point
Gaussian window in the column vector w. L is
a positive integer. The coefficients of a Gaussian window are
computed from the following equation.
where ,
and α is inversely proportional to the standard deviation of a
Gaussian random variable.
w = gausswin(N,Alpha) returns
an N-point
Gaussian window where Alpha is
proportional to reciprocal of the standard deviation. The width of
the window is inversely related to the value of α; a larger value
of α produces a more narrow window. If α is omitted, it defaults to
2.5.
Note If the window appears
to be clipped, increase the number of points (N).
Examples
Create a 64-point Gaussian window and display the result in
WVTool:
L=64;
wvtool(gausswin(L))
Note The shape of this
window is similar in the frequency domain because the Fourier
transform of a Gaussian is also a Gaussian.
References
[1] Harris, F.J. "On the Use of Windows for Harmonic Analysis with
the Discrete Fourier Transform." Proceedings
of the IEEE. Vol. 66, No. 1 (January 1978).
[2] Roberts, Richard A., and C.T.
Mullis. Digital
Signal Processing. Reading, MA:
Addison-Wesley, 1987, pp. 135-136.
hann -Hann
(Hanning) window
Syntax
w=hann(L)
w=hann(L,'sflag')
Description
w=hann(L) returns
an L-point
symmetric Hann window in the column
vector w. L must
be a positive integer. The coefficients of a Hann window are
computed from the following equation.
The window length is .
w=hann(L,'sflag') returns
an L-point
Hann window using the window sampling specified
by 'sflag',
which can be either 'periodic' or 'symmetric' (the
default). The 'periodic' flag
is useful for DFT/FFT purposes, such as in spectral analysis. The
DFT/FFT contains an implicit periodic extension and the periodic
flag enables a signal windowed with a periodic window to have
perfect periodic extension. When 'periodic' is
specified,hann computes
a length L+1 window
and returns the first L points.
When using windows for filter design, the'symmetric' flag
should be used.
Note If you specify a
one-point window (L=1),
the value 1 is
returned.
Examples
Create a 64-point Hann window and display the result in WVTool:
L=64;
wvtool(hann(L))
References
[1] Oppenheim, A.V., and R.W.
Schafer, Discrete-Time
Signal Processing, Prentice-Hall, 1989, pp. 447-448.
kaiser -Kaiser
window
Syntax
w=kaiser(L,beta)
Description
w=kaiser(L,beta) returns
an L-point
Kaiser window in the column vector w. beta is
the Kaiser window parameter that affects the sidelobe attenuation
of the Fourier transform of the window. The default value
forbeta is
0.5.
To obtain a Kaiser window that designs an FIR filter with sidelobe
attenuation of α dB, use the following β.
Increasing beta widens
the main lobe and decreases the amplitude of the sidelobes (i.e.,
increases the attenuation).
Examples
Create a 200-point Kaiser window with a beta of 2.5 and display the
result using WVTool:
w = kaiser(200,2.5);
wvtool(w)
References
[1] Kaiser, J.F., "Nonrecursive Digital Filter Design Using the I0-
sinh Window Function," Proc. 1974 IEEE
Symp. Circuits and Systems, (April 1974), pp.20-23.
[2] Selected
Papers in Digital Signal Processing II, IEEE Press, New
York, 1975.
[3] Oppenheim, A.V., and R.W.
Schafer, Discrete-Time
Signal Processing, Prentice-Hall, 1989, p. 453.
nuttallwin -Nuttall-defined
minimum 4-term Blackman-Harris window
Syntax
w=nuttallwin(L)
Description
w = nuttallwin(L) returns
a minimum, L-point,
4-term Blackman-Harris window in the column
vector w.
The window is minimum in the sense that its maximum sidelobes are
minimized. The coefficients for this window differ from the
Blackman-Harris window coefficients computed
with blackmanharris and
produce slightly lower sidelobes.
Examples
Compare 64-point Blackman-Harris and Nuttall's Blackman-Harris
windows and plot them using WVTool:
L = 64;
w = blackmanharris(L);
y = nuttallwin(L);
wvtool(w,y)
The maximum difference between the two windows is
max(abs(y-w))
ans =
0.0099
Algorithm
The equation for computing the coefficients of a minimum 4-term
Blackman-Harris window, according to Nuttall, is
where and
the window length is .
The coefficients for this window are
a0 =
0.3635819
a1 =
0.4891775
a2 =
0.1365995
a3 =
.0106411
References
[1] Nuttall, Albert H. "Some Windows with Very Good Sidelobe
Behavior." IEEE
Transactions on Acoustics, Speech, and Signal
Processing. Vol. ASSP-29 (February
1981). pp. 84-91.