The purpose is to find a realization of the filter that meets each of the requirements to an acceptable degree.
[1] Although filters are easily understood and calculated, the practical challenges of their design and implementation are significant and are the subject of advanced research.
The steepness and complexity of the response curve determines the filter order and feasibility.
This means that the slope of the frequency response is limited to 6 dB per octave.
In some cases it may even be relevant to consider a frequency function and impulse response of the filter which are chosen independently from each other.
An example is for high-resolution audio in which the frequency response (magnitude and phase) for steady state signals (sum of sinusoids) is the primary filter requirement, while an unconstrained impulse response may cause unexpected degradation due to time spreading of transient signals.
Filters that do not operate in real time (e.g. for image processing) can be non-causal.
A filter which does not meet this requirement may in some situations prove useless or even harmful.
Certain design approaches can guarantee stability, for example by using only feed-forward circuits such as an FIR filter.
In this case, the filters must be carefully designed in order to avoid instability.
In certain applications we have to deal with signals which contain components which can be described as local phenomena, for example pulses or steps, which have certain time duration.
This implies that it is sometimes important to keep the width of the filter's impulse response function as short as possible.
This means that any requirement on the filter's locality also implies a bound on its frequency function's width.
A general desire in any design is that the number of operations (additions and multiplications) needed to compute the filter response is as low as possible.
This means that by choosing a low order filter, the computation time can be reduced.
Digital filters are classified into one of two basic forms, according to how they respond to a unit impulse: Unless the sample rate is fixed by some outside constraint, selecting a suitable sample rate is an important design decision.
For any digital filter design, it is crucial to analyze and avoid aliasing effects.
Other effects which refer to relations between the time and frequency domain are As stated by the Gabor limit, an uncertainty principle, the product of the width of the frequency function and the width of the impulse response cannot be smaller than a specific constant.
This is a typical example of contradictory requirements where the filter design process may try to find a useful compromise.
If a precise localization is requested, we need a filter of small width in the signal domain and, via the uncertainty principle, its width in the frequency domain cannot be arbitrary small.
A consequence of this theorem is that the frequency function of a filter should be as smooth as possible to allow its impulse response to have a fast decay, and thereby a short width.
Here the user specifies a desired frequency response, a weighting function for errors from this response, and a filter order N. The algorithm then finds the set of N coefficients that minimize the maximum deviation from the ideal.
Intuitively, this finds the filter that is as close as you can get to the desired response given that you can use only N coefficients.
This method is particularly easy in practice and at least one text[4] includes a program that takes the desired filter and N and returns the optimum coefficients.
In its basic form this approach requires that an ideal frequency function of the filter
is the discrete-time Fourier transform defined on the specified set of coordinates.
norm has to be approximated by means of a suitable sum over discrete points in the frequency domain.
In general, however, these points should be significantly more than the number of coefficients in the signal domain to obtain a useful approximation.
The previous method can be extended to include an additional error term related to a desired filter impulse response in the signal domain, with a corresponding weighting function.
The ideal impulse response can be chosen independently of the ideal frequency function and is in practice used to limit the effective width and to remove ringing effects of the resulting filter in the signal domain.