Introduction

With the continuous increase of the number of vehicles and highway infrastructures, the importance of active vehicle safety technology has significantly increased1,2,3,4. Vehicles must come to a complete stop from the high speed within a short distance while maintaining stability to prevent unstable phenomena such as side-slip and spin5. The design of traditional braking system often relies heavily on empirical knowledge and engineering testing6. While this approach provides a fundamental level of safety, there remains considerable room for improvement under highly variable and complex road conditions7. In recent years, with the rapid development in the field of machine learning, the application of machine learning toward enhancing vehicle safety and reliability has emerged as a prominent research trend8,9,10.

The number of data dimensions that can be processed by machine learning algorithms far exceeds that of the algorithms based on vehicle dynamics models11. However, most machine learning algorithms require substantial computational resources, which means machine learning algorithms have difficulties in satisfying the real-time requirements, that is, the algorithms need to generate the output in an extremely short period12.

To address these challenges, a simulation based approach was adopted to produce a comprehensive dataset under various driving scenarios, where CarSim 2019 was utilized to generate diverse conditions by systematically varying configuration parameters and the simulated data was recorded by sampling throughout each simulation run. The simulated data was then used to train and validate machine learning algorithms aimed at enhancing emergency braking performance. We propose a data optimization model and an emergency braking strategy generator. The proposed model can optimize emergency braking strategy data to achieve a shorter emergency braking distance and the proposed generator is able to produce superior emergency braking strategy by utilizing the data optimized by the proposed model.

The main contributes of this article are: (1) We design a machine learning based model to optimize emergency braking data points. The data points after the optimization will contribute to generating emergency braking strategy with superior emergency braking performance. (2) We propose an emergency braking strategy generator which employs Balltree nearest neighbor search algorithm to generate emergency braking strategy in an extremely short period. (3) We construct a dataset and the data points in this dataset include optimized emergency braking strategies.

The remainder of this article is structured as follows: Section II discusses the limitations of current algorithms and presents the algorithm proposed in this article. In Section III of this article, a constraint optimization algorithm is used to optimize braking effect and an algorithm is proposed to identify the key factors influencing a label through neural networks. Section IV is experiments, including data collection, experiments related to model training, and experimental results. In Section V, the advantages of the proposed algorithms are summarized and discussed.

Key terms

The terms which will be frequently mentioned in the following article will be listed separately in this part.

  1. 1.

    Braking system13

The braking system refers to the vehicle’s integrated control system, responsible for regulating and generating braking forces to ensure safe deceleration and stopping.

  1. 2.

    Emergency braking14

Emergency braking refers to the rapid and forceful deceleration of a vehicle in response to an unexpected or hazardous situation, usually to avoid a collision. It can be initiated manually by the driver applying maximum brake force or automatically by an Autonomous Emergency Braking (AEB) system when an imminent collision is detected.

  1. 3.

    Emergency braking strategy15

Emergency braking strategy defines the control logic and decision-making process that determines how braking forces are applied during an emergency event. In this article, we employed the longitudinal force of the left front, left rear, right front, and right rear wheels (Fx_L1, Fx_L2, Fx_R1 and Fx_R2) and the longitudinal slip ratios of the left front, left rear, right front, and right rear wheels (KappL_L1, KappL_L2, KappL_R1 and KappL_R2) as the parameters that the emergency braking strategy need to control.

  1. 4.

    Emergency braking performance/emergency braking effect14

Emergency braking performance/emergency braking effect refers to the quantitative evaluation of the effectiveness of the emergency braking system in avoiding or mitigating collision. In this article, we employed the emergency braking distance to quantize emergency braking performance under stable conditions.

  1. 5.

    Emergency braking distance16

Emergency braking distance refers to the total distance a vehicle travels from the initiation of emergency braking to a complete stop.

  1. 6.

    Vehicle slip ratio17

Vehicle slip ratio quantifies the relative difference between the wheel’s rotational speed and the vehicle’s actual linear speed. It is defined in the formula (1). In this formula, \({\text{V}}_{\text{v}\text{e}\text{h}\text{i}\text{c}\text{l}\text{e}}\) stands for the vehicle’s linear velocity and \({\text{V}}_{\text{w}\text{h}\text{e}\text{e}\text{l}}\) stands for the tangential velocity at the tire circumference.

$$Vehicle~slip~ratio=\frac{{{{\text{V}}_{{\text{vehicle}}}} - {{\text{V}}_{{\text{wheel}}}}}}{{{{\text{V}}_{{\text{vehicle}}}}}}$$
(1)
  1. 7.

    Model predictive control (MPC) algorithm18

Model predictive control (MPC) algorithm refers to a control strategy that predicts future system behavior using a dynamic model and optimizes control inputs over a finite horizon to achieve desired performance while satisfying constraints.

  1. 8.

    Vehicle dynamics model15

Vehicle dynamics model refers to the mathematical representation of a vehicle’s motion behavior, describing the relationships among forces, slip ratios, and vehicle responses such as acceleration.

  1. 9.

    Back-propagation Neural Networks (BPNN)19

Back-propagation Neural Network (BPNN) is a supervised learning model characterized by its backward error propagation mechanism. During training, errors from the output layer are propagated backward through the network’s hidden layers, enabling the calculation of gradients for updating connection weights via gradient descent to reduce overall prediction error.

  1. 10.

    Balltree Nearest Neighbor Algorithm20

Balltree nearest neighbor algorithm refers to a tree-based spatial indexing method that organizes data points into nested hyperspheres (balls) based on Euclidean distance to accelerate nearest-neighbor search, especially in high-dimensional spaces.

Table 1 will list the symbols and notations that are defined by this article.

Table 1 Symbols and notations.

Related work

Some traditional research on braking system optimization have developed braking strategies through mathematical modeling21,22,23. Parseh, M. et al.21 propose a motion-planning framework for autonomous vehicles that incorporates predicted post-impact vehicle motion into collision mitigation decisions. However, the study is limited by certain assumptions. A fuzzy-logic controlled antilock braking system (ABS) is proposed by reference22. The simulations show a shorter stopping distance under road surface with high road adhesion coefficient but a smooth enhancement in road surface that has low road adhesion coefficient such as slippery road surface. Labh, S. K. et al.23 shows a classical proportion integration differentiation (PID) controller to regulate wheel slip for ABS.

While these methods are effective under certain conditions, they often fail to fully utilize the braking capacity in extreme situations or when encountering sudden obstacles24. Furthermore, minimizing emergency braking distance imposes specific requirements on vehicle slip ratio and braking force output which refers to the magnitude of decelerating force generated by the braking system. However, the vehicle stability which describes the ability of a vehicle to resist unwanted conditions should be maintained through precise torque distribution. The two objectives, minimizing the emergency braking distance and maintaining vehicle stability, one objective will exhibit strong nonlinear change when linear change happens on another objective, which is defined as nonlinear coupling25,26. According to the references25,26, braking deviation and the loss of steering ability of front wheels will occur due to the nonlinear characteristics of tire force under emergency braking conditions. Mathematical modeling methods often involve important approximations, which can be difficult to accurately characterize this strongly nonlinear coupling relationship21,27.

In recent years, machine learning, especially deep learning and reinforcement learning, has had a significant impact on the field of intelligent transportation28,29,30. Methods for optimizing braking strategies based on neural network are able to learn meaningful braking-related features from large volumes of driving data31,32,33,34. Basso, F. et al.31 proposed a new image-inspired architecture to capture microscopic scene of vehicle behavior, which allows to develop real-time collision prediction models through image processing methods such as convolutional neural network and deep convolutional generative adversarial networks. Teng, X. et al.32 introduced DTTCNet, a transformer model designed to improve the accuracy of time-to-collision (TTC) prediction, which outperforms existing methods in terms of accuracy. Numerous studies have explored the application of deep reinforcement learning algorithms to optimize vehicle braking control33,34. Among these, Chen, D. et al.34 proposed a novel reward function for edge cases and a longitudinal control policy for leading and following vehicles, which successfully prevented potential chain collisions in simulated high-risk scenarios.

With the advancement of sensor technology35, the aforementioned deep learning algorithms are now capable of conducting a holistic analysis of vehicle and road information, thereby enhancing the reliability of emergency braking systems and intelligent driving technologies. These studies not only demonstrate the superiority of machine learning algorithms in optimizing emergency braking systems, but also underscore their significant potential for future applications in this domain.

While current machine learning algorithms have been employed in certain aspects of braking, they lack general applicability in emergency braking because the execution time of the algorithm from receiving input data to outputting results must be strictly limited. As a direct result of this constraint, machine learning algorithms have limited application in the model predictive control (MPC) algorithm12. The existing MPC algorithms which are mostly based on vehicle dynamics models have acceptable execution time. However, the vehicle dynamics models lead to suboptimal emergency braking distance because of the inherent inaccuracies of vehicle dynamics models36.

To overcome these limitations, this article proposes Vehicle Emergency Braking Strategy Data Optimization Model (VEBSDOM) and Vehicle Emergency Braking Strategy Generator (VEBSG). VEBSDOM is used to reduce the emergency braking distance of emergency braking strategy data while ensuring the stability of vehicles. VEBSG is able to produce emergency braking strategies in much shorter time than the other present algorithms.

Design of algorithms

As a new attempt, this article proposes machine learning based modules VEBSDOM and VEBSG to generate emergency braking strategy. The overall architecture of these modules is shown in Fig. 1. We built the Emergency Braking Comprehensive Parameters Dataset (EBCP Dataset) from CarSim 2019. EBCP Dataset comprises comprehensive and structured vehicle and road surface parameters that are recorded at a sampling rate of 40 Hz in emergency braking process. In this dataset, we employed longitudinal acceleration (Ax) and lateral acceleration (Ay) as output parameters (labels).

In vehicle dynamics, Ax and Ay are fundamental indicators of the vehicle’s motion states. Ax directly reflects the rate of speed change of the vehicle. A larger Ax value indicates stronger braking deceleration and shorter emergency braking distance37. Therefore, Ax serves as the metric for evaluating emergency braking effect. On the other hand, Ay is closely related to the vehicle’s lateral stability and cornering behavior. Large Ay value may lead to loss of tire adhesion or vehicle skidding38. Thus, Ay is sufficient for assessing the stability performance, as it characterizes the lateral dynamic response and the risk of instability under emergency braking conditions.

This article focuses on cutting down on the emergency braking distance to enhance emergency braking effect. The input parameters in the EBCP Dataset are fed to the key analysis algorithm to select influential factors. The Emergency Braking Core Features Dataset (EBCF Dataset) is constructed using these influential factors, indicating that this dataset comprises only vehicle and road surface parameters which are worthy of consideration during emergency braking.

Then, a constraint optimization algorithm is used to process the data points in the EBCF Dataset and enhance the emergency braking effect of the emergency braking strategies included in the data points. After processing, we construct Optimized Emergency Braking Strategy Dataset (OEBS Dataset) as the database of VEBSG. The OEBS Dataset comprises input data (parameters representing the current state of vehicle and road surface), decision variables (parameters standing for the optimized emergency braking strategy) and labels (labels before and after optimization). VEBSG can generate the emergency braking strategy in real-time based on the input data.

Fig. 1
Fig. 1The alternative text for this image may have been generated using AI.
Full size image

Overall architecture of VEBSDOM and VEBSG.

Design of VEBSDOM model

VEBSDOM comprises two key algorithms: key factor analysis algorithm and constraint optimization algorithm. These algorithms allow VEBSDOM to focus on influential factors and produce the emergency braking strategy which demonstrates superior braking performance.

The key factor analysis (KFA) algorithm proposed in this article is to address the issue of data dimension redundancy of the EBCP Dataset. The KFA algorithm is a parameters selection method used to select the input parameters which are useful to predict the output parameters in a prediction model. A considerable number of input parameters in the EBCP Dataset failed to provide a substantial improvement in predicting Ax and Ay and datasets with hundreds of dimensions would lead to a high latency in nearest neighbor search based VEBSG. However, the sampling time or control latency of most vehicle electronic control units (ECU) are set to approximately 0.01 s, while the vehicle undergoes significant dynamic changes within a millisecond timescale. Therefore, we believe that our designing should generate the emergency braking strategy within 0.01 s based on the input vehicle parameters39,40.

To address these challenges, this article proposes KFA algorithm to select the input parameters that have significant impact on predicting Ax and Ay from EBCP Dataset as the input parameters of EBCF Dataset. The detailed architecture of the algorithm is illustrated in Fig. 2.

Fig. 2
Fig. 2The alternative text for this image may have been generated using AI.
Full size image

Architecture of key factor analysis algorithm.

As illustrated in Fig. 2, we successively set the value of one input parameter in the EBCP Dataset to 0. For each setting, we predict the value of the output (Ax and Ay). Then we calculate the difference between the prediction before and after the setting. The mean relative error (RE) is employed as a metric to measure the difference. Among each time to set the value of an input parameter to 0, if the difference of Ax or Ay exceeds a threshold value, the input parameter is identified as one key factor. In this article, we design a Back-propagation Neural Networks (BPNN)19— Emergency Braking Neural Network (EBNet). EBNet is a BPNN that receives the vehicle and road surface parameters as input to predict Ax and Ay. EBNet trained by the EBCP Dataset serves as the prediction model of the algorithm.

Compared to the principal components analysis (PCA) algorithm41 which is a dimensionality reduction method that projects high-dimensional data onto a lower-dimensional subspace while preserving as much data variance as possible, the KFA algorithm selects features from the input parameters instead of compressing the input into a lower-dimensional space, which means the KFA algorithms need not an additional dozen milliseconds to process the data and can satisfy the 0.01 s latency requirement.

Moreover, PCA algorithm is to retain as many features as possible with non-specific feature extraction, whereas KFA algorithms are able to rectify this shortcoming by retaining the features which are useful to predict the output parameters.

EBNet in this article serves as a prediction model to predict Ax and Ay through the vehicle and road surface features within the EBCP Dataset or EBCF Dataset. The schematic diagram of the EBNet architecture is presented in Fig. 342, where ‘k’ denotes the kernel size, ‘s’ represents the stride (defaulting to 1), and the padding method is set to ‘same’. Both the input and output data are standardized by using the standard normalizer.

Fig. 3
Fig. 3The alternative text for this image may have been generated using AI.
Full size image

Architecture of EBNet (The “n*” denotes that the layer blocks encompassed by the arrow are replicated n times).

The detailed structure of the residual block43 in EBNet is provided in Fig. 4. All convolutional layers within this block share the same number of output channels as the residual block itself.

Fig. 4
Fig. 4The alternative text for this image may have been generated using AI.
Full size image

Residual block of EBNet.

The KFA algorithm only allows the model to predict the braking effect and stability. However, the value of VEBSDOM focuses on reducing emergency braking distance instead of merely predicting Ax and Ay. Thus, an optimization for the EBCF Dataset is necessary.

This article employs constraint optimization algorithm44 to optimize data points in the EBCF Dataset. Constraint optimization algorithm is a computational method designed to find the optimal feasible solution to an optimization problem by maximizing or minimizing the objective function while satisfying a set of given constraints. We focus on enhancing Ax to cut down on the emergency braking distance and improve emergency braking effect. The objective function which needs to be minimized could be given by Eq. (2).

$${\text{min}}\left\{ {{\text{-}}\left| {{\text{Ax}}} \right|{\text{,~Ax}} \in {\text{S}}} \right\}{\text{,~S=}}\left\{ {{\text{Ax}} \in {\text{\varvec{\upchi}:~}}{{\text{g}}_{\text{i}}}\left( {{\text{Ax,~Ay}}} \right) \leqslant {\text{0,~}}{{\text{h}}_{\text{k}}}\left( {{\text{Ax,~Ay}}} \right){\text{=0}}} \right\}$$
(2)

Where gi(Ax, Ay) (i = 1, 2, 3, …, m) stand for the inequality constraints and hk(Ax, Ay) (k = 1, 2, 3, …, n) stand for the equality constraints.

Due to the high dimensionality of the data and large number of decision variables, this article designs function F(Ax, Ay) which takes into account the constraints and the objective function for the efficient computer processing. The expression of F(Ax, Ay) is given by Eq. (3). In this formula, a penalty is imposed when constraints are violated and λi, αk stand for the penalty weight.

$$F\left( {Ax,~Ay} \right) = - \left| {Ax} \right| + \mathop \sum \limits_{{i = 1}}^{m} \lambda _{i} \cdot \max \left( {g_{i} \left( {Ax,~Ay} \right),~0} \right) + \mathop \sum \limits_{{k = 1}}^{n} \alpha _{k} \cdot \left| {h_{k} \left( {Ax,~Ay} \right)} \right|$$
(3)

To minimize F(Ax, Ay), we employed gradient descent algorithm. Ax and Ay are not the decision variables, but the decision variables can be linked to Ax and Ay via EBNet. Thus, Ax and Ay can be expressed as Ax(P1, P2, P3, …, Ps) and Ay(P1, P2, P3, …, Ps) respectively with P being the decision variables. Thereby F(Ax, Ay) can be expressed as F(Ax(P1, P2, P3, …, Ps), Ay(P1, P2, P3, …, Ps)). To facilitate understanding, we represent F(Ax(P1, P2, P3, …, Ps), Ay(P1, P2, P3, …, Ps)) using decision variables P and a new mapping H, which is denoted as H(P1, P2, P3, …, Ps).

The partial derivatives of F(Ax, Ay) with respect to each decision variable are calculated and we approximate the partial derivative using Eq. (4).

$$\frac{{{\text{d~F}}\left( {{\text{Ax,~Ay}}} \right)}}{{{\text{d~}}{{\text{P}}_{\text{i}}}}}{\text{~}} \approx {\text{~}}\frac{{{\text{H}}\left( {...{\text{~}}\left( {{{\text{P}}_{\text{i}}}{\text{~+~\varvec{\Delta}w}}} \right){\text{~}}...{\text{~}}} \right){\text{~-~H}}\left( {{\text{~}}...{\text{~}}\left( {{{\text{P}}_{\text{i}}}{\text{~-~\varvec{\Delta}w}}} \right){\text{~}}...{\text{~}}} \right)}}{{{\text{2*\varvec{\Delta}w}}}}$$
(4)

Where Δw is a small quantity.

During every epoch, each P will be tuned according to the partial derivatives and a learning rate λ. The formula (5) can be expressed as follows:

$${{\text{P}}_{\text{i}}}{\text{~}} \to {\text{~}}{{\text{P}}_{\text{i}}}{\text{~-\varvec{\uplambda}~*}}\frac{{{\text{d~F}}\left( {{\text{Ax,~Ay}}} \right)}}{{{\text{d~}}{{\text{P}}_{\text{i}}}}}$$
(5)

In the calculation of the gradient descent, we use the approximation of \(\frac{\text{d\:F}\left(\text{Ax,\:Ay}\right)}{\text{d\:}{\text{P}}_{\text{i}}}\) instead of \(\frac{\text{d\:F}\left(\text{Ax,\:Ay}\right)}{\text{d\:}{\text{P}}_{\text{i}}}\).

The operation of the constraint optimization algorithm can be divided into two stages. The first stage is the main optimization stage, which is designed to optimize the braking effect under the constraints that ensure the optimized emergency braking strategies are physically implementable. After a certain number of epochs, the main optimization stage is completed. If the optimized emergency braking strategies given in the first stage violate the constraints, the algorithm will proceed to the additional optimization stage i.e. the second stage. The constraints will be placed greater emphasis in the second stage.

Based on the EBCF Dataset and the results of the constraint optimization, this article constructed the OEBS Dataset.

Design of VEBSG generator

VEBSG is a nearest neighbor search algorithm based generator, being able to search the data point in the OEBS Dataset which is nearest to the input data from vehicle sensors in term of distance. MPC algorithms used for emergency braking strategy generating can approximately tolerate a latency of 0.01 s, which implies that the vast majority of machine learning based models are almost rendered inapplicability45. To satisfy the latency constraint, this article leverages the Balltree nearest neighbor search algorithm20 to produce emergency braking strategy. The nearest neighbor search algorithm retrieves the data point in the OEBS Dataset which has the smallest Euclidean distance with the current input data. According to the scikit-learn nearest neighbors documentation46, Euclidean distance enables to provide a satisfactory effectiveness and becomes a common choice in the design of nearest neighbor algorithms.

The Balltree nearest neighbor search algorithm includes two steps. The first step is to establish a binary tree model. The dataset is recursively divided into nested hyperspheres. In every dividing, we select one data point which has the maximum Euclidean distance to the center of the hypersphere and another data point which has the maximum Euclidean distance to the first data point. These two data points serve as the center of two sub-hyperspheres. Each sub-hypersphere will become the hypersphere that need to be divided in the next dividing unless the number of data points in a hypersphere is less than a threshold value and this kind of hyperspheres serve as the leaf nodes of the model.

The second step is searching for the nearest neighbor of the query point. The minimum possible Euclidean distances between the hyperspheres and the query point are calculated. We continuously select the sub-hypersphere with smallest minimum possible Euclidean distance until a leaf node is selected. After the search reaches a leaf node, we calculate the Euclidean distances between the query data point and all data points and select the one which has minimum Euclidean distance as the nearest neighbor.

Experiments

This section elaborates on the experimental setup for the datasets and proposed modules, including the data processing and the validation of modules.

Data acquisition

Simulation scenario settings

The EBCP Dataset was collected in the simulation environment — CarSim 2019. We sampled the emergency braking processes at 40 Hz, from receiving the braking signal to the moment when the vehicle’s longitudinal speed (Vx) drops below 1 km/h, since the data points with Vx below 1 km/h is practically meaningless. In the simulation, we set a straight road with a gradient to be 0 degree and an MPC algorithm with default parameters.

During the simulations, we repeatedly set the emergency braking scenario with the set of initial Vx, road adhesion coefficient, wheel parameters and the type of vehicle. The value or value range of each parameter is provided in Table 2. The wheel parameters include tire section width, rim diameter, effective rolling radius and tire flatness ratio. We utilized the parameters vehicle height, vehicle weight, length from the front wheel to the tail, sprung mass and wheelbase to describe the types of vehicle.

Table 2 Set of simulation parameters.

Dataset

The experiment was conducted using CarSim 2019, with data acquisition performed throughout the entire emergency braking process at a sampling interval of 0.025 s. The dataset (EBCP Dataset) comprises 447 input parameters and 2 output parameters (Ax, Ay).

Although the emergency braking data acquired by CarSim can accurately capture vehicle dynamics behavior, the EBCP Dataset still contains a certain amount of anomalous data. We firstly eliminated grossly abnormal and redundant data. Then, the entire dataset was fed into an anomaly detection algorithm. Within this algorithm, the expected proportion of outliers was set to 10%. The EBCP Dataset contains approximately 100,000 samples after the data processing.

In the experiment, the KFA algorithm identified 40 input parameters with high RE as the influential parameters for each output parameter. The EBCF Dataset was derived from the EBCP Dataset by remaining the influential parameters and parameters highly relevant to the influential parameters. For instance, if the longitudinal force of the left front wheel (Fx_L1) is considered to be an influential parameter, the longitudinal force of the other three wheels (Fx_L2, Fx_R1, Fx_R2) will also be retained.

The following eight parameters—Fx_L1, Fx_L2, Fx_R1 and Fx_R2, which respectively signify the longitudinal forces of the left front, left rear, right front, and right rear wheels; along with KappL_L1, KappL_L2, KappL_R1 and KappL_R2, representing the longitudinal slip ratios of the left front, left rear, right front, and right rear wheels—are considered as the parameters that need to be tuned within the framework of the constraint optimization algorithm. These parameters also represent emergency braking strategy. In the experiment, we removed the input parameters which are highly correlated with the 8 parameters. After that, we obtained the EBCF Dataset that comprises 92 input features and 2 output parameters.

The OEBS Dataset was constructed based on the results of constraint optimization and the EBCF Dataset. The composition of the OEBS Dataset is detailed in Table 3.

Table 3 OEBS dataset.

Performance verification of VEBSDOM model

This part of the experiment was implemented in Python using TensorFlow. The performance verification of VEBSDOM model was carried out on a workstation equipped with an NVIDIA RTX 5060 with 8GB of video memory. The experiment validated the performances of the VEBSDOM model through two steps. Firstly, we evaluated and compared the accuracy of EBNet based on the EBCP Dataset and EBCF Dataset to demonstrate the accuracy of EBNet and the effectiveness of the KFA algorithm in terms of accuracy. Then we showed the details in constraint optimization algorithm and evaluated the enhancement of emergency braking performance after optimization.

EBNet serves as a prediction model for the KFA algorithm and constraint optimization algorithm. The training results of the EBNet are shown in Table 4. When training EBNet using the EBCP Dataset, we randomly splitted the dataset into a training set (80%), a validation set (10%) and a test set (10%), while the EBCF Dataset was splitted into a training set (45%), a validation set (10%) and a test set (45%) in the training of EBNet using the EBCF Dataset. The test set (45%) were used at the step of constraint optimization and to construct the OEBS Dataset. In Table 4, we compared EBNet trained by the EBCP Dataset which has not been processed by the KFA algorithm and the EBCF Dataset which has been processed by the KFA algorithm.

Table 4 Training results of EBNet with/without KFA algorithm.

The performance indicators include mean absolute error (MAE), mean square error (MSE), RE and high RE proportion. It is worth noting that the experiment evaluated the high RE proportion of Ax and Ay. In emergency braking situations, constraints related to Ax and Ay, such as friction circle constraints, should be taken into account at each time interval to prevent instability. Therefore, we can use this metric to determine the margin of the constraints imposed on the model error. Taking into account both the reduction in emergency braking effectiveness caused by this margin and the satisfaction of the constraints, we set the threshold to be 10% and use this as the basis for setting the margin of the constraints.

The comparison of the results from training EBNet using the EBCP Dataset (with KFA algorithm) and EBCF Dataset (without KFA) reveals that the KFA algorithm successfully improves the accuracy of EBNet as well as reduces the input dimensions to cut down on the latency of VEBSG.

The experiment enhanced the absolute value of Ax to improve emergency braking effect through tuning Fx_L1, Fx_L2, Fx_R1, Fx_R2, KappL_L1, KappL_L2, KappL_R1 and KappL_R2 while ensuring the constraints. We optimized each data point in the EBCF Dataset through tuning the 8 parameters and utilizing EBNet based on the EBCF Dataset for predicting and measuring the optimization effect.

We designed 2 essential constraints to ensure the physical realizability and safety of the optimized emergency braking strategies.

One constraint is called friction circle constraint, that is, the sum of the squares of Ax and Ay must not exceed the friction circle which can be expressed as (µ\(\bullet\text{}\)g)2. Where µ stands for road adhesion coefficient and g stands for the acceleration of gravity. Friction circle shows the maximum resultant adhesive force available between the tire and the road surface, which means there will be unstable phenomenons happen if the tire adhesive force exceeds (µ\(\bullet\text{}\)g)2. To prevent error-induced fluctuations in the neural network from leading to violations of the friction circle constraint, a scaling factor of 0.98 was introduced in the experiment and applied to (µ\(\bullet\text{}\)g)2. The formula is as follows:

$$Ax^{2} ~ + ~Ay^{2} - 0.98\left( {\mu \cdot g} \right)^{2} \le 0$$
(6)

The other constraint is called Ay constraint, that is, the absolute value of Ay must not exceed a presetting maximum value. In the experiment, the determination of the presetting maximum value took into account the value range of Ay in the EBCF Dataset as well as the error of EBNet based on the EBCF Dataset. The formula is as follows:

$$\left| {{\text{Ay}}} \right|{\text{-k}} \leqslant {\text{0}}$$
(7)

Where k stands for the preset maximum. We set k to 2.8 m/s2 in the experiment.

We set an objective function and minimized the objective function through gradient descent. The design of the objective function is based on the optimizing object and constraints. The function is as follows:

$$F\left( {Ax,~Ay} \right) = - \left| {Ax} \right| + \lambda _{1} \cdot \max \left( {Ax^{2} + Ay^{2} - 0.98 \cdot \left( {\mu \cdot g} \right)^{2} ,~0} \right) + \lambda _{2} \cdot \max \left( {\left| {Ay} \right| - k,~0} \right)$$
(8)

Where λ1 and λ2 stand for the penalty weights of the constraints.

In the experiment, we configured the parameters in the constraint optimization algorithm and the configured parameters are listed in Table 5.

Table 5 Configuration of parameters in constraint optimization algorithm.

The entire set of data points in the EBCF Dataset has satisfied the constraints in the experiment. Statistical results of Ax before and after optimizing are shown in Table 6. The unit of Ax in the table is g that stands for 9.8 m/s2.

Table 6 Statistical results of Ax before and after optimizing.

According to the average value in the Table 6, the optimized Ax has increased by about 13% on average after optimization.

Performance verification of VEBSG generator

This part of experiment was conducted in Python, employing the scikit-learn library for the validation of the generator VEBSG. VEBSG generates the emergency braking strategy based on the input data points collected from the vehicle sensors, and the OEBS Dataset serves as the database of Balltree nearest neighbor search algorithm in VEBSG.

Among the 92 input parameters in the OEBS Dataset, 84 parameters (excluding the 8 parameters which need to be tuned) were monitored in the nearest neighbor search algorithm. The 84 parameters were utilized to calculate the Euclidean distance between the data points in the OEBS Dataset and the input data acquired from the vehicle sensors, and then we searched for the data point that minimizes the Euclidean distance. The experiment produced the emergency braking strategies based on the emergency braking strategy of this data point.

Due to the subtle differences between the data point in the OEBS Dataset and the input data, we recommend to introduce minor variations into the emergency braking strategies in OEBS Dataset to ensure that the constraints are still complied. For instance, Fx_L1, Fx_L2, Fx_R1 and Fx_R2 were fine-tuned to ensure the stability of the vehicles in the experiment.

In the experiment, 30,000 data points from the OEBS Dataset served as the database of the nearest neighbor search algorithm and about 10,000 other data points were used to simulate the input data. The results showed 0.00087s in execution time from receiving the input parameters to finish generating the output parameters (emergency braking strategy), which satisfies the requirement of latency under emergency braking conditions.

A comparison between the average emergency braking effect of the emergency braking strategies generated by VEBSG and the traditional MPC algorithm is presented in Table 3. The emergency braking strategies in the OEBS Dataset stands for the emergency braking strategies generated by VEBSG. The emergency braking strategies in the EBCF Dataset stem from the EBCP Dataset that was collected in CarSim 2019, which means the emergency braking strategies in EBCF Dataset are generated by vehicle dynamics based MPC algorithms within the vehicle model in CarSim 2019. For the execution time, we measure the normalization of the input data point and the searching of the data point in the database. The unit of Ax in Table 7 is g that stands for 9.8 m/s2.

Table 7 Comparison between emergency braking strategies based on VEBSG and traditional MPC.

As can be seen from Table 7, the emergency braking strategies generated by VEBSG achieves about 13% improvement of Ax over the emergency braking strategies produced by vehicle dynamics based MPC algorithm on average.

If we approximately regard emergency braking as a uniformly accelerated motion with the initial value of Vx be V0, we can get the distance formula and duration time formula of this kind of motion, which are defined as in formula (9) and formula (10) respectively.

$${\text{L}}={{\text{V}}_0}{\text{*~t~}} - {\text{~}}0.5{\text{~*}}{{\text{t}}^2}{\text{~*~Ax}}$$
(9)
$${\text{t}}={{\text{V}}_0}{\text{~}} / {\text{~Ax}}$$
(10)

Where t stands for the duration time of emergency braking process and L stands for the distance.

By combining formula (9) and (10), we obtain the formula (11):

$${\text{L}}=0.5{\text{*}}{{\text{V}}_0}^{2}{\text{~}} / {\text{~Ax}}$$
(11)

From formula (11), we can get formula (12) which describes the relationship between the increment of Ax and the decrement of L:

$$\left( {\frac{1}{{1+{\text{x\% }}}}} \right){\text{*L}}=0.5{\text{*}}{{\text{V}}_0}^{2}{\text{~}} / {\text{~}}\left[ {{\text{Ax*}}\left( {1+{\text{x\% }}} \right)} \right]$$
(12)

Where x% stands for the increment percentage of Ax.

Thus, We can calculate and conclude that a 13% improvement of Ax will lead to an approximately 11% reduction of emergency braking distance. Furthermore, VEBSG is able to generate strategy in 0.00087s, which is much faster than the traditional vehicle dynamics based MPC algorithm.

Discussion

In this article, we propose a parameter selection method (KFA algorithm), a data optimization model (VEBSDOM) and a emergency braking strategy generator (VEBSG). Their effectiveness are evaluated in the experiment.

For the KFA algorithm, it enables us to select the input parameters of a prediction model which are useful for predicting a label or output parameter. This method was originally used to reduce the data dimensions to cut down on the execution time of the VEBSG. With fewer dimensions of data, VEBSG is able to calculate the Euclidean distance faster. At the same time, we found that the KFA algorithm improves the prediction accuracy of the neural networks (EBNet), which is possibly because the neural networks are able to pay more attention on useful features in the KFA algorithm.

For the VEBSG, it generates the emergency braking strategy based on the database constructed through VEBDOM and presents an 13% improvement of emergency braking effect (Ax) and 0.00087s of execution time, which is able to satisfy the real-time engineering requirements and provide a safer and shorter emergency braking distance. Compared with other deep learning algorithms, these algorithms could struggle to meat the real-time requirements of MPC algorithms. Depending on the short execution time, VEBSG enhances the safety of emergency braking from another perspective.

To sum up, our study improves vehicles safety through continuously generating emergency braking strategies after the vehicles turning into emergency braking conditions.

However, there are limitations in our study. Firstly, we only consider about the current state of the vehicle and road while the past state may be useful for prediction. Secondly, the VEBSG is based on the nearest neighbor algorithm, which means it can only provide a fundamental level of prediction accuracy as the execution time is extremely short.

For the further study, we will focus on predicting the future vehicle state by utilizing the past and current vehicle and road state, which further improves the accuracy of prediction. Moreover, we believe that there is possibility to predict vehicle state in the coming several hundred milliseconds, enabling to spare more time to generate emergency braking strategies with more advanced and large machine learning based model.

Conclusion

The proposed VEBSG model can generate an optimized emergency braking strategy in 0.0008 s and showed an 13% average improvement in emergency braking effect compared with the emergency braking strategies produced by the traditional MPC algorithm based on vehicle dynamics model. According to the experiment results, the primary advantages of the VEBSG model are twofold. On one hand, the data optimization model VEBSDOM exhibits a high accuracy, with high-error data points being virtually absent. This ensures both the practical realizability and precision. On the other hand, compared to the deep learning based algorithms and the traditional MPC algorithm, the nearest neighbor search algorithm allows VEBSG module to achieve shorter execution time.

To the best of our knowledge, VEBSG is the first try to deploy machine learning on the MPC for the formulation of emergency braking strategies. The superior performances of VEBSDOM and VEBSG strategies are evidenced by its high accuracy and computational efficiency. The OEBS Dataset is also able to be loaded into the memory to reduce the required time and be expanded by offline training.