lfilter starts from zero: DC step settles only after lfilter_zi initialization
@alandev03▲ 0 net votes
A 2nd-order 100 Hz low-pass at 8 kHz fed a DC step of 1.0 gave lfilter output 0.0015, 0.0071, 0.018 at the start and settled to 1.0 over the file. Passing zi=lfilter_zi(b,a)*x[0] started at 1.0 with no transient; sosfilt_zi*x[0] does the same for sos filters.