Keywords

1 Introduction

In general we studied human brain functions performing different cognitive loads. In this contribution we want to explore the effect of load on the brain using band power, band frequencies by performing different band ratios. Normally implementing machine learning algorithms for classification of good and bad subjects [1].

Cognitive workload based on electroencephalography (EEG) is an important marker of brain activity for workload analysis (mental effort). Cognitive workload is a measurement of the load placed on memory and other executive functions that are used to demonstrate cognitive abilities. Memory load was investigated using EEG signals during cognitive tasks inducing seven levels of workload using arithmetic tasks [2, 3]. The variations in brain lobes for different load levels are investigated [4].

The total electrical oscillations in layer potentials created by the interconnection of the principal inhibitory and excitatory neurons are represented by the EEG signal [5, 6]. Mind wandering (MW) episodes, like concern, are characterized by the appearance of task-unrelated feelings and ideas that divert attention away from the current task [7]. Mind Wandering can happen when you’re doing something else, and it shows up as you think about something else [8]. Prospection and future planning [9], creativity [10], and mental breaks, which can help you get out of a bad mood [11], have all been linked to Mind Wandering. Others have consistently viewed Mind Wandering as a condition of diminished working memory and attentional control [12, 13] and as a predictor of performance errors, in addition to its relationship with these more positive processes. Mind Wandering has also been linked to a reduction in attention and focus [14, 15]. Increase in EEG theta band power and decrease in EEG beta band power were linked to a state of Mind Wandering in a proof-of-concept study; [16] reported that a condition of Mind Wandering was associated with high EEG theta band power and low EEG beta band power. When you’re awake and close your eyes, your alpha waves are higher than when you’re awake and open your eyes [17].

Power has been found to predict various aspects of cognitive performance on other tasks. Many such research has found that good memory performance is linked to higher resting power [18], and that a higher ERD is correlated with better effectiveness on a semantic search task [19]. External stimulus, such as task-relevant visual pictures or warning signs, suppresses alpha waves during cognitive activities [20]. During brief waiting times between task attempts [21, 22] and mental imagery, which demands inward-directed thought [23], alpha waves are increased. Decreases in perceptual discrimination have been linked to enhanced alpha activity prior to an incoming stimulus [24]. The task-related power variations show that alpha activity is sensitive to cognitive demands: it is repressed in response to sensory stimulation and boosted during periods of no stimulation [25].

The role of alpha power in the suppression of sensory processes to protect thinking from continuing distraction has been demonstrated in numerous studies [26, 27], and it is a promising metric to describe Mind Wandering [28]. Although some studies have observed the contrary tendency, our findings are consistent with multiple earlier findings that connect greater alpha power with Mind Wandering in the frontal, occipital, and posterior parts of the brain [29,30,31]. When compared to episodes of focused attention, a high in theta and a low in beta power have been reported during Mind Wandering [32].

In [33], researchers have calculated different EEG band ratios for evaluating the cognitive load indices of the subjects in pre- and post meditation. In this paper, we have evaluated the subject’s performance before the task and while doing the task to know the variations among cognitive load and EEG band ratios [33].

The key contribution of the proposed work is to analyze the band ratios, cognitive load index, individual band frequencies, prefrontal electrode of the subjects, and finally applied the binary classification with different classifiers like Support Vector Machine (SVM), K-nearest neighbor (KNN), Decision Tree, Random Forest, Gaussian Naïve Bayes (GNB), and Logistic Regression. The paper is arranged into four sections. Section 2 includes materials and methods, Sect. 3 includes results and analysis, Sect. 4 includes discussion, and Sect. 5 includes a conclusion.

2 Materials and Methods

2.1 Recording and Selection of the EEG Signals

The EEG signals were recorded from Neurocom Monopolar EEG 23-channel system (Ukraine, XAI-MEDICA). All 23 electrodes are mounted on the scalp of the subject according to the International 10–20 scheme. The electrodes mounted on the scalp recorded the signals from different parts of the brain, which is divided into different lobes like frontal, temporal, parietal, and occipital. The placement of electrodes which are used to measure the frontal, temporal, parietal, occipital and central lobes of the brain are shown in Fig.1. The interconnected ear reference electrodes are used to reference all electrodes. The inter-electrode impedance was kept below 5 k, and the sampling rate was 500 Hz. A 0.5 Hz cutoff frequency HPF, a 45 Hz cutoff frequency LPF, and a 50 Hz power line notch filter are used.

Fig. 1
An illustration. It has a circle within which 21 electrode points are marked. A concentric circle with elements F p z, F 8, T 4, T 6, O 2, O 1, T 5, T 3, F 7, and F p 1 arranged clockwise, appears within this circle. A 1 and A 2 are 2 elements outside the circle at 2 ends of the central horizontal axis. Other elements in the same axis, from left to right are T 3, C 3, C z, C 4, and T 4. Between the central axis and the concentric circle, F 3, F Z, and F 4, are in the upper half and P 3, Pz, and P 4 are in the lower half.

10–20 international system of EEG 21 channel electrode placement

Recording of each EEG signal includes artifact-free EEG segments of 180 s (resting state) and 60 s (mental counting). Out of 66 participants, 30 were removed from the database due to imprudent artifacts present with eyes and muscles. So overall we found 36 subjects best. The task includes both Females and Males marked as “F” and “M”: 27 female and 9 male subjects with ages ranging 17–26 with no physical and mental disorders.

2.2 Attribute of Subject Participation in the Protocol

During the recording of the EEG signal, subjects were asked to sit in a dark soundproof chamber with reclined armchair; they were asked to relax during the resting state or before the task and informed about the arithmetic task; this relaxation state was recorded for 3 min duration. After the relaxation, subjects performed the arithmetic task for 4-min duration but for analyzing the changes that occur in the load, the dataset was considered 1 min arithmetic task, and the remaining 3 min are excluded. Based on the count of subtractions done by the subjects, they were divided into 2 groups: “Bad” and “Good”. A total of 26 subjects’ performance was under “Good” and 10 subjects’ performance was under “Bad”.

Participation in the protocol includes a series of subtraction or number of subtractions. It includes the process of first taking the difference between the four-digit number and the result of subtracting, divided by the subtrahend. More information can be found in the paper [34].

2.3 Wavelet Decomposition

The nature of the EEG signal has a time-varying property; in order to convert the time domain signal to the frequency domain, we used wavelet transform. Wavelet transform can provide the time and frequency signals simultaneously. A wavelet family with mother wavelet \(\psi\) (t) consisting of functions \(\psi\) a,b(t) of the form are taken from [35]

$${\psi }_{a,b}\left(t\right)=\frac{1}{\sqrt{a}}\psi \left(\frac{t-b}{a}\right)$$
(1)

where a is positive and defines the scale and b is any real number that defines the shift. When |a| > 1 then ψa,b(t) has a larger time width than ψ(t) and corresponds to a lower frequency, whereas |a| < 1 then the wavelet obtained from Eq. (1) is the compressed version of mother wavelet and corresponds to higher frequency [36].

The continuous wavelet transforms (CWT) of a function x(t), introduced by Morlet, is defined by

$${\text{CWT}}\left( {a,b} \right) = \int_{ - \infty }^{\infty } {x\left( t \right)\;\psi_{a,b} \left( t \right)dt}$$
(2)

CWT(a, b) is a function of 2 variables: Eq. (1) variable a determines the amount of time scaling or dilation, and from Eq. (2) variable b represents the shift ψa,0(t) by an amount b along the time axis and indicates the location of the wavelet window along it [37].

By breaking down the signal into a rough approximation and finer details, the DWT analyzes the signal at various frequency bands with various resolutions. Scaling functions and wavelet functions, which are related to lowpass and highpass filters, respectively, are two sets of functions used by DWT. The time domain signal is simply subjected to consecutive highpass and lowpass filtering to obtain the signal’s decomposition into various frequency bands. First, a half-band highpass filter (g[n]) and a lowpass filter (h[n]) are applied to the original signal x[n]. Therefore, the signal can be subsampled by two by simply removing every other sample. This is a single level of decomposition and may be stated mathematically as follows using Eqs. (3) and (4):

$${\text{Y}}_{{{\text{high}}}} \left[ {\text{k}} \right] = \sum\nolimits_{n} {x[n] \cdot {\text{g}}[2{\text{k}} - n]}$$
(3)
$${\text{Y}}_{{{\text{low}}}} \left[ {\text{k}} \right] = \sum\nolimits_{n} {x[n] \cdot {\text{h}}[2{\text{k}} - n]}$$
(4)

where Yhigh[k] and Ylow[k] are the outputs of highpass and lowpass filters.

Figure 2 illustrates this procedure, where x[n] denotes the original signal to be decomposed, and h[n] and g[n] are low pass and high pass filters, respectively. The obtained frequency bands are analyzed to acquire the band power.

Fig. 2
A schematic has 10 components. The original signal divides into low and high pass filters, which give level 1 coeffecients and low pass signals respectively. Level 1 coefficients result in low pass filters, which convert to high pass and result in level 3 coefficients. The high pass filter from the original signal converts to low pass resulting in level 2 coefficients, which in turn become high pass filters, and finally to level 3 coefficients.

1-D wavelet decomposition

Band power considers the energy distribution in the signal and is computed as a sum of the squares of the signal data points [38] using Eq. (4):

$${\text{BP}} = \sum\nolimits_{n = 1}^{N} {\left| {x_{n} } \right|^{2} }$$
(5)

where xn are signal data points from 1 to N.

3 Results and Analysis

The band frequencies obtained from Fig. 2 were used to analyze cognitive load among the “Good” and “Bad” when subjects performed eyes closed and mental arithmetic tasks.

3.1 Individual Band Frequencies

The subjects are divided into 2 groups: “Good” and “Bad”; the task involves performing resting state and mental arithmetic task. Individual band frequencies are used to assess the performance of the subject by considering the resting state and mental arithmetic task.

From Figs. 3, 4, 5 and 6 subjects above the line represents the while doing task (mental arithmetic task-1 min), line below represents before the task (resting state-3 min).

We compared both groups (i.e., “Good” and “Bad”) and cannot conclude for the Delta band in Figs. 3a and 4a. Individual groups performance-wise, we found that “Good” participants were more (line above) and felt sleepy in the moments before the task (resting state), but “Bad” subjects were less (line below) and did not feel drowsy in the moments before the task (resting state). While doing a task (line above) of both groups, we found a smaller number of “Good” subjects (did not feel sleepy) and a greater number of “Bad” subjects (due to sleepiness).

Fig. 3
5 scatterplots estimate the good subjects while doing the task versus before the task for 5 bands, delta, theta, alpha, beta, and gamma. All have an ascending trend.

Analysis of “Good” subjects performing before and while doing tasks: a Delta band, b Theta band, c Alpha band, d Beta band, and e Gamma band

Fig. 4
5 graphs plot while doing task versus before task for 5 bands, delta, theta, alpha, beta, and gamma. All have an ascending trend.

Analysis of “Bad” subjects performing before and while doing tasks: a Delta band, b Theta band, c Alpha band, d Beta band, and e Gamma band. *Note All the graphs in this paper are log scaled (x = y) for easy prediction of the subjects among the 2 tasks, i.e., before the task and while doing the task, and red line is used to show the separation among the performance of the task

Figures 3b and 4b show the response of the “Good” and “Bad” subjects for the Theta band. Individual group performance-wise, we found an equal number (line above and below) of “Good” subjects, which is due to relaxation in both the tasks, whereas less number (line above) of “Bad” subjects due to difficulty found while doing the task and more number (line above) due to relaxation before the task (resting state).

Figures 3c and 4c show the response of the “Good” and “Bad” subjects for the Alpha band; we compared both groups (line above), more “Good” subjects and less “Bad” subjects and vice versa for the line below. Individual group performance-wise, we found more (line above) “Good” subjects due to being awake and relaxed while doing the task, and less (line above) “Bad” subjects due to difficulty while doing the task. In the line below, we see less “Good” subjects awakened and relaxed, and more “Bad” subjects relaxed.

We compared both groups in the line above and cannot conclude the beta band in Figs. 3d and 4d. Individual group performance-wise, we found more number (line above) of “Good” and “Bad” subjects due to consciousness while doing a task. Subjects of both groups in the line below are less conscious before the task.

In Figs. 3e and 4e, we compare the responses of the “Good” and “Bad” subjects for the Gamma band, and we cannot conclude for the gamma band (due to equal distribution of subjects among line below and above). Individual group performance-wise, we have more “Good” subjects in the line above, indicating concentration. We are unable to reach a conclusion for “Bad” subjects (due to an equal distribution before and while doing the task).

3.2 Cognitive Load Indices (EEG Band Ratios)

EEG cognitive load indices which represent the different EEG band ratios are analyzed using mean and standard deviation and are shown in Table 1 using Eq. (6):

$${\text{Mean}} = \frac{1}{n}\;\sum\nolimits_{i = 1}^{n} {a_{i} }$$
(6)
Table 1 Comparison of different EEG band ratios between bad and good subjects performing before (3 min) and while doing (1 min) task using mean and standard deviation (mV)

where n = number of values; \({a}_{i}\)= dataset values. Standard Deviation using Eq. (7):

$$\sigma = \;\sqrt {\frac{{\sum {(x_{i} - \mu )^{2} } }}{N}}$$
(7)

where σ = standard deviation, N = size of elements, \({x}_{i}\)= each value from the element, and μ = the element means.

The load on memory increases when task difficulty increases. The performance enhancement in “Bad” subjects refers to an increase in alpha frequency which indicates mind wandering; while doing a task, the same alpha frequency has decreased which shows less mind wandering, as alpha frequency increases when eyes are closed whereas it decreases when eyes are open (relaxation). The same performance of alpha frequency is observed for “Good” subjects that increased before the task (more relaxation) and decreased while doing the task (less relaxation) due to eyes closing and opening.

The arousal index represents the excitement in the subjects; we can see an increase in arousal index for “Bad” subjects from before the task to while doing the task, while a decrease in the arousal index from before to while doing the task for “Good” subjects; this represents that “Good” subjects showed less excitement when compared to “Bad” subjects.

The neural activity represents an improvement in cognitive skills, increase in neural activity for “Bad” subjects from before to while doing, while decrease before to while doing the task for “Good” subjects, shows “Good” subjects stressed to task and showed decrement.

The engagement activity, if it increases in “β”, shows alertness and focus, while a decrease in “θ” shows cognitive load; from the above table, we see an increase in engagement before the task for “Bad” subjects and decrease while doing the task for “Good” subjects, decrease in “θ” represents the cognitive load had effect on “Good” subjects (increased β, less θ). Load index represents the stress, increment is observed in both “Bad” and “Good” subjects, and stress is observed while doing the task. There is a decrease in alertness activity from before the task to while doing the task in “Bad” subjects, whereas decrease to an increase in “Good” subjects, which showed alertness while doing the task.

The CWI (Cognitive Workload Index) ratio based on EEG band power [35] was obtained using mean and standard deviation of the band power. It shows decrease to increase in “Bad” subjects, whereas increase to decrease in “Good” subjects. Load showed the effect on “Bad” subjects while doing the task which decreased the performance, whereas “Good” subjects did not feel difficulty while doing the task.

CWI performance for “Good” and “Bad” subjects with band power is shown in Fig. 5a, b. CWI represents the load on subjects in which there are more (line below) “Bad” subjects than “Good” subjects (line above). Due to the load, the “Bad” subjects had difficulty in performing the task (while doing the task), whereas the “Good” subjects were more conscious, concentrated, and relaxed (while doing the task).

Fig. 5
2 scatterplots estimate the C W I for subjects while doing the task versus before the task for good and bad subjects. Both have an ascending trend.

CWI for subjects performing before, while doing task, a “Good” b “Bad”

3.3 Prefrontal Electrode Analysis

The prefrontal electrodes were used to assess the effect of load on the skull; we examined the individual data of Fp1 and Fp2 electrodes for the subjects before and while doing the task as shown in Fig. 6. Various cognitive skills can be analyzed, but we evaluated only cognitive load on subjects performing the task. Band powers of Fp1 and Fp2 for “Good” and “Bad” subjects are more while doing the task (line above), whereas less before the task (line below).

Fig. 6
4 scatterplots estimate the F p 1 and F p 2 for good and bad subjects plot while doing task versus before task. All have an ascending trend.

Fp1 and Fp2 for subjects performing before and while doing the task: a, b “Good”; c, d “Bad”

3.4 Binary Classification

Different methods were used to obtain the binary classification results like Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Decision Tree, Random Forest, Gaussian Naïve Bayes (GNB), and Logistic Regression. The binary classification is done by taking the mean of individual (Fp1, Fp2, F3, F4, Fz, F7, F8, C3, C4, Cz, P3, P4, Pz, O1, O2, T3, T4, T5, T6) electrodes and calculating overall mean of 19 electrodes for one subject; this process is repeated for all subjects and finally the obtained mean results are divided into 2 parts: 1.“Bad” before mental arithmetic (3 min) and while doing the mental arithmetic task (1 min); 2.“Good” subjects before mental arithmetic (3 min) and while doing the mental arithmetic task (1 min).

The obtained mean using Eq. (5) of all the subjects considered is divided between “Bad” and “Good”. The subjects’ mean is merged (before, while doing the mental arithmetic task of “Bad”) and labeled as “0” (zero). The same is repeated for “Good” subjects and labeled as “1” (one). Finally, testing and training are done and classification techniques applied. Different classifier results can be seen in Fig. 7. Support Vector Machine (SVM), Gaussian Naïve Bayes (GNB), and Logistic Regression obtained 73%.

Fig. 7
A column chart plots A c curation % versus classifier for 6 categories. S V M, Gaussian N B, and logistic regression have values above 70 while K n n, decision tree, and random forest have values of 68, and 60 each, respectively.

Different classifier outputs: SVM (Support Vector Machine), KNN (K-Nearest Neighbor), DT (Decision Tree), RT (Random Forest Tree), Gaussian NB (Naive Bayes), and Logistic Regression

Frequency bands were extracted using wavelet decomposition and band power of each frequency band was calculated individually. Individual frequency bands like delta, theta, alpha, beta, and gamma showed the separation among the subjects (below and above the line) in performing the resting state and arithmetic state which can be seen in Figs. 1 and 2. EEG band ratios were analyzed between “Bad” and “Good” when both the groups performed resting state and arithmetic task; from these, variations in the different activity index can be seen in Table 1; cognitive load was observed among 2 groups and found more in “Bad” subjects when compared with “Good” subjects because the “Good” subjects didn’t find difficulty in the task whereas “Bad” subjects found difficulty in the task. Cognitive skills are analyzed at the prefrontal electrodes of the brain, hence we found that “Good” subjects are above the line, while “Bad” subjects are below the line which can be seen in Fig. 6. Finally, binary classification was applied classification among the “Bad” and “Good” subjects and obtained 73% for Support Vector Machine, Gaussian Naïve Bayes, and Logistic Regression.

4 Discussion

The techniques here used to interpret the cognitive workload index, different bands ratios, and prefrontal electrodes using the wavedec function, from Fig. 3 (analysis of “Good” subjects) and Fig. 4 (analysis of “Bad” subjects) comparisons among 2 groups when subjects performing while doing the task and before the task with 5 frequency bands are seen. When analyzed the individual frequency bands, “Good” subjects’ performance was better observed while doing the task of alpha and beta bands whereas as theta, delta, and gamma are not that much better. “Bad” subjects while doing task did not performed better which can be seen from the delta, theta, alpha, and gamma bands; only the beta band has better performance which states that “Bad” subjects felt difficulty while doing the task (mental arithmetic task). EEG band ratio variations show the subjects’ performance. Results can be compared with the previous research [33], but our paper considered 2 groups performing 2 individual tasks: one resting state and another arithmetic task. Variations among the pre- and post meditation were seen previously; here, we saw variations among subjects’ performance among “Good” and “Bad” with different frequency band ratios. Figure 5 shows the variations in cognitive workload that occurred in the two groups while doing and before the task. Different activity indices are analyzed with band ratios when subjects performed two tasks, i.e., while doing and before. “Bad” group subjects performed before and while doing the task and variations in the activity indices can be seen; performance enhancement has increased when subjects were resting and decreased while doing the task; arousal index showed a decrease in resting state whereas increased while doing the task, neural activity shows the decrease while resting and increase while doing the task, engagement of the subjects has decreased in resting state whereas it increased while doing task, load index decreased when resting task and increased while doing the task, alertness has seen an increase in resting task whereas a decrease while doing the task, and cognitive workload index decreased in resting task and increased while doing the task. “Bad” subjects have low engagement, load index, and cognitive workload index when resting task was performed and increased while doing the task. In “Good” group subjects, performance enhancement, arousal, and neural activity band ratios show increase in resting task when compared to while doing the task, in engagement and cognitive workload index (CWI) band ratios shows increase in resting task and decrease in while doing task can be seen, whereas in load index and alertness has shown decreased in resting state and increased in while doing the task. In Fig. 6, prefrontal electrodes of the brain are considered, i.e., Fp1 and Fp2; these two electrodes are used to assess cognitive skills. Here, machine learning classifiers are used for binary classification.

The limitation includes variation in delta and theta frequency bands did not show better performance, when individual band performance was considered in “Good” subjects, whereas in “Bad” subjects alpha and theta frequency bands did not show better performance.

5 Conclusion

This paper used the decomposition technique to observe the variations in frequency band when subjects performed resting tasks and while doing tasks. From the results, we observed that cognitive load on subjects increased while doing the task, and increase in beta band and decrease in alpha band can be observed. EEG band power ratios used to know the variations in frequency bands and their effects on the subjects’ performance, prefrontal electrodes, and binary classification showed differences among the “Good” and “Bad” subjects performing the task. The future scope includes the advanced techniques for assessing the cognitive load when subjects perform yoga and meditation.