[Primer] Brain-Computer Interfaces Using EEG
This primer provides the EEG and signal-processing background for the BCI Mental Workload project, which used EEG alongside fNIRS to study cognitive load during BCI training. See also the companion primer on fNIRS for Brain Sensing.
A Brain-Computer Interface (BCI) is a direct communication channel between the central nervous system and an external device, bypassing muscles entirely. The most widely adopted sensing modality is electroencephalography (EEG), which records scalp electrical potentials generated by the synchronized activity of cortical neuron populations. This primer covers the EEG signal itself, the standard electrode placement system, the frequency bands that carry functional meaning, and the four main BCI paradigms built on top of them.
Electroencephalography
EEG measures voltage fluctuations resulting from ionic current flows within cortical neurons. Electrodes placed on the scalp pick up these signals, typically in the microvolt range, amplify them, and digitize them for analysis. Despite its modest spatial resolution, EEG offers two properties that make it indispensable for BCI: it is non-invasive, and its temporal resolution is in the millisecond range, sufficient to track fast neural dynamics.
The International 10-20 Electrode Placement System
Electrode positions are defined by the 10-20 System, in which locations are expressed as percentages (10% or 20%) of the total scalp distance along defined anatomical axes (nasion to inion, and ear to ear). Each site is labeled by a letter indicating the underlying brain region and a number indicating laterality:
| Letter | Region |
|---|---|
| F | Frontal |
| C | Central (motor cortex) |
| P | Parietal |
| O | Occipital (visual cortex) |
| T | Temporal |
Odd numbers indicate the left hemisphere, even numbers the right, and the suffix z denotes the midline. This standardized grid ensures that electrode signals can be mapped onto known cortical areas consistently across studies and devices.
Frequency Bands
Raw EEG is decomposed into frequency bands that correlate with distinct cognitive and physiological states:
| Band | Range (Hz) | Functional correlates |
|---|---|---|
| Delta | 0.5 – 4 | Deep sleep, pathological states |
| Theta | 4 – 8 | Drowsiness, memory encoding |
| Alpha | 8 – 12 | Relaxed wakefulness, visual idling |
| Beta | 12 – 30 | Active thinking, motor control |
| Gamma | > 30 | High-level cognitive processing |
BCI research primarily exploits the alpha and beta bands over sensorimotor areas, though all bands carry diagnostic information.
Alpha Waves
Alpha waves (8-12 Hz) are the most prominent resting-state oscillation in the EEG. They dominate over the occipital cortex when the eyes are closed and the brain is in an idle, non-processing state. Opening the eyes, engaging in visual tasks, or directing attention causes their power to drop sharply, a suppression called alpha desynchronization.
BCI application. The reliable contrast between open and closed eyes makes alpha power the basis of one of the simplest BCI paradigms, open and closed eye detection, widely used for fatigue and drowsiness monitoring. More generally, alpha power over sensorimotor cortex reflects the degree of cortical engagement: broader alpha suppression signals higher task demands.
In the context of mental workload assessment, a decrease in alpha power has been associated with increases in arousal, resource allocation, and cognitive load. Researchers track alpha and theta band power as proxy signals for workload in passive BCI and neuroergonomics applications.
P300 (Event-Related Potential)
Unlike alpha waves, which represent ongoing oscillatory activity, the P300 is an event-related potential (ERP), a transient voltage deflection time-locked to a specific stimulus. The P300 is a positive-going component appearing approximately 300 ms after an infrequent, task-relevant (target) stimulus is presented within a sequence of frequent non-target stimuli. This experimental structure is called the oddball paradigm.
The amplitude of the P300 is largest at parietal and central midline electrodes (Pz, Cz) and reflects the cognitive processes of attention allocation, context updating, and decision-making. Crucially, the user does not need to move or learn any motor skill: they simply attend to the target stimulus.
BCI application. The P300-based speller (Farwell & Donchin, 1988) is one of the most clinically established BCIs for severely paralyzed users. Letters are arranged in a grid; rows and columns flash in rapid sequence, and the user silently counts how many times the target row or column lights up. The row and column that produce the largest P300 response identify the intended character. Because the P300 is driven purely by selective attention, it requires essentially no training and is among the most robust BCI paradigms available.
Steady-State Visual Evoked Potentials (SSVEP)
When a flickering visual stimulus is presented at a fixed frequency \(f\) Hz, the visual cortex generates an oscillatory response at exactly that frequency and its harmonics \(2f\), \(3f\), and so on. This response, detectable over occipital electrodes (O1, Oz, O2), is called a Steady-State Visual Evoked Potential (SSVEP).
By displaying several stimuli simultaneously, each flickering at a different frequency, a user can select an option simply by looking at it. The target stimulus is identified by finding which frequency dominates the occipital EEG spectrum, typically via Fast Fourier Transform or Canonical Correlation Analysis.
BCI application. SSVEP-based BCIs support multiple simultaneous commands (one per stimulus frequency) with very high information transfer rates and minimal training. Common target frequencies range from 6 to 15 Hz. The main practical limitation is that prolonged fixation on flickering stimuli can induce visual discomfort or, in susceptible individuals, photosensitive responses.
Motor Imagery and ERD / ERS
Motor Imagery
Motor imagery (MI) is the mental simulation of a movement without any overt muscular action. During MI, the brain activates largely the same sensorimotor circuits as during actual movement, producing measurable EEG modulations over the contralateral hemisphere relative to the imagined limb.
BCI systems that exploit MI, called sensorimotor rhythm (SMR)-based BCIs, are particularly valuable for users with severe motor disabilities (Han & Bin, 2014). The user imagines, for example, moving their left or right hand, and the BCI decodes which hand was imagined from the EEG.
Event-Related Desynchronization (ERD) and Event-Related Synchronization (ERS)
The signature EEG response to motor execution or imagery is a modulation of power in the mu rhythm (8-13 Hz) and beta band (18-26 Hz) over the central electrodes (C3, Cz, C4) (Pfurtscheller & Neuper, 1997). Two complementary phenomena are observed (Pfurtscheller & Lopes da Silva, 1999):
- ERD (Event-Related Desynchronization): a decrease in band power during the preparation and execution (or imagination) of movement. For a right-hand task, ERD is maximal over C3 (left motor cortex, contralateral to the imagined hand). ERD reflects the active engagement of the sensorimotor cortex.
- ERS (Event-Related Synchronization): a rebound increase in power after movement termination (Pfurtscheller, 1992). It is thought to reflect active inhibition or an “idling” state of the cortex following the motor event.
ERD/ERS Quantification
The standard quantification formula, introduced by Pfurtscheller and Aranibar (Pfurtscheller & Aranibar, 1979), expresses ERD/ERS as a percentage change in power relative to a pre-event baseline interval \([r_0, r_0+1]\):
\[y_{ij} = (s_{ij} - \bar{s}_j)^2; \quad P_j = \frac{1}{N-1} \sum_{i=1}^{N} y_{ij}\] \[R = \frac{1}{k-1} \sum_{r_0}^{r_0+1} P_j\] \[\text{ERD/ERS}_j = \frac{P_j - R}{R} \times 100\%\]where \(N\) is the number of trials, \(s_{ij}\) is the \(j\)-th sample of the band-pass filtered signal on trial \(i\), \(\bar{s}_j\) is its trial-averaged mean, \(P_j\) is the inter-trial power at sample \(j\), and \(R\) is mean baseline power. Negative values indicate ERD (power suppression); positive values indicate ERS (power enhancement).
The SMR-BCI Training Problem
SMR-based BCI is highly subject-specific: users must learn to deliberately modulate their own mu and beta rhythms, a skill that typically requires weeks or months of intensive practice. Some users never achieve reliable control (“BCI illiteracy”). EEG patterns vary substantially across individuals, sessions, and mental states, making calibration and adaptation a central engineering challenge.
A subtler but critical problem arises when attempting to simultaneously use EEG for BCI control and for mental workload monitoring. The common EEG strategy for workload assessment, tracking changes in alpha and theta band power, overlaps considerably with the motor imagery signals used for BCI control. For instance, alpha desynchronization (ERD) occurs both during voluntary movement and during attentional engagement, making it extremely difficult to separate the two sources. This overlap motivates the use of a complementary modality such as fNIRS, which senses a physiologically distinct process.
The following videos document the end-to-end BCI training procedure from my Bachelor’s thesis experiments at the Biosignal and Medical Imaging Processing Lab, Biomedical Engineering School, International University. They walk through each step of a full SMR-BCI session, from hardware setup to real-world device control.
Step 1: Checking Electrode Offset. Before any recording, every electrode’s contact quality is verified in Biosemi’s ActiveView software. Each electrode has an offset voltage that reflects the quality of the scalp-electrode junction. High offset values indicate poor contact, which translates directly into noise on the EEG trace. This step is not optional: a single bad electrode can corrupt neighboring channels and make the calibration data unusable. Hardware: Biosemi ActiveTwo; Software: ActiveView and BCI2000.
Step 2: Correcting Noisy Electrodes. Any electrodes flagged in Step 1 are corrected before proceeding. This typically involves injecting additional conductive gel into the electrode cup, pressing it more firmly against the scalp, or repositioning it slightly to improve scalp contact. The process is repeated until all channels fall within acceptable offset limits.
Step 3: Calibration via Imaginary Movement. With clean signals confirmed, the user performs motor imagery tasks while EEG is recorded without feedback. BCI2000 then computes spectral features across all channels and generates coefficient-of-determination (\(r^2\)) maps to identify which electrode locations and frequency bands best separate the two imagined movement classes. This calibration determines the spatial and spectral parameters of the classifier that will drive the BCI in subsequent sessions.
Step 4: Cursor Task (Closed-Loop Feedback Training). With the classifier configured, the user enters the closed-loop feedback phase. Imagined hand movements are decoded in real time by BCI2000 and mapped to the vertical position of a cursor moving across the screen. The user must guide the cursor to hit a target on the right side. This neurofeedback loop is the core training mechanism through which users gradually learn to modulate their own mu and beta rhythms with sufficient precision for reliable control.
Step 5: Real-World Device Control. The final stage demonstrates the end goal of BCI training: controlling a physical device by thought alone. A Hexbug robot was hacked and interfaced with the BCI system. The trained user attempted to steer the robot through circles drawn on a table using only motor imagery, with no physical input.
Summary
| Paradigm | Signal type | Electrode site | Training needed | Key feature |
|---|---|---|---|---|
| Alpha waves | Oscillatory | Occipital | Minimal | Power in 8–12 Hz |
| P300 | Event-related potential | Central / parietal | None | ~300 ms positive deflection |
| SSVEP | Steady-state oscillation | Occipital | None | Frequency lock-in |
| Motor imagery | Oscillatory (ERD/ERS) | Central (C3, C4) | Extensive | Mu/beta power suppression |
Each paradigm exploits a different feature of the EEG signal. The choice of paradigm determines training requirements, achievable information transfer rate, and suitability for a given clinical or engineering application.
References
- Talking off the top of your head: toward a mental prosthesis utilizing event-related brain potentialsElectroencephalography and Clinical Neurophysiology, 1988
- Brain-Computer Interfaces Using Sensorimotor Rhythms: Current State and Future PerspectivesIEEE Transactions on Biomedical Engineering, 2014
-
- Event-related EEG/MEG synchronization and desynchronization: basic principlesClinical Neurophysiology, 1999
- Event-related synchronization (ERS): an electrophysiological correlate of cortical areas at restElectroencephalography and Clinical Neurophysiology, 1992
- Evaluation of event-related desynchronization (ERD) preceding and following voluntary self-paced movementElectroencephalography and Clinical Neurophysiology, 1979