Low Pass Equiripple Filter 2.
Low pass FIR filters with lenghts up to 135 can be derived with the applet below.
Scrollbars 0 to 68 are used to move the frequency extrema.
Scrollbars 69 and 70 set the number of extrema.
Scrollbars 72 and 74 set the pass band and stop band edges.
Scrollbars 76 and 77 set the ripple ratio and grid density.
Scrollbars 78 and 79 move the White and Blue frequency reference lines.
Scrollbars 80 and 81 set the dB/div and the dB of the dark red reference line.
Scrollbar 82 sets the error gain.
Some examples are shown by the images below. The biggest step is to get the number of extrema in the pass band and stop band correct. The empirical result for a given dB, RR, and Fs - Fp is shown in the lower left and this can be used as a guide. However changes may need to be made.
To see how the applet works, it is best to start with small N and experiment by moving the extrema and changing the number of extrema in each band. In the case below Pe is set to 5 and Se to 7 so only the scrollbars 1 to 3 and 6 to 10 have to be moved.
When moving frequency extrema, the ordering of the extrema must be maintained. If extrema n is moved to the right of extrema n+1, then the error will explode. If this happens, the numerical values of the extrema should be checked to find the offending extrema and return it to its correct position in the sequence.
If after attempting to align the extrema with the error, it becomes apparent that another extrema is required, then the number of extrema can be increased without restarting the applet. However when this is done, the error will most likely explode because one or more of the extrema has moved into the transition band. The extrema within the transition band should be visible(or can be located with the numerical values) and they can be moved back into the pass band or foward into the stop band. The 2 green scrollbar labels show the extrema (4 and 5 in the image below) which must be at the pass band and stop band edge respectively. Extrema should always be maintained at the pass and stop band edges. It is possible to have cases where extrema are slightly displaced from the edges, however these may be difficult to adjust correctly because of the rapid variation of the error and should be avoided(eg Fp = 0.2, Fs = 0.28, Pe = 7, Se = 9).
It may happen that the extrema can be aligned with the error but an extra large error occurs at 0.5ws. This can be removed by adding another extrema. The error may then become smaller rather than larger than the rest, however this is usually more desirable.
It is possible to get acceptable filters without a frequency extrema at 0.5ws (eg Fp = 0.2, Fs = 0.283, Pe = 6, Se = 7)
or at 0.0ws (eg Fp = 0.2, Fs = 0.280, Pe = 5, Se = 8).
In the case below, the transition bandwidth is 0.05ws and the stop band attenuation is greater than 103dB.
In the case below, the transition bandwidth is 0.04ws and the stop band attenuation is greater than 102dB.
In the case below, the transition bandwidth is 0.03ws and the stop band attenuation is greater than 73dB.
Return to main page
Return to page index
COPYRIGHT © 2008 Cuthbert Nyack.