Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_6027_Библиотеки_им_академика_М_И_Перельмана.pdf
Скачиваний:
0
Добавлен:
31.08.2026
Размер:
29 Мб
Скачать
14 Triggers 169
Value
range
Decimal
value
0
Bit
weight
Bit
number
Value
range
Decimal
value
0
Bit
weight
127
15 0 2
1
16
32
64
4
–15 4 2
252
10
0
1 5
2 6
3 0
Table 14.1 Three examples of how to divide and group 8 bits: One single group of 8 bits to decode 0–255 values, two groups of 4 bits to decode values of 015
each, and a 7-bit group with a single bit to decode 0–127 values and an on/off state
Bit
number
–255 0 2
Value
range
Decimal
value
Bit
weight
Bit
number
422422
0
1 1 1 2 2 2 2 4 3 3 3 8 4
0210 10 10
22
32832832
12212212
trigger codes can be sent without interfering with each other, but the reduced number of bits results in smaller value ranges
16 0 2
32 1 2
64 2 2
128 3 2
5
6
7
72 80210
62 462
42
52
Single 8-bit group Two 4-bit groups 7-bit and 1-bit group
With more groups, more independent
per group
170 A. Kreilinger and P. R. Bazán
. Sometimes it is not enough to get triggers from one source only. In a typical
experiment, the software tool is used to provide the stimuli and the participants task is to respond. This can be done via a button press on the computers keyboard, but also with a button that can directly create a trigger. The response can also be directly caused by the brain (neurofeedback or BCI). Alternatively, changes in the environment can be used as responses as well. For example, after exceeding a predened pressure threshold on a force sensor or a brightness threshold on a photo sensor. As mentioned previously, it is crucial to take care that these different trigger modalities do not interfere with each other. This has to be done either on a software or hardware level, or on both.
. Another important decision is how to deliver the triggers on the hardware side.
Triggers
can be sent via a dedicated cable. For example, from the parallel output of a computer or from a dedicated trigger device to the trigger-in port of the EEG amplier system or a dedicated device used for receiving trigger signals. Connecting cables comes with the burden of less mobility, however, this way the transmission is most reliable. Triggers can also be sent wi relessly. Here, triggers can be lost due to the transmitter and receiver going out of range, or that heavy environmental noise causes interference and bad reception. In this case, it is good practice to use redundancy when sending trigger codes: instead of sending only a single trigger, it is better to send the trigger multiple times or in predened sequences. This way, if one or more triggers are lost, the information can be recovered by analyzing the context.
. In some cases, it can become necessary to deal with the underlying characteristics
trigger signal itself. When using an analog signal, it should be veried that
of the the signal fullls the requirements for causing a state change at the input if it toggles between high and low states. When using transistor-transistor logic (TTL), for example, there are certain thresholds above or below which an input signal is classied as low or high, but there are variations of TTL where thresholds may differ. Of course, sending electrical signals is not the only way to send triggers. Optical signals are also an alternative, for example in environ­ments where long electric cables are not desirable or even prohibited (e.g., in magnetic resonance (MR) environments). In other words, the user may have to consider such things when the recording solution does not come as a ready-to-go complete package.
. One should
also think about how the nature of the trigger signal itself is used to encode information: the onset of a trigger can be linked to the falling edge when the previous state is high and then becomes low during the trigger pulse (when the event happens), and the state returns to high after the pulse width; the idle state could be low and a trigger could be encoded at the rising edge of a short high pulse; or, the trigger mode could be congured as a toggle. In this case, each rising or falling edge is used as a trigger, see Fig.
14.3.
14 Triggers 171
Fig. 14.3 Trigger pulses. From left to right, the triggers shall be generated on: the rising edge, caused by a stimulus presentation software tool that sets the idle level to low and sends a short high pulse to indicate an event; falling edge, where a button is pressed, pulling a high level to low for a short time; on both edges, where each level change is linked to an event
14.7 Using Triggers for Timing Verication
Based on the analys is of the exact timeline of an experiment, we can gain a lot of information that is directly relevant for assessing ERPs and for making sure that the setup is working as inte nded. In this nal part of the chapter, we will describe an experiment that can be used to verify the timing between triggers and actual events.
The example can be expanded to include checking timing parameters between
hardware and software triggering (hardware triggers versus software markers). Such a verication test can be useful if the experiment includes both hardware triggers and software markers, in which cases the measured latencies can be corrected. It can also help to decide between hardware and software options when the choice has not yet been nalized. While we describe an actual experiment, the setup can be adjusted where necessary to suit your own requirements and the details can be considered as pure suggestions.
The two main characteristics we want to evaluate in this setup are the latency and
jitter (see Fig.
14.2).

14.7.1 Setup

A stimulus presentation software tool is running on a computer. A participant is sitting in front of the computer screen and is observing the display. A photo sensor is placed on the screen to acquire brightness levels. The onsets of events can be encoded by programming a ashing pattern at the position of the photo sensor. The sensor can either be used as a trigger source online by generating triggers based on a brightness threshold, or by analyzing the analog signal later ofine. The analog signal and/or the triggers are recorded with an EEG amplier, along with the EEG of the participant, Fig.
A simple ERP paradigm can be used as the foundation of the experiment (just a
ashing pattern or a visual oddball paradigm). The only requirement is that there is at
14.4.
172 A. Kreilinger and P. R. Bazán
Fig. 14.4 Schematic of a timing verication experiment. A stimulus presentation software is used to: generate a visual event on a display (a), send a trigger to an EEG amplier (b), and send an LSL marker to the network (c). Ideally, all of these events should happen simultaneously. The EEG data stream, including the brain signals from the participant and the photo signal from a photo sensor, is also sent via LSL and can be synchronized with the LSL marker stream to analyze the timing between the events. The test can be used with or without the LSL option
least one stimulus related to a visual event, i.e., a specic visual event observable on the display. Every time the stimulus in question is generated, a trigger is also created from the stimulus presentation software by inte rfacing a trigger device via USB or sending signals directly via the parallel port. When we also want to assess the correlation between software markers and hardware triggers, we can additionally
this, a
send an LSL marker simultaneously. When choosing to do
er
mark
stre
LabRecorder
ams
1
).
need
to be
synchr
onized
and
record
ed
in
ll LSL data and
the network (e.g., in

14.7.2 Analysis

The experiment is started, and all data and marker streams are recorded in one le. This le now contains the what and when for up to four components:
1. The time when the stimulus is supposed to happen encoded by a trigger.
2. The time when the stimulus really happened encoded by the photo signal, either analog signal or already encoded as a trigger by applying a specic
as an threshold.
3. The brain signal recorded from the participant. Either a simple visual ERP or even
00 if using an oddball paradigm.
a P3
4. The time when the stimulus is supposed to happen encoded by a software marker
(if going
1
https://github.com/labstreaminglayer/App-LabRecorder
with the LSL option).
14 Triggers 173

14.7.3 Interpretation

The timing relations between these three or four components can have important implications:
. If the software markers (LSL) arrive earlier than the other components, most
importantly the hardware until they are available in the data stream. This is only relevant when markers (generated by a software) should be used to mark events that are recorded with an amplier (hardware). It may be necessary to adjust the latency in this case. The latency can depend on several factors: the amplier model, wireless versus wired, the number of channels, the sampling rate, or the local network. When changing any of these factors, it is recommended to run the verication again.
. If the actual onset of the stimulus is delayed signicantly, this can hint at a
problem multiples of the screen refresh cycle time (e.g., 16.67 ms for a 60-Hz display), it can indicate that the graphics settings are not optimized. Typical reasons can be connecting too many displays, activating lter settings that buffer multiple cycles , not using full screen, or simply running too many programs in the background.
. If there is not only a stable latency, but also high jitter, this can point to potential
problems Bluetooth in the programming.
. Sometimes it is simply good to know how different stimulus presentation soft-
ware tools strengths and weaknesses, it is good to have the tools at hand to evaluate when to use which software and how to mitigate potential issues.
the triggers, it means that the signals need more time to pass through
in the computer setup. For example, if a visual stimulus is delayed for
in the setup. For example, network difculties, issues with the
®
transmission caused by interfering environment, or simply an error
work in specic situations. As these different solutions have different

14.8 Conclusion

In this chapter, we highlighted the advantages of triggers over software markers and provided examples for how to use them to mark important events relevant for analysis. We showed examples where other options can work as good alternatives but also indicated potential drawbacks. In addition, we showed an example of how triggers can be used to verify timing characteristics of an experiment setup.
A clear distinct serving a specic function in experimental synchronization. While hardware triggers remain a gold standard for precise timing, alternatives such as software markers (e.g., via LSL) offer exibility and can be appropriate depending on the experimental context. Combining different marker, data, and trigger streams can introduce timing discrepancies, highlighting the need for systematic testing and validation to ensure temporal accuracy.
ion can be made between events, markers, and triggers, each
174 A. Kreilinger and P. R. Bazán

References

Kothe, C., Shirazi, S. Y., Stenner, T., Medine, D., Boulay, C., Grivich, M. I., et al. (2025). The lab
streaming layer for synchronized multimodal recording. Imaging Neuroscience. https://doi.org/
10.1162/IMAG.a.136
Miziara, I. M., Fallon, N., Marshall, A., & Lakany, H. (2025). A comparative study to assess
synchronisation methods
Reports, 15, 12816. Peirce, J., Gray, J. R., Simpson, S., MacAskill, M., Höchenberger, R., Sogo, H., et al. (2019).
PsychoPy2: Experiments
org/10.3758/s13428-018-01193-y
Renard, Y., Lotte,
An open-source software platform to design, test, and use brain–computer interfaces in real and
virtual environments. Presence Teleoperators and Virtual Environments, 19(1), 35–53.
doi.org/10.1162/pres.19.1.35
F., Gibert, G., Congedo, M., Maby, E., Delannoy, V., et al. (2010). OpenViBE:
for combined simultaneous EEG and TMS acquisition. Scientic
https://doi.org/10.1038/s41598-025-97225-7
in behavior made easy. Behavior Research, 51, 195–203.
https://doi.
https://
Chapter 15
Getting Clean Data: Artifacts and How to Prevent Them
David Kadlec, Shivakumar Viswanathan, and Hannah Kreilinger
Abstract Recording high-quality electroencephalographic (EEG) data is funda-
menta
l for achieving reliable results in research and clinical applications. However, the EEG signal is highly vulnerable to various artifacts that can arise from physio­logical sources, such as eye blinks, muscle activity, and cardiac rhythms. In addition, environmental and technical inuences, including electrode impedance, cable move­ment, or electromagnetic interference, can negatively inuence the signal. This chapter offers a comprehensive overview of approaches to minimize such artifacts during data acquisition. Central considerations include optimal preparation of the electrodes, lowering the impedance values on the participants head, as well as maintaining consistent recording conditions. Understanding the source of artifacts, executing prevent ive measures, and being able to detect different kinds of artifacts as they occur are often more effective than relying only on post-processing corrections. This chapter serves as a practical guide to recording clean data for more effective and reliable analysis.
Keywords Signal quality · Artifact reduction · Physiological artifacts · Technical
s · Best practice · Data acquisition · Lowering impedance
artifact

15.1 Introduction

One unwanted element when recording EEG is the presence of artifacts. As EEG researchers, the goal is to acquire the highest-quality data possible, and to achieve this, we must minimize artifacts. A completely artifact-free EEG signal is very unlikely, so our best approach is to be aware of the sources of artifacts and take every possible step to prevent or min imize them. This chapte r begins by explaining the concepts of signal and noise, and why their ratio is essential, especially for smaller artifacts. We will then take a look at some common artifacts found in EEG
D. Kadlec (*) · S. Viswanathan · H. Kreilinger Brain Products GmbH, Gilching, Germany e-mail:
david.kadlec@brainproducts.com; shivakumar.viswanathan@brainproducts.com;
hannah.kreilinger@brainproducts.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_15
175
176 D. Kadlec et al.
signals and consider whether there are any steps that can be taken to avoid or reduce them.
Some artifacts can have devastating effects on the recorded data and should be prevented in the rst place (e.g., signal saturation, electrode detachment). It is best to address these issues during the recording process. In contrast, other artifacts are unavoidable (e.g., blinks) and need to be tackled with appropriate ofine processing strategies. For each artifact example, we will explain its origin and what the EEG researcher needs to do to minimize its impact on the recorded EEG data, either during recording or during ofine data processing. Handling artifacts ofine will be covered in detail in Chap. just
provide tips on where to start.
17: EEG Pre-processing and Artifact Handling, here we

15.2 The Idea of Signal-to-Noise Ratio (SNR)

To better understand signal quality, it is an advantage to be familiar with the signal­to-noise ratio (SNR). The term signal-to-noise ratio is relevant in almost every technical eld (electronics, audio, imaging, etc.), the eld of EEG is no different. The signal-to-noise ratio indicates how strong the desired EEG signal is relative to the background noise (particularly electromagneti c interference) and how apparent the cortical activity is relative to unwanted interference (artifacts). A high SNR means the desired EEG signal is much stronger than the noise, and the EEG is more straightforward to record and interpret. In contrast, a lower SNR means there is more noise, and it will be more challenging to interpret the desired signal. A good example comes from the audio eld: if you watch and listen to a movie during a ight and have the noise cancelingfunctionality turned off on your headphones, it is difcult to understand the characters because of the humming background noise of the engines, chatter from passengers, etc. (low SNR). But once you turn on the noise cancelingfunctionality, the SNR becomes higher, and you understand the desired dialogue in the movie much better.
The interindividual EEG signal varies and so do the artifacts and the background noise
in a given recording session, therefore we can also expect the SNR to vary. Ideally, we would have a standard number that represents a good SNR, however, this has not been established for EEG data. So how do we know if the SNR is high or low, and whether its sufcient for our experiment?
Acceptable spontaneous EEG recordings, brain signals, such as theta, alpha, beta, or gamma rhythms, are of relatively low amplitude. This makes the signals of interest more susceptible to environmental noise, so a high signal-to-noise ratio (SNR) is essential. In event-related potential (ERP) studies, where averaging across multiple trials to isolate short time-locked responses to stimuli, it is also crucial to maintain a good SNR. However, the averaging process improves the SNR because the random noise is canceled out while the ERP accumulates. It is important to consider your signal of interest when establishing an acceptable SNR for your study.
SNR might differ for different types of signals and/or data analysis. In
15 Getting Clean Data: Artifacts and How to Prevent Them 177
Visual inspection of the EEG signal remains the most commonly used method in laboratory settings, especially before and during the EEG recordings.
It is possible to do this in a more quantitative way and some EEG analysis
e allows you to calculate SNR, often simply dened as SNR ¼ power of
softwar signal/power of noise. Additional tools assessing signal quality are discussed in Chap. 22: Quantifying EEG and ERP Data Quality. One such metric is the stan­dardi
zed measurement error (SME), which helps to quantify the data quality of an ERP (Luck et al., 2021). This method can be applied after trial recordings, during data
analysis, to assess whether further renements to the paradigm or laboratory setup are needed.
In general, the SNR improves through good electrode preparation and control of
recording environment, both of which enhance the quality of spontaneous EEG
the and ERP data. Visual inspection is the most common approach in labs and this is generally what we look for:
. Good/High SNR: Clean, smooth visible brain activity during resting (i.e., visible
activity and peaks at occipi tal region).
alpha
. Poor/Low SNR: Results in spikes, line noise, and unusual patterns that cannot be
explained by typical brain waves.

15.3 Sources of Artifact

There are two major categories of artifacts: physiological and technical.
Physiological artifacts in EEG originate from the participants own biological
activity
, such as eye movements (EOG), muscle activity (EMG), cardiac signals
(ECG), or skin potentials.
Technical artifacts arise from non-biological sources, such as power line inter-
, electrode cable movements, or malfunctioning equipment, as well as elec-
ference tromagnetic elds from nearby devices.
Both artifact categories arise independently of the brain but can be mistakenly interpret physiological and technical artifacts and being able to distinguish artifacts from signal is crucial. To help you with this, throughout this chapter artifacts are presented with the aid of images and explained in the corresponding tables with solutions to minimize these artifacts.
ed as cerebral signals. The recorded waves from the cortex are blended with

15.4 Common Physiological Artifacts

15.4.1 Eye Artifacts

Eye movement artifacts are caused by the movement of the eyeball. The cornea is positively charged, while the fundus (the inside back surface of the eye) is negatively charged. These circumstances create a static potential eld (dipole). When the
178 D. Kadlec et al.
eyeball rotates, the eye dipole rotates with it, causing a potential change at the nearby electrodes (corneo-retinal dipole artifact) (Lins et al.,
1993).
Vertical eye movements result from the rotation of the eyeball along the vertical axis, generating EOG (VEOG) potential primarily visible in the frontal EEG chan­nels (Fp1, Fp2).
Horizontal eye movements, caused by rotation along the horizontal axis (HEOG),
to characteristic saccades detectable at lateral frontal sites (e.g., F7, F8).
lead Especially in polysomnographic EEG recordings, electrodes are typically positioned at the outer canthi of the eyes to capture horizontal eye movements with high spatial sensitivity, facilitating accurate identication of sleep stages, particularly rapid eye movement (REM) sleep.
Saccades and smooth pursuit movements are eye movements in any direction (horizo
ntal, vertical, or oblique) that shift the gaze and produce artifacts in the EEG
signal as illustrated in the following Fig. 15.1.
Eyeblinks are predominantly caused by eyelid closure, and slight eyeball rotation,
ing short-duration, high-amplitude artifacts in the EEG.
generat
Blinking is a natural reex that helps keep the eyes refreshed and moisturized. This
artifact is unavoidable but can be made predictable.
During a blink, the eyelids act like sliding electrodes, producing an electric eld
temporarily increasing the conductivity between the electrodes and the corneo-
and retinal dipole. This phenomenon is often referred to as the ridingor rider artifact (Matsuo et al.,
1975).
One can further differentiate between spontaneous (natural) and voluntary (inten­tional)
blinks. Spontaneous blinks are typically shorter in duration and lower in
Fig. 15.1 EEG recording illustrating artifacts from eye blinks and horizontal eye movements. The signal is referenced to Fz, and channel order is from frontal to posterior regions. The data are high­pass ltered at 0.1–40 Hz to enhance visibility of these characteristic slow deections. The topography of a representative saccade exposes the typical spatial distribution and amplitude of the related artifact, with noticeable activity in frontal and temporal regions due to extraocular muscle engagement