What is an ideal filter?
You’ve heard of filter coffee. It’s a very popular type of coffee where you filter out the coarse coffee grains to get the silky-smooth concoction that is enjoyed all over the world. Similarly, in digital signal processing, we send a signal with a mix of several different frequencies through a filter to get rid of the unwanted frequencies and give us the desired frequency response. The picture below shows us the response when a low pass filter is applied, and we get a practical response from it. No filter can entirely get rid of all the frequencies that we set as a limit. There will be certain discrepancies, and some unwanted frequencies will give rise to a transition band.
However, for calculation purposes, we consider an ideal filter which does not take into account these practical discrepancies. Hence, it has a steep transition from the pass-band to the stop-band.Like the picture above. The practical filter will look more like the graph below.
What are the characteristics of an ideal filter?
There are many different types of filters based on what you want your frequency response to be. Therefore, the characteristics of each of these types of filters differ. But each of these filters will definitely have a pass-band and a stop-band. Pass-band, as we have discussed, is the frequencies that the filter allows to be kept in the response. Stop-band includes the frequencies that are not in the said limits of the filter response.
A filter is essentially a system like the one in the diagram below
Where A is the amplitude of the signal, ω is the angular frequency of the input signal, and Φ is the phase of the system.
The frequency response of a filter is the ratio of the steady-state output of the system to the sinusoidal input. It is required to realize the dynamic characteristic of a system. It represents the magnitude and phase of a system in terms of the frequency.
The phase of the frequency response or the phase response is the ratio of the phase response of the output to that of the input of any electrical device which takes in an input modifies it and produces an output. Hence, the operating frequency of the filter can be used to further categorize these filters into low pass filter, high pass filter, band-pass filter, band-rejection filer, multipass filter, and multi-stop filter.
A certain cut-off frequency, ωC radians per second is chosen as the limit, and as the name suggests, the portion with low frequency is allowed to pass. Hence, the frequencies before ωC are what consists of the pass-band and the frequencies after ωC are attenuated as part of the stop-band. This is pictorially depicted below:
The transfer function of an ideal low pass filter is given by
H(jω) = 1 for |ω| < ωc ; 0 for ω >= ωc
Circuit for a Low Pass Filter
As these filters are ideal, there will be no presence of the transition band, only a vertical line at the cutoff frequency. Low Pass Filters are often used to identify the continuous original signal from their discrete samples. They tend to be unstable and are not realizable as well.
The High Pass Filter allows the frequencies above the cutoff frequency to pass, which will be the passband, and attenuates the frequencies below the cutoff frequency, consisting of the stop-band. An ideal high pass filter’s response ought to look like the figure below.
The transfer function of an ideal low pass filter is given by
H(jω) = 1 for |ω| >= ωc ; 0 for ω < ωc
Circuit for a High Pass Filter
Once again, there will be no transition band due to the precise cutting off of the signal in an ideal filter. An ideal high pass filter passes high frequencies. However, the strength of the frequency is lower. A highpass filter is used for passing high frequencies, but the strength of the frequency is lower as compared to cut off frequency. High pass filters are used to sharpen images.
The band-pass filter is actually a combination of the low pass and high pass filter, both the filters are used strategically to allow only a portion of frequencies to pass through hence forming the pass-band and the all frequencies that do not fall in this range are attenuated
The transfer function of the Band Pass Filter is given by
H(jω) = 1 for |ω1| < ω < |ω2| ; 0 for ω < |ω1| and ω > |ω2|
Circuit for a Band Pass Filter
The circuit as shown below is the high pass filter followed by the low pass filter, which forms the Band Pass Filter.
This band has two cut-off frequencies, the lower cut off frequency, and the upper cut off frequency. So, it is known as a second-order filter. Band-pass filters can also be formed using inverting operational amplifiers. These types of filters are used primarily in wireless transmitters and receivers.
Band-pass filters are widely used in wireless transmitters and receivers. It limits the frequency at which the signal is transmitted, ensuring the signal is picked up by the receiver. Limiting the bandwidth to the particular value discourages other signals from interfering.
Band Rejection Filter/Band Stop Filter
Band rejection filter is used when you want to retain the majority of the frequency but reject a specific band of frequencies. It is basically the opposite of a band-pass filter. If the stop-band is very narrow, it is sometimes referred to as a notch filter. And similar to the band-pass filter, this filter has two cut-off frequencies making it a second-order filter. This filter allows all frequencies leading up to the first cut-off frequency(lower cut-off frequency) to pass and all frequencies after the second cut-off frequency(upper cut-off frequency) to pass making that the pass-band. And all frequencies between the lower and upper cut-off frequency is the stop-band.
The transfer function of a Band Rejection filter is as shown
H(jω) = 0 for |ω1| < ω < |ω2| ; 1 for ω < |ω1| and ω > |ω2|
Circuit for a Band Stop Filter
The circuit of a Band Rejection filter consists of a resistor, inductor, and capacitor all in parallel. This is also the same as keeping a low pass filter in parallel with a high pass filter.
The band Rejection filter is heavily used in Public Address Systems, Speaker System and in devices that require filtering to obtain good audio. It is also used to reduce static radio related devices. The frequencies that bring in the static are attenuated by giving their frequencies as the limits.
Multi-pass filters are basically several band-pass filters put together. It is used when you want only certain bands of frequencies to pass through and want to attenuate the majority. The Band Pass Filter itself is achieved by having the circuit of a high pass filter connected to that of a low pass filter in series, connecting this to another pair of filters will give us two bands of frequencies that are allowed to pass through with two second-order cut off frequencies each making its response look something like the following graph.
Multi-stop filters are several band-stop filters put together. It is used when you want certain bands of frequencies to not be passed and when you want the majority of the frequencies to be attenuated. The Band Stop Filter is achieved by having a circuit of high pass filter and low pass filter connected in parallel. Hence, this would give us two pairs of second-order cut off frequencies as well, as depicted by the graph below.
Why can’t we design ideal filters?
To get an ideal response would mean there should be no unwanted components at all. The calculations to ensure the frequency response of an ideal filter should be precise, to know how to do this you can take a look at the post on filter approximation under the same section. So taking the Fourier transform of an ideal filter, we get an infinite time response. And the other way around, a signal with infinite frequency response is because of a finite time response. Hence, if we allow for infinite time, that would mean there will be an infinite delay in the filter. This would mean you will be getting the output as zero for a long, long time before getting an actual result.
This means an ideal filter is non-causal, which means it will not be zero before time zero is reached. And also it is not rational; it is not able to be written as a rational transfer function with a finite degree(n) for such a sudden transition.
For example, let’s say the frequency response required is:
H(jω) = 1 for |ω| < ωc ; 0 for ω >= ωc
Calculating the impulse response in time domain, we get
The sinc function suggests that the frequency response exists for all values from -∞ to ∞. Therefore, it is non-realizable as it requires infinite memory.
So, to avoid waiting for an eternity to get a frequency response, we do not design ideal filters.
Filter Approximation Techniques
Designing a filter involves approximation and realization. Let us take a Low Pass Filter for discussion. As mentioned, the pass-band allows the lower frequencies within the cut-off frequency and attenuates the rest of the frequencies with an immediate transition from pass-band to stop-band.
For a practical Low Pass Filter, however, the transition from pass-band to stop-band will be gradual or to be precise at a rate of -20dB/decade for every order of the filter.
Hence, realistic filters may have ripples in the pass-band or the stop, in some cases, even both. But, one thing is for sure, it is impossible to design an entirely flat response or such a steep transition
However, to try and overcome this problem of ripples or change the output to the desired response, we can use one of the five filter approximation techniques available.
Filter approximation techniques are special processes using which we can design our target filter with the closest response to an ideal filter. Each of these techniques has a close-to-ideal response in certain regions of the frequency band. Some approximation methods give you a flat pass-band. Whereas some give you a sharp transition band. Let’s get acquainted with some of the filter approximation techniques. We’ll dive deeper into filter approximation techniques in this post.
First, we have the Butterworth filter which gives a flat pass-band (also called maximally flat approximation for this reason), a stop-band with no ripples and a roll off of -20n dB/decade where n is the order of the filter. These filters are usually used for audio processing.
Secondly, we have the Chebyshev filter which gives a pass-band with ripples, a stop-band with no ripples and a roll-off faster than the Butterworth filter. This is the type of filter one should go for if a flat response is not their priority but a faster transition instead. The number of ripples is equal to the order of the filter divided by 2. The amplitude of each of these ripples is also the same. Hence, it is also known as an Equal Ripple Filter.
Next, we have the inverse Chebyshev which has the same roll off as Chebyshev and also a flat pass-band, fast transition but ripples in the stop-band. This filter can be opted for when there is no concern with the attenuated band. However, one should ensure the ripples in the stop-band do not surpass the rejection threshold.
Then, we have the Elliptic filter which has a ripple in both pass-band and stop-band but the fastest transition out of all the filters.
The Bessel filter has the opposite response, which is a flat response in the pass-band, no ripple in the stop-band but the slowest roll-off among all approximation filters.
Here is a summary,