MATLAB: How is the time varying IIR filter implemented when using the Digital Filter design block in Signal Processing Blockset 6.4 (R2006b)

I'm using the Digital Filter block to implement a time-varying IIR filter (poles and zeros), but it seems to be producing incorrect output.

Best Answer

Documentation on the algorithm used to implement time varying IIR filter is missing. Here is additional information on the algorithm for time varying IIR filter:
At each time step the following calculations are performed:
% calculate output
y(n) = (b(1)x(n) + z1(n-1))/a(1);
% update states
% code for 3rd order filter
z1(n) = b(2)x(n) + z2(n-1) - a(2)y(n);
z2(n) = b(3)x(n) + z3(n-1) - a(3)y(n);
z3(n) = b(4)x(n) - a(4)y(n);