1

I have constructed a high pass filter using scipy:

l_freq = 0.1
fs = 500
normal_cutoff = l_freq / (0.5 * fs)
sos = butter(4, normal_cutoff, btype = 'high', output = 'sos')
scipy_iir_continuous_data = sosfilt(sos, data)

As well as a bandpass filter using scipy:

l_freq = 1
h_freq = 4
normal_cutoff = [l_freq / (0.5 * fs), h_freq / (0.5 * fs)]
sos = butter(4, normal_cutoff, btype = 'bandpass', output = 'sos')
scipy_iir_continuous_data = sosfilt(sos, data)

I would like to calculate an approximate settling time, or number of samples I need to filter and then discard to arrive at an approximate steady state.

I looked at this answer as well as this old thesis (which seem to have different solutions), but can't figure out how to apply a general settling time formula for a high pass, a low pass, and a bandpass filter given the sampling frequency and the cutoff frequencies.

Thanks for your help.

MBaz
  • 15,314
  • 9
  • 30
  • 44
  • Here is also an interesting approach for estimating the settling time via Schroeder Integration method. However, no matter which solution, the estimation of settling time in the context of IIR filters also depends on a threshold (like the 60dB for accoustics, or a certain % of rise time). My additional question regarding this subject would be how to choose this threshold? – Irreducible Nov 13 '23 at 08:55
  • I found this question and the answers also very educative regarding settling time. – Irreducible Nov 13 '23 at 08:56

0 Answers0