I'm attempting to build a time domain low-pass Thiran filter (in Python if that is relevant) based on the original article:


and The Digital Signal Processing Handbook:

$$ H(z)=\frac{(2N)!}{N!}\frac{1}{\displaystyle\prod_{i=N+1}^{2N}2\tau+i}\frac{1}{\displaystyle\sum_{k=0}^N(-1)^k\binom{N}{k}\prod_{i=0}^N\frac{2\tau+i}{2\tau+k+i}z^{-k}} $$

I believe I understand enough to rearrange this to the difference equation:

$$ y[n]=\frac{(2N)!}{N!}\frac{1}{\prod_{i=N+1}^{2N}2\tau+i}x[n]-\sum_{k=1}^N(-1)^k\binom{N}{k}\prod_{i=0}^N\frac{2\tau+i}{2\tau+k+i}y[n-k] $$

My issue is applying this to any function blows the values for $y[n]$ to inf for any $N>1$ since the first few coefficients for $k$ are all $>1$. using the examples given in the Thiran paper for $\tau=4$ and $N=5,10,15$ have this problem so I figure there is an oversight in my implementation.

For $N=1$ I can push up $\tau$ to the point the filter works reasonably well. I assume I am missing some normalisation detail, however I'm not very well informed on this area.

Any help pointing to my mistake would be appreciated.

  • 1
    $\begingroup$ Thiran filters are typically used to build fractional delay allpass filters. Are you sure that's good choice for a low pass? Chances are, you need to implement this in second order sections. High order polynomials like this are often numerically unstable specifically if the poles are close to the unit circle. $\endgroup$
    – Hilmar
    Commented May 8 at 14:18
  • $\begingroup$ The flat group delay is the main condition needed, so Thiran filter looked to be the best approach. Is a low order down to N=1 the natural limit here, depending on the input? $\endgroup$
    – MGreen
    Commented May 8 at 15:15
  • $\begingroup$ Any linear phase filter has perfectly flat group delay. $\endgroup$
    – Hilmar
    Commented May 8 at 15:27
  • $\begingroup$ I see, is that simple and something I should be going back to basics to design? $\endgroup$
    – MGreen
    Commented May 8 at 15:50
  • $\begingroup$ Depends on your application requirements. What are your filter specs? A linear phase filter is an FIR filter whereas the Thiran filter is an IIR. FIRs are a lot easier to design and implement. $\endgroup$
    – Hilmar
    Commented May 8 at 16:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.