Component: Filter (DSP Operators)

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd
Version 1.3
Category DSP Operators


Filter component

Filter component to allow basic filtering to be performed Filters include: LowPass, HighPass, BandPass, BandStop, FIR, IIR

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DSP_Filter.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DSP_Filter.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Low Pass Filter

Example of the filter component set up to create a low pass filter with the input frequency controlled using the potentiometer on the panel. FC6 Icon.png LowPassFilter Low pass filter running at a low frequency - note that the amplitude of the filtered data closely matches that of the original waveform data.

LPFilter.jpg


Low pass filter running at a high frequency - note that the amplitude of the filtered waveform is now greatly attenuated.

LPFilter2.jpg


High Pass Filter

Example of the filter component set up to create a high pass filter with the input frequency controlled using the potentiometer on the panel. FC6 Icon.png HighPassFilter High pass filter running at a low frequency - note that the amplitude of the filtered waveform is greatly attenuated.

HPFilter.jpg


High pass filter running at a high frequency - note that the amplitude of the filtered data closely matches that of the original waveform data.

HPFilter2.jpg


Band Pass Filter

Example of the filter component set up to create a band pass filter with the input frequency controlled using the potentiometer on the panel. FC6 Icon.png BandPassFilter Band pass filter running at a low frequency - note that the amplitude of the filtered waveform is greatly attenuated.

BPFilter.jpg


Band pass filter running at a mid frequency - note that the amplitude of the filtered data closely matches that of the original waveform data.

BPFilter2.jpg


Band pass filter running at a high frequency - note that the amplitude of the filtered waveform is greatly attenuated.

BPFilter3.jpg








Macro reference

Filter

Fc9-comp-macro.png Filter
Performs the filter operation to the current value in the buffer. 
Fc9-void-icon.png - VOID Return


FilterArray

Fc9-comp-macro.png FilterArray
Performs the filter operation to the contents of the entire buffer in one go. 
Fc9-void-icon.png - VOID Return


SetFilterCoefficient

Fc9-comp-macro.png SetFilterCoefficient
Allows the coefficients of low pass, High pass, band pass and band stop filters to be edited. Must be enabled using the Variable Coefficients property. 
Fc9-u8-icon.png - BYTE Index
Range: 0-1 
Fc9-u16-icon.png - UINT Value
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Connect To
DSP component with output buffer to collect our data from. 
Fc9-type-21-icon.png Buffer Size
Number of individual elements the buffer can store, default 1. 
Fc9-type-16-icon.png Buffer Type
Sets the buffer data type. 
Fc9-type-16-icon.png Direction
Sets the data direction flow of the component 
Fc9-conn-icon.png Filter Properties
Fc9-type-16-icon.png Type
Specifies the filter type created by the component: Low Pass - Filters out frequencies above the cutoff frequency High Pass - Filters out frequencies below the cutoff frequency Band Pass - Combination of High Pass and Low Pass Filters Band Stop - Inverse of Band Pass FIR - Finite impulse response using standard filter coefficients IIR - Infinite impulse response using standard filter coefficients 
Fc9-type-7-icon.png Variable Coefficients
Decides if the coefficient values can be altered during runtime using the SetCoefficient component macro. Only available for the simple filter types, low pass, high pass, band pass and band stop. 
Fc9-type-14-icon.png Coefficient 0
Cutoff frequency = Nyquist frequency / Coefficient Cutoff frequency is described as when the unwanted frequencies in the signal have been attenuated by at least 50%  
Fc9-conn-icon.png Calculations
Fc9-type-15-icon.png Sample Rate
Sample frequency used to work out some basic useful calculations 
Fc9-type-15-icon.png Nyquist Frequency
Maximum theoretical frequency that can be obtained by the sample frequency 
Fc9-type-15-icon.png Cutt Off Frequency 0
First cutoff frequency