Phase Delay and Group Delay¶
We use the notation of the overview. Let \(\phi(\omega)\) be the phase response of a filter, defined in The Transfer Function and Frequency Response. The phase response records a shift at each frequency; two derived quantities express that shift as a time.
Definition: phase delay
The phase delay at frequency \(\omega\) is $$ \tau_\phi(\omega) = -\frac{\phi(\omega)}{\omega} . $$ It is the time by which the filter retards a pure sinusoid of frequency \(\omega\).
Definition: group delay
The group delay is $$ \tau_g(\omega) = -\frac{d\phi}{d\omega}(\omega) . $$ It is the time by which the filter retards the envelope of a narrowband signal centered at \(\omega\).
When the group delay is not constant in \(\omega\), distinct frequency components of a transient emerge at distinct times, and the signal is said to be dispersed. The filter classes treated in Linear-Phase and Minimum-Phase Filters are distinguished by the behavior of their group delay.
Example: a pure delay
The filter that reproduces its input shifted by \(t_0\) has impulse response \(h(t) = \delta(t - t_0)\) and frequency response \(H(i\omega) = e^{-i\omega t_0}\), so \(\phi(\omega) = -\omega t_0\). Both the phase delay and the group delay equal \(t_0\) at every frequency: the filter delays the whole signal uniformly and distorts nothing.
In discrete time
The group delay of a filter given by its taps is computed from the sampled phase response; it is expressed in samples, and multiplying by \(1/f_s\) converts it to seconds. A pure delay of \(m\) samples has taps equal to the unit impulse shifted to index \(m\).
A pure delay of two samples has constant group delay equal to two:
import numpy as np
from scipy.signal import group_delay
h = np.array([0.0, 0.0, 1.0]) # unit impulse delayed by two samples
w, gd = group_delay((h, 1), w=512)
assert np.allclose(gd, 2.0)
References¶
- Group delay and phase delay (Wikipedia).