Library / Signal processing and digital filters / DSP-29
Signal processing and digital filters
Time delay of a symmetric linear-phase FIR
Constant group delay in seconds of a symmetric (or antisymmetric) linear-phase FIR filter with N taps at sampling rate fs.
- Ref
- DSP-29
- Rev
- v1
- Field
- Signal processing and digital filters
- Result
- τ [s]
A symmetric (or antisymmetric) FIR filter of N taps has linear phase, and every frequency is delayed by the same (N − 1)/2 samples, which is (N − 1)/(2fs) seconds. The delay holds at all frequencies where the response is not zero. For even N the delay is a half-integer number of samples. Linear phase preserves waveform shape at the cost of this latency.
Constant group delay in seconds of a symmetric (or antisymmetric) linear-phase FIR filter with N taps at sampling rate fs. Even N gives a half-sample delay. It holds at frequencies where the response is not zero.
Calculator
- Delay in samples, (N − 1)/215.5 samples
- Delay in milliseconds15.5 ms
- Taps for a 10 ms delay at this rate, 0.02fs + 121 taps
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.
- A 32-tap filter delays the signal by 15.5 samples, 15.5 ms at 1,000 Hz.
- The length is even, so the delay is a half-integer number of samples. Longer filters sharpen the transition at the cost of more delay.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (s) | Local step | Change in result |
|---|---|---|---|---|---|---|
| fs Sampling rate | 1 to 1e7 Hz | 1.55e-6 | 15.5 | 15.5 | +10% | −9.09 % |
| N Number of taps | 2 to 4,096 taps | 5e-4 | 2.047 | 2.047 | +1 taps | +3.23 % |
Sweep of Number of taps
| Number of taps (taps) | Filter delay (s) |
|---|---|
| 2 | 5e-4 |
| 5.187 | 0.002 |
| 13.45 | 0.006 |
| 34.9 | 0.017 |
| 90.51 | 0.045 |
| 234.8 | 0.117 |
| 608.9 | 0.304 |
| 1,579 | 0.789 |
| 4,096 | 2.047 |
Sweep one variable
Variables and how each one contributes
Filter delay
What the equation gives you. Everything else feeds it.
Number of taps
The number of taps. Raises the delay in direct proportion. Raising it by 10 % (to 35.2) moves the result by +9.68 %, from 0.0155 to 0.017 s.
Sampling rate
The sampling rate, in Hz. A higher rate shortens the delay in seconds for the same tap count. Raising it by 10 % (to 1,100) moves the result by −9.09 %, from 0.0155 to 0.01409 s.
Worked example with the values above
- Delay in samples: (N − 1)/2 = (32 − 1)/2 = 15.5.
- Divide by the sampling rate: 15.5 / 1,000 Hz.
- τ = 0.0155 s.
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