Table of Contents
Fetching ...

An open-source implementation of a closed-loop electrocorticographic Brain-Computer Interface using Micromed, FieldTrip, and PsychoPy

Bob Van Dyck, Arne Van Den Kerchove, Marc M. Van Hulle

TL;DR

The paper tackles the challenge of implementing flexible, closed-loop ECoG BCIs in clinical settings by introducing an open-source, modular Python stack that integrates Micromed data acquisition, FieldTrip-based real-time processing, and PsychoPy-driven user interaction. It contributes three libraries—psychopylib, pymarkerlib, and pyfieldtriplib—that address experiment design, event synchronization, and real-time processing, with runnable use-case examples. The work provides a detailed architectural description, practical latency considerations, and demonstrations of both synchronous and asynchronous BCI use, highlighting the benefits of modularity and transparency. By reducing reliance on monolithic platforms and aiming to remove MATLAB dependencies, the approach lowers barriers for researchers to translate ECoG decoding advances into usable BCI applications in clinical contexts.

Abstract

We present an open-source implementation of a closed-loop Brain-Computer Interface (BCI) system based on electrocorticographic (ECoG) recordings. Our setup integrates FieldTrip for interfacing with a Micromed acquisition system and PsychoPy for implementing experiments. We open-source three custom Python libraries (psychopylib, pymarkerlib, and pyfieldtriplib) each covering different aspects of a closed-loop BCI interface: designing interactive experiments, sending event information, and real-time signal processing. Our modules facilitate the design and operation of a transparent BCI system, promoting customization and flexibility in BCI research, and lowering the barrier for researchers to translate advances in ECoG decoding into BCI applications.

An open-source implementation of a closed-loop electrocorticographic Brain-Computer Interface using Micromed, FieldTrip, and PsychoPy

TL;DR

The paper tackles the challenge of implementing flexible, closed-loop ECoG BCIs in clinical settings by introducing an open-source, modular Python stack that integrates Micromed data acquisition, FieldTrip-based real-time processing, and PsychoPy-driven user interaction. It contributes three libraries—psychopylib, pymarkerlib, and pyfieldtriplib—that address experiment design, event synchronization, and real-time processing, with runnable use-case examples. The work provides a detailed architectural description, practical latency considerations, and demonstrations of both synchronous and asynchronous BCI use, highlighting the benefits of modularity and transparency. By reducing reliance on monolithic platforms and aiming to remove MATLAB dependencies, the approach lowers barriers for researchers to translate ECoG decoding advances into usable BCI applications in clinical contexts.

Abstract

We present an open-source implementation of a closed-loop Brain-Computer Interface (BCI) system based on electrocorticographic (ECoG) recordings. Our setup integrates FieldTrip for interfacing with a Micromed acquisition system and PsychoPy for implementing experiments. We open-source three custom Python libraries (psychopylib, pymarkerlib, and pyfieldtriplib) each covering different aspects of a closed-loop BCI interface: designing interactive experiments, sending event information, and real-time signal processing. Our modules facilitate the design and operation of a transparent BCI system, promoting customization and flexibility in BCI research, and lowering the barrier for researchers to translate advances in ECoG decoding into BCI applications.
Paper Structure (19 sections, 6 figures, 1 table)

This paper contains 19 sections, 6 figures, 1 table.

Figures (6)

  • Figure 1: Overview of the three BCI components (data acquisition, signal processing, and user application) and the three stages of design and operation (training data acquisition, BCI calibration, and BCI use).
  • Figure 2: System overview. The setup is divided into three parts corresponding to the three stages of use: clinical data acquisition (orange), training data acquisition (red), BCI calibration and use (blue).
  • Figure 3: A typical experiment with a block design using psychopylib classes. Each trial consists of a sequence of segments in a fixed order, while each block consists of a sequence of trials that are shuffled when the block is repeated (see Listing \ref{['code:psychopylib']}).
  • Figure 4: Callback structure when calling a sequence of three one-second segments. Before and after-methods, roughly corresponding to stimulus preparation and logging, are executed during the preceding and subsequent segment, respectively. Sequences also pass along a recursive-method to, for example, draw stimuli associated with the sequence.
  • Figure 5: Example of typical experimental setup with a block design using psychopylib classes. Each trial consists of a sequence of segments in a fixed order, while each block consists of a sequence of trials that are shuffled when the block is repeated.
  • ...and 1 more figures