Delay

The group delay of a filter is a measure of the average time delay of the filter as a function of frequency. It is defined as the negative first derivative of a filter's phase response. If the complex frequency response of a filter is H(e), then the group delay is

τg(ω)=dθ(ω)dω

where θ(ω) is the phase, or argument of H(e). Compute group delay with

[gd,w] = grpdelay(b,a,n)

which returns the n-point group delay, τg(ω), of the digital filter specified by b and a, evaluated at the frequencies in vector w.

The phase delay of a filter is the negative of phase divided by frequency:

τp(ω)=θ(ω)ω

To plot both the group and phase delays of a system on the same FVTool graph, type

[z,p,k] = butter(10,200/1000); 
fvtool(zp2sos(z,p,k),'Analysis','grpdelay', ...
   'OverlayedAnalysis','phasedelay','Legend','on')