Linux Assemblycollection of fast libraries

Window libraryWindow.h

In signal processing, a window function (also known as an apodization function or tapering function) is a mathematical function that is zero-valued outside of some chosen interval. For instance, a function that is constant inside the interval and zero elsewhere is called a rectangular window, which describes the shape of its graphical representation. When another function or a signal (data) is multiplied by a window function, the product is also zero-valued outside the interval: all that is left is the part where they overlap; the "view through the window". Applications of window functions include spectral analysis, filter design, and beamforming.

Contents

Function list

C function nameFunctionsC++ function nameFunctions
Blackman2 functionsBlackman2 functions
BlackmanNuttall2 functionsBlackmanNuttall2 functions
Hamming2 functionsHamming2 functions
Sine2 functionsSine2 functions
C function nameFunctionsC++ function nameFunctions

High-resolution windows (low dynamic range)

If the signal under analysis is composed of two sinusoids of different frequencies, leakage can interferes with the ability to distinguish them spectrally. If their frequencies are dissimilar and one component is weaker, then leakage from the larger component can obscure the weaker’s presence. But if the frequencies are similar, leakage can render them unresolvable even when the sinusoids are of equal strength.

The rectangular window (aka no window) has excellent resolution characteristics for signals of comparable strength, but it is a poor choice for signals of disparate amplitudes. This characteristic is sometimes described as low-dynamic-range.

Sine window

Cvoid Window_Sine_flt32 (flt32_t window[], size_t size);
void Window_Sine_flt64 (flt64_t window[], size_t size);
C++void Window::Sine (flt32_t window[], size_t size);
void Window::Sine (flt64_t window[], size_t size);

Description: Compute Sine window coefficients and put them into window array. Sine window is also known as Cosine window.

Parameters:

  • window - pointer to a window array to store coefficients
  • size - size of array (count of elements)

Return value: None.

Hamming window

Cvoid Window_Hamming_flt32 (flt32_t window[], size_t size);
void Window_Hamming_flt64 (flt64_t window[], size_t size);
C++void Window::Hamming (flt32_t window[], size_t size);
void Window::Hamming (flt64_t window[], size_t size);

Description: Compute Hamming window coefficients and put them into window array.

Parameters:

  • window - pointer to a window array to store coefficients
  • size - size of array (count of elements)

Return value: None.

Tip:Hamming window is optimal for many general purpose tasks of DSP. If you have no clue which window function to use, try this one.

Blackman window

Cvoid Window_Blackman_flt32 (flt32_t window[], size_t size);
void Window_Blackman_flt64 (flt64_t window[], size_t size);
C++void Window::Blackman (flt32_t window[], size_t size);
void Window::Blackman (flt64_t window[], size_t size);

Description: Compute Blackman window coefficients and put them into window array.

Parameters:

  • window - pointer to a window array to store coefficients
  • size - size of array (count of elements)

Return value: None.

Low-resolution windows (high dynamic range)

At the other extreme of dynamic range are the windows with the poorest resolution. These high-dynamic-range low-resolution windows are also poorest in terms of sensitivity; this is, if the input waveform contains random noise close to the signal frequency, the response to noise, compared to the sinusoid, will be higher than with a higher-resolution window. In other words, the ability to find weak sinusoids amidst the noise is diminished by a high-dynamic-range window. High-dynamic-range windows are probably most often justified in wide band applications, where the spectrum being analyzed is expected to contain many different signals of various amplitudes.

Blackman–Nuttall window

Cvoid Window_BlackmanNuttall_flt32 (flt32_t window[], size_t size);
void Window_BlackmanNuttall_flt64 (flt64_t window[], size_t size);
C++void Window::BlackmanNuttall (flt32_t window[], size_t size);
void Window::BlackmanNuttall (flt64_t window[], size_t size);

Description: Compute Blackman-Nuttall window coefficients and put them into window array.

Parameters:

  • window - pointer to a window array to store coefficients
  • size - size of array (count of elements)

Return value: None.

Copyright 2012-2016 Jack Black. All rights reserved.