Automatic driving simulation test method capable of automatically generating scene

By automatically generating scenarios in the CARLA simulation platform, performing data processing and global optimization, the problems of single evaluation dimensions and high costs in autonomous driving testing are solved, realizing collaborative evaluation of safety and comfort and low-cost, high-efficiency testing.

CN121502276APending Publication Date: 2026-02-10SUN YAT SEN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511621422.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing autonomous driving testing systems have a single evaluation dimension, ignore comfort, and are costly and time-consuming for real-vehicle road testing, failing to meet the needs for coordinated safety and comfort assurance as well as low-cost and efficient testing.

Method used

A simulation testing method with automatic scenario generation is adopted. The initial scenario is loaded into the CARLA simulation platform, data is collected, cross-modal data processing is performed, comfort and safety indicators are calculated, fitness functions are constructed, and global optimization is performed using a genetic algorithm to generate efficient test results.

Benefits of technology

It achieves a synergistic assessment of safety and comfort, reduces testing costs by more than 98%, shortens the testing cycle by 92%, discovers potential scenarios that traditional testing overlooks, and improves user acceptance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502276A_ABST
    Figure CN121502276A_ABST
Patent Text Reader

Abstract

The invention provides an automatic driving simulation test method for scene automatic generation, and belongs to the technical field of automatic driving, and the method comprises the steps: loading a preset file to configure an executable initial scene set; collecting camera and LiDAR sensor data and vehicle state data on a CARLA simulation platform based on an unreal engine; after the data are preprocessed, a comfort index and a safety index are calculated; constructing a fitness function with hard constraint by using the index matrix, and realizing search by combining genetic algorithm global exploration and neighborhood disturbance local optimization; restarting the process from an unexplored area when continuous ten generations are not optimized and improved; and finally outputting a minimum uncomfortable triggering scene set, a high-risk safety violation scene set and a reproducible experiment package containing scene files, parameters and the like. According to the invention, 'safety-comfort 'two-dimensional evaluation is realized, the test cost is greatly reduced, the evaluation comprehensiveness and reliability are improved, and key test support is provided for landing of automatic driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and in particular to an autonomous driving simulation testing method that automatically generates scenarios. Background Technology

[0002] With the rapid development of vehicle-to-everything (V2X) and artificial intelligence technologies, autonomous driving systems are gradually moving from the technology research and development stage to commercialization, and are expected to become one of the core modes of urban transportation in the future. For autonomous driving systems, performance evaluation is a key factor in determining whether the technology can be implemented. On the one hand, safety is the core bottom line of autonomous driving systems, and testing is needed to ensure that the system can effectively avoid collisions and maintain lane keeping. On the other hand, user comfort directly affects the public's acceptance and recognition of autonomous vehicles. If a vehicle has problems such as start-up shocks, sudden acceleration and braking, and abrupt steering, even if the safety standards are met, it will be difficult to achieve large-scale popularization.

[0003] Currently, existing autonomous driving testing systems have two major flaws: I. Single evaluation dimension: Most testing schemes only consider safety as the sole or core evaluation indicator, verifying safety-related performance such as "whether a collision occurs" and "whether lane departure occurs" through real-vehicle road tests or simple simulations, completely ignoring comfort, a key user experience indicator. For example, some simulation testing platforms only simulate safety parameters such as "distance between the vehicle and obstacles" and "lane keeping accuracy," without quantitatively evaluating parameters that affect comfort, such as acceleration jerk and speed fluctuations. This results in many potentially harmful scenarios that are "safe but uncomfortable" being overlooked, failing to fully reflect the actual performance of the autonomous driving system.

[0004] II. High testing costs and long testing cycles: Traditional autonomous driving testing heavily relies on real-vehicle road testing, requiring a large number of test vehicles, professional drivers, and test sites (such as closed test tracks and open roads). To cover different weather conditions (rain, fog), traffic flow (peak and off-peak), and road types (urban roads, highways), the testing cycle often lasts for months or even years, resulting in extremely high hardware, manpower, and time costs. Although some solutions have introduced simulation testing technologies (such as simulation platforms based on simple physics engines), the lack of scenario parameterization and automated search still necessitates manual scenario design and repeated testing, failing to effectively reduce testing costs and timelines.

[0005] In summary, existing technologies cannot meet the requirements of "coordinated assurance of safety and comfort" and "low-cost and efficient testing" for autonomous driving systems, thus hindering the commercialization of autonomous driving technology.

[0006] Therefore, there is an urgent need for a simulation-based, efficient, and low-cost evaluation method for autonomous driving systems that can simultaneously assess safety and comfort. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides an autonomous driving simulation testing method that automatically generates scenarios. This invention conducts a comprehensive evaluation of the autonomous driving system, including comfort and safety, while reducing testing costs and shortening the testing cycle based on a simulation platform and automated optimization technology.

[0008] The technical solution of the present invention is: an autonomous driving simulation test method with automatic scene generation, comprising the following steps: S1) Load the preset initial scene description file, configure multiple specific autonomous driving scenarios in the system, and obtain an executable initial scene set. The initial scene set serves as the baseline carrier and search starting point for subsequent parameterization and perturbation. S2) Run the scenes in the initial scene set in the CARLA simulation platform based on Unreal Engine, collect the raw data and corresponding timestamps of the camera and LiDAR sensor, as well as vehicle status data, to form a closed-loop data source for evaluation. S3) Perform cross-modal data alignment, filtering, and adaptive resampling on the sensor data and vehicle status data in the closed-loop data source to obtain preprocessed data; S4) Calculate comfort and safety indices based on the preprocessed data; output the comfort and safety indices as an index matrix in a unified format, and use the index matrix as the optimization target input; S5) Using the index matrix as input, construct a single-objective constrained fitness function, wherein the optimization objective of the fitness function is to minimize the function. ; ; In the formula, Indicates fitness; , These are the weights for safety indicators and comfort indicators, respectively. , These are the scores for safety and comfort indicators, respectively. The penalty coefficient is defined as follows: the penalty corresponds to a hard constraint condition, which is that the cumulative time of collision or lane departure during the scene operation is >5 seconds. S6) A genetic algorithm is used to globally explore the fitness function, and the next generation parameters are generated through selection, crossover, and mutation operations. S7) Perform neighborhood perturbation and intensive sampling on high-potential individuals whose fitness is greater than the preset fitness threshold or who are "near triggers", and output the fitness value and candidate parameter set of each individual; S8) Stagnation detection is performed based on the information diversity based on Shannon entropy and the population distribution balance based on clustering; when the fitness of individuals has not improved for ten consecutive generations, a differentiated starting point is extracted from the unexplored scene parameter region, and the optimization search process of steps S5)-S7) is restarted. S8) Based on the accumulated scenario data and indicator database, output the minimum discomfort trigger scenario set, the high-risk safety violation scenario set, and the reproducible experimental package.

[0009] Preferably, in step S1), loading the preset initial scene description file includes performing syntax and resource checks on the scene description file and loading map and traffic participant configurations to ensure that the configured scene can be directly executed in the CARLA simulation platform.

[0010] Preferably, in step S1), the vehicle status data includes vehicle speed, acceleration, steering angle, and the vehicle's current lane position; the acquisition frequency of the closed-loop data source is consistent with the sensor sampling frequency, wherein the camera sampling frame rate is 30fps and the LiDAR sampling frame rate is 10Hz.

[0011] Preferably, in step S3), the filtering process uses the Kalman filtering algorithm to eliminate noise in the original sensor data; The resampling process uses linear interpolation to unify the sampling frequency of sensor data and vehicle status data to 20Hz.

[0012] Preferably, in step S4), the comfort index includes start-up smoothness, acceleration change rate (jerk), speed variance, sharp turn detection result, and emergency braking detection result, and the safety index includes collision detection result and road departure detection result.

[0013] Preferably, in step S5), the optimization search follows the hard constraint priority principle: when the scenario operation meets the hard constraint conditions, the penalty term is enabled; when the hard constraint conditions are not met, the penalty term is set to 0.

[0014] Preferably, in step S6), the genetic algorithm parameters are: population size 60–120, crossover probability 0.7–0.9, mutation probability 0.05–0.2, and elite ratio 5%–10%.

[0015] Preferably, in step S7), the neighborhood disturbance radius is 5%–15% of the scene parameter range. For sensitive parameters such as entry timing and relative speed, the neighborhood disturbance radius is increased to 15%–20% of the scene parameter value range.

[0016] Preferably, in step S8), the criterion for stagnation detection further includes: the population diversity index is lower than the preset diversity threshold; during the restart process, the selection of the differentiated starting point is based on: maximizing the minimum distance between the starting point and the historical optimized sample, ensuring that the starting point is located in the uncovered scene parameter area.

[0017] Preferably, in step S9), the result output also includes: generating a "safety-comfort" boundary curve, wherein the boundary curve uses the safety index score as the horizontal axis and the comfort index score as the vertical axis to mark the distribution of different scenarios in a two-dimensional coordinate system; and generating a sensitive parameter contribution analysis report, wherein the report includes the influence weight of each scenario parameter on the comfort and safety index.

[0018] Preferably, in step S9), the reproducible experimental package includes scene files, scene parameters, random seeds, and playback scripts, and generates scene playback resources and a test report; the test report includes scene parameter details, index calculation process data, and optimization search process curves.

[0019] The beneficial effects of this invention are as follows: 1. This invention synergistically quantifies comfort indicators (starting smoothness, jerk, etc.) with safety indicators, effectively identifying "safe but uncomfortable" hidden danger scenarios missed by traditional single-indicator testing. The evaluation results are more in line with the actual user experience, improving the acceptance of autonomous vehicles. At the same time, by combining parameterized scenarios and automated search, testing costs are reduced, with single-scenario testing costs reduced by more than 98%, and the testing cycle for 100 scenarios shortened from 90 days to less than 7 days, solving the pain points of high cost and long cycle of real vehicle testing. 2. This invention constructs a fitness function and sets "collision" and "lane departure exceeding 5 seconds" as hard constraints, prioritizing safety while balancing comfort. 3. This invention uses a genetic algorithm to explore the global scene, and combines high-potential individual neighborhood perturbation (sensitive parameter amplification perturbation) to achieve local fine search, thereby improving optimization efficiency, avoiding local optima, ensuring the comprehensiveness of scene coverage, and improving the reliability of evaluation results. 4. This invention determines stagnation based on fitness curves and diversity metrics, and selects a new starting point by maximizing the distance from historical samples, thus ensuring comprehensive scene coverage; 5. The output of this invention includes scene files, parameters, random seeds, and playback scripts, which can be directly repeated in the CARLA platform to ensure that the test process is repeatable and provide support for subsequent optimization. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation

[0021] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings: like Figure 1 As shown in the figure, this embodiment provides an autonomous driving simulation test method with automatic scene generation, including the following steps: S1) Initialize scene configuration Load the preset initial scenario description file for "Right Turn to Pedestrian Avoidance on Urban Roads", and perform syntax verification (confirming no missing tags or incorrect parameter formats) and resource verification (confirming that the Town05 map, pedestrian model, and traffic light model can be called normally); load Town05 map data (including urban intersections, zebra crossings, and pedestrian crossings) and traffic participant configuration data (2 social vehicles, 3 pedestrians, pedestrian crossing speed 1.2m / s), configure multiple specific autonomous driving scenarios in the system, and obtain an executable initial scenario set. The initial scenario set serves as the baseline carrier and search starting point for subsequent parameterization and perturbation. S2), Data Acquisition The initial scene set is run in the CARLA simulation platform based on Unreal Engine, and the raw data and corresponding timestamps of the camera and LiDAR sensor, as well as vehicle status data, are collected to form a closed-loop data source for evaluation. The camera captures images of the intersection; the LiDAR sensor captures point clouds of the surrounding environment. Vehicle status data: vehicle speed (0-60km / h), longitudinal acceleration (-3-3m / s²), steering angle (-45°-45°), lane position, sampling frequency 20Hz, continuous collection for 300s, forming closed-loop data; S3), Data Preprocessing The sensor data and vehicle status data in the closed-loop data source are subjected to cross-modal data alignment, filtering, and an adaptive resampling method to obtain preprocessed data; Among them, Kalman filtering is used to eliminate LiDAR point cloud noise, and linear interpolation is used to synchronize sensor and vehicle status data, and resample to 20Hz.

[0022] S4) Indicator Calculation Comfort and safety indices are calculated based on the preprocessed data; the comfort and safety indices are output as an index matrix in a unified format, and the index matrix is ​​used as the optimization target input; Among them, the starting smoothness (acceleration fluctuation range 0.3m / s²), jerk (0.8m / s³), speed variance (2.5km / h²), number of sharp turns (1 time), number of emergency braking (0 times), and safety indicators are the number of collisions (0 times) and the cumulative time of lane departure (1.2s). Indicator matrix construction: The above indicators are mapped to the [0,1] interval through min-max normalization, and the indicator matrix is ​​output (Scene ID: City_TurnRight_01; Comfort index: [0.2,0.3,0.25,0.1,0]; Safety index: [0,0.12]).

[0023] S5) Using the index matrix as input, construct a single-objective constrained fitness function, wherein the optimization objective of the fitness function is to minimize the function. ; ; In the formula, Indicates fitness; , These are the weights for safety indicators and comfort indicators, respectively. , These are the scores for safety and comfort indicators, respectively. The penalty coefficient is defined as follows: the penalty corresponds to a hard constraint condition, which is that the cumulative time of collision or lane departure during the scene operation is >5 seconds. In this embodiment, let , ; Without hard constraints triggering, the penalty term = 0, and the calculation yields... ; S6) A genetic algorithm is used to globally explore the fitness function, and the next generation parameters are generated through selection, crossover, and mutation operations. The genetic algorithm parameters were set as follows: population size 80, crossover probability 0.8, mutation probability 0.1, and elite ratio 8%. S7) Perform neighborhood perturbation and intensive sampling on high-potential individuals whose fitness is greater than the preset fitness threshold or who are "near triggers", and output the fitness value and candidate parameter set of each individual; In this embodiment, the neighborhood perturbation (radius 10%) is applied to the top 20% of high-potential individuals in terms of fitness, and the perturbation of the sensitive parameter "pedestrian crossing timing" is amplified to 15%. After dense sampling, the candidate parameter set is output.

[0024] S8) Stagnation detection is performed based on the information diversity based on Shannon entropy and the population distribution balance based on clustering; when the fitness of individuals has not improved for ten consecutive generations, a differentiated starting point is extracted from the unexplored scene parameter region, and the optimization search process of steps S5)-S7) is restarted. This embodiment iterates for 15 generations. The average fitness improvement from generation 8 to 17 is less than 0.5%, which is considered a stagnation. The minimum distance between the candidate starting point and the historical samples is calculated, and "pedestrian crossing speed of 1.5m / s" is selected as the new starting point to restart optimization.

[0025] S8) Based on the accumulated scenario data and indicator database, output the minimum discomfort trigger scenario set, the high-risk safety violation scenario set, and the reproducible experimental package; This embodiment outputs a minimum set of uncomfortable triggering scenarios (e.g., when pedestrians cross the street at a speed of 2 m / s, jerk exceeds 0.9 m / s³), a set of high-risk safety violation scenarios (e.g., when pedestrians cross the street at a speed of 3 m / s, there is 1 collision), and a reproducible experimental package (including scenario files, parameters, random seeds 12345, and the replay script run_simulation.py). It also generates a "safety-comfort" boundary curve and a sensitive parameter analysis report (the impact of pedestrian crossing speed on safety is weighted at 60%).

[0026] Meanwhile, the evaluation results of the testing costs and cycles of traditional real-vehicle testing and the method of this invention, as well as the evaluation results of traditional single-index testing and the dual-index testing of this invention, are shown in Table 1: As shown in the table above, the method of the present invention reduces the cost by 98.4% and shortens the cycle by 92.2% compared with traditional real vehicle testing. It can also discover hidden danger scenarios that are "safe but uncomfortable" and significantly improves the accuracy of user acceptance prediction, which fully verifies the beneficial effects of the present invention.

[0027] The embodiments and descriptions above are merely illustrative of the principles and preferred embodiments of the present invention. Various changes and modifications may be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed.

Claims

1. A method for automatically generating autonomous driving simulation tests, characterized in that, Includes the following steps: S1) Load the preset initial scene description file, configure multiple specific autonomous driving scenarios in the system, and obtain an executable initial scene set. The initial scene set serves as the baseline carrier and search starting point for subsequent parameterization and perturbation. S2) Run the scenes in the initial scene set in the CARLA simulation platform based on Unreal Engine, collect the raw data and corresponding timestamps of the camera and LiDAR sensor, as well as vehicle status data, to form a closed-loop data source for evaluation. S3) Perform cross-modal data alignment, filtering, and adaptive resampling on the sensor data and vehicle status data in the closed-loop data source to obtain preprocessed data. S4) Calculate comfort and safety indices based on the preprocessed data; The comfort and safety indicators are output as an indicator matrix in a unified format; S5) Using the index matrix as input, construct a single-objective constrained fitness function, wherein the optimization objective of the fitness function is to minimize the fitness. ; ; In the formula, Indicates fitness; , These are the weights for safety indicators and comfort indicators, respectively. , These are the scores for safety and comfort indicators, respectively. The penalty coefficient is defined as follows: the penalty corresponds to a hard constraint condition, which is that the cumulative time of collision or lane departure during the scene operation is >5 seconds. S6) A genetic algorithm is used to globally explore the fitness function, and the next generation parameters are generated through selection, crossover, and mutation operations. S7) Perform neighborhood perturbation and intensive sampling on high-potential individuals with fitness greater than the fitness preset threshold or "near trigger", and output the fitness value and candidate parameter set of each individual; S8) Stagnation detection is performed based on information diversity based on Shannon entropy and population distribution balance based on clustering. When the fitness of individuals does not improve for ten consecutive generations, extract the differentiated starting point from the unexplored scene parameter region and restart the optimization search process in steps S5)-S7). S8) Based on the accumulated scenario data and indicator database, output the minimum discomfort trigger scenario set, the high-risk safety violation scenario set, and the reproducible experimental package.

2. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S1), loading the preset initial scene description file includes performing syntax and resource verification on the scene description file and loading map and traffic participant configuration to ensure that the configured scene can be directly executed in the CARLA simulation platform.

3. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S1), the vehicle status data includes vehicle speed, acceleration, steering angle, and the vehicle's current lane position; the acquisition frequency of the closed-loop data source is consistent with the sensor sampling frequency, wherein the camera sampling frame rate is 30fps and the LiDAR sampling frame rate is 10Hz.

4. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S3), the filtering process uses the Kalman filtering algorithm to eliminate noise in the original sensor data; The resampling process uses linear interpolation to unify the sampling frequency of sensor data and vehicle status data to 20Hz.

5. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S4), the comfort index includes starting smoothness, acceleration change rate jerk, speed variance, sharp turn detection result, and emergency braking detection result; the safety index includes collision detection result and road departure detection result.

6. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S5), the optimization search follows the hard constraint priority principle: when the scenario operation meets the hard constraint conditions, the penalty term is enabled; when the hard constraint conditions are not met, the penalty term is set to 0.

7. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S6), the genetic algorithm parameters are: population size 60–120, crossover probability 0.7–0.9, mutation probability 0.05–0.2, and elite ratio 5%–10%.

8. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S7), the neighborhood disturbance radius is 5%–15% of the scene parameter range. For sensitive parameters such as entry timing and relative speed, the neighborhood disturbance radius is increased to 15%–20% of the scene parameter value range.

9. The autonomous driving simulation test method with automatic scene generation according to claim 1, characterized in that: In step S8), the criteria for stagnation detection also include: the population diversity index is lower than the preset diversity threshold; during the restart process, the selection of the differentiated starting point is based on: maximizing the minimum distance between the starting point and the historical optimized sample to ensure that the starting point is located in the uncovered scene parameter area.

10. The autonomous driving simulation test method for automatic scene generation according to claim 1, characterized in that: In step S9), the output also includes: generating a "safety-comfort" boundary curve, wherein the boundary curve uses the safety index score as the horizontal axis and the comfort index score as the vertical axis to mark the distribution of different scenarios in a two-dimensional coordinate system; and generating a sensitive parameter contribution analysis report, wherein the report includes the influence weight of each scenario parameter on the comfort and safety index.