Abstract
Background:
Stress, a widespread mental health concern, significantly impacts people well-being and performance. This study proposes a novel approach to stress detection by fusing cardiovascular and respiratory data.
Methods:
Fifteen participants underwent a mental stress induction task while their electrocardiogram (ECG) and respiration signals were recorded. A real-time peak detection algorithm was developed for ECG signal processing, and both time and frequency domain features were extracted from ECG and respiration signals. Various machine learning models, including Support Vector Machine, K-Nearest Neighbors, bagged decision trees, and random forests, were employed for classification, with accurate labeling achieved through the NASA-TLX questionnaire.
Results:
The results demonstrate that combining respiration and cardiovascular features significantly enhances stress classification performance compared to using each modality alone, achieving an accuracy of 95.6% ±1.7%. Forward feature selection identifies key discriminative features from both modalities.
Conclusions:
This study demonstrates the efficacy of multimodal physiological data integration for accurate stress detection, outperforming single-modality approaches and comparable studies in the literature. The findings highlight the potential of real-time monitoring systems in enhancing stress and health management.
Keywords: Electrocardiogram, machine learning, peak detection, respiration, stress classification
Introduction
Stress is the response of the body characterized by heightened anxiety or pressure when encountering challenging circumstances. In clinical terms, stress denotes a psychological and physiological state associated with significant discomfort and distress.[1] According to the World Health Organization, stress is a mental health issue impacting the lives of approximately one in every four individuals.[2]
Stressors are events or conditions that can induce stress in individuals. The effects of stress can lead to both positive (termed “good”) and negative (termed “bad”) outcomes, depending on how individuals cope with them. Distress, characterized by anxiety or heightened concern, represents stress with unfavorable consequences. It can be brief or persistent. The effects of distress may include decreased performance and reduced mental clarity. Common sources of distress include fear, worry about future events, recurrent negative thoughts, unrealistic expectations, over-commitment, poor planning, excessive job demands, job insecurity, and difficulty asserting oneself. Personal stressors, such as the loss of a family member, illness, financial problems, unemployment, sleep disturbances, and legal issues, can also trigger stress. Therefore, early detection of distress is crucial, as it can have a significant impact on individuals’ lives.[3]
Currently, only medical and physiological professionals have the capability to ascertain whether an individual is experiencing a state of depression (stress) or not. One conventional approach to identifying stress involves the use of questionnaires.[4] The detection of stress is important not only for research and empirical investigations but also for nonclinical applications. For instance, such systems can be utilized by individuals working in stressful environments to assess occupational stress levels.[5] In such systems, real-time stress detection can be applied for biofeedback purposes, helping to mitigate the negative effects of stress. Standardized protocols are essential for conducting reliable and credible studies on stress induction. These protocols are categorized into three groups: physical, psychological, and mixed stressors, each with distinct physiological effects on the human body. These protocols are utilized in various applications and research studies to explore different aspects of stress.[6] The Montreal Imaging Stress Task (MIST) is widely used as a psychological stressor technique in stress assessment studies. In the MIST, participants engage in mental arithmetic calculations under stressful conditions while their responses are monitored and assessed.[7,8] In addition, the Paced Auditory Serial Addition Test is a widely recognized cognitive assessment tool commonly employed in neuropsychological assessments and investigations into stress.[9]
The autonomic nervous system (ANS) is responsible for regulating involuntary bodily functions such as heart rate (HR), blood circulation, and breathing. It consists of two branches: the sympathetic nervous system (SNS) and the parasympathetic nervous system (PNS). Stress triggers the SNS, leading to an increase in cortisol levels.[10] In addition, during acute stress, the SNS heightens HR, respiration, sweat gland activity, and other physiological responses. Once the stressor dissipates, the PNS counteracts the stress response.[11] Consequently, monitoring cardiac and respiratory activities provide valuable insights into assessing the state of the ANS.
Heart rate variability (HRV) serves as a noninvasive method for assessing ANS function. It refers to the variations in the time intervals between heartbeats, which are influenced by the ANS. The gold standard method for tracking HRV involves analyzing the inter-beat intervals (IBIs) measured using an electrocardiogram (ECG) device. The standard power spectrum includes primary frequency components: the low-frequency component (LF: 0.04–0.15 Hz), influenced by both sympathetic and parasympathetic systems, and the high-frequency component (HF: 0.15–0.4 Hz), indicative of respiratory sinus arrhythmia and predominantly regulated by parasympathetic activity.[12]
Respiration, the rhythmic act of inhaling oxygen and exhaling carbon dioxide, is fundamental to human physiology. When faced with stressors, the body’s ANS initiates a “fight-or-flight” response, which results in a series of physiological changes, including shallow breathing.[13] This altered respiratory pattern can, in turn, exacerbate stress symptoms, creating a cyclical feedback loop that contributes to feelings of anxiety and panic. Understanding this intricate relationship between stress and respiration is crucial, as it underscores the importance of stress management techniques such as deep breathing exercises and mindfulness practices in maintaining both physical and mental well-being.[14]
The detection of stress is widely discussed in literature due to its significant impact on societal well-being. The physiological signals commonly used in stress detection approaches include HR,[15,16] HRV, skin temperature,[17,18] skin conductance (also known as galvanic skin response),[19] blood pressure,[20] and respiration rate (RR).[21,22] In this study, features are extracted from HR, HRV, and respiration signals to investigate the effectiveness of a multimodal approach in accurately detecting stress and reducing the potential bias associated with single-modality methods. The subsequent sections of the paper cover the following topics. Section 2 introduces the materials and methods, followed by the presentation of stress classification results in Section 3. Finally, Section 4 contains the discussion and conclusions of the paper.
Materials and Methods
Participants
The study involved 15 healthy, right-handed males and females with an average age of 25 ± 5. The respiration and ECG signals were recorded simultaneously [Table 1]. According to self-report, none of the participants had psychological, cardiac, or respiratory conditions, nor were they taking any medication. Before the experiment, participants were thoroughly informed about the study procedures and their right to withdraw at any time without penalty, and subsequently provided written consent. After task completion, they underwent a debriefing session to alleviate any remaining stress and were given the opportunity to express concerns or ask questions. Furthermore, this research has an ethics code with the number IR.UT.SPORT.REC.1403.037 issued by the research ethics committees of the University of Tehran, faculty of sports sciences and health.
Table 1.
Demographic characteristics of study participants
| Characteristic | Value |
|---|---|
| Number of participants | 15 |
| Gender distribution | |
| Female | 7 |
| Male | 8 |
| Age (years), mean±SD | 25±5 |
SD – Standard deviation
Data acquisition protocol
ECG and respiration signals were recorded during the experimental phases. The ECG signal was captured using the ProtoCentral MAX86150 sensor, which requires two electrodes placed on the participant’s chest and in this experiment, ECG lead (I) was used. The device operates at a sampling frequency of 200 Hz. For recording respiration signals, a chest-band of type tension-based mechanism was utilized. This sensor is set in the participant’s waist, positioned between the abdomen and chest. The sampling frequency was set at 10 Hz. Participants are instructed to remain still during the experiment to minimize movement noise and prevent motion artifacts.
Task sequence
Before starting the test, all participants were administered the State-Trait Anxiety Inventory-trait questionnaire to assess their anxiety levels, a common practice in research to monitor distress.[23] In this experiment, participants completed four 2-min test phases involving mental arithmetic operations. The tests utilized mental calculation questions, and each phase was divided into three levels. The number of questions was not predetermined. Participants had 2 min to answer as many questions as possible based on their ability. It consists of the following levels:
Easy level: Comprised of two operands (two-digit numbers) and one operator (addition or subtraction)
Medium level: Consisted of three operands (two-digit numbers) and two operators (addition or subtraction)
The difficult level is structured with three operands (single-digit, two-digit, or three-digit numbers) and two operators (operator 1: multiplication, operator 2: subtraction or addition)
In the final stage, questions from the three upper levels are randomly presented
The sequence of three upper levels (easy, medium, and hard) is randomly determined during the experiment. Participants are unaware of the level displayed at any given moment, meaning participants will answer questions corresponding to a specific level. Following each 2-min phase of the experiment, there is an immediate 2-min rest period. Participants who underwent the instructional phase must fill out a questionnaire immediately after the test phase to assess their mental state (level of stress). The NASA-Task Load Index questionnaire is utilized for this purpose. The block diagram of the task is shown in Figure 1.
Figure 1.
Block diagram of the montreal imaging stress task test. It consists of three levels–easy, medium, and hard–each lasting for 2 min and separated by a 2-min rest phase. The order of these phases is randomized, and a final random phase, which includes a mix of questions from the previous levels, is presented for 2 min. NASA-TLX – NASA task load index
Immediately after each arithmetic task (categorized as easy, medium, hard, and random), subjects were asked to complete the NASA TLX questionnaire to assess their perceived workload. The NASA-TLX is a tool used to measure the perceived workload of a task through multiple dimensions. The total workload for each task was divided into six subcategories: mental demand, physical demand, temporal demand, performance, effort, and frustration. For each task, subjects rated each subcategory on a scale from 0 to 100. These ratings were then averaged to produce a score for each task. The average score serves as an estimate of the overall workload associated with each task.[24] The scores obtained from these questionnaires were then used to label the stress levels of each subject. Specifically, the NASA TLX scores for each subject were sorted in ascending order. The lowest score, indicating the least perceived workload, was labeled as “no-stress,” while the highest score, representing the greatest perceived workload, was labeled as “stress.”[25]
Signal processing
The approach utilized to achieve the study objectives involves two main components, as shown in Figure 2: (I) preprocessing both ECG and respiration signals to extract HRV and RR, and (II) stress classification.
Figure 2.
The schematic illustrates the signal processing methods used for stress assessment, divided into two primary sections: cardiovascular and respiratory signal processing, and stress classification. Additionally, the electrocardiogram signal from one participant is displayed before and after preprocessing steps to demonstrate the effectiveness of the applied techniques. PCA – Principal component analysis; SVM – Support vector machine; KNN – K-nearest neighbors
Preprocessing
To extract HRV from the ECG signal, it is essential to eliminate artifacts, noise, and other unrelated frequency components. A low-pass Butterworth zero-phase filter with a cutoff frequency of 26 Hz is applied to accurately extract R peaks from the PQRST complex. The procedure for online identification of R peaks within the PQRST complex involves employing a window-based algorithm. Before peak detection, a moving average filter with a window size of 0.04 s is applied to reduce noise. During peak detection, a peak is identified if its value exceeds the average value of the surrounding 0.125-s interval. In addition, to eliminate local peaks such as the P and T peaks within the PQRST complex, the peak value has to surpass a threshold defined as the standard deviation of the neighboring points multiplied by a hyperparameter ℎ. The procedure for localizing R peaks from the ECG signal is summarized in Algorithm 1. Following the extraction of R peaks from the ECG signal, HR is determined from the time interval between two successive peaks. HRV is then extracted by measuring the time-varying nature of the HR signal.
Algorithm 1.
R detection from filtered ECG signal
| Input: Filtered ECG signal, Hyper-parameter h, window size N | |
|---|---|
|
| |
| Output: Index of each peak J | |
| 1. | J [] |
| 2. | for i = N +1 to Length(x(n))-N do |
| 3. | window ← [x(i-N:I-1); x(i+1:I+N)]; |
| 4. | % window is N neighbors left and N neighbors right of x(i) |
| 5. | avg_window ← mean(window); |
| 6. | sd_window ← std(window); |
| 7. | threshold ← avg_window+h * sd_window; |
| 8. | if x(i)> threshold then |
| 9. | % new peak is detected |
| 10. | J ← [J i]; % append it to list |
| 11. | end if |
| 12. | end for |
| 13. | return J |
The respiratory signal obtained from the chest band sensor undergoes processing that involves the use of a smoothing filter to eliminate power line noise and higher frequency interference. This is accomplished by applying a moving average filter with a window size of 3 s. Following this filtering step, peaks and troughs in the signal are accurately extracted using a straightforward peak detection technique, where a peak or trough is identified based on whether its value exceeds or falls below that of its neighboring points, respectively.
Stress classification
In this study, features are extracted from both the HRV and respiratory signal. To identify features with lower correlation and facilitate feature conditioning and reduction, principal component analysis is applied. The ECG signal is divided into 10-s windows with a 75% overlap, similar to the approach used in the article,[26] which demonstrated that a 75% overlap is effective for feature extraction. This overlap increases the sample size for machine learning, enhances temporal resolution, and results in smoother transitions in the extracted features.[27] The respiration signal is segmented into 20-s windows using the same 75% overlap.
The features extracted from the IBI encompass both time and frequency domain metrics, each serving distinct purposes in assessing HRV. The mean (mt) HR within the window provides a baseline indicator of cardiovascular activity. The second statistical moment (stdt) of HR reflects the variability of IBI. Metrics such as root mean square (RMS) of successive differences (RMSSD) and standard deviation of successive differences (SDSD) are indices of parasympathetic activity and short-term variability, respectively, providing insights into ANS dynamics. The percentage of successive intervals that differ by more than 50 ms (PNN50) quantifies short-term variability and can indicate cardiac health.[28] The ratio SD2/SD1 characterizes the nonlinear dynamics of HR fluctuations, offering deeper insights into the complexity and adaptability of the cardiovascular system. In the frequency domain analysis of HRV, the LF and HF spectral components are utilized to assess ANS activity. The LF component represents a mix of sympathetic and parasympathetic influences, while the HF component predominantly reflects parasympathetic activity. The LF/HF ratio is employed as an indicator of sympathovagal balance, providing insights into the autonomic regulation of cardiovascular function.[29] The details of the extracted HRV features are presented in Table 2. Where xi∣ (for i = 1,…,N) represents the HRV signal that has been windowed with a specific length N.
Table 2.
Features extracted from both the time and frequency domains of the heart rate variability signal
| Features | Description |
|---|---|
| Time domain | |
| mt |
|
| stdt |
|
| RMSSD (ms) |
|
| SDSD (ms) |
|
|
|
| PNN50 |
|
| Frequency domain | |
| LF | power of HRV in the [0.04Hz-0.15Hz] band |
| HF | power of HRV in the [0.15Hz-0.4Hz] band |
| LF/HF |
|
RMSSD – Root mean square of successive differences; SDSD – Standard deviation of successive differences; LF – Low frequency; HF – High frequency; RR – Respiration rate; HRV – Heart rate variability
Selecting appropriate features from respiration signals for stress classification is crucial due to individual variations in respiratory behavior. For instance, respiratory rate can vary significantly among individuals, which poses challenges for general machine learning models. To mitigate this issue, features such as the standard deviation and RMS of respiration provide insights into the diversity and intensity of breathing patterns, capturing stress-induced changes irrespective of baseline differences. Attributes such as respiratory fundamental frequency and power spectrum reveal dominant frequency components and energy distribution in breathing, reflecting stress-induced alterations in respiratory dynamics. Similarly, features such as average inhalation and exhalation duration and inhalation-to-exhalation phase ratios highlight changes in breathing dynamics under stress, including disruptions in balance, altered phase durations, and shifts in inhalation-to-exhalation ratios that signify physiological responses to stress. These carefully selected features offer valuable discriminative information for stress classification despite individual variations in baseline respiratory parameters. The details of the extracted respiratory features are presented in Table 3. Where Rt (for t = 1,…,T) represents the signal of the raw respiration sensor while RRi (for t = 1,…,N) represents the respiration rate (RR).
Table 3.
Features extracted from both the time and frequency domains of the respiration signal
| Features | Description |
|---|---|
| Time domain | |
| sdrr |
|
| rms_diffrr |
|
| sdr |
|
| rmsr |
|
| inhale_meanr |
|
| exhale_meanr |
|
| inhale_sdr |
|
| exhale_sdr |
|
| |
| Frequency domain | |
| main_freq | frequency of maximum power spectral density in [0.05Hz-0.5Hz] band |
| power spectrumr |
|
RR – Respiration rate; RMS – Root mean square
It is crucial to identify and manage outliers after feature extraction to ensure the accuracy and reliability of data analysis. Outliers can originate from measurement errors, physiological irregularities, or external factors, emphasizing the need for robust outlier detection and handling techniques. In this study, Local Outlier Factor (LOF)[30] is applied to each sample using the 50 nearest neighbors to calculate outlier scores. Samples identified as outliers by LOF are subsequently omitted from the dataset to enhance data quality and preserve the integrity of subsequent analyses.
Results
Optimization of proposed peak detection hyper parameter
The proposed peak detection algorithm includes “h” as a hyperparameter. To fine-tune this parameter quantitatively, the Critical Success Index (CSI), as described in (1) and similarly utilized in,[31] was examined. Values of “h” ranging from 0.9 to 2.1 with a step size of 0.2 were tested, and the highest CSI was achieved at h = 1.7.
In this context, TP (True Positive), FN (False Negative), and FP (False Positive) represent correctly detected, missed, and incorrectly detected peak, respectively.
Figure 3 depicts the differences in HRV between stress-labeled conditions (shown on the right) and no-stress-labeled conditions (shown on the left). During stress-labeled conditions, HRV variation is more pronounced, and there is a noticeable increase in total HR.
Figure 3.

An instance of electrocardiogram waveform with detected peaks and heart rate variability signals observed in both stressful and nonstressful scenarios. ECG – Electrocardiogram; HRV – Heart rate variability
This pattern is consistent with findings from clinical research on cardiovascular mental stress testing and the broader neuroscience literature. Specifically, arithmetic tasks are known to induce high cardiovascular reactivity, which includes increased HR and reduced HRV.[32] These physiological responses make cardiovascular sensing a reliable method for differentiating between stress and no-stress conditions.
In stressful conditions, the RR increases, and the duration of both inhalation and exhalation periods decrease. This observation is consistent with findings in the other literature.[33] Figure 4 depicts the respiration signal after applying a smoothing filter, highlighting the corresponding peaks and troughs, which represent inhalation and exhalation phases.
Figure 4.

respiration signals with identified peaks and troughs observed under both stress and nonstress conditions
NASA-TLX scores
Figure 5 shows the NASA TLX scores for each task. Subsequent pairwise comparisons using the Nemenyi post hoc test revealed significant differences between the hard and easy tasks (P < 0.001). No significant differences were observed between the random and medium tasks, the easy and medium tasks, or the hard and medium tasks. Therefore, for robust classifier training, the easy and hard tasks were used to label no stress and stress conditions, respectively.
Figure 5.

NASA-TLX scores are presented for arithmetic tasks across different difficulty levels: easy, medium, hard and ranndom. There is statistical significance (P < 0.001) between the Easy and Hard conditions. NASA-TLX – NASA task load index
The feature matrix was created by incorporating all extracted features along with the corresponding class labels (no-stress and stress). This matrix consisted of instances represented by rows and features by columns, serving as the foundation for developing the classification model. To enhance the accuracy of the model by excluding irrelevant features, a feature selection process was implemented. Forward Selection was utilized, a method that begins with an empty model and iteratively adds features that offer the most significant improvement to the model. The initial significant features identified through this process included HRV measures such as SDSD and LF power, along with respiratory features including RMS of the respiration signal, standard deviation of the respiration signal, respiratory power spectrum and main frequency of the respiration signal.
Classification results
For a quantitative evaluation of classification performance, a 10-fold cross-validation approach was employed. The models used in this study included Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Bagged Tree. These models are trained using three different feature sets: features derived from respiration data only, features derived from cardiovascular data only, and a fusion of features from both physiological signals to compare the effectiveness of multimodal stress classification. The evaluation metrics, including accuracy, precision, recall, and F1 scores, are presented in Table 4. The results indicate that the Bagged Tree and KNN models outperformed the other models. In addition, the fusion data produced more promising and superior results compared to using cardiovascular data and respiration data.
Table 4.
The results of stress classification using various classifiers are presented, with accuracy, precision, recall, and F1 score metrics reported for three different feature sets: Features derived from cardiovascular signals heart rate variability, features derived from respiration signals, and a fusion of features from both physiological signals
| Random forest | SVM | |||||
|---|---|---|---|---|---|---|
|
|
|
|||||
| Respiration | ECG | Fusion | Respiration | ECG | Fusion | |
| Accuracy | 65.7±3.9 | 72.7±3.4 | 76.3±2.1 | 74.1±4.7 | 86.9±2.9 | 89.9±2.9 |
| Precision | 64.2±4.1 | 71.2±2.4 | 74.1±2.6 | 74.3±4.8 | 86.2±3.0 | 87.3±3.2 |
| Recall | 65.6±3.8 | 73.5±1.9 | 75.7±2.8 | 75.4±4.6 | 88.5±2.7 | 89.1±3.0 |
| F1 score | 64.9±4.5 | 72.3±2.0 | 75.0±2.5 | 74.9±4.9 | 87.3±3.2 | 90.9±2.2 |
|
| ||||||
| KNN | Bagged tree | |||||
|
|
|
|||||
| Respiration | ECG | Fusion | Respiration | ECG | Fusion | |
|
| ||||||
| Accuracy | 76.3±4.8 | 88.4±2.2 | 93.9±1.7 | 88.3±4.7 | 89.9±1.9 | 95.6±1.7 |
| Precision | 75.2±4.9 | 88.8±2.2 | 93.5±1.8 | 86.4±5.3 | 88.0±2.4 | 94.1±1.9 |
| Recall | 78.9±5.1 | 89.8±2.1 | 94.6±1.5 | 88.9±5.7 | 90.3±2.5 | 95.7±2.1 |
| F1 score | 77.1±3.9 | 89.3±2.1 | 94.1±1.5 | 87.7±5.5 | 89.1±2.4 | 94.7±2.3 |
ECG – Electrocardiogram; SVM – Support vector machine; KNN – K-nearest neighbors
For further illustration, the results of the Bagged Tree model for stress classification using three types of datasets (respiration, heart, fusion) are depicted in Figure 6. According to the Friedman test followed by the Nemenyi post hoc test, the fusion of respiration and cardiovascular data produced significantly higher accuracy results compared to using respiration data alone (P < 0.001) and cardiovascular data alone (P < 0.001).
Figure 6.

Performance metrics summary for classifier outputs across each sensing modality. ECG – Electrocardiogram
Discussions and Conclusions
In this study, concurrent ECG and respiration data were recorded to investigate the efficacy of various features and classification models in stress detection. A real-time peak detection algorithm was developed for ECG signals, and its hyperparameters were meticulously tuned to ensure accurate identification of R peaks within the PQRST complex while effectively filtering out local maxima that could lead to FP. Particular importance was placed on the selection of the h parameter, which was found to be crucial for reliable peak detection. Through experimentation, it was determined that the optimal range for h lies between 0.9 and 2.1. Values below 0.9 resulted in the detection of additional, incorrect peaks, whereas values above 2.1 led to missed peaks, significantly degrading the CSI score. As a result, the search space was narrowed to this range, and the best performance was achieved at h = 1.7. Minimal variation in performance was observed for values close to 1.7, while parameters outside this range produced unacceptable outcomes. For the respiration data, peaks and troughs were extracted from the chest band signals, enabling the precise identification of inhalation and exhalation phases.
For added clarity, Figure 7 presents HRV and respiration signals over the course of the task, with stress periods highlighted in pink and rest periods indicated with a white background. As expected, HR increased while the IBI decreased during the stress-inducing task. In addition, significant changes in respiration patterns, including variations in inhalation and exhalation, were evident during the task periods. This observation aligns with the findings of article,[34] which state that during stress, the SNS (associated with the body’s “fight or flight” response) becomes more active, resulting in an increased HR and decreased HRV. At the same time, the para-SNS (responsible for relaxation and recovery) becomes less active, further contributing to the reduction in HRV.
Figure 7.

Heart rate variability and respiration signal over time. This figure displays the inter-beat interval (IBI) and respiration signal for a participant during the biofeedback study. The top graph shows fluctuations in IBI over time, while the bottom graph depicts variations in the respiration signal. The pink-shaded areas indicate periods of induced stress. IBI – Inter beat interval
Both time and frequency domain features were extracted from the ECG and respiration signals. These features included critical parameters such as HRV metrics and respiratory characteristics. To evaluate the classification performance, models including SVM, KNN, bagged decision trees, and random forests were trained and tested using cross-validation methods to ensure robustness and generalizability. The MIST was administered to 15 subjects, and the collected data were analyzed in three different configurations: cardiovascular data alone, respiration data alone, and a combination of both (fusion). The results highlighted that the fusion of respiration and cardiovascular features significantly improved stress classification metrics, including accuracy, precision, recall, and the F1 score. Furthermore, the study revealed that classification performance using cardiovascular data alone was notably higher than when using only respiratory data. This finding was substantiated by statistical analysis, indicating a significant difference in the efficacy of the two data types. The effect of feature importance from both HRV and respiration was investigated using forward feature selection. This method involves iteratively adding features to the model based on their contribution to the classification performance, allowing for the identification of the most critical features. The analysis revealed that the most important features for stress classification included SDSD (the SDSD differences between adjacent NN intervals) and LF power from HRV. These HRV features are known to reflect ANS activity, with SDSD providing insights into short-term variability and LF power indicating the balance between sympathetic and parasympathetic activity. From the respiration data, key features identified were the RMS of the respiration signal, respiration standard deviation, power spectrum, and main frequency. These features capture essential aspects of the respiratory pattern, such as its variability and the distribution of power across different frequency bands, which are influenced by stress. The findings indicate that both HRV and respiration features significantly contribute to the accurate classification of stress. This result is consistent with other studies on stress classification, such as those presented in articles[35] which also highlight the importance of both HRV and respiratory features. The proposed method achieved an accuracy of 95.6% ±1.7% for classifying stress versus nonstress situations, outperforming other similar studies that also used the fusion of respiration and ECG for stress classification.[36] This high accuracy underscores the effectiveness of the selected features and the robust integration of multimodal physiological data.
Limitations and future work
While the fusion of ECG and respiration features yielded promising results, several limitations and areas for improvement remain. First, the study focused on a relatively small sample size (15 subjects), which may not fully capture the diversity of stress responses across different populations. Expanding the participant pool and considering factors such as age, gender, and health conditions could enhance generalizability. The peak detection algorithm used in this study performed well in nonartifactual situations. Therefore, it is essential to examine the performance of this algorithm on artifactual datasets to ensure its robustness and reliability in diverse conditions. In addition, the study primarily explored linear classifiers (SVM, KNN, etc.), but more complex models like deep learning architectures (e. g., CNNs) should be investigated. These neural networks can automatically learn relevant features from raw data, potentially improving classification accuracy. Furthermore, the proposed method relied on supervised learning; exploring unsupervised or semi-supervised approaches could provide insights into stress patterns without labeled data. Finally, integrating real-time biofeedback mechanisms for stress management based on the detected physiological responses could be a valuable application.[37,38,39]
Conflicts of interest
There are no conflicts of interest.
Funding Statement
Nil.
References
- 1.Gedam S, Paul S. A review on mental stress detection using wearable sensors and machine learning techniques. IEEE Access. 2021;9:84045–66. [Google Scholar]
- 2.Sayers J. The World Health Report. 2001: Mental Health:New Understanding, New Hope. Bull World Health Organ. 2001;79:1085. [Google Scholar]
- 3.Singh SA, Kumar Gupta P, Rajeshwari M, Janumala T. Detection of stress using biosensors. Mater Today Proc. 2018;5:21003–10. [Google Scholar]
- 4.Deng Y, Wu Z, Chu CH, Zhang Q, Hsu DF. Sensor feature selection and combination for stress identification using combinatorial fusion. Int J Adv Robot Syst. 2013;10:306. [Google Scholar]
- 5.Tsutsumi A, Kayaba K, Ishikawa S. Impact of occupational stress on stroke across occupational classes and genders. Soc Sci Med. 2011;72:1652–8. doi: 10.1016/j.socscimed.2011.03.026. [DOI] [PubMed] [Google Scholar]
- 6.Hakimi N, Setarehdan SK. Stress assessment by means of heart rate derived from functional near-infrared spectroscopy. J Biomed Opt. 2018;23:1–12. doi: 10.1117/1.JBO.23.11.115001. [DOI] [PubMed] [Google Scholar]
- 7.Dedovic K, D'Aguiar C, Pruessner JC. What stress does to your brain:A review of neuroimaging studies. Can J Psychiatry. 2009;54:6–15. doi: 10.1177/070674370905400104. [DOI] [PubMed] [Google Scholar]
- 8.Tolba A, Al-Makhadmeh Z, Hussein A. Montreal imaging stress task based human stress and strain analysis using image processing techniques. J Med Imaging Health Inform. 2018;8:775–80. [Google Scholar]
- 9.Tanosoto T, Arima T, Tomonaga A, Ohata N, Svensson P. A paced auditory serial addition task evokes stress and differential effects on masseter-muscle activity and haemodynamics. Eur J Oral Sci. 2012;120:363–7. doi: 10.1111/j.1600-0722.2012.00973.x. [DOI] [PubMed] [Google Scholar]
- 10.Electrophysiology, Task Force of the European Society of Cardiology the North American Society of Pacing. Heart rate variability:standards of measurement, physiological interpretation, and clinical use. Circulation. 1996;93:1043–65. [PubMed] [Google Scholar]
- 11.Hellhammer DH, Wüst S, Kudielka BM. Salivary cortisol as a biomarker in stress research. Psychoneuroendocrinology. 2009;34:163–71. doi: 10.1016/j.psyneuen.2008.10.026. [DOI] [PubMed] [Google Scholar]
- 12.Hegde VN, Deekshit R, Satyanarayana PS. A review on ECG signal processing and HRV analysis. J Med Imaging Health Inform. 2013;3:270–9. [Google Scholar]
- 13.Bernardi L, Wdowczyk-Szulc J, Valenti C, Castoldi S, Passino C, Spadacini G, et al. Effects of controlled breathing, mental activity and mental stress with or without verbalization on heart rate variability. J Am Coll Cardiol. 2000;35:1462–9. doi: 10.1016/s0735-1097(00)00595-7. [DOI] [PubMed] [Google Scholar]
- 14.Perciavalle V, Blandini M, Fecarotta P, Buscemi A, Di Corrado D, Bertolo L, et al. The role of deep breathing on stress. Neurol Sci. 2017;38:451–8. doi: 10.1007/s10072-016-2790-8. [DOI] [PubMed] [Google Scholar]
- 15.Can YS, Chalabianloo N, Ekiz D, Fernandez-Alvarez J, Riva G, Ersoy C. Personal stress-level clustering and decision-level smoothing to enhance the performance of ambulatory stress detection with smartwatches. IEEE Access. 2020;8:38146–63. [Google Scholar]
- 16.De Santos Sierra A, Sanchez Avila C, Guerra Casanova J, Bailador Del Pozo G. A stress-detection system based on physiological signals and fuzzy logic. IEEE Trans Ind Electron. 2011;58:4857–65. [Google Scholar]
- 17.Setiawan R, Budiman F, Basori WI. 2019 International Seminar on Intelligent Technology and Its Applications ISITIA. Surabaya, Indonesia: IEEE; 2019. [[Last accessed on 2024 Sep 08]]. Stress Diagnostic System and Digital Medical Record Based on Internet of Things; pp. 348–53. Available from: https://ieeexplore.ieee.org/document/8937273/ [Google Scholar]
- 18.Gjoreski M, Luštrek M, Gams M, Gjoreski H. Monitoring stress with a wrist device using context. J Biomed Inform. 2017;73:159–70. doi: 10.1016/j.jbi.2017.08.006. [DOI] [PubMed] [Google Scholar]
- 19.Villarejo MV, Zapirain BG, Zorrilla AM. A stress sensor based on galvanic skin response (GSR) controlled by ZigBee. Sensors (Basel) 2012;12:6075–101. doi: 10.3390/s120506075. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Chauhan M, Vora SV, Dabhi D. 2017 International Conference on Innovations in Information, Embedded and Communication Systems ICIIECS. Coimbatore: IEEE; 2017. [[Last accessed on 2024 Sep 08]]. Effective Stress Detection Using Physiological Parameters; pp. 1–6. Available from: https://ieeexplore.ieee.org/document/8275853/ [Google Scholar]
- 21.Ghaderi A, Frounchi J, Farnam A. 2015 22nd Iranian Conference on Biomedical Engineering ICBME. Tehran, Iran: IEEE; 2015. [[Last accessed on 2024 Sep 08]]. Machine Learning-Based Signal Processing Using Physiological Signals for Stress Detection; pp. 93–8. Available from: https://ieeexplore.ieee.org/document/7404123/ [Google Scholar]
- 22.Kontaxis S, Lazaro J, Hernando A, Arza A, Garzon JM, Gil E, et al. Mental Stress Detection Using Cardiorespiratory Wavelet Cross:Bispectrum. 2016. [[Last accessed on 2024 Sep 08]]. Available from: https://www.cinc.org/archives/2016/pdf/211-454.pdf .
- 23.Ugalde A, Krishnasamy M, Schofield P. The relationship between self-efficacy and anxiety and general distress in caregivers of people with advanced cancer. J Palliat Med. 2014;17:939–41. doi: 10.1089/jpm.2013.0338. [DOI] [PubMed] [Google Scholar]
- 24.Hart SG. Nasa-Task Load Index (NASA-TLX);20 years later. Proc Hum Factors Ergon Soc Annu Meet. 2006;50:904–8. [Google Scholar]
- 25.Gurel NZ, Jung H, Hersek S, Inan OT. Fusing near-infrared spectroscopy with wearable hemodynamic measurements improves classification of mental stress. IEEE Sens J. 2019;19:8522–31. doi: 10.1109/jsen.2018.2872651. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Biran A, Jeremic A. ECG Based Human Identification Using Short Time Fourier Transform and Histograms of Fiducial QRS Features:Proceedings 13th International Conference on Bio-Inspired Systems and Signal Processing. Valletta, Malta: SCITEPRESS –Science and Technology Publications;International Conference on Bio-Inspired Systems and Signal Processing; 2020. [[Last accessed on 2025 Jan 08]]. pp. 324–9. Available from: https://www.scitepress.org/DigitalLibrary/Link.aspx?doi=10.5220/0009168303240329 . [Google Scholar]
- 27.Rajendran J, Wilson Sukumari N, Jose PS, Rajendran M, Saikia MJ. Development of self-powered energy-harvesting electronic module and signal-processing framework for wearable healthcare applications. Bioengineering (Basel) 2024;11:1252. doi: 10.3390/bioengineering11121252. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Shaffer F, Ginsberg JP. An overview of heart rate variability metrics and norms. Front Public Health. 2017;5:258. doi: 10.3389/fpubh.2017.00258. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Castaldo R, Montesinos L, Melillo P, James C, Pecchia L. Ultra-short term HRV features as surrogates of short term HRV:A case study on mental stress detection in real life. BMC Med Inform Decis Mak. 2019;19:12. doi: 10.1186/s12911-019-0742-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Breunig MM, Kriegel HP, Ng RT, Sander J. LOF:Identifying density-based local outliers. ACM SIGMOD Rec. 2000;29:93–104. [Google Scholar]
- 31.Hakimi N, Shahbakhti M, Sappia S, Horschig JM, Bronkhorst M, Floor-Westerdijk M, et al. Estimation of respiratory rate from functional near-infrared spectroscopy (fNIRS):A new perspective on respiratory interference. Biosensors (Basel) 2022;12:1170. doi: 10.3390/bios12121170. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Castaldo R, Melillo P, Bracale U, Caserta M, Triassi M, Pecchia L. Acute mental stress assessment via short term HRV analysis in healthy adults:A systematic review with meta-analysis. Biomed Signal Process Control. 2015;18:370–7. [Google Scholar]
- 33.Grassmann M, Vlemincx E, von Leupoldt A, Mittelstädt JM, Van den Bergh O. Respiratory changes in response to cognitive load:A systematic review. Neural Plast. 2016;2016:8146809. doi: 10.1155/2016/8146809. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Järvelin-Pasanen S, Sinikallio S, Tarvainen MP. Heart rate variability and occupational stress-systematic review. Ind Health. 2018;56:500–11. doi: 10.2486/indhealth.2017-0190. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Karthikeyan P, Murugappan M, Yaacob S. Detection of human stress using short-term ecg and HRV signals. J Mech Med Biol. 2013;13:1350038. [Google Scholar]
- 36.Seo W, Kim N, Kim S, Lee C, Park SM. Deep ECG-respiration network (DeepER Net) for recognizing mental stress. Sensors (Basel) 2019;19:3021. doi: 10.3390/s19133021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Wu W, Zhang H, Pirbhulal S, Mukhopadhyay SC, Zhang YT. Assessment of biofeedback training for emotion management through wearable textile physiological monitoring system. IEEE Sens J. 2015;15:7087–95. [Google Scholar]
- 38.Umair M, Chalabianloo N, Sas C, Ersoy C. HRV and stress:A mixed-methods approach for comparison of wearable heart rate sensors for biofeedback. IEEE Access. 2021;9:14005–24. [Google Scholar]
- 39.Loudon G, Zampelis D, Deininger G. Proceedings of the 2017 ACM SIGCHI Conference on Creativity and Cognition. Singapore Singapore: ACM; 2017. [[Last accessed on 2024 Sep 08]]. Using Real-time Biofeedback of Heart Rate Variability Measures to Track and Help Improve Levels of Attention and Relaxation; pp. 348–55. Available from: https://dl.acm.org/doi/10.1145/3059454.3059466 . [Google Scholar]


