A collaborative control method for connected vehicles based on deep reinforcement learning

Through the multi-agent framework and reward function design of deep reinforcement learning, the high-dimensional constraint problem in collaborative driving of multiple connected vehicles is solved, effective control in complex traffic environments is achieved, and the versatility and efficiency of the algorithm are improved.

CN118690786BActive Publication Date: 2024-10-25JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411165362.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-10-25
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

When existing technologies deal with collaborative driving of multiple connected vehicles, they face high-dimensional constraints, resulting in non-convex control problems that are difficult to solve. Moreover, traditional methods lack versatility in mixed traffic environments and cannot effectively handle dynamic traffic flow and lane-changing scenarios. calculation deviation.

Method used

Adopt a collaborative control method for connected vehicles based on deep reinforcement learning, build a multi-agent reinforcement learning framework, define a reward function under a non-complete cooperative relationship, combine the strategy network and value network, and use the real trajectory or simulation data of autonomous vehicles to conduct Imitation learning achieves both overall traffic flow control and single-agent constraints.

Benefits of technology

It achieves the balance between the overall traffic flow control objective and the single-agent constraints of connected vehicles under a non-complete cooperative relationship, improves the versatility and generalization ability of the algorithm, reduces ineffective exploration, speeds up the convergence speed, and is suitable for complex traffic environments. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690786B_ABST
    Figure CN118690786B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of road vehicle control, and relates to a networked vehicle collaborative control method based on deep reinforcement learning. The method uses an expert data set as sample data for imitation learning, generates a behavior decision network Φ through a behavior cloning algorithm, and is used for the behavior strategy in heterogeneous reinforcement learning; constructs an actor-critic framework, each agent corresponds to a policy network and a value network, improves the value network and the policy network through a recurrent neural network, and adds an attention mechanism to the value network; then trains the value network and the policy network, uses the deterministic policy gradient principle to update the policy network, and uses the TD algorithm to update the value network. After the training is completed, the policy network is the control network, which is deployed to the vehicle side through V2X communication. The vehicle side obtains the required information through perception, inputs the control network to obtain the control measures, and completes the collaborative control of the networked vehicle. The method can achieve the overall control goal of the traffic flow and the constraints of the single agent of the networked vehicle, which is more in line with realistic conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of road vehicle control, and specifically, relates to a collaborative control method for networked vehicles based on deep reinforcement learning. Background Art

[0002] In recent years, artificial intelligence has developed rapidly, and autonomous driving technology has developed rapidly as well. A mixed traffic environment with the coexistence of human-driven vehicles (HDV) and connected autonomous vehicles (CAV) has been formed on the current roads. Wang Meng's 2022 doctoral dissertation published "Analysis of Following Behavior and Queue Control in Mixed Traffic Flow", modeling following behavior for CAV and HDV, treating mixed fleets as following systems, and studying the impact of system input on the stability of the following system based on system control theory. Chinese patent CN 116088530 A discloses "Reinforcement Learning Autonomous Driving Fleet Control Method Based on Model Predictive Control Guidance", which studies queue control from the perspective of deep reinforcement learning, but the driving behavior based on a specific queue structure is not very applicable under realistic conditions. At the same time, the above research focuses on the longitudinal control level of mixed traffic flow, and few studies involve both lateral (lane change) and longitudinal (following) dimensions.

[0003] Tian Daxin, Zhang Peiyu and others published several reports such as "Robust Model Predictive Control Method for Connected Vehicle Formation". The proposed model predictive control method models the entire process of CAV formation driving, but this type of traditional method will face different degrees of high-dimensional constraints when dealing with the cooperative driving behavior of multiple CAVs. These constraints include but are not limited to distance error constraints, speed error constraints, etc. These constraints may cause the control problem to be non-convex and difficult to solve. At the same time, the existence of too many constraints also shows that this method can only be applied to some simple scenarios and is not universal. Chinese patent CN 115688861 A discloses "A modular graph reinforcement learning system for mixed traffic environment behavior decision-making". Considering that the mixed traffic environment has strong randomness, in order to represent this randomness, combined with graph theory, the graph theory modeling environment interacts with vehicles and workshops to form a representation of the state in reinforcement learning, thereby ensuring the generation of cooperative driving behavior. However, traffic flow is essentially dynamic, and taking static graphs to model mixed traffic scenes at each step does not give full play to the nature of graph theory in processing dynamic data. Cheng Long's 2022 master's thesis "Research on Driving Decision-making of Intelligent Connected Vehicles in Forced Lane Changing Scenarios Based on Deep Reinforcement Learning" considers a multi-lane collaborative lane changing scenario. Each intelligent agent considers the information of the four surrounding vehicles, but the perception range cannot fully cover the traffic flow, which will lead to incomplete global state acquisition and thus cause calculation deviations. Summary of the invention

[0004] In view of the above-mentioned technical problems and defects, the purpose of the present invention is to provide a connected vehicle collaborative control method based on deep reinforcement learning. The method provides a connected vehicle collaborative control reward design method under a non-completely cooperative relationship. The setting of rewards under a non-completely cooperative relationship takes into account the overall control objectives of the traffic system and the constraints of the single intelligent agent of the connected vehicle, which can achieve the overall control objectives of the traffic system and the constraints of the single intelligent agent of the connected vehicle, and is more in line with realistic conditions.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] A method for coordinated control of connected vehicles based on deep reinforcement learning, the method comprising the following steps:

[0007] Step 1. Build an expert dataset D through the real trajectory or simulation data of the autonomous driving vehicle, use the expert dataset D as the sample data for imitation learning, and generate a behavior decision network Φ through the behavior cloning algorithm;

[0008] Step 2. Construct a multi-agent reinforcement learning framework. The multi-agent reinforcement learning framework adopts an actor-critic framework and regards the connected vehicles as agents in reinforcement learning. Each agent corresponds to a policy network and a value network. The range of the vehicle group consisting of m agents is called F m , define the multi-agent state space, action space, and reward function as:

[0009] Local State ;

[0010] Global State ;

[0011] In the formula, represents the i-th agent at time t The local observation information at the time, Represents autonomous vehicles t The properties of time, … It represents the properties of the surrounding at most n-1 vehicles at time t, and m refers to the number of agents;

[0012] Action Space ;

[0013] In the formula, At refers to the joint action, refer to i Agent t Momentary action;

[0014] Reward Function ;

[0015] ;

[0016] ;

[0017] ;

[0018] ;

[0019] ;

[0020] ;

[0021] ;

[0022] ;

[0023] In the formula, Rt represents the reward value given to the multi-agent system according to the changes in the environment after taking action at time t. represents the original reward, b is the number of all vehicles within the range of Fm, Indicates i The collision reward of the agent, Indicates i Stable rewards for agents, Indicates i The acceleration rate of the agent; Indicates i The rule reward for the agent, w Half the width of the vehicle. L Refers to lane width; Indicates i The safe distance reward for the agent, TTC, represents the time required for two vehicles to collide when the speed of the rear vehicle is greater than that of the front vehicle in the same lane; Indicates i The speed limit reward for agent number, Indicates the maximum speed limit, Indicates i The speed of the agent, Indicates i No. Intelligent Agent t The lateral position on the simulated road at any given moment, with the rightmost side of the road being 0 and the leftmost side being 2L; represents the penalty reward of the i-th agent; Indicates a collision; Indicates taking the absolute value; represents the TTC value of the i-th agent;

[0024] Build a strategy network and a value network. The value network includes a recurrent layer, a multi-head attention layer, and a fully connected layer. Each agent observes a variable-length sequence. The vector output after inputting the loop layer is splicing, and then input into the multi-head attention layer and the fully connected layer; the value network is represented as Q (St, At, ), Parameters representing the value network;

[0025] The policy network includes a recurrent layer, a fully connected layer, and a variable-length sequence observed by each agent. Input the recurrent layer, the output vector of the recurrent layer is used as the input of the next recurrent layer, and the vector output by the last recurrent layer is input into the fully connected layer; the policy network is represented by π( , ), Represents the parameters of the policy network;

[0026] Step 3. Train the value network and policy network built in step 2. During centralized training, the value network and all policy networks are deployed to the central controller. The specific training steps are as follows:

[0027] Step 3.1. Construct a traffic simulation scenario, input the traffic data into the behavior decision network Φ built in step 1, collect the experience quadruple (St, At, Rt, St+1) through simulation and put it into the experience playback cache; where, The calculation formula is:

[0028] ;

[0029] get ;

[0030] In the formula, is with For vectors of the same latitude, each element is independently drawn from a standard normal distribution;

[0031] Step 3.2. Run the simulation;

[0032] Collect experiences according to the defined Fm range and form an experience replay cache;

[0033] Step 3.3. Initialize the policy network and value network; the policy network parameters are , the target strategy network parameters are , the value network parameters are , the target value network parameters are ;

[0034] Step 3.4. Randomly extract a quadruple (St, At, Rt, St+1) from the experience replay buffer;

[0035] Step 3.5. The target policy network of n agents makes predictions and calculates the target action at time t+1 :

[0036] i = 1, 2, ....n;

[0037] Summarize all agents at time t+1 and get the target action :

[0038] ;

[0039] Step 3.6. The target value network of n agents predicts and calculates the target q value at time t+1 :

[0040] i = 1, 2, ....n;

[0041] Step 3.7. TD algorithm updates the value network parameters;

[0042] Calculating TD Target :

[0043] i = 1, 2, ....n;

[0044] Where γ is the discount rate;

[0045] Calculate the q value at time t, that is , where i and t represent agent i at time t:

[0046] i = 1, 2, ....n;

[0047] Calculating TD Error ;

[0048] i = 1, 2, ....n;

[0049] TD algorithm updates the value network parameters:

[0050] i = 1, 2, ....n;

[0051] In the formula, is the learning rate;

[0052] Step 3.8 The deterministic policy gradient algorithm updates the policy network parameters;

[0053] Calculate the predicted action at time t :

[0054] i = 1, 2, ....n;

[0055] The sum of all the actions predicted by the agents at time t :

[0056] Summarize as

[0057] Update policy network parameters;

[0058] i = 1, 2, ....n;

[0059] In the formula, is the learning rate;

[0060] Step 3.9 updates other parameters of the policy network and value network, including target policy network parameters, target value network parameters, policy network recurrent layer parameters, value network recurrent layer parameters, and multi-head self-attention layer parameters;

[0061] Step 3.10. Repeat steps 3.1-3.9, continue training and add experience to the experience replay cache;

[0062] Step 3.11. Convergence judgment, under non-complete cooperation, the judgment criterion for training convergence is Nash equilibrium;

[0063] Step 4. After training is completed, the policy network becomes the control network and is deployed to the vehicle through V2X communication. The vehicle obtains the required information through perception and inputs it into the control network to obtain control measures, thus completing the collaborative control of the connected vehicles.

[0064] As a preferred embodiment of the present invention, the step 1 specifically comprises the following steps:

[0065] Step 1.1. Construct an expert dataset D of autonomous driving vehicle trajectories, wherein the expert dataset D includes the self-driving vehicle attribute information and surrounding vehicle attribute information within the perception range at each time step of the real autonomous driving vehicle trajectory or simulation data;

[0066] Step 1.2. Construct a deep recurrent neural network to process the time series data in step 1.1, wherein the deep recurrent neural network is an LSTM long short-term memory network;

[0067] Step 1.3. Train the LSTM long short-term memory network using the training set data; the training set data is the attributes of the autonomous driving vehicle itself and the attributes of the surrounding vehicles within the perception range at each time step, where the label data is the two-dimensional data of the acceleration and steering angle of the autonomous driving vehicle at the next time step;

[0068] Step 1.4. The trained LSTM long short-term memory network is recorded as the behavior decision network Φ.

[0069] As a preferred embodiment of the present invention, in step 1.1, the vehicle attribute information includes position, speed, acceleration, steering angle, and lane; the surrounding vehicle attribute information includes speed, position, acceleration, steering angle and topological relationship; the surrounding vehicles within the perception range refer to the previous vehicle V1 and the next vehicle V2 in the same lane as the autonomous driving vehicle and all vehicles in the other lane within the length interval between V1 and V2.

[0070] As a preferred embodiment of the present invention, in step 1.2, the input of the LSTM long short-term memory network The information of the autonomous driving vehicle and the surrounding vehicles within the perception range at each time step is as follows:

[0071] ;

[0072] i = 1,2,3,…n;

[0073] In the formula, n represents the total number of vehicles within the sensing range, including the autonomous driving vehicle. Refers to the information of vehicle i at time t, Refers to the lane number where vehicle i is located at time t, refers to the absolute speed of car i at time t, is the acceleration of car i at time t, It refers to the steering angle of vehicle i at time t, res(x,y) refers to the position relative to the autonomous driving vehicle. For the autonomous driving vehicle itself, res(x,y) is (0,0).

[0074] As a preferred embodiment of the present invention, in step 2, The calculation method is:

[0075] ;

[0076] In the formula, v f is the speed of the front vehicle in a lane, v b is the speed of the following vehicle in a lane, HL The distance between two vehicles.

[0077] As a preferred embodiment of the present invention, in step 3, the target strategy network parameters and the target value network parameters are updated in the following manner:

[0078] ;

[0079] ;

[0080] In the formula, is the learning rate; the parameters of the recurrent layer of the policy network are updated by back propagation, and the parameters of the recurrent layer and multi-head self-attention layer of the shared parameters in the value network are updated by back propagation. The loss function is the mean of the TD errors of n agents, and the learning rate is μ.

[0081] As a preferred embodiment of the present invention, in step 3, the discount rate γ is 0.9, the learning rate α is 1e-4, the learning rate β is 1e-3, and the learning rate The learning rate μ is 1e-3, the number of multi-head self-attention layers is 4, and the sampling step is 0.5s.

[0082] Advantages and beneficial effects of the present invention:

[0083] (1) The present invention provides an off-policy paradigm based on learning. The decision network is obtained by imitating the driving strategy of the autonomous driving vehicle on the current road, and the decision is used as the behavioral strategy in the different strategy in reinforcement learning. This method makes the exploration of the intelligent agent more consistent with the driving strategy of the actual networked vehicle, reduces the ineffective exploration in reinforcement learning, and accelerates the convergence speed. At the same time, the advantages of different strategy reinforcement learning are used to perform priority experience playback or reuse experience.

[0084] (2) The present invention takes into account the non-fully cooperative multi-agent relationship and provides a method for designing rewards for collaborative control of connected vehicles under non-fully cooperative relationships. The setting of rewards under non-fully cooperative relationships takes into account both the overall control objectives of the traffic flow system and the constraints of the single agent of the connected vehicle. It can achieve the overall control objectives of the traffic flow and the constraints of the single agent of the connected vehicle, which is more in line with realistic conditions.

[0085] (3) The present invention models the collaborative control problem of connected vehicles in a mixed environment as a sequential decision-making problem, implements the learning of the collaborative control method of connected vehicles on a simulator, controls the connected vehicles as connected vehicles, regards the connected vehicles as intelligent agents in reinforcement learning, describes the randomness of vehicle positions on actual roads through a recurrent neural network, adds an attention mechanism to the reinforcement learning value network, and uses the attention mechanism to optimize the algorithm performance to avoid the reduction of network performance due to redundant traffic information.

[0086] (4) The fleet or traffic flow to be controlled by the present invention is no longer fixed to a certain paradigm. The randomly composed vehicle groups can be trained and controlled by the algorithm provided by the present invention, and the generalization ability is stronger. In addition, the implementation process of the method is offline training and online deployment. The simulator simulates the real environment. After the training is completed, the vehicle side can be deployed, which is scalable and universal. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more apparent and easy to understand. In the accompanying drawings:

[0088] Figure 1 This is a flow chart of the networked vehicle collaborative control method based on deep reinforcement learning of the present invention;

[0089] Figure 2 Schematic diagram of the LSTM network structure used in the present invention; wherein x t Represents input, h t-1 and h t They are all hidden states, the difference is h t-1 is the output of the previous layer, h t is the output of this layer;

[0090] Figure 3 Schematic diagram of the steering angle of the AV vehicle of the present invention; wherein, represents the steering angle of the AV vehicle;

[0091] Figure 4 This is a schematic diagram of the improved value network structure in the present invention;

[0092] Figure 5 Schematic diagram of the improved strategy network structure in the present invention. DETAILED DESCRIPTION

[0093] In order to enable those skilled in the art to better understand the technical solution and advantages of the present invention, the present application is described in detail below in conjunction with the accompanying drawings, but it is not intended to limit the protection scope of the present invention.

[0094] This embodiment provides a connected vehicle collaborative control method based on deep reinforcement learning, which is essentially an algorithm for solving the collaborative control of connected vehicles in a mixed fleet, and its purpose is to provide collaborative decision-making driving behavior for connected vehicles under mixed traffic conditions.

[0095] The present invention takes the main lane (a two-lane highway in this embodiment as an example) and mixed traffic flow within a certain range as the research object, and provides a networked vehicle cooperative control method based on deep reinforcement learning. Figure 1 As shown, the networked vehicle cooperative control method based on deep reinforcement learning includes the following steps:

[0096] Step 1. Build an expert dataset D through the real trajectory or simulation data of the autonomous driving vehicle, use the expert dataset D as the sample data for imitation learning, and generate a behavior decision network Φ through the behavior cloning algorithm.

[0097] The behavior cloning algorithm only needs an offline expert data set D to complete the learning of the behavior control strategy, and obtains the control scheme closest to the expert strategy through supervised learning; the step 1 specifically includes the following steps:

[0098] Step 1.1. Construct an expert dataset D of autonomous driving vehicle trajectories, wherein the expert dataset D includes: the vehicle attribute information of the real autonomous driving vehicle trajectory or the simulation data at each time step, wherein the vehicle attribute information includes position, speed, acceleration, steering angle, lane, etc.; and the surrounding vehicle attribute information within the perception range, wherein the surrounding vehicle attribute information includes speed, position, acceleration, steering angle and topological relationship.

[0099] In this embodiment, the surrounding vehicles within the perception range refer to the previous vehicle V1 and the next vehicle V2 in the same lane as the autonomous driving vehicle (AV vehicle) and all vehicles in the other lane within the length interval between V1 and V2.

[0100] Step 1.2. Construct a deep recurrent neural network to process the time series data in step 1.1, wherein the deep recurrent neural network is an LSTM long short-term memory network;

[0101] In this embodiment, the network structure of the LSTM long short-term memory network is as follows: Figure 2 As shown, the input of the LSTM long short-term memory network The information of the AV vehicle and surrounding vehicles at each time step is as follows:

[0102] ;

[0103] i = 1,2,3,…n;

[0104] In the formula, n represents the total number of vehicles including AV vehicles within the sensing range. Refers to the information of vehicle i at time t, Refers to the lane number where vehicle i is located at time t, refers to the absolute speed of car i at time t, is the acceleration of car i at time t, refers to the steering angle of vehicle i at time t, res(x,y) refers to the position relative to the AV vehicle. For the AV vehicle itself, res(x,y) is (0,0); for other vehicles within the sensing range, res(x,y) refers to the position relative to the AV vehicle, with the left and the front being positive. The description of the steering angle is shown in the figure below: Figure 3 As shown, the left side of the front of the vehicle is positive and the right side is negative.

[0105] Step 1.3. Use the training set data to train the LSTM long short-term memory network;

[0106] The attributes of the autonomous driving vehicle (AV vehicle) itself and the attributes of the surrounding vehicles within the perception range at each time step are used as training set data, and the label data is the two-dimensional data of the acceleration and steering angle of the autonomous driving vehicle (AV vehicle) at the next time step. The training set data is used to train the LSTM long short-term memory network;

[0107] Specifically, the label of the LSTM long short-term memory network is , that is, the label data is the two-dimensional data of the acceleration and steering angle of the autonomous driving vehicle (AV vehicle) at time t+1.

[0108] Step 1.4. The trained LSTM long short-term memory network is recorded as the behavior decision network Φ, which is used for the behavior strategy in the different-strategy reinforcement learning in the subsequent steps.

[0109] Step 2. Construct a multi-agent reinforcement learning framework (MARL framework), regard the connected vehicle as an agent in reinforcement learning, determine the multi-agent relationship as a non-completely cooperative relationship, and determine the joint action space as a continuous control space.

[0110] The MARL framework described in this embodiment adopts the actor-critic framework. Each intelligent agent corresponds to a policy network and a value network. The architecture is centralized training + decentralized decision-making. The centralized training process requires intelligent agent communication. The value network and all policy networks are deployed on the central controller. After the training is completed, there is no more communication. The policy network is deployed to the corresponding intelligent agent so that it can make independent decisions based on local observations.

[0111] This embodiment improves the value network and the policy network through a recurrent neural network, and adds an attention mechanism to the value network; the specific steps of step 2 are as follows:

[0112] Step 2.1. According to the perception range in step 1.1, when other agents appear within the perception range of an agent, the perception range is superimposed, otherwise the experience is collected as a single agent. The perception range has an upper limit m max , m max It means that there are at most m agents within the sensing range, and the range of the vehicle group consisting of m agents is called F m ; Define multi-agent state space, action space, and reward function;

[0113] Defining local state . Indicates i Agent No. (autonomous driving vehicle No. i) at time t The local observation information at time t includes the information of the vehicle itself and the surrounding vehicles at time t, as follows:

[0114] ;

[0115] In the formula, Represents autonomous vehicles t The properties of time, … represents the attributes of the surrounding n-1 vehicles at most at time t;

[0116] ;

[0117] In the formula, refer to t time i The number of the lane the car is in, refer to t time i The absolute speed of the car, refer to t time i The car's acceleration, refer to t time i The steering angle of the car, Refers to the position relative to the AV vehicle, with the left and the front being positive. For the AV vehicle, is (0, 0), abs(x,y) Used to describe the absolute position of an AV vehicle. The absolute position refers to the absolute position within a perception range. The starting point in the perception range is the center point of the vehicle located on the right side of the road, and the front and left sides are positive directions. In addition, in actual practice, other AV vehicles within the perception range of an AV vehicle are regarded as non-AV vehicles. Therefore, the same Each of of abs(x,y) All the same.

[0118] Define the global state St. The global state is a representation of a global state in the multi-agent reinforcement learning system. In this algorithm, the global state is defined as follows:

[0119] ;

[0120] Where St is the global state information, Refers to i No. Intelligent Agent t The local observation information at the time, m refers to the number of agents.

[0121] Define the action space At. This algorithm considers continuous control, so the actions of the agent are made continuous. To ensure full coverage of the action range, the joint action space is defined as follows:

[0122] ;

[0123] ;

[0124] In the formula, At refers to the joint action, refer to i Agent t The action of the moment, refer to t time i The acceleration of the agent, refer to t time i The agent’s steering angle;

[0125] Define the reward function Rt. In the setting of non-complete cooperation, the rewards obtained by each agent may not be the same. One of the reward functions is a function that reflects the overall speed discreteness. The reward function also includes a penalty reward to constrain the learning process. When the behavior of the agent violates the rules or common sense, a penalty reward is given. The reward function is expressed as follows:

[0126] ;

[0127] ;

[0128] ;

[0129] In the formula, Rt represents the reward value given to the multi-agent system according to the change of the environment after taking action at time t, which includes the original reward and penalty reward R penalty ; Penalty reward R penalty It includes many items, including collision penalty, intelligent vehicle body instability penalty, traffic rule penalty, safety distance penalty, speed limit penalty, etc.

[0130] In this embodiment, the original reward is a function of the discrete degree of vehicle speed. The calculation method of the original reward and the penalty reward is as follows:

[0131] ;

[0132] ;

[0133] ;

[0134] ;

[0135] ;

[0136] ;

[0137] In the formula, represents the original reward, b is the number of all vehicles within the range of Fm, Indicates i The collision reward of the agent, Indicates i Stable rewards for agents, Indicates i The acceleration rate of the agent; Indicates i The rule reward for the agent, w Half the width of the vehicle. L Refers to lane width; Indicates i The safe distance reward for the agent, TTC, represents the time required for two vehicles to collide when the speed of the rear vehicle is greater than that of the front vehicle in the same lane; Indicates i The speed limit reward for agent number, Indicates the maximum speed limit, Indicates i The speed of the agent, Indicates i Intelligent Agent t The lateral position on the simulated road at any given moment, with the rightmost side of the road being 0 and the leftmost side being 2L; represents the penalty reward of the i-th agent; Indicates a collision; Indicates taking the absolute value; Represents the TTC value of the i-th agent.

[0138] In this embodiment, The calculation method is as follows:

[0139] Assume that the speeds of the two vehicles in front and behind on a lane are , ,in v f is the speed of the vehicle ahead, v b is the speed of the following vehicle, and the distance between the two vehicles is HL ,but .

[0140] Step 2.2. Build the value network and strategy network framework. In multi-agent reinforcement learning, centralized training requires agents to communicate during the training phase to obtain global state information. In this embodiment, the value network is a composite network, including a recurrent layer, a multi-head attention layer, and a fully connected layer, represented by Q (St, At, ), represents the parameters of the value network; decentralized decision-making allows the agent to make decisions based on its own local observations without the need for communication, and the policy network is represented by π ( , ), the input of the policy network is the local observation state of the current agent, Represents the parameters of the policy network; each agent corresponds to a policy network and a value network.

[0141] In this embodiment, the input of the policy network and the value network includes variable length sequences Therefore, a recurrent neural network (recurrent layer) is used to improve the value network and the policy network, and a multi-head attention layer is added to the value network to improve the performance of the value network. The structure of the value network and the policy network is as follows: Figure 4 , as shown in 5.

[0142] like Figure 4 As shown in the figure, the data processing flow of the value network is: each agent observes a variable-length sequence The vector output after inputting the loop layer is splicing, and then input the multi-head attention layer and the fully connected layer. After the fully connected layer, the q value is output. q is the action value function, which is used to describe the execution in the St state. The quality of the action.

[0143] like Figure 5 As shown in the figure, the data processing flow of the policy network is: each agent observes a variable-length sequence The output vector of the loop layer is used as the input of the next loop layer. The output vector of the last loop layer is input into the fully connected layer, and the continuous action is output after the fully connected layer.

[0144] Step 3. Train the value network and policy network built in step 2.2. Assume that there is a system consisting of n agents, each agent corresponds to a policy network and a value network, and the deterministic policy gradient principle is used to update the policy network, and the TD algorithm is used to update the value network; when training the algorithm, the target network is added to improve the algorithm performance, and the behavior strategy is used to collect experience, and the value network and policy network are updated; the specific steps of step 3 are as follows:

[0145] Step 3.1. Build a traffic simulation scenario in the traffic simulation software SUMO. Pre-input the traffic flow, assign a certain number of vehicles to the behavior decision network Φ built in step 1 through the built-in traci interface, collect the experience quadruple (St, At, Rt, St+1) through simulation and put it into the experience playback cache.

[0146] In practice, random noise is added to the action. The calculation formula is:

[0147] ;

[0148] get ;

[0149] In the formula, is with For vectors of the same latitude, each element is independently drawn from a standard normal distribution, which is equivalent to random noise;

[0150] Step 3.2. Run the simulation;

[0151] Experience is collected and classified according to the Fm range defined above to form an experience reply buffer.

[0152] Step 3.3. Initialize the policy network and value network; the policy network parameters are , the target strategy network parameters are , the value network parameters are , the target value network parameters are ;

[0153] Step 3.4. Randomly extract a quadruple (S) from the experience replay buffer t ,A t ,R t ,S t+1 );

[0154] Step 3.5. The target policy network of n agents makes predictions and calculates the target action at time t+1 :

[0155] i = 1, 2, ....n;

[0156] Summarize all agents at time t+1 and get the target action :

[0157] ;

[0158] Step 3.6. The target value network of n agents predicts and calculates the target q value at time t+1 :

[0159] i = 1, 2, ....n;

[0160] Step 3.7. TD algorithm updates the value network parameters;

[0161] Calculating TD Target :

[0162] i = 1, 2, ....n;

[0163] Where γ is the discount rate;

[0164] Calculate the q value at time t, that is , where i and t represent agent i at time t:

[0165] i = 1, 2, ....n;

[0166] Calculating TD Error ;

[0167] i = 1, 2, ....n;

[0168] TD algorithm updates the value network parameters:

[0169] i = 1, 2, ....n;

[0170] In the formula, is the learning rate;

[0171] Step 3.8 The deterministic policy gradient algorithm updates the policy network parameters;

[0172] Calculate the predicted action at time t :

[0173] i = 1, 2, ....n;

[0174] The sum of all the actions predicted by the agents at time t :

[0175] Summarize as

[0176] Update policy network parameters;

[0177] i = 1, 2, ....n;

[0178] In the formula, is the learning rate;

[0179] Step 3.9 updates other parameters of the policy network and value network, including target policy network parameters, target value network parameters, policy network recurrent layer parameters, value network recurrent layer parameters, and multi-head self-attention layer parameters.

[0180] In this embodiment, the target policy network parameters and the target value network parameters are updated according to the following formula, the policy network recurrent layer parameters are updated according to back propagation, the recurrent layer of the shared parameters in the value network and the multi-head self-attention layer are updated according to back propagation, the loss function is the mean of the TD errors of n agents, the update step size is the same as above, and the learning rate is μ.

[0181] ;

[0182] ;

[0183] In the formula, is the learning rate;

[0184] Step 3.10. Repeat steps 3.1-3.9, continue training and add experience to the experience replay cache;

[0185] Step 3.11. Convergence judgment, in a non-completely cooperative relationship, the judgment criterion for training convergence is Nash equilibrium. In a multi-agent system, if all other agents do not change their strategies, a single agent cannot increase its expected return by changing its strategy.

[0186] In this embodiment, the hyperparameter settings and hyperparameter values ​​are shown in Table 1.

[0187] Table 1 Hyperparameter settings of value network and policy network

[0188] Parameter name Parameter Value Parameter name Parameter Value Discount rate γ 0.9 Learning rate α 1e-4 Experience replay cache capacity 100000 Learning rate β 1e-3 Initial values ​​of fully connected layer parameters Xavier initial value Learning rate τ 1e-3 Number of rounds 1000 Learning rate μ 1e-3 Initial values ​​of non-fully connected layer parameters He initial value Random Noise ε Type Gaussian noise Multi-head self-attention layer 4 Acquisition step 0.5s

[0189] Step 4. After training is completed, the policy network becomes the control network and is deployed to the vehicle through V2X communication. The vehicle obtains the required information through perception and inputs it into the control network to obtain control measures, thus completing the collaborative control of the connected vehicles.

[0190] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art of the present invention, according to the idea of ​​the present invention, some simple deductions, deformations or substitutions can be made. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A networked vehicle cooperative control method based on deep reinforcement learning, characterized in that: The method comprises the following steps: Step 1. Build an expert dataset D through the real trajectory or simulation data of the autonomous driving vehicle, use the expert dataset D as the sample data for imitation learning, and generate a behavior decision network Φ through the behavior cloning algorithm; Step 2. Construct a multi-agent reinforcement learning framework. The multi-agent reinforcement learning framework adopts an actor-critic framework and regards the connected vehicles as agents in reinforcement learning. Each agent corresponds to a policy network and a value network. The range of the vehicle group consisting of m agents is called F m , define the multi-agent state space, action space, and reward function as: Local State ; Global State ; In the formula, represents the i-th agent at time t The local observation information at the time, Represents autonomous vehicles t The properties of time, … It represents the properties of the surrounding at most n-1 vehicles at time t, and m refers to the number of agents; Action Space ; In the formula, At refers to the joint action, refer to i Agent t Momentary action; Reward Function ; ; ; ; ; ; ; ; ; In the formula, Rt represents the reward value given to the multi-agent system according to the changes in the environment after taking action at time t. represents the original reward, b is the number of all vehicles within the range of Fm, Indicates i The collision reward of the agent, Indicates i Stable rewards for agents, Indicates i The acceleration rate of the agent; Indicates i The rule reward for the agent, w Half the width of the vehicle. L Refers to lane width; Indicates i The safe distance reward for the agent, TTC, represents the time required for two vehicles to collide when the speed of the rear vehicle is greater than that of the front vehicle in the same lane; Indicates i The speed limit reward for agent number, Indicates the maximum speed limit, Indicates i The speed of the agent, Indicates i No. Intelligent Agent t The lateral position on the simulated road at any given moment, with the rightmost side of the road being 0 and the leftmost side being 2L; represents the penalty reward of the i-th agent; Indicates a collision; Indicates taking the absolute value; represents the TTC value of the i-th agent; Build a strategy network and a value network. The value network includes a recurrent layer, a multi-head attention layer, and a fully connected layer. Each agent observes a variable-length sequence. The vector output after inputting the loop layer is splicing, and then input into the multi-head attention layer and the fully connected layer; the value network is represented as Q (St, At, ), Parameters representing the value network; The policy network includes a recurrent layer, a fully connected layer, and a variable-length sequence observed by each agent. Input the recurrent layer, the output vector of the recurrent layer is used as the input of the next recurrent layer, and the vector output by the last recurrent layer is input into the fully connected layer; the policy network is represented by π( , ), Represents the parameters of the policy network; Step 3. Train the value network and policy network built in step S2. During centralized training, the value network and all policy networks are deployed to the central controller. The specific training steps are as follows: Step 3.

1. Construct a traffic simulation scenario, input the traffic data into the behavior decision network Φ built in step 1, collect the experience quadruple (St, At, Rt, St+1) through simulation and put it into the experience playback cache; where, The calculation formula is: ; get ; In the formula, is with For vectors of the same latitude, each element is independently drawn from a standard normal distribution; Step 3.

2. Run the simulation; Collect experiences according to the defined Fm range and form an experience replay cache; Step 3.

3. Initialize the policy network and value network; the policy network parameters are , the target strategy network parameters are , the value network parameters are , the target value network parameters are ; Step 3.

4. Randomly extract a quadruple (St, At, Rt, St+1) from the experience replay buffer; Step 3.

5. The target policy network of n agents makes predictions and calculates the target action at time t+1 : i = 1,2,....n; Summarize all agents at time t+1 and get the target action : ; Step 3.

6. The target value network of n agents predicts and calculates the target q value at time t+1 : i = 1,2,....n; Step 3.

7. TD algorithm updates the value network parameters; Calculating TD Target : i = 1,2,....n; Where γ is the discount rate; Calculate the q value at time t, that is , where i and t represent agent i at time t: i = 1,2,....n; Calculating TD Error ; i = 1,2,....n; TD algorithm updates the value network parameters: i = 1,2,....n; In the formula, is the learning rate; Step 3.

8. Deterministic policy gradient algorithm updates policy network parameters; Calculate the predicted action at time t : i = 1,2,....n; The sum of all the actions predicted by the agents at time t : Summarize as ; Update policy network parameters; i = 1,2,....n; In the formula, is the learning rate; Step 3.

9. Update other parameters of the policy network and value network, including target policy network parameters, target value network parameters, policy network recurrent layer parameters, value network recurrent layer parameters, and multi-head self-attention layer parameters; Step 3.

10. Repeat steps 3.1-3.9, continue training and add experience to the experience replay cache; Step 3.

11. Convergence judgment, under non-complete cooperation, the judgment criterion for training convergence is Nash equilibrium; Step 4. After training is completed, the policy network becomes the control network and is deployed to the vehicle through V2X communication. The vehicle obtains the required information through perception and inputs it into the control network to obtain control measures, thus completing the collaborative control of the connected vehicles.

2. A networked vehicle cooperative control method based on deep reinforcement learning according to claim 1, characterized in that: The step 1 specifically comprises the following steps: Step 1.

1. Construct an expert dataset D of autonomous driving vehicle trajectories, wherein the expert dataset D includes the self-driving vehicle attribute information and surrounding vehicle attribute information within the perception range at each time step of the real autonomous driving vehicle trajectory or simulation data; Step 1.

2. Construct a deep recurrent neural network to process the time series data in step 1.1, wherein the deep recurrent neural network is an LSTM long short-term memory network; Step 1.

3. Train the LSTM long short-term memory network using the training set data; the training set data is the attributes of the autonomous driving vehicle itself and the attributes of the surrounding vehicles within the perception range at each time step, where the label data is the two-dimensional data of the acceleration and steering angle of the autonomous driving vehicle at the next time step; Step 1.

4. The trained LSTM long short-term memory network is recorded as the behavior decision network Φ.

3. A networked vehicle cooperative control method based on deep reinforcement learning according to claim 2, characterized in that: In step 1.1, the vehicle attribute information includes position, speed, acceleration, steering angle, and lane; The attribute information of surrounding vehicles includes speed, position, acceleration, steering angle and topological relationship; the surrounding vehicles within the perception range refer to the previous vehicle V1 and the next vehicle V2 in the same lane as the autonomous driving vehicle, as well as all vehicles in the other lane within the length interval between V1 and V2.

4. A networked vehicle collaborative control method based on deep reinforcement learning according to claim 3, characterized in that: In step 1.2, the input of the LSTM long short-term memory network The information of the autonomous driving vehicle and the surrounding vehicles within the perception range at each time step is as follows: ; i = 1,2,3,…n; In the formula, n represents the total number of vehicles within the sensing range, including the autonomous driving vehicle. Refers to the information of vehicle i at time t, Refers to the lane number where vehicle i is located at time t, refers to the absolute speed of car i at time t, is the acceleration of car i at time t, It refers to the steering angle of vehicle i at time t, res(x,y) refers to the position relative to the autonomous driving vehicle. For the autonomous driving vehicle itself, res(x,y) is (0,0).

5. A networked vehicle cooperative control method based on deep reinforcement learning according to claim 4, characterized in that: In step 2, The calculation method is: ; In the formula, v f is the speed of the front vehicle in a lane, v b is the speed of the following vehicle in a lane, HL The distance between two vehicles.

6. A networked vehicle cooperative control method based on deep reinforcement learning according to claim 4, characterized in that: In step 3, the target strategy network parameters and target value network parameters are updated as follows: ; ; In the formula, is the learning rate; the parameters of the recurrent layer of the policy network are updated by back propagation, and the parameters of the recurrent layer and multi-head self-attention layer of the shared parameters in the value network are updated by back propagation. The loss function is the mean of the TD errors of n agents, and the learning rate is μ.

7. A networked vehicle cooperative control method based on deep reinforcement learning according to claim 6, characterized in that: In step 3, the discount rate γ is 0.9, the learning rate α is 1e-4, the learning rate β is 1e-3, and the learning rate The learning rate μ is 1e-3, the number of multi-head self-attention layers is 4, and the sampling step is 0.5s.