Difference between revisions of "Component: Filter (DSP)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
Line 4: Line 4:
 
|-
 
|-
 
| width="20%" style="color: gray;" | Author
 
| width="20%" style="color: gray;" | Author
| [http://www.matrixltd.com Matrix Ltd]
+
| Matrix Ltd
 
|-
 
|-
 
| width="20%" style="color: gray;" | Version
 
| width="20%" style="color: gray;" | Version
Line 15: Line 15:
  
  
==[[File:Component Icon 317efb6a_2bad_4f83_a0bc_4ada0f4cd51e.png|Image]] Filter component==
+
==[[Media:Component Icon 317efb6a_2bad_4f83_a0bc_4ada0f4cd51e.png|Image]] Filter component==
 
Filter component to allow basic filtering to be performed
 
Filter component to allow basic filtering to be performed
 
Filters include: LowPass, HighPass, BandPass, BandStop, FIR, IIR
 
Filters include: LowPass, HighPass, BandPass, BandStop, FIR, IIR
  
 
==Examples==
 
==Examples==
 
 
 
=== Low Pass Filter ===
 
=== Low Pass Filter ===
  
Line 137: Line 135:
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''type''.
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''type''.
  
Specifies the filter type created by the component
+
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
  
 
<span style="font-weight: normal;"><u>Coefficient 0</u></span>
 
<span style="font-weight: normal;"><u>Coefficient 0</u></span>
Line 143: Line 153:
 
This property is of type ''Signed integer'' and can be referenced with the variable name ''coef0''.
 
This property is of type ''Signed integer'' and can be referenced with the variable name ''coef0''.
  
''<span style="color:red;">No additional information</span>''
+
Cutoff frequency = Nyquist frequency / Coefficient
 
 
  
 +
Cutoff frequency is described as when the unwanted frequencies in the signal have been attenuated by at least 50%
  
 
<span style="font-weight: normal;"><u>Sample Rate</u></span>
 
<span style="font-weight: normal;"><u>Sample Rate</u></span>

Revision as of 11:11, 16 January 2014


Author Matrix Ltd
Version 1.2
Category DSP


Image Filter component

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

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.

File:LowPassFilter.fcfx


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.

File:HighPassFilter.fcfx


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.

File:BandPassFilter.fcfx


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

Downloadable macro reference

Filter

Performs the filter operation to the contents of the entire buffer in one go.

Parameters

This macro has no parameters


Return value

This call does not return a value


FilterTick

Performs the filter operation to the current value in the buffer.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Buffer Manager

This property is of type Fixed list of ints and can be referenced with the variable name buffer_manager.

Determines which buffer manager component to refer to

Input

This property is of type Fixed list of ints and can be referenced with the variable name input_a.

Specifies the input buffer which will pass values into the filter

Output

This property is of type Fixed list of ints and can be referenced with the variable name output_c.

Specifies the output buffer which will store values from the filter

Type

This property is of type Fixed list of ints and can be referenced with the variable name 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

Coefficient 0

This property is of type Signed integer and can be referenced with the variable name coef0.

Cutoff frequency = Nyquist frequency / Coefficient

Cutoff frequency is described as when the unwanted frequencies in the signal have been attenuated by at least 50%

Sample Rate

This property is of type Floating point and can be referenced with the variable name sample_rate.

Sample frequency used to work out some basic useful calculations

Nyquist Frequency

This property is of type Floating point and can be referenced with the variable name nyquist.

Maximum theoretical frequency that can be obtained by the sample frequency

Cutt Off Frequency 0

This property is of type Floating point and can be referenced with the variable name cut_off_0.

First cutoff frequency