Vehicle Driving Risk Prediction Model by Reverse Artificial Intelligence Neural Network

The popularity of private cars has brought great convenience to citizens' travel. However, the number of private cars in society is increasing yearly, and the traffic pressure on the road is also increasing. The number of traffic accidents is increasing yearly, and the vast majority are caused by small private cars. Therefore, it is necessary to improve the traffic safety awareness of drivers and help car manufacturers to design traffic risk prediction systems. The Backpropagation neural network (BPNN) algorithm is used as the technical basis, combined with the MATLAB operation program, to simulate the driving process of the car. Dynamic predictive models are built to predict and analyze vehicle safety risks. Multiple experiments found that: (1) in various simulations, the simulation driving process of MATLAB is more in line with the actual car driving process; (2) the error between BPNN and the actual driving prediction is within 0.4, which can meet the actual needs. Predictive models are optimized to deploy and predict in various traffic situations. The model can effectively prompt risk accidents, reduce the probability of traffic accidents, provide a certain degree of protection for the lives of drivers and passengers, and significantly improve the safety of traffic roads.


Introduction
With the continuous development of social science and technology, automobiles play a major role in traffic travel. Traffic accidents have caused widespread concern, seriously threatening the safety of human life and property [1]. Statistics show that about 1.2 million people are killed in traffic accidents every year around the world. Driver factors cause about 80% of tragedies. Bad driving behavior will cause great discomfort for passengers and even cause psychological pressure on drivers [2]. e driver needs to process the information in time while receiving the traffic information while driving, and the driving risk is everywhere. Safe driving requires drivers to maintain a vigilant attitude in driving [3].
ere are numerous studies on the relationship between drivers and traffic accidents, but few studies on the risk warning of the vehicle itself. According to the basic physiological and psychological characteristics of drivers, combined with the specific functions of the car, the prediction of traffic risk is an emerging topic [4]. An artificial neural network (ANN) is a multilevel early-warning model, which uses data analysis technology to predict driver behavior and system, showing strong flexibility and adaptability [5]. e BPNN can perform correlation analysis on multiple complex relationships, make macro predictions of accidents, reduce the risk of accidents, and provide security [6].
First, a simulation driver system based on the MATLAB computer program is proposed. Dynamic simulation models are built to perform dynamic analysis of vehicle driving. Second, the BPNN is used to build different structures and analyze driving safety risk and accident prediction. e driver's association with accident occurrence is explored. Finally, combined with the error backpropagation algorithm, different experimental data are detected, recorded, and compared. Driving safety risks and effective countermeasures are analyzed. is work intends to study the relevant factors of car accidents during driving, reduce the risk index of driving safety in people's travel and traffic, give early warning of possible accident risks, and conduct research. It is committed to reducing and preventing driving errors from the root cause and effectively improving the status quo of road traffic safety.

Realization and Simulation of Driving Simulation in MATLAB.
Today, in the automotive industry, it is planned to use computer simulation to integrate more real system data, various machine plate components, and electronic control units into the vehicle model to develop and operate various types of automotive products. Research in this area has become one of the hot spots [7]. e operation of the internal electronic control system and mechanical dynamics of the automobile requires the use of related technologies to simulate the transient motion process of the automobile. e actual motion state process of the car is shown in Figure 1.

Simulation Environment.
MATLAB software has been widely used in the design and simulation of control systems. At this stage, the field of simulation technology is a relatively mature scientific computing language, which is good at efficiently processing large amounts of data and visualizing data [8]. MATLAB is used to simulate the driving process of the car and analyze how the car engine and clutch, and other components break and operate in an emergency. e control system is simulated, and the risk factors affecting the driving control system of the vehicle are obtained more intuitively, which provides a strong scientific basis for the risk estimation and performance improvement of the vehicle in the future. MATLAB software is used to simulate the car driving system. e frame line of the car simulation driving system is shown in Figure 2. Figure 2 is the frame line of the car simulation driving system. First, we open the window of the car simulation driving system and input various parameter values required for simulated driving, including the number of gears of the transmission, the number of front-wheel rotation angles, and the degree of throttle opening. [9]. e system will match the corresponding actual road conditions on the ground according to the different scenarios selected and import it into the dynamic simulation system of the car as the parameters to be matched later. After matching, the system performs dynamic simulation and presents the results with virtual technology. When different scenarios are selected to be simulated again, only the parameters of the car driving system need to be changed [10].

Mathematical
Model of the Algorithm. In the vehicle driving speed control system, the position transmission belongs to the speed manipulation tool and is the main input part of the system. Its functions mainly include reasonable control of the speed and transition of car driving, as shown in the following: x represents the position of the speed control mechanism; v represents the driving speed corresponding to it; and a and b represent constants. In the vehicle control system, proportion-integralderivative (PID) belongs to the core part, which mainly compares the current speed of the car with the speed at which it is specified. e difference between the two speeds is the current vehicle traction [11]. e calculation of the driving controller is shown in equations (2)-(4)as follows:

The driver
Driving interface of the simulated driving system

Dynamics simulation model of motor vehicles
The virtual technology outputs the simulation results

Modify model parameters
Ground parameter input

Computational Intelligence and Neuroscience
The output section of the system: u(n) represents the system input value, that is, the difference between the current speed of the car and the specified speed; y(n) represents the system output value, representing the traction force of the car; and x(n) represents the state of the system.
In the vehicle driving control system, the vehicle power mechanism belongs to the actuator. Its function mainly uses the traction force to change the vehicle's speed so that the speed is the same as the specified value. e mathematical expression between traction and speed is F � mv + bv. F represents the traction force generated by the car; m represents the mass of the car; v represents the speed of the car; and b represents the drag factor of the car [12].

Parameter Setting.
After opening the MATLAB interface, we enter the relevant parameter values in the GUI interface. Simulink's default simulation time is 10 seconds. In the initial stage of the engine, there is a certain initial speed, which is set to 2000 n/min [13]. e car is running at a constant speed at this stage. We accelerate and apply the brake while the car is driving at a constant speed. e specific parameter value settings are shown in Table 1.
According to the operation of the actual vehicle starting process, MATLAB simulation software is used to establish the simulation model of vehicle starting. e model includes four plates: engine, transmission, body, and road resistance plates [14]. According to the modeling idea of the simulation model, the complex molecules in the system are subdivided into smaller plates. e vehicle driving simulation model is shown in Figure 3.
In Figure 3, after the simulation model is built, the simulation parameters are set according to the system requirements.
e position transmission part of the speed control mechanism adopts the Slider Gain module. It can limit the range of the input signal x of the position transmission. Among them, the parameter minimum value is set to 0, the maximum value is set to 1, and the initial value is set to 0.55. In the Gain module, the gain value is set to 50. In the Constant 1 module, the constant value is set to 45. In the vehicle powertrain subsystem model, the Gain module is adopted, its value is 1/m, and the specific value is 1/1000. e value of the Gain 1 module is b/m, and the specific value is 20/1000. e automotive powertrain adopts the Integrator integral module. e initial state is set to 0, which is the initial speed value of the car. In the driving controller subsystem model, the Delay block is used to implement the PID controller, the initial state is set to 0, and the sampling time is set to 0.02 s. e simulation time range of the system is set from 0 to 500 s. e variable-step continuous solver is selected. e rest of the other modules and simulation parameters use MATLAB default values [15].

ANN
Based on the basic characteristics of artificial intelligence to simulate the brain of living things, a new network model ANN is proposed. It can simply simulate and simplify different biological networks and provide help for the research of various functions of the real biological brain nervous system. e basic components of ANN include  Computational Intelligence and Neuroscience neurons and synapses. Among them, the function of a neuron is called a processing unit, which can use digital language to express the information processing method of the biological neuron, formally describe the biological neuron, and simulate the function and function of the expression structure [16].

Structure of an Artificial
Neuron. An artificial neuron is an abstract concept of a biological neuron. e transmission of signals between neurons is also a transmission of values. Multiple signals are received and then converted into a new round of signals to be transmitted, which belongs to a nonlinear structure. e specific structure is shown in Figure 4. Figure 4 shows the structural model of an artificial neuron, which is seen as a simple processor that performs a weighted summation of incoming signals. e specific description is shown in the following: In equation (5), (X1), (X2), . . ., X m represent the input value; W 1 , W 2 , . . ., W m represent the weights corresponding to the input value, that is, the synapse of the simulated neuron; Y represents the output of the neuron; and W 0 represents the system bias.
e network composed of artificial neurons is ANN. Since the emergence of this theory, it has been continuously improved, and now a relatively complete theory has been formed, which is widely used in different fields [17]. e application research of neural networks in traffic safety risk warning is based on the practical application background of the deep learning theory, combined with the actual driving situation, analyzes the possibility of vehicle risk in some cases, and carries out early warning according to the operation mechanism of the neural network, so as to reduce the possibility and harm of traffic accidents [18].

Establishment of the Risk Assessment Model.
ere have been many attempts at applying ANN in risk assessment. Many practices have confirmed that it is a better risk assessment method and can be used as a supplement to traditional risk assessment.
e system can analyze the risk assessment with the law of actual risk occurrence and provide a basis for the early-warning system. An ANN risk assessment model is proposed, as shown in Figure 5.
Based on ANN, a risk model for driving safety is established. e practical application is divided into six steps. (1) e number of layers in the middle hidden layer of the neural network is determined, including the number of input, output, and hidden layer nodes. (2) Characteristic parameters and state parameters are determined. In the process of risk analysis, the internal structure and external parameters in the risk assessment system are determined, and it is ensured that the results and state characteristics of the input parameters can be correctly reflected. (3) e neural network system needs to provide a variety of learning samples for feedback learning during execution and analyze the network system for parameter values in different states.
is process is that the neural network determines the connection weights and errors of the network system according to the selected samples. (4) e nonlinear sigmoid function is chosen as the action function. (5) Network learning is used to confirm the structure of the neural network to establish a knowledge base for risk analysis of the nervous system so that the evaluation system has certain inference and prediction functions. (6) e actual driving situation is analyzed. e actual eigenvalues of the system that have been calculated are input into the neural network with a prediction function. After the data are processed by the internal risk assessment system, the evaluation results are obtained. Additionally, this result is fed into the neural network as a new computational sample, which enriches the risk assessment system database [19].

e Principle of BPNN.
e BPNN is a multilayer feedforward network trained according to the error backpropagation algorithm, and it is one of the most widely used neural network models. It can learn and store many inputoutput relative relationships without revealing the mathematical equations describing this mapping in advance. e learning method of BPNN uses the steepest descent method and backpropagation to repeatedly modify the weights and thresholds of the system to minimize the sum of squared errors [20]. e BPNN structure includes three parts: input, hidden, and output layers. e specific structure is shown in Figure 6.
In Figure 6, the operation process of BPNN consists of two parts: forward propagation of data and backpropagation of error. During forward propagation, data are passed in from the input layer. After passing through the hidden layer, it is passed out from the output layer. If the actual output situation of the output layer is different from the ideal output, the result turns to the backpropagation stage of the error [21]. e backpropagation of the error means that the output error enters the hidden layer in a certain way and is transmitted back to the input layer, and the error data are apportioned to all units of each layer to obtain the error data of each layer unit. ese error data are used as the basis for  Computational Intelligence and Neuroscience correcting the weights of each unit [22]. e BPNN consists of input, output, and hidden layers. N 1 is the input layer, N m is the output layer, and the rest are hidden layers.

Algorithm Derivation of Backpropagation ree-Layer
Neural Network. During the forward propagation, the activation function of neuron j produces the induced local domain V j (n) at the input, as shown in the following: ∅ j is the activation function. e representation of the function signal y j (n) at the output of neuron j is shown in the following: In the process of error backpropagation, y j (n) represents the actual output of neuron j; d j (n) represents the expected output of neuron j, which is the j-th element of the expected response vector d(n). e error signal e j (n) is shown in the following: Minimizing the root mean square error makes the function continuously differentiable. Here, the instantaneous error energy of neuron j is given, as shown in the following: e error energies of all output layer neurons are summed up, i.e., the sum of the instantaneous error energies of the entire network is obtained, as shown in the following: Figure 6: e structure of BPNN.   In equation (10), set C refers to all neurons in the output layer.
e backpropagation algorithm minimizes E n by modifying the weights multiple times. e iterative gradient descent method is used to apply a correction value ∆w ji (n) to the synaptic weights w ij (n). It is proportional to the partial derivative δE(n)/δw ji (n). According to the differential chain method, this gradient is given by the following: e partial derivative δE(n)/δw ji (n) represents a sensitive factor, which determines the search direction of the synaptic weight w ji (n) in the weight space.
Equations (7)-(10) are substituted into equation (6), as shown in the following equations (16) and (17): ∆w ji (n) is the correction function of w ji (n); η represents the learning rate of error backpropagation; the negative sign represents gradient descent. Equation (11) is substituted into equation (12), as shown in the following: In equation (18), δ j (n) is the local gradient defined according to the delta law. It indicates the required changes in synaptic weights, as shown in the following:

Algorithm Flow of BPNN.
e backpropagation threelayer neural network has been recognized by the public as the most suitable model for simulating input, output, and early warning [23]. e specific operation process is shown in Figure 7.
In Figure 7, the algorithm operation process includes forward and backward propagations. During forward propagation, information data enter from the input layer and are processed by the hidden unit to the output layer. e state of a neuron in each layer only affects the state of neurons in the layer below it [24]. If the output layer does not get the desired result after a series of operations, the data are transmitted back to the backpropagation, and the error signal is returned along the original neuron connection path. When returning, the weights of the neuron connections will be modified one by one [25].
is process is iteratively processed. Finally, the signal error value is within the allowable range. Eventually, the output value is close to the desired output.

Tips for Traffic Risk Information
ere may be latent risk information in the static and dynamic information of traffic. Information that may lead to risk events is risk information. In China's urban road environment, with mixed and nonmotor vehicles, the risk information is mainly motor vehicles, nonmotor vehicles, and pedestrians. ere may be latent risk information in the static and dynamic information of traffic. If the response to avoid the risk information is not made in time, it will lead to risk events. Risk events can lead to traffic conflicts, and traffic conflicts can lead to traffic accidents, as shown in Figure 8.
In Figure 8, when the risk information appears, the driver's physiological and psychological factors significantly impact the reaction speed, including the influence of factors such as age, gender, personality, and education level. In addition, the driver's sensitivity to risk information, judgment ability, and feedback speed during driving are also related to the type of risk information. During the driving process, people or things that affect the normal driving trajectory and driving speed of the vehicle can become risk information. In addition to common people and vehicles, there may also be sediment, falling rocks, animals, and poultry on various mountain roads or country trails. e risk information mainly includes pedestrians, nonmotor vehicles, and motor vehicles. e risk warning model must be consistent with the level of human security risk perception before it can be accepted in practical applications. During the driving process, the driver subjectively feels the changes in the information of the road segment and has a stress response to the information of hidden risks, which is a comprehensive performance. For example, when a driver suddenly encounters a pedestrian crossing the road in front of him, illegally climbing over the guardrail, or the car in front of him suddenly braking, suddenly changing lanes, and so on in normal driving, the driver needs to pay attention and discover the risk information in time in advance. e driver's skills can respond to the predicted risk information and take actions such as braking or steering in advance to avoid dangerous situations. erefore, analyzing the driver's perception ability of risk information is the premise of designing a risk early-warning system. Driving a vehicle is an acquired skill that grows with driving experience. An ideal risk warning system should be able to reach or be better than a skilled driver's ability to perceive risks. Otherwise, if the system cannot perform better than the driver, it will lose the meaning of assisted driving. Studies have shown a big difference in driving stability between experienced and novice drivers. is experiment will quantify the driver's perception of risk to provide an effective risk warning threshold for the risk warning system. e architecture of the earlywarning system based on radar sensing technology at this stage is shown in Figure 9. Figure 9 shows the composition and architecture of the vehicle-mounted early-warning system. Laser sensors and other sensing devices collect information such as speed, acceleration, and position and upload them to the central processor for data integration and processing. e system calculates the alarm distance according to the designed early-warning model. en, the central processing unit sends instructions to the signal output device to promptly and effectively remind the driver through sound and light on the display screen, alarm, and warning lights.  Computational Intelligence and Neuroscience area. e traffic flow in the urban area is large, and there are many people, so the speed should not be too fast, generally at a constant speed of 40 km. e road surface of the expressway is relatively smooth and belongs to the fast lane, and the speed is generally 80-120 km/h. e road arrangement in this experiment is relatively remote for safety reasons; the traffic flow is small; and the road is smooth, so it is a relatively normal speed to maintain the vehicle speed at 60-80 km/h. Figures 10-13 show the driver's speed change based on the MATLAB simulation driving environment: Figure 10 shows the score fluctuation of the longitudinal and horizontal speed of the simulated car under the acceleration state. e longitudinal speed has been in a state of steady growth, and the speed value is between 60 km/h and 70 km/h, which is in line with the car's speed in the actual driving process. e lateral speed fluctuates greatly, the speed is controlled below 50 km/h, and the numerical instability factor is too strong. e simulation is in good agreement with the actual situation. Figure 11 compares the longitudinal and lateral accelerations of the simulated car under the acceleration state. e longitudinal acceleration fluctuates less than the lateral acceleration, and the acceleration value fluctuates up and down at 5 m/s 2 and is always higher than the lateral acceleration value. e lateral acceleration value is negative, and the value is between −5 and 0 m/s 2 . Additionally, its instability is also high. e state displayed by the data is more in line with the actual driving situation of the car. Figure 12 is a comparison of the driving speed of the simulated car under braking. e longitudinal speed has been in a state of steady deceleration, and the value is       Figure 13 compares the acceleration of a simulated car under braking. e value of longitudinal acceleration varies less than that of lateral acceleration, and the deceleration value is controlled from −5 to 0 m/s 2 . When braking, the deceleration value is always lower than the lateral acceleration value, and the situation is relatively stable. e lateral deceleration value fluctuates around 0 m/s 2 , and the instability is strong, which is more in line with the actual driving situation.

Results and Discussion
Among the driver's speed change values obtained by MATLAB's simulation of the driving environment, the simulation results are like the actual driving conditions of the car and have a high degree of coincidence. In the parameter value debugging process, the stability of the model is relatively good, which meets the simulation requirements. Additionally, in terms of data processing, there are relatively few comparisons of models. e car's driving conditions under acceleration and braking are compared and analyzed. e application of MATLAB in the computer simulation driver needs more practical analysis to ensure that it can be widely used in driving safety risk analysis.

Risk Analysis of Driving Safety Based on ANN
is paper uses an ANN model to train driving behavior, resulting in multiple individual networks. en, the neural network dynamic integration algorithm is used for integration to establish a driving behavior model that is closer to the actual situation. e output result is the maximum weighted average of each corresponding neuron in the individual network alliance, which is the output of driving behavior.
e error values of the output and the actual situation are compared. e accuracy and optimization scheme of the neural network algorithm is derived. e data results are shown in Figure 14. Figure 14 is the output comparison between the BPNN simulation result and the actual value. e actual operating values of the driver are simulated. After the input signal value in the network undergoes algorithm operation and program transformation, the neural network model obtains a series of data. Compared with the actual value, the error between the two is analyzed. e error range between the BPNN simulation results and the actual value is about 0.4, and the error value is relatively low. e data show that ANN can predict and track data to a certain extent in the process of driving safety risk assessment and effectively reduce risks in actual driving safety. e ANN dynamic ensemble learning method is used to learn driving preferences from historical driving behavior records and save them to the data system to solve the nonlinear relationship between the driving environment and driver behavior. e driving behavior is pretested in terms of the opening degree and time of the driver stepping on the brake pedal and the accelerator pedal, and the steering wheel angle and time. A possible risk indication is drawn from the historical database, and an early warning is issued. e results are consistent with the overall trend of the sample data and reflect the personality of driving behavior. erefore, when the ANN algorithm is actually applied to driving safety risk analysis, the driver's historical driving behavior should be recorded in the early stage and stored in the database. In this way, after the corresponding situation occurs, more accurate warning prompts can be issued to ensure drivers' safe driving and road traffic. e research is limited to the theoretical and simulation level and lacks actual data support. ere are few mature theories in domestic research in this area, so the established model is still far from the actual situation. e experimental simulation data in the driving behavior research come from the driving simulator, not the data collected on the spot, and the situation of the early-warning system in the actual application process lacks verification. erefore, the next step is to get out of the simulator, try to collect real driving behavior and driving environment data, and establish a driving behavior and a road condition database for driving behavior learning, so that this research has high practical value.

Conclusions
In road driving, the driver operating system is multichannel and nonlinear. e MATLAB driving simulator is used to analyze the car's dynamic characteristics during driving and the possible factors of risk occurrence. Combined with the simulated driving environment and the speed change value of the driver, the simulation results are like the actual driving conditions of the car, with a high degree of coincidence. In the parameter value debugging process, the stability of the model is relatively good, which meets the simulation requirements. e application of ANN in driving safety risk warning is combined with an example of risk prediction. Deep learning, combined with the actual driving situation, analyzes the possibility that the car may have a risk in some cases and issues an early warning based on the ANN operating mechanism to reduce the possibility and injury of traffic accidents.
e BPNN is used to model the behavioral Computational Intelligence and Neuroscience 9 characteristics of drivers. e neural network system is practiced and trained many times. e test results are compared with the driver's actual risk value. e error range between the BPNN simulation results and the actual value is about 0.4, and the error value is relatively low. e BPNN model can track the changes of different instructions very well. For imminent hazards, the model warns the driver and exhibits certain predictive and data-tracking capabilities.
Additionally, the data processor also showed certain shortcomings. ere are relatively few comparisons of the models. is work only compares and analyzes the driving situation of the car under acceleration and braking state. In the later stage, MATLAB needs to do more practical analysis on the application of computer simulation drivers to ensure that it can be widely used in driving safety risk analysis.

Data Availability
All data used to support the findings of the study can be obtained from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.