Ideally, a filter should have a unit gain (0 dB) in the passband, and a gain of zero (infinity dB) in the stopband. However, in a real implementation, not all of these criteria can be fulfilled. In practice, there is always a finite transition region between the passband and the stopband. In this region, the gain of the filter changes gradually from 1 (0 dB) in the passband to 0 (infinity) in the stopband. The following diagrams show the passband, the stopband, and the transition region (TR) for the different types of nonideal filters. Note that the passband is now the region where the frequency range within which the gain of the filter varies from 0 dB to 3 dB.
In many applications, it is okay to allow the gain in the passband to vary slightly from unity. This variation in the passband is called the passband ripple and is the difference between the actual gain and the appropriate gain of unity. The stopband attenuation, in practice, cannot be infinite, and you must specify a value with which you are satisfied. Both the passband ripple and the stopband attenuation are measured in decibels or dB, defined by:
dB = 20*log10(Ao(f)/Ai(f))
where log10 denotes the logarithm to the base 10, and Ai(f) and Ao(f) are the amplitudes of a particular frequency f before and after the filtering, respectively.
For example, for 0.02 dB passband ripple, the formula gives:
which shows that the ratio of input and output amplitudes is close to unity.
If you have 60 dB attenuation in the stopband, you have
which means the output amplitude is 1/1,000 of the input amplitude. The following illustration, though not drawn to scale, illustrates this concept.
![]() | Note Attenuation is usually expressed in decibels without the word "minus," but a negative dB value is normally assumed. |