I\'m designing a bandpass filter in scipy following the cookbook. However, if I decrecrease the filtering frequencies too much I end up with garbage at high order filters. What
b, a = butter
for high-order filters, whether in Matlab or SciPy or Octave. Transfer function format has numerical stability problems, because some of the coefficients are very large while others are very small. This is why we changed the filter design functions to use zpk format internally. To see the benefits of this, you need to use z, p, k = butter(output='zpk')
and then work with poles and zeros instead of numerator and denominator.sos = butter(output='sos')
and then filter using sosfilt() or sosfiltfilt(). This is the recommended way to filter for most applications.