I have a 1st order lowpass IIR filter of the form

$ H(z) = \frac{b_{0} +b_{1} z^{-1}}{1+a_{1} z^{-1}} $

implemented using the direct method my code looks something like this

state1=signal x-state2*a1;

that has a cutoff frequency X that has been calculated from the fundamental frequency of signal x. Now given that the fundamental frequency of signal x changes and it takes me time "t" to detect this new frequency, is there any way I can reduce the transient response that I see from resetting the states to zero and changing the a and b coefficiets (by logging the states, old filter output or other data over time "t" and using this to calculate the new states rather than resetting them to 0) ? Or would someone be able to provide me with a signpost as to what topics i should be googling?

  • 1
    $\begingroup$ Just change the coefficients and do not reset the state. $\endgroup$
    – Matt L.
    Dec 10, 2014 at 14:31
  • $\begingroup$ Do you see transients when changing coefficients? $\endgroup$ Dec 10, 2014 at 18:23

1 Answer 1


How about running two filters parallel with each other. Both filters get the same input signal but only one filter will output the filtered signal because there is a crossfader behind them which will pass only one of the filters output. You can change the parameters of the currently offline filter, and fade the crossfader to it. Parameter changing without any transient.

Transient free iir parameter changing


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.