CN-116880235-B - Automatic driving safety critical scene generation method based on accident data driving
Abstract
The invention belongs to the field of automatic driving testing, relates to a scene technology for generating violations of an automatic driving system, and particularly relates to an automatic driving safety critical scene generating method based on accident data driving. The method is based on accident scenes in the real world, possible dangerous factors causing the violation of an automatic driving system in the scenes are mined, the scene generation problem is modeled to be an optimal solution problem, and a genetic algorithm is used as a solving algorithm, so that safety critical scenes are generated efficiently. The method can be used for generating safety scenes which have higher value but are difficult to discover so as to improve the testing efficiency and detect defects of an automatic driving system.
Inventors
- JIANG HE
- WANG JINGBO
- REN ZHILEI
- ZHOU ZHIDE
- ZOU PEIYU
- WANG HAIBO
Assignees
- 大连理工大学
Dates
- Publication Date
- 20260508
- Application Date
- 20230628
Claims (1)
- 1. The automatic driving safety critical scene generation method based on accident data driving is characterized by comprising the following specific steps: the method comprises the steps of 1, initializing a scene set, wherein the scene set is a set of a series of simulation scene files, the initialization of the scene set refers to selecting a batch of scene files to form the scene set, the scene set O comprises dangerous scenes and conventional scenes, the dangerous scenes refer to traffic accident scenes, the scenes are extracted from real-world traffic accidents and stored in a dangerous scene library component, and a batch of scenes are randomly selected from the component to serve as dangerous scenes of the scene set; Step 2, collecting scene key information, wherein the key information comprises acceleration of a host vehicle at each moment and a distance from an NPC vehicle nearest to the host vehicle in a scene execution process, the host vehicle is a vehicle controlled by an unmanned system in a test scene, the behavior of the host vehicle is controlled by a decision module in the unmanned system, the NPC vehicles are vehicles defined in a scene file, the behaviors of the NPC vehicles are specified by the scene file, the automatic driving simulation simulator is used for running the collected scene, a time step T 0 is set, scene information is collected once every T 0 , the total time step number of scene execution is T, and T represents the T time step ending moment of scene execution; The acceleration reflects the running state of the vehicle, the larger the acceleration is, the more likely an emergency situation is met, therefore, the acceleration of the main vehicle in the running process needs to be counted, a t represents the acceleration of the main vehicle at the time t, v t represents the speed of the main vehicle at the time t, v t is obtained from an interface provided by a simulator, and the acceleration a t is calculated by using a formula (1): a t =(v t -v t-1 )/t 0 (1) The closer the distance is, the greater the probability of collision is, the higher the risk degree is, and when the distance is equal to 0, the collision of the vehicle is indicated, so that the distance between the main vehicle and the nearest NPC vehicle in the running process is required to be counted; Represents the lateral distance of the NPC vehicle nearest to the host vehicle at time t, The longitudinal distance of the NPC vehicle closest to the main vehicle at the moment t is represented, and the distance information can be obtained through an interface provided by the simulator; Step 3, constructing a risk assessment function, wherein the scene risk theta o is the quantification of the possibility of collision between the host vehicle and the NPC vehicle in the scene, and the specific numerical value is used for representing the risk of the scene, so that the scene is conveniently assessed, wherein the higher the scene risk is, the greater the possibility of collision between the host vehicle and the NPC vehicle is, and the risk is calculated by using the information collected in the step 2; Firstly, calculating the danger degree theta t l reflected by the distance And Calculating Euclidean distance l t between a host vehicle and the nearest NPC vehicle at the moment t, if l t =0, indicating that the host vehicle collides with the NPC vehicle in the scene, directly adding the scene into a result set and removing the scene from the scene set, if l t >0, continuously calculating the distance-reflected risk degree, wherein the risk degree increases along with the reduction of the distance, but the two are not in a simple linear relationship, calculating the distance-reflected risk degree by using a nonlinear function, and the calculation formulas of l t and theta t l are as follows: The risk degree θ t a reflected by the acceleration increases with the increase of the acceleration, and is also in a nonlinear relation, and the calculation formula of θ t a is as follows: the danger degree theta t of the scene at the time t is calculated by combining the danger degree reflected by the distance at the current time and the danger degree reflected by the acceleration, and because the distance of the nearest NPC vehicle and the danger degree reflected by the acceleration of the main vehicle are different, different weights r 1 and r 2 are respectively taken when the distance of the nearest NPC vehicle and the danger degree reflected by the acceleration of the main vehicle are summed, and r 1 +r 2 =1 exists, so that the calculation formula of the danger degree of the scene at the time t is as follows: θ t =r 1 θ t l +r 2 θ t a (5) The risk of the scene depends on the maximum value of the risk at all times in the whole scene execution process, and the calculation formula of the risk of the scene theta o is as follows: θ o =maxθ t ,0<t≤T (6) And 4, executing a search algorithm, converting a safety critical scene generation problem into a search optimal solution problem by using the proximity degree of the risk quantization scene and the safety critical scene, and using a genetic algorithm as the search algorithm, wherein the specific steps are as follows: initializing a parent population P (0), and using the scene set obtained in the step 1 as the parent population; constructing an fitness function by using the risk assessment function defined in the step 3; generating new individuals by performing crossover and mutation operations on existing individuals in the population; The method comprises the steps of generating a random number, determining whether to execute cross operation according to the size of the random number so as to control the cross execution probability to be P c , randomly selecting an NPC vehicle from two scenes in the population, marking the action sequences of the NPC vehicle as M x and M y , and exchanging M x and M y so as to generate a new scene, namely the new individual; In the genetic algorithm, the mutation is an operation of modifying a gene on a chromosome, the probability of the mutation being performed is far smaller than the probability of the cross-performed, the gene is an operation of modifying an operation of a certain moment on an NPC behavior sequence, the probability of the mutation being P m , the mode of modifying the NPC operation comprises replacement and insertion, the replacement comprises selecting an operation from an action library component to replace the NPC operation, the insertion comprises selecting an operation from the action library component to be inserted into the NPC operation sequence, the action library is a component, wherein the operation which possibly occurs in a vehicle in a simulation scene is defined, including acceleration, deceleration, following and lane changing, the specific process of the mutation is that firstly, the probability of the mutation being performed is controlled by using the same method as that in the cross-over, the operation of the mutation is selected randomly from a population, the moment t is selected by using a random number method, and the operation of the NPC vehicle is recorded as the operation of the NPC in the scene is selected randomly By inserting or replacing Modifying to generate a new scene, namely a new individual; combining the new individuals obtained in the previous step with the original population to obtain a temporary population; e, calculating fitness score, namely, using a simulator to run scenes in the temporary population one by one, and if a main car collides with NPC in the scenes when the scenes are run, indicating that a safety scene is found, adding the scenes into a result set and removing the scenes from the temporary scene set; Aiming at a temporary population containing new individuals and individuals of the original population, screening out partial individuals to form the new generation population by using a roulette algorithm; Judging a termination condition, namely stopping the search algorithm if the current population algebra K is equal to the preset maximum population algebra K or the number of scenes in the result set reaches a preset amount C, otherwise, repeatedly executing the steps C-f until the termination condition is met, wherein the sizes of K and C can be set according to actual requirements; and step 5, reporting the safety critical scenes, returning the scenes in the result set as the result, and terminating the algorithm.
Description
Automatic driving safety critical scene generation method based on accident data driving Technical Field The invention belongs to the field of automatic driving testing, relates to a scene technology for generating violations of an automatic driving system, and particularly relates to an automatic driving safety critical scene generating method based on accident data driving. Background In recent years, with the development of artificial intelligence technology, the automatic driving technology has also made breakthrough progress. To ensure the safety and reliability of an autopilot vehicle, an autopilot system needs to be fully tested. Currently, autopilot simulation testing has become an important technique for ensuring the safety and reliability of autopilot systems. The automatic driving simulation test is to model a scene and realize test verification of an automatic driving system through software simulation. Through the automatic test of tens of thousands of automatic driving scenes, the test cost is reduced while the test efficiency is improved, and the problem that scenes are difficult to reproduce and dangerous scenes are difficult to test in real world test is solved. However, the quality of the autopilot simulation test is greatly dependent on the test scenario, the higher the scenario coverage, the more likely it is to detect defects in the autopilot system. For this reason, many countries and enterprises have established scene libraries for automated simulated driving, which contain a large number of test scenes. However, most scenes in the scene library cannot find problems existing in the automatic driving system, and only a few scenes can cause the automatic driving system to be violated, and the scenes causing the automatic driving violation are called safety scenes. The related invention patent of the prior scene generation technology focuses on the quantity and efficiency of scene generation, and lacks research on generating safety critical scenes. For example, the patent autopilot scene generation method (patent application number: CN 202210296383.6) obtains a new scene by extracting key parameters of the scene and then generalizing the parameters. Although a batch of new scenes can be obtained quickly through the generalization parameters, the further processing of the generalized scenes is not performed, so that the quality of the new scenes is difficult to guarantee. In addition, most of the existing methods generalize to obtain new scenes based on scenes obtained by random sampling, and the randomly sampled scenes may be far from safety critical, so that the generated scenes are difficult to find defects of an automatic driving system. For example, the patent autopilot scene generation method, apparatus and system (patent application number: CN 202010711287.4) uses the real vehicle sampled scene to generate a new scene, ignoring the important role of the accident scene in scene generation. The basic scene is quite complete at present. However, the safety critical scene is the key for further finding the defects of the automatic driving system, so that a technology specially used for efficiently generating the safety critical scene is needed to be proposed. The scene of traffic accidents in human-driven vehicles in the real world is likely to cause accidents in automatic driving, which provides a data basis for generating safe and critical scenes. Disclosure of Invention In order to solve the problems, the invention provides an automatic driving safety critical scene generating method based on accident data driving. The method has two keys, namely, firstly, the accident scene in the real world is taken as a basis, possible dangerous factors causing the violation of the automatic driving system in the scene are mined, and secondly, the scene generation problem is modeled as an optimal solution problem, and a genetic algorithm is used as a solution algorithm, so that the safety critical scene is generated efficiently. The method can be used for generating safety scenes which have higher value but are difficult to discover so as to improve the testing efficiency and detect defects of an automatic driving system. The technical scheme of the invention is as follows: An automatic driving safety critical scene generating method based on accident data driving comprises the following specific steps: And 1, initializing a scene set. The scene set is a set of a series of simulation scene files, and the initialization of the scene set refers to selecting a batch of scene files to form the scene set. In the invention, the scene set O needs to contain dangerous scenes and conventional scenes. The dangerous scenes refer to traffic accident scenes, wherein the scenes are extracted from real-world traffic accidents and stored in a dangerous scene library component of the invention, and a batch of scenes are randomly selected from the component to serve as dangerous scenes of a scene set. The conventi