Toward Wearable EEG-based Alertness Detection System Using SVM with Optimal Minimum Channels

Alertness is the state of attention by high sensory awareness. A lack of alertness is one of the main reasons of serious accidents. Traffic accidents caused by driver’s drowsy driving have a high fatality rate. This paper presents an EEG-based alertness detection system. In order to ensure the convenience and long-term wearing comfort of EEG recordings, the wearable electrode cap will be the principal choice in the future, and the selection of channels will be limited. We first built a 3-D simulated driving platform using Unity3D. Then, we perform an experiment with driving drift task. EEG signals are recorded form frontal and occipital regions. We select data segments using the driving reaction time, classify the state of alertness with a support vector machine (SVM), and select the optimal combination of channels with minimum number of channels. Our results demonstrate that alertness can be classified efficiently with one channel (PO6) at accuracy of 93.52%, with two channels (FP1+PO6) at 95.85% and with three channels (FP1+PO6+PO5 and FP1+PO6+POZ) at 96.11%.


Introduction
The issue of a decrease in the degree of alertness at work has received increasing attention due to the gradual increase of living pressure and work intensity [1]. Alertness refers to a person's ability to maintain his focus of attention on performing an operational task for prolonged periods of time. For example, the alertness level of a driver refers to the ability of the driver to perceive and understand the status of the car or the traffic conditions in a timely manner while driving, and to make the correct operation [2]. Staying alertness above a certain level is very important in some cases in our daily lives [1]. In general, drowsy driving will reduce thinking ability of driver, and also is a risk factor for traffic crashes and deaths [3,4]. If the driver feels fatigue, it will seriously threaten the life safety of driver and even others. In the United States, as reported by the National Traffic Safety Administration, 60,000 traffic accidents take place due to pilot fatigue driving every year [5]. Traffic accidents in China in recent years, the burst frequency obviously increase, and the driver's lowalertness is one of the main reasons of serious accidents. Therefore, detecting alertness level of the driver is of great significance to improve the driving features and the traffic safety situation.
A number of factors could contribute to decrease alertness level of a driver, such as irritability, lack of sleep, or long driving the car. Many methods have been proposed to detect changes of the level of alertness. These methods can be divided into three main approaches until now. The first method is to record the score of Karolinska Sleepiness Scale (KSS) [6] or Stanford Sleepiness Scale (SSS) [7] to detect the state of alertness, and the method is usually an auxiliary method. The second method is to analyze the behaviors of driver including blink, yawn and sagging posture with video technology [4,8,9], which has been widely used to detect the level of alertness. But, the video technology also has some disadvantages, for example, the collection of video in night is difficult and it also limit the driver's movement [10]. The third method focuses on detecting physiological changes of drivers, such as electroencephalographic (EEG) activities and electrooculographic (EOG) activities [11][12][13][14][15][16][17]. Many researchers choose the EEG-based method to detect the state of alertness due to EEG signals have advantages for making accurate judgments of driver's alertness levels in time, and we use the EEG-based method in this study.
So far, many researchers have used EEG signals to detect alertness. Subasi [18] used C3-A2 channels EEG signals to assess a driver's alertness and measure the potential applicability of the artificial neural network (ANN). Mervyn et al. [19] used 32 EEG channels to classify the data using support vector machine (SVM) with 99.3% accuracy. However, in order to ensure the convenience and long-term wearing comfort of EEG experiments, the wearable electrode cap will be the principal choice, and the positions of channels on the head will be limited. Thus, we chose 10-channel EEG signals located at the frontal area and the occipital area to detect the state of subject's alertness. We developed a simulated driving platform for experiments and used an efficient classifier-SVM to classification. Finally, we obtained relatively ideal classification results through the optimal combination of channels with the smallest number of channels. The variance and the peak as the feature vector were used for classification of alertness, and the method of feature extraction we used in this study is simple. So, we used a lowpass filter with a cut-off frequency of 40 Hz to remove the high frequency noise and to get better characters from EEG data [20].
This paper is organized as follows. In Section 2, we describe the experiments setup, including the information of the subjects, Unity3D-based driving platform and data collection. Section 3 introduces the analysis methods, including the data segmentation and feature extraction. Section 4 presents the classification results. Finally, we conclude this paper in Section 5.

Subjects
Simulation driving experiments were performed in one volunteer, Male, at age of 36. Statistical reports [21] indicated that the drowsiest time also occurs during the early afternoon hours, except from late night to early morning. And drowsiness often occurs within one hour of continuous driving during these periods. And the time for starting the simulated driving experiments is the afternoon hours after lunch because the subject easily become drowsy within an hour of continuous driving. The subject was told of the driving task, and then had a 15-minute practice [20] to keep the car at the middle of the third lane of the road by controlling with the steering wheel. The subject has signed an informed written consent with the adequate understanding of the procedure of the experiment.

Unity3D-based driving platform
In this study, we developed a simulation driving platform for highway scenes using the Unity3D software. First, we created some models of objects including trees, hills, roads, and cars for the scene and set up the relative parameters of the speed, form, and direction of the car. Then, we built a complete simulated driving scene of full functionality with these virtual objects and the aid of the C# programming language. Fig. 1 shows the Unity3Dbased driving scene including four lanes from left to right.
The driving scene appears cyclically as the subject is driving the car at an adjustable velocity on the road. During the driving, the car is randomly drifted away from the center of the third lane of the road, according the consequences of a real road surface. The simulated driving software communicated with a Neuroscan 64channel physiological measuring system, where the EEG signals and event information were continuously recorded. Fig. 2 shows the scene of experiment.

Data collection
During each experiment, 10 EEG channels and the event information containing event type and time were recorded by the NeuroScan NuAmpsExpress system. The contact impedance between scalp and EEG electrodes was reduced below 5 k before data acquisition. Each subject's EEG data were recorded for 1 hour at a sampling rate of 1000 Hz. Because of limitations of the wearable electrode cap, we chose 10 EEG channels located at FP1, FP2, PO5, PO3, POZ, PO4, PO6, O1, OZ and O2 with reference electrode placed at the vertex (CZ), as shown in Fig. 3.

Analysis methods
The flowchart of data analysis for alertness classification with the optimal combination of channels is shown in Fig.  4. For each subject, after collecting 10-channel EEG signals in 1 hour simulation driving experiment, the EEG data was preprocessed using a lowpass filter with a cutoff frequency of 40 Hz to remove the high frequency noise and to get better characters. Then, we selected the segments by judging the reaction time. For the segments including drowsy segments and alert segments, we extracted the variance and peak as features separately. The efficient classifier SVM was used to determine the classification of these feature vectors: 1 for drowsiness and -1 for alertness. Finally, we selected the minimum and the best channels from the 10 EEG channels.

Data segmentation
Our object is to achieve the classification of alertness with the best combination and the smallest number of channels. Thus, we first need to prepare the dataset including drowsy segments and alert segments from 10channel EEG signals. To select segments as training set and testing set, and to classify the state of the subject's alertness, we defined a subject's driving reaction time as the difference between the time of car's drift and the time of subject's correction. When the subject was drowsy, the value of driving reaction time increased, as shown in Fig.  5. We calculated the moving averages of subject's driving reaction time using a 60-point window with 30point overlap, and selected averages of more than 2.5s as drowsy segments, as shown in Fig. 6 (left), and selected averages of less than 1.5s as alert segments, as shown in Fig. 6 (right). Then, we intercepted the half of drowsy segments and alert segments as training set and testing set, respectively. Each data set was intercepted using 5000point window with 3000-point overlap as samples. Finally, 2 drowsy segments and 2 alert segments were selected and each segment contained about 200 samples (400s).

Feature Extraction
In this study, features we used in classification include the variance and the peak of each sample. And the variance and the peak as the feature vector were used for classification of alertness. Each drowsy segment or alert segment contained 60 drifts, about 800s. With a 5s window with 3s overlap, the training set contained about 400 samples. Fig. 7 showed features computed from EEG signals of drowsy state and alert state.

Results and Discussion
In this study, we used the driving reaction time to select data segments as training set and testing set, and used the variance and peak as the feature vector to compute features of 10-channel EEG signal by the sliding window technique. And the sliding window length was 5s with 3s overlap. The SVM was used to determine the classification in 5s epochs of these feature vectors: 1 for drowsiness and -1 for alertness. When the number of channels was changed, the results of classification were different, as shown in Table 1. It is observed that the effect of classification by using all channels is better than using single channel, and using part of channels is better than using all channels. Thus, in order to find the optimal combination of channels, we computed the classification accuracy of different combinations to evaluate the results [22]. Firstly, we used all channels and a single channel to determine the classification respectively, and found that accuracy of all channels was 95.34%, and it was higher than accuracies of any single channel. PO6 reached the best performance of a single channel with accuracy of 93.52%. Then we used two channels to compute accuracies, and there were 45 combinations out of 10 channels. In these combinations of channels, we found that the combination of channels of frontal area and occipital area could improve the accuracy, and the top 11 results from high to low were shown in Table 1. And it was consistent with Ahmed Al-Ani [23]. For the drowsy state, the selected channels were from with the parietal/occipital areas, including the frontal area. According to the results of classification of two channels, we chose 2 combinations with higher accuracy to further research, and the accuracy of combination of FP1 and PO6 was 95.85%, and the accuracy of combination of FP1 and PO5 was 95.34%. Then, we added other channels to these 2 combinations respectively, and found that the combination of FP1, PO5 and PO6 and FP1, POZ and PO6 got the highest accuracy of 96.11%. We also chose 4 to 9 channels from 10-channel as combinations and found that accuracies of these combinations were rather lower than previous combinations. And the accuracy did not increase with the increase of the number of channels. In order to select the optimal combination from the combination of FP1, PO5 and PO6 and the combination of FP1, POZ and PO6, we increased channels to two combinations respectively, as shown in Table 1. In consideration of the symmetry of channels and the development of the wearable electrode cap, thus, we suggested the optimal combination with the smallest number of channels to be FP1, PO5 and PO6.

Conclusions
In this study, we have developed a simulation driving platform for highway scenes using the Unity3D software, and have designed an experiment that the car was randomly drifted away from the center of the third lane of the road. In order to follow the development of the wearable electrode cap, we have chosen 10 EEG channels located at the frontal area and the occipital area. We selected the data into drowsy segment or alert segment by the driving reaction time. The variance and the peak have been extracted as feature vectors. We have obtained the classification of the subject's alertness using SVM with the optimal combination of minimum channels. Our results demonstrated that the optimal combination with the smallest number of channels is FP1, PO5 and PO6, with accuracy of 96.11%. In the further work, we will select more features as feature vectors to process the data and classify the alertness. And according to the optimal combination with the smallest number of channels, we will further analyse the relationship between EEG data and driving behaviour. The methods we used in this study are simple and efficient, and might be used to classify the state of the driver's alertness for a real time wearable alertness-monitoring system.