Stress Sensor Prototype: Determining the Stress Level in using a Computer through Validated Self-Made Heart Rate (HR) and Galvanic Skin Response (GSR) Sensors and Fuzzy Logic Algorithm

DOI : 10.17577/IJERTV5IS030049

Download Full-Text PDF Cite this Publication

Text Only Version

Stress Sensor Prototype: Determining the Stress Level in using a Computer through Validated Self-Made Heart Rate (HR) and Galvanic Skin Response (GSR) Sensors and Fuzzy Logic Algorithm

Anthonette D. Cantara University of San Carlos School of Arts and Sciences

Department of Computer and Information Sciences Cebu, Cebu – Phillipines.

Angie M. Ceniza University of San Carlos School of Arts and Sciences

Department of Computer and Information Sciences Cebu, Cebu – Phillipines.

Abstract – Nowadays, it is almost impossible to imagine that anyone can live without computers. Computers are important due to the significant improvements they have made in work efficiency and productivity. Working with computers can be stressful, especially when a person is exposed to it for a long period of time. Knowing ones stress level while using the computer can help the person adjust his time on the computer. This research aims to help everyone become more aware of their stress levels during their computer usage by the use of an algorithm that can detect stress levels. A series of interviews were conducted to further determine the appropriate data required in the formulation of the algorithm. Experts from various fields were interview respondents for the pre-development phase. On the other hand, the faculty and students of the Computer Science Department of the University of the San Carlos were the respondents for the testing in the post-development phase. The system was tested using data gathered from validated self-made Heart Rate (HR) and Galvanic Skin Response (GSR) sensors. The gathered data were used to create the final stress detection algorithm using fuzzy logic. The final system had an accuracy of 72% which proves that the system is capable of detecting stress at an acceptable rate.

Keywords: Stress Sensors, Heart Rate, Galvanic Skin Response, Fuzzy Logic


    Stress is how the body reacts when a person is involved in a threatening situation, and when the body reacts this way even if the situation isnt real. Whenever a person is threatened, his body reacts in a way that would protect him from harm which is usually called the "fight-or-flight or the stress response. The Stress Management Society defines stress as a situation where demands put on a person exceeds the persons resources or the ability to cope. It is one of the biggest issues that modern man has to deal with and the biggest cause of illness some of which even lead to death.

    Stress detection has been considered from many different views and approaches. These views and approaches had considered the following stress detection devices with any or a combination of any of the following inputs, namely: behavioral manifestations, physical features, physiological manifestations, emotional manifestations and others. Stress detection of behavioral manifestations includes video- based feature extraction; monitoring of physical features includes facial recognition and multimodal approach.

    It is impossible to avoid stress in a working environment. Nevertheless, if people are informed of their stress levels, they may become empowered to take some preemptive measures in order to minimize stress so that stress balance is achieved before it results to serious health problems. Through this researchers, develop a stress sensor prototype to determine stress level in using a computer through Validated Self-Made Heart Rate (HR) and Galvanic Skin Response (GSR) Sensors and Fuzzy Logic Algorithm.

  2. REVIEW OF RELATED LITERATURE These are several lines of related work which are reviewed in this section.

      1. Physiological Signals

        According the WebMD [1] stress can be detected by a variety of different signals as inputs, due to how the body reacts to stress with physical, mental, and emotional responses. Begum, Funk and Xiong[2] used physiological parameters such as finger temperature (FT) and Heart Rate Variability (HRV) for quantifying stress levels, incorporated with Zadeh's[3] fuzzy logic and Andren and Funk's[4] case-based reasoning approach. Begum, Ahmed, Funk, Xiong, and Schéele[5] collected the data from the sensors during stressed conditions as well as in relaxed conditions. However, Qis[6] study, however, collected mouse pressure signals from subjects who filled out web forms containing usability bugs.

        It is not common to focus only on one physiological feature of a person when trying to detect a persons stress level. In the study of Sierra, Avila, Casnova and del Pozo[7] identified a multimodal approach is needed inorder to obtain more precise information. Liao, Zhang, Jhu and Ji[8] made use of the multimodal approach coming from the persons physical appearance (facial expression, head and eye movements), 10 physiological conditions using an emotional mouse, and physiological conditions using an emotional mouse, and behavioral data from user-computer interaction.

        Figure 1.0 Liao et al. Experimental Environment

        Moreover, in the case of Zhai and Barreto's[9] study, Galvanic Skin Response (GSR), Blood Volume Pulse (BVP) and Finger Temperature (FT) were monitored using non-invasive and non-intrusive sensors. In addition, pupil diameter was also included in the collection and analysis of the data.

        Several of the aforementioned physiological signals were considered in this study. It was decided to use two physiological signals in this study and they are: the Galvanic Skin Response (GSR) and the Heart Rate (HR). According to Healey and Picard [10], these two signals were chosen due to the non-invasive nature when gathering these signals and because their variation is strongly related to the stressing stimuli. The other physiological signal gathered in this study is HR, which is the measurement of the number of heartbeats per unit of time, and it is measured in Beats per Minute (BPM). A persons HR can be measured from anywhere on the human body, which makes it very easy to detect. When a person is under stress, the sympathetic nervous system (SNS) reacts and is responsible for the "flight-or-fight" response. The SNS signals the adrenal glands to release two hormones called adrenalin and cortisol. American Psychological Association (APA) [11] stated that these hormones increase the blood volume within the veins so that the rest of the body can react properly to the stressing stimulus. When there is a stressing stimulus, the SNS reacts in a way that increases blood flow resulting to the increase of HR. In this study, HR signals were gathered using a device similar to a pulse oximeter.

      2. Stress and Sensors

        Stress affects everyone, especially those in the workplace. It is one of the major factors leading to a variety of health- related problems according to Bakker, Pechenizkiy, and

        Sidorova[12]. The Wellness Councils of America [13] mentioned that the greatest asset to a company is its people. While State Government of Victoria [14], it is fitting enough that employers should recognize work-related stress to ensure that their employees are not experiencing any unnecessary stress. To make stress monitoring possible, the use of sensors were considered. Sensors that can detect physiological signals while using a computer mouse to detect the level of stress. The use of visible sensors induce themselves some sort of stress and may result to some stress. Thus, in the study of Peter, Ebert, and Beikirch [15] concluded all electronics and wires should preferably be invisibly integrated in a device to avoid unnecessary stress. Based on van Dalen's [16] study, heart rate variability analysis gives an indicationof stress of the computer user during computer tasks. Measuring skin conductivity and heart rate variability is measurable with an adjusted computer mouse. Therefore, it is possible for the user to be monitored while working with a computer mouse. In addition, van Dalen's [16] survey also presented that 89% of computer users' prefer a modified mouse as the measuring method to inform them of their stress levels. Keystroke and mouse events were also investigated in Hercegfi's [17] study. This study had the HR sensor installed on the side of a computer mouse, where the thumb is placed, and the GSR sensor on the mouse itself so that the palm touches the nodes connecting to the GSR sensor.

      3. Stress Detection Algorithm

    Sierra, Avila and del Pozo[18] performed a careful analysis and comparison of the aforementioned algorithms and their study concluded that the best algorithm to use in stress detection is fuzzy logic. They used a stress detection system based on a Sugeno fuzzy logic approach and two physiological signals namely GSR and HR. The system was able to detect stress with a rate of 99.5% accuracy evaluated among 80 individuals. Fuzzy logic by Zadeh [19] was the decision algorithm proposed by

    Sierra et al. [18] including crisp algorithms of Begum [20], Healey and Picard [21] and Sarkar's algorithm. Using a Sugeno fuzzy logic system and the extraction of templates, stress was able to be detected with an accuracy of 99.5%.

    In this research, instead of using hyperventilation as the stress inducer, a different inducer of stress was considered that is in line with computer usage.

    Many stressors were considered during the development phase, the stressors that were considered were the arithmetic test by Lee [22], hyperventilation, the Stroop test by Renaud and Blondin [23], videos, games by Cusveller, Gerritsen and de Man [24], and pictures by Fechir, et al [25]. Since the test needed to involve computer usage and there was an available Stroop test found online, as well as the Stroop test being a common test used in inducing stress, it was opted to use the Stroop test in inducing stress. In summary, a Sugeno fuzzy logic system that accepts HR and GSR as inputs can be considered as the most efficient in the stress detection algorithm that would be embedded in a computer mouse.


    The detection of physiological signals, specifically HR and GSR, results to a greater accuracy in terms of stress detection. Hence, both of these served as the parameters for the study. Since HR and GSR sensors were not readily available in Cebu, it was decided to create the circuitry with the help of a BSECE-2 student. The creation of the HR circuit made use of the concept of a photodiode developed by Hashem et al. [26]. On the other hand, the creation of the GSR circuit made use of the concept of an ohmmeter and is simply designed to detect the conductivity of the skin.

    Figure 2.0 The Basic Structure of Fuzzy Expert Systems

    A fuzzy rule-based system is an expert knowledge-based system that contains the fuzzy algorithm in a simple rule base, which is a set of linguistic statements of IF-THEN rules with antecedents and consequents. This kind of system is composed of five parts: the fuzzifier, the knowledge-base, the inference engine, the defuzzifier and the rules, which are presented in Figure 2.0.

    Figure 2.1 Proposed Stress Detection Systems

    sensor was done at the clinic located at the basement of the Bunzel Lawrence building in the University of San Carlos, Talamban campus. On the other hand, the verification of the Galvanic Skin Response sensor and the gathering of data for fuzzification were done at room LB469TC in the Lawrence Bunzel building at the same university

      1. Research Respondents

        1. Interview Respondents

          The interview respondents were three of the faculty members coming from the Department of Psychology for the purpose of knowing how an individual would react under stressing conditions. A faculty member from the Department of Electrical and Electronics Engineering was also interviewed in order to gain an outline in developing the sensors to be used for detecting the physiological signals involved in stress detection. A cardiologist from Chong Hua Hospital was also interviewed to get information concerning the behavior of a persons heart rate when a person is under stress.

        2. Experiment Respondents

    The respondents were made up of first to third year students who are enrolled in the BS Computer Science program in the University of San Carlos. Another set of respondents were the faculty members aged 20 to 40 from the Department of Computer Science. Computer Science students spend the most amount of time on their computers creating algorithms and thus having the most amount of exposure. The faculty of the Department of Computer Science was chosen as respondents due to the nature of their work.

    Slovins formula with a margin of error of 20% was used to get the total number of respondents for the testing phase of the study. After applying Slovins formula, a sample size of 21 was used for the study.

    Stratified random sampling was then used Equation (2), and the population was divided into strata based on age groups.

    Figure 2.1 shows the general process of the proposed stress detection system. Only GSR and HR were considered based on Sierra et al. s [7]conclusions. A Sugeno-type fuzzy logic design was used since it can attain an accuracy of 99.5% with these two physiological signals as inputs.

    = 1+






    () [2]

    3.1 Research Environment

    The research was conducted at the University of San Carlos, Talamban Campus, specifically, in the Computer Science Department. The department caters those who would spend much time in front of a computer. Since the research covered the following fields of study: Psychology, Medicine, and Engineering (especially on the application of sensors), the gathering of data was done in the following departments: Department of Psychology, the Department of Electrical and Electronics Engineering of the University of San Carlos, and the Cardiology Department from the Chong Hua Hospital. The verification of the heart rate

      1. Research Instruments

        On the pre-development phase, open-ended questions were asked in the interviews with the psychologist and electronics and communications engineer. The answers from the interviews served as inputs in identifying and obtaining the necessary information for determining the different physiological and behavioral manifestations of a user when stressed. It was also used in the proper selection of techniques and tools in gauging the users stress levels. The questions that were posed for the psychologist concerned the effects of stress, the relationship of computer

        usage and stress, the symptoms of stress and what causes stress. The psychologist was also asked if the knowledge of ones own stress level may be beneficial. On the other hand, the ECE was asked on how stress may be detected. He was asked what sensors should be used and how to use these sensors to detect the physiological signals of someone using a computer.

        Self-made HR and GSR sensors were used along with an Arduino board in order to gather the physiological data from the resource persons in this study. The stressor used in this study was the Stroop test.

        On the post-development phase, the data were tabulated in a confusion matrix, and then the mathematical formula for accuracy was applied to get the overall accuracy of the system. In addition, a statistical test was conducted to show that there is a relationship between the predicted and actual outputs of the algorithm. These were the tools used in the overall evaluation of the stress detection algorithm by checking its accuracy.

        Permission was requesed from the department chairman to conduct the testing survey. Survey results were held confidential. Other sources were also utilized of data such as articles, books, journals, and websites in researching existing stress-related algorithms necessary for the stress- detection algorithm, especially the data presented from the paper of Sierra et al. [18].

      2. Research Procedures

        1. Gathering of Data

          The study used qualitative and quantitative data. Most of the questions that were asked included the different behavioral and physiological manifestations to be considered when an individual is stressed and the types of stress sensors needed for the algorithm.

          On the pre-development phase of the system, interviews were conducted with different professionals in their respective fields of specialization. The self-made HR and GSR sensors were checked for validity, and the required data for fuzzification were gathered. After data analysis, the pre-development of the system followed.

          On the post-development phase, which was the testing and evaluation phase, the respondents took the Stroop test and were given a form to evaluate their perceived level of stress. The data that were collected were then used to develop the system. Other methods of gathering data included consultation and the existing related literature from articles, books, journals or web.

        2. Treatment of Data

    Microsoft Excel 2010 was used to analyze the gathered data. The data gathered were analyzed to evaluate the validity of the sensors. The percent error formula was used to check the validity of the self-made HR sensor, and the paired-difference test of hypothesis for the Difference of Two Means for Dependent Samples (t-test) was used to check the validity of the self-made GSR sensor.

    Matlab was used extensively in the research, especially the Fuzzy Logic Toolbox, to design the Sugeno fuzzy

    algorithm used in stress detection as well as train the algorithm using the data gathered from the sensors.

    The data collected were then subject to data cleaning via the use of the normal distribution and p-values, or the values that define the percentage of occurrence of an event below the chosen point. The data were assumed to have a normal distribution. Data with a p-value of less than 0.5 were classified as relaxed, 0.25 to 0.75 as normal, and greater than 0.5 as stressed. This was done in order to prepare the data for training in the Adaptive Neuro-Fuzzy Inference System (ANFIS).

    Once cleaned, the data set were divided into two with a ratio of 3:2 or one data set had 60% of the whole data set and the other had 40% of the whole data set. The data set that contained 60% of the data were used to train the algorithm that performed the stress detection proper, while the data set that held 40% of the data were used to test the reliability of the algorithm.

    3.4 Design and Implementation

    The activity diagram in Figure 4.0 served as a guide to come up with a possible layout and content in accordance to the results that have been gathered after the interview sessions and further readings on existing related literature.

    Figure 3.0 Activity Diagram

    Moreover, considering that the algorithm needed to continuously monitor the stress level of a user, there was a need to create a long-running executable application (Microsoft, 2014). This implies that the algorithm should continuously collect and analyze data gathered even it is just running in the background. Data was continuously being read from the sensors in the background and sent the data to the algorithm for analysis. Therefore, a programming language was used that has support for detecting data from serial ports used by Arduino boards, the C# programming language was used.


    A confusion matrix was used to check the correct outputs against the wrong outputs and then a mathematical formula was used for checking the accuracy of the system by Data School [27].

    Figure 4.0 shows the schematic diagram of the heart rate sensor used in the study, which is based on R-B's [28] circuit, with some changes:


    # #


    The outputs of the system were then compared to the predicted outputs and a statistical test was conducted in order to confirm that there existed a significant relationship between the predicted and actual outputs. The statistical test that was used was the Spearmans Rank Correlation Coefficient or Spearmans Rho.

    Figure 4.0 The Complete Heart Rate Circuit (Modified)

    The validation of the sensor was conducted at the University of San Carlos, Talamban Campus clinic. The

    ( 2 )

    ( 2 )

    = 1 – 6 2


      1. Demographics for Testing and Evaluation

        1. Sensor Design


          readings of the heart rate sensor were compared against the readings of the pulse oximeter device, and the data gathered were then subject to the percent error formula based on [29].

          A total sample size of 21 (n) was involved in this study, which consisted of BS Computer Science students, the fresh and the senior faculty members of the Department of Computer Science. Equation (1) was used to get an appropriate sample size for the testing. Slovins formula was applied with an error rate of 20% (e), and the sample size was calculated to be 21. With the use of the stratified random sampling technique Equation (2), appropriate sample sizes were picked for the three groups, Computer Science students, the fresh faculty, and the senior faculty members of the Department of Computer Science. The following table shows the breakdown of the population:

          Table 1.0 Demographics

        2. Heart Rate Sensor

          The design of the heart rate sensor for the detection of stress was based on the principle of photoplethysmography (PPG), which is simple and low-cost. It is an optical technique that can be used to detect the change in blood volume and is the same principle applied in pulse oximeters. In this study, the reflectance PPG was applied, where the light source and the light detector are both placed on the same side, allowing the sensor to detect blood volume anywhere on the body. The light is emitted to the body and the reflected light is measured by the detector. According to R-B [28], the detected light reflected from the body part will fluctuate according to the pulsatile blood flow caused by the beating of the heart. The data from the sensor were read using the Arduino software.

          % [5]

          The respondents involved in the study were taken to the clinic and had their heart rates recorded, once with the pulse oximeter and again with the sensor. The percent errors were computed per respondent and the final percent error was computed based on the arithmetic mean of all of the observed percent errors. The final percent error of the sensor was estimated to be 6%, which means that the developed sensor is reliable.

          Table 1.1 Data Obtained from Validation

        3. Galvanic Skin Response Sensor

    In study of Peuscher [30], Electrodermal activity (EDA), also known as skin conductance (SC) or Galvanic Skin Response (GSR) is the activity of electrical conductance of the skin, which varies with the level of moisture of a person. Sweat glands are governed by the sympathetic nervous system, so whenever one feels a strong emotion, a change in the electrical conductance of the skin occurs. Skin conductance is mostly used to check the level of psychological or physiological arousal of an individual. The GSR sensor measures the electrical conductance between two points on the skin, and it can be considered as an ohmmeter of the skin. When a person sweats, his electrical skin conductance increases. Emotions such as stress, happiness, shock, sadness, and other similar emotions an change the skin conductance of a person and cause it to fluctuate. The data gathered from the sensor were collected using the Arduino software.

    Figure 4.1 shows the schematic of the GSR sensor that was used in this study; the schematic is based on a part of the e- Health Sensor Platform V2.0 that was built by Cooking Hacks:

    Figure 4.1 The Complete GSR Sensor Circuit

    The validation of the created GSR sensor was conducted at the University of San Carlos, Talamban Campus, Lawrence Bunzel building at 30 room LB469TC. The respondents underwent an activity that involved eliciting an emotional response, since hypothetically the GSR level of any individual should increase when the individual feels emotional.

    A statistical test was conducted in order to prove that there is a significant difference of means between the effects of the emotional and neutral questions. The respondents were subjected to ten randomly arranged questions three emotional and seven neutral. Their GSR levels were recorded throughout the whole activity. The questions were screened and approved by one of the guidance counselors, a psychology student, and a psychometrician, who are all

    the Difference of Two Means for Dependent Samples (t- test). The null hypothesis of the conducted statistical test was: (what is assumed to be true but desire to prove false).

    The null hypothesis of the conducted statistical test was: (what is assumed to be true but desire to prove false)

    0: There is no significant difference between the emotional and neutral questions (d = 0)

    The alternative hypothesis of the conducted statistical test was: (what needs to be proven to be true, but assumes is false)

    : There is no significant difference between the emotional and neutral questions (d >0)

    The study used a one-tailed test, the sample had a size of 21, and the desired level of confidence was 0.01. Table 1.2 shows the data gathered during the validation of the GSR sensor

    Table 1.1 GSR Validation Data

    The paired-difference test of hypothesis (1 2) = d for dependent samples was used, which is a t-test. Equation (6) shows the formula for this statistical test.

    from the University of San Carlos.

    The means of the differences of the GSR levels were then compared for the neutral and emotional questions. Afterwards, the differences of the two means were taken and were used in the paireddifference test of hypothesis for




    Where is the score of the statistical test, and are the mean and standard deviation of the sample differences, respectively, and s the sample size.

    Table 1.2 Data and Results Gathered From the Statistical Test

    The t-test had = 21, = 0.265238095, = = 0.397147568, d = 20 and a resulting t-score of 3.060508858, which is greater than the critical value of 2.527977001, thus > and this gives us enough statistical evidence to reject the null hypothesis at the =

    0.01 level.

    Therefore, it can be concluded that there exists enough statistical evidence to reject the null hypothesis, and that the GSR readings of the emotional questions are significantly greater than the GSR readings of the neutral questions. In layman terms, this would mean that the GSR sensor that was developed is accurate in measuring GSR, for it can successfully detect slight changes in the persons GSR when the person interacting with the sensor has a slight change of emotion.

        1. Combined HR and GSR Sensor

          After the validation of the sensors, collaboration was done with an ECE student in order to create the final sensor, which is a combination of the sensors that were presented. The HR and GSR sensors were combined in such a way that both will function without any conflicts. The readings were read by the Arduino software and received by Microsoft Visual Studio. Figure 4.2 shows the final schematic of the combined HR and GSR circuits designed using the software Proteus 7.10.

          Figure 4.2 Final GSR and HR Schematic

          Figure 4.3 The Combined Circuit Placed on a PCB

          After the completion of the combined circuitry, the sensors were installed on a Logitech computer mouse as shown:

          Figure 4.4 The Mouse alongside the Combined Circuit

          The respondents were instructed to use the mouse while taking a Stroop test. The Stroop test is a psychological test that is designed to induce cognitive stress to the one taking it. The HR and GSR of the respondents were recorded while they took the Stroop test in order to have a good idea on how stress affects the respondents HR and GSR.

        2. Fuzzy Logic Algorithm

    After the data were gathered from the interviews, and the sensor validations were compiled, a working algorithm was then formulated for the stress detection system. With the aid of Mathworks Matlab software, an algorithm was developed with the use of Matlabs Fuzzy Logic Toolbox. The completed algorithm is presented in Figure 4.5 in the form of a flowchart.

    Figure 4.5 Flowchart Showing the Full Algorithm

    1. Parameters of the System

      The system first accepts input data as parameters, and they are the two physiological signals HR and GSR from the sensors. The sensors are attached to a computer mouse; the analog readings from the sensors are converted into digital readings via an Arduino board connected to the computer. The Arduino software detects data acquired from the sensors and stores the readings on the computer for analysis via the Fuzzy Logic Toolbox. After the data have been obtained, the system will then start processing or fuzzifying the data.

    2. Fuzzification of Data

      Once the data have been fuzzified and classified into a fuzzy set or membership function, the fuzzified data will then be processed in the inference engine of the system. The system will then compare the input data with the data previously input in order to create the parameters which will result to the least amount of error, this is also known as training the input parameters with the previous input parameters. At the same time, the rule base will classify the fuzzified data and assign an output based on the weights, the parameters of the previous data, and the current inputs.

    3. Inference Engine

      Once the inference engine is done classifying the inputs based on the rules and weights that are embedded into the trained algorithm, the defuzzification process extracts the data involving the membership functions that most satisfies the inputs and it derives a single crisp value.

    4. Defuzzification Process

      The single crisp outputs that were produced from the defuzzification would constitute as the final outputs of the algorithm and these outputs will be used to classify the status of the user based on the users input HR and GSR.

    5. Classification of the Defuzzified Crisp Values

      The single crisp outputs that were produced from the defuzzification would constitute as the final outputs of the algorithm and these outputs will be used to classify the status of the user based on the users input HR and GSR.

    6. Classification of Stress

    The proposed system has nine different outputs based on the two inputs received by the system. There are nine different outputs due to each input having three membership functions, which gives the system a total of nine rules that define nine different outputs based on the three membership functions in the input signals. Several of the rules had the same outputs and were merged, and this resulted in the final system having only a total of five outputs.

    system was checked using the testing data in order to determine its accuracy.

    Table 1.3 Confusion Matrix of the Stress-Detection Algorithm

    The accuracy was calculated using the values found in Table 1.3. The numbers highlighted in blue represent true negatives or true positives, which represent the instances when the algorithm accurately managed to determine the prsons level of stress. On the other hand, the numbers highlighted in red represent false negatives or false positives, these values represent the instances when the algorithm wasnt able to determine the persons level of stress. The accuracy was calculated using Equation (3) and the accuracy of the system was calculated to be about 72%, which means that the system is capable of detecting the level of stress of an individual with good accuracy given the two physiological signals HR and GSR.

    The system was checked using a statistical tool, the Spearmans Rho in order to show that the system is stable and that there is a significant relationship between the predicted and actual outputs. Table 4.6 summarizes the data gathered for the statistical test of Heart Rate (HR), Galvanic Skin Response (GSR), their predicted outputs (PO), their actual outputs (AO), their predicted ranks (PR), their actual ranks (AR), their differences (d = PR AR), and the square of their differences (2).

    Table 1.4 Data Involved in the Statistical Test


    The actual and predicted values were then recorded and the results were plot on a confusion matrix. Each state represents an output which is a numerical value, given HR and GSR signals as inputs. The algorithm determines a numerical output based on the level of HR and GSR. If the numerical output from the algorithm is near the predicted output then that would count as a true positive or negative. Once the algorithm has been trained sufficiently, the

    The null hypothesis of this statistical test was:

    0: There is no significant relationship between the predicted and actual outputs.

    And the alternative hypothesis of this statistical test was:

    : There is a significant relationship between the predicted and actual outputs.

    A one-tailed Spearmans Rank Correlation Coefficient test was conducted using the formula:

    ( 2 )

    ( 2 )

    = 1 – 6 2 [7]


    Where is the test statistic, 2 is the sum of the squared differences of the ranks and is the sample size.

    Table 1.5 Data and Results Gathered From the Spearmans Rho Test

    The Spearmans Rho test had = 25, 2 = 408, = 23, with a calculated rho, = 0.843077 and an equivalent t-score of7.518236, which is greater than the critical value of 2.807336, thus > and this gives us enough statistical evidence to reject the null hypothesis at the =

    0.01 level.

    This means that the system is very capable of precisely predicting the users stress level with a high level of consistency.


      Research was done to decide the best physiological signals to use in stress detection, how these signals can be detected, how these signals are affected by stress and what would be the best model or system to use in stress detection. Data were gathered to present the appropriate physiological signals to be considered as inputs to the algorithm. The sensors were validated in order to confirm that they could accurately detect the physiological signals. The algorithm was then developed to determine the level of stress. Physiological signals served as inputs to the algorithm. The signals were fuzzified and passed through the inference engine before they were defuzzified to produce an output that corresponds with a level of stress. The algorithm was then tested and evaluated to prove the

      efficiency and capability of the system; it was statistically proven that the system can accurately detect stress level. The system can be used to increase awareness of stress among mouse users which can help them better manage their stress levels and do what is needed to improve their performance.


  1. WebMD. (2005-2015). Stress Symptoms: Effects of Stress on the Body. Retrieved May 24, 2015, from WebMD – Better information. Better health: symptomseffects_of-stress-on-the-body

  2. Ahmed, M., Begum, S., Funk, P., and Xiong, N. (2009). Fuzzy rule- based classification to build initial case library for case-based stress diagnosis. IASTED International Conference on Artificial Intelligence and Applications, AIA 2009, (pp. 22-230)

  3. Zadeh, L. (1996). Fuzzy logic = computing with words. IEEE Transactions on Fuzzy Systems, 103-111

  4. Andren, J., and Funk, P. (2005). A case-based approach using behavioral biometrics to determine a user's stress level. ICCBR Workshops, 9-17.

  5. Begum, S., Ahmed, M., Funk, P., Xiong, N., and Schéele, B. v. (2006). Using Calibration and Fuzzification of Cases for Improved Diagnosis and Treatment of Stress. 8th European Conference on Case-based Reasoning workshop proceedings, 113-122. Retrieved from Malardalen University Sweden:

  6. Yuan Qi, C. R. (2001). The Bayes Point Machine for Computer-User Frustration Detection via Pressure Mouse. PUI Perceptive User Interfaces (p. 1). New York: ACM New York.

  7. Sierra, A. D., Avila, C. S., Casanova, J. G., & del Pozo, G. B. (2011). Real-Time Stress Detection by Means of Physiological Signals.

  8. Liao, W., Zhang, W., Zhu, Z., and Ji, Q. (2005). A Real-Time Human Stress Monitoring System Using Dynamic Bayesian Network. IEEE Computer Society Conference on Computer Vision and Pattern Recognition.

  9. Zhai, J., and Barreto, A. (2006). Stress Detection in Computer Users through Noninvasive Monitoring of Physiological Signals. Proceedings of 28th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EBMS), (pp. 1355- 1358). New York.

  10. Healey, J. A., & Picard, R. W. (2005). Detecting stress during real- world driving tasks using physiological sensors. IEEE Transactions on Intelligent Transportation Systems, no.2, 156-166.

  11. American Psychological Association (APA). (2015). Stress Effects on the Body. Retrieved June 4, 2015, from American Psychological Association (APA):

  12. Bakker, J., Pechenizkiy, M., and Sidorova, N. (2010). Whats your current stress level? Detection of stress patterns from GSR sensor data. Eindhoven University of Technology.

  13. The Wellness Councils of America. (2002, February 1). Experts Speak Out. Retrieved from weiser choices:

  14. State Government of Victoria. (2002, February 1). Work-related stress. Retrieved from Better Health Channel: krelated_stress

  15. Peter, C., Ebert, E., and Beikirch, H. (2005). A Wearable Multi- sensor System for Mobile Acquisition. Proceedings of the 1st International Conference on Affective Computing and Intelligent Interaction (pp. 691-698). Heidelberg, New York: Springer Verlag Berlin.

  16. van Dalen, J. (2009, January 23). Less stress during computer work: Survey on user preferences of stress measurement and notification methods.

  17. Retrieved from University of Twente: dalen-lessstress-during-computer-work-survey-on-user-preferences- of-stressmeasurement-and-notification-methods.pdf

  18. Hercegfi, K. (2011). Heart Rate Variability Monitoring during Human-Computer Interaction. Acta Polytechnica Hungarica , 205- 224.

  19. Sierra, A. D., Avila, C. S., Casanova, J. G., and del Pozo, G. B. (2011). A stress detection system based on physiological signals and fuzzy logic. IEEE Transactions on Industrial Electronics, 4857 – 4865.

  20. Zadeh, L. (1996). Fuzzy logic = computing with words. IEEE Transactions on Fuzzy Systems, 103-111.

  21. Begum, S. (2011). A personalised case-based stress diagnosis system using physiological sensor signals.

  22. Healey, J. A., & Picard, R. (2000). Wearable and automotive system for affect recognitin from physiology. Technical report.

  23. Lee, D. (2005). What Makes You Sweat: Genetic and Environmental Influences on Skin Conductance Response

  24. Renaud, P., & Blondin, J.-P. (1997). The stress of Stroop performance: physiological and emotional response to color-word interference, task pacing, and pacing speed. International Journal of Psychophysiology, 87- 97.

  25. Cusveller, J., Gerritsen, C., & de Man, J. (2014). Evoking and Measuring Arousal in Game Settings. Netherlands.

  26. Fechir, M., Schlereth, T., Purat, T., Kritzmann, S., Geber, C., Eberle, T., Birklein, F. (2008). Patterns of Sympathetic Responses Induced by Different Stress Tasks. The Open Neurology Journal, 25-31.

  27. Hashem, Shams, R., Kader, A., & Sayed, A. (2010). Design and Development of a Heart Rate Measuring Device using Fingertip. (pp. 197-201). Kuala Lumpur: IEEE

  28. Data School. (2014, March 26). Simple guide to confusion matrix terminology. Retrieved 8 6, 2015, from Data School: terminology/

  29. R-B. (2012, September 12). Introducing Easy Pulse: A DIY photoplethysmographic sensor for measuring heart rate. Retrieved January 2015, from Embedded Lab:

  30. (2014). Percentage Error. Retrieved 8 6, 2015, from Math is Fun – Maths Resources: Peuscher, J. (2012). Galvanic Skin Response (GSR). TMSi.

Leave a Reply