# Identifying and Monitoring the Daily Routine of Seniors Living at Home

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

- Markov model-based method for identifying the daily routines of older adults considering the daily living activity probability transitions and activity length.
- Technique for identifying relevant deviations from daily routines using entropy rate and cosine functions to measure and assess the similarity between the sequence of activities registered in a specific day and the baseline routine.
- Distributed system for testing and evaluation of the proposed methods which uses Beacons and trilateration techniques for monitoring the activities of the daily living of older adults.

## 2. Related Work

_{2}O autoencoder to identify anomalies about activity duration and the number of subevents are combined in [25]. In [37] the daily routine is sketched in collaboration with the monitored person, who is asked to describe the activities carried out daily. Based on the identified routine, a score is calculated that reflects how well an activity fits with the daily routine. In [7] the normal behavior of a person is defined as a sequence of four activities (sleeping, eating, taking a shower and leaving home), which are performed at specific times of the day. For detecting the behavior model, an unsupervised approach based on the DBSCAN algorithm is applied and the deviations are detected by computing a similarity score between the current behavior of the elder and her/his normal behavioral pattern. Other methods are based on a graph or task models. In [38], a graph that represents the sequence of performed activities and the duration corresponding to each activity for a specific participant is built and used to detect abnormal behavioral anomalies. In [39] a method for detecting behavioral changes in the daily routine of a person is defined by comparing activity curves that model the daily activity routines of a person between different points of time. In [40] the authors propose a method that compares the elder’s expected behavior with the elder’s actual behavior registered as a sequence of events unfolded in the current context. The elder expected behavior is represented as a task model which consists of sequences of tasks performed by an elder in a day (i.e., wake up, go to the bathroom, take medicine without food, prepare breakfast, take another medicine).

## 3. Daily Routine Detection

Algorithm 1: Baseline detection considering both activity sequence and activity length |

Inputs:$MM$—transition probability matrix, ${P}_{S}$—set holding each activity probability to be the first one of the day, ${P}_{E}$—set holding each activity probability to be the last one of the day, $EP$—end probability weight, ${L}_{M}$—length median, $L{D}_{Max}$—length probability weight, $P$—the transition probability from an activity ${A}_{i}$ to an activity ${A}_{j}$;Outputs: $B$—activity sequence representing the baseline.Begin1 $B\leftarrow [];$ 3 $lastVal\leftarrow max\left({P}_{S}\right);$ 4 $lastActivity\leftarrow label\left(lastVal\right);$ 4 $prevVal\leftarrow null,prevActivity\leftarrow null;$ 5 $LD\leftarrow L{D}_{Max}$ 6 while $\exists {A}_{i}suchMM\left[lastActivity,{A}_{i}\right]{P}_{E}\left[lastActivity\right]\times EP\u2013LD$ do7 $append\left(B,lastActivity\right);$ 8 $prevVal\leftarrow lastVal;$ 9 $prevActivity\leftarrow lastActivity;$ 10 $LD\leftarrow interpolate\left(len\left(B\right),\left[0,{L}_{M}],[L{D}_{Max},0\right]\right);$ 11 $lastVal\leftarrow {P}_{E}\left[prevActivity\right]\times EP-LD;$ 12 foreach ${A}_{i}$ do13 $P\leftarrow MM\left[prevActivity,{A}_{i}\right]$ 14 if $lastVal<prevVal\times P$ then15 $lastVal\leftarrow prevVal\times TP;$ 16 $lastActivity\leftarrow {A}_{i}$ 17 end18 end19 end20 return $B$End |

## 4. Deviation Identification

_{i}and m the total number of activity j occurrences.

Algorithm 2: Anomaly detection |

Inputs: TD—testing data set, NDT—days that respect the baseline from the training data set, [c_{1},c_{2}]—confidence interval, DSMax—duration similarity threshold.Outputs: AND—days deviated from baseline, APD—days that respect the baseline 1 ND ← []; 2 AND ← []; 3 APD ← []; 4 Davg ← computeAverageDuration(NDT); 5 foreach day_{i} in TD do6 E ← computeEntropy(day _{i});7 if c_{1} ≤ E ≤ c_{2} then8 append(ND, day _{i});9 else10 append(AND, day _{i});11 end12 end13 foreach day_{i} in ND do14 Dt ← Davg 15 if len(Davg)! = len(day_{i}) then16 CA ← union(day _{i}, Davg);17 day _{i} ← difference(day_{i}, difference(day_{i}, CA));18 Dt ← difference(Davg, difference(Davg, CA)); 19 endif20 CS ← computeCosinesSimilarity(day _{i}, Dt);21 if CS > DSMax then22 append(APD, day _{i});23 else24 append(AND, day _{i});25 end26 end27 return AND, APD |

## 5. Evaluation Results

#### 5.1. Activity of Daily Living Identification

#### 5.2. Routine and Deviation Assessment

- -
- The fold was considered as a test data set on which the deviation detection algorithm was applied to detect the days with deviations.
- -
- The remaining folds were considered as part of the training set on which the baseline learning algorithm was applied to identify the routine of the older adult.
- -
- In order to detect deviations, the test set was compared against the identified baseline.
- -
- The results obtained while detecting the deviations in daily life activities were evaluated with the precision, recall, F-measure, specificity and accuracy metrics.

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Ageing Europe—Statistics on Population Developments. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Ageing_Europe_-_statistics_on_population_developments (accessed on 15 December 2021).
- Vos, E.E.; de Bruin, S.R.; van der Beek, A.J.; Proper, K.I. “It’s Like Juggling, Constantly Trying to Keep All Balls in the Air”: A Qualitative Study of the Support Needs of Working Caregivers Taking Care of Older Adults. Int. J. Environ. Res. Public Health
**2021**, 18, 5701. [Google Scholar] [CrossRef] - Šare, S.; Ljubičić, M.; Gusar, I.; Čanović, S.; Konjevoda, S. Self-Esteem, Anxiety, and Depression in Older People in Nursing Homes. Healthcare
**2021**, 9, 1035. [Google Scholar] [CrossRef] [PubMed] - Schneider, F.; Horowitz, A.; Lesch, K.-P.; Dandekar, T. Delaying memory decline: Different options and emerging solutions. Transl. Psychiatry
**2020**, 10, 13. [Google Scholar] [CrossRef] [PubMed][Green Version] - Anghel, I.; Cioara, T.; Moldovan, D.; Antal, C.; Pop, C.D.; Salomie, I.; Pop, C.B.; Chifu, V.R. Smart Environments and Social Robots for Age-Friendly Integrated Care Services. Int. J. Environ. Res. Public Health
**2020**, 17, 3801. [Google Scholar] [CrossRef] [PubMed] - Mshali, H.; Lemlouma, T.; Moloney, M.; Magoni, D. A survey on health monitoring systems for health smart homes. Int. J. Ind. Ergon.
**2018**, 66, 26–56. [Google Scholar] [CrossRef][Green Version] - Zekri, D.; Delot, T.; Thilliez, M.; LeComte, S.; Desertot, M. A Framework for Detecting and Analyzing Behavior Changes of Elderly People over Time Using Learning Techniques. Sensors
**2020**, 20, 7112. [Google Scholar] [CrossRef] [PubMed] - Deep, S.; Zheng, X.; Karmakar, C.; Yu, D.; Hamey, L.G.C.; Jin, J. A Survey on Anomalous Behavior Detection for Elderly Care Using Dense-Sensing Networks. IEEE Commun. Surv. Tutor.
**2020**, 22, 352–370. [Google Scholar] [CrossRef] - Janjua, Z.H.; Riboni, D.; Bettini, C. Towards automatic induction of abnormal behavioral patterns for recognizing mild cognitive impairment. In Proceedings of the 31st Annual ACM Symposium on Applied Computing, Pisa, Italy, 4–8 April 2016; pp. 143–148. [Google Scholar] [CrossRef]
- Riboni, D.; Bettini, C.; Civitarese, G.; Janjua, Z.H.; Helaoui, R. SmartFABER: Recognizing Fine-Grained Abnormal Behaviors for Early Detection of Mild Cognitive Impairment. Artif. Intell. Med.
**2016**, 67, 57–74. [Google Scholar] [CrossRef][Green Version] - Ordóñez, F.J.; De Toledo, P.; Sanchis, A. Sensor-based Bayesian detection of anomalous living patterns in a home setting. Pers. Ubiquitous Comput.
**2015**, 19, 259–270. [Google Scholar] [CrossRef] - Casagrande, F.D.; Zouganeli, E. Activity Recognition and Prediction in Real Homes. In Nordic Artificial Intelligence Research and Development. NAIS 2019: Communications in Computer and Information Science; Springer: Cham, Switzerland, 2019; Volume 1056. [Google Scholar] [CrossRef][Green Version]
- Kabir, M.H.; Hoque, M.R.; Thapa, K.; Yang, S.-H. Two-Layer Hidden Markov Model for Human Activity Recognition in Home Environments. Int. J. Distrib. Sens. Netw.
**2016**, 12, 4560365. [Google Scholar] [CrossRef][Green Version] - Roy, N.; Misra, A.; Cook, D.J. Ambient and smartphone sensor assisted ADL recognition in multi-inhabitant smart environments. J. Ambient Intell. Humaniz. Comput.
**2016**, 7, 1–19. [Google Scholar] [CrossRef] [PubMed][Green Version] - Zhu, H.; Chen, H.; Brown, R. A sequence-to-sequence model-based deep learning approach for recognizing activity of daily living for senior care. J. Biomed. Inform.
**2018**, 84, 148–158. [Google Scholar] [CrossRef] [PubMed] - Ordóñez, F.J.; Roggen, D. Deep Convolutional and LSTM Recurrent Neural Networks for Multimodal Wearable Activity Recognition. Sensors
**2016**, 16, 115. [Google Scholar] [CrossRef] [PubMed][Green Version] - Zhu, C.; Sheng, W.; Liu, M. Wearable Sensor-Based Behavioral Anomaly Detection in Smart Assisted Living Systems. IEEE Trans. Autom. Sci. Eng.
**2015**, 12, 1225–1234. [Google Scholar] [CrossRef] - Nadeem, A.; Mehmood, A.; Rizwan, K. A dataset build using wearable inertial measurement and ECG sensors for activity recognition, fall detection and basic heart anomaly detection system. Data Brief
**2019**, 27, 104717. [Google Scholar] [CrossRef] - Azimi, H.; Xi, P.; Bouchard, M.; Goubran, R.; Knoefel, F. Machine Learning-Based Automatic Detection of Central Sleep Apnea Events from a Pressure Sensitive Mat. IEEE Access
**2020**, 8, 173428–173439. [Google Scholar] [CrossRef] - Nassif, A.B.; Abu Talib, M.; Nasir, Q.; Dakalbab, F.M. Machine Learning for Anomaly Detection: A Systematic Review. IEEE Access
**2021**, 9, 78658–78700. [Google Scholar] [CrossRef] - Parvin, P.; Chessa, S.; Kaptein, M.; Paternò, F. Personalized real-time anomaly detection and health feedback for older adults. J. Ambient Intell. Smart Environ.
**2019**, 11, 453–469. [Google Scholar] [CrossRef] - Nath, R.K.; Thapliyal, H. Machine Learning-Based Anxiety Detection in Older Adults Using Wristband Sensors and Context Feature. SN Comput. Sci.
**2021**, 2, 1–12. [Google Scholar] [CrossRef] - Parvin, P.; Paterno, F.; Chessa, S. Anomaly Detection in the Elderly Daily Behavior. In Proceedings of the 2018 14th International Conference on Intelligent Environments (IE), Rome, Italy, 25–28 June 2018; pp. 103–106. [Google Scholar] [CrossRef]
- Arifoglu, D.; Bouchachia, A. Detection of abnormal behaviour for dementia sufferers using Convolutional Neural Networks. Artif. Intell. Med.
**2019**, 94, 88–95. [Google Scholar] [CrossRef] - Fahad, L.G.; Tahir, S.F. Activity recognition and anomaly detection in smart homes. Neurocomputing
**2021**, 423, 362–372. [Google Scholar] [CrossRef] - Zerkouk, M.; Chikhaoui, B. Spatio-Temporal Abnormal Behavior Prediction in Elderly Persons Using Deep Learning Models. Sensors
**2020**, 20, 2359. [Google Scholar] [CrossRef] [PubMed][Green Version] - Forkan, A.R.M.; Khalil, I.; Tari, Z.; Foufou, S.; Bouras, A. A Context-Aware Ap-proach for Long-Term Behavioural Change Detection and Abnormality Prediction in Ambient Assisted Living. Pattern Recognit.
**2015**, 48, 628–641. [Google Scholar] [CrossRef] - Eisa, S.; Moreira, A. A Behaviour Monitoring System (BMS) for Ambient Assisted Living. Sensors
**2017**, 17, 1946. [Google Scholar] [CrossRef][Green Version] - Aran, O.; Sanchez-Cortes, D.; Do, M.-T.; Gatica-Perez, D. Anomaly Detection in Elderly Daily Behavior in Ambient Sensing Environments. In International Workshop on Human Behavior Understanding, HBU 2016: Human Behavior Understanding; Springer: Cham, Switzerland; pp. 51–67. [CrossRef][Green Version]
- Susnea, I.; Dumitriu, L.; Talmaciu, M.; Pecheanu, E.; Munteanu, D. Unobtrusive Monitoring the Daily Activity Routine of Elderly People Living Alone, with Low-Cost Binary Sensors. Sensors
**2019**, 19, 2264. [Google Scholar] [CrossRef][Green Version] - Lundström, J.; Järpe, E.; Verikas, A. Detecting and exploring deviating behaviour of smart home residents. Expert Syst. Appl.
**2016**, 55, 429–440. [Google Scholar] [CrossRef] - Li, C.; Cheung, W.K.; Liu, J.; Ng, J.K. Automatic Extraction of Behavioral Patterns for Elderly Mobility and Daily Routine Analysis. ACM Trans. Intell. Syst. Technol.
**2018**, 9, 1–26. [Google Scholar] [CrossRef] - Zhao, S.; Li, W.; Cao, J. A User-Adaptive Algorithm for Activity Recognition Based on K-Means Clustering, Local Outlier Factor, and Multivariate Gaussian Distribution. Sensors
**2018**, 18, 1850. [Google Scholar] [CrossRef] [PubMed][Green Version] - Alshammari, T.; Alshammari, N.; Sedky, M.; Howard, C. SIMADL: Simulated Activities of Daily Living Dataset. Data
**2018**, 3, 11. [Google Scholar] [CrossRef][Green Version] - Vavoulas, G.; Chatzaki, C.; Malliotakis, T.; Pediaditis, M.; Tsiknakis, M. The MobiAct Dataset: Recognition of Activities of Daily Living using Smartphones. In Proceedings of the 2nd International Conference on Infor-mation and Communication Technologies for Ageing Well and e-Health (ICT4AWE), Rome, Italy, 21–22 April 2016; pp. 143–151. [Google Scholar]
- Pazhoumand-Dar, H.; Armstrong, L.J.; Tripathy, A.K. Detecting deviations from activities of daily living routines using kinect depth maps and power consumption data. J. Ambient Intell. Humaniz. Comput.
**2019**, 11, 1727–1747. [Google Scholar] [CrossRef] - Caroux, L.; Consel, C.; Dupuy, L.; Sauzéon, H. Towards context-aware assistive applications for aging in place via real-life-proof activity detection. J. Ambient Intell. Smart Environ.
**2018**, 10, 445–459. [Google Scholar] [CrossRef] - Paudel, R.; Eberle, W.; Holder, L.B. Anomaly Detection of Elderly Patient Activities in Smart Homes using a Graph-Based Approach. In Proceedings of the International Conference of Data Science, Las Vegas, NV, USA, 30 July–2 August 2018; pp. 163–169. [Google Scholar]
- Dawadi, P.N.; Cook, D.J.; Schmitter-Edgecombe, M. Modeling patterns of activities using activity curves. Pervasive Mob. Comput.
**2016**, 28, 51–68. [Google Scholar] [CrossRef] [PubMed][Green Version] - Manca, M.; Parvin, P.; Paternò, F.; Santoro, C. Detecting Anomalous Elderly Behaviour in Ambient Assisted Living. In Proceedings of the ACM SIGCHI Symposium on Engineering Interactive Computing Systems, Lisbon, Portugal, 26–29 June 2017; pp. 63–68. [Google Scholar] [CrossRef]
- Qin, S.M.; Verkasalo, H.; Mohtaschemi, M.; Hartonen, T.; Alava, M. Patterns, entropy, and predictability of human mobility and life. PLoS ONE
**2012**, 7, e51353. [Google Scholar] [CrossRef] [PubMed][Green Version] - Porta, A.; Valencia, J.F.; Cairo, B.; Bari, V.; De Maria, B.; Gelpi, F.; Barbic, F.; Furlan, R. Are Strategies Favoring Pattern Matching a Viable Way to Improve Complexity Estimation Based on Sample Entropy? Entropy
**2020**, 22, 724. [Google Scholar] [CrossRef] [PubMed] - Markić, I.; Štula, M.; Zorić, M.; Stipaničev, D. Entropy-Based Approach in Selection Exact String-Matching Algorithms. Entropy
**2020**, 23, 31. [Google Scholar] [CrossRef] - Chan, A.C.; Chung, R.M. Security and Privacy of Wireless Beacon Systems. arXiv
**2021**, arXiv:2107.05868. [Google Scholar] - Atzori, L.; Iera, A.; Morabito, G. From “smart objects” to “social objects”: The next evolutionary step of the internet of things. IEEE Commun. Mag.
**2014**, 52, 97–105. [Google Scholar] [CrossRef] - Bilbao-Jayo, A.; Almeida, A.; Sergi, I.; Montanaro, T.; Fasano, L.; Emaldi, M.; Patrono, L. Behavior Modeling for a Beacon-Based Indoor Location System. Sensors
**2021**, 21, 4839. [Google Scholar] [CrossRef] - Li, J.; Yue, X.; Chen, J.; Deng, F. A Novel Robust Trilateration Method Applied to Ultra-Wide Bandwidth Location Systems. Sensors
**2017**, 17, 795. [Google Scholar] [CrossRef][Green Version] - Rose, N.D.R.; Tan, L.; Ahmad, M. 3D Trilateration Localization using RSSI in Indoor Environment. Int. J. Adv. Comput. Sci. Appl.
**2020**, 11, 385–391. [Google Scholar] [CrossRef]

**Figure 1.**Daily activities and transition probabilities (${A}_{1}$ to ${A}_{2}$ transitions are marked with yellow).

**Figure 12.**Parameter learning features: (

**left**) Learning time and (

**right**) probability activity transition (sleep -> eating).

Beacon Property | ||
---|---|---|

Advertising Interval | txPower | Cal. power 0 m |

200 ms | +4 dBm | −21 dBm |

$x=\frac{\left({x}_{1}^{2}+{y}_{1}^{2}+{r}_{1}^{2}\right)\times \left({y}_{3}-{y}_{2}\right)+\left({x}_{2}^{2}+{y}_{2}^{2}+{r}_{2}^{2}\right)\times \left({y}_{1}-{y}_{3}\right)+\left({x}_{3}^{2}+{y}_{3}^{2}+{r}_{3}^{2}\right)\times \left({y}_{2}-{y}_{1}\right)}{2\left({x}_{1}\times \left({y}_{3}-{y}_{2}\right)+{x}_{2}\times \left({y}_{1}-{y}_{3}\right)+{x}_{3}\times \left({y}_{2}-{y}_{1}\right)\right)}$ $y=\frac{\left({x}_{1}^{2}+{y}_{1}^{2}+{r}_{1}^{2}\right)\times \left({x}_{3}-{x}_{2}\right)+\left({x}_{2}^{2}+{y}_{2}^{2}+{r}_{2}^{2}\right)\times \left({x}_{1}-{x}_{3}\right)+\left({x}_{3}^{2}+{y}_{3}^{2}+{r}_{3}^{2}\right)\times \left({x}_{2}-{x}_{1}\right)}{2\left({y}_{1}\times \left({x}_{3}-{x}_{2}\right)+{y}_{2}\times \left({x}_{1}-{x}_{3}\right)+{y}_{3}\times \left({x}_{2}-{x}_{1}\right)\right)}$ |

Older Adult and Codification | Number of Monitored Days | Number of Days with Sequence Anomalies | Number of Days with Duration Anomalies |
---|---|---|---|

M1 | 84 | 13 | 8 |

W1 | 42 | 9 | 5 |

W2 | 112 | 26 | 23 |

W3 | 70 | 12 | 18 |

M2 | 84 | 16 | 15 |

W4 | 42 | 6 | 5 |

W5 | 56 | 4 | 12 |

M3 | 98 | 15 | 22 |

M4 | 56 | 8 | 12 |

M5 | 70 | 8 | 14 |

Older Adult | Precision | Recall | F-Measure | Specificity | Accuracy |
---|---|---|---|---|---|

M1 | 0.95 | 0.86 | 0.9 | 0.86 | 0.85 |

W1 | 1 | 0.73 | 0.84 | 1 | 0.76 |

W2 | 1 | 0.74 | 0.84 | 1 | 0.8 |

W3 | 0.88 | 0.72 | 0.79 | 0.83 | 0.74 |

M2 | 0.89 | 0.81 | 0.84 | 0.82 | 0.8 |

W4 | 0.88 | 0.88 | 0.87 | 0.64 | 0.81 |

W5 | 0.98 | 0.74 | 0.84 | 0.75 | 0.75 |

M3 | 0.93 | 0.79 | 0.85 | 0.81 | 0.78 |

M4 | 0.98 | 0.75 | 0.84 | 0.75 | 0.76 |

M5 | 1 | 0.76 | 0.86 | 0.8 | 0.8 |

AVERAGE | 0.95 | 0.78 | 0.85 | 0.83 | 0.79 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chifu, V.R.; Pop, C.B.; Demjen, D.; Socaci, R.; Todea, D.; Antal, M.; Cioara, T.; Anghel, I.; Antal, C.
Identifying and Monitoring the Daily Routine of Seniors Living at Home. *Sensors* **2022**, *22*, 992.
https://doi.org/10.3390/s22030992

**AMA Style**

Chifu VR, Pop CB, Demjen D, Socaci R, Todea D, Antal M, Cioara T, Anghel I, Antal C.
Identifying and Monitoring the Daily Routine of Seniors Living at Home. *Sensors*. 2022; 22(3):992.
https://doi.org/10.3390/s22030992

**Chicago/Turabian Style**

Chifu, Viorica Rozina, Cristina Bianca Pop, David Demjen, Radu Socaci, Daniel Todea, Marcel Antal, Tudor Cioara, Ionut Anghel, and Claudia Antal.
2022. "Identifying and Monitoring the Daily Routine of Seniors Living at Home" *Sensors* 22, no. 3: 992.
https://doi.org/10.3390/s22030992