there is evidence that stress is linked with many diseases , playing a crucial role in the development of cardiovascular diseases , diabetes , or asthma , and it also significantly influences the later course of these diseases .
stress is related to life style ; therefore , especially for mobile automated lifestyle counseling and analysis services , the need arises to identify stress automatically during daytime , using physiological data from various sensors . if stress could be reliably and automatically identified , this could directly help users manage stress situations , and it could also be used in medical intelligence applications , for example , in refining blood glucose predictions for diabetics during daytime under influence of stress . however , the available methods for automated stress detection based on low price , ubiquitous sensors , are yet immature . telemonitoring and self - management systems [ 59 ] extend the horizons of traditional health care using only point of care measurement data , but the proper interpretation and reliability of the results depend on the reliability of the measured data and the sensor itself .
the two crucial questions related to this problem are as follows : ( i)whether low price physiological sensors are reliable enough compared to  gold standard 
( ii)which sensors and algorithms can provide a reliable method for stress detection , at an affordable price and minimal user interaction.this paper describes our efforts and results in answering these questions .
, we describe our methods for a small scale device validation and the methods used in the main clinical study that compared heart rate variability ( hrv ) features between relaxation and mental stress periods .
section 3 presents the measurement results of the two studies , with the latter compared with two state - of - the - art algorithms .
we conclude the strengths and weaknesses of this study and the newly designed stress detection algorithm in section 4 . whether low price physiological sensors are reliable enough compared to  gold standard  devices accepted by and used in clinical practice . which sensors and algorithms can provide a reliable method for stress detection , at an affordable price and minimal user interaction .
the most commonly used physiological markers of stress are as follows : ( i)galvanic skin response ( gsr ) : using changes in skin conductivity . during stress , resistance of skin drops due to increased secretion in sweating glands .
stress causes differences in the contraction of the muscles which can be used to identify stress [ 11 , 12 ] .
( iii)skin temperature : changes in temperature of the skin are related to the stress level .
( iv)electrical activity of the heart : the most commonly used stress marker parameters derived from the electrocardiograph ( ecg ) are the heart rate ( hr ) and the heart rate variability ( hrv ) .stress can also be detected using other , less common markers like accelerometer , key stroke dynamics , or blinking .
it is also common to use a combination of several markers at the expense of an increased system cost and user involvement .
fernandes et al . used gsr and blood pressure ( bp ) markers   for determining stress .
used ecg , respiration , gsr , and emg of trapezius muscles for mental stress detection .
singh and queyam used gsr , emg , respiration , and hr   for detecting stress during driving .
pupil diameter , ecg , and photoplethysmogram were used as markers by mokhayeri et al .
baltaci and gokcay used pupil diameter and temperature features in stress detection , while choi used hrv , respiration , gsr , emg , acceleration , and geographical location .
stress causes differences in the contraction of the muscles which can be used to identify stress [ 11 , 12 ] .
skin temperature : changes in temperature of the skin are related to the stress level .
electrical activity of the heart : the most commonly used stress marker parameters derived from the electrocardiograph ( ecg ) are the heart rate ( hr ) and the heart rate variability ( hrv ) .
some of them are hyperspectral imaging technique , human voice [ 29 , 30 ] , pupil diameter , visible spectrum camera , or using stereo thermal and visible sensors . however , observing several markers for identifying stress requires an increasing number of input sensors which in turn increases the overall price and lowers applicability .
prices for heart rate meters range from $ 70 to $ 500 usd ; gsr devices range from $ 100 to $ 500 usd , while emg devices have price ranges from $ 450 usd up to $ 1750 usd .
fall between $ 550 usd and $ 5700 usd , which already can be considered excessive for a mass telemedical lifestyle counseling application .
therefore , in an ambient assisted living ( aal ) system , the number of input sensors should be kept minimal . in the rest of the paper ,
we focus on the simplest and most researched sensor input , that is , the electrical activity of the heart .
as for the reliability of hrv sensors , there are still surprisingly few reviews reported in the literature to date on the validation of the information content of low cost sensors compared to a clinically accepted  gold standard 
some devices that were tested for validity are the sensewear hr armband , the smart health watch , the actiheart [ 36 , 37 ] , the equivital lifemonitor , and the pulseon ; and also the bioharness multivariable monitoring device from zephyr has been tested for validity [ 40 , 41 ] and reliability [ 41 , 42 ] . in all cases , a gold standard device was used simultaneously with the device under test as a method for validating data .
however , the validated devices above are high - end devices with a considerable price which present an obstacle for the penetration of telemedicine . for example
, the bioharness device has a price around $ 550 usd , whereas the price of low cost heart rate meters varies from $ 70 usd to $ 100 usd .
the lack of reliability tests of low cost devices was our motivation for our device validation study .
for automated stress detection , several methods have been published which use only hrv . in 2008 , kim et al .
melillo et al . in 2011 used nonlinear features of hrv for real - life stress detection .
hrv data were collected two times , during university examination and after holidays , on 42 students .
stress detection with classification accuracy of 90% was reported using two poincar plot features and approximate entropy .
one year later , using the same data , they designed a classification tree for automatic stress detection based on lf and pnn50 hrv features with sensitivity of 83.33% . in 2013 , karthikeyan et al . created stress detection classifiers from ecg signal and hrv features
vanitha and suresh used a hierarchical classifier to classify stress into four levels with a classification efficiency of 92%   in 2014 . in 2015
munla et al . used an svm - rbf classifier to predict driver stress with an accuracy of 83% .
the main goal of this study is the development of a reliable , robust , low price stress detection method suitable for mobile health applications .
the study included two distinct phases . in the first phase ( device validation study ) we tested the reliability of a low cost telemedical heart rate sensor against an accepted medical device . in the second phase we performed and evaluated a clinical study , using the validated telemedical sensor . among many low cost devices ,
we have chosen and analyzed cardiosport tp3 heart rate transmitter device , a simple commercial chest belt , as a source of heart rate data , because this is one of the few devices that can measure both heart rate and millisecond accurate rr time interval data .
since this device does not have its own memory for storing data , we used a nexus 7 tablet with android version 4.4.2 to connect to the device with the bluetooth 4.0 protocol and store the measured data on the tablet .
device was a schiller mt-101/mt-200 holter device which was designed for clinical use ( see figure 1 ) .
five healthy male volunteers used the two devices simultaneously during a 24-hour long period in order to make the measurements ( see figure 1 ) . for chest belt sensors ,
the temporary detachment or dislocation of the sensor during physical activity or sleep is a common source of errors according to our experiences .
though this problem could be mitigated by using tapes for fixing the device firmly to the body , we felt that such discomfort would not be tolerated in a real aal situation , so we did not use tapes and used only the daytime 12 hours of the overall signal for analysis .
after the monitoring period , we collected the devices and stored the measured data in a unified database . the protocol was reviewed and approved by the institutional ethics review board in january 2014 .
the volunteers expressed their informed consent to participate and expressed that they understand the goals of the study before the experiment .
the comparison of the measured data was a hard task due to the different designs of the gold standard and the telemedical device .
however , we wanted to compare signals directly in the time domain and also to develop a data cleaning algorithm for the removal of the noisy parts of the cardiosport device measurements , without using the gold standard data .
as the chest belt is not firmly attached to the body , even a slight movement of the device could sometimes cause signal loss ( especially during sleep ) .
therefore , we created a software module for synchronization and data cleaning before any further analysis .
data cleaning meant to remove obviously bad data ( artifacts ) and to keep only  good  data segments of sufficient length , because , as a rule of thumb , both hrv and poincar plot computation require data chunks of at least 5 minutes .
even though the data cleaning algorithm removes lots of data from the original signal , such a procedure poses no great obstacles for further calculations since we still have enough  good  data during daytime .
since the time stamps of the measured records can shift due to device buffering , we used a simple procedure to synchronize the data measured by the cardiosport device with those measured by the gold standard device in order to facilitate their comparison .
the algorithm uses a sliding window that passes from the beginning of the chest belt signal to the end and calculates the absolute error between the two signals .
when sliding is over , the location of the sliding window with the minimum absolute error is considered as the point where the two signals should be synchronized .
this applies only if the correlation of the data in the sliding window and the same amount of data from the gold standard are higher than a minimum set by the user
. if these conditions are met , the algorithm copies data from the sliding window into a newly generated third signal which represents the chest belt signal fully synchronized with the gold standard signal .
if conditions are not met , the third signal is filled with zeros . at the end
, the algorithm extracts all the highly correlated segments from the third signal skipping zero values . also , a file with all the merged segments
the algorithm uses the following 5 main parameters , with their values determined empirically in parentheses : ( i)window size : how much data is copied from the signal into the sliding window ( default : 200 ) .
( ii)window shift step : number of samples by which we shift the sliding window in each iteration ( default : 50 ) .
( iii)absolute error window : how much data will be used to calculate the minimum absolute error ( default : 200 ) .
( iv)maximum error distance : number of samples by which we shift the absolute error window in order to find the minimum absolute error ( default : 1000 ) .
( v)minimum correlation : minimum correlation , expressed as a percentage , required for the two signals to consider data in the chest belt signal accurate ( default : 97% ) .
window size : how much data is copied from the signal into the sliding window ( default : 200 ) .
window shift step : number of samples by which we shift the sliding window in each iteration ( default : 50 ) .
absolute error window : how much data will be used to calculate the minimum absolute error ( default : 200 ) .
maximum error distance : number of samples by which we shift the absolute error window in order to find the minimum absolute error ( default : 1000 ) .
minimum correlation : minimum correlation , expressed as a percentage , required for the two signals to consider data in the chest belt signal accurate ( default : 97% ) .
we performed time- and frequency - domain analysis and computed the correlation and mean absolute percentage error of the two measurements .
the time- and frequency - domain analysis for hrv was performed in kubios hrv analysis software , while the rest of the analysis was performed in microsoft excel .
we developed a simple data cleaning algorithm to be used in a real telemedical scenario , for automatically finding good parts of the signal , even without gold standard data .
first , we compare the timestamp of each data item with the timestamp of the previous one .
if the difference between the timestamps is bigger than 3 seconds , we mark this data as a gap .
three seconds is used for gap detection because the chest belt has a buffering system that can tolerate short detachments of the device from the body .
if more than 3 seconds is used , some data could be missing which could cause errors in further data analysis . in the second step
it is important to emphasize that we do not modify the data in any way as this could potentially result in false results in the subsequent analysis . instead
the abnormal values are identified by observing the mean value of 20 contiguous samples ( 10 previous and 10 following ones ) . if this mean value differs from the value of the current sample by more than 300 , we consider it invalid and mark as gap / error in the signal .
finally , we extract the good segments from the signal with a length of more than 5 minutes .
46 healthy volunteers , mostly university and high school students ( 27 men and 19 women ; average age : 24.6 years ) , participated in the experiment .
the experiment was divided into two parts with a duration of 10 minutes each , so the whole procedure lasted for 20 minutes . in the first part
, the participants were asked to try to relax in upright sitting position while listening to relaxation music .
the second part of the experiment was a mental task designed to serve as a source of mental stress .
we used the stroop color test smartphone game   which is commonly applied to induce mental stress in similar studies . in this game
, the user must connect colors to labels at an ever increasing pace . since controlled breathing and posture
have been reported before influencing hrv features , we asked the participants not to control their breathing and to sit still in the same position during the whole experiment .
this was also necessary to prevent the detachment of the chest belt from the body .
the participant was asked about her / his subjective stress levels on a relative scale three times , that is , before the experiment , after the relaxation part , and after the game playing part . the answers along with her / his age and gender were recorded in a simple questionnaire ( see appendices a - b ) .
the reason for such questions was that , though less expected , game playing may be more relaxing for some people than music , and only if we actually succeeded in raising the stress level in the second part compared to the first part , can we expect any algorithm or method to detect the stress .
the protocol was reviewed and approved by the institutional ethics review board in january 2014 .
the volunteers expressed their informed consent to participate and expressed that they understand the goals of the study before the experiment .
after the experiment all data was stored in a unified database , and the data cleaning algorithm described in section 2.1 was run on both 10-minute parts of each record .
segments of at least 5 minutes in both parts were excluded from the further analysis .
similarly , we excluded those who  despite our efforts for provoking stress in the experiment  reported no increase of stress level due to game playing .
we used the kubios software package for getting hrv features and later we analyzed and compared data using the medcalc software and microsoft excel .
wilcoxon paired - samples test was used as a tool for determining significant changes between the two parts of the experiment for the measured values of the hrv features and a p value of < 0.05 was considered as significant .
correlation , percentage differences , average percentage differences , and minimum percentage differences were also calculated for all the observed hrv features .
we developed a simple algorithm to detect stress that uses only time - domain hrv features .
the reason for excluding frequency - domain features is that they require much more computing power to calculate than time - domain features , an argument that we should consider in a solution designed for mobile devices .
we used a combination of the mean hr , pnn50 , and rmssd features to identify stress . a sliding window over the hr signal
we tested various lengths of the sliding window and the shortest width of the window that achieved good result was 560 rr intervals with shift of 20 rr intervals in each step .
we used brute force technique to find best threshold values for each hrv feature . as a result
, stress is detected by the algorithm if the mean heart rate in the fourth part compared to the first part increases by more than 5% , and rmssd and pnn50 values decrease by more than 9% in the fourth part compared to the third part .
so for the sake of calculating accuracy , specificity , and sensitivity , rest state is considered if stress was not detected .
therefore , instead of detecting the subject 's physiological state of stress , the purpose of our algorithm is to detect those stressful events which have negative impact on the subject 's current state but which may or may not lead the subject into a stressful state .
a series of stressful events instead of a single major event can also gradually put the subject into a stressful condition . in a binary classification model
this could lead to the false conclusion that only the last event was the one which caused stress , while all the previous events are not taken into consideration and remain hidden .
we note that though it is true that the hrv features may be due to other factors such as depression and mood , we postulate that these factors do not change during the experiment .
in contrast , the proposed method uses a well - defined change in the hrv features to detect the beginning of the ( induced ) stressful state ; therefore we expect no false positive stress detections due to such factors . 

figure 2 shows a summary flow chart of the proposed stress detection algorithm which implements the above procedure . in order to test the power of this algorithm
, we compared its performance to two state - of - the - art algorithms from the same author , melillo et al .
the algorithm described in   uses the pnn50 feature from the time domain and the lf feature from the frequency domain to create a simple classification tree .
stress is detected if lf < 899.58 and pnn50 > 0.9873 or if lf > 277.28 and pnn50 < 0.9873 .
restful state is detected if lf > 899.59 or if lf > 277.28 and pnn50 < 0.9783 .
for extracting the lf and pnn50 features , we used the same software as the authors of this algorithm , kubios .
our experiment consisted of two 10 minutes long periods so we extracted two 5 minutes long segments from relaxation part and two 5-minute segments from game playing part .
if stress was detected in any one of them , we marked the whole 10-minute part as stress .
if both parts were detected as rest , then whole 10-minute part was marked as rest .
a stress detection method based on nonlinear analysis   was the next algorithm we used .
this algorithm uses three nonlinear features : poincar plot sd1 , poincar plot sd2 , and approximate entropy ( en ) . according to the method
, stress is found if(1)10.64 + 203.99sd1108.74sd28.26en0.2>0.to reconstruct this algorithm we used microsoft visual c # to calculate approximate entropy based on formula described by authors .
a sliding window was used to scan the whole relaxation part as well as the game playing part .
if stress was found in any step , we marked the whole 10-minute period as stress and , similarly , if rest was detected on all steps of whole part , we marked that part as rest . in order to compare the performances of the three methods , we computed the accuracy , specificity , and sensitivity for each of them . for this , we registered a true positive result if the method marked the game playing part as stress , a true negative result if the relax music part was marked as rest , a false positive result if the relax music part was marked as stress , and a false negative result if the game playing part was marked as rest .
the longest segment that is highly correlated with the gold standard data is 110 minutes long .
the default parameter settings minimize the number of overly short ( < 5  min ) segments .
most of the bad segments ( figure 3 ) are shorter than one minute , and only one bad segment was 60 minutes long .
the synchronization procedure resulted in highly ( > 97% ) correlated synchronized data segments with various durations .  
subject # 1 had the lowest usable time with only 2 hours and 6 minutes .
the most probable reason for such a low time is the chest hair which reduced the contact between electrodes and the skin .
table 2 shows results in time domain for the schiller and the cardiosport devices after using our algorithm for the synchronization of signals .
the time - domain analysis shows pretty close values for both mean rr values and standard deviation .
the formula used for computing the standard deviation of rr intervals is as follows:(2)std  rr=1n1j=1nrrjrr2.average mean rr values for schiller and cardiosport devices are 850.80 and 870.69 , respectively .
average std rr for the schiller device is 108.42 and it is 110.93 for the cardiosport device . the frequency - domain analysis is presented in table 3 . the absolute power was compared for very low frequency ( vlf : 00.04  hz ) , low frequency ( lf : 0.040.5  hz ) , and high frequency ( hf : 0.150.4  hz ) and ratio between low frequency and high frequency ( lf / hf ) .
the results show no significant difference between schiller and cardiosport device values . the average mean absolute percentage error ( mape ) between the two signals is 2.32% with a high average correlation of 99.67% .
we run the data cleaning algorithm described in section 2 on the data recorded by the chest belt .
similar to the synchronization process , we got a very short duration for one subject and we excluded this subject from further analysis .
it is important to note that , due to the noise on schiller device records , we had to remove noisy parts from the  gold standard  signal as well .
therefore , even though the signal was recorded for 12 hours continuously , the overall duration is much less .
the calculation shows that , in the worst scenario , only 45% of the signal can be used for analysis using this data cleaning method .
table 5 shows the results of data analysis in the time domain after removing bad parts with the data cleaning algorithm .
we can see that the mean rr intervals for the schiller and the cardiosport devices are 851.14 and 871.23 and the standard deviations are 104.61 and 106.35 , respectively .
in general , the cardiosport device has slightly greater values but they are very close .
the minimum , maximum , and average percentage errors on the whole signal were calculated using a 5 minutes long sliding window with one - minute shift step ( table 6 ) . only one subject had a very high maximum error value of 33.86% . by visual examination
, we determined that the cause of this high error percentage was in fact the presence of artifacts in the  gold standard  schiller device measurements . despite that , average error values are at a very low level of 2.20% . 

figure 4 demonstrates the typical relationship between the cardiosport and schiller measurements using a scatter plot for subject # 5 .
the average mean absolute percentage error ( mape ) between the two signals was 2.62% with a high average correlation of 98.76% .
five subjects were excluded from further analysis because they reported a decrease ( instead of the expected increase ) of their stress level while playing the stroop game .
as an explanation , some participants reported that playing the game was much more joyful than relaxation music .
others reported that the game kept their mind focused and that the relaxation music brought them back to their problems and duties of the day .
after removing these records , we run the data cleaning algorithm which identified 10 noisy records , probably due to too much movement .
these were also excluded , so the active dataset decreased to 31 subjects ' records ( 20 men and 11 women ; average age = 24.7 years ) . 

table 7 shows p values of the wilcoxon paired - samples test , for the relax versus stress parts , for the relevant hrv features ( n = 31 ) .
we found a statistically significant difference for the following time - domain features : mean rr ( p = 0.0001 ) , mean hr ( p = 0.0001 ) , pnn50 ( p = 0.0103 ) , nn50 ( p = 0.0128 ) , rmssd ( p = 0.0255 ) , and hrv triangular index ( p = 0.0456 ) . in frequency domain
, two features showed statistically significant difference : hf ( ms ) with p = 0.0054 and lf ( ms ) with p = 0.0128 .
the vlf ( % ) feature was also close but not significantly different ( p = 0.0745 ) .
in nonlinear analysis , the sd1 feature showed a statistically significant difference ( p = 0.0268 ) .
the average percentage differences and the minimum percentage differences are shown in table 8 . 

table 9 shows the correlations between the important features during the relaxation part of experiment .
we can see very high positive correlation ( higher than 0.9 ) between the following features : nn50 and rmssd ( 0.94818 ) , pnn50 and rmssd ( 0.935664 ) , and pnn50 and nn50 ( 0.98966 ) .
only one very high negative correlation was found between features mean rr and mean hr ( 0.99452 ) . 

figure 5 shows , as an example , the values of an observed feature ( mean hr ) for the relaxation period and the game playing period , respectively .
the accuracy , sensitivity , and specificity values for correctly detecting stress are shown in table 10 for our algorithm , the linear algorithm proposed by melillo et al . , and the nonlinear algorithm proposed by the same authors .
there are many markers that could be used , many algorithms that could be applied , and many forms of stress which could be observed . heart rate variability , being simple and noninvasive , has recently become one of the most popular methods for detecting stress .
still , this is not an easy task , since hrv is not a single value ; rather , it consists of many features that can be observed in time domain and frequency domain or using nonlinear analysis .
the literature generally reports that , under mental stress , the mean rr , pnn50 , std rr , and rmssd features decrease , while the mean hr and lf features increase significantly .
however , significant differences for the same features and sometimes even opposite results ( e.g. , lf feature ) are also reported .
one probable cause for this inconsistency in literature could be the fact that stress is not the only condition that influences changes in hrv .
physical activity , body posture , breathing , age , gender , and illnesses all have a great influence on hrv . in this paper
, we analyzed various hrv features in order to find those that change significantly under mental stress and proposed a simple stress detection algorithm .
in the device validation study , we tested the reliability of a low cost heart rate meter .
the cardiosport tp3 heart rate meter device was used simultaneously with a professional ecg recorder ( holter ) device .
we compared the results using standard deviation , correlation , and scatter plot diagram with slope of the regression line which are commonly used in literature [ 36 , 40 , 50 ] .
however , before we analyzed the results , we used a simple data cleaning algorithm to eliminate noisy parts without using any data correction .
the data cleaning process reduces the overall duration of the signal but it increases its quality . after data cleaning ,
all results of the cardiosport device were very close to the schiller device with an average correlation of 98.73% .
the downside of the data cleaning algorithm is that it will delete sections of the signal even with the slightest detachment .
hopefully , with advance in wearable sensors , new forms of heart rate monitors like rings or bracelets with firmer attachment to body will be available . in the next step
our findings are not very different from previous research , showing that hrv can indeed be used as an indicator of mental stress .
we found that , under the influence of mental stress , mean hr increased , while mean rr , pnn50 , rmssd , and hrv triangular index decreased .
contrary to the results from literature , we did not find a statistically significant difference in std rr feature ( p = 0.1583 ) .
this could be explained by the fact that we analyzed only 10 minutes in each part of the experiment , while std rr feature describes long - term variability .
a limitation of our study is that we only analyzed the influence of mental stress .
for some subjects , the experiment failed to provoke mental stress which is of course a shortcoming of the experiment setup ; however , it would be very hard to design a method that is successful in all cases .
the stroop test was chosen because it is easy to implement and is generally accepted in the literature for such purposes . since it increases the speed of the game proportionally with the user 's results , it should increase the stress level regardless of the subjects ' cognitive level .
we believe that other factors , such as the subject 's prior experience and motivation for playing computer games , are harder to control . as a conclusion of this study we created a robust stress detection algorithm . unlike other stress detection algorithms which use several stress markers [ 51 , 52 ] , we used only hrv features for stress detection but with relatively high stress identification ratio . we were able to get an accuracy rate of 74.60% , somewhat below the 85% reported by the algorithm in ; however , the latter uses the full electrocardiogram ( ecg ) measurement compared to using only rr intervals in our case .
if we compare our algorithm with other algorithms for stress detection using only hr and hrv parameters , we can say that we achieved higher identification rate than the algorithm in   and a worse result than   or   and around 15% worse compared to [ 44 , 47 ] but we used only time - domain features for stress identification instead of frequency - domain features or using nonlinear analysis which are much more expensive to calculate . since performance of particular algorithm depends on multiple parameters like type of stressor , number of subjects , methods used , and so forth , we compared the performance of our algorithm with two state - of - the - art algorithms .
although our algorithm showed lower declared accuracy , the comparison of its performance on the same dataset showed much better results than the algorithm that uses nonlinear hrv features   and slightly better performance than the algorithm that uses linear hrv   features for stress detection . we think that the poor performance of the two tested methods could partly be due to the fact that our stressor , the stroop game , was not as strong as the university exam stressor used for the development of the melillo algorithms or driving .
such results show that the same algorithm can give very different results on different dataset meaning that comparing strictly by accuracy values is not good indicator if comparison is not performed on the same dataset .
a weakness of the proposed algorithm is that it only detects events that provoke stress for a particular subject .
however , this was not the intention of our algorithm from the beginning and we propose using combination of our algorithm with typical classification algorithms for achieving greater insight into stressful events and a subject 's current state .
a strength of our algorithm is that an event or a series of stressful events could be detected before entering into a stressful state defined by classification algorithms .
the user could be informed by sound , vibration , or other kinds of alert when stressful event happens , leading to greater awareness about daily stressors .
also , this algorithm is very simple and easy to implement in mobile environments due to the fact that all hrv features are chosen only from time domain .
from this research we can conclude that even a simple low cost heart rate monitor device can detect features that change significantly under the influence of mental stress . using these results we created a simple stress detection algorithm that is being integrated in the lavinia lifestyle counseling mobile application   for further testing and refinement in real - life stress situations .
if stress detection proves to be reliable for larger samples , it will be used in the blood glucose prediction models developed for diabetics .
 the automated detection of stress is a central problem for ambient assisted living solutions . 
 the paper presents the concepts and results of two studies targeted at stress detection with a low cost heart rate sensor , a chest belt . in the device validation study ( n = 5 ) , we compared heart rate data and other features from the belt to those measured by a gold standard device to assess the reliability of the sensor . with simple synchronization and data cleaning algorithm , we were able to select highly ( > 97% ) correlated , low average error ( 2.2% ) data segments of considerable length from the chest data for further processing . 
 the protocol for the clinical study ( n = 46 ) included a relax phase followed by a phase with provoked mental stress , 10 minutes each . 
 we developed a simple method for the detection of the stress using only three time - domain features of the heart rate signal . 
 the method produced accuracy of 74.6% , sensitivity of 75.0% , and specificity of 74.2% , which is impressive compared to the performance of two state - of - the - art methods run on the same data . 
 since the proposed method uses only time - domain features , it can be efficiently implemented on mobile devices . 
1. Introduction
2. Methods
3. Results
4. Discussion
5. Conclusions