BlackmanNuttallWindow<T>
Models & Types · AiDotNet.WindowFunctions
Implements the Blackman-Nuttall window function for signal processing applications.
Implements: IWindowFunction<T>
For Beginners
A window function is like a special lens that helps focus on specific parts of your data.
The Blackman-Nuttall window:
- Creates a smooth, bell-shaped curve that gradually tapers to zero at the edges
- Has very good “side lobe suppression” (reduces unwanted artifacts in frequency analysis)
- Helps you see the true frequencies in your data with minimal distortion
Imagine looking at stars through a telescope - a regular window might show some glare around bright stars, while the Blackman-Nuttall window would help reduce that glare, giving you a clearer view of fainter stars nearby. This is particularly useful in audio processing, radar systems, or any application where you need to distinguish between frequencies that are close to each other.
How It Works
The Blackman-Nuttall window is a high-performance window function that provides excellent side lobe suppression, making it ideal for spectral analysis. It uses a weighted cosine series with four terms: w(n) = 0.3635819 - 0.4891775 * cos(2πn/(N-1)) + 0.1365995 * cos(4πn/(N-1)) - 0.0106411 * cos(6πn/(N-1)) where n is the sample index and N is the window size.
Example
using AiDotNet.WindowFunctions;
using AiDotNet.Tensors.LinearAlgebra;
var window = new BlackmanNuttallWindow<double>();
Vector<double> w = window.Create(16);
Console.WriteLine($"BlackmanNuttallWindow: {w.Length}-point window, center = {w[w.Length / 2]:F4}");
Constructors
| Constructor | Summary |
|---|---|
BlackmanNuttallWindow() |
Initializes a new instance of the BlackmanNuttallWindow class. |
Methods
| Method | Summary |
|---|---|
Vector<T> Create(int windowSize) |
Creates a Blackman-Nuttall window of the specified size. |
WindowFunctionType GetWindowFunctionType() |
Gets the type identifier for this window function. |