Your Equation

Library / Signal processing and digital filters / DSP-26

Signal processing and digital filters

Windowed-sinc low-pass tap

Unscaled coefficient n of a windowed-sinc low-pass FIR filter with cutoff c = fc/fs in cycles per sample (0 < c < 0.5), length N and window value w[n].

Ref
DSP-26
Rev
v1
Field
Signal processing and digital filters
Result
h[n]

The ideal low-pass filter with cutoff c (in cycles per sample) has the infinite impulse response 2c·sinc(2c·m), centred at m = 0. Truncating it to N taps and shifting it by the delay d = (N − 1)/2 gives 2c·sinc(2c(n − d)), and multiplying by a window w[n] tames the truncation ripple. Divide by the sum of all taps for unit DC gain.

Unscaled coefficient n of a windowed-sinc low-pass FIR filter with cutoff c = fc/fs in cycles per sample (0 < c < 0.5), length N and window value w[n]. The delay (N − 1)/2 is an integer for odd N. Normalise by the sum of all taps if unit DC gain is needed.

Calculator

Solve for
cycles/sample
0.0010.499
01,000
taps
31,001
01
  • Filter delay, (N − 1)/24 samples
  • Offset of this tap from the centre, n − d−1 samples
  • Unwindowed ideal tap0.3027

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.

Low-pass tap () current value 0.3027
nTap indexKey driver
−0.0757
cCutoff, cycles per sample
0.0020.318
NNumber of taps
−0.0129
wWindow value at this tap
0
  • Tap 3 of the 9-tap filter is 0.3027, at −1 samples from the centre.
  • The centre tap is 0.4, equal to twice the cutoff in cycles per sample, so a wider passband needs a larger centre tap and shorter sinc lobes.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
n Tap index0 to 1,000 −0.075680.30270.3784+1 +32.1 %
c Cutoff, cycles per sample0.001 to 0.499 cycles/sample0.0020.31830.3163+10%+3.28 %
N Number of taps3 to 1,001 taps−0.01290.30270.3156+1 taps−33.3 %
w Window value at this tap0 to 1 00.30270.3027+10%+10 %

Sweep of Tap index

Tap indexLow-pass tap
0−0.07568
1250.002502
2500.001231
3758.16e-4
5006.103e-4
6254.875e-4
7504.058e-4
8753.476e-4
1,0003.039e-4

Sweep one variable

Low-pass tap ()Hover, touch, or use the arrow keys on the chart
−0.100.10.20.3 02004006008001000 Tap index now 0.3027

Variables and how each one contributes

h[n]

Low-pass tap

Result ·

What the equation gives you. Everything else feeds it.

c

Cutoff, cycles per sample

cycles/sample · typical 0.001 to 0.499

The cutoff, as cycles per sample (fc/fs), below 0.5. A higher cutoff narrows the sinc in time and raises the centre tap, which equals 2c. Raising it by 10 % (to 0.22) moves the result by +3.28 %, from 0.3027 to 0.3127.

n

Tap index

· typical 0 to 1,000

The tap index, from 0 to N − 1. Moves away from the centre tap, where the sinc is largest. Raising it by 10 % (to 3.3) moves the result by +0 %, from 0.3027 to 0.3027.

N

Number of taps

taps · typical 3 to 1,001

The number of taps. Sets the delay (N − 1)/2 that places the centre tap. Raising it by 10 % (to 9.9) moves the result by −33.3 %, from 0.3027 to 0.2018.

w

Window value at this tap

· typical 0 to 1

The window value for this tap, from 0 to 1. Scales the tap in direct proportion. Raising it by 10 % (to 1.1) moves the result by +10 %, from 0.3027 to 0.333.

Worked example with the values above

  1. Delay: d = (N − 1)/2 = 4; offset n − d = −1.
  2. Argument: 2c(n − d) = −0.4, so sinc = 0.75683.
  3. h = 2c × sinc × w = 0.4 × 0.75683 × 1 = 0.30273.

Assumptions and limits

  • A symmetric, odd-length linear-phase FIR design with cutoffs in cycles per sample, between 0 and 0.5.
  • The window value w is for the same tap index n and the same length N.

Common mistakes

  • Using a cutoff in hertz where cycles per sample are needed.
  • Using an even length with a high-pass design, which places a null at Nyquist.
  • Forgetting to normalise the sum of the taps to one when unit DC gain is needed.

Statistics and uncertainty

Window-method designs meet their targets only approximately: a Kaiser-based tap count is a good estimate but is typically 5 % to 10 % off, so always check the achieved response and adjust the length.

Where it is used

  • Designing low-pass, high-pass and band-pass FIR filters by the window method.
  • Estimating filter length and delay before committing to a design.

Maths you need

  • Normalised sinc: sinc(x) = sin(πx)/(πx)
  • Cutoff in cycles per sample: c = fc/fs
  • Linear phase: a symmetric FIR has a constant delay of (N − 1)/2 samples

Related formulas

Practise this formula