An smartphone-based algorithm to measure and model quantity of sleep

Sleep quantity affects an individual's personal health. The gold standard of measuring sleep and diagnosing sleep disorders is Polysomnography (PSG). Although PSG is accurate, it is expensive and it lacks portability. A number of wearable devices with embedded sensors have emerged in the recent past as an alternative to PSG for regular sleep monitoring directly by the user. These devices are intrusive and cause discomfort besides being expensive. In this work, we present an algorithm to detect sleep using a smartphone with the help of its inbuilt accelerometer sensor. We present three different approaches to classify raw acceleration data into two states - Sleep and Wake. In the first approach, we take an equation from Kushida's algorithm to process accelerometer data. Henceforth, we call it Kushida's equation. While the second is based on statistical functions, the third is based on Hidden Markov Model (HMM) training. Although all the three approaches are suitable for a phone's resources, each approach demands different amount of resources. While Kushida's equation-based approach demands the least, the HMM training-based approach demands the maximum. We collected data from mobile phone's accelerometer for four subjects for twelve days each. We compare accuracy of sleep detection using each of the three approaches with that of Zeo sensor, which is based on Electroencephalogram (EEG) sensor to detect sleep. EEG is an important modality in PSG. We find that HMM training-based approach is as much as 84% accurate. It is 15% more accurate as compared to Kushida's equation-based approach and 10% more accurate as compared to statistical method-based approach. In order to concisely represent the sleep quality of people, we model their sleep data using HMM. We present an analysis to find out a tradeoff between the amount of training data and the accuracy provided in the modeling of sleep. We find that six days of sleep data is sufficient for accurate modeling. We compare accuracy of our HMM training-based algorithm with a representative third party app SleepTime available from Google Play Store for Android. We find that the detection done using HMM approach is closer to that done by Zeo by 13% as compared to the third party Android application SleepTime. We show that our HMM training-based approach is efficient as it takes less than ten seconds to get executed on Moto G Android phone.

[1]  Friedrich Foerster,et al.  Detection of posture and motion by accelerometry : a validation study in ambulatory monitoring , 1999 .

[2]  G. Jean-Louis,et al.  Sleep estimation from wrist movement quantified by different actigraphic modalities , 2001, Journal of Neuroscience Methods.

[3]  Shing-Tai Pan,et al.  A transition-constrained discrete hidden Markov model for automatic sleep staging , 2012, Biomedical engineering online.

[4]  P. Estévez,et al.  Polysomnographic pattern recognition for automated classification of sleep-waking states in infants , 2006, Medical and Biological Engineering and Computing.

[5]  Chen Wang,et al.  Poster: hearing your breathing: fine-grained sleep monitoring using smartphones , 2014, MobiCom.

[6]  C. Randell,et al.  Context awareness by analysing accelerometer data , 2000, Digest of Papers. Fourth International Symposium on Wearable Computers.

[7]  A. Kam,et al.  Detection of K-complexes in sleep EEG using CD-HMM , 2004, The 26th Annual International Conference of the IEEE Engineering in Medicine and Biology Society.

[8]  B. Leroux Maximum-likelihood estimation for hidden Markov models , 1992 .

[9]  Tiago L. Alves,et al.  Deriving metric thresholds from benchmark data , 2010, 2010 IEEE International Conference on Software Maintenance.

[10]  Fanglin Chen,et al.  Unobtrusive sleep monitoring using smartphones , 2013, 2013 7th International Conference on Pervasive Computing Technologies for Healthcare and Workshops.

[11]  Guoliang Xing,et al.  iSleep: unobtrusive sleep quality monitoring using smartphones , 2013, SenSys '13.

[12]  Richard W. Devaul,et al.  Real-time motion classi ca-tion for wearable computing applications , 2001 .