# Aritifacts of time-varying IIR filters

I'm doing something like spatial audio algorithm using IIR modelled HRTFs. At each frame I get a direction information with azimuth and elevation, and then I have to find or interpolate the corresponding HRTF filter coefficients.

The problem is that time-varying filters will result in audible artifacts. My current solution is to apply a cross fade between each frame, which increases the total computational complexity. The artifacts are removed perfectly but I'm wondering if there is a better solution.

I've tried another method which updates the filter coefficient sample(s) by sample(s). The filter coefficients in the form of numerator and denominator polynomial are converted to $$K$$ parallel sections as $$H(z) = \frac{b_0+b_1z^{-1}+\ldots + b_Nz^{-N}}{1+a_1z^{-1}+\ldots + a_Nz^{-N}} = \sum_{k=1}^{K} \frac{B_{0k}+B_{1k}z^{-1}}{1+A_{1k}z^{-1} + A_{2k}z^{-2}} + C_0$$

For the beginning $$20K$$ samples, I update one parallel section every 20 samples. The updated section uses the previous section's filter state. But this only works when the direction (and the filter coefficient) varies slowly, e.g., 0.1 degrees per 20 ms. Although the output doesn't have audible discontinuities, but we can see some high-frequency noises from the spectrum. From this perspective I also tried a low-pass filter, but the artifacts are still very annoying when the filter changes not slowly enough.

To summary, my question is if there is a more computational efficient way, than cross fade, to reduce or remove the artifacts caused by time-varying IIR filters. Thank you in advance.

• you might want to consider Lattice filter topology instead of biquads in parallel. And here is how to convert from Direct form biquads to Lattice biquads Jul 29 at 5:52
• @robertbristow-johnson Hi robert and thank you. I'm not familiar with lattice structure but it has more multiplications than the other structures. I don't want a cross fade is just because its computational efficiency. Sorry for the confusion, I'll edit my question. Jul 29 at 6:32
• yes, Lattice is not as computationally efficient as are the Direct 1 or Direct 2 forms. but it's better for modulating coefficients. Jul 29 at 6:36
• @ZRHan: what topology do use for your sections? Direct Form I ? Jul 29 at 11:53
• @Hilmar yes, it’s direct form I. Jul 29 at 11:54