Designs a digital IIR Butterworth filter.
|
BUTTERWORTH( |
type, order, rate, pb1, pb2, ripple, attn, sb1, sb2) |
|
type |
- |
An integer, the filter type.
| ||||||||
|
order |
- |
Optional. An integer, the filter length. If not specified, the filter order is automatically estimated. | ||||||||
|
rate |
- |
A real, the sample rate of the filter in Hertz. | ||||||||
|
pb1 |
- |
A real, the first passband edge in Hertz. | ||||||||
|
pb2 |
- |
A real, the second passband edge in Hertz. | ||||||||
|
ripple |
- |
Optional. A real, the passband ripple in dB. Defaults to 3 dB. | ||||||||
|
attn |
- |
Optional. A real, the stopband attenuation in dB. Defaults to 40 dB. | ||||||||
|
sb1 |
- |
Optional. A real, the first stopband
edge frequency in Hertz. Defaults to | ||||||||
|
sb2 |
- |
Optional. A real, the second stopband
edge frequency in Hertz. Defaults to |
A series, the Butterworth filter coefficients in multi-stage cascade format.
W1: butterworth(1, 1000.0, 100.0)
W2: 20*log10(filtmag(W1, 1024));sety(-80, 10)

W1 creates a Butterworth lowpass filter with a sample rate of 1000 Hz, a cutoff frequency of 100 Hz and a stopband attenuation of 40 dB. The stopband frequency defaults to 150 Hz and the passband ripple defaults to 3 dB. W2 displays the frequency response of the filter.
W1: butterworth(1, 1000.0, 100.0)
W2: gsin(1000, 1/1000, 3) + gsin(1000, 1/1000, 250)
W3: iirfilter(W2, W1)

Creates the same IIR lowpass filter as the previous example. W2 contains a series with two sinusoids and W3 applies the filter to recover the lower frequency sinewave.
W2: butterworth(1, 1000.0, 100.0, 3.0, 50.0, 130.0)
Creates a similar filter except the stopband attenuation is set to 50 dB and the stopband edge is set to 130 Hz.
W3: butterworth(3, 18, 1000.0, 200.0, 300.0)
Creates a Butterworth bandpass filter with a sample rate of 1000 Hz, a filter order of 18 and a passband that extends from 200 Hz to 300 Hz.
W4: butterworth(3, 24, 1000.0, 200.0, 300.0, 2.0, 50.0, 180.0, 320.0)
Creates a similar Butterworth bandpass filter as above except the order is set to 24 (resulting in 121 coefficients), the desired passband ripple is set to 2 dB and the desired stopband attenuation is set to 50 dB. The first stopband edge is 180 Hz and the last stopband edge is set to 320 Hz.
The generic BUTTERWORTH filter specifications are depicted as follows:
Type = 1, Lowpass

Type = 2, Highpass

Type = 3, Bandpass

Type = 4, Bandstop

For filter type 1 and 2 (lowpass and highpass), the band frequencies pb2 and sb2 are omitted.
BUTTERWORTH uses the Bilinear Transform Method to compute the coefficients by converting an analog filter prototype to the digital domain. The filter order refers to the number of resulting poles (2X poles result for type 3 and type 4) and is not equivalent to the number of filter coefficients.
The bands edges must lie between 0.0 and 0.5 * rate (the Nyquist frequency). Overlapping band edges are not permitted.
The filter coefficients are produced in multi-stage bi-quad form suitable for processing by the CASCADE function.
A Butterworth filter has a maximally flat frequency response in the passband, though the passband is not necessarily uniformly flat. Butterworth filters generally result in more coefficients than other IIR filter types for a given filter specification.
See BANDPASS, BANDSTOP, HIGHPASS and LOWPASS to design linear phase FIR filters using the Remez Exchange method.
BUTTERWORTH requires the DADiSP/Filters Module.
Oppenheim and Schafer
Discrete Time Signal Processing
Prentice Hall, 1989
Digital Signal Processing Committee
Programs for Digital Signal Processing
I.E.E.E. Press, 1979
Bateman & Yates
Digital Signal Processing Design
Computer Science Press, 1989