The driver status is determined using the driver’s EEG based on the ML method, and the desired TOT is determined based on the determined driver status. The desired clearance is calculated to ensure the desired TOT. The safety index is calculated considering the driving situation using the vehicle states, and the integrated desired clearance is calculated considering the desired TOT and driving characteristics. The SMC is designed to calculate the desired longitudinal acceleration and track the desired integrated clearance. A proportional–integral (PI) controller is utilized to control the acceleration and brake pedal to track the desired longitudinal acceleration calculated from the SMC and applied to the vehicle control input as the pedal input.
2.1. EEG-Based Driver Status Classification
In this section, an EEGs in which drivers performed specific tasks are acquired and analyzed, and a driver status classification model using ML methods (that is, ANN, RNN, and SVM) is proposed. EEG data acquisition equipment and experiments are established in the design of the driver status classification process. The EEG data acquisition equipment is comprised of an EEG headset (NeuroSky MindWave Mobile 2), Bluetooth module, Arduino Uno, and laptop, as shown in
Figure 2.
The EEG headset sends the EEG data to the Arduino Uno through Bluetooth at 1 Hz and saves them using a laptop. The acquired EEG data include the delta, theta, high alpha, low alpha, high beta, low beta, high gamma, and middle gamma waves, and their range of frequencies is in
Table 1 [
31].
In the EEG data acquisition experiment, ten drivers participated (seven males and three females) with an average age of 25.1 years; they have driving licenses and different driving experiences. The experiment was conducted to acquire the driver EEG data for 5 min while the drivers were engaged in road monitoring or NDRT. Drivers were told to concentrate on the task that they were performing. The experimental environment was constructed using a real vehicle and driving simulator (Logitech G29), as shown in
Figure 3.
As shown in
Figure 3, the drivers wore the EEG headsets during road monitoring and NDRT. The driver performed road monitoring by getting into the passenger seat, assuming that they were in an autonomous vehicle. Because watching movies is a common activity in autonomous vehicles and can cause driver distraction, affecting takeover ability, watching movies was applied as the NDRT in this study [
29,
32,
33,
34]. Owing to the driver being able to carry on various activities in autonomous vehicles, it is planned to acquire the EEG data in various situation and drivers such as conversations with passengers and reading books to establish the robustness and generalizability of the proposed driver status classification model in the future. The driver used a tablet PC to watch movies and videos during the experiment in the driving simulator. The EEG data during NDRT were acquired when the driver concentrated on the NDRT, and the experiment was conducted indoors to eliminate factors that could affect driver brain signals, such as car sickness or driving environment (traffic condition, ride comfort, etc.), during the acquisition process. In total, 100 EEG data points—delta, theta, high alpha, low alpha, high beta, low beta, high gamma, and middle gamma waves—were acquired, with 10 data points acquired from each person, and the Savitzky–Golay filter was utilized to smooth the acquired EEG data in real time.
Figure 4 shows the acquired raw data and smoothing of the EEG data, which is fitted of 11 data into a 5th-order polynomial function and selected the first of the fitted EEG data when the driver conducts road monitoring and NDRT.
As can be seen from
Figure 4, since the raw or filtered data of the EEG is difficult to categorize between the two tasks, road monitoring and NDRT, there is a possibility that classification performance degradation can be occurred when the raw or filtered data of the EEG is used as an input for ML method. Therefore, a sliding window method is employed for feature extraction by calculating the standard deviation and difference between the maximum and minimum EEG data in the window. The standard deviations and differences in the window are expressed by Equation (1) and Equation (2), respectively:
where
is the
-th EEG data in the sliding window,
is the average of the EEG data in the sliding window,
denotes the size of the sliding window, and
and
represent the maximum and minimum value of the EEG data in the window, respectively. The calculated values are shown in
Figure 5. The applied size of the sliding window is 30.
As shown in
Figure 5, it is difficult to confirm the differences between road monitoring and NDRT in the delta, theta, low alpha, and high alpha waves. In contrast, in the low beta, high beta, low gamma, and middle gamma waves, there are significant differences between road monitoring and NDRT. For a quantitative comparison, the average of standard deviation and differences of each EEG signal are calculated, and they are shown in
Table 2 and
Table 3.
By comparing the calculated averages listed in
Table 2 and
Table 3, the low beta, high beta, low gamma, and middle gamma waves show the highest differences between road monitoring and NDRT compared to that with the delta, theta, low alpha, and high alpha waves between road monitoring and NDRT. Therefore, it is used to train the standard deviation and differences between the maximum and minimum values in the window for the classification of driver status. To classify driver status, 30,000 pieces of training data are acquired through experimentation. In addition, various ML methods (ANN, RNN, and SVM) are used, and their performances are investigated by comparing the corresponding performance indices to apply proper method to proposed driver status classification. The training processes of the ANN, RNN, and SVM are as follows.
An ANN is a basic neural network structure that includes an input layer, hidden layer, and output layer, as shown in
Figure 6. The ANN is designed using the MATHWORKS toolbox(R2019a), deep learning toolboxes, and a pattern recognition method is used to classify the driver status. In this study, 100 hidden layers are applied, and the ratio of training, validation, and test datasets is 8:1:1.
- B.
RNN
As shown in
Figure 7, an RNN is a neural-network-based learning structure that uses current and past information and predictions on time series or sequences. In this study, an RNN is designed using the MATHWORKS toolbox(R2019a), which is a deep learning toolbox. The dropout technique is used and the Softmax function was adopted as the activation function. Additionally, 100 hidden layers are applied, and the ratio of training, validation, and test data is set as 8:1:1.
- C.
SVM
As shown in
Figure 8, an SVM is a binary classifier that calculates hyperplanes to optimize the margin between data and hyperplanes. For design, the SVM, MATHWORKS toolbox(R2019a), statistics, and machine learning toolbox are used, and the kernel trick is applied to improve classification performance by applying a kernel radial basis function. In this study, the training and validation datasets are applied in a ratio of 8:2.
The input data are the extracted feature, which are the standard deviation and differences between the maximum and minimum EEG signals in the window. The outputs are zero or one, indicating road monitoring and NDRT, respectively. The performance of the driver status classification model is evaluated using the
Precision,
Recall,
Accuracy, and
F1
scores expressed in Equations (3)–(6).
where
TP is true positive,
FN is true negative,
FP is false positive, and
FN is false negative. The performances of ANN, RNN, and SVM are compared in
Table 4.
Table 4 also presents the results of the driver status classification model.
Table 3 lists the performance indices of the ANN, RNN, and SVM. The precisions are 86.5%, 62.97%, and 93.08% for ANN, RNN, and SVM, respectively. The recalls are calculated to be 79.4%, 77.01%, and 89.17%, respectively. The accuracies of the ANN, RNN, and SVM are 81.9%, 65.86%, and 91.27%. The F1 scores are 82.8%, 69.29%, and 91.08%. This evaluation shows that the RNN has the lowest performance and the SVM has the highest performance by comparing the calculated performance index. Because the SVM shows the highest performance, it is suitable for classifying driver status using the EEG in this evaluation. The EEG acquisition equipment constructed in this study can acquire the EEG data in the frequency domain. Because the input data of ML are calculated using the sliding window method by calculating the standard deviation and min/max values and the calculated values, training data, show linearity, it is found that ANN and SVM show relatively higher accuracies than RNN, which shows strength in time series data. Because the proposed feature extraction method can drive spike at noisy EEG data, it is needed to investigate the various method or parameter study to enhance the classification performance. In this study, watching movies is considered as an NDRT. In the future, drivers are expected to be able to perform various tasks in autonomous vehicles. Therefore, it is necessary to acquire and analyze the EEG data affected by various factors that may occur in actual vehicles and to advance the driver status classification model by considering reading, listening to music, and playing mobile games. According to the driver status classified using the EEG, the desired TOT is determined based on [
1]. The desired TOT was set to 2.256 s and 2.369 s when the driver conducted road monitoring and NDRT, respectively.
2.2. Desired Clearance Derivation
The desired clearance is calculated to ensure the desired TOT or to consider the driving characteristics. The desired TOT is determined as the driver status, as described in
Section 2.1. To consider the driving characteristics, a driving experiment was performed using a simulator, and the driving characteristic factor is derived by calculating the time headway. The desired clearance is derived to secure the desired TOT and time headway respectively. First, to ensure the desired TOT, the desired clearance is calculated for three cases based on the longitudinal velocity relationship between the subject and the preceding vehicles in [
35]. To ensure a safe takeover, it is assumed that the subject vehicle decelerates to a predetermined deceleration after the takeover request and stops braking deceleration in consideration of the situation in which the driver cannot take over during the desired TOT. Then, the time–velocity plane is designed to calculate the desired clearance (
) using the longitudinal velocity of the subject and preceding vehicles by calculating the geometrical area. To prevent collisions, the minimum clearance (
), which is the distance between the subject and preceding vehicles when the subject vehicle stops, is adopted. The derived desired clearance for each case is as follows:
In Case 1, it is assumed that the preceding vehicle stopped, the longitudinal velocity was 0 km/h at the takeover request, and the subject vehicle decelerated.
Figure 9 shows an example of the designed time–velocity plane in Case 1.
Here,
is the longitudinal velocity at the takeover request, and
denotes the desired TOT in Case 1. The desired clearance can be expressed by geometrically analyzing the distance while the subject vehicle travels in deceleration, as shown in Equation (7).
where
and
denote the braking and predetermined deceleration, respectively.
- B.
Case 2.
Case 2 represents the situation in which the longitudinal velocity of the subject vehicle is higher than that of the preceding vehicle with braking deceleration at the takeover request.
Figure 10 shows an example of the designed time–velocity plane in Case 2.
Here,
and
are the longitudinal velocities of the subject vehicle and preceding vehicle, respectively. At the takeover request,
denotes the longitudinal velocity of the subject vehicle at takeover and
denotes the desired TOT in Case 2. By calculating the clearance between the decelerating subject vehicle and the braking preceding vehicle, the desired clearance can be derived, as expressed in Equation (8).
- C.
Case 3.
In Case 3, the longitudinal velocity of the preceding vehicle exceeds that of the subject vehicle at the takeover request. It is assumed that the preceding vehicle decelerates to braking deceleration, and the subject vehicle decelerates to predefined deceleration and braking deceleration after takeover.
Figure 11 shows an example of the designed time-velocity plane in Case 3.
Where
and
represent the longitudinal velocity of the subject and preceding vehicle, respectively;
and
denote the time and longitudinal velocity, respectively, of the subject vehicle when the longitudinal velocities of the subject and preceding vehicles coincide after the takeover request;
is the desired TOT; and
is the longitudinal velocity at takeover. The desired clearance derived by calculating the geometrical area in the time–velocity plane in Case 3 is presented as follows:
Second, the driving characteristics of each driver are considered to reduce the sense of heterogeneity in autonomous vehicles. To analyze the driving characteristics, an indoor driving experiment using a simulator (Logitech G29) was carried out three times using the CarMaker software to construct a virtual driving environment.
Figure 12 shows the environment for the data acquisition of the driving characteristics.
Driving data, including the clearance and longitudinal velocity of the subject and preceding vehicles, were acquired. Using the acquired driving data, the driving characteristics are derived by calculating the time headway, and the desired clearance to secure the driving characteristics is calculated based on the time headway and longitudinal velocity of the subject vehicle, as expressed in Equation (10) and Equation (11), respectively.
where
is the current clearance between the subject and preceding vehicles and
is the desired clearance to consider the driver characteristics.
Figure 13 shows the representative acquired driving data of the drivers who were familiar (Driver 3) and unfamiliar (Driver 9) with driving.
For drivers who are familiar with driving, such as Driver 3, driving characteristics can be confirmed by the propensity of each driver, such as maintaining constant clearance or increasing clearance proportionally with longitudinal velocity. For drivers who are not familiar with driving, such as Driver 9, it is difficult to analyze a certain propensity.
Table 5 lists the calculated average time headway of each driver.
2.3. Safety-Index-Based Desired Clearance Transition
In this research, a safety index is designed to determine the driving situation and includes safety, warning, and emergency, with inverse time-to-collision (TTC) based on [
36,
37,
38]. The safety index is expressed by Equation (12) according to the current vehicle state, braking distance, and warning distance.
where
denotes the current clearance between the subject and preceding vehicles,
denotes the braking distance, and
denotes the warning distance. The braking and warning distances indicate that if
exceeds
or
, the driving situation is safe, whereas when
is below
, it is dangerous. The braking and warning distances are calculated using Equation (13) and Equation (14), respectively.
where
is relative longitudinal velocity between subject and preceding vehicles,
is system time delay,
is human time delay, and
is maximum of longitudinal deceleration on normal road. The inverse TTC is expressed by Equation (15).
According to the safety index and inverse TTC, safety level, safety, warning, and emergency are determined as follows:
- B.
Inequality condition for warning level
- C.
Inequality condition for emergency level
When the current driving situation is determined to be safe, the safety level is zero, and the desired clearance is determined based on the driving characteristics, which are analyzed experimentally. When the current driving situation is determined as a warning or emergency, indicating a safety level of 1 or 2, respectively, the desired clearance is calculated based on the desired TOT described in
Section 2.2.
The integrated desired clearance is determined based on safety index and calculated using the third-order polynomial function (
) in transient time.
where
is the integrated desired clearance,
is the desired clearance considering the driver characteristics, and
represents the desired clearance ensuring the desired TOT, which is determined by the driver status.
2.4. SMC-Based Longitudinal Control Algorithm
The SMC is designed to track the desired clearance by calculating the desired longitudinal acceleration under Lyapunov stability conditions. To design the SMC, the control error is defined using the desired and current clearances, and the control input is derived based on the Lyapunov stability conditions. The control errors are defined using the clearance and longitudinal velocity in Equation (20) and Equation (21), respectively.
The sliding surface is defined as follows.
In this paper, the sliding surface is designed using a linear combination of control errors simply, however, it is considered an advancement in the design process to reduce the chattering phenomenon. To calculate the control input that ensures Lyapunov stability, a cost function is designed based on the Lyapunov candidate function, as expressed in Equation (23).
Based on the definition of a sliding surface in Equation (22), the time derivative of the designed cost function can be obtained using Equation (24).
The disturbance boundary and injection term are defined in Equations (25) and (26), the time derivative of the cost function can be rewritten as Equation (27).
Using finite-time convergence conditions, the time derivative of the cost function can be described as Equation (28).
where
denotes decay rate of Lyapunov function. Then, by subtracting Equations (27) and (28), the magnitude of the injection term can be derived as:
Therefore, the control input is calculated as the desired longitudinal acceleration by subtracting Equations (26) and (29), which are expressed as Equation (30).
To reduce the chattering phenomenon in the SMC, a sigmoid function is utilized as a sign function, as expressed in Equation (31).
where
denotes the gradient of the sigmoid function determined by trial and error.