pythonscipybutterworth

scipy butterworth filter has no delay? What's the trick?


On the following graph:

enter image description here On the following graph:

enter image description here

Question:

Both custom implementations have delay while scipy's does not have. What's the trick?

Note: Custom implementations don't give the same result because they don't have the same coeff.


Solution

  • I'm using filtfilt function.

    Based on Warren Weckesser comment, I went to documentation and it states that

    This function applies a linear digital filter twice, once forward and once backwards. The combined filter has zero phase and a filter order twice that of the original.

    https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.filtfilt.html