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
- 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.
- 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
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| n Tap index | 0 to 1,000 | −0.07568 | 0.3027 | 0.3784 | +1 | +32.1 % |
| c Cutoff, cycles per sample | 0.001 to 0.499 cycles/sample | 0.002 | 0.3183 | 0.3163 | +10% | +3.28 % |
| N Number of taps | 3 to 1,001 taps | −0.0129 | 0.3027 | 0.3156 | +1 taps | −33.3 % |
| w Window value at this tap | 0 to 1 | 0 | 0.3027 | 0.3027 | +10% | +10 % |
Sweep of Tap index
| Tap index | Low-pass tap |
|---|---|
| 0 | −0.07568 |
| 125 | 0.002502 |
| 250 | 0.001231 |
| 375 | 8.16e-4 |
| 500 | 6.103e-4 |
| 625 | 4.875e-4 |
| 750 | 4.058e-4 |
| 875 | 3.476e-4 |
| 1,000 | 3.039e-4 |
Sweep one variable
Variables and how each one contributes
Low-pass tap
What the equation gives you. Everything else feeds it.
Cutoff, cycles per sample
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.
Tap index
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.
Number of taps
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.
Window value at this tap
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
- Delay: d = (N − 1)/2 = 4; offset n − d = −1.
- Argument: 2c(n − d) = −0.4, so sinc = 0.75683.
- 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