Jump to content

Closed-Loop Stimulation

From BCI2000 Wiki
Revision as of 17:51, 24 June 2025 by Wengelhardt (talk | contribs) (Created page with "How do we do closed-loop stimulation in BCI2000? This page will provide a foundation to help you on your closed-loop journey. Since BCI2000 is designed to be closed-loop, implementing stimulation is relatively simple. There are only a few adjustments needed to change a closed-loop task, like the Mu Rhythm tutorial, to a closed-loop stimulation task. ==Stimulator Types== There are two types of stimulators in BCI2000 which are trea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How do we do closed-loop stimulation in BCI2000? This page will provide a foundation to help you on your closed-loop journey. Since BCI2000 is designed to be closed-loop, implementing stimulation is relatively simple. There are only a few adjustments needed to change a closed-loop task, like the Mu Rhythm tutorial, to a closed-loop stimulation task.

Stimulator Types

There are two types of stimulators in BCI2000 which are treated distinctly for closed-loop stimulation. The main distinction is where they are in the BCI2000 pipeline.

  1. Stimulation devices: Located in the Application module, as extensions. E.g., g.tec gEstim PRO, Blackrock CereStim
  2. Amplifiers: A Signal Source module that acquires data and delivers stimulation. E.g., Cortec Brain Interchange, AlphaOmega neuromodulation system

Stimulators in the Application module can handle closed-loop stimulation seamlessly. After this is covered, we will document how we can approach the stimulators that are also amplifiers as a Signal Source module.

1) Stimulation devices

All the stimulators have a parameter that triggers the stimulation based on a BCI2000 Expression. This can use the incoming signal or state. Since the stimulator is in the Application module, which is after the Signal Processing, the incoming signal can be processed appropriately to trigger stimulation however you like.

For example, if you want to stimulate using the standard SpectralSignalProcessing, you can format the output to be a single channel corresponding to the average power of a frequency band. Therefore, this output signal, also called the control signal, can be used in a BCI2000 Expression to trigger stimulation with a simple threshold: Signal(1,1)>100.

Similarly, a BCI2000 State can be used in the Expression to trigger the stimulation.

2) Amplifiers with stimulation