cheb2ord: Chebyshev Type II filter order

View source: R/cheb2ord.R

cheb2ordR Documentation

Chebyshev Type II filter order

Description

Compute Chebyshev type-II filter order and cutoff for the desired response characteristics.

Usage

cheb2ord(Wp, Ws, Rp, Rs, plane = c("z", "s"))

Arguments

Wp, Ws

pass-band and stop-band edges. For a low-pass or high-pass filter, Wp and Ws are scalars. For a band-pass or band-rejection filter, both are vectors of length 2. For a low-pass filter, Wp < Ws. For a high-pass filter, Ws > Wp. For a band-pass (Ws[1] < Wp[1] < Wp[2] < Ws[2]) or band-reject (Wp[1] < Ws[1] < Ws[2] < Wp[2]) filter design, Wp gives the edges of the pass band, and Ws gives the edges of the stop band. For digital filters, frequencies are normalized to [0, 1], corresponding to the range [0, fs / 2]. In case of an analog filter, all frequencies are specified in radians per second.

Rp

allowable decibels of ripple in the pass band.

Rs

minimum attenuation in the stop band in dB.

plane

"z" for a digital filter or "s" for an analog filter.

Value

A list of class 'FilterSpecs' with the following list elements:

n

filter order

Wc

cutoff frequency

type

filter type, normally one of "low", "high", "stop", or "pass".

Author(s)

Paul Kienzle, Charles Praplan.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

See Also

cheby1

Examples

## low-pass 30 Hz filter
fs <- 128
spec <- cheb2ord(30/(fs/2), 40/(fs/2), 0.5, 40)
cf <- cheby2(spec)
freqz(cf, fs = fs)


gsignal documentation built on Sept. 12, 2024, 6:27 a.m.