Jump to content

Contributions:gEstimFilter: Difference between revisions

From BCI2000 Wiki
No edit summary
No edit summary
Line 17: Line 17:
This extension resides in the Application module and allows for electrical stimulation.
This extension resides in the Application module and allows for electrical stimulation.
Note: As of rev.6131, this extension does not work the the gEstim FES Research. The extension has only been tested with the g.Estim PRO.
Note: As of rev.6131, this extension does not work the the gEstim FES Research. The extension has only been tested with the g.Estim PRO.
==Installation==
The gEstimPro drivers must be installed. Contact gTec to obtain access.


==Integration into BCI2000==
==Integration into BCI2000==
This extension resides in the private directory of BCI2000. It must be enabled in CMake by selecting <code>BUILD_GESTIMFILTER</code>. Then recompile the <code>BCI2000FrameworkAppModule</code>, and the application module you are using. Lastly, append the enable flag to your batch file (ex: <code>Start executable StimulusPresentation --local --ActivateEstim=1</code>).
This extension resides in the private directory of BCI2000. It must be enabled in CMake by selecting <code>BUILD_GESTIMFILTER</code>. Then recompile the <code>BCI2000FrameworkAppModule</code>, and the application module you are using. Lastly, append the enable flag to your batch file (ex: <code>Start executable StimulusPresentation --local --ActivateEstim=1</code>).


==Usage==
==Parameters==
==Parameters==
The gEstim device is configured in the gEstim tab.  The configurable parameters are:
The gEstim device is configured in the gEstim tab.  The configurable parameters are:

Revision as of 21:48, 8 April 2025

g.tec g.Estim PRO cortical stimulator

This filter allows for cortical stimulation with the g.tec gEstim PRO.

Versioning

Authors

Kristopher Kaleb Goering (kaleb.goering@gmail.com)

Alexander Belsten (belsten@neurotechcenter.org)

Source Code Revisions

  • Initial development: --
  • Tested under: 6191
  • Known to compile under: 6191
  • Broken since: --

Functional Description

This extension resides in the Application module and allows for electrical stimulation. Note: As of rev.6131, this extension does not work the the gEstim FES Research. The extension has only been tested with the g.Estim PRO.

Installation

The gEstimPro drivers must be installed. Contact gTec to obtain access.

Integration into BCI2000

This extension resides in the private directory of BCI2000. It must be enabled in CMake by selecting BUILD_GESTIMFILTER. Then recompile the BCI2000FrameworkAppModule, and the application module you are using. Lastly, append the enable flag to your batch file (ex: Start executable StimulusPresentation --local --ActivateEstim=1).

Parameters

The gEstim device is configured in the gEstim tab. The configurable parameters are:

Set-up Preferences

ActivateEstim

Enables/disables device.

UseStimulusPresentation

Figure 1: Adding an additional row labeled EstimOn to stimuli to trigger stimulation

This parameter can be enabled when using the Stimulus Presentation application module, and it is desired to stimulate on a particular stimulus, as defined in Stimulus Presentation's Stimuli parameter. To configure this functionality, enable this parameter and then navigate to the Application tab in BCI2000 and scroll down to the Stimuli matrix, as shown in Fig. 1. After opening the Stimuli matrix, add another row and name it EstimOn. Now, stimulation will be triggered on all stimuli defined in this matrix has its EstimOn row set to 1. Stimulation will not occur on stimuli that have this row set to 0.

DeviceMode

Device mode, with available options of Default, Basic, Handheld, Advanced, and FES. Changing the mode affects the default configuration settings and the maximum and minimum limitations of the device.

The on/off or enumeration options for gEstim

UseMultipleConfigurations

Enables the use of StimulationConfigurations table. This allows for multiple stimulation configurations during a run. Whenever stimulation is triggered through the EstimOn row or through StimulationExpression, it will trigger the most recently uploaded configuration.

Only some gEstim devices, with an updated firmware, can quickly change stimulation configurations with the use of SUPERMODE. If you enabled UseMultipleConfigurations and your device cannot enable SUPERMODE, BCI2000 will warn you. It will still work to switch stimulation parameters, but it will take longer than 200ms.

DoSelfTest

Enables user to disable the Self-test. g.Tec recommends performing the self-test before every use in case the device is faulty.

QuietStimulation

Enable to silent the stimulation.

EnableExternalTrigger

Enable to use the digital input 1 (DIN1) as the external trigger for stimulation. This parameter mimics the same behavior as the native Matlab app for gEstim, allowing for DIN1 to be used as both for Start/Abort or just for Start. Using the external trigger lowers the stimulation latency.

Stimulation Parameters

StimulationConfigurations

StimulationConfigurations table

Table that allows for multiple configurations. The parameters in the table are the same as below. The first row, Expression, can either correlate to uploading the stimulation or uploading and starting the stimulation. To start immediately after upload, leave StimulationExpression empty and turn UseStimulusPresentation off. Otherwise, StimulationExpression or the EstimOn row will start the stimulation that was uploaded. The AbortExpression will still abort any active stimulation.

StimulationExpression

Expression to start g.Estim stimulation. See the expression page for more details on how to define an expression.

AbortExpression

Expression to abort g.Estim stimulation.

Modularity

Configurable parameters of stimulation profile

Modularity of pulses; Biphasic or Monophasic

Polarity

Polarity of pulses; Alternating or Steady

PhaseDuration

Duration of time of each +/- phase.

InterphaseDuration

Duration of time with no stimulation between each pulse's phases.

Magnitude

Magnitude of the pulse in milliamps. This quantity is peak-to-zero.

NumberOfPulses

Number of pulses per train.

PulseFrequency

Frequency of each pulse in a train. Note that the PhaseDuration and InterphaseDuration impose a limit on the PulseFrequency. Make sure this parameter adheres to this limitation.

NumberOfTrains

Number of trains.

FrequencyOfTrains

Frequency of trains. Note that the total duration of each train (determined by length of each pulse and the number of pulses) imposes a restriction on this parameter. Make sure that FrequencyOfTrains adheres to this restriction.

Jitter

Jitter of trains between 0 and 100% in increments of 1%

Electrode Settings

ElectrodeType

Type of electrode being used: 1 Circle, 2 Depth, 3 Other.

CircleDiameter

For circle electrode type. Exposed diameter of the electrode in micrometers in increments of 1μm.

ContactDiameter

For depth electrode type. Contact diameter of the electrode in micrometers in increments of 1μm.

ContactLength

For depth electrode type. Contact length of the electrode in micrometers in increments of 1μm.

ExposedSurfaceArea

For other electrode type. Exposed surface area of electrode in square micrometers between in increments of 1μm2.

State Variables

EstimStimulus

This binary state is 1 when a stimulation train is running and 0 otherwise.s

EstimCurrent

Applied current in µA, reported from the stimulator. 16 bit state.

EstimVoltage

Applied voltage in mV, reported from the stimulator. 16 bit state.

EstimImpedance

Impedance of tissue in Ω in 16 bit state. Calculated using EstimCurrent and EstimVoltage values.


SCIT

To help out with creating the BCI2000 parameters, a GUI has been made which should make it easy to translate your stimulation specifications into BCI2000 parameter files. The GUI also visualizes the stimulation from three different perspectives, making it easy to tell if your parameters are really what you want. There is a Stimulation Configuration tool user reference which will further tell you how to use this tool.

This tool currently does not have the new StimulationConfigurations parameter, so it only allows for one configuration to be exported.

Latency

Latency of stimulation

The above figure details the latency between positive evaluation of the StimulationExpression and pulse delivery.