Real-Time Physiological Activity and Sleep State Monitoring System Using TS2Vec Embeddings and DBSCAN Clustering for Heart Rate and Motor Response Analysis in IoMT
Abstract
1. Introduction
2. Materials and Methods
3. Results
3.1. System Design Result
3.2. Sensor Calibration Results
3.2.1. AD8232 Electrocardiogram Sensor Calibration
3.2.2. Flex Sensor Calibration
3.3. Parameters Quality of Service (QoS)
3.4. Sensor Test Result
3.5. Machine Learning Analysis with DBSCAN
3.5.1. Data Preprocessing
3.5.2. Clustering Results
3.5.3. Visualization of Clusters
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Freijser, L.; Annear, P.; Tenneti, N.; Gilbert, K.; Chukwujekwu, O.; Hazarika, I.; Mahal, A. The Role of Hospitals in Strengthening Primary Health Care in the Western Pacific. Lancet Reg. Health West. Pac. 2023, 33, 100698. [Google Scholar] [CrossRef]
- Angelucci, A.; Greco, M.; Cecconi, M.; Aliverti, A. Wearable Devices for Patient Monitoring in the Intensive Care Unit. Intensive Care Med. Exp. 2025, 13, 26. [Google Scholar] [CrossRef]
- Edlow, B.L.; Fecchio, M.; Bodien, Y.G.; Comanducci, A.; Rosanova, M.; Casarotto, S.; Young, M.J.; Li, J.; Dougherty, D.D.; Koch, C.; et al. Measuring Consciousness in the Intensive Care Unit. Neurocrit. Care 2023, 38, 584–590. [Google Scholar] [CrossRef]
- Amiri, M.; Raimondo, F.; Fisher, P.M.; Cacic Hribljan, M.; Sidaros, A.; Othman, M.H.; Zibrandtsen, I.; Bergdal, O.; Fabritius, M.L.; Hansen, A.E.; et al. Multimodal Prediction of 3- and 12-Month Outcomes in ICU Patients with Acute Disorders of Consciousness. Neurocrit. Care 2024, 40, 718–733. [Google Scholar] [CrossRef]
- Górska, U.; Rupp, A.; Celikel, T.; Englitz, B. Assessing the State of Consciousness for Individual Patients Using Complex, Statistical Stimuli. Neuroimage Clin. 2021, 29, 102471. [Google Scholar] [CrossRef]
- Lee, S.-J.; Chen, Y.-L.; Wu, T.-H.; Liu, C.-Y.; Wang, C.-H.; Tsai, C.-H.; Chung, J.-Y.; Yiang, G.-T.; Wu, M.-Y. Comparison of Glasgow Coma Scale, Motor Component, Eye Component, and Simplified Motor Scale for Predicting Trauma Outcomes: A 13-Year Multicenter Retrospective Cohort Study. BMC Emerg. Med. 2025, 25, 86. [Google Scholar] [CrossRef]
- Bodenes, L.; N’Guyen, Q.-T.; Le Mao, R.; Ferrière, N.; Pateau, V.; Lellouche, F.; L’Her, E. Early Heart Rate Variability Evaluation Enables to Predict ICU Patients’ Outcome. Sci. Rep. 2022, 12, 2498. [Google Scholar] [CrossRef]
- Oktavian, P.; Haryanto, F.; Salman, A.H.; Raindini, R.; Suprijadi, S. A Real-Time Heart Rate Signal Detection Using an Electronic Stethoscope with Labview. J. Biomed. Phys. Eng. 2020, 10, 375–382. [Google Scholar] [CrossRef]
- Altıntop, Ç.G.; Latifoğlu, F.; Karayol Akın, A.; Çetin, B. A Novel Approach for Detection of Consciousness Level in Comatose Patients from EEG Signals with 1-D Convolutional Neural Network. Biocybern. Biomed. Eng. 2022, 42, 16–26. [Google Scholar] [CrossRef]
- Yue, Z.; Wang, Y.; Duan, J.; Yang, T.; Huang, C.; Tong, Y.; Xu, B. TS2Vec: Towards Universal Representation of Time Series. Proc. AAAI Conf. Artif. Intell. 2022, 36, 8980–8987. [Google Scholar] [CrossRef]
- Kim, S.; Sun, M.; Petrunin, I.; Shin, H.-S. DBSCAN-Based Particle Gaussian Mixture Filters. Digit. Signal Process 2026, 168, 105546. [Google Scholar] [CrossRef]
- Liu, Z.; Alavi, A.; Li, M.; Zhang, X. Self-Supervised Contrastive Learning for Medical Time Series: A Systematic Review. Sensors 2023, 23, 4221. [Google Scholar] [CrossRef]
- Mehari, T.; Strodthoff, N. Self-Supervised Representation Learning from 12-Lead ECG Data. Comput. Biol. Med. 2022, 141, 105114. [Google Scholar] [CrossRef]
- Kaverinskiy, V.; Chaikovsky, I.; Mnevets, A.; Ryzhenko, T.; Bocharov, M.; Malakhov, K. Scalable Clustering of Complex ECG Health Data: Big Data Clustering Analysis with UMAP and HDBSCAN. Computation 2025, 13, 144. [Google Scholar] [CrossRef]
- Zakri, A.A.; Putri, Y.R.A.R.Q.; Romadoni, S.; Hasneli, Y. IoT-Based Flex Sensor Gloves for Immobility Patients: A Prototype. Int. J. Adv. Sci. Eng. Inf. Technol. 2024, 14, 920–927. [Google Scholar] [CrossRef]
- Sangeethalakshmi, K.; Preethi Angel, S.; Preethi, U.; Pavithra, S.; Shanmuga Priya, V. Patient Health Monitoring System Using IoT. Mater. Today Proc. 2023, 80, 2228–2231. [Google Scholar] [CrossRef]
- Tyagi, S.; Singhal, H.; Gupta, T.; Mehrotra, K.; Kumar, A. Health Monitoring System Using ECG and PPG Techniques. Int. J. Sci. Res. Arch. 2024, 12, 3. [Google Scholar] [CrossRef]
- ISO 80601-2-61:2017; Medical Electrical Equipment—Part 2-61: Particular Requirements for Basic Safety and Essential Performance of Pulse Oximeter Equipment. International Electrotechnical Commission (IEC): London, UK, 2019.
- Galli, A.; Montree, R.J.H.; Que, S.; Peri, E.; Vullings, R. An Overview of the Sensors for Heart Rate Monitoring Used in Extramural Applications. Sensors 2022, 22, 4035. [Google Scholar] [CrossRef] [PubMed]
- Souza, A.S.; Bezerra, M.A.; Cerqueira, U.M.F.M.; Rodrigues, C.J.O.; Santos, B.C.; Novaes, C.G.; Almeida, E.R.V. An Introductory Review on the Application of Principal Component Analysis in the Data Exploration of the Chemical Analysis of Food Samples. Food Sci. Biotechnol. 2024, 33, 1323–1336. [Google Scholar] [CrossRef] [PubMed]
- Khanizadeh, F.; Ettefaghian, A.; Wilson, G.; Shirazibeheshti, A.; Radwan, T.; Luca, C. Smart Data-Driven Medical Decisions through Collective and Individual Anomaly Detection in Healthcare Time Series. Int. J. Med. Inform. 2025, 194, 105696. [Google Scholar] [CrossRef] [PubMed]
- Sugunakar, M.B.S.; Maruthy, K.N.; Srinivas, C.H.; Johnson, P. A Comparative Study between Single Lead AD8232 Heart Rate Monitor and Standard Electrocardiograh to Acquire Electrocardiographic Data for Cardiac Autonomic Function Testing. Indian J. Sci. Technol. 2021, 14, 534–540. [Google Scholar] [CrossRef]
- Novitasari, A.; Nuryani, N.; Darsono, D. Android-Based Wireless Single-Lead Electrocardiogram: Heart Rate Measurement and ECG Signal Visualization. Kinet. Game Technol. Inf. Syst. Comput. Netw. Comput. Electron. Control. 2024, 9, 253. [Google Scholar] [CrossRef]
- Balakarthikeyan, V.; Jais, R.; Vijayarangan, S.; Sreelatha Premkumar, P.; Sivaprakasam, M. Heart Rate Variability Based Estimation of Maximal Oxygen Uptake in Athletes Using Supervised Regression Models. Sensors 2023, 23, 3251. [Google Scholar] [CrossRef]
- Meza, C.; Juega, J.; Francisco, J.; Santos, A.; Duran, L.; Rodriguez, M.; Alvarez-Sabin, J.; Sero, L.; Ustrell, X.; Bashir, S.; et al. Accuracy of a Smartwatch to Assess Heart Rate Monitoring and Atrial Fibrillation in Stroke Patients. Sensors 2023, 23, 4632. [Google Scholar] [CrossRef]
- Chen, Z.; Wang, Q.; Bi, Y.; Lin, J.; Yang, W.; Deng, C.; Guo, S.; Liao, M. Analyzing Human Muscle State with Flexible Sensors. J. Sens. 2022, 2022, 1–11. [Google Scholar] [CrossRef]
- Rostami, M.; Goli-Bidgoli, S. An Overview of QoS-Aware Load Balancing Techniques in SDN-Based IoT Networks. J. Cloud Comput. 2024, 13, 89. [Google Scholar] [CrossRef]
- Younas, M.I.; Iqbal, M.J.; Aziz, A.; Sodhro, A.H. Toward QoS Monitoring in IoT Edge Devices Driven Healthcare—A Systematic Literature Review. Sensors 2023, 23, 8885. [Google Scholar] [CrossRef]
- Khan, Z.A.; Ambhaikar, A. The Impact of QoS Parameters on the Performance of IoT Applications. Int. J. Intell. Syst. Appl. Eng. 2024, 12, 4351. Available online: https://ijisae.org/index.php/IJISAE/article/view/6155 (accessed on 4 November 2025).
- ITU-T Y.1541; Network Performance Objectives for IP-Based Services. International Telecommunication Union (ITU-T): Geneva, Switzerland, 2011.
- Speed, C.; Arneil, T.; Harle, R.; Wilson, A.; Karthikesalingam, A.; McConnell, M.; Phillips, J. Measure by Measure: Resting Heart Rate Across the 24-Hour Cycle. PLoS Digit. Health 2023, 2, e0000236. [Google Scholar] [CrossRef] [PubMed]
- Ahammed, S.; Hassan, N.; Cheragee, S.H.; Islam, A.Z.M.T. An IoT-Based Real-Time Remote Health Monitoring System. Int. J. Recent Eng. Sci. 2021, 8, 23–29. [Google Scholar] [CrossRef]
- Niharika, M.; Saicharan, M.; Preethi, V.; Chaitanya, K.; Sathis, M. Heart Pulse Rate Detection and Alerting Using Arduino with GSM Module. J. Electron. Autom. Eng. 2023, 2, 58–63. [Google Scholar] [CrossRef]
- Wang, Y.; Huang, H.; Rudin, C.; Shaposhnik, Y. Understanding How Dimension Reduction Tools Work: An Empirical Approach to Deciphering t-SNE, UMAP, TriMap, and PaCMAP for Data Visualization. J. Mach. Learn. Res. 2021, 22, 1–73. [Google Scholar]
- Sieciński, S.; Kostka, P.S.; Tkacz, E.J. Heart Rate Variability Analysis on Electrocardiograms, Seismocardiograms and Gyrocardiograms on Healthy Volunteers. Sensors 2020, 20, 4522. [Google Scholar] [CrossRef] [PubMed]
- Dhanush Gowda, P. V IOT Based Health Monitoring System. Int. J. Res. Appl. Sci. Eng. Technol. 2020, 8, 1866–1871. [Google Scholar] [CrossRef]
- Zhang, J. Effect of Age and Sex on Heart Rate Variability in Healthy Subjects. J. Manip. Physiol. Ther. 2007, 30, 374–379. [Google Scholar] [CrossRef] [PubMed]
- Mielke, G.I.; Doust, J.; Chan, H.-W.; Mishra, G.D. Physical Activity Accumulated Across Adulthood and Resting Heart Rate at Age 41–46 Years in Women: Findings from the Menarche to Premenopause Study. J. Phys. Act. Health 2023, 20, 823–831. [Google Scholar] [CrossRef]
- Choi, J.; Cha, W.; Park, M.-G. Declining Trends of Heart Rate Variability According to Aging in Healthy Asian Adults. Front. Aging Neurosci. 2020, 12, 610626. [Google Scholar] [CrossRef]
- Wiersema, J.M.; Kamphuis, A.E.P.; Rohling, J.H.T.; Kervezee, L.; Akintola, A.A.; Jansen, S.W.; Slagboom, P.E.; van Heemst, D.; van der Spoel, E. The Association Between Continuous Ambulatory Heart Rate, Heart Rate Variability, and 24-h Rhythms of Heart Rate with Familial Longevity and Aging. Aging 2022, 14, 7223–7239. [Google Scholar] [CrossRef]
- Catela, D.; Santos, J.; Oliveira, J.; Franco, S.; Mercê, C. Heart Rate Variability, Blood Pressure and Peripheral Oxygen Saturation during Yoga Adham and Mahat Breathing Techniques without Retention in Adult Practitioners. J. Funct. Morphol. Kinesiol. 2024, 9, 184. [Google Scholar] [CrossRef]
- Black, N.; D’Souza, A.; Wang, Y.; Piggins, H.; Dobrzynski, H.; Morris, G.; Boyett, M.R. Circadian Rhythm of Cardiac Electrophysiology, Arrhythmogenesis, and the Underlying Mechanisms. Heart Rhythm. 2019, 16, 298–307. [Google Scholar] [CrossRef]
- Zakri, A.A.; Arfianti, A.; Hamzah, A.; Iqbal, M.; Madjid, H.; Fikri Aulia, N. Designing Flex Sensor Gloves with Temperature Sensor and Pulse Sensor to Help Stroke Patients. Int. J. Emerg. Technol. Adv. Eng. 2022, 12, 23–31. [Google Scholar] [CrossRef] [PubMed]
- Chalmers, T.; Hickey, B.A.; Newton, P.; Lin, C.-T.; Sibbritt, D.; McLachlan, C.S.; Clifton-Bligh, R.; Morley, J.W.; Lal, S. Associations between Sleep Quality and Heart Rate Variability: Implications for a Biological Model of Stress Detection Using Wearable Technology. Int. J. Environ. Res. Public Health 2022, 19, 5770. [Google Scholar] [CrossRef] [PubMed]













| Pulse Fingertip (bpm) | ECG Sensor (bpm) | Error (%) |
|---|---|---|
| 90 | 90 | 0.0 |
| 90 | 90 | 0.0 |
| 89 | 85 | −4.7 |
| 88 | 89 | 1.1 |
| 90 | 91 | 1.0 |
| 93 | 90 | −3.3 |
| 83 | 83 | 0.0 |
| 91 | 93 | 2.1 |
| 78 | 81 | 3.7 |
| 76 | 75 | −1.3 |
| 70 | 71 | 1.4 |
| 73 | 73 | 0.0 |
| 70 | 73 | 4.1 |
| 72 | 72 | 0.0 |
| 74 | 76 | 2.6 |
| Average Error | 0.4 | |
| Accuracy | 99.6 | |
| Cluster | Heart Rate (μ, σ2) | Flex Right (μ, σ2) | Flex Left (μ, σ2) | Window |
|---|---|---|---|---|
| −1 | (77.36, 44.77) | (45.76, 793.14) | (38.54, 585.56) | 41 |
| 0 | (82.34, 20.09) | (14.08, 74.04) | (7.59, 49.10) | 60 |
| 1 | (75.51, 23.02) | (67.19, 514.62) | (45.84, 384.75) | 51 |
| 2 | (66.78, 17.03) | (6.57, 95.94) | (2.80, 59.90) | 71 |
| 3 | (86.43, 27.03) | (62.35, 864.87) | (33.89, 769.95) | 60 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 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
Arifin, A.; Harbi, H.; Indriani, A.S.; Laila, I.; Abdullah, B.; Alridho; Idris, I.; Prakosa, J.A. Real-Time Physiological Activity and Sleep State Monitoring System Using TS2Vec Embeddings and DBSCAN Clustering for Heart Rate and Motor Response Analysis in IoMT. Signals 2025, 6, 67. https://doi.org/10.3390/signals6040067
Arifin A, Harbi H, Indriani AS, Laila I, Abdullah B, Alridho, Idris I, Prakosa JA. Real-Time Physiological Activity and Sleep State Monitoring System Using TS2Vec Embeddings and DBSCAN Clustering for Heart Rate and Motor Response Analysis in IoMT. Signals. 2025; 6(4):67. https://doi.org/10.3390/signals6040067
Chicago/Turabian StyleArifin, Arifin, Harmiati Harbi, Andi Silvia Indriani, Ida Laila, Bualkar Abdullah, Alridho, Irfan Idris, and Jalu Ahmad Prakosa. 2025. "Real-Time Physiological Activity and Sleep State Monitoring System Using TS2Vec Embeddings and DBSCAN Clustering for Heart Rate and Motor Response Analysis in IoMT" Signals 6, no. 4: 67. https://doi.org/10.3390/signals6040067
APA StyleArifin, A., Harbi, H., Indriani, A. S., Laila, I., Abdullah, B., Alridho, Idris, I., & Prakosa, J. A. (2025). Real-Time Physiological Activity and Sleep State Monitoring System Using TS2Vec Embeddings and DBSCAN Clustering for Heart Rate and Motor Response Analysis in IoMT. Signals, 6(4), 67. https://doi.org/10.3390/signals6040067

