1. Introduction
The “2018 Global Road Safety Report” issued by the World Health Organization emphasizes that the number of deaths caused by traffic accidents is still increasing year by year, and it has become the eighth leading cause of death of people of all ages. In order to reduce the occurrence of traffic accidents, scholars have conducted research on traffic implementation, for example, Macioszek, E. studied the traffic capacity of roundabouts [
1]. Alessandro Severino et al. studied the safety benefits of flower roundabouts [
2]. The occurrence of traffic accidents is affected by many factors, among which the influence of the driver is the main factor [
3,
4,
5]. Sustainable transportation is one of the latest transportation development concepts in the world today, and safety is one of the keys to sustainable transportation development. Predicting driver behaviors and intentions in advance plays a key role in reducing traffic accidents, and it provides a strong guarantee for sustainable development. This article mainly collects EEG (electroencephalograph) driving signals during the driving process; predicts driver behaviors and intention; and makes timely decisions, which can further reduce the occurrence of traffic accidents and provide a stronger guarantee for sustainable traffic development. Many studies have been conducted on sustainable transportation development, and they have focused mainly on energy saving and carbon emission research [
6,
7,
8]. Pamucar, D., Deveci, M. and Cantez, F. et al. proposed to achieve zero carbon emissions from transportation [
7]. Al-Thawadi, F.E., Banawi, A. and Al-Ghamdi, S.G. suggested that using public transport was sustainable [
9]. In the present study, sustainable transportation development is considered from the perspective of energy saving and improving traffic safety.
Many scholars have studied the intention of drivers, such as Micucci, A., Mantecchini, L. and Sangermano, M. They examined the relationship between motorcyclists’ understanding of car drivers’ intentions and the perceived factors that affect the state of front and rear turn signals [
10]. Driving intentions can be predicted in advance by predicting behaviors such as turning left, turning right, and going straight, thereby providing information to drivers for avoiding traffic conflicts and gaining protection for traffic safety. Predicting driving intentions in advance can also save time and reduce drivers’ judging time thereby saving energy and improving safety.
The key problem of driver behaviors and intentions based on EEG signals is noise reduction; EEG signals are extremely weak, and various signal noises interfere during the signal acquisition process. Driver behavior and intention data are mixed and cannot reflect real driver behaviors and intentions. Therefore, noise reduction is indispensable to obtain clear, accurate driver behavior and driving intention based on EEG signals. This study uses the wavelet transform principle to layer EEG signals, soft threshold for noise reduction, and Python for simulation.
At present, popular classification and recognition mainly include the Bayesian method and the support vector machine (SVM), neural network, and deep learning models.
This research uses Bayesian classification and recognition, which is relatively simple, with high learning and prediction efficiencies based on the probability learning algorithm. In this work, driving intentions during the normal driving process are studied, which can serve as a reference for assisted and automatic driving and lay a foundation for sustainable transportation development.
The paper mainly includes five parts, the first part is the introduction, the second part is the literature review, the third is the materials and methods, the fourth part is models and methods, and the fifth is the discussion and conclusion.
2. Literature Review
Research on drivers’ EEG signals includes driver fatigue detection, driving intention recognition, driver cognitive response, and driver drowsiness.
Borghini, G., Vecchiato, G., and Colosimo, A. et al. evaluated mental fatigue during car driving through high-resolution brain electrical activity and neurophysiological indicators [
11]. Tran, Y., Wijesuryia, N., and Thuraisingham, R. A et al. detected changes in driving fatigue through the fast time resolution of EEG signals. They conducted nonlinear analysis on the alertness and fatigue EEG signals of driving simulation tasks through the second-order difference map quantified by sample entropy and central tendency measurement. The results indicated that the sample entropy and the second-order difference caused a significant increase in the regularity of the EEG signals from the alert to the fatigue state and reduced the variability of such signals [
12]. Mohamed, F. et al. initiated an adaptive fatigue recognition model on the basis of the main axis of EEG frequency, which extracts EEG signals and recognizes the brain perceptions of various environmental changes and driver behaviors thereby identifying driver fatigue [
13].
Hernández, L.G., Mozos, O.M. and Ferrández, J.M. recognized driver braking intention by taking EEG signals as input features with SVM models and convolutional neural network (CNN) models [
14]. Trung-hau Nguyen and Wan-young Chung developed a new system that used EEG signals to detect the driving intention to brake in an emergency with 91% accuracy [
15].
Huang, Yufei, and Hajinoroozi detected the cognitive performance of drivers by extracting EEG features as input parameters and adopting deep CNNs [
16]. Lin, C.T., Lin, K.L., and Ko, L.W. et al., extracted the characteristics of EEG signals through nonparametic weighted feature extraction and detected driver cognitive responses to traffic light signals through Naive Bayes [
17]. Chuang, C.H., Lai, P.C., and Ko, L.W. et al., established a system to assess the cognitive state of drivers, and they proposed a classification system for alertness/drowsiness on the basis of EEG signals [
18]. Li, G., Lee, B.L., and Chung, W. detected driver drowsiness through EEG [
19].
Lin, F.-C., and L.-W., et al., proposed a self-organizing neuro-fuzzy system on the basis of generalized EEG to monitor and to predict driver drowsiness through the occipital area [
20]. Lin, F.C., Ko, L.W., and Chen, S.A., et al., detected driver drowsiness by extracting the frequencies of EEG signals [
21]. Gang, Chung, and Wan-Young, et al. found driver drowsiness by adopting the posterior probability model of SVM based on the characteristics of brain electrical signals [
19]. Rahma, O.N. and Rahmatillah, A. recognized awake and lethargic states, extracted the relative power of EEG signals as a feature, and optimized the extreme learning machine by using the common space pattern method to calculate the variance of the relative power thereby achieving significant effects [
22].
Picot, A., Charbonnier, S., and Caplier, A. proposed an online sleepiness detection method on the basis of EEG; the results indicated that nearly 85% of the correct detection were obtained [
23].
Lin, C.T., Chen, S.A., and Ko, L.W., et al., studied driver distraction detection while driving through EEG signals. They found that the increased power of theta wave in the frontal lobe extracted by EEG signal processing can be used as an early detection indicator of distraction for driver inattention [
24].
The above literature investigated and explored driver cognition, drowsiness, fatigue, and braking intention through EEG signal extraction features, and it improved its positive effect on driving assistance. However, relatively few studies have explored the EEG signals of drivers during normal driving.
3. Materials and Methods
3.1. Experiment
A driving simulation experiment platform and EEG signal acquisition platform were built, EEG signals were collected through the EEG device g.USBamp, and a route was selected. The two platforms included two parts. One part was a virtual driving platform composed of simulation software for driving simulation, a computer, and a hardware system for driving operation. The other part was EEG acquisition equipment, which was composed of an EEG signal amplifier, power supply equipment, 32 electrodes, electrode caps, and display equipment for showing EEG signal graphics.
Figure 1 showed the driving virtual environment and the experimental equipment. The EEG signals were collected while driving at the same time. The driving process of the route included driving intention operations, such as turning left, turning right, and going straight. Nine drivers were selected, aged between 20 and 23 years old, had a driving license, and did not have any brain diseases. Moreover, a relevant pre-experiment training for drivers was conducted. This experiment was approved by the school ethics committee.
Driving operation was conducted through a driving simulator, and EEG signal information was collected simultaneously. The first 3 s and the last 3 s of data from the EEG signals of the left, right, and straight driving intentions during driving were collected in EEG. In signal acquisition, a 50-Hz power frequency noise signal was filtered out using EEG equipment. The collection frequency was 256 Hz, and the time for collecting EEG information was 3 s. Moreover 16-channel EEG signal information was collected. Meanwhile, 16-channel electrodes mainly included the area above the left and the right hemispheres of the brain. The 16-channel electrodes were F3, FC3, C3, F1, FC1, C1, Fz, FCz, Cz, CPz, F2, F4, C2, C4, FC2, and FC4. By testing these electrodes, the corresponding EEG data were obtained, thereby providing a basis for the analysis of the EEG signals.
Table 1 shows the electrode positions in certain brain areas.
3.2. Analysis of Driving Intention Data
Driving intentions in this experiment had three main kinds: turn left, turn right, and go straight. The EEG signals of the three driving intentions were collected. The time window data of the traditional driving intention object generally included 3, 6, and 10 s for research. This study selected 3 s of data for analysis and research; collected the 3-s EEG signals of the driver turning left, right, and going straight; and processed and analyzed the 3-s EEG signals. The sampling frequency was 256 Hz, and the EEG signals corresponding to the left-turn, right-turn, and the straight-forward driving intentions for 3 s had 768 data points. Taking the right-turn driving intention as an example, when a driver turned on the right turn signal, the moment when the driver turned right was determined. The EEG data of the first 3 s of the right turn were collected as research data, and Python was used to read the EEG signals. All EEG data were screened; left turn, right turn and straight drive of different drivers were classified; and EEG data were normalized.
Table 2 shows the EEG data of the right-turn driving intention.
Table 3 displays the EEG data of the left-turn driving intention.
Table 4 presents the EEG data of the straight driver behavior.
4. Models and Methods
EEG signals were decomposed in the wavelet domain, and the wavelet db3 was selected and decomposed into three, four, and five layers. The wavelet was transformed to obtain wavelet coefficients. Part of the wavelet coefficients was decomposed into EEG signals and noise, and another part was decomposed into noise signals. Wavelet decomposition transformed to extract useful EEG signals. Moreover, the decomposed signals were used as input into the independent component analysis model to continue filtering. Thereafter, wavelet packet processing technology was used to extract energy as the input data of the input model for training and testing.
4.1. Wavelet Transform Principle
Wavelet transform is an important tool for time–frequency research. Through wavelet transform, localized frequency analysis can be performed, which overcomes the shortcomings of the Fourier transform, and it is suitable for processing nonstationary signals. Wavelet transform is a time–frequency analysis method with multi-resolution characteristics. It can have good resolution in the time and frequency domains, and it is considerably suitable for processing EEG signals. Wavelet transform is a localized analysis in the time and frequency domains. Signals are refined in multiple scales through scaling and translation operations. Frequency and time are subdivided at low and high frequencies, respectively. Various time-varying signals can be effectively decomposed, and signal and noise can be separated substantially. Commonly used wavelet basis functions include the wavelet function, wavelet function system, and complex wavelet. The choice of wavelet basis is founded on which group of wavelet basis obtains the largest wavelet coefficients in which the variance value is small and which group of wavelet basis is selected. Internationally renowned wavelet analysis scholar Inrid Daubechies constructed the wavelet function Daubechies. The wavelet base in the Daubechies series is denoted as dbN, where N is sequence N = 1, 2, …, 10.
The basic wavelet transform principle is to use the wavelet function system to approximate a signal and to obtain the signal through translation or expansion via a basic wavelet function.
The decomposition of the wavelet one-dimensional transform is as follows:
where
is the mother wavelet,
a is the translation factor,
b is the expansion factor, and
is the wavelet coefficient of the signal,
is energy finite signal. The projection decomposition of
under these wavelet basis functions is the continuous wavelet transform
Continuous wavelet and wavelet coefficients are discretized, and the discrete wavelet function is obtained as follows:
Formula (3) represents the discrete wavelet basis function, and Formula (4) represents the discrete wavelet transform. Each letter has the same meaning as Formulas (1) and (2).
Wavelet transform is divided into three layers, only decomposes the low-frequency part, and it does not consider the high-frequency part. Signal S = CA3 + CD3 + CD2 + CD1 + CA1, where S is signal, where CA is the approaching signal—which is the low-frequency part—and CD is the detail signal, which is the high-frequency part (
Figure 2).
The frequency range of the beta waves in EEG signals is 14–30 Hz, and that of gamma waves is 30–60 Hz. Therefore, the EEG signals are divided into three layers by db3 wavelets A3, D3, D2, and D1. The sampling frequency is 256 Hz. According to the sampling theorem, D1 is the first layer and the frequency range is 64–128 Hz. D2 is the second layer and the frequency range is 32–64 Hz. D3 is the third layer and the frequency range is 16–32 Hz. A3 is the third layer and the frequency range is 8–16 Hz. Therefore, the beta and gamma waves are in the third and second layers, respectively.
4.2. Wavelet Threshold Denoising
Wavelet threshold denoising occurs through wavelet transform, which maintains the wavelet coefficients higher than the threshold, and sets the wavelet coefficients below the threshold to zero. In this manner, the useful signal information is preserved and the noise signal is filtered out. Thereafter, processed wavelet coefficients are reconstructed to obtain denoised EEG signals. The selection of the threshold and the threshold function is particularly important.
Threshold selection rules mainly include minimum and maximum thresholds, fixed thresholds, adaptive thresholds based on the unbiased likelihood estimation principle, and heuristic thresholds. The four threshold selection rules have their respective advantages and disadvantages. The minimum–maximum value mainly realizes the minimization of the maximum mean square error and produces the minimum variance extreme value. The fixed threshold value aims to select a fixed threshold value according to the characteristics of signals to reduce noise when it is reduced. The soft threshold estimator determines the minimum risks and obtains the adaptive thresholds. The heuristic threshold is a threshold method based on the ideas of adaptive and fixed thresholds.
The two main types of threshold functions are hard and soft. The hard threshold function compares the wavelet coefficients before the wavelet transform with the threshold value. The absolute value of the wavelet coefficients is higher than the threshold value, and that of the wavelet coefficient is set to zero if the absolute value is below the threshold value.
The hard threshold function is as follows:
where
is the wavelet coefficient of the original signal,
is the wavelet coefficient after threshold quantization, and
T is the threshold.
The soft threshold function compares the wavelet coefficients before the wavelet transform with the threshold value. Wavelet coefficients, whose absolute value is above or equal to the threshold, are set to a constant difference, and wavelet coefficients below the threshold are set to zero. Hard threshold easily loses some useful signals after processing. Hence, soft threshold is selected to process and to analyze EEG signals. Some studies have been based on soft and hard thresholds, and they have made improvements [
13,
14].
The soft threshold function is as follows:
where
is the wavelet coefficient of the original signal,
is the wavelet coefficient after threshold quantization, and
T is the threshold.
The noise reduction effect is evaluated using the signal-to-noise ratio (SNR) and minimum mean square error. The smaller the minimum mean square error, the closer the processed signal to the original signal. The larger the SNR, the more useful the information and the less noise the information has.
The maximum–minimum threshold method is as follows:
The maximum–minimum threshold method minimizes the maximum risks. The original noisy signal is considered similar to the estimation formula of the unknown regression function. This extreme value estimation minimizes the maximum mean error in the function. This study uses the maximum–minimum threshold method to obtain the threshold.
The signal changed by wavelet is filtered using the independent component analysis method, and the filtered signal is processed via a wavelet packet transform.
Wavelet packet transform decomposes high frequency on the basis of wavelet transform theory.
Python is used to process and to analyze the EEG signal noise reduction of the wavelet transform and to evaluate the processing effect through the minimum mean square error and SNR.
Signals before and after noise reduction are compared to one another. Through wavelet stratification, soft threshold is used for wavelet transform noise reduction analysis.
Figure 3 illustrates that the right turn of the F3 channel is used as an example.
The minimum mean square error obtained using Python to simulate noise reduction is 0.001697, indicating that the effect is excellent.
4.3. Wavelet Packet Theory and Its Characteristic Analysis
Orthogonal wavelet decomposition aims to decompose the low-frequency coefficients into two parts, and obtain the low- and high-frequency coefficient vectors. Thereafter, the new low-frequency coefficient vector is continuously decomposed into low- and high-frequency coefficient vectors, but the latter is no longer disintegrated. Wavelet packet decomposition continues to break down high-frequency coefficients. Furthermore, the high-frequency coefficient vector is decomposed into two parts, different from wavelet decomposition, and it is considerably detailed. See
Figure 4, the abscissa represents the frequency, and the ordinate represents the amplitude of the signal.
This study uses wavelet packet energy, and it is a feature vector as input to the Bayesian recognition model for recognition. Wavelet packet energy is obtained through the wavelet packet coefficient.
4.4. Driving Intention Recognition Based on Bayesian Theory
Suppose A and B are any two events, and
P(
A) > 0. Under the condition that event
A has occurred, the conditional probability of event
B occurring is as follows:
where
P(
A) and
P(
B/
A) are the prior and the posterior probabilities, respectively.
Therefore, the multiplicative theorem can be obtained as follows:
If
P(
A) > 0 and
P(
B) > 0 for any two events A and
B, respectively, then:
Let
A1,
A2, …,
An be any
n events,
n >= 2, and
P(
A1,
A2, …,
An) > 0; thus,
for any event
B, the total probability formula is as follows:
From the preceding conditional and total probability formulae, Bayes’ theorem can be obtained as follows:
Naive Bayes classifier works on the basis of Formula (12):
where
is the posterior probability,
is the likelihood probability,
is the prior probability, and
is the marginal probability.
Assuming that the likelihood probability of feature x follows a normal distribution:
The three main categories of driving intention recognition are turn left, turn right, and go straight. Assuming that the probability of a certain category is the same, prior probability is as follows:
The following formula is used when recognizing driving intensions:
where
j represents turning left, going straight, and turning right;
i represents the number of channels;
k represents the number of drivers; and
represents the
kth characteristic parameter of the number of
ith channels.
indicates the category of the
ith channel number.
This research selects the first channel (F3) of the left hemisphere of the brain for research. The analysis results show that when wavelet and wavelet packet decompositions are divided into five layers, the recognition rate is the highest, and the recognition rate of a driving intention through Python simulation reaches 82.6%.
Table 5 shows the SVM model, random forest (RF) model, decision tree model, Naive Bayes model, and recognition rates.
5. Discussion and Conclusions
In this study, driving intentions are identified through EEG signals, and the original EEG signals are denoised through wavelet packet theory. Driving intentions are also predicted by inputting denoised EEG signals into the Naive Bayes SVM, RF, and decision tree models. The Naive Bayes model prediction of the driving intentions of turning right and left is up to 82.6%. In this research, predictions are not made about turning left, turning right, and going straight at the same time. This part of the research content will be added to future research. Different noise reduction and recognition methods will also be used to identify driving intentions in the future. Regarding the age of the drivers, the age of the drivers selected in the paper is 20–23 years old, and the age stages are relatively concentrated. In future research, drivers of different ages will be studied and analyzed.
Sustainable transportation development is inseparable from driving intention recognition and assisted and autonomous driving development. Driving intention recognition can identify driving intentions in advance to reduce the occurrence of traffic accidents. At the same time, early driving intention recognition can assist driving and provide a strong guarantee for autonomous driving, which is the future trend of sustainable transportation development. The traditional research objective of driving intention is mainly based on the state of vehicles. State parameters are measured, processed, and analyzed as the input objects of driving intention recognition. The driving intention recognition model is used, and EEG signals are the objects of studying driving intentions. In addition, the measures to estimate driving intentions are directly measured. Compared with the traditional driving intention research objective, the identification of the characteristic parameters of the input EEG signals is superior, which is direct and accurate. Numerous interference factors are present in collecting EEG signals, thereby necessitating the noise reduction of these signals. Wavelet transform is used to analyze the driving intention data of EEG signals to reduce noise. Wavelet transform is utilized to analyze and to process nonstationary signals, frequency localization analysis, and other characteristics are performed, and the driving intention data of EEG signals are processed and analyzed. EEG signals are divided into five layers, and the soft threshold method is used thereafter to process the signals. The minimum mean square error of the signal after noise reduction is 0.001697, thereby obtaining a good noise reduction effect. The noise reduction of wavelet transform theory continues to have shortcomings. Specifically, it only decomposes low-frequency signals, and it cannot decompose high-frequency signals. Thus, wavelet packets are used to extract energy features from the denoised EEG signals and input them to driving intentions. In the recognition model, a good recognition effect is obtained, and the maximum recognition rate reaches 82.6%. In future research, in-depth investigations on noise control are needed to provide a reference for further sustainable transportation development.