1
$\begingroup$

I am studying IIR filters and their implementation. I am following the material published by Julius Orion Smith at Stanford. In particular, I am reading this page at the moment. It explains all the standard implementation of IIR filters with their direct and transposed forms.

However, for the transposed forms, it only discusses the transposed direct form 2. It says that an interesting property is the inversion of the poles and zeros: in transposed direct form 2, the zeros precede the poles.

I was wondering, does this property also holds for the transposed direct form 1? I would say yes, but it is not explicitly written in the literature.

$\endgroup$
2
$\begingroup$

I was wondering, does this property also holds for the transposed direct form 1?

It does not. In fact in terms of numerical performance, transposed direct form 1 is outright terrible.

It helps to look at transfer function from the input to the state variables. For single biquad we have

$$H(z) = \frac{b_0+b_1z^{-1}+b_2z^{-2}}{a_0+a_1z^{-1}+a_2z^{-2}} = A(z)\cdot B(z)$$,

where $B(z) = b_0+b_1z^{-1}+b_2z^{-2}$ is the transfer function of the zeros and $A(z) = \frac{1}{a_0+a_1z^{-1}+a_2z^{-2}}$ is the transfer function of the poles.

For TDF1 the transfer function from the input to the state is simply.

$H_{TDF1} = A(z)$

The structure applies first $A(z)$ and then $B(z)$. This is often not good since $A(z)$ can be really large (compensated by $B(z)$ being really small).

For TDF2 we simply get $H_{TDF2} = H(z)-b0$

The state transfer function is in the same order of magnitude than the overall transfer function (minus a constant) and it's overall much better behaved.

A simple example: let's look at typical audio filter: a 2nd order Butterworth high pass filter with a cutoff of 40Hz and a sample rate of 48 kHz.

The maximum gain from input to state is for TDF2 is just 2 dB. For DTF1 it's over 91 dB !!! So it's over 30,000 times bigger!

enter image description here

$\endgroup$
5
  • $\begingroup$ Ok makes sense! So from a practical point of view, what's the purpose of transposing the direct forum 1 then? $\endgroup$ Oct 13 at 5:02
  • $\begingroup$ I am asking since I am implementing some IIR filters on hardware (FPGA). I started from this paper: accelconf.web.cern.ch/ibic2018/papers/thoa01.pdf where they implement a biquad IIR filter with a transposed direct form 1. However, I can't find any detailed informations on this topology, not even on books. They only discuss direct form 1-2 and transposed direct form 2, without any mention to the transposed direct form 1. $\endgroup$ Oct 13 at 10:40
  • 1
    $\begingroup$ IMO TDF1 is a big mistake especially for fixed point implementation, unless you already know all possible filter coefficients up front. I've run into trouble with TDF1 even with 32-bit floating point. The can only speculate why people sometimes do it: it minimizes number of state variables, it's easy to implement and people of lack of practical experience with tricky filters. I'd go with TDF2 or just good old Direct Form 1. $\endgroup$
    – Hilmar
    Oct 13 at 13:53
  • $\begingroup$ So we can conclude that TDF1 (expecially with fixed point implementations) is a really bad idea right? $\endgroup$ Oct 13 at 13:58
  • $\begingroup$ Does the TDF1 preserve some of the pros of the DF1? (no possible overflows for example) Or is it just terrible for any situation? $\endgroup$ Oct 13 at 14:05

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.