Traffic simulation system, method and device
By introducing vehicle vision model, trajectory prediction model, trajectory planning model and vehicle control model in the traffic simulation system, the problem that existing traffic simulation technologies cannot capture micro-driving behavior is solved, achieving higher simulation accuracy and better restoration of real driving behavior.
Patent Information
- Application Number
- CN202411468709.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-10-21
AI Technical Summary
The existing traffic simulation technology cannot truly reflect the driver's micro-action and decision-making process during driving, and it is difficult to capture the micro-driving behavior, resulting in poor accuracy in simulation.
A traffic simulation system is provided, including a vehicle vision model, a trajectory prediction model, a trajectory planning model and a vehicle control model. Through these models, the historical environment information of the target vehicle is obtained and processed, the future trajectory probability distribution information is generated, the simulation reference path is determined, and the vehicle driving status is controlled based on this.
Through simulation of driver decisions, the target vehicle can change its driving strategy at any time during driving, avoid accidents in front of the vehicle and obstacles, improve the accuracy of traffic simulation and better restore the real physical world.
Smart Images

Figure CN119004858B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic engineering, and specifically to a traffic simulation system, method and equipment. Background Art
[0002] Traffic simulation is a traffic analysis method that uses computer digital models to reflect complex traffic phenomena. It is an important experimental means and tool in the field of traffic engineering to reproduce the operation rules of traffic flow and manage, control and optimize the traffic system. However, the existing traffic simulation technology cannot truly reflect the driver's micro-actions and decision-making process during driving, and it is difficult to capture micro-driving behaviors, resulting in poor accuracy in simulation. Summary of the invention
[0003] In view of this, the embodiments of the present application hope to provide a traffic simulation system, method and device to at least solve the above-mentioned technical problems.
[0004] To achieve the above purpose, the technical solution of this application is implemented as follows:
[0005] According to one aspect of an embodiment of the present application, a traffic simulation system is provided, the system comprising:
[0006] A vehicle field of view model, used to obtain historical environmental information within the field of view of a target vehicle in a traffic simulation scenario, wherein the historical environmental information at least represents the position and speed of the target vehicle and surrounding vehicles;
[0007] A trajectory prediction model is used to perform feature fusion processing on the historical environmental information to obtain multiple vector features of the target vehicle, each of which represents an influencing factor of the surrounding vehicles on the driving of the target vehicle, and to generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the multiple vector features;
[0008] A trajectory planning model, used to determine a simulated reference path of the target vehicle based on the future trajectory probability distribution information, wherein the simulated reference path represents driver decision information for the target vehicle, and the driver decision information is used to indicate a simulated driving behavior for the target vehicle;
[0009] The vehicle control model is used to control the vehicle driving state corresponding to the target vehicle at the next simulation moment based on the driver decision information.
[0010] In the above solution, the trajectory prediction model includes:
[0011] A first calculation module is used to determine an obstacle vehicle among the surrounding vehicles whose first distance from the target vehicle is less than a preset distance based on the first position information and the second position information in the historical environment information; and generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle based on the obstacle vehicle and the first distance less than the preset distance; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the interaction convenience and accessibility between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an impact on the target vehicle on the target vehicle;
[0012] A second calculation module is used to determine the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; determine the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information at least includes the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles;
[0013] A probability generation module is used to generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the degree centrality, the closeness centrality, the eigenvector centrality and the attention weight.
[0014] In the above scheme, the trajectory planning model includes:
[0015] A trajectory decision module, used for determining a reference trajectory based on a random function and the future trajectory probability distribution information;
[0016] A starting point determination module, configured to determine the current position point of the target vehicle as the lane change starting point if the reference trajectory represents a lane change decision and it is determined that the current lane of the target vehicle meets the safe lane change condition;
[0017] The trajectory generation module is used to generate a simulated reference path of the target vehicle based on the reference trajectory and the corresponding reference speed.
[0018] In the above solution, the starting point determination module further includes:
[0019] A judgment unit, configured to compare the maximum lateral acceleration of the target vehicle with a preset threshold value, and if the comparison result indicates that the maximum lateral acceleration is less than the preset threshold value, determine that the current lane of the target vehicle meets the safe lane change condition;
[0020] and\or an adjustment unit, configured to obtain vehicle size information of an obstacle vehicle among the surrounding vehicles that affects the driving of the target vehicle, and adjust the vehicle size information to obtain a safe lane change area for the target vehicle, wherein the safe lane change area indicates that the current lane of the target vehicle satisfies a safe lane change condition.
[0021] In the above solution, the adjustment unit is further used to adjust the current speed when the current speed of the target vehicle is less than or greater than the safe speed of the reference trajectory until the current speed is equal to the safe speed.
[0022] In the above scheme, the vehicle control model includes:
[0023] An updating module is used to adjust the mechanical performance parameters corresponding to the target vehicle at the current simulation moment based on the simulation reference path and the corresponding reference speed, so that the target vehicle at the next simulation moment corresponds to the vehicle driving state close to the vehicle reference state corresponding to the simulation reference path.
[0024] In the above scheme, the system also includes:
[0025] Road facility scene construction model is used to generate road simulation environment;
[0026] A dynamic traffic scene construction model is used to generate the traffic simulation scene including a mixed traffic flow of motor vehicles, non-motor vehicles and pedestrians in the road simulation environment;
[0027] An information visualization model, used to display the traffic simulation operation process and traffic simulation results corresponding to the traffic simulation scenario;
[0028] The data management model is used to store and manage the simulation data generated during the operation of the traffic simulation.
[0029] According to another aspect of the present application, a traffic simulation method is provided, the method comprising:
[0030] In a traffic simulation scenario, historical environmental information within the field of view of a target vehicle is obtained, wherein the historical environmental information at least represents the position and speed of the target vehicle and surrounding vehicles;
[0031] Performing feature fusion processing on the historical environmental information to obtain a plurality of vector features of the target vehicle, each of the vector features representing an influencing factor of the surrounding vehicles on the driving of the target vehicle;
[0032] Generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the plurality of vector features;
[0033] Determining a simulated reference path of the target vehicle based on the future trajectory probability distribution information, wherein the simulated reference path represents driver decision information for the target vehicle, and the driver decision information is used to indicate a simulated driving behavior for the target vehicle;
[0034] The vehicle driving state of the target vehicle at the next simulation moment is controlled based on the driver decision information.
[0035] In the above solution, the feature fusion processing of the historical environment information to obtain multiple vector features of the target vehicle includes:
[0036] Based on the first position information and the second position information in the historical environment information, determine the obstacle vehicles among the surrounding vehicles whose first distance to the target vehicle is less than the preset distance; based on the obstacle vehicle and the first distance less than the preset distance, generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the interaction convenience and accessibility between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an impact on the target vehicle on the target vehicle;
[0037] And\or, determining the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; determining the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information includes at least the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles.
[0038] According to a third aspect of the present application, a traffic simulation device is provided, the device comprising:
[0039] Memory for storing computer programs;
[0040] At least one processor is used to trigger the traffic simulation system to execute the above-mentioned traffic simulation method when running the computer program.
[0041] The traffic simulation system, method and device provided by the present application is a scheme for controlling the vehicle driving state of the target vehicle at the next simulation moment by simulating the driver's decision. Specifically, it obtains historical environmental information within the field of vision of the target vehicle in the traffic simulation scene through the vehicle field of vision model, and the historical environmental information at least represents the position and speed of the target vehicle and the surrounding vehicles; the historical environmental information is subjected to feature fusion processing through the trajectory prediction model to obtain multiple vector features of the target vehicle, each of which represents the influencing factors of the surrounding vehicles on the driving of the target vehicle, and the future trajectory probability distribution information of the target vehicle and the surrounding vehicles is generated based on the multiple vector features; the simulation reference path of the target vehicle is determined based on the future trajectory probability distribution information through the trajectory planning model, and the simulation reference path represents the driver's decision information for the target vehicle, and the driver's decision information is used to indicate the simulated driving behavior of the target vehicle; the vehicle driving state corresponding to the target vehicle at the next simulation moment is controlled by the vehicle control model based on the driver's decision information. In this way, by simulating the driver's decision-making, the target vehicle no longer strictly follows the designed route, but can change its driving strategy at any time during the driving process like humans, thereby enabling the target vehicle to avoid accident vehicles and obstacles in front during driving, rather than stopping when an obstacle is found and continuing to drive until the obstacle is removed. This improves the accuracy of traffic simulation and can better restore the real physical world. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the structure of the traffic simulation system in this application;
[0043] Figure 2 This is a flow chart of the traffic simulation method in this application;
[0044] Figure 3 This is a schematic diagram of the structural composition of the traffic simulation equipment under application. DETAILED DESCRIPTION
[0045] The technical solution of the present application is further elaborated in detail below in conjunction with the accompanying drawings and specific embodiments of the specification.
[0046] The various specific technical features in the various embodiments described in the specific implementation methods can be combined in various ways without contradiction. For example, different implementation methods can be formed by combining different specific technical features. In order to avoid unnecessary repetition, the various possible combinations of the specific technical features in this application will not be described separately.
[0047] It should be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order for the objects. It is understandable that the specific order or sequence of "first\second\third" can be interchanged where permitted. It should be understood that the objects distinguished by "first\second\third" can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0048] The traffic simulation system, method and device in the present application are a humanoid traffic simulation system, method and device. Figure 1 The schematic diagram of the structure of the traffic simulation system in this application is as follows: Figure 1 As shown, the traffic simulation system includes: a vehicle vision model 11, a trajectory prediction model 12, a trajectory planning model 13 and a vehicle control model 14, wherein the vehicle vision model 11 is used to obtain historical environmental information within the field of vision of the target vehicle in the traffic simulation scene, and the historical environmental information at least represents the position and speed of the target vehicle and the surrounding vehicles; the trajectory prediction model 12 is used to perform feature fusion processing on the historical environmental information to obtain multiple vector features of the target vehicle, wherein each of the vector features can represent an influencing factor of the surrounding vehicles on the driving of the target vehicle, and based on multiple vector features, the future trajectory probability distribution information of the target vehicle and the surrounding vehicles can be generated; the trajectory planning model 13 is used to determine the simulation reference path of the target vehicle based on the future trajectory probability distribution information, and the simulation reference path represents the driver decision information for the target vehicle. Here, the driver decision information is used to indicate the driver's simulated driving behavior of the target vehicle; the simulated driving behavior can be the operation behavior of the mechanical parts such as the throttle, brake, and steering wheel of the target vehicle. The vehicle control model 14 is used to control the vehicle driving state corresponding to the target vehicle at the next simulation moment based on the driver decision information. The vehicle driving state represents the coordinates, acceleration, speed and heading angle of the target vehicle.
[0049] In the present application, the vehicle vision model 11 can obtain historical environmental information within the field of vision of the target vehicle based on the preset parameters of the driver in the target vehicle. The preset parameters at least include the driver's farthest visual distance parameter, horizontal visual angle parameter, and pitch visual angle parameter; the historical environmental information can specifically refer to the position and / or speed of the target vehicle (also referred to as the vehicle), surrounding vehicles, pedestrians, static objects, etc., collected in the historical image frames.
[0050] In the present application, the trajectory prediction model 12 may include: a first calculation module 121, a second calculation module 122 and a probability generation module 123, wherein the first calculation module 121 is used to determine the obstacle vehicle among the surrounding vehicles whose first distance from the target vehicle is less than a preset distance based on the first position information and the second position information in the historical environment information; and is used to generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle based on the obstacle vehicle and the first distance less than the preset distance; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the interaction convenience and accessibility between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an influence on the target vehicle on the target vehicle.
[0051] Here, the trajectory prediction model 12 can be modeled using a multi-strategy decision framework and a dynamic geometric graph (DGG) approach:
[0052] Dynamic geometric graph at time t It can be expressed as:
[0053] ;
[0054] in, It refers to the vehicle set including the target vehicle and surrounding vehicles at time t (here each vehicle in the vehicle set can be regarded as a "vehicle node" in the "dynamic geometric graph" theory). Represents the i-th vehicle node at time t, which can be the target vehicle in the vehicle set. refers to the set of undirected edges at time t (each undirected edge in the “undirected edge set” can be understood as a line segment between two vehicle nodes without direction), It refers to the vehicle node at time t Undirected edges between surrounding vehicles and obstacle vehicles that may have an impact on them.
[0055] Here, if the vehicle node and The first distance d between them is less than the preset distance, indicating that the vehicle node and There are interactions:
[0056] ;
[0057] in, and are two vehicles in the vehicle node, where the vehicle node The target vehicle can be It can be any surrounding vehicle; is the node set after filtering the obstacle vehicles whose first distance to the target vehicle i is less than the preset distance among the surrounding vehicles at time t, is the first distance between the i-th vehicle and the j-th vehicle at time t, r is the preset distance, and the first distance Can be calculated from the vehicle coordinates:
[0058] ;
[0059] in, , Vehicle Node Horizontal and vertical coordinates.
[0060] Represents the direction angle between the i-th vehicle and the j-th vehicle at time t. According to the node set and the first distance Three new vector features can be generated: degree centrality, closeness centrality, and eigenvector centrality.
[0061] Among them, the degree centrality can be expressed as: ;
[0062] here, shows the degree centrality of the i-th vehicle (which can be understood as the target vehicle) at time t; represents the scale centrality of the i-th vehicle at time t-1;
[0063] The closeness centrality can be expressed as: ;
[0064] in, represents the proximity centrality of the i-th vehicle (which can be understood as the target vehicle) at time t; Indicates that the summation object is All .
[0065] The eigenvector centrality can be expressed as: ;
[0066] in, Represents the feature vector centrality characteristics of the i-th vehicle (which can be understood as the target vehicle) at time t; express For all V in , V is the eigenvalue of the eigenvector.
[0067] In the present application, the second calculation module 122 is used to determine the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; and to determine the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information at least includes the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles;
[0068] The probability generation module 123 is used to generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the degree centrality, the closeness centrality, the eigenvector centrality and the attention weight.
[0069] Here, the probability generation module 123 can input the processing results of the degree centrality, the closeness centrality, the eigenvector centrality and the attention weight through the Softmax activation function into the LSTM decoder for analysis and processing, and generate the future trajectory probability distribution information of the target vehicle and the surrounding vehicles, expressed as: P(Y|X), where X is the historical trajectory (coordinate set) of the target vehicle, and Y is the predicted future driving trajectory of the target vehicle.
[0070] In the present application, the second calculation module 122 can form a feature matrix X with data such as the current coordinates of the surrounding vehicles and / or the target vehicle, the historical coordinates within a given sampling time (i.e., the coordinates of the surrounding vehicles relative to the target vehicle, with the coordinate origin being the target vehicle), the direction of motion (i.e., the vector formed by the coordinates of the previous frame and the next frame divided by its own modulus), the speed (i.e., the coordinate change between the previous frame and the next frame divided by the frame rate), and the acceleration (i.e., the speed change between the previous frame and the next frame divided by the frame rate). (For example, the dimension is , where N is the number of vehicles around the target vehicle and F is the number of features of each vehicle), then each row in the feature matrix X (i.e., the features of each vehicle) is linearly transformed, and each feature in the feature matrix X is mapped using the weight matrix to obtain the query vector Q and the key vector K:
[0071] Q=XW q
[0072] K=XW k
[0073] Where X is the feature matrix, W q is the weight matrix of the query vector, W k is the weight matrix of the key vector.
[0074] here, W q and W kIt is obtained through training and learning of neural networks. Since neural networks are conventional technologies, we will not discuss the effects of neural networks on W q and W k The training process is described in detail.
[0075] In this application, the attention weight score is obtained by the dot product of the query vector Q and the key vector K:
[0076] ;
[0077] in, is the attention weight score, and T is the transposition operator symbol.
[0078] Then, the attention weight score is calculated using the softmax function activation to enhance training efficiency.
[0079] ;
[0080] in, is the dimension of the key vector.
[0081] In the present application, the trajectory planning model 13 may include: a trajectory decision module 131, a starting point determination module 132 and a trajectory generation module 133, wherein the trajectory decision module 131 is used to determine a reference trajectory based on a random function and the future trajectory probability distribution information.
[0082] For example, the future trajectory probability distribution information indicates that the probability of the target vehicle changing lanes to the left is 25%, the probability of not changing lanes is 25%, and the probability of changing lanes to the right is 50%. A random function of 0-1 is obtained through the rand function in the computer. If the random function is between 0-0.25, the trajectory decision module 131 uses the left lane change trajectory in the future trajectory probability distribution information as a reference trajectory; if the random function is between 0.25-0.5, the trajectory decision module 131 uses the lane change trajectory in the future trajectory probability distribution information as a reference trajectory; if the random function is between 0.5-1, the trajectory decision module 131 uses the right lane change trajectory in the future trajectory probability distribution information as a reference trajectory.
[0083] The starting point determination module 132 is used to determine the current position point of the target vehicle as the lane change starting point if the reference trajectory represents a lane change decision (including left lane change and right lane change) and the current lane of the target vehicle meets the safe lane change conditions; the trajectory generation module 133 is used to generate a simulated reference path for the target vehicle with the lane change starting point based on the reference trajectory and the corresponding reference speed.
[0084] Here, the starting point determination module 132 may also include: a judgment unit 1321 and an adjustment unit 1322; wherein the judgment unit 1321 is used to compare the maximum lateral acceleration of the target vehicle with a preset threshold, and if the comparison result indicates that the maximum lateral acceleration is less than the preset threshold, it is determined that the current lane of the target vehicle meets the safe lane change condition; and\or the adjustment unit 1322 is used to obtain vehicle size information of obstacle vehicles among the surrounding vehicles that affect the driving of the target vehicle, and adjust the vehicle size information to obtain a safe lane change area for the target vehicle, wherein the safe lane change area indicates that the current lane of the target vehicle meets the safe lane change condition.
[0085] For example, the reference trajectory determined by the trajectory decision module 131 is a left lane change trajectory. By obtaining the maximum lateral acceleration f of the target vehicle, the judgment unit 1321 compares the maximum lateral acceleration f with the preset threshold r. If the comparison result indicates that f is greater than the preset threshold r (here 1.4 m / s2), the current driving speed of the target vehicle can be adjusted by the adjustment unit 1322 so that the maximum lateral acceleration f of the target vehicle is less than the preset threshold r to meet the safe lane change conditions (including but not limited to anti-rollover and anti-collision requirements).
[0086] Here, for example, the vehicle size information of the obstacle vehicle among the surrounding vehicles that affects the driving of the target vehicle is obtained as parameters of length and width. The length and width of the obstacle vehicle can be increased by preset lengths respectively through the adjustment unit 1322, and the safe lane changing area of the target vehicle can be determined by the product of the adjusted length and width.
[0087] In the present application, the adjustment unit 1322 is also used to adjust the current speed of the target vehicle when the current speed of the target vehicle is less than or greater than the safe speed of the reference trajectory until the current speed is equal to the safe speed.
[0088] Assuming that the target vehicle has the intention to change lanes at point 1, if the current speed of the target vehicle meets the safe lane change condition, then the starting point determination module 132 will determine the current point as the starting point of the lane change, and the target vehicle will follow the simulated reference trajectory pre-generated by the trajectory generation module 133 and start the lane change operation at the current speed. In this case, the starting point of the lane change is point 1. If the current speed of the vehicle does not meet the safe lane change condition, the target vehicle will move forward longitudinally in the current lane for a time step, and at the same time adjust the driving speed of the target vehicle, and apply the adjusted driving speed to the trajectory decision module 131 again to calculate a safe lane change starting speed, which needs to be reached by the target vehicle after one time step. After one time step, if the driving speed of the target vehicle can be adjusted to a safe lane change speed by adopting a feasible acceleration (less than the maximum acceleration), then it is determined that the vehicle can change lanes from the next moment position, that is, the next moment position point is the lane change starting point. In this case, the calculation formula for the starting position of the lane change is:
[0089] (1);
[0090] in, and The target vehicle is at the position and The speed at the target vehicle is the speed at the target vehicle (the speed here can be calculated by the rate of change of the target vehicle's coordinates), and L is the arc length required for the target vehicle to change lanes.
[0091] Here, if it is determined that the position and speed of the target vehicle in the next frame in the future meet the safe lane change conditions, the position x1 and its corresponding speed are used as the input of the next step. If the position and speed do not meet the safe lane change conditions, the speed is adjusted and determined again in the next frame after the next frame until the position and speed of the target vehicle in the next frame in the future meet the safe lane change conditions.
[0092] Here, if the current speed of the target vehicle cannot be adjusted to the safe lane change speed at the next moment even with the maximum acceleration, the target vehicle cannot change lanes, and needs to adjust the speed according to the Gibbs safety rule until it reaches the safe speed. In this case, the vehicle will continue to move forward in the current lane and adjust its driving speed at the same time until the driving speed reaches the lane change requirement.
[0093] Assuming that the speed of the target vehicle at the mth point can meet the safe lane change condition, the position of the mth point can be calculated by the following formula (2):
[0094] (2);
[0095] Here, k represents the kth time step.
[0096] Here, by iterating the above formulas (1) and (2), the lane change starting position corresponding to the starting speed of any safety car to safe lane change can be obtained.
[0097] In the present application, the vehicle control model 14 may smoothly interpolate each path point on the simulated reference path to obtain a continuous simulated reference path curve, which represents: , are the horizontal coordinate, vertical coordinate, and heading angle respectively.
[0098] In the present application, the vehicle control model 14 may include: an update module 141; the update module 141 is used to adjust the mechanical performance parameters corresponding to the target vehicle at the current simulation moment based on the simulation reference path and the corresponding reference speed, so that the target vehicle at the next simulation moment corresponds to the vehicle driving state close to the vehicle reference state corresponding to the simulation reference path.
[0099] Here, in order to improve the stability and comfort of the target vehicle, the target vehicle will not directly apply the reference speed of the simulation reference path in the next simulation step, but will use the linear optimization method to minimize the current vehicle state of the target vehicle and the reference state of the simulation reference path, and apply the result after nonlinear optimization. In nonlinear optimization, in order to control the target vehicle to reach the vehicle reference state corresponding to the simulation reference path in the next frame from the current vehicle driving state (abscissa, ordinate, heading angle), it is necessary to adjust the mechanical performance parameters corresponding to the target vehicle at the current simulation moment based on the simulation reference path and the corresponding reference speed through the updating module 141, so that the target vehicle at the next simulation moment corresponds to the vehicle driving state close to the vehicle reference state corresponding to the simulation reference path, so as to minimize the difference between the vehicle driving state of the target vehicle in the current frame and the reference state of the next frame; and the sudden turning, acceleration and deceleration of the target vehicle can be reduced to achieve the stability and comfort of the vehicle.
[0100] Here, the objective function of nonlinear optimization is:
[0101] ;
[0102] Among them, Np represents the prediction time range, is the maximum number of control steps, , , and Respectively represent the target vehicle The errors associated with the longitudinal and lateral position, velocity and yaw angle during the prediction step. , and express The lateral position, longitudinal position, velocity, and heading angle of the vehicle in the prediction step. and is the reference speed and reference yaw angle of the target vehicle in the prediction step. By solving the above nonlinear optimization equations, the acceleration and heading angle obtained can be applied to the vehicle dynamics model in the vehicle control model, so that the vehicle driving state corresponding to the target vehicle at the next simulation moment can be finally obtained. The vehicle driving state is close to the vehicle reference state corresponding to the simulation reference path.
[0103] In the present application, the system may also include: a road facility scene construction model 15, a dynamic traffic scene construction model 16, an information visualization model 17 and a data management model 18; wherein the road facility scene construction model 15 is used to generate a road simulation environment (mainly referring to static simulation, including traffic signs, markings, lanes, trees, shoulders, buildings, green belts and weather, etc.); the dynamic traffic scene construction model 16 is used to generate the traffic simulation scene including a mixed traffic flow of motor vehicles, non-motor vehicles and pedestrians in the road simulation environment; the information visualization model 17 is used to display the traffic simulation operation process and traffic simulation results corresponding to the traffic simulation scene; the data management model 18 is used to store and manage the simulation data generated during the traffic simulation operation.
[0104] Through the traffic simulation system provided by the present application, by simulating the driver's decision, the target vehicle no longer strictly follows the designed route, but changes the driving strategy at any time during the driving process like a human, thereby enabling the target vehicle to avoid accident vehicles and obstacles in front during driving, rather than stopping when an obstacle is found and continuing to drive until the obstacle is eliminated. This improves the accuracy of traffic simulation and is able to better restore the real physical world.
[0105] Figure 2 Schematic diagram of the process implementation of the traffic simulation method in this application, such as Figure 2 As shown, the method includes:
[0106] Step 201, in a traffic simulation scene, obtaining historical environmental information within the field of view of a target vehicle, wherein the historical environmental information at least represents the position and speed of the target vehicle and surrounding vehicles;
[0107] Step 202, performing feature fusion processing on the historical environmental information to obtain a plurality of vector features of the target vehicle, each of the vector features representing a factor influencing the driving of the target vehicle among the surrounding vehicles;
[0108] Step 203, generating future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the plurality of vector features;
[0109] Step 204, determining a simulated reference path of the target vehicle based on the future trajectory probability distribution information, wherein the simulated reference path represents driver decision information for the target vehicle, and the driver decision information is used to indicate a simulated driving behavior for the target vehicle;
[0110] Step 205: Control the vehicle driving state corresponding to the target vehicle at the next simulation moment based on the driver decision information.
[0111] In a preferred embodiment, the historical environment information is subjected to feature fusion processing to obtain multiple vector features of the target vehicle, including:
[0112] The trajectory prediction model can be used to determine an obstacle vehicle among the surrounding vehicles whose first distance from the target vehicle is less than a preset distance based on the first position information and the second position information in the historical environment information; and generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle based on the obstacle vehicle and the first distance less than the preset distance; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the convenience and accessibility of interaction between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an impact on the target vehicle on the target vehicle;
[0113] And / or, the trajectory prediction model can determine the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; determine the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information at least includes the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles;
[0114] And based on the degree centrality, the closeness centrality, the eigenvector centrality and the attention weight, future trajectory probability distribution information of the target vehicle and the surrounding vehicles can be generated.
[0115] In a preferred embodiment, a reference trajectory can be determined based on a random function and the probability distribution information of the future trajectory through a trajectory planning model; if the reference trajectory represents a lane change decision and it is determined that the current lane of the target vehicle meets the safe lane change conditions, the current position point of the target vehicle is determined as the lane change starting point; based on the reference trajectory and the corresponding reference speed, a simulated reference path of the target vehicle is generated with the lane change starting point.
[0116] In a preferred embodiment, the maximum lateral acceleration of the target vehicle can also be compared with a preset threshold through the trajectory planning model. If the comparison result indicates that the maximum lateral acceleration is less than the preset threshold, it is determined that the current lane of the target vehicle meets the safe lane change condition; and\or the vehicle size information of the obstacle vehicle among the surrounding vehicles that affects the driving of the target vehicle is obtained, and the vehicle size information is adjusted to obtain the safe lane change area of the target vehicle, and the safe lane change area indicates that the current lane of the target vehicle meets the safe lane change condition.
[0117] In a preferred solution, the trajectory planning model can also be used to adjust the current speed of the target vehicle when the current speed is less than or greater than the safe speed of the reference trajectory until the current speed is equal to the safe speed.
[0118] In a preferred embodiment, the vehicle control model can adjust the mechanical performance parameters of the target vehicle at the current simulation moment based on the simulation reference path and the corresponding reference speed, so that the vehicle driving state of the target vehicle at the next simulation moment is close to the vehicle reference state corresponding to the simulation reference path.
[0119] The method may further include:
[0120] Generate a road simulation environment by building a model through road facility scenarios;
[0121] Generate the traffic simulation scene including mixed traffic flow of motor vehicles, non-motor vehicles and pedestrians in the road simulation environment by building a dynamic traffic scene model;
[0122] The traffic simulation operation process and traffic simulation results corresponding to the traffic simulation scenario are displayed through an information visualization model;
[0123] The simulation data generated during the traffic simulation operation is stored and managed through a data management model.
[0124] Through the traffic simulation method provided by the present application, based on the simulation of the driver's decision, the target vehicle no longer strictly follows the designed route, but changes the driving strategy at any time during the driving process like a human, thereby enabling the target vehicle to avoid accident vehicles and obstacles in front during driving, rather than stopping when an obstacle is found and continuing to drive until the obstacle is eliminated. This improves the accuracy of traffic simulation and is able to better restore the real physical world.
[0125] It should be noted that the traffic simulation method provided in the above embodiment is different from the above Figure 1 The traffic simulation system provided belongs to the same concept, and the specific implementation process can refer to the above system embodiment, which will not be repeated here.
[0126] Figure 3 For the traffic simulation device in this application, such as Figure 3 As shown, the traffic simulation device 300 includes at least one processor 301 and a memory 302 for storing a computer program that can be run on the processor 301. The processor 301 is used to execute the traffic simulation method suggested in the above embodiments of the present application when running the computer program. The traffic simulation device 300 also includes at least one network interface 304 and a user interface 303. The various components in the traffic simulation device 300 are coupled together via a bus system 305. It can be understood that the bus system 305 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 305 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 3 Various buses are labeled as bus system 305 .
[0127] The user interface 303 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0128] It can be understood that the memory 302 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 302 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.
[0129] The memory 302 in the embodiment of the present application is used to store various types of data to support the operation of the traffic simulation device 300. Examples of these data include: any computer program used to operate on the traffic simulation device 300, such as an operating system 3021, an application 3022, and a traffic simulation system 3023; wherein the operating system 3021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 3022 can include various applications, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The traffic simulation system 3023 is in this application Figure 1 The system shown is used to implement traffic simulation. The program for implementing the method of the embodiment of the present application can be included in the application program 3022, and can also be included in the traffic simulation system 3023.
[0130] The processor 301 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 301 or an instruction in the form of software. The above-mentioned processor 301 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 301 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 302, and the processor 301 reads the information in the memory 302 and completes the steps of the above method in combination with its hardware.
[0131] In an exemplary embodiment, the traffic simulation device 300 can be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0132] In an exemplary embodiment, the present application also provides a computer-readable storage medium, such as a memory 302 including a computer program, which can be executed by a processor 301 of a traffic simulation device 300 to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, FlashMemory, magnetic surface memory, optical disk, or CD-ROM; or it can be various devices including one or any combination of the above memories, such as a computer, a tablet device, a personal digital assistant, etc.
[0133] A computer-readable storage medium stores a computer program, which, when executed by a processor, executes the traffic simulation method suggested in the above-mentioned embodiment of the present application.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. In addition, the features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0135] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A traffic simulation system, characterized in that: The system comprises: A vehicle field of view model, used to obtain historical environmental information within the field of view of a target vehicle in a traffic simulation scenario, wherein the historical environmental information at least represents the position and speed of the target vehicle and surrounding vehicles; A trajectory prediction model is used to perform feature fusion processing on the historical environmental information to obtain multiple vector features of the target vehicle, each of which represents an influencing factor of the surrounding vehicles on the driving of the target vehicle, and to generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the multiple vector features; A trajectory planning model, used to determine a simulated reference path of the target vehicle based on the future trajectory probability distribution information, wherein the simulated reference path represents driver decision information for the target vehicle, and the driver decision information is used to indicate a simulated driving behavior for the target vehicle; A vehicle control model, used to control the vehicle driving state corresponding to the target vehicle at the next simulation moment based on the driver decision information; The trajectory prediction model comprises: A first calculation module is used to determine an obstacle vehicle among the surrounding vehicles whose first distance from the target vehicle is less than a preset distance based on the first position information and the second position information in the historical environment information; and generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle based on the obstacle vehicle and the first distance less than the preset distance; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the interaction convenience and accessibility between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an impact on the target vehicle on the target vehicle; The degree centrality is expressed as: here, represents the degree centrality of the i-th vehicle at time t; represents the scale centrality of the i-th vehicle at time t-1; The closeness centrality is expressed as: in, represents the proximity centrality of the i-th vehicle at time t; Indicates that the summation object is All The eigenvector centrality is expressed as: in, Represents the feature vector centrality characteristics of the i-th vehicle at time t; express All λ is the eigenvalue of the eigenvector; A second calculation module is used to determine the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; determine the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information at least includes the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles; A probability generation module, configured to generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the degree centrality, the closeness centrality, the eigenvector centrality and the attention weight; Among them, the current coordinates of the surrounding vehicles and / or the target vehicle, the historical coordinates within a given sampling time, the moving direction, the speed, and the acceleration data are combined into a feature matrix X, and each feature in the feature matrix X is mapped by a weight matrix to obtain a query vector Q and a key vector K. The attention weight score is obtained by the dot product of the query vector Q and the key vector K; the degree centrality, closeness centrality, feature vector centrality, and attention weight are processed by the Softmax activation function and then input into the LSTM decoder for analysis and processing to generate the future trajectory probability distribution information of the target vehicle and the surrounding vehicles, which is expressed as: P(Y|X), where X is the historical trajectory of the target vehicle and Y is the predicted future driving trajectory of the target vehicle.
2. The traffic simulation system according to claim 1, characterized in that: The trajectory planning model comprises: A trajectory decision module, used for determining a reference trajectory based on a random function and the future trajectory probability distribution information; A starting point determination module, configured to determine the current position point of the target vehicle as the lane change starting point if the reference trajectory represents a lane change decision and it is determined that the current lane of the target vehicle meets the safe lane change condition; The trajectory generation module is used to generate a simulated reference path of the target vehicle with the lane change starting point based on the reference trajectory and the corresponding reference speed.
3. The traffic simulation system according to claim 2, characterized in that: The starting point determination module further includes: a judgment unit, configured to compare the maximum lateral acceleration of the target vehicle with a preset threshold value, and if the comparison result indicates that the maximum lateral acceleration is less than the preset threshold value, determine that the current lane of the target vehicle satisfies the safe lane change condition; and\or The adjustment unit is used to obtain vehicle size information of an obstacle vehicle among the surrounding vehicles that affects the driving of the target vehicle, and adjust the vehicle size information to obtain a safe lane change area for the target vehicle, wherein the safe lane change area indicates that the current lane of the target vehicle meets the safe lane change condition.
4. The traffic simulation system according to claim 3, characterized in that: The adjustment unit is further configured to adjust the current speed until the current speed is equal to the safe speed when the current speed of the target vehicle is less than or greater than the safe speed of the reference trajectory.
5. The traffic simulation system according to claim 1, characterized in that: Vehicle control model, including: An updating module is used to adjust the mechanical performance parameters corresponding to the target vehicle at the current simulation moment based on the simulation reference path and the corresponding reference speed, so that the target vehicle at the next simulation moment corresponds to the vehicle driving state close to the vehicle reference state corresponding to the simulation reference path.
6. The traffic simulation system according to any one of claims 1 to 5, characterized in that: The system further comprises: Road facility scene construction model is used to generate road simulation environment; A dynamic traffic scene construction model is used to generate the traffic simulation scene including a mixed traffic flow of motor vehicles, non-motor vehicles and pedestrians in the road simulation environment; An information visualization model, used to display the traffic simulation operation process and traffic simulation results corresponding to the traffic simulation scenario; The data management model is used to store and manage the simulation data generated during the operation of the traffic simulation.
7. A traffic simulation method, characterized in that: The method comprises: In a traffic simulation scenario, historical environmental information within the field of view of a target vehicle is obtained, wherein the historical environmental information at least represents the position and speed of the target vehicle and surrounding vehicles; Performing feature fusion processing on the historical environmental information to obtain a plurality of vector features of the target vehicle, each of the vector features representing an influencing factor of the surrounding vehicles on the driving of the target vehicle; Generate future trajectory probability distribution information of the target vehicle and the surrounding vehicles based on the plurality of vector features; Determining a simulated reference path of the target vehicle based on the future trajectory probability distribution information, wherein the simulated reference path represents driver decision information for the target vehicle, and the driver decision information is used to indicate a simulated driving behavior for the target vehicle; Controlling the vehicle driving state of the target vehicle corresponding to the next simulation moment based on the driver decision information; The performing feature fusion processing on the historical environment information to obtain a plurality of vector features of the target vehicle includes: Based on the first position information and the second position information in the historical environment information, determine the obstacle vehicles among the surrounding vehicles whose first distance to the target vehicle is less than the preset distance; based on the obstacle vehicle and the first distance less than the preset distance, generate the degree centrality, proximity centrality and eigenvector centrality of the target vehicle; wherein the first position information represents the frame coordinates of the target vehicle, the second position information represents the frame coordinates of the surrounding vehicles, the degree centrality represents the number of vehicles among the surrounding vehicles that have an impact on the driving of the target vehicle, the proximity centrality represents the interaction convenience and accessibility between the target vehicle and the surrounding vehicles, and the eigenvector centrality represents the potential impact of the obstacle vehicles among the surrounding vehicles that have an impact on the target vehicle on the target vehicle; The degree centrality is expressed as: here, represents the degree centrality of the i-th vehicle at time t; represents the scale centrality of the i-th vehicle at time t-1; The closeness centrality is expressed as: in, represents the proximity centrality of the i-th vehicle at time t; Indicates that the summation object is All The eigenvector centrality is expressed as: in, Represents the feature vector centrality characteristics of the i-th vehicle at time t; express All λ is the eigenvalue of the eigenvector; and\or, determining the vehicle priority of the surrounding vehicles relative to the target vehicle based on the historical environmental information; determining the attention weight of the target vehicle to each of the surrounding vehicles based on the vehicle priority; wherein the historical environmental information at least includes the position information of the target vehicle and the surrounding vehicles, the vehicle speed information, and the distance information between the vehicles; Among them, the current coordinates of the surrounding vehicles and / or the target vehicle, the historical coordinates within a given sampling time, the moving direction, the speed, and the acceleration data are combined into a feature matrix X, and each feature in the feature matrix X is mapped by a weight matrix to obtain a query vector Q and a key vector K. The attention weight score is obtained by the dot product of the query vector Q and the key vector K; the degree centrality, closeness centrality, feature vector centrality, and attention weight are processed by the Softmax activation function and then input into the LSTM decoder for analysis and processing to generate the future trajectory probability distribution information of the target vehicle and the surrounding vehicles, which is expressed as: P(Y|X), where X is the historical trajectory of the target vehicle and Y is the predicted future driving trajectory of the target vehicle.
8. A traffic simulation device, characterized in that: The device comprises: Memory for storing computer programs; At least one processor is used to trigger the traffic simulation system according to any one of claims 1 to 7 to execute the traffic simulation method according to claim 7 when running the computer program.
Citation Information
Patent Citations
Target vehicle track prediction method for multi-lane scene
CN116758727A