I've got a basic bandpass filter design that works great at higher frequencies, but breaks down at around 150 Hz. Here's the MATLAB code:

[b,a] = butter(4, [106 212]./(Fs/2));
output = filter(b,a,signal);

I also notice that decreasing the filter order lowers this "breakdown" frequency. This question asks a similar question and the answer does fix the problem, but I'm not sure I understand why.

Here are the filter coefficients for the given example (where it starts to break down):

B = 2.12e-09, 0.00e+00, -8.49e-09, 0.00e+00, 1.27e-08, 0.00e+00, -8.49e-09, 0.00e+00, 2.12e-09
A = 1.00e+00, -7.96e+00, 2.77e+01, -5.51e+01, 6.86e+01, -5.46e+01, 2.72e+01, -7.73e+00, 9.61e-01

…and here are coefficients for a slightly higher frequency (mid-band of 250 Hz), where it doesn't:

B = 2.45e-08, 0.00e+00, -9.82e-08, 0.00e+00, 1.47e-07, 0.00e+00, -9.82e-08, 0.00e+00, 2.45e-08
A = 1.00e+00, -7.93e+00, 2.75e+01, -5.46e+01, 6.76e+01, -5.37e+01, 2.66e+01, -7.55e+00, 9.36e-01
  • $\begingroup$ What's your sampling frequency? $\endgroup$ – Ben May 3 '18 at 23:31
  • 1
    $\begingroup$ I really think that hotpaw's answer in the question you linked answers this. $\endgroup$ – Tendero May 3 '18 at 23:34
  • $\begingroup$ @Ben Thanks for the comment. Sampling rate is 44100 Hz. $\endgroup$ – Rogare May 4 '18 at 1:16
  • $\begingroup$ 1 - use fdatool, freqz, fvtool to view the frequency response 2 - try increasing the order of the IIR, you will be able to get closer to a "brickwall" frequency response 3 - Alternative, Keep the same filter order, but increase your margins. Use 80 Hz as f1 and 300 Hz as f2 for example. $\endgroup$ – Ben May 4 '18 at 1:41
  • $\begingroup$ @Ben Thanks for this, though I'm not looking to solve the "breakdown" (did this by other means). Just want to understand what exactly in the filtering process causes the issue. $\endgroup$ – Rogare May 4 '18 at 1:54