Добавил:
Sekretar
kiopkiopkiop18@yandex.ru
t.me/Prokururor I Вовсе не секретарь, но почту проверяю
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_6027_Библиотеки_им_академика_М_И_Перельмана.pdf
X
- •Preface
- •Acknowledgments
- •About This Book
- •Contents
- •List of Figures
- •List of Tables
- •Editor and Contributors
- •1.3 EEG and Other Neuroscience Methods
- •1.4 The Future of EEG
- •1.1 EEG Technology: Past to Present
- •1.2 What Do We Know About the EEG Signal?
- •1.5 Conclusions
- •References
- •2.1 Physiological Origins of the EEG
- •2.2 Signals of the EEG
- •2.3 Concluding Summary
- •References
- •3.1 Introduction
- •3.2 General Organization
- •3.3 Finding Your Way Around: Brain Atlases
- •3.3.2 Talairach Atlas and MNI Coordinates
- •3.3.4 Accessing and Using Atlases
- •3.4 Putting into All Together
- •3.5 Conclusion
- •References
- •4.1 Introduction
- •4.2 Overview of the Peripheral Nervous System
- •4.3 Basic Anatomical Unit of the PNS: Ganglia and Nerves
- •4.4 Anatomy of Somatic Nervous System
- •4.4.1 Receptors
- •4.4.1.1 Vision
- •4.4.1.2 Audition
- •4.4.1.3 Vestibular System and Balance
- •4.4.1.4 General Sensory Modalities
- •4.4.2 Somatic Sensory System
- •4.5 Anatomy of the Autonomic Nervous System
- •4.5.1 Sympathetic Nervous System
- •4.5.2 Parasympathetic Nervous System
- •4.6 Cranial Nerves
- •4.7 Function of the PNS and CNS as a Unit
- •4.8 Concluding Remarks
- •References
- •5.1 Introduction
- •5.2 Head Anatomy and Signal Propagation
- •5.3.1 The Eyes and Ocular Potentials
- •5.3.2 Facial Muscles and EMG
- •5.3.3 Sweat Glands and Skin Potentials
- •5.3.4 Blood Vessels and Heartbeat
- •5.4 Conclusion
- •References
- •6.1 Introduction
- •6.2.1 What Is a Brain State?
- •6.2.2 Brain States Measured with EEG
- •6.3 Examples of Brain States
- •6.3.1 Awake State Sleep State
- •6.3.2 Consciousness States: Presence Loss (Anesthesia)
- •6.4 Pathological Brain States
- •6.4.1 Traumatic Brain Injury
- •6.4.2 ADHD
- •6.5 Framework of Brain States
- •6.6 Concluding Summary
- •References
- •7.1 Introduction
- •7.3 Identifying Task Processes Within a Trial Segment
- •7.3.2 Cross-Trial Comparability and Flexible Time-Locking
- •7.4 What Does Activity Look Like on the Timeline?
- •7.5 Conclusion
- •References
- •8.1 Introduction
- •8.2 Setting a Research Question
- •8.3 Setting a Hypothesis
- •8.3.2 Testing the Hypothesis
- •8.4 Design of the Study
- •8.4.1 Contextualization of the Hypothesis
- •8.4.1.1 Experimental Paradigm
- •8.4.1.2 EEG Index
- •8.4.1.3 Group/Sample
- •8.4.2 Implementation of the Study
- •8.4.2.1 Paradigm/Task Implementation
- •8.4.2.2 Measurement Precision
- •8.4.2.3 Experimental Protocol
- •8.4.2.4 Pilot Testing
- •8.5 Concluding Summary
- •References
- •9.1 Introduction
- •9.2 Why Is Statistics Needed in EEG Research?
- •9.3 When Is Statistics Applied During EEG Data Analysis?
- •9.3.1 Raw EEG Data
- •9.3.2 Individual-Level (First-Level) Analysis
- •9.3.3 Group-Level (Second-Level) Analysis
- •9.3.3.1 Statistical Hypotheses
- •9.3.4 Application of Statistical Inference
- •9.3.5 Interpretation and Inference
- •9.4.1 Hypotheses (Upper Plane of Fig. 9.2)
- •9.4.2 Population and Sample Data (Bottom Plane of Fig. 9.2)
- •9.4.3 Sample Statistic (Middle Plane of Fig. 9.2)
- •9.5 Conclusion
- •References
- •10.1.1 Why Pilot Testing Matters
- •10.2 How to Prepare and Run the Pilot Testing
- •10.2.1.1 Signal Quality
- •10.2.1.2 Task Parameters
- •10.2.1.3 Instructions
- •10.2.1.4 Participant Experience
- •10.2.1.5 Equipment Setup
- •10.2.1.6 Procedures
- •10.2.1.7 Questionnaires
- •10.1 What Pilot Testing Is
- •10.3 Concluding Summary
- •References
- •11.1 Introduction
- •11.2 Lab Management
- •11.2.1 Admin and Organisation
- •11.2.2 Hardware and Software Maintenance
- •11.2.3 Lab Logbook
- •11.3 Keep Your Own Lab Notebook
- •11.4.1 Pre-measurement
- •11.4.2 Measurement
- •11.4.3 Post Measurement
- •11.5 Conclusion
- •References
- •12.1 Introduction
- •12.2 Components of the System
- •12.2.1 Detecting the Signal: EEG Electrode Technology
- •12.2.1.1 Passive Electrode Plus Gel
- •12.2.1.2 Active Electrodes Plus Gel
- •12.2.1.3 Passive Electrode and Saline Soaked Sponges
- •12.2.1.4 Dry Electrodes
- •12.2.1.5 Electrode Positions
- •12.2.2 Detecting the Signal: Sensors for Other Measures
- •12.2.2.1 Bipolar Peripheral Electrophysiology
- •12.2.2.2 Peripheral Physiological Sensors
- •12.2.2.3 GSR
- •12.2.2.4 Respiration
- •12.2.2.5 Photoplethysmography (PPG)
- •12.3 Conclusion
- •References
- •13.1 Purpose and Features
- •13.2 Before Starting Your Study
- •13.2.1 General Parameters
- •13.2.2 Special Applications
- •13.2.3 Real-Time Processing
- •13.3 During a Measurement Session
- •13.4 Troubleshooting
- •13.5 Conclusion
- •References
- •14.1 Introduction
- •14.2 Importance of Triggers
- •14.3 Advantages of Triggers
- •14.4 Disadvantages of Triggers
- •14.5 Alternatives to Triggers
- •14.6 Good Practice for Using Triggers
- •14.7.1 Setup
- •14.7.2 Analysis
- •14.7.3 Interpretation
- •14.8 Conclusion
- •References
- •15.1 Introduction
- •15.2 The Idea of Signal-to-Noise Ratio (SNR)
- •15.3 Sources of Artifact
- •15.4 Common Physiological Artifacts
- •15.4.1 Eye Artifacts
- •15.4.2 ECG Artifacts
- •15.4.4 Other Physiological Artifacts
- •15.5 Common Technical Artifacts
- •15.5.1 Technical Artifacts
- •15.5.2 Electrode Artifacts
- •15.5.3 Gel-Related Artifacts
- •15.5.4 Movement Artifacts
- •15.5.5 Body/Head Movements
- •15.5.6 Cable Movement Artifacts
- •15.6 Artifacts in Advanced Applications and Multi-modal Recordings
- •15.6.1 EEG and Functional MRI
- •15.6.2 EEG and Non-invasive Brain Stimulation
- •15.7 Optimizing the EEG Recording Quality
- •15.7.1 Focus on the Cap Preparation
- •15.7.2 Optimize the Recording Environment
- •15.7.3 During the Recording
- •15.7.4 Post Recordings
- •15.8 Conclusion
- •References
- •16.1 Introduction
- •16.2 Lab Infrastructure
- •16.2.1 Signal Quality
- •16.2.2 Control Over the Experimental Environment
- •16.2.4 Safety
- •16.3 Position of the Equipment and Accessories
- •16.4 Lab Procedures
- •16.5.1 Mobile Setups
- •16.5.2 Electrode Types
- •16.5.2.1 Passive Sponge-Based Electrodes
- •16.5.2.3 Dry Electrodes
- •16.5.3 Special Populations
- •16.5.3.1 Children
- •16.6 Concluding Summary
- •References
- •17.1 Introduction
- •17.2 Common Preprocessing Steps: Data Transformation
- •17.2.1 Inspecting Data
- •17.2.2 Changing the Sampling Frequency
- •17.2.3 Re-referencing
- •17.2.4 Interpolating Channels or Data Portions
- •17.2.5 Segmenting Data
- •17.3 Common Preprocessing Steps: Artifact Handling
- •17.3.1 Filtering
- •17.3.2 Attenuating Artifacts
- •17.3.2.1 Independent Component Analysis (ICA)
- •17.3.2.2 Regression Techniques
- •17.3.2.3 Template Subtraction Methods
- •17.3.3 Rejecting Artifacts
- •17.5 Tools for Processing and Analyzing EEG
- •17.6 Concluding Remarks
- •References
- •18.1 Introduction
- •18.2 Characterizing an Oscillatory Process
- •18.2.1 Fundamental Characteristics of an Oscillatory Process
- •18.2.2 From Time to Frequency and Back
- •18.3 Foundation for Spectral Analysis: The Dot Product
- •18.4 Fourier Analysis
- •18.4.1 From Vectors to Sinusoids: The Fourier Connection
- •18.4.2 The Fourier Family
- •18.4.3 Discrete Fourier Transform
- •18.4.4 Power Spectrum
- •Further Readings
- •References
- •19.1 Introduction
- •19.2 How to Get from EEG to ERPs
- •19.2.1 How to Process Your ERP Data
- •19.2.1.1 Pre-processing
- •19.2.1.2 Trial Selection
- •19.2.1.3 Baseline Correction
- •19.2.1.4 Averaging
- •19.2.2 Interpreting ERPs
- •19.2.3 Group Analysis
- •19.2.4 Single-Trial Analysis
- •19.3 Characteristics of the ERP and Its Components
- •19.4 Commonly Investigated ERP Components
- •19.4.1 Early Sensory Components
- •19.4.2 Long-Latency Sensory Components
- •19.4.3 Later Cognitive Components
- •19.4.4 ERP Components in Multimodal Recording Scenarios
- •19.5 Extraction of ERP Features
- •19.6 Conclusion
- •References
- •20.1 Introduction
- •20.2 Fundamentals of EEG Source Imaging
- •20.3 Forward Problem
- •20.4 Source Estimation
- •20.5 Statistical Inference in the Source Space
- •20.6 Source Connectivity
- •20.7 Conclusion
- •References
- •21.1 Introduction
- •21.2 Raw Data Access
- •21.2.1 How to Get Raw Data
- •21.2.2 How to Work with Raw Data Online
- •21.2.3 What Factors to Consider for Online Processing
- •21.3 Designing an Online Processing Experiment, an Example
- •21.4 Conclusion
- •References
- •22.1 Introduction
- •22.1.2 Chapter Overview
- •22.2.2 Exactly What the SME Means
- •22.2.5 Why the Scoring Method Matters
- •22.2.8 Other Potential Uses of the SME
- •22.4 Metrics of Reliability
- •22.5 Final Thoughts
- •References
- •23.1 Cognitive Neuroscience
- •23.1.1 Neuropsychology and EEG
- •23.1.2 Mental Chronometry and EEG
- •23.2 Research on the EEG Signals
- •23.3 Conclusions
- •References
- •24.1 Introduction
- •24.2.1 Clinical Research
- •24.2.2 EEG in Research for Clinical Applications
- •24.2.3 EEG as a Biomarker
- •24.3 Examples of Clinical Applications of EEG
- •24.3.1 Epilepsy
- •24.3.2 Sleep and Sleep Disorders
- •24.3.3 Anesthesia
- •24.4.2 Brain-Computer Interfaces and Movement Disorders
- •24.5 Future of EEG in Clinical Applications
- •24.6 Conclusion
- •References
- •25.1 Introduction
- •25.1.1 Why Connect Brains and Computers?
- •25.1.2 What Is a BCI?
- •25.1.3 Types of BCIs: Active, Reactive, Passive
- •25.1.4 BCIs in Neuroscience and HCI
- •25.2 Signals and Sensors
- •25.2.1 Neural Signals for BCIs
- •25.2.2 Wearable EEG and Form Factors
- •25.3 The BCI Pipeline: From Raw Signals to Decisions
- •25.3.1 Overview
- •25.3.2 Experimental Design and Labeling
- •25.3.3 Preprocessing and Artifacts
- •25.3.4 Feature Extraction
- •25.4 BCI Types Illustrated
- •25.4.1 Motor Imagery as an Active BCI Paradigm
- •25.4.2 P300 and SSVEPs as Reactive BCI Paradigms
- •25.4.3 Workload, Error, and Other Passive BCI Paradigms
- •25.5.1 Mental State Assessment as a First Stage
- •25.5.2 Open- and Closed-Loop Adaptation
- •25.6 Practical Challenges
- •25.6.1 Mobility, Artifacts, and Non-stationarity
- •25.6.2 Cross-User and Cross-Session Generalization
- •25.6.3 Evaluation in Real Settings
- •25.6.4 Ethics, Privacy, and Neurorights
- •25.7 Conclusions and Outlook
- •25.7.1 Key Takeaways
- •25.7.2 Future Trajectories
- •References
- •26.1 Focal Epilepsy
- •26.2 EEG Manifestations of Focal Epilepsy
- •26.2.1 Ictal EEG Patterns
- •26.2.2 Interictal EEG Patterns
- •26.3 Localization of Ictal and Interictal EEG Events
- •26.4 Intracranial EEG in Presurgical Planning
- •26.5 AI in EEG Interpretation
- •26.6 Conclusion
- •References
- •27.1 Introduction
- •27.2 Neonatal EEG Applications
- •27.2.2 Somatosensory States Monitoring in Neonates
- •27.3 Paediatric EEG Applications
- •27.3.1 Sleep Monitoring in Children and Adolescents
- •27.4 Future Directions and Conclusion
- •References
- •28.1 What Is Sleep?
- •28.1.1 Stages of Sleep
- •28.1.2 How Sleep Changes with Age
- •28.2 Measuring Human Sleep
- •28.2.1 The Various Forms of Sleep
- •28.2.2 Unihemispheric Sleep
- •28.3.1 NREM Sleep and Learning
- •28.3.2 REM Sleep and Learning
- •28.4.1 Active Brain Networks During Sleep
- •28.4.2 Measuring the Balance of Excitation and Inhibition in the Human Brain
- •28.4.3 The Cerebrospinal Fluid Dynamics in Human Sleep
- •28.5 Conclusions
- •References
- •29.1 What Is Mobile EEG?
- •29.2 Range of mEEG Systems
- •29.3 Technical Considerations
- •29.4 Validation
- •29.5 Application
- •29.6 Mild Cognitive Impairment
- •29.7 mEEG and Health and Exercise
- •29.8 mEEG in Sports
- •29.9 Conclusions
- •References
- •30.1 Introduction
- •30.2 General Framework and System Overview
- •30.3 Spectrum of Studies
- •30.4 MoBI+ Framework
- •30.5 Processing Multimodal MoBI Data
- •30.6 Challenges and Limitations
- •30.7 Conclusion
- •Appendix
- •List: Traveling with MoBI Equipment
- •References
- •31.1 Introduction
- •31.2 Types of Electric Brain Stimulation
- •31.3 Online Effects
- •31.3.1 Conventional Artifact Removal Strategies
- •31.3.1.1 Transcranial Direct Current Stimulation (tDCS)
- •31.3.1.2 Transcranial Random Noise Stimulation (tRNS)
- •31.3.1.3 Transcranial Alternating Current Stimulation (tACS)
- •31.3.3 Innovative Approaches to Minimize Artifacts
- •31.3.3.1 Non-Sinusoidal Waveforms
- •31.3.3.2 Amplitude-Modulated tACS (AM-tACS)
- •31.3.3.3 Transcranial Temporal Interference Stimulation (tTIS)
- •31.3.3.4 Summary of Advantages and Limitations
- •31.4.1 Spectral Power
- •31.4.2 Phase Locking/Phase Coherence
- •31.4.3 ERPs
- •31.4.4 Further Measures
- •31.5.1 Rationale
- •31.5.2 Procedure
- •31.6 Closed-Loop Systems
- •31.7 Technical Requirements
- •31.8 Conclusion
- •References
- •32.1 Introduction
- •32.2.1 Equipment

20 EEG Source Analysis 263
has been very successful in ESI (Friston et al., 2008; Owen et al., 2012; Henson
et al.,
2011).
SBL algorithms use Automatic Relevance Determination (ARD) priors (Wipf &
Nagarajan, 2008) to estimate source maps in a very flexible and data-driven manner.
Witho
ut explicitly designing for smooth or sparse solutions (the typical opposite
ends of the spectrum), the algorithms automatically select the optimal (in the
Bayesian evidence sense) sparsity and smoothness required in every region of the
source space so that the resulting source maps best explain the data without any user
intervention. Furthermore, it has been shown that this framework can be extended to
model and identify non-brain artifactual sources and that the recovered sources are
maximally independent, thereby bridging EEG imaging and ICA (Ojeda et al.,
2021).
20.5 Statistical Inference in the Source Space
So far, we have discussed the solution of the inverse problem for a single measurement ( v and j are vectors representing one topography and a correspo nding source
map). Given the linearity of our measurement model (Eq. 20.1), with minimal
modi
fications, we can use the same inversion algorithms above to solve for multiple
measurements simultaneously. Note that for the purpose of performing statistical
inference, by multiple measurements we mean independent trials or even subjects
(rather than autocorrelated sequential data).
For example, let us suppose we are interested in identifying the generators of an
component. As shown in Fig.
ERP
raphi
es at the desired component latency to form the matrix V, which has dimensions
channels by trials. The data matrix V is the input to our inverse mapping algorithm.
Beforehand, we constructed a head model, from which we calculated the lead field
matrix K. With these ingredients we estimate the matrix J, of dimensions sources by
trials. In this example, the null hypothesis (H
given location is not significantly different from zero. A simple way to test this
hypothesis is to calculate a t-test for each source .
We note that in ESI, the number of trials (data points) is usually far smaller than
number of variables (sources); therefore, the p-value at which we threshold our
the
statistical maps (the t-statistic in this example) needs to be corrected for multiple
comparisons to guard against false positives (Type 1 error). Three popular ways to
correct for multiple comparisons are:
20.3, we first select the single-trial EEG topog-
) can be that the value of a source at a
0
. Bonferroni correction: divides the p-value by the number of sources tested. This
method
is very stringent because since the sources are usually in the thousands,
the corrected p-value tends to zero.
. False discovery rate (FDR): is a method to control the Type 1 error less stringent
than
Bonferroni (Benjamini & Hochberg, 1995).
. Resampling:
this is a non-parametric method that consists of resampling the data
and constructing the min/max (empirical) distributions on the output statistic,

264 A. Ojeda
EEG trials
Inverse mapping
arg min
Head model
Fig. 20.3 Statistical inference in the source space. From left to right, the figure displays a collection
of EEG topographies corresponding to the same latency but a different trial. Then we use the inverse
solver to estimate single-trial source maps. Afterwards, the estimated source maps are collected into
a matrix of sources by trials, which can be used for statistical inference. Note that in this case we
group the single-trial EEG topographies into the columns of matrix V; consequently, the error term
uses the Frobenius norm (kV
where each column represents the corresponding single-trial source estimate
) instead of the Euclidean norm, and we solve for the matrix J,
KJk
F
Single-trial source
Data matrix
Sources
Trials
then we take the p-value threshold from these empirical distributions (Nichols &
Holmes, 2002). If min/max distributions are considered too stringent (i.e., driven
by
outliers), 5/95 percentiles can be used as an alternative (Valdes-Hernandez
et al.,
2010).
20.6 Source Connectivity
We would not want to finish this chapter without saying a few words about EEG
source connectivity. Rather than reproducing comprehensive reviews already available (Cao et al.,
performing source connectivity analysis.
First, it is useful to distinguish between three subdivisions of brain connectivity:
. Anatomical:
different brain regions. Anatomical connectivity can be estimated with DTI.
2021; He et al., 2019), we will focus on practical considerations for
this is at the structural level, axons and bundles of axons connecting

20 EEG Source Analysis 265
. Functional: instantaneous relationship (correlation) between brain regions.
. Effective: causal (directed) dependence between brain regions.
Both functional and effective connectivity can be estimated with EEG. Crucially,
effective
connectivity allows the creation of mechanistic models of brain function
and responses to different experimental manipulations. This allows us to explain
brain mechanisms in terms of causal networks (Friston, 2011).
Early work on EEG-based brain connectivity used multichannel sensor data
nski & Blinowska, 1991). However, since channel-level connectivity is
(Kami
large
ly blind to the mixing effect of the volume conduction, it is expected to lead
to misleading interpretations. Therefore, it is generally accepted that EEG connectivity should be estimated on the source space (He et al.,
2019).
EEG source connectivity is usually estimated in a two-step approach: (1) resolve
time series of the sources and (2) calculate connectivity metrics on those time
the
series. With enough structural modeling it is also possible to simultaneously estimate
source activity and coupling parameters (Kiebel et al., 2008). Two approaches to
ing source time series are:
estimat
. Piecewise estimation: we estimate sources based on current data without consid-
ering
the past. We can either fix the regularization parameters or update them
regularly to provide some degree of inverse model adaptation (Ojeda et al., 2018).
. Sequential filtering: here
we use a Kalman filter-like approach in which source
estimates are based on the current and past data points (Ojeda et al., 2021 ;
Ghumare
compu
et al., 2018; Cheung et al., 2010). This approach is usually more
tationally demanding.
As noted in the previous section, there are many more sources than data points, so
keep our problem tractable, it is desirable to calculate connectivity in a reduced
to
space. Although nearby sources are usually highly correlated, extracting a source
time series that summarizes the activity within a region of interest (ROI) remains an
area of active research (Brkic et al.,
are
not estimated (only amplitudes), a popular approach is to average all the time
2023; Bruña et al., 2023). If source orientations
series within the ROI (Xie et al., 2022; Mullen et al., 2015 ) and use one of the
existing
connect
ivity on that reduced space.
Extra caution
algorithms (Cao et al.,
must be taken when summarizing orientation-free sources (source
2021; He et al., 2019) to calculate brain source
activity with x, y, z components). Note that if we reduce source components to their
magnitude and then average within an ROI, the resulting time series undergoes a
nonlinear transformation that fundamentally changes the dynamics of the original
components. To sidestep the drawbacks of ROI summarization, several connectivity
metrics have been extended to a multidimensional context, allowing us to assess the
functional relationship between pairs of ROIs with different numbers of sources
without any collapsing (Basti et al.,
2020; Geerligs et al., 2016).

266 A. Ojeda
20.7 Conclusion
Source analysis is a powerful tool that comes to our aid whenever it is important to
explain EEG scalp patterns in terms of the underlying anatomical structures. A
source analysis pipeline begins by constructing a head model and calculating the
lead field matrix using an off-the-shelf forward solver. This is typically done before
any EEG measurements are taken. Once we have collected the participant’s EEG
data, we determine the latencies of the scalp topographies that we want to map into
the cortical space. Depending on the data, experiment design, and hypothesis, we
pick the inverse solver that best fits our needs. For instance, if we want to locate the
source of an epileptic focus, a solver with a sparse penalty, such as LASSO or ENET,
makes sense; if speed is important because maybe we want to give source-derived
feedback to the user in real-time, a method with analytical solution such as MNE,
wMNE, or LORETA is called for; otherwise, combining sparsity and smoothness in
a data-driven manner as done in ENET is always a good idea.
When it comes to performing statistical analysis in the source space, we have seen
that
it is important to correct the output statistics for multiple comparisons to control
for false positives. Furthermore, when it comes to group analysis, we must ensure
that the head models of all participa nts are in anatomical correspondence. Otherwise,
we must co-register them in a common space so that we can make statistical
inferences on the same anatomical locations across the group.
We mentioned two common approaches to estimating source time series prior to
ting interactions: piecewise (instantaneous) and sequential filtering. While
calcula
sequential filtering is usually more accurate, it is also more computationally expensive. We also gave a word of caution regarding the problem of summarizing source
activity within regions of interest.
We finish the chapter by noting that each of the topics mentioned here is an active
eld of research in and of itself. Nevertheless, we hope this introductory material can
fi
guide readers interested in pursuing EEG source imaging studies, and we encourage
them to follow their learning journey by delving into the references given here and
beyond.
References
Basti, A., Nili, H., Hauk, O., Marzetti, L., & Henson, R. N. (2020). Multi-dimensional connectivity:
A conceptual and mathematical review. NeuroImage, 221, 117179.
Benjamini, Y., & Hochberg,
powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B:
Methodological, 57, 289–300.
Bigdely-Shamlo, N., Mullen, T.,
analysis: A probabilistic approach to EEG source comparison and multi-subject inference.
NeuroImage, 72, 287–303.
Brkic, D.,
Sommariva, S., Schuler, A. L., Pascarella, A., Belardinelli, P., Isabella, S. L., Pino, G. D.,
Zago, S., Ferrazzi, G., Rasero, J., Arcara, G., Marinazzo, D., & Pellegrino, G. (2023). The
Y. (1995). Controlling the false discovery rate: A practical and
Kreutz-Delgado, K., & Makeig, S. (2013). Measure projection

20 EEG Source
impact of ROI extraction method for MEG connectivity estimation: Practical recommendations
for the study of resting state data. NeuroImage, 2023, 120424.
Bruña, R., Cuesta, P., Ramírez-Toraño, F., Suárez-Méndez, I., & Pereda, E. (2023). The more, the
merrier:
tional brain connectivity from reconstructed neural sources. bioRxiv, 2023.01.19.524740.
Cao, J., Zhao, Y., Shan, X., Wei, H. L., Guo, Y., Chen, L., Erkoyuncu, J. A., & Sarrigiannis, P. G.
(2021).
ings: A review. Human Brain Mapping, 43, 860–879.
Cheung, B. L., Riedner, B. A., Tononi, G., & Van Veen, B. D. (2010). Estimation of cortical
connectivity
ing, 57, 2122–2134.
Dale, A. M., & Sereno, M. I. (1993). Improved localizadon of cortical activity by combining EEG
and
MEG with MRI cortical surface reconstruction: A linear approach. Journal of Cognitive
Neuroscience, 5, 162–176.
Debener, S., Hine, J., Bleeck, S., & Eyles, J. (2008). Source localization of auditory evoked
potentials
Debener, S., Thorne, J., Schneider, T. R., & Viola, F. C. (2010). 1213.1 Using ICA for the analysis
multi-channel EEG data. In M. Ullsperger & S. Debener (Eds.), Simultaneous EEG
of
and fMRI: Recording, analysis, and application. Oxford University Press.
Friston, K. J. (2011). Functional and effective connectivity: A review. Brain Connectivity, 1, 13– 36.
Friston, K., Harrison, L., Daunizeau, J., Kiebel, S., Phillips, C., Trujillo-Barreto, N., Henson, R.,
Flandin,
NeuroImage, 39, 1104–1120.
Geerligs, L., Cam, C., & Henson, R. N. (2016). Functional connectivity and structural covariance
between
correlation. NeuroImage, 135, 16– 31.
Ghumare, E. G., Schrooten, M., Vandenberghe, R., & Dupont, P. (2018). A time-varying connec-
tivity
721–737.
Golub, G. H., Heath, M., & Wahba, G. (1979). Generalized cross-validation as a method for
choosing
Gramfort, A., Papadopoulo, T., Olivi, E., & Clerc, M. (2010). OpenMEEG: Opensource software
for
quasistatic bioelectromagnetics. Biomedical Engineering Online, 9, 45.
Gramfort, A., Kowalski, M., & Hamalainen, M. (2012). Mixed-norm estimates for the M/EEG
inverse
1937–1961.
Hallez, H., Vanrumste, B., Grech, R., Muscat, J., De Clercq, W., Vergult, A., D ’Asseler, Y.,
Camilleri,
forward problem in EEG source analysis. Journal of Neuroengineering and Rehabilitation,
4, 46.
Hamalainen, M. S., & Ilmoniemi, R. J. (1994). Interpreting magnetic fields of the brain: Minimum
norm
Hansen, P. C. (1992). Analysis of discrete ill-posed problems by means of the L-curve.
Review,
He, B., Astolfi, L., Valdes-Sosa, P. A., Marinazzo, D., Palva, S., Benar, C. G., Michel, C. M., &
Koenig,
Transactions on Biomedical Engineering.
Henson, R. N., Wakeman, D. G., Litvak, V., & Friston, K. J. (2011). A parametric empirical
Bayesian
and multi-modal integration. Frontiers in Human Neuroscience, 5, 76.
Kaminski, M.
flow in the brain structures. Biological Cybernetics, 65, 203–210.
Analysis 267
Multivariate phase synchronization methods excel pairwise ones in estimating func-
Brain functional and effective connectivity based on electroencephalography record-
from EEG using state-space models. IEEE Transactions on Biomedical Engineer-
after cochlear implantation. Psychophysiology, 45, 20– 24.
G., & Mattout, J. (2008). Multiple sparse priors for the M/EEG inverse problem.
regions of interest can be measured more accurately using multivariate distance
analysis from distributed EEG sources: A simulation study. Brain Topography, 31,
a good ridge parameter. Technometrics, 21, 215–223.
problem using accelerated gradient methods. Physics in Medicine and Biology, 57,
K. P., Fabri, S. G., Van Huffel, S., & Lemahieu, I. (2007). Review on solving the
estimates. Medical & Biological Engineering & Computing, 32, 35– 42.
SIAM
34, 561–580.
T. (2019). Electrophysiological brain connectivity: Theory and implementation. IEEE
https://doi.org/10.1109/TBME.2019.2913928
framework for the EEG/MEG inverse problem: Generative models for multi-subject
J., & Blinowska, K. J. (1991). A new method of the description of the information

268 A. Ojeda
Kiebel, S. J., Garrido, M. I., Moran, R. J., & Friston, K. J. (2008). Dynamic causal modelling for
EEG and MEG. Cognitive Neurodynamics, 2, 121–136.
Lin, F. H., Witzel, T., Ahlfors, S. P., Stufflebeam, S. M., Belliveau, J. W.,
(2006). Assessing and improving the spatial accuracy in MEG source localization by depth-
weighted minimum-norm estimates. NeuroImage, 31, 160–171.
Makeig, S., Jung, T. P., Bell, A. J., Ghahremani, D., & Sejnowski, T. J. (1997). Blind separation of
auditory
National Academy of Sciences of the United States of America, 94, 10979–10984.
Makeig, S., Westerfield, M., Jung, T. P., Enghoff, S., Townsend, J., Courchesne, E., & Sejnowski,
T.
Michel, C. M., & Brunet, D. (2019). EEG source imaging: A practical review of the analysis steps.
Frontiers
Mullen, T. R., Kothe, C. A., Chi, Y. M., Ojeda, A., Kerth, T., Makeig, S., Jung, T. P., &
Cauwenberghs,
dry EEG. IEEE Transactions on Biomedical Engineering, 62, 2553–2567.
Nichols, T. E., & Holmes, A. P. (2002). Nonparametric permutation tests for functional neuroim-
aging:
Ojeda, A., Kreutz-Delgado, K., & Mullen, T. (2018). Fast and robust Block-Sparse Bayesian
learning
Ojeda, A., Kreutz-Delgado, K., & Mishra, J. (2021). Bridging M/EEG source imaging and
independent
Computation, 33, 2408–2438.
Owen, J. P., Wipf, D. P., Attias, H. T., Sekihara, K., & Nagarajan, S. S. (2012). Performance
evaluation
data. NeuroImage, 60, 305–323.
Pascual-Marqui, R. D., Michel, C. M., & Lehmann, D. (1994). Low resolution electromagnetic
tomography:
of Psychophysiology, 18, 49– 65.
Paz-Linares, D., Vega-Hernandez, M., Rojas-Lopez, P. A., Valdes-Hernandez, P. A., Martinez-
Montes,
hierarchical Bayesian elastic net and elitist Lasso models. Frontiers in Neuroscience, 11, 635.
Seeber, M., Cantonas, L. M., Hoevels, M., Sesia, T., Visser-Vandewalle, V., & Michel, C. M.
(2019).
imaging. Nature Communications, 10, 753.
Stenroos, M., & Sarvas, J. (2012). Bioelectromagnetic forward problem: Isolated source approach
revis(it)ed.
Tibshirani, R. (1996). Regression shrinkage and selection via the Lasso. Journal of the Royal
Statistical
Valdes-Hernandez, P. A., Ojeda-Gonzalez, A., Martinez-Montes, E., Lage-Castellanos, A., Virues-
Alba,
cortical surface area correlates with the EEG alpha rhythm. NeuroImage, 49, 2328–2339.
Vega-Herná
Pedro Valdés-Sosa, A. (2008). Penalized least squares methods for solving the EEG inverse
problem. Statistica Sinica, 18, 1535–1551.
Wipf, D. P., & Srikantan Nagarajan, S. (2008). A new view of automatic relevance determination.
In
Vancouver, British Columbia, Canada (pp. 1625–1632). Curran Associates, Inc.
Wolters, C., Köstler, H., Möller, C., Härdtlein, J., & Anwander, A. (2007). Numerical approaches
for
Series, 1300, 189– 192.
Xie, W.,
space. Developmental Cognitive Neuroscience, 56, 101119.
event-related brain responses into independent components. Proceedings of the
J. (2002). Dynamic brain sources of visual evoked responses. Science, 295, 690–694.
in Neurology, 10, 325.
G. (2015). Real-time neuroimaging and cognitive monitoring using wearable
A primer with examples. Human Brain Mapping, 15, 1– 25.
for EEG source imaging. NeuroImage, 174, 449–462.
component analysis frameworks using biologically inspired sparsity priors. Neural
of the Champagne source reconstruction algorithm on simulated and real M/EEG
A new method for localizing electrical activity in the brain. International Journal
E., & Valdes-Sosa, P. A. (2017). Spatio temporal EEG source imaging with the
Subcortical electrophysiological activity is detectable with high-density EEG source
Physics in Medicine and Biology, 57, 3517–3535.
Society: Series B: Methodological, 58, 267–288.
T., Valdes-Urrutia, L., & Valdes-Sosa, P. A. (2010). White matter architecture rather than
M., Martínez-Montes, E., José Sánchez-Bornot, M., Lage-Castellanos, A., &
ndez,
Proceedings of the twenty-first annual conference on neural information processing systems,
dipole modeling in finite element method based source analysis. International Congress
Toll, R. T., & Nelson, C. A. (2022). EEG functional connectivity analysis in the source
& Hamalainen, M. S.

Chapter 21
Online Processing
Alex Kreilinger and Alejandro Ojeda
Abstract This chapter introduces online processing of EEG signals, as opposed to
usual offline analysis of previously recorded data. We will explain where it is
the
necessary to use online processing, how to get access to and deal with raw data, and
point out the main differences between online and offline analysis. We conclude the
chapter with an example of an online experiment to provide a foundation for our
readers.
Keywords Online · (Near) real-time · LSL ·
BCI
21.1 Introduction
A large portion of scientific research involves recording data in different scenarios
and analyzing them afterward to examine cause and effect, to determine the impact
of a given factor, or to investigate basic mechanisms of the brain.
In some cases, it is not enough to have access to only saved data, it is necessary to
use
current measurements to estimate brain state changes online, i.e., directly when
they occur. These estimations are used to provide immediate feedback that can either
positively or negatively affect future behavior.
To have a meaningful impact, such feedback needs to be linked to certain events
arbitrary delays in relation to these events are not acceptable. These timing
and
constraints can vary depending on the behavior or the underlying mechanism that
needs to be affected. For example, in a brain-computer interface (BCI) that is
controlled with a rather long imagination task (in the range of a few seconds), the
delay of the feedback may not be that critical. However, when the aim is to stimulate
A. Kreilinger (*)
Brain Products GmbH, Gilching, Germany
e-mail: alex.kreilinger@brainproducts.com
A. Ojeda
Brain
Vision LLC, Garner, NC, USA
e-mail:
alejandro.ojeda@brainvision.com
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2026
T.
Warbrick (ed.), The EEG Handbook,
https://doi.org/10.1007/978-3-032-20450-9_21
269

270 A. Kreilinger and A. Ojeda
with a transcranial magnetic stimulation (TMS) pulse directly at the onset of an alpha
wave, the delay needs to be significantly lower than a wavelength of the alpha
frequency. Moreover, fast and precise feedback can be helpful for reinforcing
successful responses (Enriquez-Geppert et al.,
al.,
2011).
et
2017; Arvaneh et al., 2015; Sherlin
Terminology
In this chapter we use the term ‘online’. In this context, ‘online’ means that
some
thing is happening right now, as opposed to ‘offline’, where data is first
stored in a file and only later analyzed. Frequently, the term ‘real-time’ is used
instead, although technically ‘real-time’ refers to the guaranteed processing of
a task within a specific, pre-defined time frame. Actual ‘real-time’ requires a
real-time operating system, which is often not available. The more correct term
would be ‘near real-time’ when the word ‘ online’ should be avoided, as it may
cause a misunderstanding with the meaning in the internet context. We
acknowledge that ‘real-time’ has more or less been accepted by a large part
of the EEG research community and suggest that the reader can make up their
own mind.
The most simple and straightforwa rd kind of online processing is visualization.
ying the EEG traces during recording is a vital part of EEG data collection and
Displa
something that most researchers do by default. A clear recommendation is, where
possible, to be able to monitor acquired signals constantly before and during a
recording. This way, the operator can react immediately in case of deteriorating
signal quality. Artifacts, such as line noise, heavy sweating, or muscular activity, can
easily be observed, and counteractions can be initiated. In addition, simple display
filters can help to visualize the underlying signals in cases where heavy artifacts
cannot be avoided during the measurement.
A step further would be to map the signals to something more meaningful to the
participa
nt. For example, the magnitude of alpha band power can be directly mapped
onto a visual element— such as the size of an object or the saturation of a color—
allowing individuals to modulate their behavior according ly.
Advancing further, classification techniques can be introduced, including simple
olding, linear classifiers, support vector machines, and neural networks. The
thresh
range of available options continues to grow rapidly, especially with the ongoing
advancements in artificial intelligence. See Fig.
The crux
of online processing is that the analyses need to be fast and that they
21.1 for a basic example.
need to be able to work with present and past data only. This not only means that not
all the data is available at once, but also that processing time needs to be accounted
for. A good example is how to use filters: while in a typical offline analysis it is not a
problem to create zero-phase filters by running the filter in both directions (forward
and backw ard), such a filter is not possible online, unless huge buffers are used as
epochs, thereby introducing significant delays.

21 Online Processing 271
Fig. 21.1 Schematic of a basic online visualization of the acquired EEG signals. In parallel, a
classifier translates the brain activity into a bar graph that the participant is trying to control.
Successful (and unsuccessful) control attempts are immediately shown as feedback, which can in
turn alter brain activity
In addition, when acquiring signals online, one cannot simply exclude bad trials
due to artifacts or make the choice to remove a bad channel from the data when
noticing a bad electrode contact, for example. These potential issues need to be well
planned ahead of time, for example, by applying online artifact detection methods
that can react to these occurrences on the fly. In general, many of these potential
problems can be mitigated, but they do require additional planning. It is also always
a good strategy to at least simulate the data processing pipeline before asking a
participant to take part in an experiment. For more information refer to Chap. 10:
Pilot Testing.
21.2 Raw Data Access
Before beginning to plan for an online processing pipeline, the first step is to
determine if and how it is possible to get access to the raw EEG data from the
amplifier.

272 A. Kreilinger and A. Ojeda
21.2.1 How to Get Raw Data
Depending on the manufacturer and the type of amplifier, there may be different
options for accessing raw data. Depending on the requirements, the operator can
make the right choice.
. Data access comes with the device’s own software. Some manufacturers provide
own data acquisition software with the amplifier. In those cases, it might be
their
possible to access data online. The communication through these data outlets may
follow a common format or internal standards. Notable examples are the Remote
Data Access (RDA) feature of BrainVision Recorder (Brain Products GmbH,
Gilching, Germany) or Lab Streaming Layer (LSL) that is becoming more and
more the standard among many companies.
Lab Streaming Layer (LSL)
Lab Streaming Layer (LSL): LSL is a software framework designed for the
streami
ng and receiving of data and marker streams over a local network. One
of its main features is that the synchronization of multiple streams is handled
directly by the framework itself. It was developed in 2010 by Christian Kothe
and has since become a widely used tool in neurophysiological research. It is
supported by many tools and languages, such as Python, MATLAB
MathWorks Inc. MATLAB, Natick, Massachusetts: The MathWorks Inc.
https://www.mathworks.com), C++, Unity (Unity Game Engine. Unity Tech-
nologi
es. https://unity.com), and more. For many EEG amplifiers, LSL outlets
are
either available through the open-source community or directly from the
manufacturer. More information on LSL can be found in the publication from
the creators (Kothe et al., 2025) and on the official documentation website.
®
(The
1
. There are alternative tools available—often provided by the open-source com-
munity—which work with specific amplifiers and generate data streams. Many of
those tools are using the LSL protocol. These so-called LSL connectors communicate directly with the amplifier to read data and stream the signals to the local
network. Other tools or protocols that are dedicated to providing data access from
amplifiers are the TOBI interface A (Breitwieser et al.,
2012) or BrainFlow.
2
. Another option would be to look into readily available standalone platforms that
aim to provide a full package for solutions such as BCIs, neuroimaging, or neural
signal processing. These platforms often provide drivers, sources, plugins (however they may be called in the respective platform) that can directly access data
from the amplifier. In addition, they can provide a whole selection of different
processing modules, such as visualization, recording, artifact detection, and
1
https://labstreaminglayer.readthedocs.io/
2
https://brainflow.org
Соседние файлы в папке Библиотека им академика М.И. Перельмана
