Traffic Risk Environment Impact Analysis and Complexity Assessment of Autonomous Vehicles Based on the Potential Field Method

Although autonomous vehicles have introduced a promising potential for improving traffic safety and efficiency, ensuring the safety of autonomous vehicles in complex road traffic environments is still a huge challenge to be tackled. To quickly quantify the potential risk factors of autonomous vehicles in traffic environments, this paper focuses mainly on the influence of the depth and breadth of the environment elements on the autonomous driving system, uses the potential field theory to establish a model of the impact of the environmental elements on the autonomous driving system, and combines AHP to quantify equivalent virtual electric quantity of each environment element, so as to realize the quantitative evaluation of the traffic environment complexity. The proposed method comprehensively considers the physical attributes and state parameters of the environmental elements, which compensates for the fact that the shortage of the factors considered in the traffic environment complexity assessment is not comprehensive. Finally, a series of experiments was carried out to verify the reliability of our proposed method. The results show that the complexity of the static elements is determined only by the physical attributes and shape of the obstacle; the complexity of the dynamic elements is determined by the movement of the obstacle and the movement of the autonomous vehicle, and the comprehensive complexity mainly depends on the complexity of their dynamic elements. Compared with other methods, the complexity evaluation values are generally consistent, the absolute percentage error of the majority of samples was within ±5%, and the degree of deviation was −1.143%, which provides theoretical support for autonomous vehicles on safety and the risk assessment in future.


Introduction
With the continuous development of automobile intelligent technology, autonomous driving is about to enter the comprehensive testing stage, and the demand for testing based on an open road has become increasingly urgent [1,2]. Currently, the most popular testing approach is the Naturalistic-Field Operational Test (N-FOT), which is widely used. However, the limitation of this approach is its low efficiency, because N-FOTs require billions of driving mileages to obtain sufficient "safety evidence" [3,4]. To accelerate the safety testing of autonomous vehicles, scenario-based testing approaches are promising because of the benefits of traffic scenario customization, full coverage of real-world traffic scenarios, and transferable testing results among different regions [5,6]. However, how to ensure the testing scenarios have full coverage for the naturalistic driving conditions and finish the test within limited periods has emerged as a dilemma.
The road traffic environment is an open, nonlinear, random, dynamic system, with high uncertainty, unrepeatable, unpredictable, and inexhaustible characteristic, which is a huge challenge for autonomous driving systems [7][8][9]. The autonomous vehicles should have the ability to assess the complexity level of the current driving scenario and therefore to understand the driving cognitive workload to prevent potential hazard situations. In order to quickly quantify the potential risk factors of autonomous vehicles in traffic environments, complexity is a necessary criticality measure to define the critical scenario, and it is crucial to study how to quantify the complexity of driving scenarios [10,11].

Related Work
The quantitative assessment of the impact of the traffic environment on the autonomous driving system is still in the exploratory stage. At present, the existing scenario complexity quantification studies mainly have two types of subjective quantification methods and objective quantification methods. Among them, the subjective quantitative methods generally adopt analytic hierarchy process (AHP), information entropy, and so on; for example, Wang et al. [12] established fundamental and additional environment complexity models based on an integrated evaluation method of expert evaluation and the analytic hierarchy process (AHP). Gao X et al. [13] proposed a traffic environment complexity evaluation model based on graphical information entropy, which analyzed the impact of traffic environment on drivers' mental load, and established a stimulus response model of human driving behavior. This method is highly reliant on human participation and also does not consider the location and speed of dynamic traffic elements.
Meanwhile, the existing objective methods mainly apply data-driven models or machine learning methods on the basis of obtaining the information of the surrounding environment of vehicles; for example, Isabelle Tang et al. [14] proposed a method based on low-cost camera imaging to extract relevant data for the road traffic environmental, and the traffic environment was classified according to the results shown by the data. Zhang H.C. et al. [15] defined the complexity of driving as the cognitive burden of drivers caused by the traffic environment, and the gravity model was applied to evaluate the complexity of the road traffic environment. The concepts of instantaneous complexity, time accumulation complexity, and distance accumulation complexity are proposed in the paper, but the method lacks the calibration of the relevant parameters in the calculation formula and cannot obtain the complexity quantification value directly. Fan N. et al. [16] believed that the driving task complexity originated from instantaneous complexity, and a dynamic complexity measure was proposed based on collision time. At the same time, Yu R.J. et al. [17] proposed to quantify human drivers' judgement on driving environment complexity, by describing the vehicle-vehicle spatial-temporal interactions from the perspectives of quantity, variety, and relations, but these methods did not consider the complexity of the static traffic environment and had certain limitations to their application [11].
In summary, there are the following problems in the quantitative assessment of traffic environment complexity [18][19][20]. Firstly, the factors considered in the assessment of traffic environment complexity are not comprehensive, the models are relatively simple, and the impact of different environmental factors on driving behavior and complexity is not analyzed from multiple dimensions, such as physical attributes and state parameters [21]. Secondly, previous studies have not made effective use of environmental information extracted from the OpenStreetMap (OSM) domain and prior environmental knowledge, so the real-time online quantitative evaluation of the driving scenarios of autonomous vehicles cannot be conducted [22]. This paper proposes a method to evaluate the complexity of the traffic environment of autonomous vehicles based on the potential field; each environmental element is abstracted as positive point charges or uniformly charged wires, which generates a potential field in regional space, and different electric potential fields can be accumulated and superimposed to form the final environmental potential field, which is used to realize the quantitative assessment of the traffic environment, which can provide theoretical support for the testing of autonomous vehicles.

Definition of Traffic Environment Complexity
The traffic environment is the sum of powers of all the external influences on autonomous driving systems, including road conditions, traffic facilities, land features, meteorological conditions, activities of other traffic participants, and so on. However, these road conditions, facilities, and meteorological conditions vary continuously or discretely within a certain interval, which will lead to endless road traffic scenarios.
Autonomous vehicles can be regarded as an individual in the system. Studying the complexity of the traffic environment is to evaluate the influence of the system on the individual, which is similar to the field theory, as shown in Figure 1. In this paper, each environmental element is abstracted as positive point charges or uniformly charged wires. According to the field theory [23,24], it generates a potential field in the regional space, which is determined by the category of environmental elements (i.e., virtual electricity quantity) and is inversely proportional to the distance, as shown in formula 1. Meanwhile, different electric potential fields can be accumulated and superimposed to form the final environmental potential field, which is similar to the traffic environmental complexity [22].
In summary, this paper defines the traffic environment complexity as follows: taking the driving viewpoint of the autonomous vehicle (i.e., the elliptical viewpoint of the human driver's eye) as the coordinate reference, calculating the static element complexity and dynamic element complexity based on the viewpoint scene, and finally weighting the static element complexity and dynamic element complexity to obtain the traffic environment complexity. Therefore, the complexity assessment of traffic environment is an objective description of the impact of the environmental elements on the autonomous driving system based on the viewpoint scene. The road traffic environment complexity is an objective property, which is determined by the physical characteristics of the environmental elements and does not vary with the capacity of the testing vehicle [25][26][27][28].

Static Elements Complexity
Firstly, considering the static environmental elements, such as traffic signs, plants, markings, ancillary facilities, etc., each environmental element is abstracted as a positive point charge, and then we use the artificial potential field to calculate the static element complexity. Taking the static element q i J (x i , y i ) as an example, it is known that the potential field based on the viewpoint coordinates A(x, y) of the tested autonomous vehicle is expressed as follows: where q i J is the virtual electricity quantity of the ith static element, which is determined by the static element category, and r i J is the distance from the viewpoint coordinate to the center of the ith static element and n is the number of static environment elements.
Considering that the actual obstacles all have a certain volume, and when the distance is small to a certain extent in physics, the formula no longer holds, we introduce r 0 to denote the equivalent radius of the obstacle, and the distance calculation formula is modified as follows: Furthermore, considering the linear environmental elements, e.g., lane boundary, traffic guardrail, and lane line, etc., each environmental element is abstracted as an uniformly charged wire, and we use the artificial potential field to calculate the static element complexity. Taking the lane line L I as an example, assuming that the equation of its central reference line is ax + by + c = 0, then r i J is the distance from the point to the lane line, so a positive real number r 0 is introduced to modify the distance calculation formula.
Similarly, when the type of the lane line is a curve, taking the circular curve (x − x i ) 2 + (y − y i ) 2 = R 2 as an example, the calculation formula of the environmental potential field is the same as above, and the distance calculation formula is:

Dynamic Elements Complexity
Considering dynamic environmental elements, such as pedestrians, vehicles, nonmotorized vehicles, etc., we then use the artificial potential field to calculate the dynamic element complexity. Taking the static element q i D (x i , y i ) as an example, it is known that the potential field based on the viewpoint coordinates A(x, y) of the tested autonomous vehicle is expressed as follows: where q i D is the virtual electric quantity of the ith dynamic element, which is determined by the dynamic element category, r i D is the distance from the viewpoint coordinate to the center of the ith dynamic element, i D is the proportional enhancement factor, and n is the number of dynamic environment elements.
Regarding the proportional enhancement factor i D , according to human driving habits and subjective feelings, when the environmental elements are in motion, the influence of the objects located in the area in front of them will be strengthened and the influence of the objects located in the area behind them should be weakened, which is similar to the Doppler effect. Therefore, the proportional enhancement factor i D is calculated as follows: where c is the propagation velocity of the potential field, which is a constant to be calibrated (the value is not less than the maximum speed of vehicle), θ is the directional angle of the r i D , and v ix and v iy are the decomposition quantities of the velocity in the X and Y axis for the dynamic elements.
Other than when calculating the environment complexity, we should consider not only the vehicles and pedestrians in this lane, but also the vehicles and pedestrians in other lanes. The difference between the two is that the effect of the latter on the autonomous vehicles is smaller than the effect of the former on the autonomous vehicles; the more lanes are separated, the smaller the effect is.
In order to quantify the environmental elements complexity located in different lanes, an "electron energy level" model is introduced; each lane is considered as an energy level track, and different lanes have different energy levels. The lane in which the Ego vehicle is located is defined as L 1 and its energy level is E 1 , and the energy level E n of the lane L n , which is a lane of n lanes separated from lane L 1 , is expressed as follows: Therefore, the environmental potential field generated by the dynamic environmental elements of lane L n is expressed as follows:

Complexity of the Traffic Environment
Given that different potential fields can accumulate and form the final environmental potential field, the complexity of static elements and dynamic elements are weighted and summed to obtain the traffic environmental complexity C E . The traffic environmental complexity is given as follows: where C E is the traffic environment complexity based on the viewpoint coordinates (x, y), α, β is the weights of static element complexity and dynamic element complexity; here, the value of α, β is 0.35 and 0.65. Based on the values of C E , the traffic environment complexity for autonomous vehicles is graded as follows: When 80 ≤ C E ≤ 100, the level of the traffic environment complexity for autonomous vehicles is extremely complex.
When 60 ≤ C E < 80, the level of the traffic environment complexity for autonomous vehicles is more complex.
When 40 ≤ C E < 60, the level of the traffic environment complexity for autonomous vehicles is average.
When 0 < C E < 40, the level of the traffic environment complexity for autonomous vehicles is simple.

Determination of Equivalent Virtual Electric Quantity of Traffic Environment Elements
The above virtual electricity quantity is mainly determined by the category of environmental elements, which represent the impact of the element on self-driving vehicles. Strictly speaking, the virtual electricity quantity of each environment element is different, but the virtual electric quantity of similar environmental elements should be approximately equal. So, in order to have convenient calculations, we divide the environmental elements into several categories, mainly including several categories of humans, motor vehicles, animals, green plants, ancillary facilities, signs, and marking lines.
The virtual electric quantity of the above elements categories was calibrated using analytic hierarchy process (AHP), and the judgment matrix was constructed by comparing the relative importance of each other using the 9-scale method as seen in Table 1.
Checking the table and the random consistency index RI was 1.32, the consistency ratio was calculated as follows: After the consistency test, here the feature vector w refers to the virtual electric quantity of these several categories of elements, as shown in Table 2.

Verification of Complexity Calculation in Virtual Traffic Environment
Several traffic environment simulation scenarios were built based on the PreScan software, and the verification of the traffic environment complexity model in different scenarios was carried out.

Complexity Calculation of Off-Road Traffic Environment
The off-road road traffic environment refers to the absence of roads and lane lines within the traffic area of the region, as shown in Figure 2. Taking the autonomous vehicle as the Ego Vehicle perspective, the traffic environment complexity is calculated and the results of environmental potential field are visualized as follows. The traffic environment complexity C E is generated by one cyclist, two vehicles, and four trees; it can be seen that each "peak" is produced by the corresponding environmental element and "peak height" is determined by the category of environmental elements. Generally speaking, the "peak height" generated by vehicles and pedestrians is higher than other environmental elements, and the "peak radius" is determined by the equivalent size of environmental elements, and obviously the "peak radius" of vehicles is larger than that of pedestrians and trees.

Complexity Calculation of Highway Traffic Environment
The traffic environment of highway means that the meaningful traffic elements such as road boundaries and lane lines not only have a restraining effect on moving vehicles, but also on other traffic participants. Therefore, this paper defines the constraint of the road boundary as a strong constraint. Here, by setting its the virtual electric quantity, the potential field at the road boundary is set as the maximum and the potential field generated by all the traffic elements outside the road can be ignored; that is, the road boundary has a "shielding effect" on the environmental elements outside the road. Accordingly, the lane line restraint is set as a weak restraint, i.e., drivers should avoid driving on the lane line and changing lanes as often as possible, but it is not absolutely prohibited.
When roads and lane lines exist in the environment, the potential field of the environmental elements is shown in Figure 3. In the figure, the blue vehicle 1 is in the same lane as the Ego Vehicle, and the black vehicle 2 is in the adjacent lane of the Ego Vehicle. The potential energy field generated by the black vehicle 2 is one-quarter of the potential energy field generated by the blue vehicle 1, and the "peak" generated by the black vehicle in the figure becomes lower. Both cyclists and trees are disregarded because they are outside the lane line.

Complexity Calculation of Urban Road Environment
The traffic environment of the urban road refers to a more complex traffic scene that contains dynamic traffic elements, such as pedestrians and vehicles, and usually also static traffic elements such as traffic lights, stop lines, and crosswalks.
In the actual traffic environment, intersections as a relatively open area, the behavior of the traffic participants has great uncertainty and complexity, so that all the other traffic participants in the region need to be taken into account when calculating the complexity of the traffic environment. However, under the strong constraint of traffic signal lights, when there is no cross conflict point with some vehicles, the energy generated by other vehicles should be attenuated.
Taking the intersection without traffic signals ( Figure 4a) and with traffic signals (Figure 4b) as examples, the conflict points formed in the left turn process of self-driving vehicles are shown in Figure 4. At the intersection without traffic signal, the potential fields generated by vehicle 1, vehicle 2, vehicle 3 and pedestrians all should be taken into account when calculating the environment complexity of the autonomous vehicle, the potential field of the environmental elements is shown in Figure 5. Compared with the intersection without traffic signal, the intersections with traffic signal have the strong constraint effect of traffic signal lights, Vehicles 1 and 3 have no traffic conflicts with the autonomous vehicle; thus, it is necessary to attenuate the potential field generated by them. The potential field of each environmental element at the intersection is shown in Figure 6. The "peak" of the potential energy field generated by Vehicles 1 and 3 becomes lower than that of Vehicle 2 and the pedestrian.

Verification of Complexity Calculation in Real Traffic Environment
This paper selects the Huawei autonomous driving video in a real traffic environment for the complexity calculation of traffic environment elements, and the part of environmental element information parameters collected by the system and the element ID of the complexity calculation are shown in Table 3.  Figure 7 shows the results of experiments in four different complexities. Road data are divided into four levels based on the complexity value: simple data whose complexity is between 0 and 40, general data for which the complexity is between 40 and 60, medium data for which the complexity is between 60 and 80, and extreme data for which the complexity is between 80 and 100. It can be seen that the complexity of the traffic environment shown in (a)-(c) is simple, (d)-(f) is generally complex, (g)-(i) is more complex, and (j)-(l) is extremely complex. We can find that the calculated complexity is consistent with the complexity of the scene. We randomly selected 17 traffic scenarios for the complexity statistical analysis; their static element complexity C J , dynamic element complexity C D , and comprehensive complexity C E are shown in Figure 8. As can be seen from the figure, the static element complexity of different traffic scenes is relatively small and close, and their value stays around 20 to 60. However, the dynamic element complexity of different traffic scenes varies greatly, and their values vary from 20 to 150. It can be seen that the comprehensive complexity mainly depends on depends on the dynamic element complexity. Obviously, those scenarios with high complexity are mainly due to the great dynamic element complexity, as shown in Figure 7j-l, and those scenarios with low complexity are mainly due to the relatively small dynamic element complexity, as shown in Figure 7a-c.

Comparative Analysis with the Other Methods
To further verify the efficiency of the proposed model, it is compared with the evaluation method of expert scoring based on complexity. Thirty groups of real traffic scene videos and photos were selected for the experiments, two complexity evaluation methods were used to calculate their values, and the results are shown in Figure 9. The results show that the complexity evaluation values obtained by the two methods are generally consistent, the absolute percentage error of the majority samples is within ±5%, and the degree of deviation is −1.143%. This shows that the established prediction model error is within the expected range and can more accurately characterize the relationship between environmental elements and the complexity of the traffic environment.

Conclusions and Future Work
Scenario-based testing and evaluation technology has become the key to autonomous vehicles driving safely on the road. An advanced autonomous vehicle should be able to evaluate the complexity of the current driving scenario and drive the vehicle properly to prevent potential hazardous situations. However, a complex testing scenario can benefit the validation and verification of autonomous vehicles. The quantification of scenario complexity can both enhance the environmental cognition and accelerate the testing and validation work of autonomous vehicles [29,30].
(1) This paper defines the traffic environment complexity as follows: taking the driving viewpoint of the autonomous vehicle (i.e., the elliptical viewpoint of the human driver's eye) as the coordinate reference, calculating the static element complexity and dynamic element complexity based on the viewpoint scene, and finally weighting the static element complexity and dynamic element complexity to obtain the traffic environment complexity. (2) The traffic environment is the sum of powers of all the external influences on autonomous driving systems; this paper mainly focuses on the influence of the depth and breadth of the environment elements on the autonomous driving system, uses the potential field theory to establish the impact model of the environment elements on the autonomous driving system, and combines AHP to quantify equivalent virtual electric quantity of each environment element, so as to realize the quantitative evaluation of the traffic environment complexity. (3) A series of experiments was carried out to verify the reliability of our proposed method. The results show the static elements complexity is determined only by the physical attributes and shape of the obstacle, the dynamic elements complexity is determined by the movement of the obstacle and the movement of the autonomous vehicle, and the comprehensive complexity depends mainly on their dynamic elements complexity. Compared with other methods, the complexity evaluation values are generally consistent, the absolute percentage error of the majority of samples are within ±5%, and the degree of deviation was −1.143%; this provides theoretical support for autonomous vehicles on-line testing and risk assessment in future. Scenario complexity quantification is the way to hierarchize the standard scenarios. It helps researchers to build hierarchical benchmarks and develop autonomous vehicles at different levels.