cheby1                package:signal                R Documentation

_G_e_n_e_r_a_t_e _a _C_h_e_b_y_s_h_e_v _f_i_l_t_e_r.

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

     Generate a Chebyshev type I or type II filter coefficients with
     specified dB of pass band ripple.

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

     ## Default S3 method:
     cheby1(n, Rp, W, type = c("low", "high", "stop",
     "pass"), plane = c("z", "s"), ...)

     ## S3 method for class 'FilterOfOrder':
     cheby1(n, Rp = n$Rp, W = n$Wc, type = n$type, ...)

     ## Default S3 method:
     cheby2(n, Rp, W, type = c("low", "high", "stop",
     "pass"), plane = c("z", "s"), ...)

     ## S3 method for class 'FilterOfOrder':
     cheby2(n, ...)

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

       n: filter order or generic filter model

      Rp: dB of pass band ripple 

       W: critical frequencies of the filter. 'W' must be a scalar for
          low-pass and high-pass filters, and 'W' must be a two-element
          vector 'c(low, high)' specifying the lower and upper bands.
          For digital filters, 'W' must be between 0 and 1 where 1 is
          the Nyquist frequency.

    type: Filter type, one of '"low"' for a low-pass filter, '"high"'
          for a high-pass filter, '"stop"' for a stop-band
          (band-reject) filter, or '"pass"' for a pass-band filter. 

   plane: '"z"' for a digital filter or '"s"' for an analog filter. 

     ...: additional arguments passed to 'cheby1' or 'cheby2',
          overriding those given by 'n' of class 'FilterOfOrder'. 

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

     Because 'cheby1' and 'cheby2' are generic, they can be extended to
     accept other inputs, using '"cheb1ord"' to generate filter
     criteria for example.

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

     An 'Arma' object with list elements: 

       b: moving average (MA) polynomial coefficients 

       a: autoregressive (AR) polynomial coefficients 

     For 'cheby1', the ARMA model specifies a type-I Chebyshev filter,
     and for 'cheby2', a type-II Chebyshev filter.

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

     Original Octave version by Paul Kienzle pkienzle@user.sf.net.
     Modified by Doug Stewart. Conversion to R by Tom Short.

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

     Parks & Burrus (1987). Digital Filter Design. New York: John Wiley
     & Sons, Inc.

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

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

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

     'Arma', 'filter', 'butter', 'ellip', and 'cheb1ord'

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

       # compare the frequency responses of 5th-order Butterworth and Chebyshev filters.
       bf = butter(5, 0.1)
       cf = cheby1(5, 3, 0.1)
       bfr = freqz(bf)
       cfr = freqz(cf)
       plot(bfr$f/pi, 20 * log10(abs(bfr$h)), type = "l", ylim = c(-40, 0),
            xlim = c(0, .5), xlab = "Frequency", ylab = c("dB"))
       lines(cfr$f/pi, 20 * log10(abs(cfr$h)), col = "red")
       # compare type I and type II Chebyshev filters.
       c1fr = freqz(cheby1(5, .5, 0.5))
       c2fr = freqz(cheby2(5, 20, 0.5))
       plot(c1fr$f/pi, abs(c1fr$h), type = "l", ylim = c(0, 1),
            xlab = "Frequency", ylab = c("Magnitude"))
       lines(c2fr$f/pi, abs(c2fr$h), col = "red")

