Accelerometer-based Sleep/Wake Detection in an Ambulatory
Environment
Jan Cornelis
1
, Elena Smets
1,2
and Chris Van Hoof
1,2,3
1
Imec, Leuven, Belgium
2
Electrical Engineering-ESAT, KU Leuven, Belgium
3
Imec, Holst Centre, The Netherlands
Keywords: Sleep Detection, Wearable Devices, Actigraphy, Large Scale.
Abstract: It has been shown that poor sleep quality and stress are major causes for mental and physical health problems
in developed countries. Thanks to advancements in wearable technology, remote patient monitoring has
become possible, without the need of cumbersome and expensive equipment. A method for sleep/wake
detection is proposed, using chest-worn accelerometer sensors. A total of 1727 nights from 580 individuals
were analysed, resulting on the identification of an average sleep time of 463 min (SD=±80 min) per day. Our
algorithm was able to automatically detect 483 min (SD=±97 min) of sleep. Results show that actigraphy with
an accelerometer located at the chest has potential for sleep monitoring, though further research is required
for further validation, preferably using polysomnography as a benchmark.
1 INTRODUCTION
Stress is regarded as one of the elementary factors for
primary insomnia (Morin, et al., 2003). It has been
shown that insomnia can have a significant negative
impact on the life quality of an individual, including
reduced work and cognitive performance (Léger, et
al., 2002), (Durmer and Dinges, 2005) and an
increased risk of developing obesity (Phillips, 2006),
cardiovascular diseases (Li, et al., 2014) and
depression (Morawetz, 2003). To date, the golden
standard for investigating human sleep patterns is
polysomnography. However, this procedure can be
experienced as cumbersome, is expensive, and
usually deprives the subjects from their familiar
environment, which can lead to changes in their
sleeping patterns. (Le Bon, et al., 2001). Over the past
30 years, the use of wearable technology has
significantly improved, allowing ambulatory sleep
investigation. Therefore, researchers are able to
conduct experiments on a larger scale, outside a
controlled laboratory environment, possibly resulting
in more viable data as the first night effect could be
reduced (Le Bon, et al., 2001). Actigraphy is
considered to be a reliable method for sleep/wake
detection (Littner, et al., 2003). Most actigraphy units
are constructed in a watch like band shape that is
either worn at the wrist or at the ankle. Sleep and
wake patterns are estimated from periods of activity
and inactivity based on registered movement in the
device. (Littner, et al., 2003) Typically, actigraphy
shows an accuracy for detecting sleep epochs
between 87 and 90 percent compared to a
polysomnography. (Meltzer, et al., 2012). This paper
investigates the possibility for sleep classification
using a chest-worn health device rather than a wrist
or ankle-worn device, based on accelerometer data
(ACC). The advantage of using such device, is that it
is also capable of registering electrocardiogram
(ECG) signals besides registering ACC data, which at
a later stage, could provide more insight into
physiology correlated issues with insomnia and sleep
stages. A new method for sleep detection is required,
since the chest oscillation during breathing is
registered in the ACC data, causing false wake
labelled positives, an issue that does not occur in
traditional wrist worn devices. The aim of the study
is to achieve a sleep detection accuracy equal to
traditional actigraphy for the chest worn device. Data
from 1002 volunteers over a 5 day consecutive period
was used. The outcome of the algorithm was
compared to diary input from the volunteers.
Cornelis, J., Smets, E. and Van Hoof, C.
Accelerometer-based Sleep/Wake Detection in an Ambulatory Environment.
DOI: 10.5220/0007398603750379
In Proceedings of the 12th International Joint Conference on Biomedical Engineering Systems and Technologies (BIOSTEC 2019), pages 375-379
ISBN: 978-989-758-353-7
Copyright
c
2019 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
375
2 METHODS
2.1 Subject Recruitment
Volunteers (n=1,002) were recruited from the active
working population from 11 technology, banking,
and public sector companies located in Belgium and
the Netherlands. People were encouraged to
participate through means of internal company
communication and the distribution of flyers.
Participants had a chance to win a dinner or travel
voucher (11 vouchers for every 200 participants). The
collected sample contained 481 males (48%) and 446
females (45%).75 participants (7.5%) did not report
their gender. The participants were between the age
of 21 and 65 (x
̅
=39.5 ± 9.8). An informed consent was
obtained from the participants prior to their
participation in the experiment.
2.2 Data Collection Protocol
The data was collected over a period of two years,
from 2015 till 2017. Prior to the start of the
experiment, a survey had to be filled out containing
personal information such as gender, age, health
information, work related conditions and lifestyle.
The experiment lasted over a period of five days,
starting on Thursday and ending on Monday. During
the experiment, participants were requested to fill in
a diary using Ecological Momentary Assessments
(EMAs) on a smartphone application. EMAs allow
researchers to do frequent sampling of the behaviors
of the participant in real-time. (Shiffman, et al., 2008)
The application asked the participants 12 times per
day, at random times, to rate their perceived stress
level from the past hour on a 5-point Likert scale.
Additionally, each morning, the participants were
asked to fill in a sleep diary in which they had to
annotate the time they went to bed, how long it took
to fall asleep, the number of times they woke up and
the time at which they woke up in the morning. The
participants
were able to fill in their sleep times
Figure 1: A health device used in the experiment.
freely, by using the smartphone keyboard. The time it
took to fall asleep was a multiple-choice: 0-10
minutes, 11-30 minutes, 31-60 minutes or >60
minutes. If they reported it took more than 60 minutes
to fall asleep or if they woke up at least once during
the night, additionally the reason for not being able to
fall asleep or waking up was asked.
2.3 Sensor Information
Each participant was asked to wear a health device at
the chest, for the duration of the experiment, i.e. five
days continuously (fig1). This is a regulatory
approved device, for recording ECG (256Hz) and
triaxial accelerometer (ACC) (32Hz) signals. The
data was stored on an SD card, and read out after the
experiment was concluded. Before the start of the
experiment, the internal clock of the device was
synchronised to UTC. Participants were asked to
remove the sensor in case they participated in a
vigorous physical activity, in order to prevent
potential damage from sweating.
2.4 Sleep Wake Classification
The most commonly referred sleep/wake detection
methods for wrist actigraphy are those of Cole et al
(Cole, et al., 1992) and Sadeh et al (Sadeh, et al.,
1994) The findings of Cole et al are based on previous
findings of Webster et al, who used equation eq. 1.
(Webster, et al., 1982)
A = 0.025(0.15 X
t-4
+ 0.15 X
t-3
+ 0.15 X
t-2
+ 0.08
X
t-1
+ 0.21 X
t
+ 0.12X
t+1
+ 0.13 X
t+2
(1)
In this equation, X(t) represents the sum of the digital
activity values of the Medilog1 recorder for all 30 2-
s data epochs in 1 min at time t. (Webster, et al.,
1982).
Activity indicator A is considered sleep if
A<1. (Webster, et al., 1982). However, above stated
activity recognition methods are all based on wrist-
based activity. When the activity is measured from
the chest, there is a natural oscillation due to the
breathing pattern. Therefore, there was a need for a
modified sleep/wake detection, with a lower
sensitivity. The analysis was performed in MATLAB
and the classification is determined by the ACC
recordings of the health device. Each 60 seconds the
ACC signal was scored for activity (A). For each axis,
the difference between the minimal and maximal g
value was calculated, and the activity was determined
by eq. 2.
HEALTHINF 2019 - 12th International Conference on Health Informatics
376
A= 0.025(0.2X
t-3
+0.2X
t-2
+0.2X
t-1
+ 0.2X
t0
+
0.2X
t+1
)
(2)
Activity indicator A is considered sleep if A<1. X is
the average maximal difference in g for each axis. t
represents the time epoch in minutes of the signal,
with t0 as the current minute. The sleep/wake state
was evaluated based on activity indicator A (eq1), and
stored as a Boolean true/false. From the moment the
first 30 minutes of the Boolean stored sleep/wake
indicator where label as sleep, the participant was
considered asleep until the data indicated that the
participant was up for at least 30 minutes, with a
minimum of 120 minutes of registered sleep, in order
to exclude potential daytime naps from the dataset. If
participants did not fill in the sleep diary correctly in
the morning, the data of the previous night was
removed. In total 1727 nights were included for
analysis.
2.5 Validation
The outcome of the sleep-wake classification
algorithm is compared with the diary entries from the
EMAs. The maximum falling asleep times were
added to the reported time to bed, e.g. if the
participant indicated it took 0-10 minutes to fall
asleep, 10 minutes were added to the time to bed to
find the time the participant actually fell asleep. We
investigated for which percentage of the nights the
reported sleep and wake times matched with the
detected sleep and wake times based on the
accelerometer data. Since self-reporting is not always
accurate, a tolerance of 0, 10, 30 and 60 minutes was
introduced, allowing the classification to differ 0, 10,
30 or 60 min respectively from the self-reported wake
and sleep times.
Figure 2: Flowchart for the sleep identification.
3 RESULTS
The tolerance scores of the algorithm are shown in
table 1. A total of 1727 nights of 580 unique
participants were analysed, and 81% of the nights fell
within a 60 minute range in wake up and sleep time
Table 1: Population within tolerance.
Accelerometer-based Sleep/Wake Detection in an Ambulatory Environment
377
Figure 3: Scatterplot comparing the total sleep time (TST) of the diary and the algorithm for the entire population (A)-
(n=1723) and the population within the 60 minute tolerance (B) (n=1427). Regression equation for the entire population is
y=0.82x+102 and for the population within the 60 min tolerance y=0.93x+45. The root mean square values (RMSEs) are
75.72 and 38.08 for A and B respectively.
with regards to the diary entry. The average total
sleep time (TST) of the population was 462 min for
the data reported in the diary, with a SD of ±80 min,
and 483 min for the data predicted with the algorithm,
with an SD of ±97 min. The population that fell
within the one hour tolerance had a TST of 460 min
(SD=±76 min) for the diary and 472 min (SD=±78
min) for the algorithm. Reported average falling
asleep times for the populations was 22 minutes
(SD=±15 min). The RMSEs are 75.72 min and 38.08
min for A and B respectively. The correlation
coefficient for the total estimated sleep time based on
diary and algorithm was 0.69. For the population that
fell within the diary boundary of 60 minutes, the
absolute mean difference is 29 minutes (SD=±26
min), and the correlation coefficient between the
sleep times is 0.90. A scatterplot comparing the
algorithm and the diary TST is presented in figure 3.
4 DISCUSSION
On average, the algorithm overestimated the sleep
period by 20 min. The overestimation of the TST is
in line with other research. This is a known issue with
accelerometer data, as it is difficult to distinguish the
sleep onset (SO), wake after sleep onset (WASO) and
stage 1 sleep, as activity is generally limited when one
is falling asleep (Lockley, et al., 1999). Nevertheless,
the agreement rate is within acceptable range,
especially considering that the maximum range for
falling asleep was subtracted from the TST, which is
likely to be an overestimation of the reported SO. The
current study has limitations regarding validation of
the results, i.e. the lack of a comparison to a golden
standard (polysomnography). Further research should
investigate how the polysomnography, actimetry and
self-reported sleep times are associated. Since the
device used in this study also recorded the ECG, this
could be used to further enhance the sleep/wake
detection of the algorithm. Research has shown that
the inclusion of ECG-based analysis can further
improve the sleep wake detection, and could enable
the differentiation between light sleep (stage 1 and 2),
slow wave sleep (stage 3 and 4) and rapid eye
movement sleep (Tal, et al., 2017). The data could
potentially also be used for the detection of health
hazards, opening the path for further usage of
wearable sensors in ambulatory healthcare
monitoring (Mezick, et al., 2013).
5 CONCLUSION
We have collected ambulatory physiological data of
1,002 subjects during 5 consecutive days and 4
nights, in combination with background information,
and smartphone-based self-reports. 580 subjects from
this dataset were eligible for this analysis. This paper
provides a method to distinguish sleep and non-sleep
HEALTHINF 2019 - 12th International Conference on Health Informatics
378
periods on basis of accelerometer data, which can be
used independent from the diary input. The usage of
a chest located health device rather than a
conventional wristband has the advantage that
additional signals such as ECG can be recorded,
without the need for additional sensors, which
decreases the subject’s discomfort during
measurements. Our paper presents an important first
step for further research in linking continues
monitored physiological night-time data with
psychological self-reports. This could be used to
create a model for individual based feedback,
granting personalised health information to the user
of the device. The ECG data from this dataset could
be used to further enhance the detection of potential
health hazards, contributing for increased usage of
wearable sensors for healthcare monitoring purposes
in the future.
ACKNOWLEDGEMENTS
Special thanks goes out to Elena Smets, who
contributed significantly towards this project.
REFERENCES
Cole, R., Kripke, D., Gruen, W., Mullaney, D. and Gillin,
J., 1992. Automatic Sleep/Wake Identification From
Wrist Activity. SLEEP, 15(5), pp.461-469.
Durmer, J. and Dinges, D., 2005. Neurocognitive
Consequences of Sleep Deprivation. Seminars in
Neurology, 25(01), pp.117-129.
Le Bon, O., Staner, L., Hoffmann, G., Dramaix, M., San
Sebastian, I., Murphy, J., Kentos, M., Pelc, I. and
Linkowski, P., 2001. The first-night effect may last
more than one night. Journal of Psychiatric Research,
35(3), pp.165-172.
Léger, D., Guilleminault, C., Bader, G., Lévy, E. and
Paillard, M., 2002. Medical and Socio-Professional
Impact of Insomnia. SLEEP, 25(6), pp.621-625.
Li, M., Zhang, X., Hou, W. and Tang, Z., 2014. Insomnia
and risk of cardiovascular disease: A meta-analysis of
cohort studies. International Journal of Cardiology,
176(3), pp.1044-1047.
Littner, M., Kushida, C., Anderson, W., Bailey, D., Berry,
R., Davila, D., Hirshkowitz, M., Kapen, S., Kramer, M.,
Loube, D., Wise, M. and Johnson, S., 2003. Practice
Parameters for the Role of Actigraphy in the Study of
Sleep and Circadian Rhythms: An Update for 2002.
SLEEP, 26(3), pp.337-341.
Lockley, S., Skene, D. and Arendt, J., 1999. Comparison
between subjective and actigraphic measurement of
sleep and sleep rhythms. Journal of Sleep Research,
8(3), pp.175-183.
Meltzer, L., Walsh, C., Traylor, J. and Westin, A., 2012.
Direct comparison of Two New Actigraphs and
Polysomnography in Children and Adolescents..
SLEEP, 35(1), pp. 59-166.
Mezick, E., Matthews, K., Hall, M., Richard Jennings, J.
and Kamarck, T., 2013. Sleep duration and
cardiovascular responses to stress in undergraduate
men. Psychophysiology, 51(1), pp.88-96.
Morawetz, D., 2003. Insomnia and Depression: Which
Comes First ?. Sleep Research Online, 5(2), pp. 77-81.
Morin, C., Rodrigue, S. and Ivers, H., 2003. Role of Stress,
Arousal, and Coping Skills in Primary Insomnia.
Psychosomatic Medicine, 65(2), pp.259-267.
Phillips, B., 2006. The Association Between Short Sleep
Duration and Obesity in Young Adults: A 13-Year
Prospective Study. Yearbook of Pulmonary Disease,
2006, pp.256-258.
Sadeh, A., Sharkey, M. and Carskadon, M., 1994. Activity-
Based Sleep-Wake Identification: An Empirical Test of
Methodological Issues. SLEEP, 17(3), pp.201-207.
Shiffman, S., Stone, A. and Hufford, M., 2008. Ecological
Momentary Assessment. Annual Review of Clinical
Psychology, 4(1), pp.1-32.
Tal, A., Shinar, Z., Shaki, D., Codish, S. and Goldbart, A.,
2017. Validation of Contact-Free Sleep Monitoring
Device with Comparison to Polysomnography. Journal
of Clinical Sleep Medicine, 13(03), pp.517-522.
Webster, J., Kripke, D., Messin, S., Mullaney, D. and
Wyborney, G., 1982. An Activity-Based Sleep Monitor
System for Ambulatory Use.
SLEEP, 5(4), pp.389-399.
Accelerometer-based Sleep/Wake Detection in an Ambulatory Environment
379