The direct form 2 implements the same normalized transfer function as direct form 1, but in two parts:
and using the difference equation:
Flow graph of biquad filter in direct form 2:
The direct form 2 implementation only needs N delay units, where N is the order of the filter – potentially half as much as direct form 1. The derivation from the normalized direc form 1 is as follows:
Assume the substitution:
Which results in:
Isolating the , and coefficients:
Which assuming yields the above result:
The disadvantage is that direct form 2 increases the possibility of arithmetic overflow for filters of high Q or resonance.[1] It has been shown that as Q increases, the round-off noise of both direct form topologies increases without bounds.[2] This is because, conceptually, the signal is first passed through an all-pole filter (which normally boosts gain at the resonant frequencies) before the result of that is saturated, then passed through an all-zero filter (which often attenuates much of what the all-pole half amplifies).
The direct form 2 implementation is called the canonical form, because it uses the minimal amount of delays, adders and multipliers, yielding in the same transfer function as the direct form 1 implementation.
Quantizing noise
When a sample of n bits is multiplied by a coefficient of m bits, the product has n+m bits. These products are typically accumulated in a DSP register, the addition of five products may need 3 overflow bits; this register is often large enough to hold n+m+3 bits. The z−1 is implemented by storing a value for one sample time; this storage register is usually n bits, the accumulator register is rounded to fit n bits, and this introduced quantizing noise.
In the direct form 1 arrangement, there is a single quantizing/rounding function Q(z):
In the direct form 2 arrangement, there also is a quantizing/rounding function for an intermediate value. In a cascade, the value may not need rounding between stages, but the final output may need rounding.
Fixed point DSP usually prefers the non transposed forms and has an accumulator with a large number of bits, and is rounded when stored in main memory. Floating point DSP usually prefers the transposed form, each multiplication and potentially each addition are rounded; the additions are higher precision result, when both operands have similar magnitude.