# A Safety Collision Avoidance Algorithm Based on Comprehensive Characteristics

Authors: Y. J. Zhang; F. Du; J. Wang; L. S. Ke; M. Wang; Y. Hu; M. Yu; G. H. Li; A. Y. Zhan
Journal: Complexity
 (2020)

---

## Abstract

Aiming at the requirements of vehicle safety collision avoidance system, a safety collision avoidance algorithm based on environmental characteristics and driver characteristics is proposed. By analyzing the relationship between collision avoidance time and the environment, a safety time model is established. In the established safety time model, parameters based on driver characteristics are added, which increases the flexibility of the algorithm. The algorithm can adapt to more different driving conditions and give appropriate warning thresholds. After simulation and comparison with other algorithms, the algorithm proposed in this paper can satisfied the requirements of reducing vehicle collision risk. The effectiveness and feasibility of the algorithm are verified, and the safety of vehicle driving can be improved.


---

## Body

## 1. Introduction

Since entering the 21st century, the number of vehicles has increased exponentially, and the number of vehicles and drivers has further increased [1]. How to reduce the number of traffic accident deaths and economic losses has become an important issue in the context of such a large number of vehicles [2].In recent years, some research studies have been made on the collision warning algorithm. The existing collision warning algorithms are mainly divided into two categories, namely, the Safety Time Algorithm and the Safety Distance Algorithm [3]. The safety time logic algorithm compares the collision time between the two workshops with the safety time threshold to determine the safety status. The safety time algorithm mainly uses Time to Collision (TTC) as the research object [4]. The safety distance model refers to the minimum distance between the vehicle and the obstacle, which is also the distance the vehicle needs to maintain to avoid the collision with the obstacle under the current conditions of the vehicle [5].However, neither the TTC model nor the safety distance model is flexible enough to adapt to various situations during driving [6]. Because the traffic environment is very complicated, drivers, pedestrians, roads, and the environment are all factors that cause a complicated traffic environment [7]. For the same driver, different weather conditions, such as rain, snow, and fog [8], will have different requirements for the driver; on the contrary, for the same environment, different drivers differ widely in age, driving habits, driving skills, personality, and other factors [9]. Differences can also be complex, time varying, and unpredictable; therefore, the existing collision avoidance algorithm is not suitable for direct application [10]. It is imperative to design a collision avoidance algorithm that takes into account the environment and driver characteristics to suit the needs of different situations [11].Based on the collision avoidance algorithm of collision avoidance time TTC, this paper proposes a safety collision avoidance algorithm that adapts to environmental characteristics and driver characteristics. The algorithm proposed in this paper takes driver characteristics and environment characteristics into comprehensive consideration, introduces environmental parameters, age, and other variables, and gives corresponding weights. Compared with previous algorithms, this algorithm has higher adaptability and flexibility under complex conditions, which is of great help to improve traffic safety and efficiency. The algorithm is simulated by MATLAB and VISSIUM, and the effectiveness of the algorithm is verified.


## 2. Classical Algorithm

### 2.1. Mazda Algorithm

The algorithm uses an algorithm based on kinematics analysis to determine the critical braking distance. However, the calculated distance is too conservative for braking and must be used as a critical warning distance [12]. There is a critical alarm distance:(1)Dw=12v2a1−v−v02a2+vt1+v0t2+d0,where d0 is the head offset distance, v is the rear car speed, v0 is the relative speed between the vehicles, t1 is the system delay, t2 is the driver reaction time, a1 is the maximum brake deceleration of the rear car, and a2 is the front car maximum brake deceleration.The algorithm assumes that the preceding vehicle starts braking at the maximum deceleration, and after the system delay time and the driver reaction time have elapsed, the tail vehicle begins to brake at the maximum deceleration. In order to make the algorithm more rigorous, the head offset distance is added to equation (1) to perform the calculation together.


### 2.2. Berkeley Algorithm

The algorithm is based on the Mazda algorithm and has been improved, and the critical alarm distance equation (2) is given:(2)Dw=12v2a−v−v02a+vt1+t2+d0,where d0 is the head offset distance, v is the rear vehicle speed, v0 is the relative speed between the vehicles, t1 is the system delay, t2 is the driver reaction time, and a is the vehicle maximum brake deceleration.The algorithm has been improved based on the Mazda algorithm in order to obtain a more conservative warning distance than Mazda. The warning is given by a dimensionless warning valueψ, which is defined as follows:(3)ψ=d−dψdψ−dbr.In equation (3), d is the current two-vehicle distance, Db is the critical braking distance, and Db is calculated as follows:(4)Db=v0t1+t2+12at1+t22.When the value ofψ gradually increases, the risk of collision increases; when the value of ψ decreases, the risk of collision decreases. When ψ > 1, it means there is no risk of collision at present [13, 14].


### 2.3. Honda Algorithm

The Honda algorithm is a critical alarm distance equation (5) based on experimentally obtained data:(5)Dw=2.2v0+6.2.The limit value reminder distanceDj equation is as follows:(6)Dj=t2vr+t1t2a1−0.5a1t12d,v2a2≥t2,t2v1−0.5a1t2−t12−v222a2,v2a2<t2,where t1 is the time required for the system delay process, t2 is the time required for the system braking, v1 is the own vehicle speed, v2 is the current vehicle speed of the preceding vehicle, a1 is the maximum deceleration of the own vehicle, and a2 is the maximum deceleration of the preceding vehicle. Since the Honda model is divided into critical value and limit value reminder distance, and the parameters are adjusted and improved according to a large number of experimental data; the final result of the model is less affected by the driver factor. However, the model has high requirements on the sample data. It is necessary to repeatedly calculate and experiment with a large amount of sample data to ensure the accuracy of the model and the output results are in line with the actual driving situation. If the sample is not representative or the sample size is small, the output will seriously deviate from the actual driving situation [15–18].


## 2.1. Mazda Algorithm

The algorithm uses an algorithm based on kinematics analysis to determine the critical braking distance. However, the calculated distance is too conservative for braking and must be used as a critical warning distance [12]. There is a critical alarm distance:(1)Dw=12v2a1−v−v02a2+vt1+v0t2+d0,where d0 is the head offset distance, v is the rear car speed, v0 is the relative speed between the vehicles, t1 is the system delay, t2 is the driver reaction time, a1 is the maximum brake deceleration of the rear car, and a2 is the front car maximum brake deceleration.The algorithm assumes that the preceding vehicle starts braking at the maximum deceleration, and after the system delay time and the driver reaction time have elapsed, the tail vehicle begins to brake at the maximum deceleration. In order to make the algorithm more rigorous, the head offset distance is added to equation (1) to perform the calculation together.


## 2.2. Berkeley Algorithm

The algorithm is based on the Mazda algorithm and has been improved, and the critical alarm distance equation (2) is given:(2)Dw=12v2a−v−v02a+vt1+t2+d0,where d0 is the head offset distance, v is the rear vehicle speed, v0 is the relative speed between the vehicles, t1 is the system delay, t2 is the driver reaction time, and a is the vehicle maximum brake deceleration.The algorithm has been improved based on the Mazda algorithm in order to obtain a more conservative warning distance than Mazda. The warning is given by a dimensionless warning valueψ, which is defined as follows:(3)ψ=d−dψdψ−dbr.In equation (3), d is the current two-vehicle distance, Db is the critical braking distance, and Db is calculated as follows:(4)Db=v0t1+t2+12at1+t22.When the value ofψ gradually increases, the risk of collision increases; when the value of ψ decreases, the risk of collision decreases. When ψ > 1, it means there is no risk of collision at present [13, 14].


## 2.3. Honda Algorithm

The Honda algorithm is a critical alarm distance equation (5) based on experimentally obtained data:(5)Dw=2.2v0+6.2.The limit value reminder distanceDj equation is as follows:(6)Dj=t2vr+t1t2a1−0.5a1t12d,v2a2≥t2,t2v1−0.5a1t2−t12−v222a2,v2a2<t2,where t1 is the time required for the system delay process, t2 is the time required for the system braking, v1 is the own vehicle speed, v2 is the current vehicle speed of the preceding vehicle, a1 is the maximum deceleration of the own vehicle, and a2 is the maximum deceleration of the preceding vehicle. Since the Honda model is divided into critical value and limit value reminder distance, and the parameters are adjusted and improved according to a large number of experimental data; the final result of the model is less affected by the driver factor. However, the model has high requirements on the sample data. It is necessary to repeatedly calculate and experiment with a large amount of sample data to ensure the accuracy of the model and the output results are in line with the actual driving situation. If the sample is not representative or the sample size is small, the output will seriously deviate from the actual driving situation [15–18].


## 3. Information Collection and Transformation of Coordinate Systems

### 3.1. Driving Data Information Collection

Through the data acquisition technology based on the Internet of Vehicles, after the vehicle is equipped with Dedicated Short Range Communications (DSRC) and Global Positioning System (GPS) [19], the vehicle sensor device provides the vehicle’s driving speed, GPS latitude and longitude coordinates, heading angle, and the vehicle’s own working condition parameters [20].DSRC is an efficient wireless communication technology that can quickly identify high-speed moving targets and two-way communication within a short distance [21], enabling wireless communication between vehicles and vehicles and vehicles and roads in intelligent transportation systems [22]. DSRC can provide a high data transmission speed, ensuring the low latency and low interference in the transmission process [23]. Besides, DSRC can transmit a large amount of real-time information in the intelligent transportation system quickly [24]. The surrounding road environment information can be obtained by indirectly querying the database [25]. The traffic information can be divided into static road network information and dynamic road network information by the frequency of data information collected from the information source. In order to meet the requirement of real-time interact of vehicles information, it is necessary to determine the information update frequency by considering the frequency of information changes [26]. The application of DSRC technology in the intelligent transportation system improves people’s travel efficiency. DSRC can establish the connection between vehicle and road, provide the optimized driving route in real time according to the road conditions, and relieve the traffic pressure. It can also establish the connection between vehicles, prompt the safety distance between vehicles, warn the accidents ahead of the traffic in advance, and improve the coefficient of traffic safety.The relevant data of the vehicle includes not only driving information such as driving speed, GPS coordinates, and heading angle but also information about the working conditions of the vehicle itself, such as tire pressure and fuel remaining [27]. That information can be obtained from the vehicle’s own sensors and Electronic Control Unit (ECU), and the vehicle’s position coordinates and heading are obtained through the GPS navigation and positioning system [28]. In the Controller Area Network (CAN) bus of the automobile, the vehicle parameters can be obtained to determine whether the vehicle is in an emergency state such as the tire pressure of the vehicle and the shortage of oil [29], and the prompt is given in the terminal system. Then, through real-time acquisition of the state information of the car and the adjacent car, including the latitude, longitude, vehicle speed, and heading angle information of the vehicle, these data are entered into a safety collision avoidance algorithm for processing and alert when there is a danger.


### 3.2. Establishing a Gaussian Plane Coordinate System

The position information normally received by the vehicle equipment is in the latitude and longitude form, typically using World Geodetic System-1984 Coordinate System (WGS-84) coordinates. Since the coordinates of the latitude and longitude form have positive values and negative values in the abscissa of the same projection zone, the calculation of the relative distance between the vehicles on the processing plane and the establishment of the vehicle model are very complicated [30]. The Gaussian plane coordinate system can solve this problem, so we can use the method of converting latitude and longitude coordinates into Gaussian plane coordinates. The x-axis of the Gaussian plane coordinate system is the projection of the central meridian, and the north direction is positive; the y-axis is the projection of the equator, and the east direction is positive. For example, China is located in the northern hemisphere. After the projection, the x-axis coordinates are positive and the y-axis coordinates are positive and negative. To avoid negative abscissa, the abscissa is added with 500 km. The latitude and longitude coordinates (B, L) can be transformed into Gaussian plane coordinates (x, y) by the coordinate transformation equation. Suppose there are two points P1 and P2 symmetric to the central meridian. Their geodetic coordinates are (L, B) and (l, B), respectively, where l is the longitude difference between the longitude of point P on the ellipsoid and the central meridian L0: l = L–L0, P point is east of the central meridian, l is positive, and negative in the west; the plane coordinates after projection must be P1′x,y and P1′x,−y. After the coordinate transformation is completed, all the coordinates are converted into positive values, which is beneficial to simplify the calculation of the relative distance and the establishment of the vehicle model. The coordinate relationship of WGS-84 coordinate transformation Gaussian plane is(7)x=X+N2ρ″2sinBl″2+N2ρ″4sinBcos3B5−t2+9η2l″4,y=Nρ″cosBl″+N6ρ″3B1−t2+η2l″3+N120ρ″5cos5B5−18t2+t4l″5.At present, the positioning accuracy provided by the GPS system is better than 10 meters. To obtain higher positioning accuracy, we usually use differential GPS technology. A GPS receiver is placed on the reference station for observation. Based on the known precise coordinates of the reference station, the distance corrections from the reference station to the satellite are calculated and sent out by the reference station in real time. At the same time of GPS observation, the user’s receiver also receives the correction number sent by the reference station and corrects the positioning result, thus improving the positioning accuracy. When the conversion accuracy is required to be 0.00 l meters, the following equations are used:(8)x=X+N2ρ″2sinBl″2+N24ρ″4sinBcos3B5−t2+9η2+4η4l″4+N720ρ″6sinBcos5B61−58t2+t4l″6,y=Nρ″cosBl″+N6ρ″3cos3B1−t2+η2l″3+N720ρ″5cos5B5−18t2+t4+14η2−58η2t2l″5.


## 3.1. Driving Data Information Collection

Through the data acquisition technology based on the Internet of Vehicles, after the vehicle is equipped with Dedicated Short Range Communications (DSRC) and Global Positioning System (GPS) [19], the vehicle sensor device provides the vehicle’s driving speed, GPS latitude and longitude coordinates, heading angle, and the vehicle’s own working condition parameters [20].DSRC is an efficient wireless communication technology that can quickly identify high-speed moving targets and two-way communication within a short distance [21], enabling wireless communication between vehicles and vehicles and vehicles and roads in intelligent transportation systems [22]. DSRC can provide a high data transmission speed, ensuring the low latency and low interference in the transmission process [23]. Besides, DSRC can transmit a large amount of real-time information in the intelligent transportation system quickly [24]. The surrounding road environment information can be obtained by indirectly querying the database [25]. The traffic information can be divided into static road network information and dynamic road network information by the frequency of data information collected from the information source. In order to meet the requirement of real-time interact of vehicles information, it is necessary to determine the information update frequency by considering the frequency of information changes [26]. The application of DSRC technology in the intelligent transportation system improves people’s travel efficiency. DSRC can establish the connection between vehicle and road, provide the optimized driving route in real time according to the road conditions, and relieve the traffic pressure. It can also establish the connection between vehicles, prompt the safety distance between vehicles, warn the accidents ahead of the traffic in advance, and improve the coefficient of traffic safety.The relevant data of the vehicle includes not only driving information such as driving speed, GPS coordinates, and heading angle but also information about the working conditions of the vehicle itself, such as tire pressure and fuel remaining [27]. That information can be obtained from the vehicle’s own sensors and Electronic Control Unit (ECU), and the vehicle’s position coordinates and heading are obtained through the GPS navigation and positioning system [28]. In the Controller Area Network (CAN) bus of the automobile, the vehicle parameters can be obtained to determine whether the vehicle is in an emergency state such as the tire pressure of the vehicle and the shortage of oil [29], and the prompt is given in the terminal system. Then, through real-time acquisition of the state information of the car and the adjacent car, including the latitude, longitude, vehicle speed, and heading angle information of the vehicle, these data are entered into a safety collision avoidance algorithm for processing and alert when there is a danger.


## 3.2. Establishing a Gaussian Plane Coordinate System

The position information normally received by the vehicle equipment is in the latitude and longitude form, typically using World Geodetic System-1984 Coordinate System (WGS-84) coordinates. Since the coordinates of the latitude and longitude form have positive values and negative values in the abscissa of the same projection zone, the calculation of the relative distance between the vehicles on the processing plane and the establishment of the vehicle model are very complicated [30]. The Gaussian plane coordinate system can solve this problem, so we can use the method of converting latitude and longitude coordinates into Gaussian plane coordinates. The x-axis of the Gaussian plane coordinate system is the projection of the central meridian, and the north direction is positive; the y-axis is the projection of the equator, and the east direction is positive. For example, China is located in the northern hemisphere. After the projection, the x-axis coordinates are positive and the y-axis coordinates are positive and negative. To avoid negative abscissa, the abscissa is added with 500 km. The latitude and longitude coordinates (B, L) can be transformed into Gaussian plane coordinates (x, y) by the coordinate transformation equation. Suppose there are two points P1 and P2 symmetric to the central meridian. Their geodetic coordinates are (L, B) and (l, B), respectively, where l is the longitude difference between the longitude of point P on the ellipsoid and the central meridian L0: l = L–L0, P point is east of the central meridian, l is positive, and negative in the west; the plane coordinates after projection must be P1′x,y and P1′x,−y. After the coordinate transformation is completed, all the coordinates are converted into positive values, which is beneficial to simplify the calculation of the relative distance and the establishment of the vehicle model. The coordinate relationship of WGS-84 coordinate transformation Gaussian plane is(7)x=X+N2ρ″2sinBl″2+N2ρ″4sinBcos3B5−t2+9η2l″4,y=Nρ″cosBl″+N6ρ″3B1−t2+η2l″3+N120ρ″5cos5B5−18t2+t4l″5.At present, the positioning accuracy provided by the GPS system is better than 10 meters. To obtain higher positioning accuracy, we usually use differential GPS technology. A GPS receiver is placed on the reference station for observation. Based on the known precise coordinates of the reference station, the distance corrections from the reference station to the satellite are calculated and sent out by the reference station in real time. At the same time of GPS observation, the user’s receiver also receives the correction number sent by the reference station and corrects the positioning result, thus improving the positioning accuracy. When the conversion accuracy is required to be 0.00 l meters, the following equations are used:(8)x=X+N2ρ″2sinBl″2+N24ρ″4sinBcos3B5−t2+9η2+4η4l″4+N720ρ″6sinBcos5B61−58t2+t4l″6,y=Nρ″cosBl″+N6ρ″3cos3B1−t2+η2l″3+N720ρ″5cos5B5−18t2+t4+14η2−58η2t2l″5.


## 4. Model Establishment

### 4.1. Scene Analysis

For a frontal collision, since the two cars that are relatively driven are generally not in a straight line, when the horizontal distance between the two vehicles is greater than the average of the width of the two vehicles, even if the distance between the two cars is already very close, there is no possibility of collision. Therefore, only when the distance between the two vehicles perpendicular to the traveling direction is less than the average valuek of the two vehicle widths (the A vehicle width is WA and the B vehicle width is WB), that is, when k≤d×sinθ1, a frontal collision will occur. The general vehicle width is about 1.5 meters to 1.8 meters, so here k takes 1.7 meters. The distance d between the two vehicles can be derived from the vehicle coordinates received by the Dedicated Short Range Communication (DSRC) module in meters as follows:(9)d=x2−x12+y2−y12.The self-vehicle speed isVA, the adjacent car speed is VB, and the unit is km/h. For the frontal collision shown in Figure 1, the time required is as follows:(10)t=4.3×d×cosθ1−5vA+vB.Figure 1
Frontal collision algorithm model.Whenθ1≤90∘ and θ2>90∘, the calculation of the collision time is performed; if it is θ1≥90∘ and θ2≤90∘, the processing is not performed. For the rear-end collision model, most of the rear-end collisions occur in the same lane. Therefore, when we study the rear-end collision model, we no longer consider the heading angle problem but only consider the relative motion of the vehicle. In the rear-end model, the variable is the relative speed and relative distance of the two cars.For the rear-end collision model shown in Figure2, when the vehicle is actively rear-ended, if VA > VB, the time required for collision is as follows:(11)t=dVA−VB.Figure 2
Rear-end collision algorithm model.IfVA < VB, the collision avoidance algorithm is not processed. When the car is passive rear-end collision, if VA > VB, the time required for collision is the time required for collision is as follows:(12)t=dVA−VB.IfVA < VB, the anticollision algorithm is not processed.Through the analysis of the abovementioned scenarios, it can be seen that the calculation method of collision occurrence time is the same whether it is a head-on collision or a rear-end collision, and the unified calculation method is conducive to enhancing the adaptability of the algorithm in the complex scene.


### 4.2. Design of Safety Collision Avoidance Algorithm

The key of the safety collision avoidance algorithm is to choose a reasonable warning distance threshold. If the warning distance is too long, it will cause great interference to the driver. The safe driving system will frequently alert, which will bring certain adverse effects to the driver’s psychology. If the warning distance is too short, the warning effect is worse and the danger cannot be avoided, which is not conducive to driving safety. Therefore, we need to choose a suitable warning threshold, which will not only interfere with the driver’s driving but also help for the driving safety. Moreover, under different weather conditions, the safety collision avoidance algorithm cannot be used for different drivers. Therefore, this paper proposes a safety warning distance threshold method based on different environments and driver’s characteristics, which can effectively solve the abovementioned problems.It is very important to add environmental parameters and driver characteristic parameters to the algorithm. For example, for a young driver who is responsive, the warning at a certain time may be too early for him, but it will cause bad interference to him [31]. However, for older drivers who are slower to respond, if the warning time is the same as that of the young driver, then the driving process of older drivers becomes more dangerous. Similarly, under different weather conditions, the time at which the early warning system issues an early warning signal should not be the same.When the vehicle is being driven, if the driver finds the danger early, the safety warning system is not required to be involved. Once the driver does not find the danger in time, the safety collision time issued by the safety warning system is the minimum time for the driver to take measures against the danger, including driver reaction time and time required to control the vehicle [11]. When the safety collision warning system indicates a danger, the driver then reacts to deceleration or avoidance to avoid collision with the adjacent car. Here, we set the driver’s reaction time to t. At present, many scholars have established three driving modes according to the driver’s driving style when establishing the safety warning algorithm, namely, the camber type, the medium tilt type, and the inward tilt type driving mode [1]. This algorithm essentially means that the driver reaction time in the early warning algorithm is correspondingly different according to the driving style. Table 1 shows the average reaction time corresponding to the drivers of three different driving styles.Table 1
Average driver reaction time for different driving styles.
Driver type
Reaction time (s)
Average
1
2
3
4
5
6
7
8
9
10
Introverted
0.62
0.67
0.73
0.78
0.64
0.82
0.75
0.73
0.66
0.65
0.705
Medium
0.88
0.82
0.99
0.99
0.91
1.01
0.93
0.87
0.95
0.79
0.910
Extraverted
1.12
1.08
1.23
1.23
1.05
1.19
1.23
1.14
1.32
1.04
1.139According to the abovementioned table, different driving styles of the driver can be expressed by different reaction times. According to [10], the early warning algorithm considering the driver’s driving style can adapt to the driving needs of different drivers to a certain extent, and during the driving process, the driver can perform according to his own physical condition and driving environment.According to a large number of theoretical and experimental studies on drivers’ driving tendency in [11], the factors that affect drivers’ driving tendency mainly include physiological characteristics (gender, age, physical health, etc.), psychological characteristics (ability, personality, emotion, etc.), and other factors such as drivers’ occupation and education level. Here, we select the driver’s age, driving years, eyesight, physical condition, and mental status of the six factors.We assign different weights to the abovementioned factors to determine the impact of the driver’s personal factors on the safety warning time. We set the driver’s ageX1 (weight ω1), driving age X2 (weight ω2), health index X3 (X3 = 1, 2, 3, 4, 5) (weight ω3), mental state index X4 (X4 = 1, 2, 3, 4, 5) (weight ω4), and visual acuity X5 (weight ω5). The factors and weights were scored by the entropy method [16], suppose the decision matrix of each influencing factor and reaction time is as follows:(13)T=X1X2⋮Xmx11x12⋯x1nx21x22⋯x2n⋮⋮⋮⋮xm1xm2xm3xmn,Pij=xij∑i=1mxij.P
ij represents the contribution of the ith attribute to factor Xij. Ej can be used to represent the total contribution of all schemes to attribute Xj:(14)Ej=−K∑i=1mPijlnPij,where the constant K=1/lnm. Hence, we can guarantee that 0≤Ej≤1. It can be seen from the formula that when the contribution of each scheme under a certain attribute tends to be the same, E tends to one. Especially when all are equal, the role of the attribute of the target in the decision can be ignored, that is, the weight of the attribute is zero. We can see that the attribute value is determined by the difference of all schemes. Therefore, dj can be defined as the consistency degree of contribution of each factor under the jth attribute:(15)dj=1−Ej.Then, the factor weight is(16)ωj=dj∑j=1ndj.Then, the reaction time is modified by(17)Yi=∑i,j=15Xiωj,τdr=1.275Yi.Braking system response time includes the reaction time of the brake system, the time of brake coordination, and the time of continuous braking [32]. Here, the reaction time of the brake system is t1, the brake action time is t2, and the continuous braking time is set to t3. In the continuous braking time, we assume that the deceleration is constant, and the calculation equation is as follows:(18)t3=v3.6×g×aμ−t22,where v is the vehicle speed, which is the driving speed of the vehicle; g is the gravitational acceleration, the value is 9.8 m/s2; μ is the road surface adhesion coefficient; and a is the environmental coefficient. According to [12], the rainy day a has a value of 0.5, the icy road surface is 0.1, the snow surface is 0.3, and the dry road surface is 1. The continuous braking time varies with the vehicle speed, and g is the maximum brake reduction speed. The adhesion coefficient of road surface is negatively correlated with the braking distance:The definition of TTC is as follows:(19)TTC=Dvτ,where D is the distance between two vehicles, vτ is the relative speed of the two vehicles, and the dimension of the TTC parameter is seconds. In the TTC algorithm, the shortest time between the two vehicles is calculated by the ratio of the distance to the relative speed of the two vehicles. When the collision time is greater than the warning time, the early warning system will not alarm, and when the collision time is less than the warning time, the early warning system will alarm [33].According to the abovementioned analysis, the risk warning from the safety collision avoidance system to the minimum time that the driver takes the reaction to stop the vehicle or avoid the danger, that is, the safety collision avoidance time threshold TTC is calculated as follows:(20)TTC=t1+t2+t3+τdr.Substitutingt4 and τdr as follows:(21)TTC=t1+t22+v3.6×g×aμ+1.275∑i,j=15Xiωj.The value ofXi is input according to the actual situation of the driver.Since the data obtained by the vehicle-mounted system are relative speed and relative vehicle distance, equation (22) is used to convert the collision avoidance time into corresponding vehicle distance and standardize the variables, so as to avoid the step of converting the relative vehicle distance variable into corresponding time through calculation again, which can reduce the time and space complexity of the algorithm. The corresponding safety warning/braking algorithm is shown as follows:(22)Dw=vτt1+t22+v3.6×g×aμ+1.275∑i,j=15Xiωi,Db=vτt22+v3.6×g×aμ,where Dw is the warning distance; Db is the brake distance; vτ is the relative speed; t1 is the brake reaction time; t2 is the brake action time; t3 is the continuous braking time; g is the gravity acceleration; a is the environmental coefficient; μ is the road surface adhesion coefficient; and Xi and ωi are the driver characteristics and their weights.It can be seen from the abovementioned equations that we convert the collision avoidance time into the corresponding warning distance and provide the necessary reminder for the driver during the driving process by inputting the corresponding speed and environmental characteristics and the driver characteristics into the algorithm. During the driving process, we can fix these two values in the braking reaction time and brake action time. The main influencing factors of the continuous braking time are the current speed and deceleration. The influencing factors of the deceleration are the road adhesion coefficient and the environmental coefficient. The road surface adhesion coefficient in different environments is inevitably different, so we have increased the environmental coefficient to change the deceleration in different weather conditions. Different drivers have different reaction times for danger.The flow chart of the algorithm is shown in Figure3. Finally, each parameter is input into the algorithm to find the early warning distance DW. When the distance between the two vehicles is DW, the early warning system issues an early warning. DB is the brake distance, which is the shortest braking distance between the two vehicles to avoid collision. It refers to the shortest braking distance that the driver has reacted to take the braking measures and the vehicle brake system has started to brake.Figure 3
Algorithm flowchart.The pseudocode of the algorithm is shown in Algorithm1.Algorithm 1: The pseudocode of the algorithm.
Algorithm: calculate reaction time, braking time, early warning distance, and braking distance conversion
input: AGE, HEALTH, MENTAL STATE INDEX, VISUAL ACUITY, DRIVING AGE, RELATIVE SPEED, RELATIVE DISTANCE
output: Warning distance, braking distance
function Response Time Based on Driver Characteristics (AGE, HEALTH, MENTAL STATE INDEX, VISUAL ACUITY, DRIVING AGE)
ωi = The weighted average is integrated to determine the weight of each parameter
tdr = Modified reaction time
returntdr
end function
function Braking Time Based on Environmental Characteristics (RELATIVE SPEED, RELATIVE DISTANCE)
tb = Sum of braking time of each stage
returntb
end function
function The warning time is converted to the warning distance (tdr, tb)
Dw = The product of fixed threshold of TTC warning time and relative speed
DB = The product of the minimum braking time and the relative speed
returnDW, DB
end function


## 4.1. Scene Analysis

For a frontal collision, since the two cars that are relatively driven are generally not in a straight line, when the horizontal distance between the two vehicles is greater than the average of the width of the two vehicles, even if the distance between the two cars is already very close, there is no possibility of collision. Therefore, only when the distance between the two vehicles perpendicular to the traveling direction is less than the average valuek of the two vehicle widths (the A vehicle width is WA and the B vehicle width is WB), that is, when k≤d×sinθ1, a frontal collision will occur. The general vehicle width is about 1.5 meters to 1.8 meters, so here k takes 1.7 meters. The distance d between the two vehicles can be derived from the vehicle coordinates received by the Dedicated Short Range Communication (DSRC) module in meters as follows:(9)d=x2−x12+y2−y12.The self-vehicle speed isVA, the adjacent car speed is VB, and the unit is km/h. For the frontal collision shown in Figure 1, the time required is as follows:(10)t=4.3×d×cosθ1−5vA+vB.Figure 1
Frontal collision algorithm model.Whenθ1≤90∘ and θ2>90∘, the calculation of the collision time is performed; if it is θ1≥90∘ and θ2≤90∘, the processing is not performed. For the rear-end collision model, most of the rear-end collisions occur in the same lane. Therefore, when we study the rear-end collision model, we no longer consider the heading angle problem but only consider the relative motion of the vehicle. In the rear-end model, the variable is the relative speed and relative distance of the two cars.For the rear-end collision model shown in Figure2, when the vehicle is actively rear-ended, if VA > VB, the time required for collision is as follows:(11)t=dVA−VB.Figure 2
Rear-end collision algorithm model.IfVA < VB, the collision avoidance algorithm is not processed. When the car is passive rear-end collision, if VA > VB, the time required for collision is the time required for collision is as follows:(12)t=dVA−VB.IfVA < VB, the anticollision algorithm is not processed.Through the analysis of the abovementioned scenarios, it can be seen that the calculation method of collision occurrence time is the same whether it is a head-on collision or a rear-end collision, and the unified calculation method is conducive to enhancing the adaptability of the algorithm in the complex scene.


## 4.2. Design of Safety Collision Avoidance Algorithm

The key of the safety collision avoidance algorithm is to choose a reasonable warning distance threshold. If the warning distance is too long, it will cause great interference to the driver. The safe driving system will frequently alert, which will bring certain adverse effects to the driver’s psychology. If the warning distance is too short, the warning effect is worse and the danger cannot be avoided, which is not conducive to driving safety. Therefore, we need to choose a suitable warning threshold, which will not only interfere with the driver’s driving but also help for the driving safety. Moreover, under different weather conditions, the safety collision avoidance algorithm cannot be used for different drivers. Therefore, this paper proposes a safety warning distance threshold method based on different environments and driver’s characteristics, which can effectively solve the abovementioned problems.It is very important to add environmental parameters and driver characteristic parameters to the algorithm. For example, for a young driver who is responsive, the warning at a certain time may be too early for him, but it will cause bad interference to him [31]. However, for older drivers who are slower to respond, if the warning time is the same as that of the young driver, then the driving process of older drivers becomes more dangerous. Similarly, under different weather conditions, the time at which the early warning system issues an early warning signal should not be the same.When the vehicle is being driven, if the driver finds the danger early, the safety warning system is not required to be involved. Once the driver does not find the danger in time, the safety collision time issued by the safety warning system is the minimum time for the driver to take measures against the danger, including driver reaction time and time required to control the vehicle [11]. When the safety collision warning system indicates a danger, the driver then reacts to deceleration or avoidance to avoid collision with the adjacent car. Here, we set the driver’s reaction time to t. At present, many scholars have established three driving modes according to the driver’s driving style when establishing the safety warning algorithm, namely, the camber type, the medium tilt type, and the inward tilt type driving mode [1]. This algorithm essentially means that the driver reaction time in the early warning algorithm is correspondingly different according to the driving style. Table 1 shows the average reaction time corresponding to the drivers of three different driving styles.Table 1
Average driver reaction time for different driving styles.
Driver type
Reaction time (s)
Average
1
2
3
4
5
6
7
8
9
10
Introverted
0.62
0.67
0.73
0.78
0.64
0.82
0.75
0.73
0.66
0.65
0.705
Medium
0.88
0.82
0.99
0.99
0.91
1.01
0.93
0.87
0.95
0.79
0.910
Extraverted
1.12
1.08
1.23
1.23
1.05
1.19
1.23
1.14
1.32
1.04
1.139According to the abovementioned table, different driving styles of the driver can be expressed by different reaction times. According to [10], the early warning algorithm considering the driver’s driving style can adapt to the driving needs of different drivers to a certain extent, and during the driving process, the driver can perform according to his own physical condition and driving environment.According to a large number of theoretical and experimental studies on drivers’ driving tendency in [11], the factors that affect drivers’ driving tendency mainly include physiological characteristics (gender, age, physical health, etc.), psychological characteristics (ability, personality, emotion, etc.), and other factors such as drivers’ occupation and education level. Here, we select the driver’s age, driving years, eyesight, physical condition, and mental status of the six factors.We assign different weights to the abovementioned factors to determine the impact of the driver’s personal factors on the safety warning time. We set the driver’s ageX1 (weight ω1), driving age X2 (weight ω2), health index X3 (X3 = 1, 2, 3, 4, 5) (weight ω3), mental state index X4 (X4 = 1, 2, 3, 4, 5) (weight ω4), and visual acuity X5 (weight ω5). The factors and weights were scored by the entropy method [16], suppose the decision matrix of each influencing factor and reaction time is as follows:(13)T=X1X2⋮Xmx11x12⋯x1nx21x22⋯x2n⋮⋮⋮⋮xm1xm2xm3xmn,Pij=xij∑i=1mxij.P
ij represents the contribution of the ith attribute to factor Xij. Ej can be used to represent the total contribution of all schemes to attribute Xj:(14)Ej=−K∑i=1mPijlnPij,where the constant K=1/lnm. Hence, we can guarantee that 0≤Ej≤1. It can be seen from the formula that when the contribution of each scheme under a certain attribute tends to be the same, E tends to one. Especially when all are equal, the role of the attribute of the target in the decision can be ignored, that is, the weight of the attribute is zero. We can see that the attribute value is determined by the difference of all schemes. Therefore, dj can be defined as the consistency degree of contribution of each factor under the jth attribute:(15)dj=1−Ej.Then, the factor weight is(16)ωj=dj∑j=1ndj.Then, the reaction time is modified by(17)Yi=∑i,j=15Xiωj,τdr=1.275Yi.Braking system response time includes the reaction time of the brake system, the time of brake coordination, and the time of continuous braking [32]. Here, the reaction time of the brake system is t1, the brake action time is t2, and the continuous braking time is set to t3. In the continuous braking time, we assume that the deceleration is constant, and the calculation equation is as follows:(18)t3=v3.6×g×aμ−t22,where v is the vehicle speed, which is the driving speed of the vehicle; g is the gravitational acceleration, the value is 9.8 m/s2; μ is the road surface adhesion coefficient; and a is the environmental coefficient. According to [12], the rainy day a has a value of 0.5, the icy road surface is 0.1, the snow surface is 0.3, and the dry road surface is 1. The continuous braking time varies with the vehicle speed, and g is the maximum brake reduction speed. The adhesion coefficient of road surface is negatively correlated with the braking distance:The definition of TTC is as follows:(19)TTC=Dvτ,where D is the distance between two vehicles, vτ is the relative speed of the two vehicles, and the dimension of the TTC parameter is seconds. In the TTC algorithm, the shortest time between the two vehicles is calculated by the ratio of the distance to the relative speed of the two vehicles. When the collision time is greater than the warning time, the early warning system will not alarm, and when the collision time is less than the warning time, the early warning system will alarm [33].According to the abovementioned analysis, the risk warning from the safety collision avoidance system to the minimum time that the driver takes the reaction to stop the vehicle or avoid the danger, that is, the safety collision avoidance time threshold TTC is calculated as follows:(20)TTC=t1+t2+t3+τdr.Substitutingt4 and τdr as follows:(21)TTC=t1+t22+v3.6×g×aμ+1.275∑i,j=15Xiωj.The value ofXi is input according to the actual situation of the driver.Since the data obtained by the vehicle-mounted system are relative speed and relative vehicle distance, equation (22) is used to convert the collision avoidance time into corresponding vehicle distance and standardize the variables, so as to avoid the step of converting the relative vehicle distance variable into corresponding time through calculation again, which can reduce the time and space complexity of the algorithm. The corresponding safety warning/braking algorithm is shown as follows:(22)Dw=vτt1+t22+v3.6×g×aμ+1.275∑i,j=15Xiωi,Db=vτt22+v3.6×g×aμ,where Dw is the warning distance; Db is the brake distance; vτ is the relative speed; t1 is the brake reaction time; t2 is the brake action time; t3 is the continuous braking time; g is the gravity acceleration; a is the environmental coefficient; μ is the road surface adhesion coefficient; and Xi and ωi are the driver characteristics and their weights.It can be seen from the abovementioned equations that we convert the collision avoidance time into the corresponding warning distance and provide the necessary reminder for the driver during the driving process by inputting the corresponding speed and environmental characteristics and the driver characteristics into the algorithm. During the driving process, we can fix these two values in the braking reaction time and brake action time. The main influencing factors of the continuous braking time are the current speed and deceleration. The influencing factors of the deceleration are the road adhesion coefficient and the environmental coefficient. The road surface adhesion coefficient in different environments is inevitably different, so we have increased the environmental coefficient to change the deceleration in different weather conditions. Different drivers have different reaction times for danger.The flow chart of the algorithm is shown in Figure3. Finally, each parameter is input into the algorithm to find the early warning distance DW. When the distance between the two vehicles is DW, the early warning system issues an early warning. DB is the brake distance, which is the shortest braking distance between the two vehicles to avoid collision. It refers to the shortest braking distance that the driver has reacted to take the braking measures and the vehicle brake system has started to brake.Figure 3
Algorithm flowchart.The pseudocode of the algorithm is shown in Algorithm1.Algorithm 1: The pseudocode of the algorithm.
Algorithm: calculate reaction time, braking time, early warning distance, and braking distance conversion
input: AGE, HEALTH, MENTAL STATE INDEX, VISUAL ACUITY, DRIVING AGE, RELATIVE SPEED, RELATIVE DISTANCE
output: Warning distance, braking distance
function Response Time Based on Driver Characteristics (AGE, HEALTH, MENTAL STATE INDEX, VISUAL ACUITY, DRIVING AGE)
ωi = The weighted average is integrated to determine the weight of each parameter
tdr = Modified reaction time
returntdr
end function
function Braking Time Based on Environmental Characteristics (RELATIVE SPEED, RELATIVE DISTANCE)
tb = Sum of braking time of each stage
returntb
end function
function The warning time is converted to the warning distance (tdr, tb)
Dw = The product of fixed threshold of TTC warning time and relative speed
DB = The product of the minimum braking time and the relative speed
returnDW, DB
end function


## 5. Simulation Experiment

After understanding the working principle and construction idea of the algorithm, the algorithm is simulated by MATLAB and compared the efforts with three classical safety distance algorithms. Then, VISSUM is used to simulate collision, and the effect is compared with three classical algorithms. The three classical algorithms are Mazda algorithm, Berkeley algorithm, and Honda algorithm. In this paper, the effectiveness of the algorithm is judged by comparing the safe-braking distance determined by the three classical algorithms and this algorithm under different relative speeds.The simulation of the safe distance model can be divided into three situations: front vehicle emergency braking condition, front vehicle static condition, and front vehicle uniform speed condition.In order to facilitate the comparison with other safe distance models, the speed and acceleration of the vehicle itself and the speed and acceleration of the vehicle in front are set in the same way, that is, the relative speedvτ between the vehicles is the only variable in this environment, and the braking response time t1 = 0.1 s, brake action time t2 = 0.1 s, continuous braking time t3 = 2 s, and road adhesion coefficient μ = 1. In this simulation environment, the characteristics of the two drivers are shown in Table 2.Table 2
Driver characteristics.
Driver
Age
Health index
Mental state index
Visual acuity
Driving age
A
35
5
5
1.5
10
B
55
3
4
1.2
25


### 5.1. Simulation of Front Vehicle Emergency Braking Condition Model

Figure4, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle emergency braking condition.Figure 4
Simulation of front vehicle emergency braking condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure4(a), under different vehicle speeds, the warning distance of Driver A calculated by the model established in this paper is conservative when the speed is low and longer when the speed is high, which is more sensitive to the speed change. The warning distance of Driver B determined by this algorithm is longer than that determined by other algorithms due to the age factor. Analysis of Figure 4(b) shows that in foggy environment, the warning distance of Driver B calculated by this algorithm is always greater than the warning distance calculated by other algorithms in the foggy environment. The warning distance of Driver A calculated by this algorithm also has increased more that than in sunny days.It can be seen from the analysis of Figures4(c) and 4(d) that both the warning distance of Driver A and the warning distance of Driver B in rainy environmental and snowy environmental are more conservative than that of the sunny day environment in Figure 4(a), which is the result of considering the environmental characteristics.


### 5.2. Simulation of Front Vehicle Static Condition Model

Figure5, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle static condition.Figure 5
Simulation of front vehicle static condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure5(a), in the comparison of warning distance, the warning distance of Driver A calculated by the model established in this paper matches the warning distance height calculated by the Berkeley model, which is slightly more conservative than the Berkeley model in low-speed environment. The warning distance calculated by the model established in this paper is close to that calculated by the Mazda model, both of which provide a relatively conservative warning distance and an early warning time. Compared with Berkeley and Mazda algorithm, the model established in this paper adjusts the warning distance at low speed and high speed, providing a more appropriate warning time.It can be seen from Figures5(b)–5(d) that under the same trend of speed change, the warning distance of Driver A calculated by the model established in this paper presents almost the same trend as that calculated by the Berkeley model. The warning distance of Driver B calculated by the model established in this paper and that calculated by the Mazda model also showed almost the same trend, but the difference between them gradually increased with the increase of their own speed, that is, the faster the speed, the greater the difference. Therefore, it can be concluded that in foggy, rainy, and snowy environmental the model established in this paper is more adaptable to the environment and can effectively improve traffic safety.


### 5.3. Simulation of Front Vehicle Uniform Speed Condition Model

Figure6, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle uniform speed condition.Figure 6
Simulation of front vehicle uniform speed condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure6(a), in the comparison of warning distance, the warning distance determined by the Berkeley model changes little with the relative speed. In addition, when the relative speed is high, warning is not timely, and when the relative speed is low, false alarm is easily caused. However, the warning distance of driver A calculated by the model established in this paper is more sensitive to the change of relative speed, which can ensure the safety of vehicles under different relative speeds.As can be seen from Figures6(b)–6(d) you can see that in foggy, rainy, and snowy environment, we compared the warning distance of Driver A calculated by the model established in this paper with that calculated by the Berkeley model. When the speed is slow, the warning distance calculated by this algorithm is very close to that calculated by Berkeley algorithm. When the speed increases, the difference between the warning distance of Driver A calculated by the model established in this paper and the warning distance calculated by Berkeley model also increase, and the difference between the warning distance of Driver A and Berkeley model is positively related to the speed.The Honda model has a relatively late alarm time under three conditions, short warning distance and too aggressive, which has a great disadvantage compared with the model established in this paper.


### 5.4. Collision Simulation Based on VISSUM

VISSIM can simulate the vehicle, road and signal light changes intuitively and meticulously and can accurately and truly reflect the traffic operation [33]. VISSIM includes road network, vehicle, signal light, and other components, which can meet the simulation requirements of collision avoidance algorithm [34]. In order to verify the efficiency of the algorithm, we will choose Berkeley algorithm, Honda algorithm, and Mazda algorithm to compare with this algorithm.In the simulation process, the relative speed of the two vehicles is set as the only variable, set the relative speed to 10 km/h, 30 km/h, 50 km/h, and 70 km/h. There are two experimental scenarios, and their settings are shown in Table3.Table 3
Setting of experimental scene.
Experimental scenario
Driver
Environmental science
1
A
Snowy
2
B
SunnyThe position coordinate of the vehicle is obtained by calling the encapsulated function in VISSUM, and the collision avoidance algorithm is processed. After the simulation run, input the vehicle operation parameters into the collision simulation analysis software SSAM for vehicle crash statistics. Each group of experiments was carried out 100 times, a total of 15 groups. In order to ensure the accuracy of the experimental results, we analyzed the error of the experimental results. The error bars of experimental scenario are shown in Figure7.Figure 7
The error bars of experimental scenario.The blue column is the average of each set of experiments, and the red line is the standard deviation of each set of experiments. The equation for calculating the mean and standard deviation is as follows:(23)x¯=∑i=1mxim,(24)SDx=1m∑i=1mxi−x¯2.It can be seen from Figure7 that the error range of the experiment is not large and the error is within the acceptable range. After analysis, we selected the data with the smallest experimental error, as shown in Tables 4 and 5.Table 4
Experiment scenario 1 simulation results.
Relative speed (km/h)
Algorithm in this paper
Berkeley algorithm
Honda algorithm
Mazda algorithm
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
Warning times
Warning times
10
2
1
4
2
5
1
7
1
30
6
7
11
8
12
9
17
6
50
24
19
19
14
18
13
23
14
70
26
21
24
19
23
18
31
20Table 5
Experiment scenario 2 simulation results.
Relative speed (km/h)
Algorithm in this paper
Berkeley algorithm
Honda algorithm
Mazda algorithm
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
10
2
1
4
0
5
1
6
1
30
1
0
11
6
12
7
16
7
50
4
2
5
4
6
5
10
4
70
4
3
10
11
11
10
21
9The performance of the two algorithms is compared according to the data in Tables4 and 5.The equation of the false alarm rate is(25)f1=κ1ο1×100%.The equation of the missing alarm rate is(26)f2=κ2ο2×100%.In equation (25), κ1 is the number of collisions under the condition of warning display and ο1 is the number of warning displays. In equation (26), κ2 is the number of collisions without warning display and ο2 is the number of collisions without warning display.Compared with the Berkeley algorithm, Honda algorithm, and Mazda algorithm, the false alarm rate of the method in this paper decreased by 5%, 4%, and 14%. The missing alarm rate of the method in this paper decreased by 3%, 6%, and 1%. So, the method in this paper can better carry out vehicle collision prevention and the algorithm is more accurate. Therefore, the algorithm proposed in this paper is more efficient than Berkeley algorithm and more conducive to driving safety.


## 5.1. Simulation of Front Vehicle Emergency Braking Condition Model

Figure4, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle emergency braking condition.Figure 4
Simulation of front vehicle emergency braking condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure4(a), under different vehicle speeds, the warning distance of Driver A calculated by the model established in this paper is conservative when the speed is low and longer when the speed is high, which is more sensitive to the speed change. The warning distance of Driver B determined by this algorithm is longer than that determined by other algorithms due to the age factor. Analysis of Figure 4(b) shows that in foggy environment, the warning distance of Driver B calculated by this algorithm is always greater than the warning distance calculated by other algorithms in the foggy environment. The warning distance of Driver A calculated by this algorithm also has increased more that than in sunny days.It can be seen from the analysis of Figures4(c) and 4(d) that both the warning distance of Driver A and the warning distance of Driver B in rainy environmental and snowy environmental are more conservative than that of the sunny day environment in Figure 4(a), which is the result of considering the environmental characteristics.


## 5.2. Simulation of Front Vehicle Static Condition Model

Figure5, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle static condition.Figure 5
Simulation of front vehicle static condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure5(a), in the comparison of warning distance, the warning distance of Driver A calculated by the model established in this paper matches the warning distance height calculated by the Berkeley model, which is slightly more conservative than the Berkeley model in low-speed environment. The warning distance calculated by the model established in this paper is close to that calculated by the Mazda model, both of which provide a relatively conservative warning distance and an early warning time. Compared with Berkeley and Mazda algorithm, the model established in this paper adjusts the warning distance at low speed and high speed, providing a more appropriate warning time.It can be seen from Figures5(b)–5(d) that under the same trend of speed change, the warning distance of Driver A calculated by the model established in this paper presents almost the same trend as that calculated by the Berkeley model. The warning distance of Driver B calculated by the model established in this paper and that calculated by the Mazda model also showed almost the same trend, but the difference between them gradually increased with the increase of their own speed, that is, the faster the speed, the greater the difference. Therefore, it can be concluded that in foggy, rainy, and snowy environmental the model established in this paper is more adaptable to the environment and can effectively improve traffic safety.


## 5.3. Simulation of Front Vehicle Uniform Speed Condition Model

Figure6, respectively, show the comparison and analysis diagram of the algorithm with sunny, foggy, rainy, and snowy environmental characteristics under the front vehicle uniform speed condition.Figure 6
Simulation of front vehicle uniform speed condition. (a) Sunny environmental. (b) Foggy environmental. (c) Rainy environmental. (d) Snowy environmental.
(a)
(b)
(c)
(d)As can be seen from Figure6(a), in the comparison of warning distance, the warning distance determined by the Berkeley model changes little with the relative speed. In addition, when the relative speed is high, warning is not timely, and when the relative speed is low, false alarm is easily caused. However, the warning distance of driver A calculated by the model established in this paper is more sensitive to the change of relative speed, which can ensure the safety of vehicles under different relative speeds.As can be seen from Figures6(b)–6(d) you can see that in foggy, rainy, and snowy environment, we compared the warning distance of Driver A calculated by the model established in this paper with that calculated by the Berkeley model. When the speed is slow, the warning distance calculated by this algorithm is very close to that calculated by Berkeley algorithm. When the speed increases, the difference between the warning distance of Driver A calculated by the model established in this paper and the warning distance calculated by Berkeley model also increase, and the difference between the warning distance of Driver A and Berkeley model is positively related to the speed.The Honda model has a relatively late alarm time under three conditions, short warning distance and too aggressive, which has a great disadvantage compared with the model established in this paper.


## 5.4. Collision Simulation Based on VISSUM

VISSIM can simulate the vehicle, road and signal light changes intuitively and meticulously and can accurately and truly reflect the traffic operation [33]. VISSIM includes road network, vehicle, signal light, and other components, which can meet the simulation requirements of collision avoidance algorithm [34]. In order to verify the efficiency of the algorithm, we will choose Berkeley algorithm, Honda algorithm, and Mazda algorithm to compare with this algorithm.In the simulation process, the relative speed of the two vehicles is set as the only variable, set the relative speed to 10 km/h, 30 km/h, 50 km/h, and 70 km/h. There are two experimental scenarios, and their settings are shown in Table3.Table 3
Setting of experimental scene.
Experimental scenario
Driver
Environmental science
1
A
Snowy
2
B
SunnyThe position coordinate of the vehicle is obtained by calling the encapsulated function in VISSUM, and the collision avoidance algorithm is processed. After the simulation run, input the vehicle operation parameters into the collision simulation analysis software SSAM for vehicle crash statistics. Each group of experiments was carried out 100 times, a total of 15 groups. In order to ensure the accuracy of the experimental results, we analyzed the error of the experimental results. The error bars of experimental scenario are shown in Figure7.Figure 7
The error bars of experimental scenario.The blue column is the average of each set of experiments, and the red line is the standard deviation of each set of experiments. The equation for calculating the mean and standard deviation is as follows:(23)x¯=∑i=1mxim,(24)SDx=1m∑i=1mxi−x¯2.It can be seen from Figure7 that the error range of the experiment is not large and the error is within the acceptable range. After analysis, we selected the data with the smallest experimental error, as shown in Tables 4 and 5.Table 4
Experiment scenario 1 simulation results.
Relative speed (km/h)
Algorithm in this paper
Berkeley algorithm
Honda algorithm
Mazda algorithm
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
Warning times
Warning times
10
2
1
4
2
5
1
7
1
30
6
7
11
8
12
9
17
6
50
24
19
19
14
18
13
23
14
70
26
21
24
19
23
18
31
20Table 5
Experiment scenario 2 simulation results.
Relative speed (km/h)
Algorithm in this paper
Berkeley algorithm
Honda algorithm
Mazda algorithm
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
Warning times
Collision times
10
2
1
4
0
5
1
6
1
30
1
0
11
6
12
7
16
7
50
4
2
5
4
6
5
10
4
70
4
3
10
11
11
10
21
9The performance of the two algorithms is compared according to the data in Tables4 and 5.The equation of the false alarm rate is(25)f1=κ1ο1×100%.The equation of the missing alarm rate is(26)f2=κ2ο2×100%.In equation (25), κ1 is the number of collisions under the condition of warning display and ο1 is the number of warning displays. In equation (26), κ2 is the number of collisions without warning display and ο2 is the number of collisions without warning display.Compared with the Berkeley algorithm, Honda algorithm, and Mazda algorithm, the false alarm rate of the method in this paper decreased by 5%, 4%, and 14%. The missing alarm rate of the method in this paper decreased by 3%, 6%, and 1%. So, the method in this paper can better carry out vehicle collision prevention and the algorithm is more accurate. Therefore, the algorithm proposed in this paper is more efficient than Berkeley algorithm and more conducive to driving safety.


## 6. Conclusion

In this paper, we propose a novel vehicle collision avoidance algorithm. By analyzing the relationship between collision avoidance time and environmental characteristics and driver characteristics, a corresponding early warning algorithm is established. The algorithm not only considers the relative positional relationship between vehicles but also considers the impact on safe driving under different weather conditions. Different weather conditions will have different road adhesion coefficients and visibility, so it is necessary to add the weather factor in the collision avoidance algorithm. Since different drivers have different driving habits and reaction times, the collision avoidance algorithm must consider adapting to different driver characteristics. Therefore, it is necessary to add driver characteristics. Finally, we simulated the algorithm using MATLAB and VISSUM. After MATLAB simulation, we found that the algorithm is more adaptable to different weather conditions and different drivers than the classic collision avoidance algorithm, which can effectively improve the safety of driving. After VISSUM simulation, this algorithm reduces the false alarm rate and missing alarm rate compared with the classic Berkeley algorithm. The algorithm proposed in this paper proves its rationality and feasibility through rigorous design and experiment. Still more experimental data are required to improve and optimize. With the advent of the era of big data and the popularity of the Internet of Vehicles, more weather characteristics and driver characteristics will be counted at the big data level to obtain a more accurate collision avoidance warning threshold, thereby setting a more dynamic safety warning distance for different drivers in different weather conditions.



---

*Source: 1616420-2020-03-17.xml*