Classification of Electroencephalogram Signal for Developing Brain-Computer Interface Using Bioinspired Machine Learning Approach

Transforming human intentions into patterns to direct the devices connected externally without any body movements is called Brain-Computer Interface (BCI). It is specially designed for rehabilitation patients to overcome their disabilities. Electroencephalogram (EEG) signal is one of the famous tools to operate such devices. In this study, we planned to conduct our research with twenty subjects from different age groups from 20 to 28 and 29 to 40 using three-electrode systems to analyze the performance for developing a mobile robot for navigation using band power features and neural network architecture trained with a bioinspired algorithm. From the experiment, we recognized that the maximum classification performance was 94.66% for the young group and the minimum classification performance was 94.18% for the adult group. We conducted a recognizing accuracy test for the two contrasting age groups to interpret the individual performances. The study proved that the recognition accuracy was maximum for the young group and minimum for the adult group. Through the graphical user interface, we conducted an online test for the young and adult groups. From the online test, the same young-aged people performed highly and actively with an average accuracy of 94.00% compared with the adult people whose performance was 92.00%. From this experiment, we concluded that, due to the age factor, the signal generated by the subjects decreased slightly.


Introduction
Pseudocoma is also known as the locked-in syndrome (LIS), which affects people and makes them cannot move or communicate verbally. People with LIS are unable to communicate with others due to complete paralysis. LIS affects individuals cognitively and emotionally and makes them unable to speak and move. LIS affects and damages the brainstem part called the pons. Pons is responsible for sharing the neural communication between others parts like cerebellum, cerebrum, and spinal cord. It affects both males and females equally from children to aged people, but most of the time, it causes severe damage to adult people. LIS stops neural communication from the brain to the spinal cord and other remaining master parts of the body, so the bodies of the affected people are not working properly. So, people are able to communicate only through some of the coded messages by giving signals without moving the body parts [1][2][3].
We are living in a modern and scientific world. Today several technologies are available for us to make communication in the absence of biochannels. So there is a need for rehabilitative devices for people with LIS using EEG-supported BCI. e EEG-based rehabilitative device was simple, accurate, and low cost. Due to this reason, most of the locked-in state people select the EEG-based rehabilitative device for communication. e brain activities captured from the EEG were converted into actions through the interface, which is called BCI. e technique of measuring brain functions and trying to identify the connection between certain brain activities through definite mental or other activities is called electroencephalogram (EEG). It is a tool to calculate cognitive neuropsychology and neuroscience. EEG simulates brain activities in the form of signals by inserting the electrodes on the scalp of the individual person, and most of the time, EEG was applied in the form of a noninvasive technique [4][5][6][7][8].
Most of the BCIs convert human intentions into control signals. ese signals were used to control the machines in the lack of a normal channel. Some of the important BCIs that help paralyzed people to behave like normal people include mouse controller [9][10][11], speech synthesizer [12][13][14][15], robotic arm [16], hand controller [17], keyboard and mouse controller [18], facial expression detector [19], game controller [20], and mobile phone controller [21]. In our study, we planned to conduct a comparative study between two age groups, 20-28 and 29-40, to inspect the performance in offline and online modes using a recurrent neural network trained with a metaheuristic algorithm. e performance was compared with traditional methods to analyze the best performance for developing rehabilitative devices for disabled people. Our experiment confirmed that the proposed method outperformed the conventional methods implemented in the previous studies.

Literature Survey
Numerous rehabilitative devices have been developed in the past decade. Some of the important rehabilitative devices helping human welfare to overcome paralysis conditions were stated in the following. Y. Li et al. (2010) designed 2D cursor control for disabled people using an SVM classifier with common spatial pattern features and obtained an online classification accuracy of 97.5% from six subjects aged from 22 to 30 [22]. A. B. Usakli and S. Gurkan (2010) devised the virtual keyboard for people without hand movements and speaking using the Euclidean features with the nearest neighborhood algorithm and obtained classification accuracy of 95% [23]. A. Nanayakkara and Z. Sakkaff (2010) devised the EEG-based BCI using band power features with a KNN classifier and obtained accuracy of 85% from three normal subjects [24]. M. Phothisonothai and K. Watanabe (2013) designed an EEG-based application for disabled people from ten subjects using fractal dimension features with an ANN classifier and achieved classification accuracy of 83.25 [25].
H. H. Pang et al. (2014) developed an EEG-based controller for disabled individuals using Independent Component Analysis to classify the one-class imagery task using the proposed support vector data description classifier and obtained a high classification accuracy [26]. V. Gandhi et al. (2014) promoted a new EEG-based system for motor neuron affected people using band power features with RQNN and obtained accuracy of 89.00% compared to other classifiers used in the study [27]. A. Turnip et al. (2017) developed a wheelchair for spinal cord injured people using SSVEP-based featured signals trained with an adaptive network-based fuzzy algorithm and obtained classification accuracy of 90% [28] [34]. In this research work, we planned to study the performance of different age groups from 20 to 28 and 29 to 40 through an optimized neural network trained using a crow search algorithm to identify and select the best subjects for creating a global database for future online study. By identifying the best dataset, we can drive the mobile robot online without any training.

Proposed Methodology
By placing three electrodes on the scalp of the forehead at the position of T3 and T4 (right and left) and ground electrode FP1 at the position above the left eyebrow, which is marked and depicted in Figure 1, participants were recommended to pronounce the four tasks constantly to record the data. e signals were composed for five seconds per trial. e recorded data were preprocessed using a notch filter with 50 HZ to remove the noise. e feature extraction method was applied to the preprocessed signals to identify the relevant information. Gained features were trained with an optimized NN classifier to identify the pattern, which is illustrated in Figure 2. e identified pattern was visualized with the help of the application interface. From the application 2 Computational Intelligence and Neuroscience interface control, commands were generated to control the external devices.

Preliminary Study.
Before conducting this experiment, we conducted our preliminary study with five subjects to analyze the four signal patterns. Subjects who participated in the study evolved different patterns for each task. From the preliminary study, we identified the difficulties faced by the subjects while acquiring signals, as well as different patterns generated at the time of data collection, as shown in Figure 3.

Protocol Design.
All the participants must follow the protocol compulsorily and strictly without any deviation to collect the exact patterns to determine the tasks performed by them. After the preliminary study, we request all the participants to do the four tasks as per the protocol mentioned in the following.
Right. e subjects were informed to mentally assume the position RIGHT without vocalization, constantly for five seconds during data acquirement, and at the same time, subjects were requested not to make any obvious movement.
Forward. e subjects were asked to mentally constitute a letter FORWARD without vocalization constantly for five seconds during data acquirement, and concurrently, subjects were advised not to make any obvious movement.
Left. e subjects were instructed to mentally constitute a letter LEFT without vocalization constantly for five seconds during data acquirement, and at the same time, subjects were requested not to make any observable movement.
Stop. e subjects were instructed to mentally constitute a letter STOP without vocalization constantly for five seconds during data acquirement, and concurrently, subjects were advised not to make any overt movement. All the volunteers involved in this study must follow the protocol strictly and seriously to generate good patterns at the time of signal collection.

Signal Acquisition.
Subjects were asked to sit comfortably on the chair in a relaxed position. During the subject selection, we found some difficulties. e parameters we applied to select the subjects are given as follows.
e subjects who participated in this study were aged between 20 and 40, and all were our university students and faculty members.
Twenty subjects were involved in this study. All the participants were right-handed and free from medical illness, and also they wore cotton clothes to feel free and comfortable. e room was not covered with any soundproof materials. Participants were directed to pronounce the name of the tasks continuously as per the protocol for five seconds to acquire the signals.
At the time of acquisition, the signals were treated with a notch filter to take away the noises that affect EEG. Ten trials were executed per task. Forty data samples per subject were collected. EEG dataset used in this study was collected lively from the subjects. Collected signals were sampled at 200 Hz. A total of 800 samples from twenty subjects were collected to select the most related features.

Feature Extraction.
Feature extraction was a technique to reduce the high dimensionality data into feasible data for processing and interpreting. Feature extraction methods were categorized into two types:

Computational Intelligence and Neuroscience
In our study, we focused on the parametric method to pick the quality features from observed preprocessed signals. Preprocessed signals were treated with the autoregressive Yule-Walker method to obtain the outstanding features from the observed data.
e Yule-Walker technique was introduced by Udny Yule and Gilbert Walker. By combining both names, the name Yule-Walker comes. It was otherwise called an autocorrelation technique that is used to carry out the Power Spectral Density (PSD) from the input sample b fitting the windowed input data from the autoregressive model, and also it reduces the forward prediction error in the least square sense. So they are called AR Yule-Walker. It has the capacity to measure both stationary and nonstationary time series. It accepts the input in the form of a column vector. is column vector consists of the PSD of the specified trial signals. e frequency range of the signal was always between [0, F s ], where F s represents the sampling frequency of the signal [35,36]. e mathematical representation for the AR Yule-Walker equation was represented in equation (1): where c m indicates the autocorrelation function, σ ϵ represents the noise input's standard deviation, and δ m,o illustrates the Kronecker delta function. If m � 0 indicates the nonzero values in the last part of the individual equation, the following equation can be solved by matrix format b representing the condition m > 0 [34,35], which was represented in equation (2): Equation (2) can be solved from the condition φ m : m � 1, 2, . . . . . . . . . . . . ., p , and the remaining equation for m � 0 so that where c 1 , c 2 ,. . .c p represent the time series signals and K � 1, 2, . . .p indicates the order of the model. 1000 samples were given as input to the feature extraction technique, and 22 features were selected from each trial. Repeat the same steps for ten trials per task to develop the master dataset to classify the data offline and online using an optimized neural network.

Feed Forward Neural Network (FFNN)
. e benchmark network model in the artificial neural network (ANN) was called FFNN. It is otherwise called a static neural network. Because there was no feedback connection between the three layers, all the three layers were moved only in the frontward direction from the input layer to the hidden layer and from the hidden layer to the output layer. Basically, FFNN was trained with default parameters with a default training algorithm [37]. But in our research, we planned to change the benchmark training algorithm to a bioinspired optimization algorithm called crow search algorithm (CSA) to optimize the neural network model to analyze the different patterns generated from the subjects during the classification process, and also we compared the results gathered in the study.

Crow Search Algorithm (CSA)
. CSA was one of the metaheuristic algorithms designed to solve several realworld problems compared with other conventional search methods, and also it provides the best results in complex design problems in the field of engineering. CSA was first introduced by A. Askarzadeh in 2016. is optimization algorithm imitates the basic behavior of crows in their social habit in terms of storing and retrieving excess food. Crow was one of the most intelligent birds. e intelligence of crows was dependent upon the size of their bodies. Crows have the capacity to recollect the images and dangerous places near their living area and warn the other crows through some sort of communication and also remember the food hiding places for a long time. is approach makes crows more clever, aware, and knowledgeable than other birds. Crows have the capacity to analyze the other birds' food hiding areas and steal the food from these places once the owner crow leaves the place. Crows are always behaving with extra precaution to save the food hiding places from crows [38].  (1) and (2).

Basic Concepts of CSA.
Crows are always living in groups. Crows hide the food from other crows and remember the place. ey have a tendency to save food in unknown areas for a long time and retrieve the saved food, remembering the hiding place very easily compared to other birds. If some crows are trying to follow the crow's unknown food hiding place, they immediately change the position and their original path in order to divert the following crow to save the hiding food. Let us assume that N is the number of crows in the group with d dimensional environment and let i be the position of crows in the search space, which can be represented by a vector [45-48], which was represented in equations (1): where iter max indicates the highest number of iterations.
Each crow in the flock has separate memory to memorize the hiding place of the food. Iter represents the iteration and hiding place of Crow i , and it was represented as m i,iter . From this equation, we can fix the best position of each crow from the search space environment. Suppose that Crow j needs to visit the hiding place m j,iter and Crow i is planning to follow Crow j to identify the hiding place of the food. is condition can occur in two ways.

Condition 1.
Assume that Crow i follows Crow j but Crow j does not know that Crow i is following it. e mathematical representation for condition 1 was given in equation (4).
From this equation, r i represents the random number between 0 and 1 with uniform distribution, I indicates the iteration, and fl i,iter specifies the crow flight length by unknowingly Crow i following Crow j to identify the food hiding place of Crow j . For this movement, the actual e feature extraction algorithm mentioned previously consists of subsequent steps: Step 1: Collect sample data (S) of two-channel EEG signals for 5 seconds.
Step 2: S was divided into 0.1-second windows.
Step 3: Bandpass filters were applied to extract 22 frequency bands from S.
Step 4: Apply the AR Yule method to the frequency band signal to extract the AR coefficients and then obtain PSD features using equation (1). Model order p is fixed as 4.
Step 5: Replicate steps 1 to 4 for each trial for all tasks.
Step 6: 22 features were picked for every task per trial and repeat the same process for ten trials for four tasks.
Step 7: 40 (4 tasks x 10 trials � 40) data samples for one subject were obtained to train and test the optimized neural network classifier.
Step 8: Do steps 1 to 7 for twenty subjects to gather a master dataset. ALGORITHM 1: AR Yule-Walker method-based extraction.
Computational Intelligence and Neuroscience position of Crow i was changed, and a new position was obtained, which was shown in equation (4).

Condition 2.
If Crow j identifies that Crow i is following it, immediately Crow j switch over from the old hiding place to the new hiding place to protect the food and to fool the Crow i search position so that this term can be expressed mathematically by applying equation (5).
From this above-mentioned equation, r i represents the random number between 0 and 1 with uniform distribution, j represents the number of iterations, and RP i,iter indicates the recognizing probability of Crow j .

Steps Involved in Optimization Algorithm
Step 1. Fix the problem and adaptable parameters. Fix all the adaptable parameters like the number of crows and their size (N), flight length (fl), recognizing probability (RP), and the number of maximum iterations (iter max ).
Step 2. Fix position, search place, and memory of crow. In the beginning, the crow has no knowledge. So initially, crows have stored their food in an initial position. From this, each crow's position was fixed. e mathematical representation for fixing the memory of the crow and its positions is shown in equations (6) and (7).
Crows � where N indicates the random position in the search place and d indicates the decision variable.
Step 3. Calculate the fitness function. By implementing the decision variable into the fitness function to measure the position of each crow.
Step 4. Create a new position. Crow i planned to discover the hidden food place of Crow j . For this, Crow i randomly picks one of the crows from the groups and target the specified crow (m j ). So the new position of Crow i was obtained, which was shown in equation (5).
Step 5. Identify the possibilities of fixing reposition and checking the feasibility of the crow's reposition. If the new position was comfortable for the crow, then it changed its position; otherwise, the crow stayed in its previous own position and did not move to another position.
Step 6. Calculate the new position's fitness function. If the crow changed their new position for each and every move, the fitness function value of the crow was calculated.
Step 7. Restore the memory. Crows restore their memory, as shown in equation (8).
If the crow's new position is superior to that of the fitness function of the previous memorized position, then the crow restores the memory value using the new position. In this equation, f(m i,iter ) indicates the objective function value.
Step 8. Analyze the stopping criterion. Repeat steps from 4 to 7 until the maximum iteration iter max is attained. e best position of the crow was met when the reposition of the crow was superior to the fitness function. e new best position was fixed as an objective function and restored the memory and optimization algorithm stopping its iteration [38][39][40][41]. After the training, the result of the study was discussed in the experimental study.

Experimental Study
e study was conducted with twenty subjects aged from 20 to 48 using the AR Yule-Walker features with crow search optimization-based FFNN to check the performances for developing the BCI for the disabled person.

Classification Accuracy.
e classification accuracy for the age group between 20 and 28 using the AR Yule-Walker features with crow search optimization-based FFNN is depicted in Table 1. From Table 1, we determined that the average maximum and minimum classification accuracy were 96.86% and 90.00%, as shown in Figure 4. e overall classification accuracy of the age group between 20 and 28 was 94.66%, with an 18.56 sec training time and 0.74 sec testing time with standard deviation variations of 1.38 to 1.87. e individual maximum accuracy of 95.78 was attained for the subject S10, and the individual minimum accuracy of 93.54% was attained for the subject S2, as shown in Figure 5. e classification accuracy for the age group between 29 and 40 using the AR Yule-Walker features with crow search optimization based FFNN is depicted in Table 2. From Table 2, we analyzed the average maximum and minimum classification accuracy of 95.00% and 89.41%, as shown in Figure 6. e overall classification accuracy of the age groups between 29 and 40 was 94.18%, with a 19.54 sec training time and 0.78 sec testing time with standard deviation variations of 1.62 to 1.77. e individual maximum accuracy of 95.00% was attained for the subject S20, and the individual minimum accuracy of 93.90% was attained for the subject S12, as shown in Figure 7.
From Tables 1 and 2, we concluded the average classification performances of the two different age groups. e two tables proved that the average classification performances of the age group between 20 and 28 were appreciated compared to the group of 29-40, as shown in Figure 8. During the study, the performance of subjects belonging to the age group 20-29 was high at the time of data collection, and also they actively participated in the study. ey were perfectly performing the tasks more efficiently than those of the age group 29-40.

Offline Test.
e offline test was conducted for both age groups 20-28 and 29-40 separately using the AR Yule-Walker features with crow search optimization based FFNN classifier. e offline task identification was conducted using GUI shown in Figures 9 and 10 to identify the mentally composed words. e offline recognizing accuracy for the age group 20-28 using Single Trail Analysis (STA) is displayed in Table 3. From Table 3, we pinpoint that the maximum offline recognizing accuracy of 100% was obtained for subjects S3 and S10 and the minimum offline recognizing accuracy of 92.50% was obtained for subjects S1 and S5. e individual single trial to identify the offline performances of the subjects belonging to the 20-28 age group is shown in Figure 11. Individual task accuracy of 98% for a forward task, 96% for right and left tasks, and 94% for stop task was obtained, as shown in Figure 12.  Maximum and Minimum Classification S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects    90 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects Classification Accuracy Classification Accuracy  S1  S2  S3  S4  S5  S6  S7  S8 S9 S14 S15 S16 S17 S18 S19 S20 S10 S11 S12 S13 Subject e offline recognizing accuracy using STA for the age group 29-40 is shown in Table 4. From Table 4, we discovered that the maximum offline recognizing accuracy of 100% was obtained for subject S20, and the minimum offline recognizing accuracy of 90.00% was obtained for subjects S15 and S16. e individual single trial to identify the offline   performances of the subjects belonging to the 20-28 age groups is shown in Figure 13. Individual task accuracy of 95% for the forward task, 94% for the right task, 93% for the left task, and 92% for the stop task was obtained, as shown in Figure 14. From the analysis, we found that offline recognizing accuracy for the age group 20-28 was high compared to the age group of 29-40. From Tables 3 and Table 4, we concluded that, in both trialwise and individual taskwise, the recognizing accuracy of the age group 20-28 was high.

Online Test.
e online task identification performances were conducted using GUI to classify the mentally composed words for two different age groups 20-28 and 29-40 using the AR Yule-Walker features with crow search optimization-based FFNN classifier. e online task identification performances were conducted using GUI illustrated in Figures 15 and 16 to classify the mentally composed words, and its recognizing accuracy performances were shown in Tables 5 and 6. From Table 5  Computational Intelligence and Neuroscience  Recognizing Accuracy S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects Recognizing Accuracy S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 Subjects accuracy of 100% was found for subjects S3 and S10 and the minimum online recognizing accuracy was found for subject S5. Individual trial performances of each subject are shown in Figure 17. Individual online task recognizing accuracy of 95% for the forward task, 94% for right and left tasks, and 93% for stop task is depicted in Figure 18.   From Table 6, we identified that the maximum accuracy of 95% for subjects S20 and minimum online recognizing accuracy of 87.50% was found for subjects S15 and S17. Individual trial performances of each subject belonging to the age groups of 29-40 are shown in Figure 19. Individual online task recognizing accuracy of 93% for the forward task, 92% for right and left tasks, and 91% for the stop task is depicted in Figure 18.
From this offline study, our experiment has obtained the individual task accuracy of 98% and 95% for the forward task, then 96% and 94% for right and left tasks, and finally 94% and 92% for stop task were obtained for the age groups in range of 20-28 and 29-40 respectively. From the online study, we have obtained the recognition accuracy of 95% and 94% for forwards task, then 94% and 92% for right and left tasks, and finally 93% and 91% for the stop task for the age group in the range of 20-28 and 29-40 which were demonstrated in Figure 18 and Figure 20, respectively. rough this analysis, we concluded that subjects from the age group 20-28 concentrated effectively and performed the tasks comparatively higher and accurately compared with the age group 29-40.  S1  S2  S3  S4  S5  S6  S7  S8  S9  S10  Subjects   S1  S2  S3  S4  S5  S6  S7  S8  S9  S10  Subjects   S1  S2  S3  S4  S5  S6  S7  S8 S9 S10 Subjects  Figure 18: Taskwise online recognizing accuracy using STA for the age group 20-28.

Conclusion
In our study, we planned to analyze the best performances between two age groups 20-28 and 29-40 using the AR Yule-Walker features with crow search optimizationbased FFNN classifier. e overall classification accuracy of the age group 20-28 was 94.66%, with an 18.56 sec training time and 0.74 sec testing time with standard deviation variations of 1.38 to 1.87. rough the offline test, we pinpoint that the maximum offline recognizing accuracy of 100% was obtained for subjects S3 and S10 and the minimum offline recognizing accuracy of 92.50% was obtained for subjects S1 and S5. Individual task accuracy of 98% for the forward task, 96% for right and left tasks, and 94% for the stop task was obtained. From the online recognizing accuracy, the maximum accuracy of 95% for forward task, 94% for right and left tasks, and 93% for stop tasks was obtained. Experimental results proved that subjects from the age group 20-28 concentrated effectively and performed the tasks comparatively higher and accurately compared with the age group 29-40.

Future Study
In our future study, we planned to conduct the online performances through the external devices to navigate and check the possibilities of designing the BCI in outdoor environment by fixing the obstacles detecting sensors to detect the obstacles present in front of the moving mobile robot with affected individuals.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest.