1
$\begingroup$

Given some difference equation for a filter like

$y[k] = ax[k] + bx[k-1]+ cy[k-1]$,

how would you initialize it? Since it needs an old output value (feedback) to calculate the new output value, it seems like the equation will keep on chasing its own tail. I would be tempted to just let

$y[k-1] = x[k-1]$

initially to calculate a value for $y[k]$ after which we could just use that for $y[k-1]$. There might be a better technique for this problem or even a really obvious solution to it, but I am at a loss on how. Most of the digital filter books/papers that I have read have done a great job on explaining how the filter gets derived, but the practical implementation requirements seem to be absent.

This is also my first time posting on Stack Exchange, so any comments on etiquette or style would be appreciated. Just be gentle ;)

$\endgroup$
  • $\begingroup$ Set unknown parameters to zero. This is equivalent to the original input signal. $\endgroup$ – Alexey K Mar 19 at 8:11
3
$\begingroup$

If there is no good reason to choose otherwise, you would initialize with zeros, so in your case $y[-1]=0$. Other initializations may be useful in certain situations, e.g., when processing blocks of data to avoid transients between blocks.

Note that if the filter is stable (which it has to be in almost all useful applications), the influence of the initial condition on the output becomes negligible after a while.

$\endgroup$

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.