The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



WeightingWindow


Unit:SDL_fourier
Class:TFastFourier
Declaration:property WeightingWindow: TFastFourierWgtWin;

A signal sampled for a limited amount of time may exhibit a distorted Fourier spectrum. In order to minimize this distortion, the signal may be multiplied by a weighting function which reduces the signal towards zero at both ends of the sampling window. Several weighting windows are provided by TFastFourier (the coefficients given in the table below are rounded, the actual calculation uses much more precise coefficients - see the source code for details):

Identifier Name Definition
fwRectangle rectangular window (no weighting function) F(x) = 1 for |x| <= N
F(x) = 0 for |x| > N
fwTriangle triangular window (Bartlett window) F(x) = 1 - |x|/N for |x| <= N
F(x) = 0 for |x| > N
fwCos2 cosine bell window
(or Hanning window, named after von Hann)
F(x) = cos2(x/N)
fwGauss Gaussian window F(x) = exp(-(ax/N)2)
fwHamming Hamming window F(x) = 0.54 + 0.46*cos(x/N)
fwBlackman Blackman window F(x) = 0.42 + 0.50*cos(x/N) + 0.08*cos(2x/N)
fwBlkmHarris Blackman-Harris window F(x) = 0.359 + 0.488*cos(x/N) + 0.141*cos(2x/N) + 0.012*cos(2x/N)
fwBlkmNuttall Blackman-Nuttall window F(x) = 0.364 + 0.489*cos(x/N) + 0.137*cos(2x/N) + 0.011*cos(2x/N)
fwUserDef User-defined wéighting window function stored in array property WgtFunction

Please note that selecting the right window is always a compromise and some kind of art. Further, the cosine bell window, the Hamming window, and the general Tukey window are closely related to each other. The general Tukey window is defined by the following function:

F(x) = 1-2a+2a*cos(x/N)

The parameter a determines the kind of window:

Hamming window: a = 0.23
Hanning window: a = 0.25
Please note that the resulting equation for the Hanning window may be transformed to the cos2 function by simple trigonometric calculations.

Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): fft



Last Update: 2012-Oct-20