Ok, so the situation is that I have a DFII biquad with some filter coefficients:
\begin{align} w[n] &= x[n] - a_1*w[n-1] - a_2*w[n-2]\\ y[n] &= b_0*w[n] + b_1*w[n-1] + b_2*w[n-2] \end{align}
While the filter is running, I change the coefficients and I believe my filter is going unstable. I want to build in a check that it is going to be stable. Currently, I simply check that the poles lie inside the unit circle by checking my $a_n$ coefficients. But it doesn't work. I believe that the problem is that I have non-zero values in my states (i.e. $w[-1]$ and $w[-2]$) and my stability check doesn't even consider this. I cannot reset my states while the filter is running without producing an audible click.
The questions: How do I check for stability of a filter with non-zero initial conditions?
I have a couple thoughts for solutions:
Simply take the $\mathcal Z$-tranform of the impulse response (of the feedback portion), which looks something like this: $$ h[n] = \begin{cases} 0 & n < 0\\ 1 - a_1*K_1 - a_2*K_2 & n = 0\\ 0 - a_1*h[0] - a_2*K_1 & n = 1\\ - a_1*h[n-1] - a_2*h[n-2] & n \ge 2 \end{cases} $$
Solve the difference equation à la differential equations: $$ h[n] + a_1*h[n-1] + a_2*h[n-2] = 0, n \ge 2 $$
Or prove that the sequence $h[n]$ (from above) converges $$ \sum_{n=0}^{\infty}\lvert h[n]\rvert < \infty $$
Am I on the right track? I can't seem to figure out the solution for any of these methods.