Four ideal frequency selective filters
Fig. 1 shows the magnitude responses of four basic types of ideal frequency selective filters:
We should note here that these ideal filters are not realizable because the impulse response corresponding to each of these ideal filters is noncausal and of infinite length.
From LPF to HPF
High Pass, Band Pass and Band Stop filters are designed by starting with a Low Pass Filter, and then converting it into the desired response. For this reason, most discussions on filter design only give examples of Low Pass Filters. Roughly, there are two methods for the Low Pass Filter to High Pass Filter conversion: Spectral inversion and Spectral reversal. Both methods are equally useful.
Spectral inversion
In general, with spectral inversion the frequency response is inverted or flipped, that is changing pass bands into stop bands, and vice versa. In other words, spectral inversion changes a filter from low pass to high pass, from high pass to low pass, from band pass to band stop, or from band stop to band pass.
As show at the right hand side of Fig. 2 these two parallel filters with added outputs can be combined into a single filter by adding their impulse responses.
For this technique to work, the low-frequency components exiting the Low Pass Filter must have the same phase as the low-frequency components exiting the All Pass filter, otherwise a complete subtraction cannot take place. This places two restrictions on this method: First, the original filter must have left-right symmetry. That is the filter must have a linear phase. Second, the impulse must be added at the center of symmetry.
Spectral reversal
The second method for LPF to HPF conversion is depicted in Fig. 3.
From LPF and HPF to Band Pass and Band Stop Filters
Fig. 4 shows how Low Pass and High Pass Filters can be combined to form Band Stop filter.
A Band Pass filter can be designed by cascading a Low Pass Filter and a High Pass Filter, as depicted in Fig. 5.
Filter design process
As discussed before, we restrict our attention in this reader to the design of the magnitude response of a Low Pass filter. The design process of a digital filter involves the following stapes:
- Before a filter can be designed, a set of filter specifications must be defined. Because the ideal LPF is unrealizable, it is necessary to relax the ideal constraints on the magnitude response and allow some deviation from the ideal response. Fig. 6 shows the general design specifications of magnitude response.
- The second step is the selection of the filter type, i.e. whether an FIR or an IIR filter is to be employed and the filter order.
- Once the specifications have been defined the next step is to find a set of filter coefficients that produce an acceptable filter.
- After the filter has been designed to implement the system in hardware or software, an appropriate filter structure is chosen ans if necessary the filter coefficients are quantized.
- As a final step check the resulting filter and eventually repeat the previous 3 steps.
Comparison FIR and IIR filters
Choosing between FIR and IIR is critical since it determines the characteristics of the filter and the available design methods. The most important characteristics of FIR and IIR filters are:
- An FIR filter has only zeros, while an IIR filter can have both poles and zeros.
- Exact linear phase can be realized with an FIR filter and not with an IIR filter while an all-pass filter can be realized with IIR and not with FIR, except for a filter which consists of delays.
- An FIR filter is always stable. An IIR filter is unstable when there are poles outside the unit circle.
- The most important FIR filter is the transversal structure, or tapped delay line. The IIR has recursive parts and in most cases it is build as a cascaded or parallel set of first and second order sections.
- The complexity of an FIR filter is, in most cases, directly related to the filter length. To make highly selective filters cost usually less complexity when using IIR filters.
- The initial state influences the behavior of an FIR maximal up to the filter length. Because of the recursion of an IIR filter this can take in theory an infinite long time.
- The influence of quantization is limited for FIR filters, while poles can move outside the unit circle, which leads to instability. Moreover for IIR filters quantization can lead to limit cycles and overflow oscillations.
- Design methods are available for all kind of FIR frequency responses, while design methods for IIR frequency response are mainly available for LPF, HPF, Band Pass and Band Stop filters.
- The FIR available design aids are mainly iterative methods, while the IIR methods mainly consist of the transformation of available analog filters to the digital domain.