Mental Stress Detection and Classification Using SVM Classifier A Pilot Study
Mental Stress Detection and Classification Using SVM Classifier A Pilot Study
Karunya Institute of Technology and Karunya Institute of Technology and Lafayette, Indiana, USA
Sciences, Sciences, [email protected]
India India
[email protected] [email protected]
Abstract—Human stress brings changes in both physical reaction to any external pressure or threat is known as stress.
and mental health which leads to chronic illness or injury, The Sympathetic Nervous System (SNS) releases stress
hypertension, cardiac arrest. It also causes emotional problems hormones like cortisol in response to a stressful situation,
such as anxiety, depression, anger, grief, guilt, low self-esteem which leads to an increase in available energy sources via a
which affects normal healthy life. This paper presents the chain of events. This massive amount of energy is used to
design, development and testing of a biomedical measurement fuel a variety of physiological functions, such as increasing
system for detecting human mental stress using machine metabolic rate, increasing heart rate, and encouraging blood
learning approach. This paper investigates the measure of vessel dilatation in the heart and other muscles, as well as
heart rate variability from am ECG signal for detecting human
reducing immune system and digestion. The brain activates
stress by using Support Vector Machine (SVM) classifier
technique and ultra-short term HRV analysis method. MIT-
the parasympathetic nervous system (PSN), which is
BIH multi-parameter database is also used in this paper to responsible for restoring biological homeostasis, when
load ECG signals for extracting the time domain features for stresses are no longer a threat to the body. If the PSN does
detection of human mental stress. The different experiments not attain equilibrium, chronic stress can develop, resulting
have been carried out with 60 segments of RR interval in both in a continuous and extended activation of the stress
normal state and stress state condition by ultra-short term response.
HRV analysis method. The implementation of SVM classifier
There are several methods for detecting stress level,
with RBF kernel provides the accurate detection of mental
tensions which includes questioning, evaluations, attitude
stress level. The measurement result indicates that the
proposed techniques achieve the mental stress classification observation. The different researchers have been investigated
accuracy of 91%. From the results, it was concluded that the to detect the stress level from brain signals such as EEG. In
proposed methodology provides a promising way to detect the current scenario, there is a huge need for developing a
mental stress in an individual. biomedical measurement system to detect mental stress
automatically due to critical situations. This paper proposed
Keywords— Mental stress, SVM classifier, ECG Signal, to develop a biomedical measurement system to detect
Feature Extraction, Machine Learning. human mental stress from an ECG signal. The most
promising feature called RR interval is extracted from the
I. INTRODUCTION signal for detection of mental stress. In the Autonomic
The development of biomedical measurement system in Nervous System, the analysis of RR interval signals in terms
healthcare network for measurement of human physiological of Heart Rate Variability (HRV) is widespread. The
parameters has been growing due to the rapid increasing the sympathetic and parasympathetic branches of the autonomic
nature of many diseases and working life behaviours of an nervous system regulate the sino atrial node, which generates
individual. The smart system with flexible approaches for ECG variability signals.
detecting the diseases becomes very essential in modern The methods used in this paper mainly focused on
world for early detection. The advanced signal processing analysing the heart rate variability and classifying the stress
methods and techniques provides a wide range of design level. HRV is also described as differences between
principles for measuring and detecting many diseases. The consecutive heartbeats. There are a number of studies that
non-invasive devices play a vital role to measure the show that mental stress has an impact on HRV [1-5]. This
physiological signals from human body which leads to paper also provides the implementation of advanced signal
identify the important vital parameter in biomedical research. processing methodology for extraction of features from an
Human mental stress is the reaction of mind that develops ECG signal and develops a support vector machine-based
when a person feels threatened or tense as a result of a classification algorithm for stress level classification. The
variety of situations. It has the potential to limit one's proposed paper extracting the necessary information on
personal freedom which also degrades happiness and various ECG signal and measures the stress level. This will
individual productivity. Nowadays, depression has become become a promising method to support the public to measure
the most common issue in human life which has the potential their stress level in advance and understand the situation very
to develop chronic diseases. To avoid many health-related efficiently. The measurement of an ECG signal produces the
problems, it is desired to detect an individual's stress level at information on the nature of electrical activity which can be
an early stage. It would be possible to avoid the negative recorded using bioelectrodes. There are different features can
effects of stress on human lives. Stress has various response be extracted from the acquired ECG signals. The features
to a mix of external and internal stressors that cause an such as RR interval, heart rate, time domain features and
organism to become stressed. The body's coping technique in heart rate variability become very necessary for detection of
Authorized licensed use limited to: VIT University. Downloaded on September 09,2023 at 15:39:50 UTC from IEEE Xplore. Restrictions apply.
139
2022 6th International Conference on Devices, Circuits and Systems (ICDCS) | 21-22 April 2022 | Karunya Institute of Technology and Sciences, Coimbatore, India.
mental stress level [6-7]. The research reported that the provides a clear perspective view to design a real time
measurement of time domain features provides the robust system for measuring stress level. The different methods
way in stress detection as compared to others [8]. Many focused on the objective techniques that have real-time data
researchers have investigated the method for stress detection for detecting stress level [5]. There are many physiological
by measuring heart rate variability. The nature of HRV has parameters are used to construct the real time system for
close correlation with autonomic nervous system which predicting mental stress level. These parameters are extracted
further a promising key role for detection of mental stress. from the signal acquired from human body. The most vital
The characteristics of heart rate variability provides the parameters are heart rate, respiration rate, blood volume, RR
accurate measurement of stress level conditions because the interval from an ECG signal, Galvanic Skin Response, Body
mental and physical state change caused by variation in temperature, EMG, blood pressure, SpO2 and eye movement
HRV. Also, the literature paper reported that the state of used to evaluate a person's stress level. Further, the classifier
mental, physical stress is greatly aligned with the nature of algorithm is used in conjunction with signal processing and
HRV parameters [9-10]. From the outcome of literature feature extraction algorithms to determine an individual's
papers, it was observed that the mental stress level detection stress level. There have been several recent studies that
and monitoring can be possible by measuring individual looked at a variety of methodology for stress detection which
ECG signal. The advanced signal processing approach is includes soft computing techniques and statistical signal
integrated with ECG measurement for accurate measurement processing methods [15], Fuzzy, k-NN [16] SVM and Bayes
of heart rate variability for detection of stress level. The classifier [17].
organization of this paper is structured as follows: Section 2
presents detail information on various methods involved for III. SYSTEM ARCHITECTURE
stress measurement. Section 3 provides the system The proposed system architecture is shown in Fig 1. The
architecture and the implantation of machine learning different modules involved in the proposed system consists
algorithms. Section 4 highlights the measurement results and of analog front-end unit for signal acquisition. This work
concludes the paper. focused on the acquisition of ECG signal and collection of
database signals to extract the desired features for stress
II. STRESS MASUREMENT TECHNIQUES measurement. The processing unit is designed for collecting
The literature papers which are collected form scientific and processing the signals. By assessing heart rate
publishing environment highlight the methods and variability, this module's functional work produced the
techniques for measuring the stress level. The ultimate appropriate time domain and frequency domain information
purpose of this paper is to provide the methodology and from an ECG signal (HRV). Further, the heart rate variability
effective measures on stress level detection and features are trained with machine learning approach for
classification through physiological signals. detection of stress level. The use of a self-organizing map
and a support vector machine approach to identify and
A. The Psychological Approach classify stress levels was proposed in this paper.
The different methods for assessing mental stress The large number of ECG data are collected from an
traditionally has been done using psychological techniques. ECG sensor attached to human body. MIT-BIH multi-
The most popular method used by the researchers includes parameter database is used for collecting ECG signals to
preparing set of interviews and obtaining the necessary detect the stress level. The measurement of ECG has been
inputs from an individual through questionnaires [3-5]. taken with various driving situations. The driving is set up in
These traditional method of detecting mental stress becomes such a way that the subject experiences each of the four
an effective solution to detect personal stress level. The stress levels over the course of an hour. The four different
methods such as Perceived Stress Scale (PSS), Life Events categories of stress level such as no stress, low stress,
and Coping Inventory (LECI) and Stress Response Inventory medium stress and high stress-based signals are collected
(SRI) are greatly used in clinical practice and psychological from the database and recorded.
studies to assess individual stress [3-4].
The heart rate variability by measuring RR interval is
B. Behavioural and Physical approach calculated from ECG data. The examination of heart rate
From the literature papers, it was noticed that the method variability (HRV) is a valuable and important tool for
to calculate an individual's stress level based on the determining cardiac autonomic function. The research says
behavioural approach [11, 12]. The facial recognition that HRV is the change in heart rate from beat to beat which
approach also used by the investigator for detecting mental are measured by wearable sensor and considered as an
stress [13]. The approaches used by the behavioral approach important feature linked to mental stress [18]. The time
provides an effective feature based on the individual domain research of HRV includes time domain variables
characteristics. Researchers also utilised a new physical way such as the mean and standard deviation of RR intervals. The
to evaluate stress levels, which comprises a characteristic of power of HRV's respiratory-dependent high frequency and
central-autonomic physiological processes and chemical low frequency components are the frequency domain
reactions in the body as a result of changes in the immune properties. Many researches have investigated and analyzed
systems [14]. the signal irregularities which are correlated with stress [19].
It has been found that the frequency domain features are
C. Physiological methods highly correlated with mental stress by analyzing the
Mental stress could be detected directly due to the nature frequency component of HRV [20]. The process of
of physiological responses. The physiological responses extracting the features are carried out on measuring
obtained from an individual are properly trained and able to HRV.These features are further used for training the system
detect mental stress. The real time data from the biosignals to detect mental stress [21-31].
Authorized licensed use limited to: VIT University. Downloaded on September 09,2023 at 15:39:50 UTC from IEEE Xplore. Restrictions apply.
140
2022 6th International Conference on Devices, Circuits and Systems (ICDCS) | 21-22 April 2022 | Karunya Institute of Technology and Sciences, Coimbatore, India.
IV. RESULTS AND DISCUSSIONS for self-organizing map set the weights randomly for each
node. The weights of each node in the network are compared
The real time signals and MIT-BIH database signals are to the input vector to determine which ones are the most
used to develop a system to detect mental stress. The similar and given a name called best matching node. The
statistical signal processing methods have been applied on radius of the best matching node neighborhood is estimated
input ECG signal. The characteristics of an ECG signal is and any nodes discovered within the best matching node
analyzed using LabVIEW software environment. The feature radius are modified to obtain the same input vector. The
extraction algorithm is implemented and RR interval is weights of a node change as it gets closer to the best
estimated from an ECG signals. The large number of matching node. The following equation is used to update the
database signals are further used to extract the desired weight vector:
features which could be used to train the system. This paper
consists of a database signals with stressed signals and 𝑤𝑗 = 𝑤𝑗 + ɳ.h(𝑗, 𝑖(𝑥)). (𝑥 − 𝑤𝑗) (1)
baseline segments and total number of 700 signals are
Where, 𝑤𝑗 -Weight vector, x- input vector, ɳ-learning
considered in the system for analysis. The experimental set
rate and h(j, i(x)) - neighborhood of the function best
up consists of ECG sensor for acquiring an ECG signal. The
matching node. For efficient SOM classification, the best
representation of an acquired ECG signal is shown in Fig3.
matching node neighbourhood radius and learning rate are
The filtering techniques are used to remove the noises from
initially set to a big number and then gradually reduced to a
an input signal. The bandpass filter is used in this paper to
smaller one. The implementation of self-organizing map
remove baseline wandering and the output response is shown
algorithm is shown in Fig 2.
in Fig 4. The filtered signals are further used to analyse the
heart rate variability. The advanced signal processing
methods have been applied to extract the desired features for
the detection of stress level. The extracted data are used as
input to SVM classifier to detect an individual stress level.
This paper proposed two stage classification approach for
stress measurement. The four different level of stress are
considered and the proposed system is trained with no stress,
low stress, medium stress, and high stress datas . The
features retrieved from the HRV signals are first fed into the
SOM, which divides the stress levels into two categories:
stress level 1 and stress level 2. The same seven features are
fed into the SVM classifier in the second step, with stress
level 1 containing data linked to no stress and low stress, and
stress level 2 containing data related to low stress and high
stress. The integration of SOM with SVM classification
approach delivers the accurate classification of stress level.
The Self-Organizing Map does not require supervision. They
Fig. 2: Steps involved for implementation of self-organizing map
try to match their weights to the data provided and keep the algorithm
intended characteristics of the applied data. The algorithm
Authorized licensed use limited to: VIT University. Downloaded on September 09,2023 at 15:39:50 UTC from IEEE Xplore. Restrictions apply.
141
2022 6th International Conference on Devices, Circuits and Systems (ICDCS) | 21-22 April 2022 | Karunya Institute of Technology and Sciences, Coimbatore, India.
TABLE I: ECG Feature extracted for detection of stress level and statistical evaluation of SVM classifiers at different stress levels
Authorized licensed use limited to: VIT University. Downloaded on September 09,2023 at 15:39:50 UTC from IEEE Xplore. Restrictions apply.
142
2022 6th International Conference on Devices, Circuits and Systems (ICDCS) | 21-22 April 2022 | Karunya Institute of Technology and Sciences, Coimbatore, India.
Authorized licensed use limited to: VIT University. Downloaded on September 09,2023 at 15:39:50 UTC from IEEE Xplore. Restrictions apply.
143