# Electronic – Is group delay the same as the delay of a certain frequency

delayfilterphasephase shift

I know that group delay is the delay of the envelope, or the derivative of the phase with respect to $$\\omega\$$. What I want to know is what exactly happens in the time domain.

For instance take the following graph of the group delay of a bessel filter (there are several curves depending on the order of the filter) Consider the curve at the very top which is near the 0.6s mark, does it mean that if I inject a normalized 1.1Hz frequency into the filter, will that signal be time delayed almost 0.6s at the output? meaning that the difference in time between the output and the input at that frequency is 0.6s?

A thing that also makes me believe that the group delay means time delay is the step response. Here's the step response of the same Bessel Filter It seems like there is a delay from the 0 second point.

The group delay is a function of frequency, so you cannot really say it's the same as the delay of a certain frequency -- that would be a particular case. Also, the step response is an infinite sum of sines plus DC, which means that the Heaviside function is not really proper to determine the group delay (since you are measuring a combined effect of group delays, given the infinite sum of sines), particularly when negative group delays come into play. Exceptions to the rule are the linear phase FIRs.

So, the correct way to determine the delay (group or phase) at a certain frequency, is to feed the filter a harmonic signal, a sine, that has, ideally, no other harmonics than the fundamental. Whether you modulate the input with a gaussian pulse, or not, depends on your approach, but modulating the pulse diminishes the possible transient settling times associated with more "unruly" magnitude reponses around the corner frequency.

For the Bessel filter, the transients of the step response are very small (it's not quite critically damped), for Gaussian they're (ideally) null, but for Butterworth and up (Papoulis, Pascal, Chebyshev, etc), and even for transitional filters (Butterworth<->Bessel), the magnitude response around the corner frequency tends to be sharper and sharper, translating into less linear phase characteristics, thus a more "wobbly" derivative of the phase.

In time domain, this can be viewed as decaying oscillations. For a sudden input, such as a step, or cosine, the output will take time to settle until a proper measurement can be made. Modulating the input with a gaussian pulse, for example, will cause the derivative of the envelope to be smooth, thus mitigating the transients.

Consider the curve at the very top which is near the 0.6s mark, does it mean that if I inject a normalized 1.1Hz frequency into the filter, will that signal be time delayed almost 0.6s at the output? meaning that the difference in time between the output and the input at that frequency is 0.6s?

If you are referring to the particular reading of 0.6ms@1.1Hz, then yes. But take note that the group delay and the phase delay are different beasts. What you are measuring is called the phase delay, that is, the delay of the phase of the signal compared to the input. This becomes more apparent for filters with less linear phase. For example a 2nd order Chebyshev, fp=1Hz, 1dB ripple, has 302ms@1Hz (group delay is the dotted trace): If you run a time domain test with a 1Hz sine, modulated by a gaussian pulse (input is V(x)), this is what you get: and zoomed in: Notice that the reading says the difference is 234.67ms, which might be close to 302ms, but it's not it. If, on the other hand, we calculate the phase delay:

$$H(s)=\frac{1.1025103}{s^2+1.0977343*s+1.1025103}$$ $$t_{pd}(\omega)=-\frac{\arctan H(j\omega)}{\omega} =-\frac{\arctan\frac{1.1025103\omega}{1.1025103(1.1025103-\omega^2)}}{\omega}$$ $$t_{pd}(1\text{Hz})=\arctan\frac{1.1025103}{1.1025103^2-1)}=0.23518$$

Compare 235.18ms with 234.67ms, and you get really close, save minor misalignments of the cursors, roundings, few points/dec, etc. So you should take care what you are measuring.

I would've answered in the comments, but it deserves a bit more explanation. The Bessel filters are a happy case since they are approximations of the Laplace \$e^{-s}\$, which translates into more and more linear phase as the order goes higher. This, in turn, means constant group delay. So, at this point, you can see that the phase delay, calculated as above, means the phase divided by frequency (pulsation), which means a linear variable divided by another linear variable => constant. For the group delay, you have the derivative of a linear variable => constant. Here's how the plot of the two look like for the textbook definition of the 2nd order Bessel filter:

$$H(s)=\frac{3}{s^2+3s+3}$$ As you can see, both the phase delay (blue) and the group delay are flat and equal, at least until around the corner frequency, where the phase becomes less linear, thus the phase and the derivative diverge. If you increase the order to, say, 4:

$$H(s)=\frac{105}{s^4+10s^3+45s^2+105s+105}$$ The phase delay here is a bit approximated since I had to get around the atan2() quadrant limitations, but you can see that they get more similar.

So what you are measuring when you are trying to determine the single frequency input (as above) is actually the phase delay. The group delay would measuring the envelope (as you, yourself say it) of the modulated sine. Also see the paper I linked in the beginning, there are some nice explanations in there, worth reading.

I'll also give a few examples of why you cannot say that the step response gives you the "group delay" because, as stated in the beginning, the delay (phase or group) is a function of frequency and, unless you are talking about a linear phase FIR, you cannot say that a filter has a group (or phase) delay of X, or that the Heaviside function gives you the group (or phase) delay, because the delay varies with frequency.

Here's a 2nd order Bessel's step response and measure @50% rise time. Notice that the readings get closer to the DC value of the group delay as the order increases, but that number would only be an exact match if the filter had the ideal \$e^{-s}\$ transfer function, thus a constant delay from DC to light, which will never have since it is an approximation: and the readings of the group delay at DC and corner frequency: And here are the same two readings for an 8th order:

Just for comparison, a 5th order Chebyshev, 1dB ripple: