cheby1 | R Documentation |
Compute the transfer function coefficients of a Chebyshev Type I filter.
cheby1(n, ...)
## S3 method for class 'FilterSpecs'
cheby1(n, ...)
## Default S3 method:
cheby1(
n,
Rp,
w,
type = c("low", "high", "stop", "pass"),
plane = c("z", "s"),
output = c("Arma", "Zpg", "Sos"),
...
)
n |
filter order. |
... |
additional arguments passed to |
Rp |
dB of passband ripple. |
w |
critical frequencies of the filter. |
type |
filter type, one of |
plane |
"z" for a digital filter or "s" for an analog filter. |
output |
Type of output, one of:
Default is |
Chebyshev filters are analog or digital filters having a steeper roll-off than Butterworth filters, and have passband ripple (type I) or stopband ripple (type II).
Because cheby1
is generic, it can be extended to accept other inputs,
using cheb1ord
to generate filter criteria for example.
Depending on the value of the output
parameter, a list of
class Arma
, Zpg
, or Sos
containing the filter coefficients
Paul Kienzle, pkienzle@users.sf.net,
Doug Stewart, dastew@sympatico.ca.
Conversion to R Tom Short,
adapted by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
https://en.wikipedia.org/wiki/Chebyshev_filter
Arma
, filter
, butter
,
ellip
, cheb1ord
, FilterSpecs
## 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$w / pi, 20 * log10(abs(bfr$h)), type = "l", ylim = c(-40, 0),
xlim = c(0, .5), xlab = "Frequency", ylab = c("dB"))
lines(cfr$w / 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$w / pi, abs(c1fr$h), type = "l", ylim = c(0, 1),
xlab = "Frequency", ylab = c("Magnitude"))
lines(c2fr$w / pi, abs(c2fr$h), col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.