Skip to main content
QUICK REVIEW

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

Bob Van Dyck, Arne Van Den Kerchove|arXiv (Cornell University)|Feb 10, 2026
EEG and Brain-Computer Interfaces0 citations
TL;DR

The paper presents an open-source, modular Python-based stack for closed-loop ECoG BCIs that integrates Micromed acquisition, FieldTrip real-time processing, and PsychoPy-based experiment control, including three libraries (psychopylib, pymarkerlib, pyfieldtriplib) and runnable examples.

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.

Motivation & Objective

  • Provide a detailed technical description of a closed-loop ECoG-based BCI deployment in a clinical Micromed setting.
  • Introduce three open-source Python libraries (psychopylib, pymarkerlib, pyfieldtriplib) to enable flexible, modular BCI development.
  • Demonstrate integration of these tools with compact runnable examples that cover training, calibration, and online use.
  • Promote transparency, customization, and lower barriers for translating ECoG decoding advances into BCI applications.

Proposed method

  • Modular Python-based workflow combining data acquisition, real-time processing, and a user application.
  • Three libraries: psychopylib for structured PsychoPy experiment design, pymarkerlib for sending precise event markers, pyfieldtriplib for thread-based real-time signal processing pipelines.
  • Real-time data streaming via FieldTrip buffer with a MATLAB proxy, using TCP/IP/WLAN for data transfer and synchronization.
  • Epoching, preprocessing, and modeling implemented in real-time (RtEpoch, RtFunction) with a multithreaded pipeline to avoid blocking acquisition.
  • demonstrations include an open/close movement classification use case with a motor-imagery paradigm and a closed-loop feedback mechanism.
  • Latency considerations decomposed into ADC, processing, and output stages; strategies to bound or reduce latency and to set a suitable decision rate.

Experimental results

Research questions

  • RQ1How can a modular, open-source Python stack support closed-loop ECoG BCI experiments in a clinical setting using Micromed hardware?
  • RQ2What are the practical design decisions and software tools that enable precise stimulus timing, synchronization, and real-time processing in ECoG BCIs?
  • RQ3Can three lightweight libraries (psychopylib, pymarkerlib, pyfieldtriplib) successfully implement end-to-end BCI pipelines from data acquisition to closed-loop feedback?
  • RQ4What are the latency and decision-rate trade-offs in such a modular system, and how can they be managed in asynchronous vs synchronous use?

Key findings

  • The authors provide three open-source Python libraries (psychopylib, pymarkerlib, pyfieldtriplib) that enable experiment design, event synchronization, and real-time signal processing for closed-loop ECoG BCIs.
  • A detailed system description shows integration of Micromed acquisition, FieldTrip buffer, and PsychoPy-driven experiments in a clinical context, including a FieldTrip proxy and MATLAB-MEX interface.
  • They demonstrate runnable examples including a closed-loop movement classification use case and a motor-imagery EEG use case, with end-to-end latency analyses.
  • The Appendix use cases illustrate training, calibration, and asynchronous BCI use with explicit epoch-based processing and feedback mechanisms.
  • The work emphasizes modularity and minimalism, with future work aiming to remove MATLAB dependency by porting FieldTrip Micromed proxy to Python.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.