A Deep Model-Rule-Coupled Decision-Making and Planning Method for Autonomous Driving

By combining the Transformer and ILQR algorithms, deep models and rules are coupled to generate multimodal decision information and optimize control information. This solves the problems of vehicle game interaction and lack of multimodal information in autonomous driving, ensuring the safety and real-time performance of autonomous driving.

CN117657214BActive Publication Date: 2026-07-17ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2023-12-11
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing autonomous driving decision-making and planning methods fail to effectively consider the game-like interactions and multimodal information between vehicles, resulting in out-of-distribution problems. Imitation learning-based methods lack safety and flexibility, while rule-based methods have low flexibility and poor real-time performance, and the planning layer cannot provide feedback to adjust the output of the decision layer.

Method used

The Transformer algorithm is used for feature fusion and game interaction, combined with the ILQR algorithm for trajectory planning, and the network parameters are updated through the loss function to achieve coupling between the deep model and the rules, generate multimodal decision information and optimize control information.

Benefits of technology

It solves the problems of lack of game interaction and unimodal decision-making in the decision-making process, enhances the model's security and comfort, ensures the real-time nature of online results and the security of trajectories, overcomes the problem of out-of-distribution, and improves the generalization ability of scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117657214B_ABST
    Figure CN117657214B_ABST
Patent Text Reader

Abstract

This invention discloses an autonomous driving decision-making and planning method coupled with a deep model. This method couples a rule-based planning method to a deep model, enabling the deep model to output a safe and comfortable trajectory for autonomous driving decision-making and planning. It includes: a decision-making stage based on the Transformer algorithm, using Transformer and attention mechanisms for game-theoretic interaction, outputting obstacle prediction information and vehicle control information; a planning stage based on the ILQR algorithm, optimizing the trajectory and outputting safe and comfortable control information for the vehicle; a network parameter update stage, constructing a loss function, updating network parameters, and feeding back information from the planning stage to the decision-making stage, ultimately outputting the optimal trajectory. This invention combines high game-theoretic interactivity, good safety, and strong generalization capabilities, making it applicable to autonomous driving scenarios such as urban roads, and particularly suitable for complex urban road scenarios with multiple vehicles and obstacles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of autonomous driving technology, and in particular relates to an autonomous driving decision-making and planning method that couples deep models with rules. Background Technology

[0002] In autonomous driving technology, the decision-making and planning module needs to integrate environmental and self-information to ensure safe and comfortable driving behavior of the driverless vehicle and guide the motion control module in controlling the vehicle. Currently, there are many methods for solving the decision-making and planning problem in autonomous driving, but they have the following drawbacks:

[0003] 1. Failure to consider inter-vehicle game interaction and multimodal information. Existing imitation learning-based decision-making methods focus on modeling future vehicle decisions based on historical vehicle trajectories, such as Chauffeurnet: Learning to drive by imitating the best and synthesizing the worst [J]. arXiv preprint arXiv:1812.03079,2018. However, the decision information generated by these methods does not take into account inter-vehicle game interaction and multimodal information. The reason for considering game interaction and multimodal information in the decision-making process is that human drivers have complex driving intentions. If future decisions are inferred mechanically based on historical vehicle trajectories, only single-source vehicle decision information and prediction information about obstacle vehicles will be generated. If obstacle vehicles suddenly take actions that do not conform to the vehicle's historical trajectory reasoning, it will ultimately lead to a dangerous trajectory for the vehicle.

[0004] 2. Imitation learning-based methods suffer from the out-of-distribution problem. Existing planning methods can be divided into imitation learning-based methods and rule-based methods. Imitation learning-based methods learn offline from supervised data, minimizing the error between the model and ground truth data, and using ground truth data to optimize the model network parameters, such as Chauffeurnet mentioned above. Through imitation learning methods, researchers can train decision planning models on large driving datasets. Imitation learning-based methods are simple to implement and can be used for offline learning, but they suffer from the out-of-distribution problem. See Chen, Li, et al. "End-to-end autonomous driving: Challenges and frontiers." arXiv preprint arXiv:2306.16927. For example, ground truth driving data usually does not include situations such as extremely close proximity to vehicles ahead or extremely large lane departure angles. Therefore, during the learning process, these poor cases are not included in the learning scope. Once control errors or abnormal situations occur during testing, the vehicle may deviate from the training domain, resulting in the model's output trajectory failing to guarantee safety.

[0005] 3. Rule-based methods have low flexibility and cannot guarantee real-time performance in solving nonlinear problems. In contrast, rule-based methods, such as the Bézier curve-based optimization algorithm Ding W, Zhang L, Chen J, et al. Safetrajectory generation for complex urban environments using spatio-temporalsemantic corridor[J].IEEE Robotics and Automation Letters,2019,4(3):2997-3004., model a series of minimum cost problems with constraints and obtain trajectories that satisfy the constraints by iteratively solving these problems. The trajectories output by rule-based methods have advantages such as robustness and comfort. However, the method has the disadvantage of adjusting different cost functions and constraints according to different scenarios, resulting in low flexibility. In addition, it often needs to solve large-scale nonlinear problems, which means that more computing resources are required, making it difficult to guarantee the real-time performance of online solutions.

[0006] Meanwhile, in existing rule-based methods, the decision-making layer often directs the planning layer, but the planning layer cannot provide feedback to adjust the output of the decision-making layer. This results in the planning layer not obtaining a safe and comfortable trajectory when the decision-making layer makes a mistake, which is not conducive to autonomous driving in dealing with ever-changing and complex scenarios. Summary of the Invention

[0007] The purpose of this invention is to address the shortcomings of existing technologies by providing a deep model-rule coupled autonomous driving decision-making and planning method.

[0008] To achieve the above objectives, this invention provides an autonomous driving decision-making and planning method coupled with deep models and rules, comprising the following steps:

[0009] (1) Decision-making stage based on Transformer algorithm: Input vehicle historical trajectory and map information, perform feature fusion, game interaction and generate multimodal information based on Transformer and attention mechanism, and perform control quantity assisted training to output obstacle prediction information and vehicle control information.

[0010] (2) Planning stage based on ILQR algorithm: Input obstacle prediction information and vehicle control information, use ILQR algorithm to perform trajectory planning, construct cost function of nonlinear constraint, and output the optimized control information of vehicle by minimizing cost function;

[0011] (3) Network parameter update stage: Construct a loss function, minimize the difference between the optimized control information of the vehicle and the true information, feed back the information of the autonomous driving planning stage to the decision stage, complete the network parameter update, and finally output the optimal trajectory.

[0012] Further, step (1) includes the following sub-steps:

[0013] (1.1) Input vehicle historical trajectory and map information, and use a map encoder and a vehicle encoder composed of a multi-layer sensing mechanism to preprocess the input map information and vehicle historical trajectory respectively to generate map encoding vector and vehicle encoding vector.

[0014] (1.2) Based on the Transformer algorithm, feature fusion and extraction are performed on the map encoding vector and vehicle encoding vector to obtain the initial vehicle-map feature vector;

[0015] (1.3) Input the initial vehicle-map feature vector and vehicle encoding vector into the decoder composed of the cross-attention mechanism module to obtain the initial multimodal decision feature vector. Then, through the decision decoder, obtain the multimodal decision information and multimodal decision probability to complete the calculation of the initial decision information.

[0016] (1.4) Input the multimodal decision feature vector, multimodal decision information and multimodal decision probability into the decoder composed of self-attention mechanism and cross-attention mechanism, and output the vehicle multimodal decision feature vector, multimodal decision information and multimodal decision probability of Level-k layer; repeat the calculation a preset number of times to complete the game interaction of the decision stage;

[0017] (1.5) Input the multimodal decision feature vector into the multilayer perceptron, perform feature vector mapping, and output obstacle prediction information and vehicle control information to complete the control quantity assisted training.

[0018] Further, step (1.4) includes the following sub-steps:

[0019] (1.4.1) In the merged state quantity layer, the vehicle's speed and acceleration are calculated, and the vehicle's speed, acceleration, length, width and height are merged into the multimodal decision information;

[0020] (1.4.2) Features are fused using a multilayer perceptron and average pooling, and then multiplied one by one with the multimodal decision probabilities to select the decision vector with the highest probability output from the Level-(k-1) layer.

[0021] (1.4.3) The decision vector is used as the input of the self-attention mechanism module to update the decision information between vehicles, obtain the decision vector with game interaction, and add it with the initial vehicle-map feature vector to update the vehicle-map feature vector of the Level-k layer.

[0022] (1.4.4) After obtaining the vehicle-map feature vector, input it and the multimodal decision feature vector output by the Level-(k-1) layer into the cross-attention mechanism module to obtain the vehicle multimodal decision feature vector of the Level-k layer;

[0023] (1.4.5) Input the multimodal decision feature vector into the decision decoder to obtain the multimodal decision information and multimodal decision probability of the Level-k layer;

[0024] (1.4.6) Repeat sub-steps (1.4.1) and (1.4.5) K times, where K is the preset number of calculations for the Level-K game algorithm, to complete K game calculations.

[0025] Furthermore, in step (2), the cost function is defined as:

[0026] c i =c obs +c control +c state +cboundary

[0027] Among them, c obs Let c be the obstacle cost function. control For the cost function of the control quantity, c state Let c be the cost function of the state variables. boundary This is the boundary constraint cost function.

[0028] Furthermore, the boundary constraint cost function is defined as follows:

[0029]

[0030] Where, d r To cover the radius of the circle of the vehicle, Let d be the distance from the nth boundary point to the center of the i-th circle covering the vehicle. buffer To minimize the distance margin from the boundary, l is the vehicle length, w is the vehicle width, and N is the number of boundary points.

[0031] Furthermore, the loss function is defined as:

[0032]

[0033] in, Let be the game interaction loss function. Let be the game interaction loss function. To control the loss function, To mimic the loss function.

[0034] Furthermore, the control loss function is defined as:

[0035]

[0036]

[0037]

[0038]

[0039] in, To control the loss weighting coefficient, p t =(x t ,y t ,h t ,v t x represents the vehicle's state information at time t. t The position of the x-axis, y t h is the position on the y-axis. t v is the orientation angle. t For speed, These are the x-axis position, y-axis position, and orientation angle of the true trajectory, where L2 is the norm function, and T... f For planning time.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] 1. In the decision-making process, attention mechanism is used to conduct Level-K game to generate multimodal decision information that takes into account game interaction, thus solving the problems of lack of game interaction and output of single-modal decision in autonomous driving decision-making technology based on imitation learning.

[0042] 2. In the decision-making process, a control quantity module is used to assist training and solve the problem of imitation learning exceeding the distribution.

[0043] 3. By coupling traditional rule-based planning methods into the model and training it offline with a large amount of driving data, we can reduce the burden of solving large-scale nonlinear constraint problems online using rule-based methods, ensure the real-time nature of online results, ensure that the planning layer can provide feedback to the decision-making layer, and ensure the safety and comfort of the model's output trajectory when encountering problems such as out-of-distribution. Attached Figure Description

[0044] Figure 1 This is a flowchart illustrating the decision-making and planning process of the method of the present invention.

[0045] Figure 2 This is a flowchart illustrating the decision-making stage implementation of the method of the present invention based on the Transformer algorithm.

[0046] Figure 3 This is a flowchart of the decision data preprocessing method of the present invention;

[0047] Figure 4 This is a framework diagram of the decision encoder of the method of the present invention;

[0048] Figure 5 This is a diagram of the Level-0 decoder framework for the method of this invention;

[0049] Figure 6 This is a diagram of the decision-making Level-k decoder framework of the method of the present invention;

[0050] Figure 7 This is a schematic diagram of the planning obstacle constraints in the method of the present invention;

[0051] Figure 8 This is a schematic diagram of the planning boundary constraints in the method of the present invention;

[0052] Figure 9 This is a schematic diagram of the vehicle kinematics model in the method of the present invention. Detailed Implementation

[0053] To make the technical solution of the present invention clearer, the embodiments of the present invention will be further described below in conjunction with the accompanying drawings and examples. The detailed description of the embodiments will make the technical problems solved by the present invention, the technical solutions adopted, and the technical effects achieved clearer. It is understood that the specific embodiments described herein are only used to more clearly explain the present invention and are not intended to limit the present invention. Furthermore, it should be noted that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, and not all of them, and should not be used to limit the scope of protection of this application.

[0054] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings.

[0055] This invention proposes an autonomous driving decision-making and planning method that couples deep models with rules. The flowchart of this method is as follows: Figure 1 As shown, it includes the following steps:

[0056] (1) Decision-making stage based on Transformer algorithm: Input vehicle historical trajectory and map information, perform feature fusion, game interaction and generate multimodal information based on Transformer and attention mechanism, and perform control quantity assisted training to output obstacle prediction information and vehicle control information.

[0057] Specifically, such as Figure 1 and Figure 2 As shown, in the decision-making stage based on the Transformer algorithm, a map encoder and a vehicle encoder are used to preprocess the vehicle's historical trajectory and map information. The Transformer structure is then used to extract and fuse vehicle trajectory features and environmental features. The Level-K game theory algorithm is used to consider the future game interactions of the vehicles. Self-attention and cross-attention mechanisms are employed to update the multimodal decision results of each vehicle and the environmental information surrounding each vehicle. Each vehicle engages in K interactive games to obtain its own multimodal decision information and obstacle multimodal prediction information (hereinafter referred to as multimodal decision information for illustrative purposes and algorithm calculation). To ensure that the model's output trajectory conforms to vehicle kinematics and to facilitate training during the planning stage, after completing the game interactions, control variables based on vehicle kinematics are used to assist training, ensuring the kinematic feasibility of the output decision information. The output obstacle prediction information is then provided. and vehicle control information (x t ,y t ) represents the horizontal and vertical coordinates at time t in the future, and h represents the horizontal and vertical coordinates. t It is the orientation angle at time t in the future, a t Acceleration at time t in the future The yaw rate at time t in the future, T f For planning purposes. The same symbols in this article have the same meaning.

[0058] Step (1) specifically includes the following sub-steps:

[0059] (1.1) Preprocess the data: The preprocessing steps are as follows Figure 3 As shown, the map encoder used in this paper consists of an MLP (Multilayer Perceptron). The map encoder preprocesses map information such as lane and pedestrian vectors, and the resulting map vector is added to the embedding vector. The embedding vector is used to mark data locations, and the generated vector is called the map-coded vector. The vehicle encoder used in this paper also consists of an MLP. The vehicle encoder preprocesses the vectors of the vehicle and surrounding static or dynamic obstacles, and the resulting trajectory vector is added to the embedding vector. The generated vector is called the vehicle-coded vector.

[0060] (1.2) Based on Transformer, feature fusion and extraction are performed on the data. The feature fusion and extraction steps are as follows: Figure 4 As shown, the vehicle encoding vector and map encoding vector generated in sub-step (1.1) are input into the Transformer encoder to achieve the fusion and extraction of features of the vehicle's surrounding environment, resulting in an initial vehicle-map feature vector. N represents the dimensions of the vehicle and the obstacles. m Let D be the dimension of the lanes and sidewalks, and D be the dimension of the hidden layer. Because vehicle interaction decisions change, the vehicle-map feature vector... Corresponding changes are also needed at each level.

[0061] (1.3) Calculate initial decision information: The calculation steps are as follows Figure 5 As shown, the initial vehicle-map feature vector generated in sub-step (1.2) is obtained. From now on, use this as the key and value (see...). Figure 5 In the K&V (Kind & V) framework, the vehicle encoding vector is used as the query (see [link]). Figure 5 The input (Q) is a Level-0 decoder consisting of a cross-attention mechanism module, which yields the initial multimodal decision feature vector of the vehicle at the Level-0 layer. M represents the modality of the decision output. The initial multimodal decision feature vector of the vehicle at Level-0 layer... As the vehicle multimodal decision feature vector of the Level-(k-1) layer L k-1This represents the Level-(k-1) layer. The decision feature vector output from the Level-(k-1) layer is processed by a decision decoder, which consists of four MLPs, each outputting multimodal decision information for the Level-(k-1) layer. in The expected value and variance of the Gaussian distributions representing the x-axis position, y-axis position, and orientation angle at time t, and the multimodal decision probability of the Level-(k-1) layer. Here, P represents the probability of each mode M occurring, completing the calculation of initial decision information. Because the input for this step is historical trajectory features, the generated initial decision information does not yet possess the ability for future interactions.

[0062] (1.4) Game decision-making based on the Level-K algorithm: The algorithm flow is as follows Figure 6 As shown, the multimodal decision feature vector output by the Level-(k-1) layer is... Multimodal decision information Multimodal decision probability The input consists of a Level-k decoder employing self-attention and cross-attention mechanisms. In the state merging layer, vehicle kinematics is used to calculate the vehicle's velocity and acceleration from its position and orientation angle. The vehicle's velocity, acceleration, length, width, and height are then merged into the multimodal decision information. The last dimension yields in (v t ,a t L, W, H represent the vehicle's speed, acceleration, length, width, and height, respectively. Features are fused using MLP and Average Pooling (Avg Pool) operations, and then combined with the multimodal decision probability. Multiply each element one by one, and select the decision vector with the highest probability output from the Level-(k-1) layer. And use it as the query, key, and value of the self-attention mechanism module (see...). Figure 6 Inputting Q and K&V (key, key, and value) information, we update the decision-making information between vehicles to obtain a decision vector with game-theoretic interaction. and with the initial vehicle-map feature vector Add them together to update the vehicle-map feature vector at level-k.

[0063] like Figure 6 As shown, the vehicle-map feature vector is obtained. Then use it as the key and value (see Figure 6 In the middle K&V), it is combined with the multimodal decision feature vector output by the Level-(k-1) layer. As a query (see Figure 6 The cross-attention mechanism module (Q) is used to obtain the vehicle multimodal decision feature vector of the Level-k layer. This method allows vehicles to interact with environmental information to prevent boundary crossings or collisions. According to the Level-K algorithm, one vehicle is fixed at Level-k, while the others are at Level-(k-1). Vehicles at Level-k update their multimodal decision feature vectors one by one with vehicles at Level-(k-1) through a cross-attention mechanism module.

[0064] like Figure 6 As shown, the multimodal decision feature vector Input decision decoder, which is connected to Figure 5 Similar to the decision decoder, it obtains multimodal decision information from the Level-k layer. in The expected value and variance of the Gaussian distributions representing the x-axis position, y-axis position, and orientation angle, and the multimodal decision probabilities of the Level-k layer. Where P is the probability of each mode M occurring. If K games are not completed, repeat step (1.4) until K games are completed.

[0065] (1.5) Control-assisted training: The multimodal decision feature vectors of the Level-K layer described in sub-step (1.4) are used for training. The input is fed into a three-layer MLP, where feature vectors are mapped, and the output is the vehicle's control information. Last dimension a t It is the acceleration at time t in the future. It represents the yaw rate at time t in the future. The design aims to ensure the kinematic continuity of the vehicle's output decisions, address the problem of out-of-distribution learning in imitation training, and serve as an auxiliary training tool.

[0066] The vehicle control information output in step (1) at level-K. Multimodal decision information at Level-k layer Multimodal decision probabilities of Level-k layers Based on multimodal decision probability Obtain the decision probability of the mode with the highest occurrence probability. Control information of vehicles at Level-K Multimodal decision information of Level-k layers The corresponding mode M * Extract and obtain the vehicle's control information. and decision information at the Level-k level Simultaneously, the decision information from the Level-k layer will be... The decision-making information of the vehicle and the prediction information of obstacles are separated to obtain the prediction information of obstacles. Vehicle control information The vehicle's control information is obtained by separating the vehicle's control information from the obstacle's control information.

[0067] (2) Planning stage based on ILQR algorithm: Input obstacle prediction information and vehicle control information, use ILQR algorithm to perform trajectory planning, construct cost function of nonlinear constraint, and output the optimized control information of vehicle by minimizing cost function.

[0068] Specifically, such as Figure 1 As shown, in the planning stage based on the ILQR (Iterative Linear Quadratic Regulator) algorithm, a nonlinear constraint cost function is constructed. The vehicle's control information and obstacle prediction information are input, and the ILQR algorithm is used iteratively to solve for trajectory planning, outputting the optimized control information of the vehicle.

[0069] As a method for solving nonlinear problems, ILQR is based on using Taylor's second-order approximation of the action value function to deal with nonlinear vehicle dynamics and cost equations in complex environments, and obtains dynamically feasible control quantities through rapid iteration.

[0070] The task can be described as minimizing control information to achieve the minimum value of the nonlinear constraint cost function u = argmin. u {∑ i ||λ i c i (τ,u)‖}, where i is the number of nonlinear constraint cost functions, and λ i c is the weighting coefficient. i The cost function is a nonlinear constraint. For obstacle prediction information, For vehicle control information, v t t represents the velocity of the obstacle at time t in the future, and l and w represent the length and width of the obstacle, respectively.

[0071] To ensure the vehicle outputs a safe and comfortable trajectory, various nonlinear constraints need to be considered. The cost function of the overall nonlinear constraint is:

[0072] c i =c obs +c control +c state +cboundary

[0073] Among them, c obs Let c be the obstacle cost function. control For the cost function of the control quantity, c state Let c be the cost function of the state variables. boundary Let be the cost function for boundary constraints. By minimizing the cost function, the optimized trajectory is obtained.

[0074] like Figure 7 The obstacle is represented by a safety ellipse, and the obstacle cost formula is as follows:

[0075]

[0076] in,

[0077] The coordinates of the rear axle center point of the i-th obstacle are Cartesian coordinates. These are the Cartesian coordinates of the center point of the rear axle of the vehicle. The diagonal matrix represents the major semi-axis 'a' and minor semi-axis 'b' of the safety ellipse. Where L o It is the wheelbase of the obstacle, s a =v o *cos(h o Δt represents the distance the obstacle travels along the x-axis within time Δt, where h o It is the orientation angle of obstacle i. Where w o s is the width of obstacle i. b =v o *sin(h o Δt represents the distance the obstacle travels along the y-axis within time Δt. Since longitudinal motion is dominant in autonomous vehicles, using an ellipse with adjustable major and minor axes to represent obstacles allows the algorithm to primarily avoid vehicles in front, while appropriately reducing attention to vehicles to the sides. Furthermore, the ellipse is smooth, preventing derivative discontinuities when the autonomous vehicle turns.

[0078] To ensure the continuous stability of the control input, the cost function for the control input is designed as follows:

[0079]

[0080] a t δ t , Let t be the acceleration, wheel yaw angle, jerk, and yaw rate at time t. To ensure longitudinal comfort of the vehicle, the acceleration and jerk should be minimized. At the same time, considering lateral comfort of the vehicle, the wheel yaw angle and yaw rate should also be minimized.

[0081] To ensure the continuity and safety of the state variables, the state variable cost function is designed as follows:

[0082]

[0083] p t =(x t ,y t ,h t ,v t () represents the vehicle's position, orientation angle, and velocity at time t. Indicates the distance from p at time t. t The nearest reference point. Minimize p t and ref t The distance between them is designed to bring the vehicle's position and the reference point as close as possible, while also taking into account the speed constraint of the reference point.

[0084] like Figure 8 As shown, the boundary constraint equations are designed, and the boundary constraint cost function is:

[0085]

[0086] Replacing the vehicle with three circles of equal radius allows for a quick calculation of the distance from the vehicle to the road boundary. Where d r It is the radius of the circle covering the vehicle. d is the distance from the nth boundary point to the center of the i-th circle covering the vehicle. buffer It is the minimum distance margin to the boundary. Wherein... Where l is the vehicle length and w is the vehicle width. The purpose of this constraint is to ensure that the vehicle does not exceed the road boundary.

[0087] After constructing the nonlinear constraint cost function, ILQR is used for iterative planning, and the optimized control information is output. This ensures the safety and comfort of the model's output trajectory.

[0088] (3) Network parameter update stage: Construct a loss function, minimize the difference between the optimized control information of the vehicle and the true information, feed back the information of the autonomous driving planning stage to the decision stage, couple the rule-based method with the deep learning-based method, and finally output the optimal trajectory.

[0089] Deep learning-based methods require comparing the model output with the ground truth. Through gradient backpropagation, the model's network parameters are updated. Step (2) then uses step (3) to backpropagate the optimized control information to step (1), thus coupling rule-based and imitation learning-based methods. The overall loss function of the model can be defined as:

[0090]

[0091] in, These are the game interaction loss, probability loss, control loss, and imitation loss, respectively. Output the optimal trajectory. x t It is the x-axis coordinate at time t in the future, y t It is the y-coordinate at time t in the future, h t It is the orientation angle at time t in the future, v t It is the vehicle's speed at time t in the future.

[0092] Specifically, a game interaction loss function, a probability loss function, a control loss function, and a mimicry loss function are constructed, the model network parameters are updated, and the information output by the model is compared with the true information. The gradient information of the model is used to backfeed back the information output in the planning stage of step (2) to the decision stage of step (1). The rule-based method is then coupled into the model.

[0093] The game-theoretic interaction loss function is:

[0094]

[0095] in, These are weighting coefficients, and d(a1,a2) is the Euclidean distance between the x-axis and y-axis positions of vehicles a1 and a2. It is the mode of the i-th vehicle in the Level-k state. This is the mode of the j-th vehicle in the Level-(k-1) state. To ensure that there is a certain space between the vehicles, a distance margin of 0.5 is used. The positions of vehicles a1 and a2 can be determined by the multimodal decision information in step (1). This is an artificial potential field cost function; the closer the two vehicles are, the higher the cost, and vice versa.

[0096] The probabilistic loss function is:

[0097]

[0098] in, These are weighting coefficients. It is the decision probability of the mode with the highest occurrence probability, and the decision information of the Level-k layer extracted from the mode with the highest occurrence probability. Decision information The last dimension The expected value and variance of the Gaussian distribution representing the x-axis position, y-axis position, and orientation angle are... The x-axis position, y-axis position, and orientation angle represent the true value at time t. This loss function design is based on the Gaussian Mixed Model, using the method of minimizing the negative log-likelihood to calculate the decision information of the Level-k layer obtained in step (1). With truth value g t The distance loss between them needs to be considered while maximizing the decision probability. The regression loss.

[0099] To calculate the control loss function, it is first necessary to use the vehicle's control information from step (1) through the vehicle's kinematic equations. Last dimension Converted into status information.

[0100] like Figure 9 As shown, the vehicle motion state equation in the vehicle kinematic model is:

[0101]

[0102]

[0103]

[0104] v t+1 =v t +a t Δt

[0105] Where, p t =(x t ,y t ,h t ,v t (x) represents the state information at time t. t It is the vehicle's position on the x-axis and y-axis. t It is the vehicle's position on the y-axis, h t and v t These represent the vehicle's heading angle and speed, respectively.

[0106] The control loss function is:

[0107]

[0108]

[0109]

[0110]

[0111] in, These are weighting coefficients. The true trajectory is shown above. The loss function based on the L2 norm is used, and the loss of the x-axis component and the y-axis component are calculated using the dot product and cross product algorithms, respectively.

[0112] The imitation loss function is as follows:

[0113]

[0114] in, These are weighting coefficients, representing the optimized control information output from step (2). The state information p can also be obtained using the kinematic equations described above. t =(x t ,y t ,h t The L2 norm loss function is used to minimize the state information p optimized in step (2). t and g t The error.

[0115] After calculating the loss function, the gradient information of the loss function is fed back to step (1) to realize the information feedback from the planning stage of step (2) to step (1), update the model network parameters, and output the optimal trajectory of the model.

[0116] This invention couples the rule-based planning phase into the model and trains it together with the decision-making phase, ultimately updating the network parameters together. This solves the problem that planning cannot provide feedback to decision-making. Offline training considers both the game-like interactions between autonomous vehicles and the generation of multimodal information, while also iteratively optimizing the trajectory. The former makes the decision information more reasonable, allowing for a deeper consideration of the complex driving intentions of vehicles on the road, while the latter overcomes problems such as out-of-distribution issues in imitation learning, ensuring a safe trajectory output while enhancing scene generalization and reducing the burden of online trajectory computation.

[0117] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the present invention. For those skilled in the art, various changes, combinations, simplifications, modifications, substitutions, and readjustments should be considered equivalent substitutions that do not depart from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and includes many other equivalent embodiments within the protection scope of the present invention.

Claims

1. A deep model-rule-coupled decision-making and planning method for autonomous driving, characterized in that, Includes the following steps: (1) Decision-making stage based on Transformer algorithm: Input vehicle historical trajectory and map information, perform feature fusion, game interaction and generate multimodal information based on Transformer and attention mechanism, and perform control quantity assisted training to output obstacle prediction information and vehicle control information; including: (1.1) Input the vehicle historical trajectory and map information, and use the map encoder and vehicle encoder composed of multi-layer perception mechanism to preprocess the input map information and vehicle historical trajectory respectively to generate map encoding vector and vehicle encoding vector. (1.2) Based on the Transformer algorithm, feature fusion and extraction are performed on the map encoding vector and vehicle encoding vector to obtain the initial vehicle-map feature vector; (1.3) Input the initial vehicle-map feature vector and vehicle encoding vector into the decoder composed of the cross-attention mechanism module to obtain the initial multimodal decision feature vector. Then, through the decision decoder, obtain the multimodal decision information and multimodal decision probability to complete the calculation of the initial decision information. (1.4) Input the multimodal decision feature vector, multimodal decision information, and multimodal decision probability into the decoder composed of self-attention and cross-attention mechanisms, and output the vehicle multimodal decision feature vector, multimodal decision information, and multimodal decision probability of the Level-k layer; repeat the calculation a preset number of times to complete the game interaction in the decision-making stage; including: (1.4.1) In the merged state quantity layer, the vehicle's speed and acceleration are calculated, and the vehicle's speed, acceleration, length, width and height are merged into the multimodal decision information; (1.4.2) Features are fused using a multilayer perceptron and average pooling, and then multiplied one by one with the multimodal decision probabilities to select the decision vector with the highest probability output from the Level-(k-1) layer. (1.4.3) The decision vector is used as the input of the self-attention mechanism module to update the decision information between vehicles, obtain the decision vector with game interaction, and add it with the initial vehicle-map feature vector to update the vehicle-map feature vector of the Level-k layer. (1.4.4) After obtaining the vehicle-map feature vector, input it and the multimodal decision feature vector output by the Level-(k-1) layer into the cross-attention mechanism module to obtain the vehicle multimodal decision feature vector of the Level-k layer; (1.4.5) Input the multimodal decision feature vector into the decision decoder to obtain the multimodal decision information and multimodal decision probability of the Level-k layer; (1.4.6) Repeat sub-step (1.4.1)-sub-step (1.4.5) K times, where K is the preset number of calculations for the Level-K game algorithm, to complete K game calculations; (1.5) Input the multimodal decision feature vector into the multilayer perceptron, perform feature vector mapping, and output obstacle prediction information and vehicle control information to complete the control quantity assisted training; (2) Planning stage based on ILQR algorithm: Input obstacle prediction information and vehicle control information, use ILQR algorithm to perform trajectory planning, construct cost function of nonlinear constraint, and output the optimized control information of vehicle by minimizing cost function; (3) Network parameter update stage: Construct a loss function, minimize the difference between the optimized control information of the vehicle and the true information, feed back the information of the autonomous driving planning stage to the decision stage, complete the network parameter update, and finally output the optimal trajectory.

2. The autonomous driving decision-making and planning method coupled with deep models and rules according to claim 1, characterized in that, In step (2), the cost function is defined as: ; in, Let the obstacle cost function be... For the cost function of the control quantity, Let the state cost function be... This is the boundary constraint cost function.

3. The autonomous driving decision-making and planning method coupled with deep models and rules according to claim 2, characterized in that, The boundary constraint cost function is defined as follows: ; in, To cover the radius of the circle of the vehicle, For the first From the boundary point to the... i The distance to the center of a circle covering the vehicle. To minimize the distance margin from the boundary, , The length of the vehicle is [length of vehicle]. The width of the vehicle. N This represents the number of boundary points.

4. The autonomous driving decision-making and planning method coupled with deep models and rules according to claim 1, characterized in that, The loss function is defined as: ; in, Let be the game interaction loss function. Let be the probability loss function. To control the loss function, To mimic the loss function.

5. The autonomous driving decision-making and planning method coupled with deep models and rules according to claim 4, characterized in that, The control loss function is defined as follows: ; ; ; ; in, To control the loss weighting coefficient, For vehicles in t Status information at any given moment for x The position of the shaft for y The position of the axis Orientation angle It is the true value locus x Axis position, y Axis position and orientation angle, For norm functions, For planning time.