User Reference:ControlStateFilter
Function
The ControlStateFilter enables sending the control signal (output of the signal processing pipeline) to a state: ControlState. Any BCI2000 Expression can be used to control the ControlState, however using the signal will be the most useful.
This filter was created for closed-loop stimulation control. Please see the Closed-Loop Stimulation reference page for detailed information.
Author
Will Engelhardt - engelhardt@neurotechcenter.org
Frederik Lampert - lampert.frederik@mayo.edu
Parameters
ControlExpression
This expression is evaluated at a sample-by-sample basis. Every sample is evaluated, and the result (true or false) is copied to the state ControlState.
MinControlDuration
Minimum time the ControlExpression must be true before the ControlState state is set to true. Time is specified in sample blocks if no unit is present, and in milliseconds or seconds if ms or s is present.
RefractoryPeriod
This is the necessary time to wait after the ControlState is triggered for it to be able to be triggered again. This can be specified in time units or sample units. For example, if this parameter is 2s, once ControlExpression is evaluated true and ControlState is triggered, ControlState will not be triggered for at least another 2 seconds. After this delay of 2 seconds, ControlExpression will be evaluated at a sample basis again. This delay has the resolution of the sampling rate
States
ControlState
This state is a binary true or false state, controlled by the Control Expression. It can change on a sample-by-sample basis. This is useful when the signal source wants to use the output of the signal processing pipeline, because the evaluation can be copied into this state.
RefractoryPeriod
This state is 1 during the refractory period, and 0 otherwise.
Integration
This filter is currently used for the ClosedLoopStim module, found in src/contrib/SignalProcessing. However, if desired for other modules, it could easily be moved to the shared folder to maximize flexibility.