Next Article in Journal
A Multi-Beam Satellite Cooperative Transmission Scheme Based on Resources Optimization and Packets Segmentation
Next Article in Special Issue
Two-Stage Recognition and beyond for Compound Facial Emotion Recognition
Previous Article in Journal
Optimal Control of Centralized Thermoelectric Generation System under Nonuniform Temperature Distribution Using Barnacles Mating Optimization Algorithm
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Mental Stress through EEG Signal in Virtual Reality Environment

by
Dorota Kamińska
*,
Krzysztof Smółka
and
Grzegorz Zwoliński
Institute of Mechatronics and Information Systems, Lodz University of Technology, Stefanowskiego 22 Str., 90-924 Lodz, Poland
*
Author to whom correspondence should be addressed.
Electronics 2021, 10(22), 2840; https://doi.org/10.3390/electronics10222840
Submission received: 30 September 2021 / Revised: 5 November 2021 / Accepted: 15 November 2021 / Published: 18 November 2021
(This article belongs to the Special Issue Human Emotion Recognition)

Abstract

:
This paper investigates the use of an electroencephalogram (EEG) signal to classify a subject’s stress level while using virtual reality (VR). For this purpose, we designed an acquisition protocol based on alternating relaxing and stressful scenes in the form of a VR interactive simulation, accompanied by an EEG headset to monitor the subject’s psycho-physical condition. Relaxation scenes were developed based on scenarios created for psychotherapy treatment utilizing bilateral stimulation, while the Stroop test worked as a stressor. The experiment was conducted on a group of 28 healthy adult volunteers (office workers), participating in a VR session. Subjects’ EEG signal was continuously monitored using the EMOTIV EPOC Flex wireless EEG head cap system. After the session, volunteers were asked to re-fill questionnaires regarding the current stress level and mood. Then, we classified the stress level using a convolutional neural network (CNN) and compared the classification performance with conventional machine learning algorithms. The best results were obtained considering all brain waves (96.42%) with a multilayer perceptron (MLP) and Support Vector Machine (SVM) classifiers.

1. Introduction

The feeling of stress is inherent to human beings and cannot be separated from human existence. It is evoked and associated with a multitude of issues humans struggle with such as surgical trauma, emotional arousal, mental or physical effort, fatigue, pain, fear, need for concentration, humiliation, frustration, intoxication with drugs or environmental pollutants [1]. However, it is not only negative emotions or events that trigger the feeling of stress, as it can also accompany unexpected success, a lifestyle change or unpredicted opportunities. Stress can also have a positive and motivating effect since the increased value of so-called healthy stress brings about higher productivity. A very general definition of stress can describe it as the perception of threat, causing anxiety discomfort, emotional tension, and difficulty in adjustment [2]. Our ancestors’ neural system developed an automatic mechanism called a fight-or-flight response in order to facilitate making a split-second decision about the reaction to a perceived attack, harmful event or threat to survival. The sympathetic nervous system immediately releases hormones such as adrenaline and cortisol as a way of preparing the body for emergency and the physical symptoms that follow include a faster heartbeat, tightening of muscles, rising blood pressure, quickened breath and the sharpening of senses. These physical changes increase strength and stamina, speed up reaction time and enhance focus, preparing for confrontation [3]. The nervous system reacts in a similar fashion during non-life-threatening adversities such as daily struggles with traffic jams or work. If this automated response is triggered too quickly or exceeds a certain level of intensity, it can be damaging to mental and physical health, alter the emotional state negatively and have a detrimental effect on productivity and the quality of life of an individual [4]. Chronic or exceedingly intensive stress can lead to a variety of negative effects on human health such as anxiety, depression, irritability, sleeping disorders or headaches. What is more, it contributes to many disabilities worldwide and represents a severe economic burden [5]. The longer the period of exceeded stress, the more negative the impact is on both mind and body. The annual stress study conducted by the American Institute of Stress reported that the average stress level in the United States grew from 4.9 to 5.1 on a scale from 1 to 10 in 2015, the main stressors being employment and money [6]. Recently, the World Health Organization (WHO) has named stress as the “Health Epidemic of the 21st Century” [2].
VR is a computer-generated three-dimensional interactive artificial environment. Its physical expression is a computer simulation presenting a fully explorable environment which allows interaction with objects and avatars. It is usually three-dimensional and aims at creating a mirror image of the real world, with its appearance and physical phenomena [7]. Currently, the most effective way of experiencing VR is by using head-mounted display (HMD) systems, which comprise a device worn on the head or a helmet with a built-in display and lenses. It allows the user to immerse themselves in the virtual world with the help of a wide viewing angle, head and hand movement tracking and controllers [8]. What is more, HMD not only provides visual feedback, but may also include other modalities such as aural, haptic, etc. [9].
From the review of research using VR in the therapy of mental disorders, it appears that this type of technology may be conducive to alleviating the symptoms of stress-related [10,11,12] and anxiety disorders [13,14]. Since VR-generated environments may reflect real situations, they can be used as a trigger of various thoughts, feelings and behavioral responses in the context of affective computing. For example, in [15], anxiety was triggered by a VR environment scenario presenting a stressful job interview, and in [16] by virtual traffic lights.
The literature regarding stress recognition is extensive and may consider different information such as facial expressions [17], speech [18], gestures [19], and psycho-physiological signals [20]. Another method that proves reliable in stress recognition is EEG, which tends to provide informative characteristics in responses to the subject’s mental state.
In general, an EEG records the changes in the electrical potential on the skin surface resulting from the activity of neurons of the cerebral cortex, through electrodes arranged along the scalp [21]. The examination is usually performed for monitoring and diagnosing a number of diseases, although it is being more and more frequently used in biofeedback [22] and in brain–computer interfaces [23], for example, in cognitive state recognition [24,25].
This paper investigates using an EEG signal to classify a subject’s stress level using a VR environment. For this purpose, we designed an acquisition protocol based on alternating relaxing and stressful scenes in the form of a VR interactive simulation, accompanied by an EEG headset to monitor the subject’s psycho-physical condition. Relaxation scenes were developed based on scenarios created for psychotherapy treatment utilizing bilateral stimulation [26,27,28], while the Stroop [29] test worked as a stressor. The experiment was conducted on 28 healthy adult volunteers (office workers) participating in a VR session. Subjects’ EEG signal was continuously monitored using the EMOTIV EPOC Flex wireless EEG head cap system. Then, we classified the stress level using a convolutional neural network (CNN) and compared the classification performance with conventional machine learning algorithms.
Several experiments were conducted to assess emotional responses induced in VR environments using different EEG headsets (for example, [30,31,32]). However, according to our best knowledge, none of them investigate automatic emotion recognition. This work combines both areas, a VR-based emotion induction and automatic response recognition, with the following contributions:
  • Investigation of automatic stress recognition induced in a VR space for the purpose of the analysis of brain wave parameters that are the most discriminative for such an analysis.
  • Analysis of classification performance for individual electrodes to investigate how their number can be minimized without affecting the recognition quality.
  • Analysis of the EMDR method’s effectiveness in VR on decreasing stress levels.
The rest of the paper is organized as follows: Section 2 reviews the related work in the field of stress recognition methods; we review the literature on both stress recognition approaches in virtual environments and the EEG signal analysis in the context of stress recognition. Then, in Section 3, our experiment’s protocol as well as details of the proposed method are described, followed by the experimental results and discussion. Finally, conclusions and a comparative analysis of our study are presented in Section 5.

2. Related Studies

Electrical activity of the brain recorded as an electroencephalograph (EEG) indicates the link between mental states and brain activity by providing rich information about the central nervous system activities [33]. Thus, researchers’ attention has been directed towards the recognition of an individual’s mental state (emotions, anxiety, stress) based on an EEG. For example, in [34], the authors propose a new approach to classify emotional stress in two main areas of the valence-arousal space using an EEG as the main signal—negatively excited and calm–neutral. Wavelet coefficients and chaotic invariants were used as the input to the Linear Discriminant Analysis (LDA) and Support Vector Machine (SVM) classifiers. The average classification accuracy was 80.1% and 84.9% for two categories of emotional stress states using the LDA and SVM, respectively. A similar approach is demonstrated in [35], where the authors present a framework to recognize construction workers’ stress levels using a wearable EEG device. The framework applies an SVM algorithm to detect low and high stress levels while working in different conditions.
Hou et al. [36] present an algorithm identifying four different stress levels (relaxed, engrossed, stressful and anxious) induced by a Stroop Color and Word Test (SCWT). The results of 67.06% were obtained by combining fractal dimension and statistical features and using SVM as the classifier. The SCWT was also used as a stressor in [37]. The authors designed an automatic EEG-based stress recognition systemrelying on an EMOTIV EPOC wireless device. Using the relative difference of beta and alpha power as a feature, along with SVM as a classifier, three-levels of stress were recognized with an accuracy of 75%.
In [33], the authors propose an EEG-based stress recognition application, whose training set is continuously updated with new input signals in near real-time. The authors applied different online multitask learning (OMTL) algorithms to recognize the stress level. The EEG signal was collected in two different environments: a controlled lab environment using a wired EEG and the field using a wearable EEG device. Among all tested algorithms, the OMTL–VonNeuman algorithm resulted in the best prediction accuracy on both datasets (71.14% on the first dataset and 77.61% on the second one).
The scope of the use of deep learning has expanded greatly to different application domains, including the classification of various signals representing emotional states [38,39]. This kind of approach is able to determine the most distinctive features based on enormous sets of data. Thus, similar methods are more and more frequently used in EEG signal analyses in the context of mental state recognition. The effectiveness of such an approach was proven in a subsequent paper by Jebelli [40]. The authors compared two deep learning structures: a convolutional deep learning neural network (CNN) and a Fully Connected Deep Neural Network (FC-DNN). The optimally configured DNN resulted in a maximum of 86.62% accuracy in recognizing workers’ stress. It was at least six percent points more accurate when compared with their previous handcrafted feature-based methods [33]. A similar discussion is presented in [41]. The multi-column CNN-based model delivered an improved performance with respect to the conventional manual feature-based modules. Apart from the aforementioned studies, there has not been much research conducted on the subject, which leaves room for a further examination of using deep learning to classify emotional stress throughput EEG signals.
In all the above-mentioned studies, stress was induced using short movies, logical tasks and games or triggered by real-world circumstances. Since VR can easily reproduce natural environments, allowing the user to experience a deeper immersion than in front of the screen, evoking emotions in VR becomes a natural approach. For example, in [42], the authors develop an emotion recognition system for affective states evoked through VR. A virtual environment was designed to elicit four possible arousal–valence combinations, according to the Circumplex Model of Affects. The examination involved the recording of the EEG and electrocardiography (ECG) of sixty participants. The features were extracted from these signals using various state-of-the-art metrics that quantify brain and cardiovascular linear and nonlinear dynamics. The SVM classifier predicted the subject’s arousal and valence perception with the accuracy of 75% along the arousal dimension and 71.21% along the valence dimension. A similar approach is presented in [43], where frontal EEG data were collected using textile dry electrodes during VR affective stimuli. Based on features extracted from the time, frequency and space domains and three ensemble models, including Gradient-Boosted Decision Trees (GBDT), Radio Frequencies (RF) the and SVM, they achieved a 81.30% accuracy performance. However, when it comes to stress recognition, only several papers are relevant. One of the most important research is presented in [44], where the authors tested 19 healthy young subjects performing a balance beam walking task in VR conditions to determine if exposure to high altitudes in VR induced stress. They recorded the number of steps on the beam, heart rate, electrodermal activity, response time to an auditory cue, and high-density EEG. Their findings indicate that VR provides realistic experiences that can induce physiological stress in humans.

3. Materials and Methods

In this section, we present the main components of the proposed research, starting with data collection protocol, followed by experiment description and ending with signals analysis and classification methods. The structures of proposed mental stress recognition approaches are presented in Figure 1. All steps of the pipelines are presented in details in the following sections.

3.1. Data Collection Protocol

Twenty-eight (9 females and 19 males) healthy volunteers (age: 36.53 ± 10.48 standard deviations (SD) years) from bank branches in Łódź were recruited for the purpose of this experiment (see Table 1). They were selected based on the following inclusion criteria: (1) they had no neurological or mental disorders, (2) they were using VR before and did not report VR sickness symptoms, and (3) they had normal or corrected (contact lenses) vision and no color blindness. All participants were informed about the purpose of the study and the procedure of the experiment was explained to them step by step. Subjects were informed about their right to stop the study and withdraw their consent at any moment. They authorized informed consent in writing. All participants performed the tests in a quiet and well lit environment with room temperature (23–25 C). The process of mounting EPOC Flex headset and VR HMDs is presented in Figure 2.
Each experiment set took about 20 min and it was divided into two main scenes: stressful and relaxing. Each set was repeated three times. Thus, we gathered data representing three mental stress and three relaxation (six in total) conditions per person from the whole experiment. The timing of the whole experiment is described in more detail in Figure 3.
The first scene (stressful) consisted of a Stroop test comprising typical tasks that have been used to induce stress in many previous researches [45] and the publication was one of the most cited works in the field of experimental psychology [46]. The aim of this test was to determine the color of the text. If the color of the text and the text did not match (e.g., the word “green” printed in blue font, or “red” printed in green) a subject who was asked to specify the color of the text was going to perform it more slowly and with a greater probability of error than if the text and its color were compatible (see Figure 4). Every next scene was more stressful (more difficult) and it was directly followed by relaxation scene.
The second scene had a purely relaxation purpose. The VR environment was composed of forest scenery (see Figure 5) enriched by a delicate, instrumental theme with the sounds of chirping birds. Therapeutic exercise involved following the sphere, which was moving horizontally. The sphere moved constantly in the subject’s field of view, and a properly performed exercise denied the possibility of head movement. In contrast to stressful scenes, every next relaxation scene was identical.
At the beginning of the experiment, the operator presented the subject with the standard protocol of experiment. The protocol included information on the procedure of EEG and VR headset installation and time of VR immersion. All subjects were free to ask any questions they deemed necessary. The sequence of the actions was the following: information to the subject, EEG and VR headset mounting, immersion, VR and EEG headset unmounting. The target platform was Oculus Quest [47] (individual resolution of 1440 × 1600, refresh rate of 72 Hz, 104 horizontal and 98 vertical FOV).

3.2. Compliance with Ethical Standards

All objectives of the experiment were achieved with low ethics level, according to the Polish National Science Center. Participants were informed (1) about the purpose of the study, (2) that they had the right to stop the experiment at any time without providing any reason and (3) that they could stop the experiment if they felt sick or had any discomfort. All the training sessions were performed under the supervision of a researcher in case there was an emergency. All participants signed informed consent, a Participant information sheet and consent form before undertaking the VR training. Additionally, we applied to the Commission on the Ethics of Scientific Research from the Lodz University of Technology and received a positive decision (#2/2021).

3.3. EEE System

The EMOTIV EPOC Flex (see Figure 6a) is a flexible 32-channel EEG system, with 16 electrodes terminating in a left wiring harness and 16 in a right wiring harness. There was an additional common-mode sensor (CMS) and driven-right-leg (DRL) sensor, which served as the reference. The electrodes were located at the positions presented in Figure 6b. The device had an internal sampling rate of 1024 Hz and, after filtering, the data collected by the controller were sent to the computer at approximately 128 Hz. The signal was transferred wirelessly, which offered much greater mobility, as well as ease of mounting the headset. EEG resolution in Epoc Flex was 14 bits, 1 LSB = 0.51 μ V (16 bit ADC, 2 bits instrumental noise floor discarded).
The EMOTIV EPOC Flex was supplied with an application called EmotivPRO, which allowed the user to view data streams and frequency analysis in real time. Raw EEG graphs were displayed as μ V per sample and frequency analysis view allowed the user to observe frequency information of a particular EEG channel [48]. Flex has in-built EEG signal pre-processing such as a high-pass filter of 0.2 Hz and low-pass filter of 45 Hz. It has been proven that EMOTIV EPOC Flex is able of capturing data similar to research-grade EEG system [49].
All of the above-mentioned functionality could be used without a custom application through the supplied control panel. The panel had a tab for each suite with a simple interface for visualizing and controlling, along with a display of the contact quality of each sensor. Additionally, Emotive provides an API powerhouse, enabling developers and researchers to create personalized applications using real-time brain data.

3.4. Background on EEG Wave Analysis

EEG signal can be analyzed taking into consideration how often and where the oscillations occurred. The first approach was based on spectrum analysis and the oscillations were characterized by the frequency. Many previous research allowed to form norms describing average values and physiological extremes of basic recording parameters. The basic rhythm of correct EEG signal of an adult is described as Alpha rhythm, which is registered in the back side of the head (in occipital, occipito-parietal and temporo-occipital areas). It is characterized by a signal change frequency from 8 Hz to 12 Hz and an amplitude of approx. 35 μ V. Alpha waves are the default ‘relaxed and alert’ modes of the brain. Comparable conditions are valid for other parts of the brain. In the frontal lobes, during time of relaxation, high alpha levels could be measured as well, and they were suppressed when the subject started being involved in other activity. A common EEG practice is the comparison of Alpha suppression levels between different parts of the brain, so as to identify the areas currently in use [50].
Another distinctive parameter of EEG recording is Beta waves (13–28 Hz) present in frontal parts of the brain in the state of conscious relaxation. Beta activity of multiple and volatile frequencies is an indicator of brain activity, problem solving, anxiety or active concentration.
Theta rhythm (4–8 Hz) with an amplitude reaching 30 μ V is commonly observed in the hippocampus and rhythm generation is dependent on medial septal area. Theta activity can be recorded in the arousal, drowsiness and meditation-like states, and it is often associated with creative, mindfull or meditative conditions. Delta waves (less than 4 Hz) with an amplitude approx. 50 μ V should not be observable in a healthy subject’s EEG record, and they indicate pathology [49].
Gamma rhythm (greater than 30 Hz) indicates physical activity, motoric functions and cognitive processes characterized by heightened activity of neural network. Basically, Gamma waves are recorded in the frontal brain parts during a quick, coupled processing such as fight/flight reaction or multitasking and task switching. In the case of the latter, Gamma bursts are easily identified when the ongoing task is moved to the short-term memory and a new task becomes processed concurrently [51,52]. Full description of individual waves is included in Table 2.
One should also mention artifacts registered during EEG signal recording, which can have various causes and can be divided into biological and technical. In case of biological artifacts, they stem from organs other than the brain which exhibit electric activity. For example, artifacts connected with muscle tension appear in almost every EEG recording and they demonstrate highest values in frontal and temporal areas [59]. Thus, before every EEG examination, a closed/open eyes trial was performed. On the other hand, technical artifacts are registered in connection with activity of electric devices. The most common source is an incomplete contact of an electrode with skin [52]. It was observable in subjects with thick or long hair and in the situation of subjects’ movements.

3.5. Data Pre-Processing

The high-density EEG files (.csv) extracted directly from the Emotive EPOC FLEX system were converted to .fif files using methods from the MNE-Python library [60]. These are data structures based on Neuromag’s FIF file format. As mentioned earlier, the signal at the earlier stage was processed by the high-pass filter of 0.2 Hz and the low-pass filter of 45 Hz built into the EPOC Flex device.
The data were pre-processed and the signal values were adjusted to the level of units required in the .fif files (the EMOTIV EPOC device records in μ V, whereas MNE library requires V). Figure 7 shows the raw signals registered for a sample person with the ranges of characteristic events marked.
Recorded EEG signals can be potentially influenced by many factors, some of them being activity of different parts of the brain, heartbeat, blinking, etc. However, as long as these various source signals are statistically independent and non-gaussian, it is usually possible to separate the sources using independent components analysis (ICA), and then re-construct the sensor signals after excluding the sources that are undesired [61,62].
ICA is a technique for unsupervised exploration of multichannel data widely used in many areas of science. The use of ICA can be found, for example, in biology and medicine [63,64,65,66,67], chemistry [68,69,70], astronomy [71,72], financial analysis [73,74], marketing [75], engineering [76], etc. ICA is also often used to preprocess data obtained from EEG [77,78,79,80].
The used MNE-Python library implements three different ICA algorithms: Infomax, FastICA and Preconditioned ICA for Real Data (Picard). The most modern one is Picard and it is more robust than other algorithms in cases where the sources are not completely independent, which typically happens with real EEG data [81]. Therefore, this algorithm was used to prepare the data in our research. Figure 8 shows a fragment of the signals recorded for a sample participant before and after applying ICA.
For all signals from each session, fitting ICA to data was performed using 32 channels. Channels were scaled to unit variance (“z-standardized”) as a group by channel type prior to the whitening by PCA (Principal Component Analysis). Number of principal components (from the pre-whitening PCA step) that were passed to the ICA algorithm during fitting was 16. The ICA method to use in the fit method was Picard. Maximum number of iterations during fit was 500.
A zero-phase finite impulse response (FIR) filter was applied using the window design method (firwin from the SciPy library; Hamming window). The parameters of the filters used (one-pass, zero-phase, non-causal high pass filter) are provided below:
  • Windowed time-domain design (firwin) method;
  • Hamming window with 0.0194 passband ripple and 53 dB stopband attenuation;
  • Lower passband edge: 1.00;
  • Lower transition bandwidth: 1.00 Hz (−6 dB cutoff frequency: 0.50 Hz);
  • Upper passband edge: 4.00 Hz;
  • Upper transition bandwidth: 1.00 Hz (−6 dB cutoff frequency: 4.50 Hz);
  • Filter length: 423 samples (3.305 s).
Detailed information about filtering EEG signals can be found in the Python-MNE library documentation and in [82].
The MNE software also includes a number of graphical tools that facilitate data preprocessing and post-analysis. Figure 9a shows the power spectral density (PSD) for each electrode. The PSD analysis, determined by the Welch method [83] in MNE software, provides a quick method of finding spectral artifacts and and outlier channels [82].
Rejection based on interpeak amplitude was also used during analyses. EEG data are inherently noisy, and trials can sometimes be contaminated due to high-amplitude artifacts, reducing the effectiveness of the search for the required information. Existing software (including MNE library), for processing M/EEG data, offer a rudimentary solution by marking a trial as bad if the peak-to-peak amplitude in any sensor exceeded a certain threshold. However, the threshold was usually set manually after a visual inspection of the data. We imposed a limitation on data quality: we rejected any epoch where the peak-to-peak signal amplitude exceeded reasonable limits for this type of channel. This was performed using the values in the rejection dictionary. These values depended on the set of equipment and recording conditions. It was necessary to find the correct balance between data quality and loss of power due to too many dropped epochs. Fortunately, we knew the event points to be analyzed and distinguished as individual epochs. Hence, it was easier to select the required rejection threshold for the methods from the MNE library. It was chosen at the level of 600 micro-Volts. At this level, all events (about 90%) were correctly detected, and no additional events resulting from disturbances in the signal of some of the electrodes were detected.
Event markers related to the beginning of the stressful situation (starting to perform indicated tasks) and to the beginning of relaxation between tasks were also included in the data structure. To facilitate the analysis, the stress-related markers were divided into individual signals. Ultimately, a single data structure consisted of EEG signals (32 channels in the international 10–20 system described with names according to the standard) in Figure 6b and event signals EMDR, Stroop 1 , Stroop 2 and Stroop 3 . According to the description, a maximum of three stress-inducing events and three relaxations occurred during one session.

3.6. Classification

The final step of the proposed method was classification, which aimed to assign unknown data to a specific category (in this case: stress and relaxation response). We applied two different approaches—machine learning as well as deep learning Neural Network (NN)—in order to compare their performances based on the recognition rates.
In case of machine learning methods, the feature vector consisted of the average GFP values of a given frequency group for the first, second and third minutes of a particular event. The verification of efficiency of feature subsets (subsets consisted of separate brain wave groups) was carried out using several types of classifiers such as k-nearest neighbors algorithm (k-NN), support-vector machines (SVM) [84], Multilayer Perceptron (MLP) [85] and Random Forest (RF) [86] using Weka [87], with 10-fold cross-validation [88]. This approach allowed the evaluation of the efficacy of particular features set and determined the most efficient ones. In the course of the research, the parameters for each classifier were identified and selected to achieve the highest recognition results.
In case of second approach, we used a CNN based on low-level features (raw signal and frequency information) in terms of stress recognition efficiency. The application of CNN for EEG-based stress recognition is illustrated in Figure 10. The input was in a form of time-frequency representation (TFR) images—averaged values from all electrodes. Morlet wavelet transform, which is equivalent to a complex sinusoid with Gaussian envelope [89,90], generating a time–frequency representation of the EEG signal was used to create the images. An example of a set of images can be seen in Figure A1 and Figure A2. When creating the images, the frequency range (Y axis) was adopted from 1 Hz to 28 Hz, with the same 3 Hz step that was chosen because such a division provided practically correct boundaries at the dividing points between alpha, beta waves, etc. The time was set at the first minute from the beginning of the event. According to the EEG record analysis, this was a sufficient time to notice the differences between the analyzed emotions.
For CNN’s following architectures were tested: containing from 2 to 3 convolution layers (each convolution layer was followed by a max pooling layer) followed by 1 to 2 dense layers, from 50 to 400 neurons for convolution and 50 to 200 for dense neurons. For all CNN types, separate models were built, increasing the neuron count on each layer by 25 for each new model. The best results (87.5%) were obtained for a network of 4 layers, 3 layers of convolution neurons 250, 250, 100 for each layer, respectively, and a dense layer of 100 neurons.
We used leave-one-subject-out cross-validation. All CNNs were trained using ADAM [91] for gradient descent optimization and cross-entropy as the cost function, as it is a robust method, based on well known classical probabilistic and statistical principles, and are, therefore, problem-independent. It was capable of efficient solving difficult deterministic and stochastic optimization problems [92]. Training was set to 500 epochs with an early stop condition if no loss decrease was detected for more than 30 epochs.
To investigate which electrodes from EMOTIV EPOC Flex were redundant for such research, we analyzed the classification performance for each electrode separately.

4. Results and Discussion

In this section, we summarized the experimental outcome of the study, followed by their interpretation.

4.1. Data Analysis Results

The standard EEG procedure was based on the analysis of a response to specific stimuli/events. The occurrence of such a stimulus was used to define the epoch, which was based on the recorded signals just before the stimulus and after the stimulus for a specified period of time. Signal values could be stored in the form of all channel values (in MNE software, the epoch class is responsible for this) or in average form (evoked class).
By analyzing successive epochs related to events in the obtained data, only in a few participants was it possible to find a clear change in the amplitude of signals at the beginning of a given event. There were two samples showing exemplary signals and topographic maps at specific time points for stress-related epochs, and they are illustrated in Figure 11. This figure also presents the delay in the reaction to the test initiation, characteristic for the remaining cases. The lack of a clear response to the start of the event in most samples might have been due to the absence of a distinct stimulus at the start of the event.
Specific events were spread in time (2–4 min) and, in most samples, when analyzing the entire course of the recorded EEG waveform, it was possible to observe a clear difference in the frequency of individual signals for a given event (Figure 7). Observing the signals from individual electrodes for three stressful situations, we noticed three changes in the signals in 11 participants, two changes in 10 participants, and one change in 4 participants. In three cases, the change was negligible.
It should be noted that, particularly, the initiation of the first of the three stress-related events was often poorly distinguishable from the signals recorded before the event (see the start of Stroop 1 in Figure 7). This may have been due to the fact that the event occurred within 2–3 min of the session, so the participant may have still been uncomfortable in the clinical situation and, potentially, a little bit stressed by the new experience. Only the first cycle of relaxation made it possible to record a stressful situation more clearly.
The other circumstance relevant to the recorded signals was that the stress phases did not end abruptly with the start of the relaxation phase. It was rather a smooth transition, so that there was no clear line separating the events. Therefore, the next step was a thorough analysis of the frequency spectrum in individual events.
Based on the published literature, epoching was performed for each trial over a time window of 3 s, and the resulting files were high-pass filtered at 0.1 Hz. The analyzed frequency band range was 0–60 Hz, with band splitting Alpha, Beta, etc.
The next step was to analyze specific frequency bands during the occurrence of particular events. In EEG signals, several types of activity characteristics for certain frequencies and amplitudes could be distinguished. There were five essential groups based on the different frequency ranges. They were Alpha ( α ), Theta ( θ ), Beta ( β ), Delta ( δ ) and Gamma ( γ ) bands. The terms and bands presented in Table 2 were used in the analysis, and the global field power (GFP) was used for the comparison.
The idea presented in [93] included in the MNE library documentation was adopted. The first stage was filtering the signals according to individual bands Figure 9; then, the Hilbert transform was applied. The bands were corrected and averaged, making it easy to compare the final GFP size across bands. A more detailed description of this method is presented in [94]. An example of the effect of the above is presented in Figure 12. Such calculations were performed for all participants for all stress-related and relaxation-related events.
Regarding stress, when analyzing the averaged GFP values from three stressful situations, greater values were observed for Theta, Alpha, Beta and Gamma waves at the start of the events. Then, after about 1.5–2.5 min, their suppression could be noticed. In three cases, there was no increase in intensity before the event started, although the above suppression was still reported. The remaining 10 cases were inconclusive or not consistent. After the start of the event, changes in the Alpha and Beta waves in seven cases caused a decrease of about 1.5–2 min in the Beta/Alpha ratio.
The most characteristic feature of the relaxation-related brain wave charts in the studied cases was the presence of Theta and Alpha waves before the start of the event and their gradual suppression within 1–2 min. This occurred in 14 cases and a potential explanation of this phenomenon was that the onset of the relaxation event occurred just after the stress and relaxation was not instantaneous but gradual. Only in four cases one could notice changes in brain waves at the start of the event. In nine cases, the gradual suppression of Beta 0 waves was also clearly visible, and in 10 cases, the gradual suppression of Beta 1 waves.
It should be added that this analysis was based on reviewing six waveforms for 28 participants and for two different events, which amounted to 336 waveforms. In the next step, we determined the mean values in the next four minutes for each wave and event. The results are collected in Figure A3 (stress) and Figure A4 (relaxation). The means were calculated for one minute before a given event (marked as 0 (min)) and for three consecutive minutes after the event (marked as 1, 2, 3 (min)). The values for individual participants differed; therefore, in the next step, the number of minimums and maximums for a particular participant in a given time range was calculated. The designated minimums and maximums were the basis for further analyses. For relaxation (Figure A4), it can be seen that the maximum values occurred primarily for all waves just before the event (e.g., 21 of 28 maximums at time 0 (min) for the Theta wave). This was because relaxation occurred immediately after the stress event. The second and third minutes were characterized by a reduction in the calculated minimum values for a given participant. For stress, the results were more variable (Figure A3). The greatest number of changes in the first minute from the start of the event could be seen for the alpha wave. For 18 participants, in the first minute, there was a maximum for the alpha wave. The acquired mean values were used to classify the state of stress and relaxation.
Overall, in more than half of the cases, traits characteristic of stress-related and relaxation-related events were observed in the recorded brain waves. Sedation usually appeared with a delay of one or two minutes. Additionally, according to the interview with the participants and the previous research of the authors of this work [95], the EMDR method using VR had a calming effect. Traits related to stress or nervousness could be seen much better when analyzing the non-averaged values of individual events. The intensity of making the participants nervous was increased, and this was also seen in the increasing levels of individual brain waves. It should be noted that some of the participants claimed after the session that the stressful situation, due to the fact that it was related to the performance of a specific task, led to increased attention and concentration, and not to nervousness. This could be seen from the increased level in Beta 1 waves and the simultaneous disappearance of Alpha waves. Due to the stress-inducing purposefully incorrect feedback introduced while solving tasks, nervousness appeared in some participants only after the stressful situation was over. Its appearance at the end of the task (Beta waves) and its gradual damping during the EMDR method was seen in about 1/3 of the cases.

4.2. Classification—Machine Learning

Classification performances (in %) of different feature representations for the set of two classes— s t r e s s and r e l a x a t i o n —are presented in Table 3.
It is clearly visible that the best results were achieved for the subsets containing Theta-related features (94.64% using SVM and MLP). The lowest results were collected in Beta-related features (Beta—76.85%; Beta 1—66.07%; Beta 2—75%), which was noticeable for all types of classifiers. Analyzing results retrieved from different patterns, a significant recognition rate improvement when using the MLP classifier could be observed in most cases. Only in the case of Alpha-related features SVM gave better results than MLF.
The overall accuracy using all features as an input vector (COMBO) could be observed compared to one source-feature set. Furthermore, in this case, the best results were achieved with MLP (96.42%). On the other hand, the lowest increase in results was observed for the k-NN algorithm (83.93%). As expected, the effectiveness of classifiers whose testing and training sets comprised features gathered from different sources was much better than those operating on one particular feature set. The number of features by combining each source set increased the quality of the classification. However, it has to be emphasized that we obtained results barely 2% lower using only Theta-related features.

4.3. Classification—CNN Model

Figure 13 shows the results obtained in the classification. The results were valid for the analysis based on the averaged values for all electrodes (the set of used images is shown in Appendix A: Figure A1 and Figure A2), as well as for each electrode separately. Due to the fact that there were 28 participants, 56 images were generated for each electrode in two classes (stress and relaxation).
The first columns present the quantities of correctly classified images. On this basis, coefficients describing the quality of the classification, i.e., F1-score, precision and recall, were determined separately for each class. The last columns show the class-averaged results. Additional factors that were determined were: CA—accuracy classification score; AUC—area under the ROC curve. Individual values of these two coefficients are, additionally, presented in Figure 14. Classification quality scores were up to 90% (AUC). According to the authors, this was a promising result, the more so as the entire frequency range was taken into account. However, it is worth noticing that equally good results could be obtained based on single, particular brain waves. An important element of this stage was also to determine which of the electrodes allowed for a better classification of the analyzed emotions. The following assessment parameters were adopted for the classification factors:
  • Value below 70%—classification ineffective;
  • Value in the range of 70–80%—classification not assigned to any of the groups;
  • Value above 80%—classification sufficient.
The indicated criteria were marked on the diagram in Figure 14. Additionally, Figure 15a (CA coefficient) and Figure 15b (AUC coefficient) show the electrode arrangement with electrodes marked, which allowed for a sufficient or ineffective classification. CA and AUC values were related, although due to slightly higher AUC values, the obtained images were slightly different for the same criteria. What drew attention was the high symmetry in the obtained results. Mid-area electrodes along the entire head (Fz, Cz, Pz, Cp1, Cp2 and Oz) gave unsatisfactory results (blue color of the electrodes). The outer electrodes (FT9, FT10, TP9 and TP10) were characterized by high-classification efficiency (red color of the electrodes) for both CA and AUC. For the AUC ratio, electrodes F3, F4, FC5, FC6, CP5, CP6, P7 and P8 also met the assumed criterion. Only the high AUC values obtained with the FP2 electrode disturbed the full symmetry.

5. Conclusions

In this paper, we investigated the use of EEG signals to classify a subject’s stress level while using a VR environment. For this purpose, we created a VR interactive simulation with relaxation scenes based on psychotherapy treatment utilizing bilateral stimulation, and used the Stroop test as a stressor. The experiment was conducted on a group of 28 healthy adult volunteers whose EEG signal was continuously monitored using the EMOTIV EPOC Flex wireless EEG head cap system. Then, we classified the stress level using CNN and conventional machine learning algorithms. The obtained results were promising and a further study is greatly encouraged as the popularity and widespread use of VR solutions requires a more systematized and automated approach for usability testing. With the current pace of technology development, it is not a theoretical need, but an immediate necessity.
Participants in the post-interview acknowledged that the developed EMDR method used in the virtual environment was excellent for relaxation, which was consistent with our previous research [95]. At the same time, some participants pointed out that the prepared ‘stressful’ tasks induced a state of focus rather than a state of nervousness. This could have directly affected the deterioration of the later stage classification results. Therefore, a more detailed participant survey should be used in future studies. Another approach might include repeating the session with the same participant, although the acquired experience of the participant could have interfered with the results.
The proposed method of using mean values from Global Field Power for individual waves divided into time units (consecutive minutes from the beginning of the event) turned out to be easier to analyze than the detailed analysis of the full distribution for a given wave that was performed at the beginning of the study. At the same time, the obtained values proved to be sufficient to classify two emotions, stress and relaxation, using MLP. The results exceeded 90% of the classification accuracy. The best results were obtained considering all brain waves (96.42%). When discussing individual waves, the best results were acquired from Theta (94.64%), Gamma (80.36%) and Alpha (76.78%) waves.
The proposed method of the image analysis that utilized Time-Frequency Representation (TFR) using Morlet wavelets additionally allowed an excellent classification between stress and relaxation. However, the average results were slightly lower than in the earlier stage of analyses. It may have been caused by the amount of data. Since the amount was relatively small, the CNN was more difficult to train and apply. Thus, the MLP gave better results. The method made it possible to determine which electrodes proved useful for successful classification and which were redundant. The symmetry of useful and redundant electrodes was also worth noticing. The electrodes in the middle part of the head gave unsatisfactory results, while the lateral ones classified the analyzed emotions very well. At the same time, the obtained results allowed us to focus in subsequent analyses on individual electrodes that classified the considered emotions most accurately. Decreasing the number of electrodes made it possible to analyze a much lower volume of data; thus, reducing the computing resources necessary. Additionally, it might increase the comfort of the study, because participants would be less encumbered by required equipment.
To summarize, we had a lot of concerns about measuring EEGs with the EMOTIV EPOC Flex while using the Oculus Quest HMD, since it required an intricate process of applying the gel for EEG measurements. Although the VR experience required stillness from the user, some of the recordings were rejected for further analysis due to the low quality (instantaneous signal quality was less than 95%). However, the overall results were optimistic and exceeded most results obtained in similar studies related to mental stress classification using EEG signals (for more, see the latest review on stress assessment methods using an EEG [96]). Therefore, one can conclude that due to the separation from the natural environment, VR causes a more substantial emotional involvement, which leads to a better recognition rate.

Author Contributions

Conceptualization, D.K., K.S. and G.Z.; methodology, D.K., K.S. and G.Z.; software, G.Z.; validation, D.K., K.S. and G.Z.; formal analysis, D.K. and K.S.; investigation, D.K., K.S. and G.Z.; resources, D.K., K.S. and G.Z.; writing—original draft preparation, D.K., K.S. and G.Z.; writing—review and editing, D.K., K.S. and G.Z.; visualization, G.Z., K.S. and D.K.; supervision, D.K.; project administration, D.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Figure A1. A set of pictures (TFR using Morlet wavelets) for relaxation for each participant—averaged values from all electrodes.
Figure A1. A set of pictures (TFR using Morlet wavelets) for relaxation for each participant—averaged values from all electrodes.
Electronics 10 02840 g0a1
Figure A2. A set of pictures (TFR using Morlet wavelets) for stress for each participant—averaged values from all electrodes.
Figure A2. A set of pictures (TFR using Morlet wavelets) for stress for each participant—averaged values from all electrodes.
Electronics 10 02840 g0a2
Figure A3. Average GFP values for individual brain waves and for individual participants calculated for stress. The means were counted for four minutes: 0 (min)—average for the minute before the event; 1, 2, 3 (min)—average for the consecutive minutes of the event. The number of minimum and maximum values for individual participants was summarized under the tables.
Figure A3. Average GFP values for individual brain waves and for individual participants calculated for stress. The means were counted for four minutes: 0 (min)—average for the minute before the event; 1, 2, 3 (min)—average for the consecutive minutes of the event. The number of minimum and maximum values for individual participants was summarized under the tables.
Electronics 10 02840 g0a3
Figure A4. Average GFP values for individual brain waves and for individual participants calculated for relaxation. The means were counted for four minutes: 0 (min)—average for the minute before the event; 1, 2, 3 (min)—average for the consecutive minutes of the event. The number of minimum and maximum values for individual participants was summarized under the tables.
Figure A4. Average GFP values for individual brain waves and for individual participants calculated for relaxation. The means were counted for four minutes: 0 (min)—average for the minute before the event; 1, 2, 3 (min)—average for the consecutive minutes of the event. The number of minimum and maximum values for individual participants was summarized under the tables.
Electronics 10 02840 g0a4

References

  1. Selye, H. Stress in Health and Disease; Butterworth-Heinemann: Oxford, UK, 2013. [Google Scholar]
  2. Fink, G. Stress: Concepts, definition and history. In Reference Module in Neuroscience and Biobehavioral Psychology; Elsevier: Amsterdam, The Netherlands, 2017. [Google Scholar]
  3. Stress: Symptoms, Causes and Effects. Available online: https://www.helpguide.org/articles/stress/stress-symptoms-causes-and-effects.htm (accessed on 30 July 2019).
  4. Can, Y.S.; Arnrich, B.; Ersoy, C. Stress detection in daily life scenarios using smart phones and wearable sensors: A survey. J. Biomed. Inform. 2019, 92, 103139. [Google Scholar] [CrossRef]
  5. De Palma, G.; Collins, S.M.; Bercik, P.; Verdu, E.F. The microbiota–gut–brain axis in gastrointestinal disorders: Stressed bugs, stressed brain or both? J. Physiol. 2014, 592, 2989–2997. [Google Scholar] [CrossRef]
  6. American Psychological Association. Stress Survey: American Institute of Stress. 2014. Available online: http://www.apa.org/ (accessed on 30 July 2019).
  7. Burdea, G.C.; Coiffet, P. Virtual Reality Technology; John Wiley & Sons: Hoboken, NJ, USA, 2003. [Google Scholar]
  8. Zhang, H. Head-mounted display-based intuitive virtual reality training system for the mining industry. Int. J. Min. Sci. Technol. 2017, 27, 717–722. [Google Scholar] [CrossRef]
  9. Penichet, V.M.; Peñalver, A.; Gallud, J.A. New Trends in Interaction, Virtual Reality and Modeling; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
  10. Su, Y. Eye Movement Desensitization and Reprocessing (EMDR) Therapy as a Treatment for Depression. Ph.D. Thesis, Kansas State University, Manhattan, KS, USA, 2018. [Google Scholar]
  11. Wood, E.; Ricketts, T.; Parry, G. EMDR as a treatment for long-term depression: A feasibility study. Psychol. Psychother. Theory Res. Pract. 2018, 91, 63–78. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  12. Malandrone, F.; Carletto, S.; Hase, M.; Hofmann, A.; Ostacoli, L. A brief narrative summary of randomized controlled trials investigating EMDR treatment of patients with depression. J. EMDR Pract. Res. 2019, 13, 302–306. [Google Scholar] [CrossRef]
  13. Gielkens, E.; Vink, M.; Sobczak, S.; Rosowsky, E.; Van Alphen, B. EMDR in older adults with posttraumatic stress disorder. J. EMDR Pract. Res. 2018, 12, 132–141. [Google Scholar] [CrossRef]
  14. Kakavand, A.; Jafari Jozani, R.; Ardalani, J. The efficacy of eye movement desensitization and reprocessing (EMDR) in reducing symptoms of anxiety disorders in sexually-abused students. J. Sch. Psychol. 2018, 6, 140–160. [Google Scholar]
  15. Villani, D.; Rotasperti, C.; Cipresso, P.; Triberti, S.; Carissoli, C.; Riva, G. Assessing the emotional state of job applicants through a virtual reality simulation: A psycho-physiological study. In eHealth 360; Springer: Berlin/Heidelberg, Germany, 2017; pp. 119–126. [Google Scholar]
  16. Lin, C.T.; Chung, I.F.; Ko, L.W.; Chen, Y.C.; Liang, S.F.; Duann, J.R. EEG-based assessment of driver cognitive responses in a dynamic virtual-reality driving environment. IEEE Trans. Biomed. Eng. 2007, 54, 1349–1352. [Google Scholar]
  17. Metaxas, D.; Venkataraman, S.; Vogler, C. Image-based stress recognition using a model-based dynamic face tracking system. In Proceedings of the International Conference on Computational Science, Kraków, Poland, 6–9 June 2004; pp. 813–821. [Google Scholar]
  18. Yogesh, C.; Hariharan, M.; Ngadiran, R.; Adom, A.H.; Yaacob, S.; Berkai, C.; Polat, K. A new hybrid PSO assisted biogeography-based optimization for emotion and stress recognition from speech signal. Expert Syst. Appl. 2017, 69, 149–158. [Google Scholar]
  19. Lefter, I.; Burghouts, G.J.; Rothkrantz, L.J. Recognizing stress using semantics and modulation of speech and gestures. IEEE Trans. Affect. Comput. 2015, 7, 162–175. [Google Scholar] [CrossRef]
  20. Cho, D.; Ham, J.; Oh, J.; Park, J.; Kim, S.; Lee, N.K.; Lee, B. Detection of stress levels from biosignals measured in virtual reality environments using a kernel-based extreme learning machine. Sensors 2017, 17, 2435. [Google Scholar] [CrossRef] [PubMed]
  21. Bhattacharjee, S.; Ghatak, S.; Dutta, S.; Chatterjee, B.; Gupta, M. A Survey on Comparison Analysis Between EEG Signal and MRI for Brain Stroke Detection. In Emerging Technologies in Data Mining and Information Security; Springer: Berlin/Heidelberg, Germany, 2019; pp. 377–382. [Google Scholar]
  22. Ngamsomphornpong, K.; Punsawad, Y. Development of Hybrid EEG-fEMG-based Stress Levels Classification and Biofeedback Training System. In Proceedings of the 2019 International Conference on Intelligent Medicine and Image Processing, Bali, Indonesia, 19–22 April 2019; pp. 25–28. [Google Scholar]
  23. Saif, A.S.; Hossain, M.R.; Ahmed, R.; Chowdhury, T. A Review based on Brain Computer Interaction using EEG Headset for Physically Handicapped People. Int. J. Educ. Manag. Eng. 2019, 9, 34. [Google Scholar] [CrossRef]
  24. Li, Y.; Zheng, W.; Wang, L.; Zong, Y.; Cui, Z. From Regional to Global Brain: A Novel Hierarchical Spatial-Temporal Neural Network Model for EEG Emotion Recognition. IEEE Trans. Affect. Comput. 2019, 1. [Google Scholar] [CrossRef] [Green Version]
  25. Li, P.; Liu, H.; Si, Y.; Li, C.; Li, F.; Zhu, X.; Huang, X.; Zeng, Y.; Yao, D.; Zhang, Y.; et al. EEG based emotion recognition by combining functional connectivity network and local activations. IEEE Trans. Biomed. Eng. 2019, 66, 2869–2881. [Google Scholar] [CrossRef]
  26. Mollon, P. EMDR and the Energy Therapies: Psychoanalytic Perspectives; Routledge: Oxfordshire, UK, 2018. [Google Scholar]
  27. Perna, G.R.; Sangiorgio, E.; Grassi, M.; Caldirola, D. Commentary: “Cognitive Behavioral Therapy vs. Eye Movement Desensitization and Reprocessing for Treating Panic Disorder: A Randomized Controlled Trial”. Front. Psychol. 2018, 9, 1061. [Google Scholar] [CrossRef]
  28. Faretta, E.; Dal Farra, M. Efficacy of EMDR therapy for anxiety disorders. J. EMDR Pract. Res. 2019, 13, 325–332. [Google Scholar] [CrossRef]
  29. Jensen, A.R. Scoring the Stroop test. Acta Psychol. 1965, 24, 398–408. [Google Scholar] [CrossRef]
  30. Horvat, M.; Dobrinić, M.; Novosel, M.; Jerčić, P. Assessing emotional responses induced in virtual reality using a consumer EEG headset: A preliminary report. In Proceedings of the 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 21–25 May 2018; pp. 1006–1010. [Google Scholar] [CrossRef]
  31. Tarrant, J.; Viczko, J.; Cope, H. Virtual reality for anxiety reduction demonstrated by quantitative EEG: A pilot study. Front. Psychol. 2018, 9, 1280. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  32. Amores, J.; Richer, R.; Zhao, N.; Maes, P.; Eskofier, B.M. Promoting relaxation using virtual reality, olfactory interfaces and wearable EEG. In Proceedings of the 2018 IEEE 15th International Conference on Wearable and Implantable Body Sensor Networks (BSN), Las Vegas, NV, USA, 4–7 March 2018; pp. 98–101. [Google Scholar] [CrossRef] [Green Version]
  33. Jebelli, H.; Khalili, M.M.; Lee, S. A Continuously Updated, Computationally Efficient Stress Recognition Framework Using Electroencephalogram (EEG) by Applying Online Multitask Learning Algorithms (OMTL). IEEE J. Biomed. Health Inform. 2018, 23, 1928–1939. [Google Scholar] [CrossRef]
  34. Hosseini, S.A.; Khalilzadeh, M.A.; Changiz, S. Emotional stress recognition system for affective computing based on bio-signals. J. Biol. Syst. 2010, 18, 101–114. [Google Scholar] [CrossRef]
  35. Jebelli, H.; Khalili, M.M.; Hwang, S.; Lee, S. A supervised learning-based construction workers’ stress recognition using a wearable electroencephalography (EEG) device. Constr. Res. Congr. 2018, 2018, 43–53. [Google Scholar]
  36. Hou, X.; Liu, Y.; Sourina, O.; Tan, Y.R.E.; Wang, L.; Mueller-Wittig, W. EEG based stress monitoring. In Proceedings of the 2015 IEEE International Conference on Systems, Man, and Cybernetics, Hong Kong, China, 9–12 October 2015; pp. 3110–3115. [Google Scholar]
  37. Jun, G.; Smitha, K.G. EEG based stress level identification. In Proceedings of the 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 9–12 October 2016; pp. 3270–3274. [Google Scholar]
  38. Avots, E.; Sapiński, T.; Bachmann, M.; Kamińska, D. Audiovisual emotion recognition in wild. Mach. Vis. Appl. 2019, 30, 975–985. [Google Scholar] [CrossRef] [Green Version]
  39. Sapiński, T.; Kamińska, D.; Pelikant, A.; Anbarjafari, G. Emotion Recognition from Skeletal Movements. Entropy 2019, 21, 646. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  40. Jebelli, H.; Khalili, M.M.; Lee, S. Mobile EEG-based workers’ stress recognition by applying deep neural network. In Advances in Informatics and Computing in Civil and Construction Engineering; Springer: Berlin/Heidelberg, Germany, 2019; pp. 173–180. [Google Scholar]
  41. Yang, H.; Han, J.; Min, K. A Multi-Column CNN Model for Emotion Recognition from EEG Signals. Sensors 2019, 19, 4736. [Google Scholar] [CrossRef] [Green Version]
  42. Marín-Morales, J.; Higuera-Trujillo, J.L.; Greco, A.; Guixeres, J.; Llinares, C.; Scilingo, E.P.; Alcañiz, M.; Valenza, G. Affective computing in virtual reality: Emotion recognition from brain and heartbeat dynamics using wearable sensors. Sci. Rep. 2018, 8, 1–15. [Google Scholar]
  43. Xu, T.; Yin, R.; Shu, L.; Xu, X. Emotion Recognition Using Frontal EEG in VR Affective Scenes. In Proceedings of the 2019 IEEE MTT-S International Microwave Biomedical Conference (IMBioC), Nanjing, China, 6–8 May 2019; Volume 1, pp. 1–4. [Google Scholar]
  44. Peterson, S.M.; Furuichi, E.; Ferris, D.P. Effects of virtual reality high heights exposure during beam-walking on physiological stress and cognitive loading. PLoS ONE 2018, 13, e0200306. [Google Scholar] [CrossRef]
  45. Seo, W.; Kim, N.; Kim, S.; Lee, C.; Park, S.M. Deep ECG-Respiration Network (DeepER Net) for Recognizing Mental Stress. Sensors 2019, 19, 3021. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  46. Stroop, J.R. Studies of interference in serial verbal reactions. J. Exp. Psychol. 1935, 18, 643. [Google Scholar] [CrossRef]
  47. Oculus Quest. Available online: https://www.oculus.com (accessed on 30 July 2019).
  48. EmotivPRO. Available online: https://emotiv.gitbook.io/emotivpro-v2-0/ (accessed on 30 July 2019).
  49. Williams, N.S.; McArthur, G.M.; de Wit, B.; Ibrahim, G.; Badcock, N.A. A validation of Emotiv EPOC Flex saline for EEG and ERP research. PeerJ 2020, 8, e9713. [Google Scholar] [CrossRef] [PubMed]
  50. Ward, J. The Student’s Guide to Cognitive Neuroscience; Psychology Press: East Sussex, UK, 2015. [Google Scholar]
  51. Van Drongelen, W. Signal Processing for Neuroscientists; Academic Press: Cambridge, MA, USA, 2018. [Google Scholar]
  52. Sanei, S.; Chambers, J.A. EEG Signal Processing; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
  53. Wagh, K.P.; Vasanth, K. Electroencephalograph (EEG) based emotion recognition system: A review. Innov. Electron. Commun. Eng. 2019, 33, 37–59. [Google Scholar] [CrossRef]
  54. Stinson, B.; Arthur, D. A novel EEG for alpha brain state training, neurobiofeedback and behavior change. Complement. Ther. Clin. Pract. 2013, 19, 114–118. [Google Scholar] [CrossRef]
  55. Ismail, W.W.; Hanif, M.; Mohamed, S.; Hamzah, N.; Rizman, Z.I. Human emotion detection via brain waves study by using electroencephalogram (EEG). Int. J. Adv. Sci. Eng. Inf. Technol. 2016, 6, 1005–1011. [Google Scholar] [CrossRef] [Green Version]
  56. Jatoi, M.A.; Kamel, N. Brain Source Localization Using EEG Signal Analysis; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
  57. Abhang, P.A.; Gawali, B.W.; Mehrotra, S.C. Introduction to EEG-and Speech-Based Emotion Recognition; Academic Press: Cambridge, MA, USA, 2016. [Google Scholar]
  58. Paszkiel, S. Analysis and Classification of EEG Signals for Brain-Computer Interfaces; Springer: Berlin/Heidelberg, Germany, 2020. [Google Scholar] [CrossRef]
  59. Rowan, A.J.; Tolunsky, E. Primer of EEG: With a Mini-Atlas; Butterworth-Heinemann: Oxford, UK, 2003. [Google Scholar]
  60. Gramfort, A.; Luessi, M.; Larson, E.; Engemann, D.A.; Strohmeier, D.; Brodbeck, C.; Goj, R.; Jas, M.; Brooks, T.; Parkkonen, L.; et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 2013, 7, 267. [Google Scholar] [CrossRef] [Green Version]
  61. Stone, J.V. Independent component analysis: An introduction. Trends Cogn. Sci. 2002, 6, 59–64. [Google Scholar] [CrossRef]
  62. Hyvärinen, A.; Oja, E. Independent component analysis: Algorithms and applications. Neural Netw. 2000, 13, 411–430. [Google Scholar] [CrossRef] [Green Version]
  63. Nazarov, P.V.; Wienecke-Baldacchino, A.K.; Zinovyev, A.; Czerwińska, U.; Muller, A.; Nashan, D.; Dittmar, G.; Azuaje, F.; Kreis, S. Independent component analysis provides clinically relevant insights into the biology of melanoma patients. BioRxiv 2018, 12, 395145. [Google Scholar] [CrossRef]
  64. Scholz, M.; Gatzek, S.; Sterling, A.; Fiehn, O.; Selbig, J. Metabolite fingerprinting: Detecting biological features by independent component analysis. Bioinformatics 2004, 20, 2447–2454. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  65. Engreitz, J.M.; Daigle, B.J.; Marshall, J.J.; Altman, R.B. Independent component analysis: Mining microarray data for fundamental human gene expression modules. J. Biomed. Inform. 2010, 43, 932–944. [Google Scholar] [CrossRef] [Green Version]
  66. Adali, T.; Anderson, M.; Fu, G.S. Diversity in Independent Component and Vector Analyses: Identifiability, algorithms, and applications in medical imaging. IEEE Signal Process. Mag. 2014, 31, 18–33. [Google Scholar] [CrossRef]
  67. Xu, L.; Groth, K.M.; Pearlson, G.; Schretlen, D.J.; Calhoun, V.D. Source-based morphometry: The use of independent component analysis to identify gray matter differences with application to schizophrenia. Hum. Brain Mapp. 2009, 30, 711–724. [Google Scholar] [CrossRef] [Green Version]
  68. Wang, G.; Ding, Q.; Hou, Z. Independent component analysis and its applications in signal processing for analytical chemistry. TrAC Trends Anal. Chem. 2008, 27, 368–376. [Google Scholar] [CrossRef]
  69. Lee, J.M.; Yoo, C.; Lee, I.B. Statistical monitoring of dynamic processes based on dynamic independent component analysis. Chem. Eng. Sci. 2004, 59, 2995–3006. [Google Scholar] [CrossRef]
  70. Parastar, H.; Jalali-Heravi, M.; Tauler, R. Is independent component analysis appropriate for multivariate resolution in analytical chemistry? TrAC Trends Anal. Chem. 2012, 31, 134–143. [Google Scholar] [CrossRef]
  71. Maino, D.; Farusi, A.; Baccigalupi, C.; Perrotta, F.; Banday, A.J.; Bedini, L.; Burigana, C.; De Zotti, G.; Górski, K.M.; Salerno, E. All-sky astrophysical component separation with Fast Independent Component Analysis (FASTICA). Mon. Not. R. Astron. Soc. 2002, 334, 53–68. [Google Scholar] [CrossRef] [Green Version]
  72. Chattopadhyay, A.K.; Mondal, S.; Chattopadhyay, T. Independent Component Analysis for the objective classification of globular clusters of the galaxy NGC 5128. Comput. Stat. Data Anal. 2013, 57, 17–32. [Google Scholar] [CrossRef]
  73. Grigoryan, H. A stock market prediction method based on support vector machines (SVM) and independent component analysis (ICA). Database Syst. J. 2016, 7, 12–21. [Google Scholar]
  74. Oja, E.; Kiviluoto, K.; Malaroiu, S. Independent component analysis for financial time series. In Proceedings of the IEEE 2000 Adaptive Systems for Signal Processing, Communications, and Control Symposium (Cat. No. 00EX373), Lake Louise, AB, Canada, 4 October 2000; pp. 111–116. [Google Scholar] [CrossRef]
  75. Ahn, H.; Choi, E.; Han, I. Extracting underlying meaningful features and canceling noise using independent component analysis for direct marketing. Expert Syst. Appl. 2007, 33, 181–191. [Google Scholar] [CrossRef]
  76. Uddin, Z.; Ahmad, A.; Iqbal, M.; Naeem, M. Applications of independent component analysis in wireless communication systems. Wirel. Pers. Commun. 2015, 83, 2711–2737. [Google Scholar] [CrossRef]
  77. Jung, T.P.; Makeig, S.; McKeown, M.; Bell, A.; Lee, T.W.; Sejnowski, T. Imaging brain dynamics using independent component analysis. Proc. IEEE 2001, 89, 1107–1122. [Google Scholar] [CrossRef]
  78. Zhukov, L.; Weinstein, D.; Johnson, C. Independent component analysis for EEG source localization. IEEE Eng. Med. Biol. Mag. 2000, 19, 87–96. [Google Scholar] [CrossRef]
  79. Iriarte, J.; Urrestarazu, E.; Valencia, M.; Alegre, M.; Malanda, A.; Viteri, C.; Artieda, J. Independent component analysis as a tool to eliminate artifacts in EEG: A quantitative study. J. Clin. Neurophysiol. 2003, 20, 249–257. [Google Scholar] [CrossRef] [Green Version]
  80. Vigário, R.; Sarela, J.; Jousmiki, V.; Hamalainen, M.; Oja, E. Independent component approach to the analysis of EEG and MEG recordings. IEEE Trans. Biomed. Eng. 2000, 47, 589–593. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  81. Ablin, P.; Cardoso, J.F.; Gramfort, A. Faster Independent Component Analysis by Preconditioning with Hessian Approximations. IEEE Trans. Signal Process. 2018, 66, 4040–4049. [Google Scholar] [CrossRef] [Green Version]
  82. Jas, M.; Larson, E.; Engemann, D.A.; Leppäkangas, J.; Taulu, S.; Hämäläinen, M.; Gramfort, A. A reproducible MEG/EEG group study with the MNE software: Recommendations, quality assessments, and good practices. Front. Neurosci. 2018, 12, 530. [Google Scholar] [CrossRef] [Green Version]
  83. Welch, P. The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Trans. Audio Electroacoust. 1967, 15, 70–73. [Google Scholar] [CrossRef] [Green Version]
  84. Suthaharan, S. Support vector machine. In Machine Learning Models and Algorithms for Big Data Classification; Springer: Berlin/Heidelberg, Germany, 2016; pp. 207–235. [Google Scholar]
  85. Noriega, L. Multilayer Perceptron Tutorial; School of Computing, Staffordshire University: Stoke-on-Trent, UK, 2005. [Google Scholar]
  86. Biau, G.; Scornet, E. A random forest guided tour. Test 2016, 25, 197–227. [Google Scholar] [CrossRef] [Green Version]
  87. Witten, I.H.; Frank, E.; Trigg, L.E.; Hall, M.A.; Holmes, G.; Cunningham, S.J. Weka: Practical Machine Learning Tools and Techniques with Java Implementations; Working Paper Series; University of Waikato: Hamilton, New Zealand, 1999. [Google Scholar]
  88. Refaeilzadeh, P.; Tang, L.; Liu, H. Cross-validation. Encycl. Database Syst. 2009, 5, 532–538. [Google Scholar]
  89. Quintero-Rincón, A.; Muro, V.; D’Giano, C.; Prendes, J.; Batatia, H. Statistical Model-Based Classification to Detect Patient-Specific Spike-and-Wave in EEG Signals. Computers 2020, 9, 85. [Google Scholar] [CrossRef]
  90. Scholten, M.; Schoellmann, A.; Ramos-Murguialday, A.; López-Larraz, E.; Gharabaghi, A.; Weiss, D. Transitions between repetitive tapping and upper limb freezing show impaired movement-related beta band modulation. Clin. Neurophysiol. 2020, 131, 2499–2507. [Google Scholar] [CrossRef]
  91. Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
  92. De Boer, P.T.; Kroese, D.P.; Mannor, S.; Rubinstein, R.Y. A tutorial on the cross-entropy method. Ann. Oper. Res. 2005, 134, 19–67. [Google Scholar] [CrossRef]
  93. Engemann, D.A.; Gramfort, A. Automated model selection in covariance estimation and spatial whitening of MEG and EEG signals. NeuroImage 2015, 108, 328–342. [Google Scholar] [CrossRef]
  94. Hari, R.; Salmelin, R. Human cortical oscillations: A neuromagnetic view through the skull. Trends Neurosci. 1997, 20, 44–49. [Google Scholar] [CrossRef]
  95. Kamińska, D.; Smółka, K.; Zwoliński, G.; Wiak, S.; Merecz-Kot, D.; Anbarjafari, G. Stress reduction using bilateral stimulation in virtual reality. IEEE Access 2020, 8, 200351–200366. [Google Scholar] [CrossRef]
  96. Katmah, R.; Al-Shargie, F.; Tariq, U.; Babiloni, F.; Al-Mughairbi, F.; Al-Nashash, H. A Review on Mental Stress Assessment Methods Using EEG Signals. Sensors 2021, 21, 5043. [Google Scholar] [CrossRef] [PubMed]
Figure 1. The structure of proposed mental stress recognition approach (a) using machine learning (b) using deep learning.
Figure 1. The structure of proposed mental stress recognition approach (a) using machine learning (b) using deep learning.
Electronics 10 02840 g001
Figure 2. The process of mounting EPOC Flex headset and VR HMDs.
Figure 2. The process of mounting EPOC Flex headset and VR HMDs.
Electronics 10 02840 g002
Figure 3. Timing protocol of the experiment. EMDR—Eye Movement Desensitization and Reprocessing.
Figure 3. Timing protocol of the experiment. EMDR—Eye Movement Desensitization and Reprocessing.
Electronics 10 02840 g003
Figure 4. Stroop test (a) a psychological test definition; (b) screenshot from the VR application (3rd level).
Figure 4. Stroop test (a) a psychological test definition; (b) screenshot from the VR application (3rd level).
Electronics 10 02840 g004
Figure 5. Subsequent scenes of Eye Movement Desensitisation and Reprocessing (EMDR) relaxation session.
Figure 5. Subsequent scenes of Eye Movement Desensitisation and Reprocessing (EMDR) relaxation session.
Electronics 10 02840 g005
Figure 6. The EMOTIV EPOC Flex: (a) a subject in EEG head cap system; (b) electrode positioning.
Figure 6. The EMOTIV EPOC Flex: (a) a subject in EEG head cap system; (b) electrode positioning.
Electronics 10 02840 g006
Figure 7. Signals recorded for a sample participant (RAW file).
Figure 7. Signals recorded for a sample participant (RAW file).
Electronics 10 02840 g007
Figure 8. Signals recorded for a sample participant before and after the application of ICA (selected 6 channels limited to 18 s). Disruptions in the signal were related to the exceeding of the maximum range.
Figure 8. Signals recorded for a sample participant before and after the application of ICA (selected 6 channels limited to 18 s). Disruptions in the signal were related to the exceeding of the maximum range.
Electronics 10 02840 g008
Figure 9. Example of (a) the power spectral density for each electrode and (b) power spectral density after applying filters for individual frequency bands (participant 1).
Figure 9. Example of (a) the power spectral density for each electrode and (b) power spectral density after applying filters for individual frequency bands (participant 1).
Electronics 10 02840 g009
Figure 10. The process of using a CNN for EEG-based stress recognition (a) shows the process of making the heat-map image based on EEG signals, and (b) the structure of the CNN classifier, which uses the heat-map images as its input.
Figure 10. The process of using a CNN for EEG-based stress recognition (a) shows the process of making the heat-map image based on EEG signals, and (b) the structure of the CNN classifier, which uses the heat-map images as its input.
Electronics 10 02840 g010
Figure 11. Butterfly plots based on EEG signals (32 channels) with scalp topographies for two participants; at time 0, the event with the label Stroop 2 started.
Figure 11. Butterfly plots based on EEG signals (32 channels) with scalp topographies for two participants; at time 0, the event with the label Stroop 2 started.
Electronics 10 02840 g011
Figure 12. Global Field Power for individual brain waves for participant 1, averaged values for a stressful situation.
Figure 12. Global Field Power for individual brain waves for participant 1, averaged values for a stressful situation.
Electronics 10 02840 g012
Figure 13. Classification results, mean value based on analysis of all electrodes, and values based on analysis of individual electrodes. Legend: CA—accuracy classification score; F1—f-score; AUC—area under the ROC curve.
Figure 13. Classification results, mean value based on analysis of all electrodes, and values based on analysis of individual electrodes. Legend: CA—accuracy classification score; F1—f-score; AUC—area under the ROC curve.
Electronics 10 02840 g013
Figure 14. Classification results, mean value based on analysis of all electrodes—CA.
Figure 14. Classification results, mean value based on analysis of all electrodes—CA.
Electronics 10 02840 g014
Figure 15. Electrodes with minimum (blue) and maximum (red) CA (a) and AUC (b) values in the classification (average over class).
Figure 15. Electrodes with minimum (blue) and maximum (red) CA (a) and AUC (b) values in the classification (average over class).
Electronics 10 02840 g015
Table 1. Participants characteristics (F—female; M—male).
Table 1. Participants characteristics (F—female; M—male).
Participant#1#2#3#4#5#6#7#8#9#10#11#12#13#14#15#16#17#18#19#20#21#22#23#24#25#26#27#28
SexMMMMMMMMMFFFMMFFMFMMMMFMMMFF
Age32274260295045303748472629492550232224353742372446332747
Table 2. Summary of brain wave activity [53,54,55].
Table 2. Summary of brain wave activity [53,54,55].
NameBandAmplitudeDescription
Delta0.5–4 Hz100–200 μ VThe state of deep sleep without dreams.
Too much content may indicate a brain injury, and may also be an indicator of learning disabilities. Too little content may indicate an inability to enlighten the brain.
Theta4–8 Hz30–100 μ VThey are found in most of the sleep.
They can occur during deep meditation and concentration, as well as under conditions of emotional stress [56].
Depression, hyperactivity, impulsiveness, hopelessness and inattention are observed when theta waves are visible; if they are suppressed, anxiety, poor emotional awareness and stress can be observed [57].
Alpha8–12 Hz≤50 μ VThe state of relaxation, alpha waves appear just before falling asleep and immediately after waking up.
They are also related to the state of deep reflection, reflecting on something in concentration, related to creative thinking.
They testify to well-being, peace and positive thinking. They are present in a resting position with eyes closed during ERP (event-related potential) experiments [56].
They disappear during increased mental effort, e.g., performing mathematical operations [58].
Too little of them may indicate anxiety, high stress and insomnia [57], too much content may indicate inattention and too much relaxation.
Beta
(SMR, sensorimotor rhythm)
or beta 0
13–15 Hz≤30 μ VThe state of concentration of attention, increased mental activity and alertness. Generally for beta waves, the low amplitude of this wave may indicate problems related to concentration, dreams and depression. Too high a content will be associated with nervousness, inability to relax and stress.
Low beta or beta 115–18 Hz≤30 μ VA state of very intense attention and concentration, logical thinking and controlling emotions.
High betaor beta 2>18–28 Hz≤30 μ VState of nervousness, excitement and irritation and increased mental activity. In a healthy person it may be a symptom of panic [56].
Gamma30–200 Hz3–55 μ VNumerous studies show that the amplitude of these waves increases when the subject focuses on the source of the stimulus. The duration of the gamma wave is very short and amounts to several dozen ms.
Too much of them may indicate anxiety, high agitation and stress, too little may be associated with depression and be an indicator of learning disabilities.
Table 3. Classification performances (in %) of different feature representations for the set of two classes: stress and relaxation. Numbers in bold and red highlight the maximum classification rates achieved in each column. COMBO refers to all extracted parameters in one feature-vector.
Table 3. Classification performances (in %) of different feature representations for the set of two classes: stress and relaxation. Numbers in bold and red highlight the maximum classification rates achieved in each column. COMBO refers to all extracted parameters in one feature-vector.
k-NNRFSVMMLP
Theta91.0792.8694.6494.64
Alpha62.5060.7176.7873.21
Betha 057.1450.0064.2866.07
Betha 151.7855.3562.5066.07
Betha 253.5753.5771.4375.00
Gamma57.1457.1471.4280.36
Combo83.9394.6496.4296.42
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kamińska, D.; Smółka, K.; Zwoliński, G. Detection of Mental Stress through EEG Signal in Virtual Reality Environment. Electronics 2021, 10, 2840. https://doi.org/10.3390/electronics10222840

AMA Style

Kamińska D, Smółka K, Zwoliński G. Detection of Mental Stress through EEG Signal in Virtual Reality Environment. Electronics. 2021; 10(22):2840. https://doi.org/10.3390/electronics10222840

Chicago/Turabian Style

Kamińska, Dorota, Krzysztof Smółka, and Grzegorz Zwoliński. 2021. "Detection of Mental Stress through EEG Signal in Virtual Reality Environment" Electronics 10, no. 22: 2840. https://doi.org/10.3390/electronics10222840

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop