The preceding design methods have been based on designing an analog prototype filter and then converting it to a digital filter. This approach is appropriate for the class of approximations where analytical solutions are possible, but not for many others. In the remaining part of this chapter, methods will be developed that directly design the desired digital filter. Most approaches are extensions of methods used for FIR filters, but they are more complicated for the IIR case where rational approximation is being performed rather than polynomial approximation.
In this section a frequency-sampling design method is developed such that the frequency response of the IIR filter will pass through the given samples of a desired response. Since an IIR filter cannot have linear phase, the sampled response must contain both magnitude and phase. The extension of the frequency- sampling method to a LS-error approximation is not as simple as for the FIR filter. The method presented in this section uses a criterion based on the equation error rather than the more common error between the actual and desired frequency responseEntry 1. Nevertheless, it is a useful noniterative design method. Finally, a general discussion of iterative design methods for LS-frequency response error is given.
The method for calculating samples of the frequency response of an IIR filter presented in the section on Properties of IIR Filters can be reversed to design a filter much the same way it was for the FIR filter using frequency sampling. The z-transform transfer function for an IIR filter is given by
The frequency response of the filter is given by setting
Equally-spaced samples of the frequency response are chosen so
that the number of samples is equal to the number of unknown
coefficients in (Equation 1). These
and can be calculated from the length-
where the indicated division is term-by-term division for each value
of
If the length-
Note that the
where
Because the first element of
where
or
which must be solved for
which allows the calculation of
If
Note that any order numerator and denominator can be prescribed. If
the filter is in fact an FIR filter,
ummary
In this section, an interpolation design method was developed and analyzed. Use of the DFT converted the frequency- domain specifications to the time domain. A matrix partitioning allowed uncoupling the solution for the numerator from the solution of the denominator coefficients. The use of the DFT prevents the possibility of unequally spaced frequency samples as was possible for FIR filter design. The solution of simultaneous equations would allow unequal spacing which is not as troublesome as with the FIR filter because IIR filters are usually of lower order.
The frequency-sampling design of IIR filters is somewhat more
complicated than for FIR filters because of the requirement that
As with the FIR version, because this design approach is an interpolation method rather than an approximation method, the results may be poor between the interpolation points. This usually happens when the desired frequency-response samples are not consistent with what an IIR filter can achieve. One solution to this problem is the same as for the FIR case Entry 19, the use of more frequency samples than the number of filter coefficients and the definition of an approximation error function that can be minimized. There is no simple restriction that will guarantee stable filters. If the frequency-response samples are consistent with an unstable filter, that is what will be designed.
In order to obtain better practical filter designs, the interpolation scheme of the previous section is extended to give an approximation design method Entry 19. It should be noted at the outset that the method developed in this section minimizes an equation-error measure and not the usual frequency-response error measure.
The number of frequency samples specified,
Equation (Equation 11) becomes
where now
If the equations are not singular, the solution is
If the normal equations are singular, the pseudo-inverse Entry 16, (Reference) can be used to obtain a minimum norm or reduced order solution.
The numerator coefficients are found by the same techniques as before in (Equation 12)
which results in the upper
As is true for LS-error design of FIR filters, (Equation 15) is often
numerically ill-conditioned and (Equation 16) should not be used to solve for
The error
where
Although this is posed as a frequency-domain design method, the method of solution for both the interpolation problem and the LS equation-error problem is the same as the time-domain Prony's method, discussed in Section 7.5 of reference Entry 19.
Numerous modifications and extensions can be made to this method. If the
desired frequency response is close to what can be achieved by an IIR
filter, this method will give a design approximately the same as that of a
true least-squared solution-error method. It can be shown that
An interesting iterative design algorithm that can design to approximate complex or magnitude frequency responses has be recently proposed by Jackson Entry 11. A different approach to the same problem was posed by Soewito Entry 26, Entry 28.
To illustrate this design method a sixth-order lowpass filter was designed with 41 frequency samples to approximate. The magnitude of those less than 0.2 Hz is one and of those greater than 0.2 is zero. The phase was experimentally adjusted to result in a good magnitude response. The design was performed with Program 9 in the appendix of Entry 19 and the frequency response is shown in Figure 7-33 of Entry 19. Matlab programs have recently been written which are smaller and easier to understand than those in FORTRAN.
ummary
In this section an LS-error approximation method was posed to design IIR filters. By using an equation-error rather than a solution-error criterion, a problem resulted that required only the solution of simultaneous linear equations.
Like the FIR filter version, the IIR frequency sampling design method and the LS equation-error extension can be used for complex approximation and, therefore, can design with both magnitude and phase specifications.
If the desired frequency-response samples are close to what an IIR filter of the specified order can achieve, this method will produce a filter very close to what a true least-squared error method would. However, when the specifications are not consistent with what can be achieved and the approximating error is large, the results can be very poor and in some cases, unstable. It is particularly difficult to set realistic phase response specifications. With this method, it is even more important to have a design environment that will allow easy trial-and-error procedure.
Newly published works which will be discussed here are Entry 14, Entry 13, Entry 22, Entry 10, Entry 20, Entry 17, Entry 12. Other references can be found in Entry 19, Entry 14, Entry 6, Entry 26, Entry 28, Entry 5. The Matlab command invfreqz() which is an inverse to the freqz() command gives a similar or, perhaps, the same result as the method described in this note but uses a different formulation Entry 15, Entry 25.
Practical problems occur in the design of a filter to separate signals according to their energy. Because the energy content of a signal is the integral or sum of the square of the signal, a mean-squared-error measure is natural. Unfortunately, for the IIR filter design problem, the optimization procedure is nonlinear. This was pointed out in the last section where the equation error was used in order to have a linear problem.
Because of the nonlinear nature of the least-squared-error minimization, the method of solution becomes dependent on the desired frequency response, and therefore, there is no single method for design. The mean-squared error for magnitude approximation is defined as
where
Practical difficulties exist in solving this approximation problem. In some cases, local minima are found rather than the global minimum. In other cases, convergence of the minimization algorithm is slow or does not occur at all. Numerical problems can result from ill-conditioned equations, and there is no guarantee that the designed filter will be stable.
An important factor is the choice of a desired frequency-
response function
Another factor is the starting of the iterative optimization
algorithm with a set of coefficients in
A generalization of the idea of a squared-error measure is
defined by raising the error to the
Deczky Entry 8 developed this approach and used the Fletcher-Powell
method to minimize (Equation 21). He also applied this method to the
approximation of a desired group-delay function. An important
characteristic of this formulation is that the solution approaches the
Chebyshev or mini-max solution as p becomes large. Initial work shows the
method of iteratively reweighted least squared error (IRLS) as was applied
to the FIR filter design in (Reference) can also be used for
The error measure that often best meets filter design specifications is the maximum error in the frequency response that occurs over a band. The filter design problem becomes the problem of minimizing the maximum error (the min-max problem).
Among several approaches to this error minimization, one is
by Deczky which minimizes the p-power error of (Equation 21) for large
p. Generally,
Linear programming can be applied to this error measure by linearizing the equations in much the same way as in (Equation 15) Entry 21. In contrast to the FIR case, this can be a practical design method because the order of practical IIR filters is generally much lower than for FIR filters. A scheme called differential correction has also proven to be effective.
Although the rational approximation problem is nonlinear, an application of the Remes exchange algorithm can be implemented Entry 19. Since the zeros of the numerator of the transfer function mainly control the stopband characteristics of a filter, and the zeros of the denominator mainly control the passband, the effects of the two are somewhat uncoupled. An application of the Remes exchange algorithm, alternating between the numerator and denominator, gives an effective method for designing IIR filters with a Chebyshev error criterion. If the order of the numerator and denominator are the same and the desired filter is an ideal lowpass filter, the Remes exchange should give the same result as the elliptic function filter. However, this approach allows any order numerator or denominator to be set and any shape passband to be approximated. There are cases where a lower-order denominator than numerator results in a filter with fewer required muliplications than an elliptic-function filter Entry 19.
The problem of designing an IIR digital filter with a prescribed time-domain response is addressed in this section. Most formulations of time-domain design of IIR filters result in nonlinear equations for the same reasons as for frequency-domain design. Prony, in 1790, derived a special formulation for the analysis of elastic properties of gases, which resulted in linear equations. A more general form of Prony's method can be applied to the IIR filter design by use of a matrix description Entry 2, Entry 19.
The transfer function of an IIR filter is given by
and the impulse response
Equation (Equation 23) can be written
which is the z-transform version of convolution. This convolution can be written as a matrix multiplication. Using the first K+1 terms of the impulse response, this is written