Difference between revisions of "User Reference:Filters"

From BCI2000 Wiki
Jump to: navigation, search
(Configuration Overview)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
''Filters'' are the most important building blocks of a BCI2000 system.
 
''Filters'' are the most important building blocks of a BCI2000 system.
This document describes the ''filter'' concept for users who will configure BCI2000 for their own experiments, and provides links to the documentation pages of individual filters, describing each filter's purpose and parameterization.
+
This document describes the ''filter'' concept for users who will configure BCI2000 for their own experiments, and provides links to the documentation pages of individual filters, describing each filter's purpose and parameterization. On this page, only core components of BCI2000 are described; for contributed filters, see [[Contributions:Contents]].
  
 
==Data Processing as a Pipe==
 
==Data Processing as a Pipe==
Line 9: Line 9:
 
Similarly, albeit signal portions may change their shape on their way through the pipe (filter chain), it is impossible to insert or remove any of them.
 
Similarly, albeit signal portions may change their shape on their way through the pipe (filter chain), it is impossible to insert or remove any of them.
 
Thus, each data portion acquired by the data acquisition module will run through the entire BCI2000 system, being processed by a sequence of filters.
 
Thus, each data portion acquired by the data acquisition module will run through the entire BCI2000 system, being processed by a sequence of filters.
 +
 +
This page is mostly about the way filters are used online in BCI2000 core modules. Note however that the same filter code can be accessed in order to recreate a processing chain offline, either [[User_Reference:Command_Line_Processing|from the system command-line]] or [[User_Reference:Matlab_Tools|from within Matlab]].
  
 
==Configuration Overview==
 
==Configuration Overview==
Line 14: Line 16:
 
However, not all combinations or orderings of filters make sense.
 
However, not all combinations or orderings of filters make sense.
  
The table shows modules and filters for BCI2000 configurations included in the core distribution:
+
The flowchart shows modules and filters for BCI2000's configurations included in the core distribution:
 
+
<div align="center">[[Image:FilterPipelineFlowchart.png|792px|x260px|Flowchart of the Data moving through the Filter Pipeline]]<br>
{| border="1" style="text-align:center"
+
'''Flowchart of the Data moving through the Filter Pipeline'''</div>
! &nbsp; || colspan="3" | Data Acquisition
 
! colspan="5" | Signal Processing
 
! colspan="3" | Application
 
|-
 
! SMR Feedback
 
 
 
| rowspan="3" |
 
{| border="0" style="text-align:center"  
 
| colspan="2" | [[User Reference:DataIOFilter|DataIOFilter]]
 
|-
 
| ADC || FileWriter
 
|}
 
| rowspan="3" | [[User Reference:AlignmentFilter|AlignmentFilter]]
 
| rowspan="3" | [[User Reference:TransmissionFilter|TransmissionFilter]]
 
| rowspan="3" | [[User Reference:SpatialFilter|SpatialFilter]]
 
| [[User Reference:ARFilter|ARFilter]] or [[User Reference:FFTFilter|FFTFilter]]
 
| rowspan="3" | [[User Reference:LinearClassifier|LinearClassifier]]
 
| rowspan="3" | [[User Reference:LPFilter|LPFilter]]
 
| rowspan="3" | [[User Reference:Normalizer|Normalizer]]
 
| rowspan="3" | [[User Reference:ConnectorInput|ConnectorInput]]
 
| [[User Reference:CursorTask|CursorTask]]
 
| rowspan="3" | [[User Reference:ConnectorOutput|ConnectorOutput]]
 
|-
 
! P3 Speller
 
| rowspan="2" | [[User Reference:P3TemporalFilter|P3TemporalFilter]]
 
| [[User Reference:P3SpellerTask|P3SpellerTask]]
 
|-
 
! Stimulus Presentation
 
| [[User Reference:StimulusPresentationTask|StimulusPresentationTask]]
 
|}
 
  
 
==Data Acquisition Module==
 
==Data Acquisition Module==
Line 61: Line 33:
 
*[[User Reference:TransmissionFilter]]: Subset selection for online processing.
 
*[[User Reference:TransmissionFilter]]: Subset selection for online processing.
  
===ADC Filters===
+
===Data Acquisition===
 
*[[User Reference:SignalGeneratorADC]]: A signal generator for testing purposes.
 
*[[User Reference:SignalGeneratorADC]]: A signal generator for testing purposes.
 
*[[User Reference:gUSBampADC]]: Interface to the g.tec gUSBamp amplifier.
 
*[[User Reference:gUSBampADC]]: Interface to the g.tec gUSBamp amplifier.
 
*[[User Reference:gMOBIlabADC]]: Interface to the g.tec gMOBIlab amplifier.
 
*[[User Reference:gMOBIlabADC]]: Interface to the g.tec gMOBIlab amplifier.
 +
*[[User Reference:gMOBIlabPlusADC]]: Interface to the g.tec gMOBIlab+ wireless amplifier.
 
*[[Contributions:ADCs]]: Contributed code interfacing to other hardware.
 
*[[Contributions:ADCs]]: Contributed code interfacing to other hardware.
  
===FileWriter Filters===
+
===Data Storage===
 
*[[User Reference:BCI2000FileWriter]]: BCI2000 data format.
 
*[[User Reference:BCI2000FileWriter]]: BCI2000 data format.
 
*[[User Reference:EDFFileWriter]]: European Data Format.
 
*[[User Reference:EDFFileWriter]]: European Data Format.
Line 83: Line 56:
 
*[[User Reference:FFTFilter]]: Short-term FFT for display or feature extraction purposes.
 
*[[User Reference:FFTFilter]]: Short-term FFT for display or feature extraction purposes.
 
*[[User Reference:P3TemporalFilter]]: Segmenting and averaging for ERP feature extraction.
 
*[[User Reference:P3TemporalFilter]]: Segmenting and averaging for ERP feature extraction.
 +
 
===Translation Algorithm===
 
===Translation Algorithm===
 
*[[User Reference:LinearClassifier]]: Linear projection of signal features onto low-dimensional classification space (control signal).
 
*[[User Reference:LinearClassifier]]: Linear projection of signal features onto low-dimensional classification space (control signal).
 
*[[User Reference:Normalizer]]: Adjustment of control signal to zero mean/unit variance.
 
*[[User Reference:Normalizer]]: Adjustment of control signal to zero mean/unit variance.
 +
 
===Miscellaneous Filters===
 
===Miscellaneous Filters===
 
*[[User Reference:LPFilter]]: Temporal low-pass filtering at any stage of processing.
 
*[[User Reference:LPFilter]]: Temporal low-pass filtering at any stage of processing.
Line 91: Line 66:
 
*[[User Reference:StateTransform]]: An offline replacement for hitting targets in an online task.
 
*[[User Reference:StateTransform]]: An offline replacement for hitting targets in an online task.
 
*[[User Reference:ExpressionFilter]]: Computes filter output using arithmetic expressions.
 
*[[User Reference:ExpressionFilter]]: Computes filter output using arithmetic expressions.
 +
*[[User Reference:MatlabFilter]]: Using MATLAB to implement online processing in the pipeline.
  
 
==Application Module==
 
==Application Module==
Line 101: Line 77:
 
*[[User Reference:StimulusPresentationTask]]: Sequential presentation of stimuli.
 
*[[User Reference:StimulusPresentationTask]]: Sequential presentation of stimuli.
 
*[[User Reference:P3SpellerTask]]: A P300 speller matrix application.
 
*[[User Reference:P3SpellerTask]]: A P300 speller matrix application.
===External Interfacing Filters===
+
===External Interfaces===
 
*[[User Reference:ConnectorOutput]]: Reports state information to a UDP socket.
 
*[[User Reference:ConnectorOutput]]: Reports state information to a UDP socket.
 
*[[User Reference:ConnectorInput]]: Sets state information according to input from a UDP socket.
 
*[[User Reference:ConnectorInput]]: Sets state information according to input from a UDP socket.
Line 113: Line 89:
  
 
==See also==
 
==See also==
[[Technical Reference:Core Modules]]
+
[[Technical Reference:Core Modules]], [[Contributions:Contents]]
  
 
[[Category:Contents]][[Category:Filters]]
 
[[Category:Contents]][[Category:Filters]]

Latest revision as of 16:05, 20 June 2013

Filters are the most important building blocks of a BCI2000 system. This document describes the filter concept for users who will configure BCI2000 for their own experiments, and provides links to the documentation pages of individual filters, describing each filter's purpose and parameterization. On this page, only core components of BCI2000 are described; for contributed filters, see Contributions:Contents.

Data Processing as a Pipe

Each of the three BCI2000 core modules contains a chain of filters, i.e. a sequence of filters forming a pipe where, basically, brain signal data enter on one side, and a processed version of these data leaves on the other side.

The notion of a pipe implies that, for each portion of data entering on the input side, there will be exactly one portion of output data on the output side. This is analogous to a water pipe: unlike a water stream (a brook, or a river), it is impossible to insert or remove water from inside the pipe without breaking it. Similarly, albeit signal portions may change their shape on their way through the pipe (filter chain), it is impossible to insert or remove any of them. Thus, each data portion acquired by the data acquisition module will run through the entire BCI2000 system, being processed by a sequence of filters.

This page is mostly about the way filters are used online in BCI2000 core modules. Note however that the same filter code can be accessed in order to recreate a processing chain offline, either from the system command-line or from within Matlab.

Configuration Overview

In principle, these filters may be placed in any order by the writer (programmer) of a BCI2000 module, and it is technically easy to change the number, and order, of filters. However, not all combinations or orderings of filters make sense.

The flowchart shows modules and filters for BCI2000's configurations included in the core distribution:

Flowchart of the Data moving through the Filter Pipeline
Flowchart of the Data moving through the Filter Pipeline

Data Acquisition Module

In the data acquisition (source) module, the DataIOFilter manages data acquisition and storage in a general manner. Actual acquisition of data is provided by ADC filters, actual writing into data files is done by FileWriter filters representing various Data Formats. In addition to managing the operation of ADC and FileWriter filters, the DataIOFilter handles signal calibration into physical units (typically, \mu V), and visualization of the source signal.

Filter documentation for source modules is available for

General Filters

Data Acquisition

Data Storage

Signal Processing Module

In the signal processing module, brain signals are filtered spatially and temporally, resulting in a set of extracted features. In the Classifier, these features are used to differentiate amongst a small number of mental states (classes). Finally, the Normalizer adjusts the Classifier's output to zero mean and unit variance.

Filter documentation for signal processing filters is available for

Feature Extraction

Translation Algorithm

Miscellaneous Filters

Application Module

Basically, the application module contains a single filter that handles trial sequencing and brain signal feedback. In the standard configuration, this task filter is surrounded by ConnectorInput and ConnectorOutput filters. These connector filters allow for exchanging data with external software over a UDP based socket protocol.

Filter documentation of application module filters is available for

Stimulus Presentation and Feedback

External Interfaces

Internationalization

See also

Technical Reference:Core Modules, Contributions:Contents