Click here to return to the filters section.
The General FIR filter block lets you design LowPass, HighPass, BandPass or BandStop FIR filters using windowing technique. Following windows are supported in filter design:
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Input | decimal - audio | Input signal to the FIR filter |
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Output | decimal - audio | FIR filtered output |
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Enable/Bypass | Enabled | True/False | Enables or disables the filter. On bypass, the input signal is passed through without any processing. |
Frequency | 1000Hz | 0-96Khz | Cutoff frequency of the filter |
Click on the image to configure the filter parameters.
GUI Control Name | Default Value | Range | Function Description |
---|---|---|---|
Frequency | 1000Hz | 0-96Khz | Cutoff frequency of the filter. (Lower cutoff frequency in the case of Bandpass/Bandstop filters |
Select Type | 0 | 0-3 | Selects filter type(LowPass/HighPass/BandPass/BandStop) |
Window Type | 0 | 0-3 | Selects the Window(Hanning/Rectangular/Hamming/Blackman) |
Gain | 0db | -15-15db | Sets the gain of the filter |
BW | 1.41 | 0-11 | BW in octaves(only for BandPass and Bandstop filters) |
Filter Order | 10 | 2-10000 | Sets the order of the filter. Filter length = Order + 1 |
When the General FIR filter algorithm is grown, an extra pair of input/output pins is added to the control. The filtering on each of the grown Input pins is affected by the parameters chosen in the GUI in the same manner.
General FIR filter block designs a LowPass , HighPass, BandPass or BandStop filter using
Windowing technique. Order, Cutoff frequency , Window Type and Gain are configured in the GUI for LowPass and HighPass filter design. Bandwidth has to be additionally configured for BandPass and BandStop filter design.
The coefficients of the filter are calculated and downloaded to the DSP based on the design chosen by the user in the GUI. FIR coefficient calculation steps are shown below.
Ideal filter response h(n) is calculated based on the filter configuration as per the table below
Note: N -Filter Order , wc - Cutoff frequency, wl - Lower cutoff frequency, wh - Higher cutoff frequency, wh=wl * 2BW
Coefficients of the window, w(n) are chosen based on the type of the window selected in the GUI.
Filter coefficients are calculated as h(n) = h(n) * w(n) over the filter length (Order + 1).
In the case of HighPass and BandStop filter, filter order is increased by 1 when odd filter Order is entered in the GUI. Filter order must be even because odd-order symmetric FIR filters has zero gain at the Nyquist frequency.
GUI Control Name | Compiler Name | Function Description |
---|---|---|
NA (Filter coefficients are calculated based on the filter configuration set in GUI) | FIRAlgSigma3001fircoeff | Calculated Filter coefficients based on the designed filter |