Open Access. © 2022 The Author(s), published by De Gruyter. This work is licensed under the Creative Commons Attribution 4.0 International
License.
Milana Komosar*, Patrique Fiedler, and Jens Haueisen
Bad channel detection in EEG recordings
https://doi.org/10.1515/cdbme-2022-1066
Abstract: Electroencephalography (EEG) is widely used in
clinical applications and basic research. Dry EEG opened the
application area to new fields like self-application during
gaming and neurofeedback. While recording, the signals are
always affected by artefacts. Manual detection of bad channels
is the gold standard in both gel-based and dry EEG but is time-
consuming. We propose a simple and robust method for
automatic bad channel detection in EEG. Our method is based
on the iterative calculation of standard deviations for each
channel. Statistical measures of these standard deviations
serve as indications for bad channel detection. We compare the
new method to the results obtained from the manually
identified bad channels for EEG recordings. We analysed EEG
signals during resting state with eyes closed and datasets with
head movement. The results showed an accuracy of 99.69 %
for both gel-based and dry EEG for resting state EEG. The
accuracy of our new method is 99.38 % for datasets with the
head movement for both setups. There was no significant
difference between the manual gold standard of bad channel
identification and our iterative standard deviation method.
Therefore, the proposed iterative standard deviation method
can be used for bad channel detection in resting state and
movement EEG recordings.
Keywords: Electroencephalography, dry electrode,
artefacts, head movements, brain-computer interfaces
1 Introduction
Electroencephalography (EEG) is a non-invasive technique
for recording neural electrical activity with the help of
electrodes placed on the scalp. This method is widely used in
clinical applications and basic research. Moreover, EEG can
be used in brain-computer interfaces or rehabilitation. The
latest development of electronics for EEG recordings and dry
electrodes enabled self-application and thus usage in out-of-
the-lab scenarios [1].
The EEG signal has low amplitude and as such is prone to
artefacts and unwanted noise. The reconstruction of the brain
activity from bad channels is sometimes not possible.
Therefore, it is very important to remove non-reliable channels
before applying any type of EEG signal analysis or source
reconstruction. The most common procedure for bad channel
detection still is manual inspection. This procedure is often
time-consuming and subjective, which can lead to different
results depending on the experts evaluating the EEG [2–4].
Dry EEG is more prone to movement artefacts compared to
gel-based EEG. Due to the lower channel reliability in dry
EEG, the manual identification of bad channels is even more
time-consuming.
Various semi- or fully automated approaches for bad
channel detection have been proposed for gel-based EEG
including a combination of different statistical, temporal, and
frequency features [5,6]. Our aim is the development of a
simple and robust method for automatic bad channel detection
in dry EEG recordings [7], which is at the same time also
suitable for gel-based EEG.
2 Methods
2.1 Measurements
In the study participated 5 healthy volunteers, 3 females and 2
males, with a mean age of 27 ± 10. We analysed EEG data
from two different segments: one segment of resting EEG with
closed eyes for 3 minutes and one segment while volunteers
were performing head movements. Head movements were not
executed rapidly, but rather slowly. The participants were
instructed to move their heads downwards to the chest and
back to a straight position when they hear a tone. The
movement was repeated every 4 seconds. In sum, 45
movement epochs for each participant are recorded.
We used 64-channel gel-based and dry EEG caps with an
equidistant layout (waveguard, ANT B.V., Hengelo, The
_
_____
*Corresponding author: Milana Komosar: Institute of Biomedical
Engineering and Informatics, Faculty of Computer Sciences and
A
utomation, Technische Universität Ilmenau, Ilmenau, Germany,
milana.komosar@tu-ilmenau.de
Patrique Fiedler, Jens Haueisen: Institute of Biomedical
Engineering and Informatics, Faculty of Computer Sciences and
A
utomation, Technische Universität Ilmenau, Ilmenau, Germany
cdbme_2022_8_2.pdf 257 8/29/2022 5:45:49 PM
257
DE GRUYTER
Current Directions in Biomedical Engineering 2022;8(2): 257-260
Netherlands). The reference electrode was placed on the right
mastoid. The sampling rate was 1024 samples/second.
2.2 Data Processing
The data were processed using MATLAB (The
MathWorks, Inc., Natick, United States). Each of the 15
datasets was analysed separately. Data were pre-processed
using a finite impulse response (FIR) bandpass filter
implemented in EEGLAB [8] with a low cut-off frequency of
1 Hz and a high cut-off frequency of 40 Hz, as one of the
standard frequency ranges for EEG analysis [9]. After
filtering, the newly proposed iterative method for automatic
bad channel detection was performed. For comparison, the
data were manually inspected and bad channels were
identified as well.
The proposed method is applied and tested on two
different window lengths for the resting state EEG. The first
studied case is a window length of 60 s after skipping the first
10 s of the signal to avoid filter artefacts. For the second
studied case, a 30 s window is chosen as commonly used in
the standard EEG signal analyses [9]. These windows have the
same lengths for all the datasets. However, for the datasets
with the head movement, the analysis windows were starting
2.3 s after the movement and had a length of 0.5 s. Thus,
transient movement artefacts were not considered for
identifying bad channels.
The signal quality of each channel is manually evaluated
for the chosen windows [1,10]. The same signal windows were
used for the automatic bad channel detection. All datasets were
visually inspected by one annotator and the bad channels were
annotated similar to the criteria described in [11]. Predefined
bad channel characteristics are: exhibiting either a saturated
signal, an isoelectric line, or a predominantly artefactual EEG
recording.
2.3 Automatic ISD Method
We propose an Iterative Standard Deviation (ISD) method for
automatic bad channel detection in both dry and gel-based
EEG recordings. The standard deviation is calculated for each
of the 64 channels over the whole analysed data window.
First, the standard deviation of the signal for the j-th
sensor over the whole analysis window of length N is
calculated (see eq 1).
ࡿࡰ
=
ࡺି૚
σ
หࢂ
(,)
െࢂ
࢏ୀ૚
(1)
ܸ
is the i-th out of N samples for the j-th electrode and ܸ
is
mean voltage for the j-th electrode. The result are 64 values of
standard deviations. They are observed further as one
population from which outliers have to be identified. Four
criteria are established to detect the bad channels (see eq 2-5).
The criteria used to eliminate the outliers from the population
of SDs are the median and the 75th percentile range, the
standard deviation of channels lower than 10
-4
μV and higher
than 100 μV.
หࡿࡰ
(,)
െࡹ
>ૠ૞࢚ࢎ ࢖ࢋ࢘ࢉࢋ࢔࢚࢏࢒ࢋ (2)
ࡿࡰ
(
,
)
<૚૙
ି૝
μ܄ (3)
ࡿࡰ
(,)
>૚૙૙ μ܄ (4)
An additional criterion for ending the iterations is:
ࡿࡰ
()
> (5)
ܵܦ
(,)
is standard deviation of the j-th channel at the k-th
iteration. M is the median of the population of standard
deviations in the k-th iteration. SD
p
is the standard deviation of
all individual channel standard deviations in the k-th iteration.
2.4 Statistical Analysis
Statistical analysis was performed in MATLAB R2021a. The
aim was to compare the identification of bad channels between
the two methods. The manual selection of bad channels is
taken as ground truth. The performance of the proposed ISD
method is evaluated with the confusion matrix, sensitivity,
specificity, and accuracy calculation. In addition, Fisher’s
exact test at an alpha level of 0.05 is used to check if the two
methods are providing significantly different outputs.
3 Results
The main results of the analysis are shown in Table 1 for all
320 analysed channels from all 5 participants. For the 30 s long
analysis window and gel-based electrodes, the number of bad
channels manually identified is 11 while the ISD method
identified 10 bad channels. In the dry dataset 25 channels are
manually selected as bad, while the ISD method identified 24
of them. For the datasets with the head movements, the
manually identified number of bad channels is 12 and 30 for
gel-based and dry recordings, respectively. In this case, the
ISD method identified 10 and 32 bad channels in gel-based
and dry recordings, respectively. The accuracy of the ISD
method for the gel-based and dry alpha EEG recordings with
the chosen 30 s window is 99.69 %. The accuracy of the ISD
cdbme_2022_8_2.pdf 258 8/29/2022 5:45:49 PM
258
method is 99.38 % for both types of recordings and the 0.5 s
fixed window in the head movement datasets.
Figure 1 shows the method’s performance for the 10 s
exemplary alpha EEG dataset. In both cases (gel-based and
dry), both methods (manual and ISD) identified the same
channels as bad (colored red in Figure 1). For the gel-based
electrodes these are 3RD and 3LD and for the dry ones 3RD,
3LD, and 5LB. All bad channels in the datasets were detected
in the first iteration.
4 Conclusion
We found no significant differences in the channels labelled as
bad for the manual and ISD detection of bad channels for both
resting state and head movement EEG. The ISD method is
simple and robust and can be applied for bad channel
identification in both dry and gel-based recordings, replacing
manual evaluation. The detection criteria of the ISD method
can be adapted to other datasets. As this method is working
iteratively and does neither depend on pre-defined hard
thresholds nor standardized values, it has the potential to
automatize the process of bad channel detection. After the
application of the ISD method, processing steps can be applied
to further clean the data. However, the ISD method can be also
used to detect artefacts, such as e.g. movement artefacts.
We can notice a higher overall number of bad channels
detected in the datasets with the head movement for dry
recordings. As Debnath et al. reported, existing bad channel
detection methods may not perform well if the recordings have
a high number of bad channels as e.g. in EEG recordings with
movements [3]. The advantage of our proposed ISD method is
to overcome this limitation. The next phase of method testing
would consider a broader frequency range of the EEG signals.
Figure 1: Alpha EEG dataset for all 64 channels and 10 seconds a) gel-based and b) dry. The red color indicates bad channels that are
detected by the manual and ISD methods.
a)
b)
cdbme_2022_8_2.pdf 259 8/29/2022 5:45:49 PM
259
Future work will address the main limitation of this study
which is the low number of subjects.
Table 1: Statistical results of the ISD method for gel-based and dry
EEG. Number of channels identified as bad from a total of 320
channels for all 5 volunteers. P-values of Fisher’s exact test. The
difference between identified bad channels from manual and ISD
methods was compared at a significance level of alpha = 0.05.
Dataset Alpha Head
movement
Performance
parameter
30 s
window
60 s
window
0.5 s
window
Gel-
based
Sensitivity 90.91 84.62 83.33
Specificity 100 100 100
A
ccuracy 99.69 99.38 99.38
Manual 11 13 12
ISD 10 11 10
p-value 0.04*10
-16
0.01*10
-17
0.02*10
-17
Dry Sensitivity 96.00 100 100
Specificity 100 100 99.31
A
ccuracy 99.69 100 99.38
Manual 25 24 30
ISD 24 24 32
p-value 0.03*10
-33
0.01*10
-34
0.04*10
-38
Author Statement
Research funding: This research was supported by the
European Union’s Horizon 2020 Framework, Marie
Sklodowska-Curie Actions H2020-MSCA-ITN-2018 under
grant agreement No. 813843 and in part by the Free State of
Thuringia (2018 IZN 004), co-financed by the European
Union under the European Regional Development Fund
(ERDF).
Conflict of interest: Authors state no conflict of interest.
Informed consent: Informed consent has been obtained from
all individuals included in this study. Ethical approval: The
research related to human use complies with all the relevant
national regulations, institutional policies and was performed
in accordance with the tenets of the Helsinki Declaration, and
has been approved by the authors’ institutional review board
or equivalent committee.
References
[1] Di Fronso S, Fiedler P, Tamburro G, Haueisen J, Bertollo M,
Comani S. Dry EEG in Sports Sciences: A Fast and Reliable
Tool to Assess Individual Alpha Peak Frequency Changes
Induced by Physical Effort. Front Neurosci 2019;13:982.
[2] Daly I, Scherer R, Billinger M, Müller-Putz G. FORCe: Fully
Online and Automated Artifact Removal for Brain-Computer
Interfacing. IEEE Trans Neural Syst Rehabil Eng
2015;23(5):725–36.
[3] Debnath R, Buzzell GA, Morales S, Bowers ME, Leach SC,
Fox NA. The Maryland analysis of developmental EEG
(MADE) pipeline. Psychophysiology 2020;57(6):e13580.
[4] Hartmann MM, Schindler K, Gebbink TA, Gritsch G, Kluge T.
PureEEG: automatic EEG artifact removal for epilepsy
monitoring. Neurophysiol Clin 2014;44(5):479–90.
[5] Desjardins JA, van Noordt S, Huberty S, Segalowitz SJ,
Elsabbagh M. EEG Integrated Platform Lossless (EEG-IP-L)
pre-processing pipeline for objective signal quality
assessment incorporating data annotation and blind source
separation. J Neurosci Methods 2021;347:108961.
[6] Viana PF, Remvig LS, Duun-Henriksen J, Glasstetter M,
Dümpelmann M, Nurse ES, Martins IP, Schulze-Bonhage A,
Freestone DR, Brinkmann BH, Kjaer TW, Richardson MP.
Signal quality and power spectrum analysis of remote ultra
long-term subcutaneous EEG. Epilepsia 2021;62(8):1820–8.
[7] Hinrichs H, Scholz M, Baum AK, Kam JWY, Knight RT,
Heinze H-J. Comparison between a wireless dry electrode
EEG system with a conventional wired wet electrode EEG
system for clinical applications. Sci Rep 2020;10(1):5218.
[8] Delorme A, Makeig S. EEGLAB: an open source toolbox for
analysis of single-trial EEG dynamics including independent
component analysis. J Neurosci Methods 2004;134(1):9–21.
[9] Haueisen J, Fiedler P, Bernhardt A, Gonçalves R, Fonseca
C. Novel dry electrode EEG headbands for home use:
Comparing performance and comfort. Current Directions in
Biomedical Engineering 2020;6(3):139–42.
[10] Fiedler P, Fonseca C, Supriyanto E, Zanow F, Haueisen J. A
high-density 256-channel cap for dry
electroencephalography. Hum Brain Mapp 2022;43(4):1295–
308.
[11] Witteveen J, Pradhapan P, Mihajlovic V. Comparison of a
Pragmatic and Regression Approach for Wearable EEG
Signal Quality Assessment. IEEE J Biomed Health Inform
2020;24(3):735–46.
cdbme_2022_8_2.pdf 260 8/29/2022 5:45:49 PM
260