I am trying to rewrite some Python signal processing code in C++ and am stuck trying to figure out how to replicate behavior of lfilter with initial condition.
The documentation for lfilter says that the kwarg zi input is 'Initial conditions for the filter delays'. When I run lfilter and ippsIIR64f on the same data with the same filter coefficients and no delay, I get the same results. I tried using the IIRSetDlyLine function to set the delay line contents, but the results look wildly different (see image below).
Here is the code I used when setting the delay with IPP:
st |= ippsIIRSetDlyLine_64f(pStateIIR, pDlyLine);
versus in python:
signal.lfilter(brov, arov, data, axis = 0, zi=delayValues)
where pDlyLine and delayValues contain the same values.