## Alternative Realizations

For actually implementing the example digital filter, we have only seen the difference equation (from Eq. (3.1), diagrammed in Fig.3.1). While this structure, formally known as direct form I'', happens to be a good choice for digital comb filters, there are many other structures to consider in other situations. For example, it is often desirable, for numerical reasons, to implement low-pass, high-pass, and band-pass filters as series second-order sections. On the other hand, digital filters for simulating the vocal tract (for synthesized voice applications) are typically implemented as parallel second-order sections. (When the order is odd, there is one first-order section as well.) The coefficients of the first- and second-order filter sections may be calculated from the poles and zeros of the filter.

We will now illustrate the computation of a parallel second-order realization of our example filter . As discussed above in §3.11, this filter has five poles and three zeros. We can use the partial fraction expansion (PFE), described in §6.8, to expand the transfer function into a sum of five first-order terms: where, in the last step, complex-conjugate one-pole sections are combined into real second-order sections. Also, numerical values are given to four decimal places (so ' is replaced by ' in the second line). In the following subsections, we will plot the impulse responses and frequency responses of the first- and second-order filter sections above.

### First-Order Parallel Sections

Figure 3.13 shows the impulse response of the real one-pole section and Fig.3.14 shows its frequency response, computed using the matlab utility myfreqz listed in §7.5.1. (Both Matlab and Octave have compatible utilities freqz, which serve the same purpose.) Note that the sampling rate is set to 1, and the frequency axis goes from 0 Hz all the way to the sampling rate, which is appropriate for complex filters (as we will soon see). Since real filters have Hermitian frequency responses (i.e., an even amplitude response and odd phase response), they may be plotted from 0 Hz to half the sampling rate without loss of information.  Figure 3.15 shows the impulse response of the complex one-pole section and Fig.3.16 shows the corresponding frequency response.  The complex-conjugate section, is of course quite similar, and is shown in Figures 3.17 and 3.18.  Figure 3.19 shows the impulse response of the complex one-pole section and Fig.3.20 shows its frequency response. Its complex-conjugate counterpart, , is not shown since it is analogous to in relation to .  ### Parallel, Real, Second-Order Sections

Figure 3.21 shows the impulse response of the real two-pole section and Fig.3.22 shows its frequency response. The frequency axis unnecessarily extends all the way to the sampling rate ( ).  Finally, Fig.3.23 gives the impulse response of the real two-pole section and Fig.3.24 its frequency response.  ### Parallel Second-Order Signal Flow Graph

Figure 3.25 shows the signal flow graph for the implementation of our example filter using parallel second-order sections (with one first-order section since the number of poles is odd). This is the same filter as that shown in Fig.3.1 with , , , and . The second-order sections are special cases of the biquad'' filter section, which is often implemented in software (and chip) libraries. Any digital filter can be implemented as a sum of parallel biquads by finding its transfer function and computing the partial fraction expansion.  The two second-order biquad sections in Fig.3.25 are in so-called Direct-Form II'' (DF-II) form. In Chapter 9, a total of four direct-form filter implementations will be discussed, along with some other commonly used implementation structures. In particular, it is explained there why Transposed Direct-Form II (TDF-II) is usually a better choice of implementation structure for IIR filters when numerical dynamic range is limited (as it is in fixed-point DSP chips''). Figure 3.26 shows how our example looks using TDF-II biquads in place of the DF-II biquads of Fig.3.25.

### Series, Real, Second-Order Sections

Converting the difference equation to a series bank of real first- and second-order sections is comparatively easy. In this case, we do not need a full blown partial fraction expansion. Instead, we need only factor the numerator and denominator of the transfer function into first- and/or second-order terms. Since a second-order section can accommodate up to two poles and two zeros, we must decide how to group pairs of poles with pairs of zeros. Furthermore, since the series sections can be implemented in any order, we must choose the section ordering. Both of these choices are normally driven in practice by numerical considerations. In fixed-point implementations, the poles and zeros are grouped such that dynamic range requirements are minimized. Similarly, the section order is chosen so that the intermediate signals are well scaled. For example, internal overflow is more likely if all of the large-gain sections appear before the low-gain sections. On the other hand, the signal-to-quantization-noise ratio will deteriorate if all of the low-gain sections are placed before the higher-gain sections. For further reading on numerical considerations for digital filter sections, see, e.g., .

Next Section:
Summary
Previous Section:
Pole-Zero Analysis