Detection of stress using photoplethysmography ⋆ Yaroslav Strelchuk1,†, Alina Nechyporenko1,2,†, Marcus Frohme1,†, Vitaliy Gargin3,4,†, Andrii Lupyr3,†and Victoriia Alekseeva1,3,4,∗,† 1 Technical University of Applied Sciences Wildau (TH Wildau), Hochschulring 1, Wildau, 15745, Germany 2 Kharkiv National University of Radioelectronics, Nauky avenue 14, Kharkiv, 61166, Ukraine 3 Kharkiv National Medical University, Nauky avenue 4, Kharkiv, 61022, Ukraine 4 Kharkiv International Medical University, Molochna street 38, Kharkiv, 61001, Ukraine Abstract Stress is an important factor affecting human health, and its timely detection can significantly improve quality of life. This study addresses the current issue of identifying stress states using photoplethysmography signals obtained from the wearable Shimmer 3 sensor. The purpose of the study was to establish an effective approach for stress detection, specifically through the analysis of heart rate variability changes during different states: rest and stress. A distinctive feature of the research is the use of the air raid siren sound as a stress factor. The research methodology includes the collection and analysis of biosignals, allowing for the assessment of cardiovascular system functioning under the impact of stress factors. The results of the study demonstrated significant differences in heart rhythm indicators depending on the person's state, highlighting the potential of these metrics as a tool for health monitoring and stress detection. The paper proposes a new approach to using photoplethysmography for assessing stress responses, which may contribute to the development of personalized stress management methods. Keywords Photoplethysmography, heart rate variability, stress, wearable sensors, early stress detection, cardiovascular system health, health monitoring, air raid signal, personalized stress management. 1. Introduction Stress is a physiological response, both physically and mentally, to changes in our surroundings. It's something everyone experiences now and then. Stress can be triggered by a variety of factors (known as stressors), such as everyday responsibilities, work, family matters, significant life events, health issues, conflicts like war, or death of relatives [2]. The physiological basis for regulating changes in the body and maintaining homeostasis is the functioning of the nervous system, specifically the autonomic nervous system [3]. The parasympathetic and sympathetic nervous systems must remain in constant balance to ensure timely and adequate responses to different stress situations [4]. This balance is supported by many vital functions, such as heart rate, pulse, breathing frequency, urinary and digestive system activity, and sweat gland activity [5]. The functional state of human organs and systems forms the basis of numerous methods for detecting stress. The body also reacts to stress by releasing hormones that increase heart rate and breathing, preparing muscles to respond to the stress situation. When there is an immediate threat to health or life, this response is beneficial [7]. However, if such a reaction persists and the stress level remains elevated for longer than necessary for survival, it can negatively affect health. Chronic stress may contribute to the development of physical and mental disorders such as diabetes, arthritis, hypertension, anxiety disorders, and depression [7]. The above demonstrates the IDDM’24: 7th International Conference on Informatics & Data-Driven Medicine, November 14 - 16, 2024, Birmingham, UK ∗ Corresponding author. † These authors contributed equally. yaroslav.strelchuk@gmail.com (Y. Strelchuk); alinanechiporenko@gmail.com (A. Nechyporenko); mfrohme@th- wildau.de (M. Frohme); vik13052130@gmail.com (V. Alekseeva); lupyr_ent@ukr.net (A. Lupur); vitgarg@ukr.net (V. Gargin) 0009-0006-2680-4818 (Y. Strelchuk); 0000-0001-9063-2682 (A. Nechyporenko); 0000-0001-9063-2682 (M. Frohme) 0000- 0001-5272-8704 (V. Alekseeva); 0000-0002-9896-163X (A. Lupyr); 0000-0002-4501-7426 (V. Gargin) © 2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings importance of recognizing stress and taking preventive measures [8]. Currently, various methods are available for reliably detecting stress states, based on data obtained through electrocardiography, electroencephalography, and electromyography [9]. However, these methods require stationary patient placement, trained personnel, and strict adherence to measurement protocols, which is not always accessible both physically and financially. To facilitate the stress detection process, wearable sensors were used to measure physiological signals. This enables wireless data transmission using Bluetooth protocol so that machine learning algorithms can be applied for further data analysis. 2. Objective of the Study The aim of this study is to analyze photoplethysmography signals acquired under resting and stress conditions to develop a machine learning-based method for detection of stress. The air raid siren signal, transmitted via a siren, was chosen as the stressor, and its effect was studied on individuals from various cultures and life experiences. 3. Material and Methods To collect biosignals for further analysis, the Shimmer 3 sensor was used, specifically a module capable of gathering photoplethysmography signals. A photo of the sensor is shown in Figure 1. Figure 1: Photo of the Shimmer 3 sensor This module allows real-time data transmission from a small wearable device to a computer or phone. The company that manufactures these devices is certified according to ISO 9001 quality management standards and ISO 13485 medical device standards. Photoplethysmography (PPG) is a non-invasive technique that measures changes in blood volume using a light source and a photodetector placed on the skin. A standard PPG device consists of these two main components: a light source and a photodetector. Figure 2: PPG signals The light source in a PPG device emits light onto the skin, and the photodetector captures the light that is reflected back from the tissue. The amount of reflected light varies with changes in blood volume, which is proportional to the pulsatile flow of blood. The PPG signal derived from this interaction contains valuable health information. By analyzing this signal, researchers and physicians can assess cardiovascular conditions such as atherosclerosis and arterial stiffness. An example of a heartbeat graph captured using PPG technology is shown in Figure 2. The signal formation and measurement protocol for PPG signals are shown in Figure 3. Test participants spent 5 minutes in calm conditions without stimuli, followed by 3-minute measurements to obtain results in a stress-free state. After that, the air raid siren signal was activated, and another 3-minute measurement was conducted. Then, data on nervous system recovery were collected for another 3 minutes. The participants were informed about the study's purpose and procedures, and they provided consent for the processing and use of their personal data for scientific purposes. Data such as age, gender, height, weight (for calculating body mass index), the presence of endocrine and cardiovascular disorders, and prior experience with air raid signals in real situations were also collected to explore potential correlations. The air raid siren was chosen as a stressor because it is ethically appropriate and relevant given the current circumstances in the country, allowing for the analysis of reactions without causing harm to the participants. The study group included 30 individuals, aged 20 to 30, equally divided between 15 men and 15 women. Figure 3: Experiment protocol The obtained data was classified using K-Nearest Neighbors, Naive Bayes, Random Forest, Decision Tree and Support Vector Regression machine learning models. 4. Results and Discussion The acquired PPG data was analyzed using the heart rate variability (HRV) method. HRV is an evaluation of the heart's electrical activity [11]. The heart rate varies according to physical activity, emotional state, and stress, reflecting the body's adaptive responses. HRV is an indicator of how the heart reacts to different stimuli. Changes in HRV can serve as early warning signals for the risk of heart disease, making it an important tool for heart health monitoring. Two metrics in the time domain of HRV were calculated: SDNN and RMSSD. SDNN is the standard deviation of heart contraction intervals. RMSSD is the root mean square of successive differences in heart contraction intervals. The obtained data were later compared with the normal ranges of these components [12]. Figure 4 shows three box plots of the for SDNN metric for the participants of the experiment. The first plot shows the results for the "Relaxation" phase, the second during the stress factor, and the third during the first air raid signal. Figure 4: Box plot for SDNN In order to evaluate the classification outcome, the accuracy metric has been selected. Accuracy is defined as the ratio of correctly classified cases (TP + TN) to the total number of cases (TP + FP + FN + TN). 푇 +푇 푇 +퐹 ++퐹 +푇 Accuracy = , (1), where TP (True Positive) - the number of cases where the algorithm correctly classified the positive condition; TN (True Negative) - the number of cases where the algorithm correctly classified the negative condition; FP (False Positive) – the number of cases where the algorithm incorrectly classified a negative condition as positive. Also known as a Type I error; FN (False Negative) – the number of cases where the algorithm incorrectly classified a positive condition as negative. Also known as a Type II error. Finally, three groups of participants have been identified:  Those whose HRV metrics were within the normal range during the relaxation phase and then were outside the normal range during stress – 23%  Those whose HRV values were outside the normal range during the relaxation phase and then within the normal range during stress – 7%  Those whose SDNN and RMSSD values during the siren sound were either within the normal range or outside the normal range – 70% The HRV analysis using SDNN and RMSSD highlights the adaptive resources of our body, particularly the ability of the cardiovascular system to respond to various changing environmental conditions, such as stress caused by an air raid signal and a state of rest. Interestingly, in most cases (70%), HRV values remained stable and did not change under the influence of stress factors. This stability was observed both when HRV values were within the physiological range and when they were outside the normal range. This may indicate high adaptive resources in the individuals studied, who, through neuro-regulatory and endocrine mechanisms, are capable of adapting to stressful situations by regulating cardiovascular system activity. These individuals may exhibit potential resilience or limited adaptability to stress. On the other hand, 23% of participants demonstrated a significant decrease in HRV values during stress, suggesting heightened sensitivity to stressors. The final group, comprising 7%, showed an interesting inverse relationship, where stress improved their HRV parameters, potentially indicating a form of positive adaptation or a specific stress-response mechanism. In order to prove the impact of stress on the cardiovascular or other systems some additional diagnostic methods can be used [15-16]. This includes the integration of intelligent systems and data-driven services in healthcare, as discussed by several authors [17-19]. This highlights the importance of using technology to improve medical outcomes, with future data storage supported by cloud solutions [20-22]. Our research, which examines the impact of stress on a human body, contributes to this discussion by focusing on a particular health aspect influenced by lifestyle factors. Based on the results obtained, it was found that the Naive Bayes method achieved the highest classification accuracy with 88%. Other methods, such as K-Nearest Neighbors, Random Forest, and Decision Tree, showed lower accuracy but still made valuable contributions to the overall data analysis. Thus, the machine learning approach enables a comprehensive evaluation of the data and facilitates stress detection. 5. Conclusions In the current study, a method for detecting stress using photoplethysmography technology was investigated. The results indicate significant differences in SDNN and RMSSD values depending on the individual's state, confirming the importance of these indicators for heart health monitoring and detecting stress responses. Heart rate variability (HRV) analysis provides various metrics that reflect the balance between the sympathetic and parasympathetic nervous systems. Further analysis of other stress indicators to identify more correlations using machine learning methods will serve as a basis for developing new approaches to stress detection and management. The results not only expand our understanding of stress response mechanisms, but also contribute to the development of personalized approaches to health. Declaration on Generative AI During the preparation of this work, the author(s) used ChatGPT, Grammarly in order to: Grammar and spelling check, Paraphrase and reword. After using this tool/service, the author(s) reviewed and edited the content as needed and take(s) full responsibility for the publication’s content. No generative artificial intelligence tools were used in the preparation of this article. References [1] J. K. Meier, M. Weymar, and L. Schwabe, "Stress Alters the Neural Context for Building New Memories," J. Cogn. Neurosci., vol. 32, no. 12, pp. 2226–2240, Dec. 2020, doi: 10.1162/jocn_a_01613. [2] I. M. Balmus, M. Robea, A. Ciobica, and D. Timofte, "PERCEIVED STRESS AND GASTROINTESTINAL HABITS IN COLLEGE STUDENTS," Acta Endocrinol (Buchar)., vol. 15, no. 2, pp. 274–275, Apr.–Jun. 2019, doi: 10.4183/aeb.2019.274. [3] S. Golbidi, J. C. Frisbee, and I. Laher, "Chronic stress impacts the cardiovascular system: animal models and clinical outcomes," Am. J. Physiol. Heart Circ. Physiol., vol. 308, no. 12, pp. H1476– H1498, Jun. 2015, doi: 10.1152/ajpheart.00859.2014. [4] A. Haas, D. Borsook, G. Adler, and R. Freeman, "Stress, hypoglycemia, and the autonomic nervous system," Auton. Neurosci., vol. 240, p. 102983, Jul. 2022, doi: 10.1016/j.autneu.2022.102983. [5] A. T. Ginty, T. E. Kraynak, J. P. Fisher, and P. J. Gianaros, "Cardiovascular and autonomic reactivity to psychological stress: Neurophysiological substrates and links to cardiovascular disease," Auton. Neurosci., vol. 207, pp. 2–9, Nov. 2017, doi: 10.1016/j.autneu.2017.03.003. [6] N. Athanasiou, G. C. Bogdanis, and G. Mastorakos, "Endocrine responses of the stress system to different types of exercise," Rev. Endocr. Metab. Disord., vol. 24, no. 2, pp. 251–266, Apr. 2023, doi: 10.1007/s11154-022-09758-1. [7] B. A. Franklin, A. Rusia, C. Haskin-Popp, and A. Tawney, "Chronic Stress, Exercise and Cardiovascular Disease: Placing the Benefits and Risks of Physical Activity into Perspective," Int. J. Environ. Res. Public Health, vol. 18, no. 18, p. 9922, Sep. 2021, doi: 10.3390/ijerph18189922. [8] R. P. Juster, B. S. McEwen, and S. J. Lupien, "Allostatic load biomarkers of chronic stress and impact on health and cognition," Neurosci. Biobehav. Rev., vol. 35, no. 1, pp. 2–16, Sep. 2010, doi: 10.1016/j.neubiorev.2009.10.002. [9] R. M. Al Abdi, A. E. Alhitary, E. W. Abdul Hay, and A. K. Al-Bashir, "Objective detection of chronic stress using physiological parameters," Med. Biol. Eng. Comput., vol. 56, no. 12, pp. 2273–2286, Dec. 2018, doi: 10.1007/s11517-018-1854-8. [10] C. Wang, Z. Li, and X. Wei, "Monitoring heart and respiratory rates at radial artery based on PPG," Optik, vol. 124, no. 19, pp. 3954–3956, 2013. [11] H. ChuDuc, K. NguyenPhan, and D. NguyenViet, "A review of heart rate variability and its applications," APCBEE Procedia, vol. 7, pp. 80–85, 2013. [12] F. Shaffer and J. P. Ginsberg, "An overview of heart rate variability metrics and norms," Front. Public Health, vol. 5, p. 290215, 2017. [13] What is a confusion matrix?, IBM - United States. Available: https://www.ibm.com/topics/confusion-matrix. Accessed: May 18, 2024. [14] IBM - United States. Available: https://www.ibm.com/content/dam/connectedassets-adobe- cms/worldwide-content/creative-assets/s-migr/ul/g/c8/a7/binary-matrix.component.complex- narrative-xl.ts=1712087356966.png/content/adobe-cms/us/en/topics/confusion- matrix/jcr:content/root/table_of_contents/body/content_section_styled/content-section- body/complex_narrative_390941229/items/content_group/image. Accessed: May 18, 2024. [15] A. Nechyporenko, M. Frohme, V. Alekseeva, V. Gargin, D. Sytnikov, and M. Hubarenko, "Deep learning-based image segmentation for detection of odontogenic maxillary sinusitis," in Proc. 2022 41st IEEE Int. Conf. Electron. Nanotechnol. (ELNANO), Kyiv, Ukraine, Oct. 10-14, 2022, pp. 339–342, doi: 10.1109/ELNANO54667.2022.9927086. [16] A. S. Nechyporenko, R. S. Nazaryan, G. O. Semko, E. O. Kostiukov, and V. V. Alekseeva, "Application of spiral computed tomography for determination of the minimal bone density variability of the maxillary sinus walls in chronic odontogenic and rhinogenic sinusitis," Ukrainian Journal of Radiology and Oncology, vol. 29, no. 4, pp. 65–75, 2021. [17] O. Kiseleva, S. Yakovlev, D. Chumachenko, and O. Kuzenkov, "Exploring bifurcation in the compartmental mathematical model of COVID-19 transmission," Computation, vol. 12, no. 9, p. 186, 2024 [18] I. Izonin et al., "Smart systems and data-driven services in healthcare," Comput. Biol. Med., vol. 158, 2023. [19] I. Izonin et al., "Smart technologies and its application for medical/healthcare services," J. Reliable Intell. Environ., vol. 9, no. 1, pp. 1–3, Feb. 2023, doi: 10.1007/s40860-023-00201-z. [20] A. Litvinov, D. Chumachenko, N. Dotsenko, I. Kadykova, and I. Chumachenko, "Enhancing healthcare provision in conflict zones: Queuing system models for mobile and flexible medical care units with a limited number of treatment stations," Int. J. Inf. Technol. Comput. Sci., vol. 16, no. 4, pp. 96–104, 2024. [21] [M. Zamkovyi, S. Gavrylenko, K. Khatsko, and N. Khatsko, "Algorithmic Support for Building a Distributed IoT System in a Cloud Service," in Proc. 2023 IEEE 4th KhPI Week on Adv. Technol. (KhPIWeek), Kharkiv, Ukraine, 2023, pp. 1–6, doi: 10.1109/KhPIWeek61412.2023.10312994. [22] S. Gavrylenko and O. Hornostal, "Study of Methods for Improving the Meta-Algorithm of the Bagging Classifier," in Proc. 2023 IEEE 4th KhPI Week on Adv. Technol. (KhPIWeek), Kharkiv, Ukraine, 2023, pp. 1–6, doi: 10.1109/KhPIWeek61412.2023.10312977.