Your Equation

Library / Signal processing and digital filters / DSP-28

Signal processing and digital filters

Windowed-sinc band-pass tap

Unscaled coefficient of a windowed-sinc band-pass FIR filter at offset u = n − (N − 1)/2 from the centre, from two cutoffs c1 < c2 in cycles per sample (0 < c1 < c2 < 0.5), as the difference of two low-pass prototypes with the same window value w.

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

A band-pass filter passes the band between c1 and c2, so it is the difference of two low-pass filters with those cutoffs: h[n] = [2c₂ sinc(2c₂u) − 2c₁ sinc(2c₁u)]w[n], with u = n − (N − 1)/2. Use the same window and length for both prototypes. The coefficients here are unscaled; normalise for unit gain at the band centre if required.

Unscaled coefficient of a windowed-sinc band-pass FIR filter at offset u = n − (N − 1)/2 from the centre, from two cutoffs c1 < c2 in cycles per sample (0 < c1 < c2 < 0.5), as the difference of two low-pass prototypes with the same window value w.

Calculator

Solve for
cycles/sample
0.0010.2
cycles/sample
0.210.499
samples
−5050
01
  • Low-pass tap at c₂0.3027
  • Low-pass tap at c₁0.1871
  • Band centre, (c₁ + c₂)/20.2 cycles/sample

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.

Band-pass tap () current value 0.1156
uOffset from the filter centreKey driver
−0.08270.4
c2Upper cutoff
−0.1850.131
c1Lower cutoff
−5.55e-170.301
wWindow value at this tap
0
  • The band-pass tap at offset 1 is 0.1156, the difference of two low-pass taps of 0.3027 and 0.1871.
  • The passband is centred at 0.2 cycles per sample with a width of 0.2; the centre tap equals 2(c₂ − c₁), so a narrow band means small taps.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
u Offset from the filter centre−50 to 50 samples−0.08270.40.4827+2 samples−241 %
c2 Upper cutoff0.21 to 0.499 cycles/sample−0.18510.13120.3163+10%−20.6 %
c1 Lower cutoff0.001 to 0.2 cycles/sample−5.551e-170.30070.3007+10%−13.7 %
w Window value at this tap0 to 1 00.11560.1156+10%+10 %

Sweep of Offset from the filter centre

Offset from the filter centre (samples)Band-pass tap
−50−6.083e-17
−37.50.01698
−256.083e-17
−12.5−0.05093
00.4
12.5−0.05093
256.083e-17
37.50.01698
50−6.083e-17

Sweep one variable

Band-pass tap ()Hover, touch, or use the arrow keys on the chart
−0.200.20.4 −40−2002040 Offset from the filter centre (samples) now 0.1156

Variables and how each one contributes

h[n]

Band-pass tap

Result ·

What the equation gives you. Everything else feeds it.

c1

Lower cutoff

cycles/sample · typical 0.001 to 0.2

The lower cutoff, in cycles per sample. Raising it narrows the passband from below and lowers the subtracted term’s weight. Raising it by 10 % (to 0.11) moves the result by −13.7 %, from 0.1156 to 0.09983.

c2

Upper cutoff

cycles/sample · typical 0.21 to 0.499

The upper cutoff, in cycles per sample. Raising it widens the passband from above. Raising it by 10 % (to 0.33) moves the result by −20.6 %, from 0.1156 to 0.09184.

u

Offset from the filter centre

samples · typical −50 to 50

The offset from the centre tap, in samples. Moves away from the centre, where both sinc terms are largest. Raising it by 10 % (to 1.1) moves the result by −40.2 %, from 0.1156 to 0.06913.

w

Window value at this tap

· typical 0 to 1

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

Worked example with the values above

  1. Upper prototype: 2c₂ sinc(2c₂u) = 0.6 × 0.50455 = 0.30273.
  2. Lower prototype: 2c₁ sinc(2c₁u) = 0.2 × 0.93549 = 0.1871.
  3. h = (0.30273 − 0.1871) × 1 = 0.11563.

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