Multi-agent traffic area signal control method based on digital twin
Through the combination of digital twin technology and deep reinforcement learning algorithms, a multi-agent traffic area signal control method is designed to solve the problem of insufficient flexibility and adaptability of traditional traffic light control methods and achieve dynamic control of large-scale multi-road network traffic lights. and intelligent management of traffic flow.
Patent Information
- Application Number
- CN202410516556.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional traffic light control methods lack flexibility and intelligence and cannot be adjusted according to real-time traffic conditions, leading to congestion and delay problems. Single-agent reinforcement learning methods are difficult to adapt to complex urban traffic environments.
Using a multi-agent traffic area information control method based on digital twins, through interactive training between the real world and the virtual platform, combined with deep reinforcement learning algorithms, the state space, action space and reward function are designed to build a multi-agent deep reinforcement learning model. Real-time dynamic coordinated control of regional road networks.
It improves the model training efficiency and fitting degree of traffic light control, provides more accurate decision support, realizes intelligent control of actual traffic conditions, and improves the stability and safety of traffic flow.
Smart Images

Figure CN118097989B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a multi-agent traffic area signal control method based on digital twins. Background Art
[0002] Traditional traffic light control methods are often fixed timing control, lacking flexibility and intelligence, and unable to be flexibly adjusted according to real-time traffic conditions, which leads to problems such as congestion and delays. With the development of technology, intelligent transportation systems have become one of the important means to solve the problem of urban traffic management. Compared with other signal light control methods, the reinforcement learning-based method is very suitable for traffic signal control due to its interactive learning of optimal strategies. It can effectively improve the congestion at intersections. However, in the face of the problem of traffic signal control in large-scale multi-road networks, the single-agent-based reinforcement learning traffic signal control method does not take into account the mutual influence between adjacent intersections and is difficult to adapt to the complex urban traffic environment.
[0003] Traffic light control methods based on reinforcement learning require the use of simulation or real environments for model training. General simulation technology can only simulate the physical world in an offline manner and does not have analysis and optimization functions. At the same time, the strategies learned in the simulation environment cannot be directly deployed in the real world. Secondly, using historical traffic data or other simulation methods to train models is difficult to apply to real-time and dynamic traffic conditions. The emergence of digital twin technology provides a new solution to this problem.
[0004] With the introduction and development of digital twin technology, it has become possible to use digital twin technology to build intelligent traffic regional signal control methods. Digital twin technology is a technology that connects the physical world with the digital world. Combined with the Internet of Things, cloud computing and big data, it can create and update a virtual mirror of the physical world in real time, thereby realizing real-time simulation and prediction of the physical world. Combining digital twin technology with deep reinforcement learning algorithms and applying them to traffic light control in regional traffic networks can accurately model the environment, provide better and more accurate environmental data for deep reinforcement learning models, improve model training efficiency and model fit, provide more accurate decision support for traffic light control, and realize intelligent regulation of actual traffic conditions.
[0005] In summary, it is necessary to design a multi-agent traffic area signal control method based on digital twins to realize the dynamic regulation of traffic lights in large-scale multi-road network traffic areas. Summary of the invention
[0006] The purpose of the present invention is to solve the traffic signal control problem of large-scale multi-road networks and propose a multi-agent traffic area signal control method based on digital twins. Through interactive training between the real world and the virtual platform, real-time dynamic coordinated control of the regional road network can be achieved to relieve traffic congestion. In order to achieve this purpose, the present invention discloses a multi-agent traffic area signal control method based on digital twins, and the steps adopted are:
[0007] Step 1: Collect traffic environment data of the regional road network, build the initial digital twin module, form a digital road network, and establish a data transmission channel between the digital twin platform and the physical traffic flow through mapping technology. Then the perception detection module and the data semantic extraction module collect vehicle operation data, traffic light data and other status information in the traffic network;
[0008] Step 2: Design the state space of the traffic light control problem at the regional road network intersection. The state space consists of three parts: vehicle state information, traffic light state information, and neighbor node vehicle state information;
[0009] Step 3: Design the action space of the traffic light control problem at the intersection of the regional road network. The action space consists of three parts: maintaining the current phase, the next traffic light phase, and randomly selecting a traffic light phase;
[0010] Step 4: Design a reward function for multi-agent traffic area signal control based on deep reinforcement learning. The reward function consists of three parts: vehicle delay time sub-reward function, traffic saturation level sub-reward function and traffic safety factor sub-reward function. The final reward function is a linear coupling of the three sub-reward functions;
[0011] Step 5: Construct a network architecture for multi-agent traffic area signal control based on deep reinforcement learning. Each agent adopts the Actor-Critic reinforcement learning network architecture. Both the Actor and the Critic have two sub-networks, namely the target network and the evaluation network.
[0012] Step 6: The constructed multi-agent deep reinforcement learning model is iteratively trained, and the traffic light control strategy for the intersection is obtained after each round of iterative training. The strategy is applied to the regional traffic light control in the digital road network. After the deep reinforcement learning model is iteratively trained until the strategy converges and stabilizes, the training is stopped and the final intersection traffic light control strategy is output to control the traffic lights in the regional traffic network. The digital twin module updates its own state according to the collected new environment state information for the next round of iterative training, forming an interactive training and dynamic regulation closed loop of physical traffic and virtual platform.
[0013] As a preferred embodiment of the present invention, in step 1, the state information refers to treating each traffic light used to control the intersection in the target area road network as an intelligent entity, collecting the traffic roads controlled by it, vehicle operation data, matching detection sensor components, surrounding environment, traffic light data, etc. The vehicle operation data includes vehicle speed, vehicle waiting time, vehicle queue length, vehicle position, vehicle delay time, distance between vehicles, and traffic saturation. The traffic light data refers to the current traffic light phase.
[0014] As a preferred embodiment of the present invention, in step 2, the state space of the design area road network intersection signal light control problem is specifically:
[0015] The observation information of agent traffic light i in the tth time step consists of three parts: vehicle status information, traffic light status information and neighbor node vehicle status information.
[0016] The first part is the vehicle status information, including vehicle position, vehicle speed, and vehicle queue length. The vehicle position is represented by the matrix The vehicle speed is represented by the matrix Indicates that the length of the vehicle queue is represented by the matrix express ,in represents the queue length of the i-th lane in the t-th time step, and n represents the number of lanes that the agent can observe;
[0017] The second part of the signal light status information refers to the current signal light phase. The signal phase is a time sequence of displaying the three signal light colors of red, yellow and green. The intersection of the present invention is set with four phases, mainly divided into north-south direction and east-west direction. express;
[0018] The third part is the vehicle status information of the neighboring nodes. The Critic network introduces a discount factor when obtaining the global strategy and status. To balance the state inputs of different neighboring agents, the state gradually weakens from near to far according to the node set and the distance in space, which solves the problem of environmental instability caused by the increase in the number of agents that is common in multi-agent algorithms. At the same time, in order to ensure that the traffic flows at each intersection have a mutual influence relationship, agents that do not belong to the same trunk line are not considered even if the spatial distance is very close. For example, the traffic lights above and below the viaduct are very close in spatial distance, but the traffic flows between the two sides have no influence relationship, so they are not considered. If the agent only makes decision analysis based on the traffic conditions at the intersection it observes, it may cause the traffic flow of other connected lanes to exceed the load and fail to reach regional coordinated control. Therefore, the present invention takes the state of the neighbor nodes into consideration, and the vehicle state information of the neighbor nodes is represented by the matrix express;
[0019] In summary, the observation information of the i-th agent in the t-th time step is .
[0020] As a preferred embodiment of the present invention, in step 3, the action space of the design area road network intersection signal light control problem is specifically: the action space of the intelligent agent signal light i .in It means choosing to maintain the current phase. It means to select the next signal light phase. Refers to randomly selecting a traffic light phase. The agent needs to first determine which action to take. When choosing to maintain the current phase, the traffic light phase remains unchanged; when the agent chooses the next traffic light phase, the traffic light phase changes in the order of north-south straight, north-south left turn, east-west straight, and east-west left turn; when the agent chooses a random action, the traffic light phase will be randomly selected from the action space of maintaining unchanged, north-south straight, north-south left turn, east-west straight, and east-west left turn.
[0021] As a preferred embodiment of the present invention, in step 4, the reward function of the multi-agent traffic area signal control method based on deep reinforcement learning is specifically: in order to improve the convergence accuracy of the model and accelerate the training speed of the model, while alleviating traffic congestion, taking into account the safety of the signal light phase change, the reward function is designed to include three parts, namely, the vehicle delay time sub-reward function, the traffic saturation level sub-reward function and the traffic safety factor sub-reward function, and the final reward function is a linear coupling of the three types of sub-reward functions;
[0022] (1) Vehicle delay time sub-reward function:
[0023] ,
[0024] in is the time to cross the stop line, is the time when the vehicle was first observed, is the lane length, is the speed of the vehicle when it was first observed.
[0025] (2) Traffic saturation level sub-reward function:
[0026] ,
[0027] ,
[0028] in, is the number of vehicles queueing in lane i, is the vehicle length, is the distance between the vehicle and the vehicle in front, is the length of the lane.
[0029] (3) Traffic safety factor sub-reward function:
[0030] When the agent chooses the action "maintain", = 0, when the agent switches the phase of the traffic light, its sub-reward function for:
[0031] ,
[0032] in, is the distance between the vehicle and the vehicle in front, The distance between the vehicle and the vehicle behind.
[0033] Therefore, the reward function of the ith agent is , are the weights of the sub-reward functions, .
[0034] As a preferred embodiment of the present invention, in step 5, the network architecture for constructing a multi-agent traffic area signal control method based on deep reinforcement learning refers to that each agent in the road network adopts an Actor-Critic network architecture, which has four sub-networks, namely, an evaluation Actor network, a target Actor network, an evaluation Critic network, and a target Critic network. The Actor network is used to decide the action to be taken according to the current state of the agent, the Critic network is used to evaluate the value of the current state or action according to the global state space and action space information, and the target Actor network and the target Critic network are obtained by periodically copying the respective evaluation networks according to Soft update. In addition, an experience replay pool is introduced to store the collected historical trajectories in the experience pool, and a small batch of data is taken to calculate the mean during the update, and the trajectory is used. And dynamic programming methods, generate several behavior strategies μ to explore a target strategy π that can maximize the objective function:
[0035] ,
[0036] in represents the optimal value function under the target strategy π, E{} represents the expectation, N represents the time length of the trajectory, represents the attenuation factor, and K represents the time step after time t.
[0037] The Actor-Critic framework has two update tasks: the policy gradient update of the Actor network and the value function update of the Critic network. The policy gradient update of the Actor network is
[0038] ,
[0039] ,
[0040] in represents the policy gradient, is the performance of the target strategy, For the target strategy, Indicates status Next Select probability.
[0041] The value function of the Critic network is updated to use the TD error to calculate the error between the current state value and the next state value, and then update the parameters of the Critic network. The mean square error loss function is:
[0042] ,
[0043] During training, both the Actor and Critic networks need to participate. The Actor network first selects an action based on the current state of the environment. The Critic network calculates the Q value based on the Actor network's action and the global state to judge the quality of the action. Then, the Actor network's policy gradient update and the Critic network's value function update are performed separately. In the execution phase, the Actor network only needs to complete the strategy selection based on the traffic environment state it observes. After multiple rounds of iterations, the parameters of the Actor and Critic networks gradually converge, and the optimal strategy for regional traffic network signal control in the current state is obtained.
[0044] As a preferred embodiment of the present invention, in step 6, constructing a multi-agent deep reinforcement learning model refers to:
[0045] The digital twin technology and multi-agent algorithm are combined and applied to the traffic light control of the regional traffic network. The traffic environment and multi-agent deep reinforcement learning algorithm are embedded in the digital twin platform, and the algorithm can be trained multiple times through continuous exploration and trial and error until the optimal strategy is found.
[0046] The model is built and trained in a "centralized training, distributed execution" manner. In the training phase, the digital twin technology is used to capture and simulate the traffic environment state with high precision. Each sensor and perception component collects traffic state information and transmits the data to the digital twin platform through the data transmission channel. The platform updates its own state according to the dynamic changes of the environment and sends the state to the twin decision module. The centralized deep reinforcement learning network model is iteratively trained by observing the global traffic state and the joint actions of the intelligent body. In the execution phase, the signal light control strategy of the intersection obtained after each round of iterative training is first applied to the digital road network for regional traffic signal light control. After the strategy converges and stabilizes, the final signal light control strategy of the intersection is output for the distributed signal lights of the regional traffic road network to obtain the next environmental state of the physical traffic. At the same time, the digital twin module updates its own state according to the collected new environmental state information, which is used for the continuous training of the twin decision module, forming an interactive training and dynamic control closed loop of physical traffic and virtual platform.
[0047] Compared with the prior art, the beneficial effects of the present invention include the following aspects:
[0048] (1) The present invention uses high-precision digital twin technology to construct a regional road network with multiple intersections, and combines digital twin technology with a multi-agent algorithm to apply it to the signal light control of the regional traffic network. This allows the algorithm to be trained in a virtual space that is the same as the actual traffic environment during the model training phase, effectively improving the safety of solving actual signal light control problems and the availability of algorithm strategies.
[0049] (2) This invention adopts a cooperative multi-agent algorithm of "centralized training and distributed execution" to build and train the model. In combination with the actual traffic network, the correlation between adjacent traffic lights will change with the distance, and a discount factor is introduced. To balance the state inputs of different neighboring agents, it has clear practical guiding significance.
[0050] (3) The reward function designed by the present invention not only takes into account the effect of the signal control method in alleviating traffic congestion, but also takes into account the possibility that a traffic accident may occur if the signal light changes too quickly, thus fully ensuring the safety of the signal light when changing phases. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of the multi-agent traffic area signal control method based on digital twin proposed by the present invention;
[0052] Figure 2 This is the framework diagram of the multi-agent deep reinforcement learning twin decision model of the present invention. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0054] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0055] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0056] The following is a specific implementation of the present invention, a multi-agent traffic area signal control method based on digital twins, with reference to the accompanying drawings. The present invention aims to achieve a safer and more intelligent dynamic control method for large-scale multi-road network traffic lights through interactive model training of real traffic environment and digital twin road network.
[0057] See also Figure 1 It is a flow chart of the multi-agent traffic area signal control method based on digital twin proposed in the present invention.
[0058] In order to achieve the above object, the present invention provides a multi-agent traffic area signal control method based on digital twin, comprising the following steps:
[0059] Step 1: Obtain actual road network data from OpenStreetMap, use Carla simulation software to build a digital twin traffic environment equivalent to the actual traffic environment, form a digital road network, and use carla.TrafficLight to build corresponding traffic lights for the road network. The perception detection module and data semantic extraction module collect vehicle operation data, traffic light data and other status information in the traffic network, and map them to the digital road network to facilitate subsequent iterative optimization of strategies in the digital road network;
[0060] It should be noted that the perception detection module in the present invention includes any device installed in the road network that can perceive the status information of the carrier vehicle, common ones include roadside cameras, gantries, coils, millimeter wave radars, etc.
[0061] In addition, the data semantic extraction module is equipped with lidar sensors, radar sensors, semantic lidar sensors, RGB cameras, semantic segmentation cameras, dynamic vision sensor cameras and other sensors to extract vehicle operation data, traffic light data and other status information required by the deep reinforcement learning model.
[0062] Step 2: Design the state space of the traffic light control problem at the regional road network intersection, where the state space consists of three parts: vehicle state information, traffic light state information, and neighbor node vehicle state information;
[0063] In this embodiment, the traffic signal control problem is described as a Markov decision process (MDP), the traffic lights that control the traffic flow at the intersection are regarded as intelligent agents, and the target area road network formed by multiple connected intersections is regarded as the environment that interacts with the intelligent agent. The next state of the road network depends only on the current state and the action selected by the traffic lights, which satisfies the Markov property. Therefore, reinforcement learning can be used to solve it.
[0064] For MDP problems, state information usually refers to all the possible states that the agent is in. In this embodiment, the observation information of the agent signal light i in the tth time step consists of three parts: vehicle state information, signal light state information and neighbor node vehicle state information.
[0065] The first part is the vehicle status information, including vehicle position, vehicle speed, and vehicle queue length. The vehicle position is represented by the matrix The vehicle speed is represented by the matrix Indicates that the length of the vehicle queue is represented by the matrix express ,in represents the queue length of the i-th lane in the t-th time step, and n represents the number of lanes that the agent can observe;
[0066] The second part of the signal light status information refers to the current signal light phase. The signal phase is a time sequence of displaying the three signal light colors of red, yellow and green. The intersection of the present invention is set with four phases, mainly divided into north-south direction and east-west direction. express;
[0067] The third part is the vehicle status information of the neighboring nodes. The Critic network introduces a discount factor when obtaining the global strategy and status. To balance the state input of different neighboring agents, the state gradually weakens from near to far according to the node set and the distance in space, which solves the problem of environmental instability caused by the increase in the number of agents that is common in multi-agent algorithms. At the same time, in order to ensure that the traffic flow at each intersection has a mutual influence, agents that do not belong to the same trunk line are not considered even if the spatial distance is very close. If the agent only makes decision analysis based on the traffic conditions of the intersection it observes, it may cause the traffic flow of other connected lanes to exceed the load and fail to reach the regional coordinated control. Therefore, the present invention takes the state of the neighboring nodes into consideration. The vehicle state information of the neighboring nodes is represented by the matrix express;
[0068] In summary, the observation information of the i-th agent in the t-th time step is .
[0069] Step 3: Design the action space of the traffic light control problem at the regional road network intersection. The action space consists of three parts: maintaining the current phase, the next traffic light phase, and randomly selecting a traffic light phase.
[0070] Action space of agent traffic light i .in It means choosing to maintain the current phase. It means to select the next signal light phase. Refers to randomly selecting a traffic light phase. The agent needs to first determine which action to take. When choosing to maintain the current phase, the traffic light phase remains unchanged; when the agent chooses the next traffic light phase, the traffic light phase changes in the order of north-south straight, north-south left turn, east-west straight, and east-west left turn; when the agent chooses a random action, the traffic light phase will be randomly selected from the action space of maintaining unchanged, north-south straight, north-south left turn, east-west straight, and east-west left turn.
[0071] Step 4: Design a reward function for multi-agent traffic area signal control based on deep reinforcement learning. The reward function consists of three parts: vehicle delay time sub-reward function, traffic saturation level sub-reward function and traffic safety factor sub-reward function. The final reward function is a linear coupling of the three sub-reward functions;
[0072] The incentive function is used to evaluate the degree to which the behavior changes made by the agent in the process of interaction with the environment are beneficial to the agent itself, and is the key to whether the agent can learn a good strategy. In this embodiment, for the multi-road network traffic light control problem, its main purpose is to take into account the safety of the phase change of the signal light while relieving traffic congestion, to avoid rear-end collisions caused by too fast signal light changes, and to design a reasonable reward value to improve the convergence accuracy of the model and speed up the training of the model. Based on the above purpose, the reward function is defined as follows:
[0073] (1) Vehicle delay time sub-reward function:
[0074] ,
[0075] in is the time to cross the stop line, is the time when the vehicle was first observed, is the lane length, is the speed of the vehicle when it was first observed.
[0076] (2) Traffic saturation level sub-reward function:
[0077] ,
[0078] ,
[0079] in, is the number of vehicles queueing in lane i, is the vehicle length, is the distance between the vehicle and the vehicle in front, is the length of the lane.
[0080] (3) Traffic safety factor sub-reward function:
[0081] When the agent chooses the action "maintain", = 0, when the agent switches the phase of the traffic light, its sub-reward function for:
[0082] ,
[0083] in, is the distance between the vehicle and the vehicle in front, The distance between the vehicle and the following vehicle.
[0084] Therefore, the reward function of the ith agent is , are the weights of the sub-reward functions, .
[0085] Step 5: Build a multi-agent traffic area signal control network architecture based on deep reinforcement learning. Each agent uses the Actor-Critic reinforcement learning network architecture. Both the Actor and the Critic have two sub-networks, namely the target network and the evaluation network. Figure 2 , is the framework diagram of the multi-agent deep reinforcement learning twin decision model of the present invention, which shows the network architecture of multi-agent traffic area signal control based on deep reinforcement learning driven by digital twins.
[0086] Each agent in the road network uses an Actor-Critic network architecture, which has four sub-networks, namely the evaluation Actor network, the target Actor network, the evaluation Critic network, and the target Critic network. The Actor network is used to decide the action to be taken according to the current state of the agent, and the Critic network is used to evaluate the value of the current state or action according to the global state space and action space information. The target Actor network and the target Critic network are obtained by periodically copying the respective evaluation networks according to soft updates. In addition, an experience replay pool is introduced to store the collected historical trajectories in the experience pool. When updating, a small batch of data is taken to calculate the mean, and the trajectory is used to calculate the mean. And dynamic programming methods, generate several behavior strategies μ to explore a target strategy π that can maximize the objective function:
[0087] ,
[0088] in represents the optimal value function under the target strategy π, E{} represents the expectation, N represents the time length of the trajectory, represents the attenuation factor, and K represents the time step after time t.
[0089] The Actor-Critic framework has two update tasks: the policy gradient update of the Actor network and the value function update of the Critic network. The policy gradient update of the Actor network is
[0090] ,
[0091] ,
[0092] in represents the policy gradient, is the performance of the target strategy, For the target strategy, express Select in status probability.
[0093] The value function of the Critic network is updated to use the TD error to calculate the error between the current state value and the next state value, and then update the parameters of the Critic network. The mean square error loss function is:
[0094] ,
[0095] During training, both the Actor and Critic networks need to participate. The Actor network first selects an action based on the current state of the environment. The Critic network calculates the Q value based on the Actor network's action and the global state to judge the quality of the action. Then, the Actor network's policy gradient update and the Critic network's value function update are performed separately. In the execution phase, the Actor network only needs to complete the strategy selection based on the traffic environment state it observes. After multiple rounds of iterations, the parameters of the Actor and Critic networks gradually converge, and the optimal strategy for regional traffic network signal control in the current state is obtained.
[0096] Step 6: The constructed multi-agent deep reinforcement learning model is iteratively trained, and the traffic light control strategy for the intersection is obtained after each round of iterative training. The strategy is applied to the regional traffic light control in the digital road network. After the deep reinforcement learning model is iteratively trained until the strategy converges and stabilizes, the training is stopped and the final intersection traffic light control strategy is output to control the traffic lights in the regional traffic network. The digital twin module updates its own state according to the collected new environment state information for the next round of iterative training, forming an interactive training and dynamic regulation closed loop of physical traffic and virtual platform.
[0097] In this embodiment, digital twin technology and multi-agent algorithms are combined and applied to the traffic light control of regional traffic network. The traffic environment and multi-agent deep reinforcement learning algorithm are embedded in the digital twin platform, and the algorithm can be trained multiple times through continuous exploration and trial and error until the optimal strategy is found.
[0098] The model is built and trained in a "centralized training, distributed execution" manner. In the training phase, the digital twin technology is used to capture and simulate the traffic environment state with high precision. Each sensor and perception component collects traffic state information and transmits the data to the digital twin platform through the data transmission channel. The platform updates its own state according to the dynamic changes of the environment and sends the state to the twin decision module. The centralized deep reinforcement learning network model is iteratively trained by observing the global traffic state and the joint actions of the intelligent body. In the execution phase, the signal light control strategy of the intersection obtained after each round of iterative training is first applied to the digital road network for regional traffic signal light control. After the strategy converges and stabilizes, the final signal light control strategy of the intersection is output for the distributed signal lights of the regional traffic road network to obtain the next environmental state of the physical traffic. At the same time, the digital twin module updates its own state according to the collected new environmental state information, which is used for the continuous training of the twin decision module, forming an interactive training and dynamic control closed loop of physical traffic and virtual platform.
[0099] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A multi-agent traffic area signal control method based on digital twins, characterized by: The following steps are involved: Step 1: Collect traffic environment data of the regional road network, build the initial digital twin module, form a digital road network, and establish a data transmission channel between the digital twin platform and the physical traffic flow through mapping technology. Then the perception detection module and the data semantic extraction module collect vehicle operation data and traffic light data status information in the traffic network; Step 2: Design the state space of the traffic light control problem at the intersection of the regional road network; the state space consists of three parts: vehicle state information, traffic light state information, and neighbor node vehicle state information; Step 3: Design the action space of the traffic light control problem at the intersection of the regional road network; The action space consists of three parts: maintaining the current phase, the next signal light phase, and randomly selecting a signal light phase; Step 4: Design a reward function for multi-agent traffic area signal control based on deep reinforcement learning; the reward function consists of three parts, namely, vehicle delay time sub-reward function, traffic saturation level sub-reward function and traffic safety factor sub-reward function. The final reward function is a linear coupling of the three sub-reward functions; Step 5: Construct a network architecture for multi-agent traffic area signal control based on deep reinforcement learning. Each agent adopts the Actor-Critic reinforcement learning network architecture. Both the Actor and the Critic have two sub-networks, namely the target network and the evaluation network. Step 6: The constructed multi-agent deep reinforcement learning model is iteratively trained, and the traffic light control strategy for the intersection is obtained after each round of iterative training. The strategy is applied to the digital road network for regional traffic light control; After the model is iteratively trained until the strategy converges and stabilizes, the training is stopped and the final intersection traffic light control strategy is output to control the traffic lights of the regional traffic network. The digital twin module updates its own state based on the collected new environment state information for the next round of iterative training, forming an interactive training and dynamic regulation closed loop of physical traffic and virtual platform; In step 1, the state information refers to treating each traffic light used to control the intersection in the target area road network as an intelligent entity, collecting the traffic roads controlled by it, vehicle operation data, supporting detection sensor components, surrounding environment and traffic light data; the vehicle operation data includes vehicle speed, vehicle waiting time, vehicle queue length, vehicle position, vehicle delay time, distance between vehicles and traffic saturation; the traffic light data refers to the current traffic light phase; In step 2, the state space of the traffic light control problem at the intersection of the design area road network is specifically: The observation information of agent traffic light i in the tth time step consists of three parts: vehicle status information, traffic light status information and neighbor node vehicle status information; The first part is the vehicle status information, including vehicle position, vehicle speed, and vehicle queue length; The vehicle position is given by the matrix The vehicle speed is represented by the matrix Indicates that the length of the vehicle queue is represented by the matrix express ,in represents the queue length of the i-th lane in the t-th time step, and n represents the number of lanes that the agent can observe; The second part of the signal light status information refers to the current signal light phase. The signal phase is a time sequence that displays the three signal light colors of red, yellow, and green. There are four phases at the intersection, divided into north-south and east-west directions. express; The third part is the vehicle status information of the neighboring nodes. The Critic network introduces a discount factor when obtaining the global strategy and status. To balance the state input of different neighboring agents, the vehicle state information of neighboring nodes is represented by the matrix In summary, the observation information of the i-th agent in the t-th time step is ; In step 3, the action space of the traffic light control problem at the intersection of the design area road network is specifically: Action space of agent traffic light i ;in It means choosing to maintain the current phase. It means to select the next signal light phase. It means randomly selecting a traffic light phase; the agent needs to determine which action to take first; when choosing to maintain the current phase, the traffic light phase remains unchanged; when the agent chooses the next traffic light phase, the traffic light phase changes in the order of north-south straight, north-south left turn, east-west straight, and east-west left turn; when the agent chooses a random action, the traffic light phase will be randomly selected from the action space of maintaining unchanged, north-south straight, north-south left turn, east-west straight, and east-west left turn; In step 4, the reward function of the multi-agent traffic area signal control method based on deep reinforcement learning is specifically as follows: the reward function consists of three parts, namely, a vehicle delay time sub-reward function, a traffic saturation level sub-reward function and a traffic safety factor sub-reward function, and the final reward function is a linear coupling of the three types of sub-reward functions; (1) Vehicle delay time sub-reward function: ; in is the time to cross the stop line, is the time when the vehicle was first observed, is the lane length, is the speed of the vehicle when it was first observed; (2) Traffic saturation level sub-reward function: ; ; in, is the number of vehicles queueing in lane i, is the vehicle length, is the distance between the vehicle and the vehicle in front, is the lane length; (3) Traffic safety factor sub-reward function: When the agent chooses the action "maintain", = 0, when the agent switches the phase of the traffic light, its sub-reward function for: , in, is the distance between the vehicle and the vehicle in front, is the distance between the vehicle and the vehicle behind; Therefore, the reward function of the ith agent is , are the weights of the sub-reward functions, .
2. The multi-agent traffic area signal control method based on digital twin according to claim 1 is characterized in that: In step 5, the network architecture of the multi-agent traffic area signal control method based on deep reinforcement learning refers to that each agent in the road network adopts an Actor-Critic network architecture, which has four sub-networks, namely, an evaluation Actor network, a target Actor network, an evaluation Critic network and a target Critic network; wherein the Actor network is used to determine the action to be taken according to the current state of the agent, the Critic network is used to evaluate the value of the current state or action according to the global state space and action space information, and the target Actor network and the target Critic network are obtained by periodically copying the respective evaluation networks according to the Soft update method; in addition, an experience replay pool is introduced to store the collected historical trajectories in the experience pool, and a small batch of data is taken to calculate the mean during the update, and the trajectory is used to calculate the mean. And dynamic programming methods, generate several behavior strategies μ to explore a target strategy π that can maximize the objective function: ; in represents the optimal value function under the target strategy π, E represents the expectation, N represents the time length of the trajectory, represents the attenuation factor, K represents the time step after time t; There are two update tasks in the Actor-Critic framework: the policy gradient update of the Actor network and the value function update of the Critic network; the policy gradient update of the Actor network is , , in represents the policy gradient, is the performance of the target strategy, For the target strategy, express Select in status probability; The value function of the Critic network is updated to use the TD error to calculate the error between the current state value and the next state value, and then update the parameters of the Critic network; the mean square error loss function is: , During training, both the Actor and Critic networks need to participate. The Actor network first selects an action based on the current environmental state. The Critic network calculates the Q value based on the Actor network's action and the global state to judge the quality of the action. Then, the Actor network's policy gradient update and the Critic network's value function update are performed respectively. In the execution phase, the Actor network only needs to complete the strategy selection based on the traffic environment state observed by itself. After multiple rounds of iterations, the parameters of the Actor and Critic networks gradually converge, and the optimal strategy for regional traffic network signal control in the current state is obtained.
3. The multi-agent traffic area signal control method based on digital twin according to claim 2 is characterized in that: In step 6, the constructed multi-agent deep reinforcement learning model refers to: The digital twin technology and multi-agent algorithm are combined and applied to the signal light control of the regional traffic network; the traffic environment and multi-agent deep reinforcement learning algorithm are embedded in the digital twin platform, which can perform multiple iterations of algorithm training, continuous exploration and trial and error, until the optimal strategy is found; Use "centralized training, distributed execution" to build and train the model; In the training phase, digital twin technology is used to dynamically capture and simulate the traffic environment state with high precision. Each sensor and perception component collects traffic state information and transmits the data to the digital twin platform through the data transmission channel. The platform updates its own state according to the dynamic changes of the environment and sends the state to the twin decision module. By observing the global traffic state and the joint actions of the intelligent body, the centralized deep reinforcement learning network model is iteratively trained. In the execution phase, the traffic light control strategy for the intersection obtained after each round of iterative training is first applied to the digital road network for regional traffic light control. After the strategy converges and stabilizes, the final traffic light control strategy for the intersection is output for the distributed traffic lights in the regional traffic road network to obtain the next environmental state of the physical traffic. At the same time, the digital twin module updates its own state according to the collected new environmental state information, which is used for continuous training of the twin decision module, forming an interactive training and dynamic regulation closed loop of physical traffic and virtual platform.
