Daniel Krauß

Daniel Krauß

Master's Thesis

Benchmarking of Sleep/Wake Detection Algorithms using Wearable Sensors and Machine Learning


Robert Richer (M.Sc.), Arne Küderle (M.Sc), Prof. Dr. Nicolas Rohleder


06/2021 – 12/2021


Sleep is an important physiological function for humans that affects the performance of a huge variety of daily activities like learning, attention, productivity, or memory [1, 2]. Insufficient sleep or bad sleep quality it is directly linked to a series of diseases like diabetes or hypertension and causes a higher risk for strokes and heart disorders [3]. For that reason, sleep monitoring is crucial for a variety of application scenarios in medicine and psychology. The gold standard approach for the diagnosis for sleep monitoring and detecting specific sleep disorders is polysomnography (PSG), which is typically performed in a sleep laboratory [1, 3]. However, it is unfeasible for longitudinal sleep monitoring as PSG is very cost- and resource-intensive. Additionally, the unfamiliar laboratory setting can influence sleep quality [13]. A promising alternative to the gold standard method for sleep/wake detection is provided by wearable sensors. They have a wide popularity, are low cost and unobtrusive. Moreover, individuals can follow their normal life and sleep in their own bed, allowing sleep monitoring in a more realistic setting [1, 2, 4].

Over the past decades, a huge number of algorithms were developed for sleep/wake detection using wearable sensors. They differ both in the type of underlying algorithm (e.g., rule-based vs. machine learning-based) as well as in the modality of the sensor data input (e.g., activity counts vs. raw acceleration vs. ECG, or a combination of such) [1, 5-10]. Although recent studies compare these algorithms with PSG, they are usually made with a small number of participants due to the complexity of conducting these studies or only compared a subset of the available algorithms (e.g., [2]).


The goal of this master’s thesis is therefore to implement state-of-the art sleep/wake detection algorithms of different types and input modalities and compare these to newly developed algorithms using the “MESA Sleep” benchmark dataset which contains Actigraphy and heart rate data with synchronized PSG recordings as well as sleep diaries of over 2000 individuals [11, 12]. Furthermore, this thesis will evaluate the developed algorithms on real-world sleep data by collecting a new dataset with wearable IMU and ECG sensors while using a clinically validated sleep mat (Withing Sleep Analyzer) as reference. Concurrently, this thesis will identify whether sleep/wake detection performance can be further improved by different input modalities, e.g. by using raw acceleration instead of aggregated Actigraphy data.


[1]  Chen, Zhenghua, et al. “A Novel Ensemble Deep Learning Approach for SleepWake Detection Using Heart Rate Variability and Acceleration” IEEE Transactions on Emerging Topics in Computational Intelligence (2020): 1-10.
[2] Palotti, Joao, et al. “Benchmark on a large cohort for sleep-wake classification with machine learning techniques” Digital Medicine (2019) 2:50 1-9.
[3] Banks, Siobhan et al. “Behavioral and Physiological Consequences of Sleep Restriction” J Clin Sleep Med. (2007) 3(5): 519–528.
[4] Borazia, Marko, et al. “Towards Benchmarked Sleep Detection with Inertial Wristworn Sensing Units” IEEE International Conference on Healthcare Informatics (2014): 125-134.
[5] Webster, John B., et al. “An activity based sleep monitor system for ambulatory use” Sleep 5(4), (1982) 389–399.
[6] Cole, Roger J., et al. “Automatic sleep/ wake identification from wrist activity” Sleep 15(5), (1992) 461–469.
[7] Kripke, Daniel F., et al. „Wrist actigraphic scoring for sleep laboratory patients: algorithm development” J. Sleep. Res. 19, (2010): 612–619.
[8] Sadeh, Avi, et al. “Activity-based sleep-wake identification: an empirical test of methodological issues” Sleep 17, (1994): 201–207.
[9] Sazonov, Edward, et al. “Activity-based sleep-wake identification in infants.” Physiol. Meas. 25, (2004): 1291-1304.
[10] Dean, Dennis A., et al. “Scaling up scientific discovery in sleep medicine: the national sleep research resource” Sleep 39, (2016) 1151–1164.
[11] Zhang GQ, Cui L, Mueller R, Tao S, Kim M, Rueschman M, Mariani S, Mobley D, Redline S. The National Sleep Research Resource: towards a sleep data commons. J Am Med Inform Assoc. 2018 Oct 1;25(10):1351-1358. doi: 10.1093/jamia/ocy064. PMID: 29860441; PMCID: PMC6188513.
[12] Chen X, Wang R, Zee P, Lutsey PL, Javaheri S, Alcántara C, Jackson CL, Williams MA, Redline S. Racial/Ethnic Differences in Sleep Disturbances: The Multi-Ethnic Study of Atherosclerosis (MESA). Sleep. 2015 Jun 1;38(6):877-88. doi: 10.5665/sleep.4732. PMID: 25409106; PMCID: PMC4434554.
[13] Iber, Conrad et al. “Polysomnography performed in the unattended home versus the attended laboratory setting–Sleep Heart Health Study methodology” Sleep 27(3), (2004): 236-540