Your Equation

Library / Signal processing and digital filters / DSP-13

Signal processing and digital filters

Blackman window sample

Coefficient n of the symmetric three-term Blackman window.

Ref
DSP-13
Rev
v1
Field
Signal processing and digital filters
Result
w[n]

The Blackman window adds a second cosine term, w = 0.42 − 0.5 cos θ + 0.08 cos 2θ with θ = 2πn/(N − 1). The extra term lowers the sidelobes to about −58 dB (from −31 dB for Hann) while broadening the main lobe by half. Both end points are zero.

Coefficient n of the symmetric three-term Blackman window. The extra cosine term lowers the sidelobes and broadens the main lobe relative to Hann and Hamming. The page needs integers with 0 ≤ n ≤ N − 1.

Calculator

Solve for
samples
91,024
08
  • Position along the window, n/(N − 1)0.25
  • Value with the periodic convention (N in the denominator)0.258
  • Value at the mirror sample, w[N − 1 − n]0.34

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Window coefficient () current value 0.34
nSample indexKey driver
−1.39e-171
NWindow length
1.36e-5
  • Sample 2 of a 9-point Blackman window is 0.34.
  • The Blackman window rises more slowly from the ends than Hann: this gives lower leakage, which helps when a weak tone sits next to a strong one.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
n Sample index0 to 8 −1.388e-1711+1 +128 %
N Window length9 to 1,024 samples1.358e-50.340.34+1 samples−24.1 %

Sweep of Sample index

Sample indexWindow coefficient
0−1.388e-17
10.06645
20.34
30.7736
41
50.7736
60.34
70.06645
8−1.388e-17

Sweep one variable

Window coefficient ()Hover, touch, or use the arrow keys on the chart
00.20.40.60.81 02468 Sample index now 0.34

Variables and how each one contributes

w[n]

Window coefficient

Result ·

What the equation gives you. Everything else feeds it.

N

Window length

samples · typical 9 to 1,024

The window length, in samples. A longer window has more samples across the same shape, so a given n sits nearer the start. Raising it by 10 % (to 9.9) moves the result by −24.1 %, from 0.34 to 0.258.

n

Sample index

· typical 0 to 8

The sample index, 0 to N − 1. Moves along the window from the start towards the centre and the other end. Raising it by 10 % (to 2.2) moves the result by +0 %, from 0.34 to 0.34.

Worked example with the values above

  1. Angle: θ = 2π × 2 / 8 = 1.5708 rad.
  2. Terms: 0.5 cos θ = 3.0616×10−17, 0.08 cos 2θ = −0.08.
  3. w = 0.42 − 3.0616×10−17 + −0.08 = 0.34.

Assumptions and limits

  • A symmetric N-point window with integer N ≥ 2 and 0 ≤ n ≤ N − 1, so the end points have the same value.
  • For periodic spectral analysis, replace N − 1 with N in the denominator.

Common mistakes

  • Using the symmetric form for spectral analysis, which assumes a periodic window.
  • Using an index outside 0 to N − 1.
  • Forgetting that Hamming and Kaiser (with β > 0) end points are not zero.

Statistics and uncertainty

Window coefficients are exact formulas, but sampled windows differ slightly between software packages (symmetric against periodic form), which changes the leakage figures in the fourth decimal place.

Where it is used

  • Generating window coefficients for FIR design and spectral estimation.
  • Trading main-lobe width against sidelobe level in tone measurements.

Maths you need

  • Spectral leakage: energy spreading into neighbouring bins
  • Sidelobe level: the height of the largest lobe outside the main lobe
  • Symmetric against periodic windows: N − 1 or N in the denominator

Related formulas

Practise this formula