Real-Time Stress Level Feedback from Raw Ecg Signals for Personalised, Context-Aware Applications Using Lightweight Convolutional Neural Network Architectures
<p>ECG signal period.</p> "> Figure 2
<p>DriveDB driving event segments and peaks of the marker signal, created using a respiration sensor.</p> "> Figure 3
<p>Sliding window dataset augmentation.</p> "> Figure 4
<p>VGG inspired stress level analysis architecture.</p> "> Figure 5
<p>Single 1D CNN stress level analysis architecture.</p> "> Figure 6
<p>The confusion matrix of the best model for the stress detection task (VGG inspired architecture).</p> "> Figure 7
<p>The confusion matrix of the best model for the 3-level stress classification task (single 1D CNN architecture).</p> ">
Abstract
:1. Introduction
2. Related Work
2.1. Conventional Machine Learning Approaches
2.2. Deep Learning Approaches
2.3. Available Stress Datasets
3. Methods
3.1. Dataset Pre-Preprocessing
3.1.1. DriveDB
3.1.2. Arachnophobia
3.1.3. ECG Signal Sample Fragmentation
3.1.4. Baseline Normalization
Algorithm 1 Baseline Normalization |
while do |
▹ At index 0 the ECG signal labeled as ‘low stress’ is accessed. |
for do |
end for |
end while |
3.2. Dataset Augmentation
3.3. Stress Level Analysis Architectures
3.3.1. VGG Inspired Architecture
3.3.2. Single 1D CNN Architecture
4. Results
5. Discussion
5.1. Comparison with Previous Studies
5.2. Model Capacity
5.3. Limitations and Future Work
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Apostolakis, K.; Dimitriou, N.; Margetis, G.; Ntoa, S.; Tzovaras, D.; Stephanidis, C. DARLENE Improving situational awareness of European law enforcement agents through a combination of augmented reality and artificial intelligence solutions [version 1; peer review: Awaiting peer review]. Open Res. Eur. 2021, 1. [Google Scholar] [CrossRef]
- Ulstein, I.; Wyller, T.B.; Engedal, K. High score on the Relative Stress Scale, a marker of possible psychiatric disorder in family carers of patients with dementia. Int. J. Geriatr. Psychiatry 2007, 22, 195–202. [Google Scholar] [CrossRef] [PubMed]
- Arrindell, W.A.; Emmelkamp, P.M.G.; Jan, v.d.E. Phobic dimensions: I. Reliability and generalizability across samples, gender and nations: The fear survey schedule (FSS-III) and the fear questionnaire (FQ). Adv. Behav. Res. Ther. 1984, 6, 207–253. [Google Scholar] [CrossRef]
- Barefoot, J.C.; Dodge, K.A.; Peterson, B.L.; Dahlstrom, W.G.; Williams, R.B. The Cook-Medley hostility scale: Item content and ability to predict survival. Psychosom. Med. 1989, 51, 46–57. [Google Scholar] [CrossRef] [PubMed]
- Weidner, G.; Friend, R.; Ficarrotto, T.J.; Mendell, N.R. Hostility and cardiovascular reactivity to stress in women and men. Psychosom. Med. 1989, 51, 36–45. [Google Scholar] [CrossRef]
- King, S.L.; Hegadoren, K.M. Stress hormones: How do they measure up? Biol. Res. Nurs. 2002, 4, 92–103. [Google Scholar] [CrossRef]
- Roscoe, A.H. Assessing pilot workload. Why measure heart rate, HRV and respiration? Biol. Psychol. 1992, 34, 259–287. [Google Scholar] [CrossRef]
- Gedam, S.; Paul, S. A Review on Mental Stress Detection Using Wearable Sensors and Machine Learning Techniques. IEEE Access 2021, 9, 84045–84066. [Google Scholar] [CrossRef]
- Ribeiro Pinto, J.; Cardoso, J.S.; Lourenço, A. Evolution, Current Challenges, and Future Possibilities in ECG Biometrics. IEEE Access 2018, 6, 34746–34776. [Google Scholar] [CrossRef]
- Dishman, R.K.; Nakamura, Y.; Garcia, M.E.; Thompson, R.W.; Dunn, A.L.; Blair, S.N. Heart rate variability, trait anxiety, and perceived stress among physically fit men and women. Int. J. Psychophysiol. Off. J. Int. Organ. Psychophysiol. 2000, 37, 121–133. [Google Scholar] [CrossRef]
- Posada-Quintero, H.F.; Florian, J.P.; Orjuela-Cañón, A.D.; Chon, K.H. Electrodermal Activity Is Sensitive to Cognitive Stress under Water. Front. Physiol. 2017, 8, 1128. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ahn, J.W.; Ku, Y.; Kim, H.C. A Novel Wearable EEG and ECG Recording System for Stress Assessment. Sensors 2019, 19, 1991. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sharma, N.; Gedeon, T. Objective measures, sensors and computational techniques for stress recognition and classification: A survey. Comput. Methods Prog. Biomed. 2012, 108, 1287–1301. [Google Scholar] [CrossRef]
- Healey, J.; Picard, R. Detecting stress during real-world driving tasks using physiological sensors. IEEE Trans. Intell. Transp. Syst. 2005, 6, 156–166. [Google Scholar] [CrossRef] [Green Version]
- Conover, M.B. Understanding Electrocardiography; Elsevier Health Sciences: Amsterdam, The Netherlands, 2002. [Google Scholar]
- Giannakakis, G.; Trivizakis, E.; Tsiknakis, M.; Marias, K. A novel multi-kernel 1D convolutional neural network for stress recognition from ECG. In Proceedings of the 2019 8th International Conference on Affective Computing and Intelligent Interaction Workshops and Demos (ACIIW), Cambridge, UK, 3–6 September 2019; pp. 1–4. [Google Scholar] [CrossRef]
- Laborde, S.; Mosley, E.; Thayer, J.F. Heart Rate Variability and Cardiac Vagal Tone in Psychophysiological Research—Recommendations for Experiment Planning, Data Analysis, and Data Reporting. Front. Psychol. 2017, 8, 213. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Berntson, G.G.; Bigger, J.T.; Eckberg, D.L.; Grossman, P.; Kaufmann, P.G.; Malik, M.; Nagaraja, H.N.; Porges, S.W.; Saul, J.P.; Stone, P.H.; et al. Heart rate variability: Origins, methods, and interpretive caveats. Psychophysiology 1997, 34, 623–648. [Google Scholar] [CrossRef] [PubMed]
- Spiers, J.P.; Silke, B.; McDermott, U.; Shanks, R.G.; Harron, D.W.G. Time and frequency domain assessment of heart rate variability: A theoretical and clinical appreciation. Clin. Auton. Res. 1993, 3, 145–158. [Google Scholar] [CrossRef]
- Ihmig, F.R.; H, A.G.; Neurohr-Parakenings, F.; Schäfer, S.K.; Lass-Hennemann, J.; Michael, T. On-line anxiety level detection from biosignals: Machine learning based on a randomized controlled trial with spider-fearful individuals. PLoS ONE 2020, 15, e0231517. [Google Scholar] [CrossRef] [PubMed]
- Keshan, N.; Parimi, P.V.; Bichindaritz, I. Machine learning for stress detection from ECG signals in automobile drivers. In Proceedings of the 2015 IEEE International Conference on Big Data (Big Data), Santa Clara, CA, USA, 29 October–1 November 2015; pp. 2661–2669. [Google Scholar] [CrossRef]
- Smets, E.; Casale, P.; Großekathöfer, U.; Lamichhane, B.; De Raedt, W.; Bogaerts, K.; Van Diest, I.; Van Hoof, C. Comparison of Machine Learning Techniques for Psychophysiological Stress Detection. Pervasive Computing Paradigms for Mental Health; Communications in Computer and Information Science; Serino, S., Matic, A., Giakoumis, D., Lopez, G., Cipresso, P., Eds.; Springer International Publishing: Cham, Switzerland, 2016; pp. 13–22. [Google Scholar] [CrossRef]
- Khazaee, A.; Ebrahimzadeh, A. Classification of electrocardiogram signals with support vector machines and genetic algorithms using power spectral features. Biomed. Signal Process. Control 2010, 5, 252–263. [Google Scholar] [CrossRef]
- Gupta, R.; Alam, M.A.; Agarwal, P. Modified Support Vector Machine for Detecting Stress Level Using EEG Signals. Comput. Intell. Neurosci. 2020, 2020, e8860841. [Google Scholar] [CrossRef] [PubMed]
- Kumar, P.; Garg, S.; Garg, A. Assessment of Anxiety, Depression and Stress using Machine Learning Models. Procedia Comput. Sci. 2020, 171, 1989–1998. [Google Scholar] [CrossRef]
- Sun, F.T.; Kuo, C.; Cheng, H.T.; Buthpitiya, S.; Collins, P.; Griss, M. Activity-Aware Mental Stress Detection Using Physiological Sensors. In Mobile Computing, Applications, and Services; Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering; Gris, M., Yang, G., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 211–230. [Google Scholar] [CrossRef]
- Munla, N.; Khalil, M.; Shahin, A.; Mourad, A. Driver stress level detection using HRV analysis. In Proceedings of the 2015 International Conference on Advances in Biomedical Engineering (ICABME), Beirut, Lebanon, 16–18 September 2015; pp. 61–64. [Google Scholar] [CrossRef]
- van Ravenswaaij-Arts, C.M.A.; Kollee, L.A.A.; Hopman, J.C.W.; Stoelinga, G.B.A.; van Geijn, H.P. Heart Rate Variability. Ann. Intern. Med. 1993, 118, 436–447. [Google Scholar] [CrossRef] [PubMed]
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Available online: http://www.deeplearningbook.org (accessed on 27 September 2021).
- Kiranyaz, S.; Avci, O.; Abdeljaber, O.; Ince, T.; Gabbouj, M.; Inman, D.J. 1D convolutional neural networks and applications: A survey. Mech. Syst. Signal Process. 2021, 151, 107398. [Google Scholar] [CrossRef]
- He, J.; Li, K.; Liao, X.; Zhang, P.; Jiang, N. Real-Time Detection of Acute Cognitive Stress Using a Convolutional Neural Network From Electrocardiographic Signal. IEEE Access 2019, 7, 42710–42717. [Google Scholar] [CrossRef]
- Hwang, B.; You, J.; Vaessen, T.; Myin-Germeys, I.; Park, C.; Zhang, B.T. Deep ECGNet: An Optimal Deep Learning Framework for Monitoring Mental Stress Using Ultra Short-Term ECG Signals. Telemed. J. E-Heal. Off. J. Am. Telemed. Assoc. 2018, 24, 753–772. [Google Scholar] [CrossRef] [PubMed]
- Seo, W.; Kim, N.; Kim, S.; Lee, C.; Park, S.M. Deep ECG-Respiration Network (DeepER Net) for Recognizing Mental Stress. Sensors 2019, 19, 3021. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Huang, J.; Luo, X.; Peng, X. A Novel Classification Method for a Driver’s Cognitive Stress Level by Transferring Interbeat Intervals of the ECG Signal to Pictures. Sensors 2020, 20, 1340. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sardeshpande, K.; Thool, V.R. Psychological Stress Detection Using Deep Convolutional Neural Networks; Computer Vision and Image Processing; Communications in Computer and Information Science; Nain, N., Vipparthi, S.K., Raman, B., Eds.; Springer: Singapore, 2020; pp. 180–189. [Google Scholar] [CrossRef]
- Kang, M.; Shin, S.; Jung, J.; Kim, Y.T. Classification of Mental Stress Using CNN-LSTM Algorithms with Electrocardiogram Signals. J. Healthc. Eng. 2021, 2021, 9951905. [Google Scholar] [CrossRef]
- Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, E215–E220. [Google Scholar] [CrossRef] [Green Version]
- Schmidt, P.; Reiss, A.; Duerichen, R.; Marberger, C.; Van Laerhoven, K. Introducing WESAD, a Multimodal Dataset for Wearable Stress and Affect Detection. In Proceedings of the 20th ACM International Conference on Multimodal Interaction, Boulder, CO, USA, 16–20 October 2018; pp. 400–408. [Google Scholar] [CrossRef]
- Koldijk, S.; Sappelli, M.; Verberne, S.; Neerincx, M.A.; Kraaij, W. The SWELL Knowledge Work Dataset for Stress and User Modeling Research. In Proceedings of the 16th International Conference on Multimodal Interaction (ICMI ’14), Istanbul, Turkey, 12–16 November 2014; pp. 291–298. [Google Scholar] [CrossRef]
- Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nat. Methods 2020, 17, 261–272. [Google Scholar] [CrossRef] [Green Version]
- Akbaş, A. Evaluation of the physiological data indicating the dynamic stress level of drivers. SRE 2011, 6, 430–439. [Google Scholar] [CrossRef]
- Healey, J.A. Wearable and Automotive Systems for Affect Recognition from Physiology. Ph.D. Thesis, Massachusetts Institute of Technology, Boston, MA, USA, 2000. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv 2015, arXiv:1409.1556. [Google Scholar]
- Rastgoo, M.N.; Nakisa, B.; Maire, F.; Rakotonirainy, A.; Chandran, V. Automatic driver stress level classification using multimodal deep learning. Expert Syst. Appl. 2019, 138, 112793. [Google Scholar] [CrossRef]
- Hakimi, N.; Jodeiri, A.; Mirbagheri, M.; Setarehdan, S.K. Proposing a convolutional neural network for stress assessment by means of derived heart rate from functional near infrared spectroscopy. Comput. Biol. Med. 2020, 121, 103810. [Google Scholar] [CrossRef] [PubMed]
- Lee, J.; Lee, H.; Shin, M. Driving Stress Detection Using Multimodal Convolutional Neural Networks with Nonlinear Representation of Short-Term Physiological Signals. Sensors 2021, 21, 2381. [Google Scholar] [CrossRef]
- Cho, H.M.; Park, H.; Dong, S.Y.; Youn, I. Ambulatory and Laboratory Stress Detection Based on Raw Electrocardiogram Signals Using a Convolutional Neural Network. Sensors 2019, 19, 4408. [Google Scholar] [CrossRef] [Green Version]
- Zhang, P.; Li, F.; Zhao, R.; Zhou, R.; Du, L.; Zhao, Z.; Chen, X.; Fang, Z. Real-Time Psychological Stress Detection According to ECG Using Deep Learning. Appl. Sci. 2021, 11, 3838. [Google Scholar] [CrossRef]
- Ahmad, Z.; Khan, N. Multi-level Stress Assessment Using Multi-domain Fusion of ECG Signal. arXiv 2020, arXiv:2008.05503. [Google Scholar]
Subject | Used in This Work | Comments/Observations |
---|---|---|
drive01 | NO | No marker signal is provided. |
drive02 | NO | The marker signal has more than 8 peaks. |
drive03 | NO | No marker signal is provided. |
drive04 | NO | The peaks of the marker signal are not distinguishable. |
drive05 | PARTIALLY | We discarded the first two events(invalid signal values). |
drive06 | YES | N/A |
drive07 | YES | N/A |
drive08 | YES | N/A |
drive09 | NO | The marker signal has less than 8 peaks. |
drive10 | YES | N/A |
drive11 | YES | N/A |
drive12 | NO | Missing ECG signal data. |
drive13 | YES | N/A |
drive14 | YES | N/A |
drive15 | YES | N/A |
drive16 | NO | The marker signal has less than 8 peaks. |
drive17 | NO | Was not used because it is split in two parts. |
Classes | Initial Rest | City1 | Hwy1 | City2 | Hwy2 | City3 | Final Rest |
---|---|---|---|---|---|---|---|
2 | NO | YES | YES | YES | YES | YES | NO |
3 | LOW | HIGH | MODERATE | HIGH | MODERATE | HIGH | LOW |
Dataset | Low | Moderate | High | Total |
---|---|---|---|---|
DriveDB | 1800 (29.51%) | 1700 (27.87%) | 2600 (42.62%) | 6100 |
Arachnophobia | 5507 (23.67%) | 8882 (38.17%) | 8881 (38.17%) | 23270 |
Frequency (Hz) | SW | Classes | VGG Inspired | Single 1D CNN |
---|---|---|---|---|
100 | No | 2 | 0.939 ± 0.024 | 0.950 ± 0.012 |
100 | No | 3 | 0.764 ± 0.043 | 0.803 ± 0.009 |
100 | Yes | 2 | 0.963 ± 0.024 | 0.959 ± 0.018 |
100 | Yes | 3 | 0.804 ± 0.006 | 0.823 ± 0.008 |
496 | No | 2 | 0.972 ± 0.009 | 0.943 ± 0.019 |
496 | No | 3 | 0.802 ± 0.022 | 0.796 ± 0.023 |
496 | Yes | 2 | 0.983 ± 0.004 | 0.960 ± 0.008 |
496 | Yes | 3 | 0.822 ± 0.029 | 0.851 ± 0.016 |
Classes | VGG Inspired | Single 1D CNN |
---|---|---|
2 | 98.77% | 95.66% |
3 | 83.09% | 83.55% |
Class | Samples | Percentage |
---|---|---|
LOW | 460 | 30.26% |
MODERATE | 340 | 22.37% |
HIGH | 720 | 47.37% |
Models | DeepERNet | DeepECGNet | Single 1D Conv. | VGG Insp. |
---|---|---|---|---|
Accuracy (%) | 83.0 | 75.0 | 83.55 | 83.09 |
Window | 24,800 | 24,800 | 1488 | 1488 |
Frequency (Hz) | 496 | 496 | 496 | 496 |
Time (sec) | 50 | 50 | 3 | 3 |
Augmentation | no | no | yes | yes |
Signals | ECG & RSP | ECG | ECG | ECG |
Method | Accuracy (%) | Method | Data | Window Size | Classes |
---|---|---|---|---|---|
VGG insp. | 98.77 | CNN | ECG | 3 s | 2 |
[45] | 98.69 | CNN | HRF | 10 s | 2 |
[36] | 98.3 | CNN-LSTM | ECG | - | 2 |
[46] | 95.67 | CNN | HR and other | 30 s | 2 |
[47] | 90.19 | CNN | ECG | 10 s | 2 |
[16] | 89.8 | CNN | ECG | 60 s | 2 |
[32] | 87.39 | CNN-RNN | ECG | 10 s | 2 |
[33] | 83.9 | CNN | ECG and RSP | 50 s | 2 |
[31] | 82.7 | CNN | ECG | 10 s | 2 |
[44] | 92.8 | CNN-LSTM | ECG and other | 5 s | 3 |
[34] | 92.8 | CNN | ECG | 25 s | 3 |
[48] | 86.5 | CNN-BiLSTM | ECG | 10 s | 3 |
single 1D Conv. | 83.55 | CNN | ECG | 3 s | 3 |
[33] | 83.0 | CNN | ECG and RSP | 50 s | 3 |
[49] | 85.45 | CNN | ECG | 30 s | 5 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Tzevelekakis, K.; Stefanidi, Z.; Margetis, G. Real-Time Stress Level Feedback from Raw Ecg Signals for Personalised, Context-Aware Applications Using Lightweight Convolutional Neural Network Architectures. Sensors 2021, 21, 7802. https://doi.org/10.3390/s21237802
Tzevelekakis K, Stefanidi Z, Margetis G. Real-Time Stress Level Feedback from Raw Ecg Signals for Personalised, Context-Aware Applications Using Lightweight Convolutional Neural Network Architectures. Sensors. 2021; 21(23):7802. https://doi.org/10.3390/s21237802
Chicago/Turabian StyleTzevelekakis, Konstantinos, Zinovia Stefanidi, and George Margetis. 2021. "Real-Time Stress Level Feedback from Raw Ecg Signals for Personalised, Context-Aware Applications Using Lightweight Convolutional Neural Network Architectures" Sensors 21, no. 23: 7802. https://doi.org/10.3390/s21237802