Home

Awesome

Neurofeedbacklab

Neurofeedbacklab is a neurofeedback software approach based on Matlab. It uses EEGLAB and a collection of EEGLAB plugins to provide state of the art artifact rejection and real-time source localization and connectivity analysis. Feedback is performed by the Matlab psychophysics toolbox (an example is provided). The Neurofeedbacklab real-time computing engine has been thoroughly tested against EEGLAB processing pipelines (see below).

Dependencies

See the INSTALL.md documentation.

Features

Typical usage

In a typical session, you will call the nfblab_process with the runmode option set to baseline to acquire a baseline of about 1 minute. This will allow Neurofeedbacklab to find bad channels, set up the Artifact Subspace Reconstruction filer, run ICA and find bad components. After the baseline run, you run one or more trial runs (runmode option set to trial).

Hardware

Any EEG system supported by LSL (this includes BIOSEMI, EGI, Neuroscan, Brainproducts, Emotiv, Cognionics, Enobio, Muse etc...). See the full list at https://github.com/sccn/labstreaminglayer/wiki/SupportedDevices.wiki. Allow using ADR101 board (http://www.ontrak.net/adr101.htm) if you want to be able to send events from the presentation computer to the EEG system. These boards translate serial information to parallel that can be used with EEG systems. Plan for a relatively powerfull multi-core computer to perform both data acquisition and feedback. The current program was used with a BIOSEMI 64-channel system and a 4-core Dell workstation with 8Gb of RAM.

Feedback

Visual feedback is handled by the free Matlab Psychophysics toolbox (http://psychtoolbox.org/). Assuming that 2 screens are connected to the same PC, one screen for the experimenter and one screen for the participant. Can also be set up a single screen program that the experimenter and participant share. Default visual feedback is simple (for a session is visible see https://youtu.be/7lrMgpV1FSI) but can be tailored to any user need.

Feedback through a third party program is implemented through TCP/IP communication. An example of client is provided in simple_client.m. To use this client, start 2 sessions of Matlab. Set the nfblab_process "runmode" parameter to "slave", then run nfblab_process which will then for a connection from a client. In the separate session run the simple_client program. The program connected through TCP/IP can change all the options for the nfblab_process program including the LSL stream name.

Platform

Tested on Windows and Mac. Real-time code tested against offline EEGLAB processing pipelines (see function nfblab_check_computation.m)

Publication

This program was used to collect data on 24 subjects in a double blinded protocol (12 neurofeedback and 12 controls). 192 sessions were recorded. An session demo is visible here https://youtu.be/7lrMgpV1FSI. Please cite

Brandmeyer T, Delorme A. Closed-Loop Frontal Midlineθ Neurofeedback: A Novel Approach for Training Focused-Attention Meditation. Front Hum Neurosci. 2020 Jun 30;14:246. doi: 10.3389/fnhum.2020.00246. PMID: 32714171; PMCID: PMC7344173.

Computer settings for psychophysics toolbox display

Compile the program (so it does not require Matlab)

See the COMPILE.md documentation.