Sleep behavior assessment via smartwatch and stigmergic receptive fields


Sleep behavior is a key factor in maintaining good physiological and psychological health. A well-known approach to monitor sleep is polysomnography. However, it is costly and intrusive, which may disturb sleep. Consequently, polysomnography is not suitable for sleep behavior analysis. Other approaches are based on actigraphy and sleep diary. Although being a good source of information for sleep quality assessment, sleep diaries can be affected by cognitive bias related to subject’s sleep perception, while actigraphy overestimates sleep periods and night-time disturbance compared to sleep diaries. Machine learning techniques can improve the objectivity and reliability of the observations. However, since signal morphology vary widely between people, conventional machine learning is complex to set up. In this regard, we present an adaptive, reliable, and innovative computational approach to provide per-night assessment of sleep behavior to the end-user. We exploit heartbeat rate and wrist acceleration data, gathered via smartwatch, in order to identify subject’s sleep behavioral pattern. More specifically, heartbeat rate and wrist motion samples are processed via computational stigmergy, a bio-inspired scalar and temporal aggregation of samples. Stigmergy associates each sample to a digital pheromone deposit (mark) defined in a mono-dimensional space and characterized by evaporation over time. As a consequence, samples close in terms of time and intensity are aggregated into functional structures called trails. The stigmergic trails allow to compute the similarity between time series on different temporal scales, to support classification or clustering processes. The overall computing schema includes a parametric optimization for adapting the structural parameters to individual sleep dynamics. The outcome is a similarity between sleep nights of the same subject, to generate clusters of nights with different quality levels. Experimental results are shown for three real-world subjects. The resulting similarity is also compared with the dynamic time warping, a popular similarity measure for time series.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10


  1. 1.


  2. 2.


  3. 3.


  4. 4.


  1. 1.

    Åkerstedt T, Hume K, Minors D, Waterhouse J (1994) The meaning of good sleep: a longitudinal study of polysomnography and subjective sleep quality. J Sleep Res 3(3):152–158

    Article  Google Scholar 

  2. 2.

    Cimino AL, Alfeo MGCAGV (2017) Measuring physical activity of older adults via smartwatch and stigmergic receptive fields. In: INSTICC the 6th international conference on pattern recognition applications and methods (ICPRAM 2017), pp 724–730

  3. 3.

    Allen J (2007) Photoplethysmography and its application in clinical physiological measurement. Physiol Measur 28(3):R1

    Article  Google Scholar 

  4. 4.

    American Sleep Disorders Association et al (1995) Practice parameters for the use of actigraphy in the clinical assessment of sleep disorders. Sleep 18(4):285–287

    Article  Google Scholar 

  5. 5.

    Ansari N, Hou ES, Zhu BO, Chen JG (1996) Adaptive fusion by reinforcement learning for distributed detection systems. IEEE Trans Aerosp Electron Syst 32(2):524–531

    Article  Google Scholar 

  6. 6.

    Avvenuti M, Cesarini D, Cimino MG (2013) Mars, a multi-agent system for assessing rowers’ coordination via motion-based stigmergy. Sensors 13(9):12,218–12,243

    Article  Google Scholar 

  7. 7.

    Barbon G, Margolis M, Palumbo F, Raimondi F, Weldin N (2016) Taking Arduino to the internet of things: the ASIP programming model. Comput Commun

  8. 8.

    Barsocchi P, Cimino MG, Ferro E, Lazzeri A, Palumbo F, Vaglini G (2015) Monitoring elderly behavior via indoor position-based stigmergy. Pervasive Mob Comput 23:26–42

    Article  Google Scholar 

  9. 9.

    Barsocchi P, Ferro E, Fortunati L, Mavilia F, Palumbo F (2014) EMS@CNR: an energy monitoring sensor network infrastructure for in-building location-based services. In: 2014 International conference on high performance computing & simulation (HPCS). IEEE, pp 857–862

  10. 10.

    Bernardeschi C, Cimino MG, Domenici A, Vaglini G (2016) Using smartwatch sensors to support the acquisition of sleep quality data for supervised machine learning. In: The 6th EAI international conference on wireless mobile communication and healthcare (MOBIHEALTH 2016). EAI, pp 1–8

  11. 11.

    Blackwell T, Redline S, Ancoli-Israel S, Schneider JL, Surovec S, Johnson NL, Cauley JA, Stone KL (2008) Comparison of sleep parameters from actigraphy and polysomnography in older women: the SOF study. Sleep-New York Then Westchester- 31(2):283

    Google Scholar 

  12. 12.

    Bootzin RR, Engle-Friedman M (1981) The assessment of insomnia. Behav Assess 3(2):107–126

    Google Scholar 

  13. 13.

    Borazio M, Berlin E, Kücükyildiz N, Scholl P, Van Laerhoven K (2014) Towards benchmarked sleep detection with wrist-worn sensing units. In: 2014 IEEE international conference on healthcare informatics (ICHI). IEEE, pp 125–134

  14. 14.

    Bottou L (2010) Large-scale machine learning with stochastic gradient descent. In: Proceedings of COMPSTAT’2010. Springer, pp 177–186

  15. 15.

    Chen Z, Lin M, Chen F, Lane ND, Cardone G, Wang R, Li T, Chen Y, Choudhury T, Campbell AT (2013) Unobtrusive sleep monitoring using smartphones. In: 2013 7th International conference on pervasive computing technologies for healthcare and workshops. IEEE, pp 145–152

  16. 16.

    Chesson A, Ferber RA, Fry J M, Grigg-Damberger M, Hartse K, Hurwitz T, Johnson S, Littner M, Kader G, Rosen G et al (1997) Practice parameters for the indications for polysomnography and related procedures. Sleep 20(6):406–422

    Article  Google Scholar 

  17. 17.

    Choi DJ, Choi MS, Kang SJ (2016) A wearable device platform for the estimation of sleep quality using simultaneously motion tracking and pulse oximetry. In: 2016 IEEE international conference on consumer electronics (ICCE). IEEE, pp 49–50

  18. 18.

    Cimino MG, Lazzeri A, Vaglini G (2015) Improving the analysis of context-aware information via marker-based stigmergy and differential evolution. In: International conference on artificial intelligence and soft computing. Springer, pp 341–352

  19. 19.

    Cimino MG, Lazzerini B, Marcelloni F (2006) A novel approach to fuzzy clustering based on a dissimilarity relation extracted from data using a TS system. Pattern Recog 39(11):2077–2091

    Article  MATH  Google Scholar 

  20. 20.

    Cola G, Avvenuti M, Musso F, Vecchio A (2016) Gait-based authentication using a wrist-worn device. In: Proceedings of the 13th international conference on mobile and ubiquitous systems: computing, networking and services. ACM, pp 208–217

  21. 21.

    Cola G, Avvenuti M, Vecchio A, Yang GZ, Lo B (2015) An on-node processing approach for anomaly detection in gait. IEEE Sensors J 15(11):6640–6649

    Article  Google Scholar 

  22. 22.

    Cooper G, Herskovits E (1992) A Bayesian method for the induction of probabilistic networks from data. Mach Learn 9(4):309–347

    MATH  Google Scholar 

  23. 23.

    Di Rienzo M, Vaini E, Lombardi P (2015) Wearable monitoring: a project for the unobtrusive investigation of sleep physiology aboard the international space station. In: 2015 computing in cardiology conference (CinC). IEEE, pp 125–128

  24. 24.

    Ding H, Trajcevski G, Scheuermann P, Wang X, Keogh E (2008) Querying and mining of time series data: experimental comparison of representations and distance measures. Proc VLDB Endow 1(2):1542–1552

    Article  Google Scholar 

  25. 25.

    Esling P, Agon C (2012) Time-series data mining. ACM Comput Surv (CSUR) 45(1):12

    Article  MATH  Google Scholar 

  26. 26.

    Espie CA, Lindsay WR, Espie LC (1989) Use of the Sleep Assessment Device (Kelley and Lichstein, 1980) to validate insomniacs’ self-report of sleep pattern. J Psychopathol Behav Assess 11(1):71–79

    Article  Google Scholar 

  27. 27.

    Fabeck G, Mathar R (2008) Kernel-based learning of decision fusion in wireless sensor networks. In: 2008 11th international conference on information fusion. IEEE, pp 1–7

  28. 28.

    Figo D, Diniz PC, Ferreira DR, Cardoso JM (2010) Preprocessing techniques for context recognition from accelerometer data. Pers Ubiquit Comput 14(7):645–662

    Article  Google Scholar 

  29. 29.

    Frankel B, Coursey R, Buchbinder R, Snyder F (1976) Recorded and reported sleep in primary chronic insomnia. Arch Gen Psychiat 33:615–23

    Article  Google Scholar 

  30. 30.

    Gjoreski M, Gjoreski H, Luṡtrek M, Gams M (2016) How accurately can your wrist device recognize daily activities and detect falls? Sensors 16(6):800

    Article  Google Scholar 

  31. 31.

    Haescher M, Trimpop J, Bieber G, Urban B (2016) Smartmove: a smartwatch algorithm to distinguish between high-and low-amplitude motions as well as doffed-states by utilizing noise and sleep. In: Proceedings of the 3rd international workshop on sensor-based activity recognition and interaction. ACM, p 1

  32. 32.

    Hager GD (2012) Task-directed sensor fusion and planning: a computational approach, vol 99. Springer Science & Business Media

  33. 33.

    Hall M, Frank E, Holmes G, Pfahringer B, Reutemann P, Witten IH (2009) The WEKA data mining software: an update. ACM SIGKDD Explor Newslett 11(1):10–18

    Article  Google Scholar 

  34. 34.

    Heath MT (2002) Scientific computing: an introductory survey, vol 2. McGraw-Hill, New York

  35. 35.

    Hossain MA, Atrey PK, El Saddik A (2009) Learning multisensor confidence using a reward-and-punishment mechanism. IEEE Trans Instrum Meas 58(5):1525–1534

    Article  Google Scholar 

  36. 36.

    Huang X, Oviatt S (2005) Toward adaptive information fusion in multimodal systems. In: International workshop on machine learning for multimodal interaction. Springer, pp 15– 27

  37. 37.

    Jeong CW, Joo SC, Jeong YS (2013) Sleeping situation monitoring system in ubiquitous environments. Person Ubiq Comput 17(7):1357–1364

    MathSciNet  Article  Google Scholar 

  38. 38.

    Johns MW et al (1991) A new method for measuring daytime sleepiness: the Epworth sleepiness scale. Sleep 14(6):540– 545

    Article  Google Scholar 

  39. 39.

    Khaleghi B, Khamis A, Karray FO, Razavi SN (2013) Multisensor data fusion: a review of the state-of-the-art. Inform Fus 14(1):28–44

    Article  Google Scholar 

  40. 40.

    Kohavi R (1995) The power of decision tables. In: European conference on machine learning. Springer, pp 174–189

  41. 41.

    Liang Z, Ploderer B, Liu W, Nagata Y, Bailey J, Kulik L, Li Y (2016) Sleepexplorer: a visualization tool to make sense of correlations between personal sleep data and contextual factors. Pers Ubiquit Comput 20(6):985–1000

    Article  Google Scholar 

  42. 42.

    Lockley SW, Skene DJ, Arendt J (1999) Comparison between subjective and actigraphic measurement of sleep and sleep rhythms. J Sleep Res 8(3):175–183

    Article  Google Scholar 

  43. 43.

    Majoe D, Bonhof P, Kaegi-Trachsel T, Gutknecht J, Widmer L (2010) Stress and sleep quality estimation from a smart wearable sensor. In: 2010 5th international conference on pervasive computing and applications (ICPCA). IEEE, pp 14–19

  44. 44.

    Mannheimer PD, Cascini J, Fein ME, Nierlich SL (1997) Wavelength selection for low-saturation pulse oximetry. IEEE Trans Biomed Eng 44(3):148–158

    Article  Google Scholar 

  45. 45.

    Maquet P (2001) The role of sleep in learning and memory. Science 294(5544):1048–1052

    Article  Google Scholar 

  46. 46.

    Metsis V, Kosmopoulos D, Athitsos V, Makedon F (2014) Non-invasive analysis of sleep patterns via multimodal sensor input. Person Ubiquit Comput 18(1):19–26

    Article  Google Scholar 

  47. 47.

    Miwa H, Sasahara SI, Matsui T (2007) Roll-over detection and sleep quality measurement using a wearable sensor. In: 2007 29th annual international conference of the IEEE engineering in medicine and biology society. IEEE, pp 1507–1510

  48. 48.

    Monk T, Buysse D, Kennedy K, Potts J, DeGrazia J, Miewald J (2003) Measuring sleep habits without using a diary: the sleep timing questionnaire (STQ). Sleep 26(2):208–12

    Article  Google Scholar 

  49. 49.

    Ohayon MM, Carskadon MA, Guilleminault C, Vitiello MV (2004) Meta-analysis of quantitative sleep parameters from childhood to old age in healthy individuals: developing normative sleep values across the human lifespan. Sleep-New York Then Westchester- 27:1255–1274

    Google Scholar 

  50. 50.

    Ong AA, Gillespie MB (2016) Overview of smartphone applications for sleep analysis. World J Otorhinolaryngol-Head Neck Surg 2(1):45–49

    Article  Google Scholar 

  51. 51.

    Palumbo F, Gallicchio C, Pucci R, Micheli A (2016) Human activity recognition using multisensor data fusion based on reservoir computing. J Ambient Intell Smart Environ 8(2):87–107

    Article  Google Scholar 

  52. 52.

    Palumbo F, La Rosa D, Chessa S (2014) Gp-m: mobile middleware infrastructure for ambient assisted living. In: 2014 IEEE symposium on computers and communications (ISCC). IEEE, pp 1–6

  53. 53.

    Phan D, Siong LY, Pathirana PN, Seneviratne A (2015) Smartwatch: performance evaluation for long-term heart rate monitoring. In: 2015 International symposium on bioelectronics and bioinformatics (ISBB). IEEE, pp 144–147

  54. 54.

    Preece SJ, Goulermas JY, Kenney LP, Howard D (2009) A comparison of feature extraction methods for the classification of dynamic activities from accelerometer data. IEEE Trans Biomed Eng 56(3):871–879

    Article  Google Scholar 

  55. 55.

    Quinlan JR (1986) Induction of decision trees. Mach Learn 1:81–106

    Google Scholar 

  56. 56.

    Sadeh A (2011) The role and validity of actigraphy in sleep medicine: an update. Sleep Med Rev 15(4):259–267

    Article  Google Scholar 

  57. 57.

    Sadeh A, Hauri PJ, Kripke DF, Lavie P (1995) The role of actigraphy in the evaluation of sleep disorders. Sleep 18(4):288–302

    Article  Google Scholar 

  58. 58.

    Shaeffer DK (2013) MEMS inertial sensors: a tutorial overview. IEEE Commun Mag 51(4):100–109

    Article  Google Scholar 

  59. 59.

    Shalev-Shwartz S, Singer Y, Srebro N (2007) Pegasos: primal estimated sub-gradient solver for SVM. In: Proceedings of the 24th international conference on machine learning. ACM, pp 807–814

  60. 60.

    Snoek J, Larochelle H, Adams RP (2012) Practical Bayesian optimization of machine learning algorithms. In: Advances in neural information processing systems, pp 2951–2959

  61. 61.

    Vernon D, Metta G, Sandini G (2007) A survey of artificial cognitive systems: implications for the autonomous development of mental capabilities in computational agents. IEEE Trans Evol Comput 11(2):151–180

    Article  Google Scholar 

  62. 62.

    Wilson KG, Watson ST, Currie SR (1998) Daily diary and ambulatory activity monitoring of sleep in patients with insomnia associated with chronic musculoskeletal pain. Pain 75(1):75–84

    Article  Google Scholar 

  63. 63.

    de Zambotti M, Baker FC, Willoughby AR, Godino JG, Wing D, Patrick K, Colrain IM (2016) Measures of sleep and cardiac functioning during sleep using a multi-sensory commercially-available wristband in adolescents. Physiol Behav 158:143–149

  64. 64.

    de Zambotti M, Claudatos S, Inkelis S, Colrain IM, Baker FC (2015) Evaluation of a consumer fitness-tracking device to assess sleep in adults. Chronobiol Int 32(7):1024–1028

  65. 65.

    Zhang X, Liu J, Du Y, Lv T (2011) A novel clustering method on time series data. Expert Syst Appl 38(9):11,891–11,900

    Article  Google Scholar 

Download references


This work was carried out in the framework of the INTESA project, co-funded by the Tuscany Region (Italy) under the Regional Implementation Programme for Underutilized Areas Fund (PAR FAS 2007-2013) and the Research Facilitation Fund (FAR) of the Ministry of Education, University and Research (MIUR). The authors thank Giovanni Pollina, Silvio Bacci, and Silvia Volpe for their work on the subject during their thesis.

Author information



Corresponding author

Correspondence to Mario G. C. A. Cimino.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Alfeo, A.L., Barsocchi, P., Cimino, M.G.C.A. et al. Sleep behavior assessment via smartwatch and stigmergic receptive fields. Pers Ubiquit Comput 22, 227–243 (2018).

Download citation


  • Sleep monitoring
  • Smartwatch
  • Stigmergy
  • Neural receptive field