Jump to content

Technical Reference:System Design

From BCI2000 Wiki
Revision as of 18:07, 26 February 2007 by Mellinger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

\chapter{System Design}

Overview

BCI2000 consists of four modules shown in Figure (fig:modules) that communicate with each other. These modules are called Source , Signal Processing , Application , and Operator . We will refer to the three modules Source, Signal Processing and Application together as core modules . \begin{figure}[ht] \centerline{\includegraphics{figures/modules}} \caption{The functional modules and their interfaces}

(fig:modules)

\end{figure}

Core-Operator Communication

Introduction

The same communication protocol is used between each of the three core modules and the operator module. Although it can be implemented on top of any transport protocol, it assumes the reliability of TCP (i.e., the protocol does not support acknowledgements or packet sorting or any other means of error correction). Communication consists of messages that are sent and received asynchronously between any core module and the operator module. Below, an overview of message types is given. For details about specific messages, refer to the BCI2000 messages page.

Status Information Messages

Status messages are used to communicate errors and to convey status information (e.g., the operator module may display the remaining disc space on the Source module's machine.)

Parameter Messages

These messages transport Parameters carrying configuration information. The operator module receives parameter messages from core modules, which enables it to display parameters in a configuration dialog, and to save parameters to, and load them from a parameter file.

State Messages

The core modules and the operator module use messages containing States to communicate in the system initialization phase, as well as during system performance and for system termination.

Visualization Messages

Visualization messages are sent from core modules to the operator module, which in turn displays their content to the operator user. These messages may contain signal data for graphical display, or text to be displayed in a log window. A core module may also configure details of the display sending configuration messages.

System Command Messages

System Commands are meta-messages used to control the behavior of individual modules by switching their internal state. Typical system commands are EndOfParameter and EndOfState sent terminating a list of parameter or state messages. The nature of these system commands is defined by the specific implementation of the modules.

Inter-Core Communication

Introduction

Unlike the bidirectional communication between core modules and the operator module, communication within the core modules is unidirectional. The initial setup determines the exact nature of this communication and data is transmitted with the same protocol as described above.

State Vector Messages

A State Vector is a data structure consisting of a series of StateVectorLength subsequent bytes, representing an overall system state that is saved into a data file along with each block of data. The state vector is always transmitted before the brain signal or control signal.

Brain Signal Messages

From source to signal processing module, selected channels from the brain signal are transmitted as 32-bit floating point numbers calibrated into microvolts. The brain signal format is similar to the data format used for graphic visualization messages.

Control Signal Messages

From signal processing to application module, signal messages transfer decoded rather than raw brain signals. In both cases, the same kind of message is used. Typically, control signals consist of two or three channels carrying signals with zero mean and unit variance.