Calculates the group delay of a

GRPDELAY(b, a, N, Fs, whole)

b |
- |
A series. The numerator (i.e. zero) coefficients in ascending powers of |
||||

a |
- |
A series. The denominator (i.e. pole) coefficients in ascending powers of |
||||

N |
- |
Optional. An integer, the number of output samples, defaults to 2048. |
||||

Fs |
- |
Optional. A real, the sample rate of data. If the rates of the numerator and denominator coefficients are equal, the rate defaults to the coefficient rate, else the rate defaults to 1.0. |
||||

whole |
- |
Optional. An integer or string, the evaluation contour. Valid inputs are:
If whole is a string, the transform is evaluated over the entire unit circle. |

GRPDELAY(c, N, Fs, whole)

c |
- |
A series. The system coefficients in cascaded |
||||

N |
- |
Optional. An integer, the number of output samples, defaults to 2048. |
||||

Fs |
- |
Optional. A real, the sample rate of data. Defaults to the rate of the coefficients. |
||||

whole |
- |
Optional. An integer or string, the evaluation contour. Valid inputs are:
If whole is a string, the transform is evaluated over the entire unit circle. |

A series, the group delay in samples.

W1: grpdelay({1}, {1, -0.5})

returns 512 samples of the group delay in W1.

W1: butterworth(1, 100.0, 10.0)

W2: grpdelay(w1, 1024)

creates a 10 Hz low pass BUTTERWORTH filter. W2 calculates and displays 1024 samples of the group delay response of the filter

The group delay is defined as:

Where phase(f) is the unwrapped phase response of the filter. To avoid difficulties in determining the unwrapped phase, the derivative is calculated by the following equivalent FFT expression:

where t is the time index series and h(t) is the impulse response of the filter.

GRPDELAY uses the above method evaluate N uniformly spaced samples of the group delay over the unit circle of a

z |
= |
e |

N |
= |
number of numerator terms |

M |
= |
number of denominator terms |

For grpdelay(c, N, Fs, whole), the input c is assumed to be a single column of coefficients in cascaded

or equivalently:

where G is the system gain, b_{k} and a_{k} are the filter coefficients for the k^{th} stage.

If c contains 2 columns, the coefficients are assumed to be in direct form, where the first column is b and the second column is a.

The amplitude of the group delay is in samples.

See IMPZ to display the impulse response of a

See ZFREQ to calculate the magnitude or phase response of a