1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$ Commented Nov 13, 2023 at 8:55
  • $\begingroup$ I found this question and the answers also very educative regarding settling time. $\endgroup$ Commented Nov 13, 2023 at 8:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.