I have been designing a bandpass filter with a passband between $95\textrm{ kHz}$ and $105\textrm{ kHz}$ (using MATLAB's fdatool and scipy.signal.remez in Python) and have noticed that as I increase the sampling frequency the number of coefficients needed to implement my filter increase. I was wondering why this is?

  • I presume it is either because the ratio between the band-pass size and the full frequency range (0 $\rightarrow$ Nyquist) gets lower and this causes it to be more difficult to achieve?

  • Or because the filter has to filter out a larger range of frequencies (e.g. for a $400\textrm{ kHz}$ clock it has to have coefficients that cause attenuation from $0\rightarrow 95\textrm{ kHz}$ and $105\textrm{ kHz}\rightarrow 200\textrm{ kHz}$ but for a $1\textrm{ MHz}$ clock it has to have coefficients that cause attenuation from $0\rightarrow 95\textrm{kHz}$ and $105\textrm{ kHz} \rightarrow 500\textrm{ kHz}$) and thus requires a larger number of coefficients to achieve?

  • $\begingroup$ just from a POV of dimensional analysis; consider an analog filter (or infinite sample rate). the impulse response may be infinitely long but practically it has a length to the point where the impulse response is indistinguishable from zero. that impulse response has a length in units of time (like seconds) and it turns out, dimensionally, to be inversely proportional to the transition bandwidths. now consider impulse-invariant method. then the number of samples of that impulse response must be equal to the length (in time) times the sample rate. proportional to sample rate. $\endgroup$ Aug 17 '16 at 19:25
  • 1
    $\begingroup$ @robertbristow-johnson great argument! OP is a physicist: Dear Random Physicist: remember the uncertainty principle? That's exactly what's happening. A filter response of bandwidth $b=100\text{ kHz}$, observed with a high sample rate $r=100\text{ MHz}$ is very well-located in frequency domain, right? Hence, its Fourier transform, the time domain representation of the same system, is very widely distributed. The "sharper" your filter edges become, the longer the temporal dimension of the filter, and hence, the longer the filter. $\endgroup$ Aug 17 '16 at 19:51
  • $\begingroup$ That completely makes sense Marcus and is a great way to think about it for us physicists, many thanks $\endgroup$ Aug 17 '16 at 21:55

For digital filters, all frequencies (and bandwidths) are relative to the sampling frequency. So a fixed bandwidth (in Hz) becomes relatively more narrow for a higher sampling frequency. You would get the same number of coefficients (for the same performance) if the ratio $B/f_s$ were constant, where $B$ is the filter's bandwidth and $f_s$ is the sampling frequency.

I think that is basically what you already suspected, even though I think that both reasons you gave are actually equivalent.

  • $\begingroup$ Is it ok when I link my answer dsp.stackexchange.com/questions/31066/… by editing your answer? $\endgroup$ Aug 17 '16 at 18:31
  • $\begingroup$ @MarcusMüller: Sure. If you think it's a duplicate then mark it as such. $\endgroup$
    – Matt L.
    Aug 17 '16 at 19:12
  • $\begingroup$ Thanks you Matt for your answer, that makes sense. And thank you Marcus for linking to the similar question you answered, the details there are very useful. $\endgroup$ Aug 17 '16 at 19:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.