Construct initial conditions for sosfilt for step response steady-state.

Compute an initial state zi for the sosfilt function that corresponds to the steady state of the step response.

A typical use of this function is to set the initial state so that the output of the filter starts at the same value as the first element of the signal to be filtered.


sos (array_like) – Array of second-order filter coefficients, must have shape (n_sections, 6). See sosfilt for the SOS filter format specification.


zi – Initial conditions suitable for use with sosfilt, shape (n_sections, 4).

Return type:


See also

sosfilt, zpk2sos