grpdelay               package:signal               R Documentation

_G_r_o_u_p _d_e_l_a_y _o_f _a _f_i_l_t_e_r _o_r _m_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     The group delay of a filter or model. The group delay is the time
     delay for a sinusoid at a given frequency.

_U_s_a_g_e:

     ## Default S3 method:
     grpdelay(filt, a = 1, n = 512, whole = FALSE, Fs = NULL, ...)

     ## S3 method for class 'Arma':
     grpdelay(filt, ...)

     ## S3 method for class 'Ma':
     grpdelay(filt, ...)

     ## S3 method for class 'Zpg':
     grpdelay(filt, ...)

     ## S3 method for class 'grpdelay':
     plot(x, ...)

     ## S3 method for class 'grpdelay':
     print(x, ...)

_A_r_g_u_m_e_n_t_s:

    filt: for the default case, the moving-average coefficients of an
          ARMA model or filter. Generically, 'filt' specifies an
          arbitrary model or filter operation.

       a: the autoregressive (recursive) coefficients of an ARMA
          filter. 

       n: number of points at which to evaluate the frequency response. 

   whole: ''half'' or 'FALSE' (the default) to evaluate around the
          upper half of the unit circle or 'whole'' to evaluate around
          the entire unit circle. 

      Fs: sampling frequency in Hz. If not specified, the frequencies
          are in radians. 

       x: object to be plotted. 

     ...: for methods of 'grpdelay', arguments are passed to the
          default method. For 'plot.grpdelay', additional arguments are
          passed through to 'plot'. 

_D_e_t_a_i_l_s:

     For fastest computation, 'n' should factor into a small number of
     small primes.

     If the denominator of the computation becomes too small, the group
     delay is set to zero.  (The group delay approaches infinity when
     there are poles or zeros very close to the unit circle in the z
     plane.)

     When results of 'grpdelay' are printed, the group delay will be
     plotted. As with 'lattice' plots, automatic printing does not work
     inside loops and function calls, so explicit calls to 'print' or
     'plot' are needed there.

_V_a_l_u_e:

     A list of class 'grpdelay' with items: 

     gd : the group delay, in units of samples.  It can be converted to
          seconds by multiplying by the sampling period (or dividing by
          the sampling rate 'Fs').

      w : frequencies at which the group delay was calculated.

     ns : number of points at which the group delay was calculated.

 HzFlag : 'TRUE' for frequencies in Hz, 'FALSE' for frequencies in
          radians.

_A_u_t_h_o_r(_s):

     Original Octave version by Julius O. Smith III and Paul Kienzle.
     Conversion to R by Tom Short.

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://ccrma.stanford.edu/~jos/filters/Numerical_Computation_Group_Delay.html>

     <URL: http://en.wikipedia.org/wiki/Group_delay>

     Octave Forge <URL: http://octave.sf.net>

_S_e_e _A_l_s_o:

     'filter', 'Arma', 'freqz'

_E_x_a_m_p_l_e_s:

     # Two Zeros and Two Poles
     b = poly(c(1/0.9*exp(1i*pi*0.2), 0.9*exp(1i*pi*0.6)))
     a = poly(c(0.9*exp(-1i*pi*0.6), 1/0.9*exp(-1i*pi*0.2)))
     grpdelay(b, a, 512, 'whole', 1)

