# How to quantify phase distortion of a filter specific to a signal?

For example, a EKG input signal is filtered with a known transfer function that does not have linear phase. How do you quantify the phase distortion of the output signal given you have the input? I know that the phase response of the transfer function gives the phase delay at all frequencies but I'm not sure how to make use of this.

• Right now (without reference to phase), how do you quantify the observed distortion ? And what do yo call it ? Dec 7, 2019 at 2:24
• Right now I'm just visually observing how the filtered signal deviates from the original... the input signal should be within the pass band. So the distortions I'm seeing are likely due to the phase response of the filter Dec 7, 2019 at 2:57
• I've added an image to hopefully clarify what I'm after Dec 7, 2019 at 3:02
• So assuming that the whole signal was within the pass band (of flat unity gain) then any distortion is due to phase shifts and you can quantify it but it won't as simple as a two sinusoid problem, because your real ECG signal will be quite complicated... Dec 7, 2019 at 3:11
• Yea the paper is quite old and they used the sinusoids as a proxy for EKG signals. Do you have any suggestions on how to go about quantifying the phase distortion? Dec 7, 2019 at 3:23

## 1 Answer

For a phase distortion metric I recommend using “group delay variation”. The definition of Group Delay is the negative derivative of phase with respect to frequency. The Group Delay is the delay in time that “group” of signals over a band of frequencies would have. A frequency response that is linear in phase (constant group delay with no variation) is not considered a distortion since all the frequency components would have the same delay so no actual distortion of the signal results. When the phase is not linear versus frequency (as in your plots) different frequency components of the signal arrive at different times at the output of the system, which can result in considerable distortion. Group Delay variation can be quantified as peak variation, peak to peak, or rms as in any other distortion metric.

As MattL points out in the comments below, a more comprehensive metric would be deviation from linear phase, where linear phase strictly means proportional to frequency with no phase offset term. If a phase offset exists, it would not appear in the result for the group delay computation yet indeed contribute to a distortion due to a varying delay versus frequency (the Hilbert Transformer is an excellent example of this: in order for all frequency components to have a 90° relationship with the input waveform, each component must have a different delay). For further details on this see Matt's answer here:

• Dan, group delay variation can be misleading. Take as an example an ideal Hilbert transformer. Apart from $\omega=0$, the magnitude and the the group delay are constant, yet any input signal appears distorted at the output. I think that in general the actually important measure is the deviation of the phase from a linear phase $a\omega$. Dec 8, 2019 at 10:46
• @MattL. Thanks for this, I recall the point about quadrature hybrids being dispersive networks and now I realize I am further confused as the ideal Hilbert transformer itself would have linear phase, or if the slope being 0 is an exception we can extend that to a phase tracking network with one as a linear phase filter and the other with the same phase + 90 degrees. (I see the only difference is a constant phase offset and regardless of the actual phase offset any such offset will cause a variation in delay?) If this isn’t already answered I will post this as a separate question. Dec 8, 2019 at 11:47
• Yes, I think it would be important to have this as a separate question on this site (and hopefully with an appropriate answer :) Dec 8, 2019 at 11:58
• Done! Looking forward to your answer Dec 8, 2019 at 12:25