Frequency-Sampling FIR Filter Design
This Frequency-Sampling FIR Filter Design method implementation only supports designing Type 1 odd length multiband linear phase filters. The filter length can be an odd value from 3 up to 1023. If an even filter length is specified, the filter length will be decremented by one.
To design a filter, click the the "Filter" menu item and select the "Design" submenu item to launch the Filter Design Dialog window.

- Set the Filter Design Method to be "Frequency-Sampling".
- Select the Window function to use for the design. For this example, the Blackman Harris 92 dB Window is selected.
- Set the Sample Rate. The sample rate must be a positive number greater than zero.
- Set the Desired Filter Length. For the Frequency-Sampling design method, the Filter Length must be a value between 3 and 1023.
- Set the "# of Bands" for your filter type. This can set to be from 2 bands up to 10 bands.
- Set cutoff frequency for each band. Each successive band must have higher frequencies than the previous band. The first band's lower frequency is always zero, and the last band's upper frequency is always half the sample rate.
- If not already set, set the "Gain in dB" checkbox to be checked. If unchecked, gains will use magnitudes. For this example, deciBels are used.
- Set the desired Gain for each band. For the passband, this is typically 0.0, for 0 dB, and for other bands, the value will typically be a negative value, for example, -90.0, for -90 deciBels.
- Click the "Apply" button. The filter frequency response will be displayed on the graph. If the algorithm fails, the status bar might display, "Failed to Converge," or the graph will show a filter response that does not meet the design specification. The settings above can be changed and the "Apply" button clicked again for a new filter design.
It might be necessary to tweak the band cutoff frequencies to get the desired design because the signal window can widen the bands. Also, the frequency resolution of the Frequency-Sampling design algorithm is tied to integer multiples of sample rate divided by the filter length, and so the resulting band edges in the filter frequency response might be moved from the values that are specified.
The filter above results in the following frequency response. Note the filter length is displayed on the bottom of the application on the right part of the status bar.