Abstract
Brain-Computer Interface (BCI) aims to improve the detection and decoding of brain signals acquired by electroencephalogram (EEG). In the recent years, artificial intelligence development has stepped onto a new stage, which boosts the research of BCI. This paper focuses on implementation of BCI by recognition of imagined digits. The subject was asked to imagine a digit 0 or 1 without other stimulation. The experiment was conducted using a 14 electrode Electroencephalogram. The subject was asked to imagine a digit for 30 s and the signals were recorded for analysis. Based on the results of the classification and ERP analysis, the O1 and O2 electrode positions (10–20 system) were chosen. Four methods were proposed for the feature extraction by using Event Related Potential (ERP) analysis, Power Spectral Density Analysis (PSD), Independent Component Analysis (ICA) and Common Spatial Pattern (CSP). Finally, several classification methods were used to recognize the imagined digits based on the extracted features. Experimental results showed that the results obtained by Artificial Neural Network (ANN) after CSP performed the best. The classification accuracy achieves 66.88%.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
- Brain Computer Interface (BCI)
- Event-Related Potential (ERP)
- Power Spectral Density (PSD)
- Common Spatial Pattern (CSP)
- Artificial Neural Network (ANN)
1 Introduction
A Brain-Computer Interface (BCI) system enables biological signals from the brain to be recognized by the computer. In some applications, the subject may be able to give commands to devices connected to the computer. A popular implementation of BCI is a wheelchair controlled by a signal acquired from EEG. However, the implementation of BCI using EEG is not limited to the field of biomedical engineering for medical purposes. BCI is also popular for gaming and further application in virtual reality or augmented reality (VR, AR) [1] and even for improving the traditional education system by understanding the emotions. In [2], the author proposed the method which points out that human-computer interaction takes part in emotion building. This is important to show the relationship between emotion and learning.
In this paper, we propose a novel method for binary classification of imagined digits with the intention to enable more classification methods for the purposes of medical and other applications of BCI. It can also be used for supporting behavior learning as the measurement is done for cortex of human brain. Beard in [3] found that there is a significant effect of students can change the emotions of students’ engagement in learning. By using the imagination recognition system, the emotion control system for learning in school can also be assisted.
For feature extraction from the EEG signal, Event Related Potential (ERP) and Common Spatial Pattern (CSP) are combined together. In addition to ERP, other EEG measurement methods such as Visual Evoked Potentials (VEP), Steady-State Visual Evoked Potentials (SSVEP), Event Related Desynchronization/Synchronization (ERD/ERS) can be used for the measurement. Due to the scenario of imagining the digit, unstimulated by the environment, we found that ERP analysis worked the best in this case. ERP enables the extraction of information from the EEG signals which are related to a certain motor event, cognitive, or specific sensory stimuli [4].
In this experiment, the ERP analysis was done for the whole group (of 10–20 system) electrodes used in the experiment. The ERP analysis was done by plotting the potential value on each epoch. One epoch is a 10 s span starting at 10 s and ending at 20 s within a 30 s recording. The ERP plot would then show the location of electrodes related to the events. Power Spectral Density (PSD) computation was then applied for removing bad electrodes and checking the amplitude of certain frequency ranges for the improvement of classification rate. PSD itself in this case is defined as the Discrete Time Fourier Transform (DTFT) of the covariance sequence [5].
After the ERP analysis and before the classification process, as a part of the classification method, Common Spatial Pattern (CSP) was applied. CSP is normally applied on multivariate signal processing such as the Electroencephalogram signal. It will find the spatial filters which maximize the variance of a class corresponding to the other classes. The author in [6] introduced the CSP method which is used to estimate the ERPs as they are naturally contaminated by biological and instrumental artifacts. CSP uses the multivariate spatio-temporal filtering to increase the signal-to-noise ratio. Besides enabling BCI to recognize a certain event (hand or leg movement for example), CSP can also be used for artifact cancelation in EEG implementation.
This study is also compared to the researches by Seto in [7]. The experiment done by Seto shows a similar recognition process as we proposed in this paper, by having the imagination of four directions. The signal processing and classification by Seto, however, used the band-pass filter, Fast Fourier Transform, Normalization, Principal Component Analysis (PCA), and three layers neural network. The identification rate using the 14 channels EEG is 46%.
2 Material and Experiment Setup
-
A. Electroencephalogram (EEG) Equipment
Emotiv EPOC+ is a commercial EEG, well known in practical EEG research. This EEG is a multi-channel portable system with a sequential sampling method. The system itself consists of 128 Hz sampling rate and 14 electrodes with 2 reference electrodes. The electrode position follows the 10–20 electrode positioning system in which they are: AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, and AF4. Figure 1 shows the position of the electrodes corresponding to the naming in the 10–20 universal electrode positioning system [8].
Before wearing the EEG, each electrode should be given saline solution such that the impedance can be reduced. After wearing the EEG correctly, TestBenchTM, a software for the calibration of Emotiv EPOC+ is used. The electrode positioning in Fig. 1. should be all in green so that the EEG is ready for recording.
-
B. Experiment Setup
The experiment is meant to record the brain signal where subject was imagining binary digits (0 and 1). For the training dataset, there were 100 trials of experiments conducted for imagining 0 and 1 each. Within a single experiment, the subject was given 30 s of the whole single experiment time to imagine the digit 0 or 1. Before the experiment began, the subject was given a printed image of digit 0 or 1 such that there is a standard for the imagination process. After 30 s of recording, there were 20 s of resting time before the next recording round (Fig. 2). The recording for a single binary digit imagination recognition was 15 trials a day excluding the training time and low concentration in imagining trials.
3 Data Preprocessing
The recordings of all trials in this experiment were put into folders. The data format of Emotiv EPOC+ recordings is European Data Format (EDF) file. In the beginning of data pre-processing, all of the EDF files were read all together and concatenated. Then, raw data was plotted to check which electrode should exist and could be selected for implementation. Obviously, the 14 essential electrodes as depicted from the Fig. 1, excluding the references node, are the electrodes which should be selected for the experiment. From the raw data plot as given in the Fig. 3, there were several electrodes which were not essential for the classification implementation.
After that, a set of bad channels was pointed out such as Counter, Interpolated, Raw_Cq, Gyrox, Gyroy, Marker, Marker_hardware, Sync, Time_Stamp_s, Time_Stamp_ms, CQ_AF3, CQ_F7, CQ_F3, CQ_FC5, CQ_T7, CQ_P7, CQ_O1, CQ_O2, CQ_P8, CQ_T8, CQ_FC6, CQ_F4, CQ_F8, CQ_AF4, CQ_CMS, and STI 014.
The essential 14 channels are marked in the black in the Fig. 3. plot while some other unessential channels such as Counter, Interpolated, Raw_Cq, Gyrox, Gyroy, and others are marked as grey (will not be used in the future). From Fig. 3, it can be seen that the signals were messy with noise interference. Therefore, the raw data consisted of the 14 channel raw EEG data which was then put into an Infinite-Impulse Response (IIR) band-pass filter within the range of 8–30 Hz [9]. The band-pass filter range was between 8–30 Hz because it followed the condition of the experiment scenario, including alpha and beta waves as given in Table 1. The transfer function of the IIR filter is shown in Eq. (1):
Where P is the feedforward filter order, bi are the feedforward filter coefficients, Q is the feedback filter order, ai are the feedback filter coefficients, and z is the symbol for applying the z-transformation.
As shown in Table 1, delta wave ranging from 1–3 Hz will have high amplitude fluctuation whenever a person is in the condition of deep sleep [10]. Hence, for many other frequency ranges such as theta, alpha, beta, and gamma; each band will have high potential within the specific frequency range and states. In the experiment, the band pass filter will be done for the range of alpha and beta waves because these two bands happen when a person is in an awake condition. While delta and theta waves may have higher fluctuation when a person is sleeping. The band pass filter result of the raw data is given in Fig. 4. Noise on the 14 channels was suppressed, and the desired data could then be processed.
After band-pass filter, the raw data can be used for ERP analysis. Then, the ERP per channel was plotted to check whether a channel contained suitable data for classification or not.
Figure 5 shows the ERP plot of O1 and O2 channels. The vertical axis shows quantity of epochs. The black waveform on the horizontal axis of the ERP plot shows the average electrical potential (of all epochs) for that electrode in the time domain. The small dots show synchronization in red, desynchronization in blue. Otherwise, the region will be mostly white, showing that there is less event related to the reaction from the subject. The more red and blue dots inside the graph, the higher the electrical potential fluctuation due to the event stimuli.
From the 14 electrode locations, 2 of them contain the most data correlated to the event, they are O1 and O2. To check the potential of noise on the chosen locations, Power Spectral Density (PSD) analysis was applied. A plot of PSD is shown in Fig. 6. It can be seen that there is a channel with high noise which should be considered as a bad channel, i.e. FC5. Based on the PSD analysis and after removal of FC5 from the PSD calculation, it can be seen that O1 and O2 showed the highest power in the range of 10 to 13 Hz. Then the data of O1 and O2 was filtered by a band-pass filter within the range of 10–13 Hz, as shown in Fig. 7. The filtered results of O1, O2 were both chosen for the classification.
After choosing the electrode position and frequency for classification, the raw data was put into epochs. One epoch consists of one trial of imagining a digit. The time was limited within the range of 10–20 s per epoch before being concatenated. The events per epoch will be set as labels for classification. After epoching and labeling, the data was then processed by applying Fast Independent Component Analysis (Fast ICA) for a better classification result.
4 Classification and Analysis
There were several methods used for classification in this experiment for comparison reasons. The main machine learning classification algorithms were Support Vector Machine (SVM), Artificial Neural Network – Multi Layer Perceptron (ANN-MLP), Logistic Regression, and Linear Discriminant Analysis (LDA). However, in order to increase the classification rate, Common Spatial Pattern (CSP) was applied in SVM, ANN-MLP, and LDA. A different method for Logistic Regression was applied by using the xDawn Covariance and Tangent Space algorithm. The whole classification method is given in Fig. 8.
All of the classification algorithms were evaluated using KFold validation with the parameter of 10. The result was determined by the confusion matrix, while the classification rate is determined by the accuracy with the formula:
Where tp, tn, fp, and fn are true positive, true negative, false positive, and false negative.
The classification rate (the accuracy to classify the given label) of LDA after CSP was 60% with the confusion matrix shown in Fig. 9. The elapsed time using the 10-Fold cross validation for the LDA method is 0.541 s.
For SVM classification, the configuration of SVM itself was RBF kernel with the C value 1. SVM is the general learning method based on statistical system and it is effective to process nonlinear and high dimensional pattern recognition [11]. The classification rate of SVM after CSP was 66.25% with the confusion matrix shown in Fig. 10. The elapsed time using the 10-Fold cross validation for the SVM method is 0.621 s.
ANN-MLP classification algorithm in this scenario consisted of quasi-Newton solver method with hidden layers with 14, 10, and 5 number of perceptron respectively. The classification rate of ANN-MLP after CSP was 66.88% with the confusion matrix given in Fig. 11. The elapsed time using the 10-Fold cross validation for the ANN-MLP method is 2.167 s.
The last classification algorithm used in this experiment was the Logistic Regression Algorithm. However, in order to optimize the result of Logistic Regression classification algorithm, instead of applying CSP before Logistic Regression, xDAWN Covariance was calculated and then the Riemann Tangent Space was projected. This method was applied on P300 BCI [12]. The classification rate of Logistic Regression with xDAWN Covariance and Riemann Tangent Space was 65.62% with the confusion matrix shown in Fig. 12. The elapsed time using the 10-Fold cross validation for Logistic Regression method is 1.949 s.
After applying the all classification methods, the result of this experiment was compared with the data processing method of a similar imagination recognition experiment by Seto et al. in imagining direction. The data processing method proposed by Seto et al. did not select the electrode position with ERP and apply PSD analysis for feature selection and CSP for feature space enhancement. But as depicted in Fig. 13, the data was first band-pass filtered within the range of 8-30 Hz frequency including Alpha and Beta states, then the data from all electrodes would pass a band pass filter, be normalized, and processed by using Principal Component Analysis. After the pre-processing part, the data was classified by using a three-layer neural network and validated with 5-fold validation [13].
By applying the same data processing method proposed by Seto et al. for our experiment scenario, the classification rate yields 52.5% with the confusion matrix shown in Fig. 14. The elapsed time using the 10-Fold cross validation is 3.406 s.
The summary of the results classification rate for all data processing methods is listed in Table 2. It can be seen that the best classification method in this case is CSP+ANN MLP with the rate of 66.88%.
5 Conclusion
This paper has shown a novel method of classifying the human cognitive state when imagining the binary digit (0 or 1). For the feature selection, ERP analysis was conducted together with the PSD plot. Then, O1 and O2 from 10–20 electrode positioning system were chosen to give the best classification rate after they were filtered by a band-pass filter within the 10–13 Hz frequency range. The experimental results showed that the ANN-MLP after CSP process outperformed the other data processing methods. In a future experiment, the improvement of classification rate will be conducted by applying modern machine learning classification methods and more feature extraction methods such as Hjorth Parameter and Fractal Dimension, and Embedding Sequences Analysis. Furthermore, better cognitive state classification study will be applied using an EEG system with more electrodes. Additionally, the experiment using deep learning classification method with automatic feature extraction is being conducted.
References
Hsu, W.Y.: Brain-computer interface connected to telemedicine and telecommunication in virtual reality applications. J. Telematics Inform. 34, 224–238 (2017)
Wei, Y., Sun, X.: A novel interaction system based on management of students’ emotions. In: 11th Chinese Conference on Image and Graphics Technologies and Applications (IGTA), Springer, Singapore, vol. 634, pp. 77–84 (2016)
Beard, C.: Student achievement: the role of emotions in motivation to learn - emotional maps. Pedagogic Research Project Report, Sheffield Hallam University (2005)
Kropotov, J.D.: Functional Neuromarkers for Psychiatry Applications for Diagnosis and Treatment. Elsevier Inc., London (2016)
Stoica, P., Moses, R.: Spectral Analysis of Signals. Prentice Hall, Upper Saddle River (2005)
Congedo, M., et al.: Spatio-temporal common pattern: a companion method for ERP analysis in the time domain. HAL archieves-ouvertes (2016)
Seto, Y., Ako, S., Sakagami, K., et al.: Classification by EEG frequency distribution in imagination of directions. Procedia Comput. Sci. 35, 1300–1306 (2014)
Emotiv EPOC Brain Computer Interface & scientific contextual EEG. https://emotiv.gitbook.io/epoc-user-manual/
Grout, I.: Digital Systems Design with FPGAs and CPLDs. Elsevier Ltd., Burlington (2008)
Bong, S.Z., Wan, K., Murugappan, M., et al.: Implementation of wavelet packet transform and non-linear analysis for emotion classification in stroke patient using brain signals. Biomed. Signal Process. Control 36, 102–112 (2017)
He, J.-B., Zhang, H.-M., Liang, J., Jin, O., Li, X.: Paper currency denomination recognition based on GA and SVM. In: Tan, T., Ruan, Q., Wang, S., Ma, H., Di, K. (eds.) IGTA 2015. CCIS, vol. 525, pp. 366–374. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-47791-5_41
Rivet, B., Cecotti, H., Souloumiac, A., Maby, E., Mattout, J.: Theoretical analysis of xDAWN algorithm: application to an efficient sensor selection in a P300 BCI. In: 19th European Signal Processing Conference, pp. 1382–1386. IEEE, Barcelona (2011)
Seto, Y., Ako, S., Miura, H., et al.: Analysis of brain state in imaging directions by using EEG. In: The 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, vol. 51, p. R-192. JSMBE, Osaka (2013)
Acknowledgement
This work was supported by the Science and Technology Program of Guangzhou (201804010271); National Natural Science Foundation of China (61872034, 61572067); Natural Science Foundation of Guizhou Province ([2019]1064); Special Innovative Projects in Key Platforms and Scientific Research Projects of Guangdong Universities in 2018.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Harsono, M., Liang, Lq., Zheng, Xw., Jesse, F.F., Cen, Yg., Jin, W. (2019). Classification of Imagined Digits via Brain-Computer Interface Based on Electroencephalogram. In: Wang, Y., Huang, Q., Peng, Y. (eds) Image and Graphics Technologies and Applications. IGTA 2019. Communications in Computer and Information Science, vol 1043. Springer, Singapore. https://doi.org/10.1007/978-981-13-9917-6_44
Download citation
DOI: https://doi.org/10.1007/978-981-13-9917-6_44
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-9916-9
Online ISBN: 978-981-13-9917-6
eBook Packages: Computer ScienceComputer Science (R0)