Compute the transfer function coefficients of a Butterworth filter.
butter(n,...)## S3 method for class 'FilterSpecs'butter(n,...)## Default S3 method:butter( n, w, type = c("low","high","stop","pass"), plane = c("z","s"), output = c("Arma","Zpg","Sos"),...)
Arguments
n: filter order.
...: additional arguments passed to butter, overriding those given by n of class FilterSpecs.
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 in radians/second. For digital filters, w must be between 0 and 1 where 1 is the Nyquist frequency.
type: filter type, one of "low", (default) "high", "stop", or "pass".
plane: "z" for a digital filter or "s" for an analog filter.
output: Type of output, one of:
"Arma": Autoregressive-Moving average (aka numerator/denominator, aka b/a)
"Zpg": Zero-pole-gain format
"Sos": Second-order sections
Default is "Arma" for compatibility with the 'signal' package and the 'Matlab' and 'Octave' equivalents, but "Sos" should be preferred for general-purpose filtering because of numeric stability.
Returns
Depending on the value of the output parameter, a list of class Arma, Zpg, or Sos
containing the filter coefficients
Details
Butterworth filters have a magnitude response that is maximally flat in the passband and monotonic overall. This smoothness comes at the price of decreased rolloff steepness. Elliptic and Chebyshev filters generally provide steeper rolloff for a given filter order.
Because butter is generic, it can be extended to accept other inputs, using buttord to generate filter criteria for example.