scipy.signal.
lfiltic#
- scipy.signal.lfiltic(b,a,y,x=None)[source]#
Construct initial conditions for lfilter given input and output vectors.
Given a linear filter (b, a) and initial conditions on the outputyand the inputx, return the initial conditions on the state vector ziwhich is used by
lfilterto generate the output given the input.- Parameters:
- barray_like
Linear filter term.
- aarray_like
Linear filter term.
- yarray_like
Initial conditions.
If
N=len(a)-1, theny={y[-1],y[-2],...,y[-N]}.Ify is too short, it is padded with zeros.
- xarray_like, optional
Initial conditions.
If
M=len(b)-1, thenx={x[-1],x[-2],...,x[-M]}.Ifx is not given, its initial conditions are assumed zero.
Ifx is too short, it is padded with zeros.
- Returns:
- zindarray
The state vector
zi={z_0[-1],z_1[-1],...,z_K-1[-1]},whereK=max(M,N).
See also
On this page