# Automatic Detection of Electrodermal Activity Events during Sleep
###### Abstract
In this work, because we apply the endosomatic method for recording the EDA signal, we use the EDA event definition given in [18]; that is, we consider changes in skin potential with amplitude \(>50\)\(\upmu\)V and duration \(>1.5\) s. The endosomatic method is less commonly used because it records oscillations that are not only monophasic but also biphasic or triphasic and, thus, the recorded EDA events are more difficult to interpret. On the other hand, as mentioned previously, it provides \"more\" physiological insight. While for excosomatic recordings, several algorithms for the detection of EDA events have been developed using signal processing [24], model-based analysis [25], and convex optimisation [26]; to our knowledge, none have been developed for endosomatic recordings. Note that several alternative definitions of an EDA event have been proposed in the literature for excosomatic recordings. A summary is given in [23]. A common problem that affects EDA recordings, particularly ones of longer duration, is the presence of artefacts in the signal, i.e., the presence of sudden and out-of-scale spikes. Artefacts have different causes [20]. The most prominent ones are movements during sleep and a poor connection between skin and electrodes. To address this problem, supervised as well as unsupervised machine learning (ML) techniques have been proposed for artefact detection in EDA signals [24, 27]. In this paper, we present a novel algorithm for the automatic detection of EDA events in endosomatic recordings. We use a traditional signal processing approach rather than a supervised ML one for two reasons. The first one is the relative scarcity of scored endosomatic EDA sleep signal datasets. Manual scoring of EDA events is traditionally not performed due to the difficulty of distinguishing EDA events from artefacts, the tediousness of scoring whole-night EDA signals, and the difficulty of interpreting collected information. The second reason is that the scoring that provides labels for ML algorithms might be incomplete or even wrong, due to the complexity of the EDA signal. As in [19], we use wavelet transforms (WT) to identify and remove artefacts. The basic idea behind wavelet theory is to decompose the signal into a set of wavelets, which are \"brief oscillations\", in order to describe it [28, 29]. After removing artefacts, we use the Fourier transform (FT) to evaluate the oscillations in terms of frequency and amplitude. We then use the definitions given by [PERSON] and colleagues [23] to detect EDA events and EDA storms. Finally, we validate our algorithm against manual scorings. We use data from both healthy participants and participants with OSA. The participants diagnosed with OSA had various severities of OSA, ranging from mild to severe. The remainder of the paper is organised as follows. In Section 2.1, we present the data used in this work, the instrumentation used to collect it, and the guidelines used to score EDA signals. In Sections 2.2 and 2.3, we introduce the theoretical foundations of WT theory and the definition of EDA events. In Section 2.4, we present the algorithm. Sections 2.5-2.9 describe in detail the different parts of the algorithm and the performance indices used to evaluate the algorithm in Section 2.10. The results are presented in Section 3 and then discussed in Section 4. Finally, Section 5 concludes the paper.