Fourth International BCI Meeting 2010
Asilomar Conference Center, Carmel, California
May 31 - June 3, 2010
Nima Bigdely-Shamlo & Scott Makeig
Swartz Center for Computational Neuroscience, Institute for Neural Computation, University of California San Diego, La Jolla, CA
Background and Objective: Most current BCI systems rely on compiled code (usually C++) for real-time operations. Although this has the advantage of faster computation, it limits the flexibility of the system and increases the time needed to implement new features. Recent performance gains in computer hardware and the introduction of multi-core CPUs have made it possible to process data in real-time using the Matlab scripting language and processing environment. Here we introduce a new software package, called MatRiver , which is a set of Matlab functions optimized for real-time data processing, buffering and visualization with emphasis on EEG analysis.
Methods: MatRiver operates in conjunction with the data acquisition, distribution and synchronization system developed by A. Vankov, called DataRiver . With DataRiver, input data is buffered on the local machine outside Matlab and MatRiver system does not have to continuously check for newly arrived data. MatRiver can check the buffer on regular (0.1 s or less) intervals by exploiting timer objects and read all the newly arrived samples in one quick step. This feature is essential for real-time operations since it eliminates the chance of sample loss when Matlab process is busy.
MatRiver provides a pipeline for EEG pre-processing and classification. In addition to performing common EEG processing steps, such as channel selection, re-referencing, frequency filtering and linear spatial filtering (ICA  or other models), MatRiver includes simple-to-use routines for dynamic noisy channel detection and compensation (based on ICA source model ). The pre-processed activity of channels or independent components is accumulated in Matlab and may be used for event-based classification or continuous visualizations of derived EEG features, such as alpha band power.
MatRiver functions are usually invoked by timer objects in specified intervals which frees up the CPU time between these runs. In addition, Event-based EEG classification is facilitated by using Matlab callback functions that are executed at predefined latencies after selected events (triggers). This architecture allows for use of any classifier function accessible in Matlab.
Results: As MatRiver is optimized for speed of computation and display, EEG preprocessing and most event-based classifications can be performed in less than 10 ms on common hardware. Also, continuous visualizations of derived EEG features (such as alpha band power) may rendered at more than 19 frames per second. In the gaming industry, response latencies must be less than 80 ms for the subject to consider the system reaction to be real time. MatRiver can achieve comparable or better response latency in most applications that involve continuous visualizations.
Discussion and Conclusions: With MatRiver, users can leverage their existing knowledge of Matlab and its extensive mathematical and visualization capabilities. Existing Matlab scripts for EEG analysis and classification can be easily used in conjunction with MatRiver functions with minimal modifications. This greatly reduces the need for re-implementing the same code in different languages for real-time implementation (e.g., from original Matlab code used in offline analysis to real-time C code). This ease of use may allow easier exploratory development of more complex and powerful real-time analysis methods.
 MatRiver tutorial wiki. World Wide Web site: http://sccn.ucsd.edu/wiki/MatRiver
 DataSuite tutorial wiki. World Wide Web site: http://sccn.ucsd.edu/wiki/DataSuite
 Lee T-W, Girolami M, Sejnowski TJ, Independent Component Analysis Using an Extended Infomax Algorithm for Mixed Subgaussian and Supergaussian Sources, Neural Computation 11,2:417-441, 1999.
 Bell AJ, Sejnowski TJ. An Information Maximization Approach to Blind Separation and Blind Deconvolution, Neural Computation 7:1129-1159, 1995.
 Delorme A, Makeig S, EEG changes accompanying learning regulation of the 12-Hz EEG activity, IEEE Transactions on Rehabilitation Engineering 11,2:133-136, 2003.
 Bigdely-Shamlo N, Vankov A, Ramirez R, Makeig S., "Brain Activity-Based Image Classification From Rapid Serial visual Presentation," IEEE Transactions on Neural Systems and Rehabilitation Engineering, 16:4, 2008.
Keywords. BCI, EEG, Brain-Computer interface, HCI, Realtime, Matlab
Support. Office of Naval Research, The Swartz Foundation
Return to Current Abstracts