Library / Signal processing and digital filters / DSP-44
Signal processing and digital filters
Group delay from neighbouring phase samples
Secant estimate of group delay near the midpoint of two nearby frequencies ω₁ and ω₂ (rad/sample), from their unwrapped phases in radians.
- Ref
- DSP-44
- Rev
- v1
- Field
- Signal processing and digital filters
- Result
- D [samples]
Group delay is the negative slope of the unwrapped phase against frequency, D = −dφ/dω, in samples when ω is in rad/sample. A secant through two nearby points, −(φ₂ − φ₁)/(ω₂ − ω₁), estimates it near their midpoint. It is meaningless near zeros of the response and across phase jumps, so use unwrapped phase and closely spaced points.
Secant estimate of group delay near the midpoint of two nearby frequencies ω₁ and ω₂ (rad/sample), from their unwrapped phases in radians. Exclude zeros of the response and intervals that contain unresolved phase jumps.
Calculator
- Phase change, φ₂ − φ₁−0.3 rad
- Frequency interval, ω₂ − ω₁0.1 rad/sample
- Midpoint frequency0.15 rad/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.
- Near 0.15 rad/sample the group delay is 3 samples.
- A constant delay across the band means a linear phase and an undistorted waveform; here the phase and delay are measured at one interval only, so check the delay over the whole passband.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (samples) | Local step | Change in result |
|---|---|---|---|---|---|---|
| φ1 Unwrapped phase at ω₁ | −50 to 50 rad | −494 | 506 | 1,000 | +2 rad | +667 % |
| φ2 Unwrapped phase at ω₂ | −50 to 50 rad | −503 | 497 | 1,000 | +2 rad | −667 % |
| ω1 First frequency | 0.01 to 0.19 rad/sample | 1.579 | 30 | 28.42 | +10% | +11.1 % |
| ω2 Second frequency | 0.21 to 3 rad/sample | 0.1034 | 3 | 2.897 | +10% | −16.7 % |
Sweep of Unwrapped phase at ω₂
| Unwrapped phase at ω₂ (rad) | Group delay (samples) |
|---|---|
| −50 | 497 |
| −37.5 | 372 |
| −25 | 247 |
| −12.5 | 122 |
| 0 | −3 |
| 12.5 | −128 |
| 25 | −253 |
| 37.5 | −378 |
| 50 | −503 |
Sweep one variable
Variables and how each one contributes
Group delay
What the equation gives you. Everything else feeds it.
Unwrapped phase at ω₁
The unwrapped phase at the first frequency, in rad. A more negative first phase lowers the phase change and so the delay estimate. Raising it by 10 % (to −0.33) moves the result by −10 %, from 3 to 2.7 samples.
Unwrapped phase at ω₂
The unwrapped phase at the second frequency, in rad. A more negative second phase raises the delay estimate. Raising it by 10 % (to −0.66) moves the result by +20 %, from 3 to 3.6 samples.
First frequency
The first frequency, in rad/sample. Moves the left end of the interval and changes the slope for fixed phases. Raising it by 10 % (to 0.11) moves the result by +11.1 %, from 3 to 3.333 samples.
Second frequency
The second frequency, in rad/sample. A wider interval for the same phase change lowers the delay. Raising it by 10 % (to 0.22) moves the result by −16.7 %, from 3 to 2.5 samples.
Worked example with the values above
- Phase change: φ₂ − φ₁ = −0.6 − (−0.3) = −0.3 rad.
- Frequency step: ω₂ − ω₁ = 0.1 rad/sample.
- D = −−0.3 / 0.1 = 3 samples.
Assumptions and limits
- A stable, linear, time-invariant filter at a steady sinusoidal frequency in rad/sample.
- Phase that is consistently unwrapped, with magnitude not equal to zero at the frequency used.
Common mistakes
- Using wrapped phase, where the 2π jumps give wild delays.
- Taking points so far apart that the phase is not linear between them.
- Using it near a zero of the response, where the phase is not defined.
Statistics and uncertainty
Phase and group delay come from phase differences, so they amplify noise where the magnitude is small and fail at zeros of the response. A secant estimate also carries an error of order Δω² times the third derivative of phase.
Where it is used
- Evaluating gain, phase and delay of a digital filter at a chosen frequency.
- Combining sections and predicting zero-phase filtering.
Maths you need
- Frequency response: H(ω) evaluated on the unit circle
- Group delay: the negative slope of phase against frequency
- Phase delay: the negative phase divided by frequency