Professional Documents
Culture Documents
Krasimir Tonchev1, Pavlina Koleva2, Agata Manolova3, Georgi Tsenov4, and Vladimir Poulkov5
Faculty of Telecommunications and Faculty of Automatics
Technical University of Sofia
Sofia, Bulgaria
Email: {k_tonchev, p_koleva, amanolova, gogotzenov, vkp,}@tu-sofia.bg
Abstract—Solutions for caring for the elderly both efficacious electroencephalogram (EEG), the electrooculogram (EOG), the
and cost-effective are given by Ambient Assisted Living (AAL) electromyogram (EMG), respiration data, etc. The system
systems that combine the research fields of intelligent systems proposed by Rechtschaffen and Kales (R&K) [4] is accepted as
and communication technologies. These systems are promising standard for visual scoring of human sleep. The amount of
for the improvement of the quality of life of elderly and disabled time an adult needs to sleep each night varies from person to
people. One important characteristic of health and well-being is person, and probably has to do with genetics. But the National
sleep. While sleep quantity is directly measurable, its quality has Institutes of Health suggests that adults get between 7 and 8
traditionally been assessed with subjective methods such as hours of sleep each night. To keep with current health demand
questionnaires. In this paper, we propose a non-intrusive sleep
from people with different needs, a number of smartphone
analyzer for real time detection of sleep anomalies, part of an
effective AAL system. The proposed solution is based on
apps, wearable tech and different home sensors on the market
combination of non-invasive sensors and an algorithm for sleep claim to track sleep patterns that aim to help users understand
analysis with two stages – low and high level reasoning. It also what might lead to a bad night's rest, so the triggers for bad
offers the opportunity to include third party devices. Using the sleep can be avoided.
analyzer we can monitor basic sleep behavior and to detect sleep Generally, there are three types of sleep gadgets on the
anomalies, which can serve as an important indicator for both market. The first are the fitness trackers that have sleep-
mental and physical health.
tracking capabilities. Most of these gadgets involve a wearable
Keywords—Sleep Monitoring, Context Awareness, Sleep
wristband or sensor that tracks the user’s body movements as
Anomaly Detection, REM, NREM, HMM he or she sleeps. Some research is done over the capabilities of
such sensors and the modalities they measure to estimate
accurately sleep quality [5, 6]. The authors prove that wrist
I. INTRODUCTION devices yield accurate and valid data for sleep estimation. The
Sleep is an important part of health and well-being. The second category is smartphone apps, which use the
importance of sleep quality often manifests itself when there is accelerometer that is built into the user’s phone to capture his
a disturbance: the lack of quality sleep has immediate movements. One research [7] uses the Best Effort Sleep (BES)
consequences in the form of reduced daytime functionality, and model to develop a smartphone sleep monitoring system. This
long-term consequences affecting both mental and physical model estimates only sleep duration via phone activity. Even
health. The study of sleep disorders has for a long time been though according to the authors the model proves to be
confined to clinical environments, and patients have had to accurate enough, sleep data collected by on-body sensors is
endure cumbersome procedures involving multiple electrodes more reliable. The third category is different types of bed
placed on the body. Recent developments in sensor technology sensors that offer sleep measurement in an unobtrusive way. A
as well as data analysis methods have enabled continuous, lot of products are currently present on the market and a lot of
unobtrusive sleep data recording in the home environment. research is done on the data that can be gathered by these
This has opened new possibilities for studying various sleep sensors [8, 9].
parameters and their effect on the quality of sleep [1].
The main contribution of this paper is to present a non-
Although the human sleep still remains a largely unknown intrusive sleep analyzer by monitoring in real time several
area, it is proven that this process is not homogeneous. It events for detecting sleep anomalies, using a combination of
consists of two broad types: rapid eye movement sleep (REM) sensors as bed pressure sensor, microphone and accelerometer.
and non-rapid eye movement sleep (NREM) [2]. The sleep This sleep analyzer can also incorporate third party devices that
quality is considered to be mainly a subjective phenomenon can offer additional measurements not only for sleep pattern
[3], however the total sleep duration and the amount of time analysis but for other everyday health monitoring.
spent in each mentioned stage are important for diagnosis of
The rest of the paper is organized as follows: the next
most of the sleep disorders. The stages in sleep can be inferred
section describes the overview of the system including the
from some well-known physiological signals: the
algorithm for the sleep analyzer incorporated in the EU project
This work was supported in part by the Grant Agreement No: 610658,
eWALL: eWall for Active Long Living” of the EU Seventh Framework
Programme. The authors wish to thank the invaluable help received from all
the consortium members.
401
approach would be to perform time dependent analysis. ' - ( P )q ( 1* $
1 1
Avoiding additional complications the best solution is the first % - ( P )q ( 2 * " (3)
order Hidden Markov Model (HMM). In the model prior !(% 2
" 1
% "
probabilities which reflect the common belief of the sleep % "
pattern could also be included. This is rather useful in cases &- ( PN
)q ( N *# 1 N !1
1 ,
1
)o ," j *T # j )o ," j *
,1
(4)
b j )o * ( e 2
)2- *
D
) *
det # j
'a 11
a 12
! a1N $
%a a ! a " (1)
A(% 21 22 2N
" ,
% " " # " "
% "
&a N1
a N2
! aNN # N !N
where N denotes the number of states. Each element in A: Fig. 3. The generative nature of a HMM with two states
a ( P)q ( j | q ( i *,1 + i, j + N (2) The “optimal” states sequence q* is the most probable one
ij t t ,1
given the observations and model parameters:
is the probability the model is being in state j given the
previous state i. In the given context the transitions from q * ( arg max 0P )q | O, 2 *1 (
q
nonconsecutive states are impossible, so a13 = 0 and a31 = 0 (5)
(see Fig.3). The information about the state in the first time 8 p )q, O | 2 * 5
( arg max 7 4(
step t = 1 is given by the vector of the initial state distribution q 6 p )O | 2 * 3
!: ( arg max 0P )q, O | 2 *1
q
402
algorithm. It exploits the likelihood "t(i) of the most probable time in the bed. This value is in %
sleepLatency The time in minutes it takes for the user to fall asleep.
state sequence for the first t observations and the sequence
frequencyWakingUp How many times the user woke up
finishes with state i at time t. The Viterbi algorithm consists of snoringTime The total time in minutes the user was snoring
the following steps: timeInBed The total time in minutes the user spent in the bed
1. Initialization of the first phase. Set t = 2; calculate remTime The time in minutes, user was in REM state
"1(i)=#1bi(o1) and set $1(i) = 0; Psqi The PSQI index
2. Induction. Calculate 9 t )i * ( max09 t ,1 ) j *a ji 1bi )o t * and the
O2 The average value of the O2 saturation measurements
measured during the course of sleep
1+ j + N
bedOnTime Timestamp in milliseconds the user went on bed
state that maximizes "t(i) i.e. : t )i * ( arg max 09 t ,1 ) j *a ji 1 ; bedOffTime Timestamp in milliseconds the user went out of bed
1+ j + N
403
404