Vehicle-annunciator cooperative signal control method based on double-layer AMOC
The vehicle-signal cooperative signal control method that combines the double-layer AMOC algorithm and Option-Critic solves the computational complexity and interpretability problems of multi-agent algorithms, achieves more efficient and safer traffic signal control, and adapts to different traffic environments. , reducing transportation costs and energy consumption.
Patent Information
- Application Number
- CN202410685909.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing multi-agent algorithms in traffic signal control are computationally complex and difficult to achieve efficient coordination. They lack interpretability, require high real-time data, and are difficult to adapt to different traffic environments.
The dual-layer adaptive multi-objective coordination (AMOC) algorithm is used to optimize the signal control strategy through information sharing and collaboration between the central coordinator and the signal machine, combined with the Option-Critic and NSGA-II algorithms, and realize vehicle-signal cooperative signaling. control, improving the efficiency and safety of transportation systems.
It improves traffic smoothness and safety, reduces traffic congestion and vehicle delays, reduces transportation costs and energy consumption, enhances the adaptability and flexibility of the transportation network, and improves the explainability of the decision-making process.
Smart Images

Figure CN118692250A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of regional signal control and multi-agent reinforcement learning, and specifically relates to a vehicle-signal machine collaborative signal control method based on double-layer AMOC. Background Art
[0002] Regional signal control has been widely studied and applied in the field of transportation. Regional signal control is an important component of intelligent transportation systems. With the development and popularization of intelligent transportation technology, regional signal control will be integrated with other intelligent transportation system components (such as intelligent traffic management, intelligent vehicles, etc.) to achieve a higher level of traffic optimization and coordination. Regional signal control is increasingly inclined to make control decisions based on real-time traffic data and vehicle demand. Using traffic flow data, GPS data and other sensor data, traffic conditions are monitored and evaluated in real time, and signal control strategies are adjusted according to real-time data to adapt to changes in traffic flow.
[0003] Multi-agent algorithms can be used to coordinate multiple signals in a traffic signal control system to optimize traffic flow, reduce delays, and improve traffic conditions. Each signal acts as an agent, which communicates and coordinates with each other to jointly optimize the signal control strategy of the entire traffic network. Current multi-agent algorithms usually need to process a large number of state and action spaces, and require a lot of calculations and optimizations. This leads to a high computational complexity of the algorithm, requiring more computing resources and time. In addition, multi-agent algorithms require coordination and communication between multiple agents to jointly make decisions and adjust strategies. This involves the design of information sharing, communication protocols, and collaboration mechanisms, and requires solving the problems of information transmission and coordination between agents.
[0004] The application of multi-agent reinforcement learning to regional signal control is an effective method. Patent CN113436443A discloses a method of using an improved generative adversarial network (WGAN-GP) to accelerate the reinforcement learning (RL) algorithm and apply it to regional traffic signal control. The advantages of the generative adversarial network in generating data and the advantages of the reinforcement learning algorithm in learning control strategies are applied to regional traffic signal control. However, this reinforcement learning algorithm has a high demand for a large amount of real-time data, and these decision-making processes lack interpretability, that is, it is difficult to understand why the agent makes a specific decision.
[0005] The Adaptive Multi-Objective Coordination (AMOC) algorithm achieves traffic optimization for the entire intersection or region by coordinating the control strategies of multiple signal machines. The AMOC algorithm can be used in conjunction with the reinforcement learning algorithm to continuously optimize the signal control strategy using the learning ability of the agent. Through interaction with the agent, AMOC can gradually learn and improve the control strategy to adapt to different traffic environments and traffic needs. Summary of the invention
[0006] Purpose of the invention: In view of the above problems, the present invention proposes a vehicle-signal machine collaborative signal control method based on double-layer AMOC, so that the central control coordinator can coordinate the timing plans of various signal machines in the control area to obtain a regional timing plan based on the system optimal principle. At the same time, the signal machine guides the autonomous driving vehicles within the intersection range through the vehicle-signal machine network, thereby improving the efficiency and safety of the entire transportation system from point to surface.
[0007] Technical solution: To achieve the purpose of the present invention, the technical solution adopted by the present invention is: a vehicle-signal machine coordinated signal control method based on double-layer AMOC, comprising the following steps:
[0008] Step 1: Take a single vehicle as a low-level agent and a single traffic signal as a high-level agent, initialize the strategies and value functions of the two-level agents, as well as the strategies and value functions of the central coordinator and each layer of low-level coordinators;
[0009] Step 2: The low-level agent receives the intersection environment information sent by the traffic light, including the current vehicle status, the status of surrounding vehicles, the traffic signal status, the road structure and the speed limit information;
[0010] Step 3: The signal unit collects information from lower-level agents and uses the received information to update its own strategy and value function; based on the intersection geometry data and the relationship between the agents, the AMOC algorithm is used to generate a single-point intersection signal control strategy;
[0011] Step 4: Conduct network topology for the regional road network and connect all traffic lights at intersections in the region; each traffic light transmits its own strategy and value function to the central coordinator, which uses the AMOC algorithm to update the strategy and value function to obtain the regional signal control strategy;
[0012] Step 5: The central coordinator uses the Option-Critic algorithm to provide strategy instructions to each intelligent agent, allowing the intelligent agent to make decisions under the road environment and traffic flow scenarios; sends the regional signal control strategy to each signal machine, applies the parameters of the optimal strategy to the strategy network of each high-level intelligent agent, and updates the strategy of the high-level intelligent agent.
[0013] Furthermore, the signal unit collects information of the lower-level agents and uses the received information of the lower-level agents to update its own strategy and value function, the steps comprising:
[0014] 1.1) Establishing a vehicle-signal connection: The low-level agent connects to the wireless network provided by the signal and communicates with the signal through a wireless communication protocol;
[0015] 1.2) Establish an application layer communication protocol on the wireless network. The low-level agent encapsulates the value function and strategy information into a data packet through the protocol and transmits it through the wireless communication protocol. The signal machine receives the data packet as the receiver and parses the value function and strategy information.
[0016] 1.3) The vehicle status and the status of surrounding vehicles are converted into vector form as the input of the DDPG algorithm. According to the initialized low-level agent strategy and value function, the traffic light strategy and value function are updated, and its own status, strategy action and reward information are sent to the low-level coordinator.
[0017] Furthermore, based on the intersection geometry data and the relationships between the agents, the AMOC algorithm is used to generate a single-point intersection signal control strategy, which specifically includes:
[0018] 2.1) defining a state vector according to the intersection geometry data and the intersection signal state, wherein the state vector includes the number of lanes and the vehicle position;
[0019] The number of lanes and vehicle positions are discretized according to the lane channelization of each entrance. Each entrance corresponds to a processor, and finally the state vectors of all entrances are spliced to obtain the intersection state vector;
[0020] 2.2) Define the action space, which is the timing plan of the signal;
[0021] The action space is defined as a three-dimensional matrix. The first dimension of the matrix represents the number of phases N, the second dimension represents the number of entrance lanes M, and the third dimension represents the passage order K. Each element represents the green light time G of the phase on the corresponding entrance lane. i , the action space A is represented by A = [N, M, K];
[0022] Set the yellow light duration Y and the full red light duration R; the entire signal cycle C is:
[0023]
[0024] When selecting an action, the agent determines an action by specifying the travel time and travel order of each phase on each entrance lane; the signal machine updates the signal timing plan according to the action selected by the agent;
[0025] 2.3) With the goal of minimizing the total delay of vehicles at the intersection and maximizing the efficiency of green light utilization, a reward function r is defined for the intersection;
[0026] r=(1-x1)*D+x2E
[0027] Among them, x1 and x2 are linear weight coefficients, D is the total vehicle delay, and E is the green light utilization efficiency; the total vehicle delay D is the time for all vehicles in the intersection to pass through the intersection minus the sum of the free-flowing time in a complete cycle period; the green light utilization efficiency E is the number of vehicles passing through divided by the saturated flow; the green light utilization rate and the total vehicle delay are standardized separately, and both are mapped to the range between 0 and 1;
[0028] 2.4) Define the state space;
[0029] NSGA-II is applied to the DDPG algorithm. According to the reward function, the objective function of DDPG is split into green light utilization rate and total vehicle delay, which are used as the optimization objectives of NSGA-II respectively.
[0030] According to the algorithm flow of NSGA-II, a set of Pareto front solutions are generated using NSGA-II selection and evolution operations. The Pareto front solutions have different green light timing schemes corresponding to different strategies. By evaluating all strategies and according to the update rules of the DDPG algorithm, the optimal strategy is selected for updating.
[0031] Furthermore, the state vector is defined in step 2.1 as follows:
[0032]
[0033] P i =[S2,S3];
[0034] Among them, S1 represents a single lane state vector, S2 represents a single entrance state vector, S3 represents the intersection state vector; F is the number of vehicles, V F is the speed of vehicle F, P1 is the lane position code of vehicle 1, P F is the lane position code of vehicle F, P i is the lane position code of vehicle i, Indicates the phase state; L1 is the first lane state, is the N1th lane state, N1 represents the total number of lanes at the intersection; E1 is the first entrance state, is the N2th entrance state, N2 represents the total number of entrance lanes at the intersection; the lane position encoding represents the unique hot encoding vector of the position information of each vehicle, and the phase state is the green light duration of the lane phase.
[0035] Furthermore, the definition of the state space in step 2.4 specifically includes:
[0036] Initialize NSGA-II parameters, including population size, maximum number of iterations, crossover rate, and mutation rate;
[0037] Initialize DDPG parameters, including experience replay buffer size, batch size, discount factor, exploration noise, Actor network learning rate, and Critic network learning rate;
[0038] Initialize the DDPG network and experience replay buffer: initialize the Actor network, initialize the Critic network, initialize the NSGA-II population, use DDPG to evaluate individual strategies and calculate fitness;
[0039] NSGA-II is used for selection and evolution operations, and the best individual is selected from the individuals generated by NSGA-II. The best individual is optimized by the DDPG algorithm, and the optimized and updated individual is used as the basis of the next generation population.
[0040] Furthermore, the regional signal control strategy is obtained, and the process is as follows:
[0041] 3.1) Use the adjacency matrix to topologically map the road network in the region, and correspond each node to the signal at each intersection;
[0042] 3.2) Define the objective function:
[0043]
[0044] Among them, ω is the total reward, r i is the reward obtained at intersection i, n represents the number of traffic lights in the area, i = 0, 1, ..., n;
[0045] Constraints:
[0046] ω j+1 ≥ω j
[0047] ω j+1 -ω j ≤M
[0048] Among them, j is the current iteration number, ω j and ω j+1 are the Pareto frontier solutions, i.e., the total rewards, obtained after the j-th and j+1-th iterations of the NSGA-II algorithm, respectively; the optimal solution ω obtained at the end of the iteration is the maximum value of the total reward, and M is the convergence threshold;
[0049] 3.3) The central coordinator uses the road network topology data to obtain the regional signal control strategy and runs the NSGA-II algorithm through the central coordinator to obtain the Pareto optimal solution set;
[0050] The NSGA-II algorithm uses simulated binary SBX operators and NDX operators to encode real numbers, obtains strategies through local search, and then performs global search optimization strategies to propose a hybrid operator:
[0051]
[0052] Among them, P n represents the usage probability of NDX operator, P b represents the usage probability of the SBX operator, and j represents the current iteration number;
[0053] Finally, the tools.selSPEA2 function is used to select the Pareto optimal solution set from the population.
[0054] Furthermore, in step 1.2, use the Tornado library in Python to establish a WebSocket application layer connection and create a WebSocket handler class named SignalHandler;
[0055] When the vehicle establishes a WebSocket connection and sends a message, the on_message method is called to process the received message, and a response message is sent to the vehicle through the self.write_message method.
[0056] Furthermore, step 1.3 specifically includes:
[0057] 1.31) Convert the strategy and value function into vector type, encapsulate them into data packets, and extend the SignalHandler class;
[0058] First, the low-level agent uses the on_message method to parse the received message and extract the strategy and value function; then, the convert_to_vector function is used to convert the strategy and value function into vector type; the converted vector data is encapsulated into a data packet; finally, json.dumps is used to convert the data packet into JSON format, and self.write_message is used to send it to the signal machine;
[0059] 1.32) The signal machine receives JSON data, including the weight parameters of the strategy and value function. The signal machine parses the strategy and value function in JSON format; then extracts the strategy weight and value function weight, builds a strategy and value function network and uses NumPy arrays to represent the weight; finally, a multi-layer perceptron is used to build a strategy network using the strategy weight and a value function network using the value function weight.
[0060] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0061] The present invention can improve traffic flow and safety through the vehicle-signal machine cooperative signal control method based on double-layer AMOC, realize more accurate and efficient signal control, thereby reducing traffic congestion and vehicle delays, improving traffic flow and road safety. Reduce traffic costs and energy consumption, the optimized signal control strategy can reduce the parking time and queuing time of vehicles at intersections, reduce transportation costs, and reduce vehicle fuel consumption, thereby saving energy resources.
[0062] The present invention adopts a method combining NSGA-II and DDPG algorithms, which can enhance the adaptability and flexibility of the traffic network, and dynamically optimize and adjust the traffic signal control strategy so that it can better adapt to different traffic flows and road conditions. The present invention coordinates the search process of multiple optimization algorithms on the practical path of the timing scheme, and designs information sharing, communication protocols and collaboration mechanisms to effectively improve the quality of the solution and the convergence speed, while reducing the dependence on real-time data. In addition, by designing the state representation and decision rules of the intelligent agent, the interpretability of the decision process is improved, making the algorithm more understandable and acceptable.
[0063] Through information sharing and collaboration between intelligent entities and the guidance and management of the central coordinator, the present invention realizes intelligent coordination between vehicles and traffic lights, improves the intelligence level of urban traffic management, and actually achieves a balanced management and control result of the system, providing more decision-making support and optimization solutions for guiding each vehicle and traffic light to make the optimal strategy for the system under future fully L5 autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0065] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0066] This embodiment takes two low-level intelligent agents: car 1 and car 2, two high-level intelligent agents: machine 1 and machine 2, and a central coordinator as an example, wherein car 1 and car 2 are both at the intersection where machine 1 is located.
[0067] The vehicle-signal machine cooperative signal control method based on double-layer AMOC of the present invention is as follows: Figure 1 , including the following steps:
[0068] Step 1: Initialize the strategies a1, a2, A1, A2 and value functions of the two-layer agents of car 1, car 2, machine 1, and machine 2, as well as the strategies and value functions of the central coordinator and each layer of low-level coordinators. The low-level agent is a single vehicle, and the high-level agent is a single traffic signal. The strategy and value function initialization operations of the agent are as follows:
[0069] 1.1) Initialize the layers of the neural network using linear (fully connected) layers. The network has two hidden layers with 64 neurons. The initialization method is as follows:
[0070] The policy network consists of an input layer, two hidden layers, and an output layer.
[0071] The process expression from input layer to hidden layer is: h1=ReLU(W1x+b1);
[0072] The expression of the hidden layer to hidden layer process is:
[0073] The process from hidden layer to output layer is expressed as:
[0074] Where x is the input vector, output_dim represents the output dimension, ReLU() represents the Rectified Linear Unit activation function, tanh() represents the hyperbolic tangent activation function, parameters W1 and W2 represent weight matrices of size 64, and b1 and b2 represent bias vectors of size 64.
[0075] The value network consists of an input layer, two hidden layers, and an output layer.
[0076] The process expression from input layer to hidden layer is: h1=ReLU(W1x+b1);
[0077] The expression of the hidden layer to hidden layer process is:
[0078] The process from hidden layer to output layer is expressed as:
[0079] 1.2) Define the forward propagation of the neural network. It applies the ReLU activation function to the output of the first two layers and the hyperbolic tangent (tanh) activation function to the output of the third layer. Because two hidden layers are defined, there are two hidden layer activation functions. The forward propagation method is as follows:
[0080] The policy network consists of an input layer, two hidden layers, and an output layer.
[0081] Input vector: x;
[0082] The hidden layer activation process expression is: h1 = ReLU (W1x + b1);
[0083] The hidden layer activation process expression is: h2 = ReLU (W2h1 + b2);
[0084] The expression of the output layer activation process is: y = tanh (W ) h2+b ) ).
[0085] The value network consists of an input layer, two hidden layers, and an output layer.
[0086] The hidden layer activation process expression is: h1 = ReLU (W1x + b1);
[0087] The hidden layer activation process expression is: h2 = ReLU (W2h1 + b2);
[0088] The expression of output layer activation process is: y = W ) h2+b ) .
[0089] The specific forward propagation process is:
[0090] 1.21) The input vector x is transformed by the first hidden layer and then activated by ReLU to obtain h1.
[0091] 1.22) h1 is transformed linearly and activated by ReLU in the second hidden layer to obtain h2.
[0092] 1.23) Finally, h2 is transformed linearly and activated by tanh in the output layer to obtain the final output y.
[0093] 1.3) Define the value function. It has three layers: an input layer and two hidden layers with 64 neurons. The output layer has only one neuron and does not use an activation function because it predicts a single scalar value.
[0094] 1.4) Initialize the dimensions of the state space and action space.
[0095] Step 2: Low-level intelligent vehicles 1 and 2 receive intersection traffic environment information 1, including the current vehicle status, the status of surrounding vehicles, traffic signal status, road structure and speed limit information.
[0096] The low-level intelligent bodies Car 1 and Car 2 are connected to the Wi-Fi network provided by Signal 1 and communicate with Signal 1 through the Wi-Fi 6 protocol. Signal 1 provides intersection road environment information services on the Wi-Fi network. The intelligent bodies request intersection road environment information from the signal through the Wi-Fi connection.
[0097] Step 3: Signal unit 1 collects information about lower-level intelligent vehicles 1 and 2, and uses the received information about lower-level intelligent vehicles 1 and 2 to update its own strategy and value function.
[0098] 1.1) First, establish the vehicle-signal connection;
[0099] The low-level intelligent vehicles 1 and 2 are connected to the Wi-Fi network provided by the signal 1 and communicate with the signal through the wireless communication protocol.
[0100] 1.2) Establish application layer communication protocol on Wi-Fi network;
[0101] The lower-level intelligent vehicles 1 and 2 encapsulate the value function and strategy information into data packets through the protocol and transmit them through the Wi-Fi 6 protocol. Signal machine 1, as the receiver, receives these data packets and parses out the value function and strategy a1 and a2 information.
[0102] 1.21) Use the Tornado library in Python to establish a WebSocket application layer connection;
[0103] Create a WebSocket handler class named SignalHandler;
[0104] When vehicle 1 and vehicle 2 establish a WebSocket connection and send a message, the on_message method will be called to process the received message and send a response message to the vehicle through the self.write_message method.
[0105] 1.3) Convert the states c1 and c2 of the two vehicles into vector form as the input of the DDPG algorithm. According to the initialized low-level intelligent agents Car 1 and Car 2 strategies a1, a2 and value functions, update their respective strategies and value functions, and send their own states, strategy actions and reward information to the low-level coordinator.
[0106] 1.31) Convert the strategy and value function into vector type, encapsulate them into data packets, and extend the SignalHandler class;
[0107] First, the logic in the on_message method is expanded to parse the received message and extract the policy and value functions. Then, the policy and value functions are converted into vectors using the convert_to_vector function. Next, the converted vector data is encapsulated into a data packet and sent to the signaler. Finally, the data packet is converted into JSON format using json.dumps and sent to the signaler using self.write_message.
[0108] 1.32) First, receive JSON data, including the weight parameters of the strategy and value function, and parse the JSON data. The signal machine parses the strategy and value function in JSON format; then extract the strategy weight and value function weight, build the strategy and value function network and use NumPy arrays to represent the weight; finally, use the multi-layer perceptron to use the strategy weight to build the strategy network and the value function weight to build the value function network.
[0109] According to the existing geometric data of intersection 1, considering the relationship between vehicles 1 and 2, the AMOC algorithm is used to generate the signal control strategy of intersection 1, and the effect and performance of the current signal control strategy are evaluated.
[0110] Step 4: Conduct network topology for the regional road network and connect signal machines 1 and 2 at the intersections in the region;
[0111] Signal machine 1 and signal machine 2 transmit their respective strategies and value functions to the central coordinator, and the central coordinator updates the strategies and value functions using the same AMOC method to obtain the regional signal control strategy.
[0112] 2.1) A state vector is defined according to intersection geometry data and intersection signal status, wherein the state vector includes the number of lanes and vehicle positions.
[0113] The number of lanes and vehicle positions are discretized according to the lane channelization of each entrance. Each entrance corresponds to a processor, and finally the state vectors of all entrances are spliced to obtain the intersection state vector.
[0114]
[0115] P1=[S2,S ) ];
[0116] Among them, S1 represents a single lane state vector, S2 represents a single import state vector, and S3 represents an intersection state vector; F is the number of vehicles, V1 and V2 are the speeds of vehicle 1 and vehicle 2 respectively, and P1 and P2 are the lane position codes of vehicle 1 and vehicle 2 respectively. Indicates the phase state; the leftmost lane facing the intersection is the reference lane; L1 is lane state 1. In order to unify the representation, the entrance in the due north direction is set as the reference entrance. If there is no due north entrance, the northwest entrance is used as the reference entrance. Then the order of each entrance lane is calibrated in a clockwise direction. E1 is entrance state 1; N1 indicates the total number of lanes at the intersection; N2 indicates the total number of entrance lanes at the intersection; the lane position code represents the unique hot encoding vector of the position information of each vehicle, and the phase state is the green light duration of the phase of this lane.
[0117] Phase Status In binary coding, 0 and 1 are used to represent the phase state. For example, if there are 4 phase states, a 4-bit binary number can be used to represent it, each bit represents the state of a phase state, 0 represents closed, and 1 represents open. For example, the phase state of 1010 means that the 1st and 3rd phases are open, while the 2nd and 4th phases are closed. Assuming that the phase state is that the 1st and 3rd phases are open, both vehicles are in the leftmost lane of the north entrance, and intersection 1 is a cross intersection; then the state vector of intersection 1 is [2, V1, V2, 10001000, 10001000, 1010].
[0118] 2.2) Define the action space A1 of the signal at intersection 1, which is the timing plan of the signal.
[0119] The action space is defined as a three-dimensional matrix. The first dimension of the matrix represents the number of phases N, the second dimension represents the number of entrance lanes M, and the third dimension represents the passage order K. Each element represents the green light time G of the phase on the corresponding entrance lane. i , the action space A is expressed as A=[N,M,K].
[0120] Set the yellow light duration Y and the full red light duration R; the entire signal cycle is:
[0121]
[0122] When selecting an action, the agent determines an action by specifying the travel time and travel order of each phase on each entrance lane; the traffic light updates the signal timing plan according to the action selected by the agent to achieve optimal control of traffic flow.
[0123] 2.3) Define a reward function for the intersection with the goal of minimizing the total delay of vehicles at the intersection and maximizing the efficiency of green light utilization;
[0124] r=(1-x1)*D+x2E
[0125] Among them, x1 and x2 are linear weight coefficients, D is the total vehicle delay, and E is the green light utilization efficiency; the total vehicle delay D is the time it takes for all vehicles in the intersection to pass through the intersection in a complete cycle period minus the sum of the free-flowing time; the green light utilization efficiency E is the number of passing vehicles divided by the saturated flow.
[0126] The green light utilization rate and total vehicle delay are normalized separately, and both are mapped to the range between 0 and 1:
[0127]
[0128] Among them, S D is the standardized total vehicle delay, S is the total vehicle delay, S max is the maximum total vehicle delay, S min is the minimum total vehicle delay; S U is the standardized green light utilization rate, U is the green light utilization rate, and U min is the minimum green light utilization rate, U max It is the maximum green light utilization rate.
[0129] 2.4) Define the state spaces C1 and C2 of intersection 1 and intersection 2.
[0130] After defining the state vector, action space and reward function, NSGA-II is applied to the DDPG algorithm. According to the reward function, the objective function of DDPG is split into green light utilization rate and total vehicle delay, which are used as the optimization objectives of NSGA-II respectively.
[0131] According to the algorithm flow of NSGA-II, a set of Pareto front solutions are generated using NSGA-II selection and evolution operations, representing different strategies; the Pareto front solutions have different green light timing schemes corresponding to different strategies; by evaluating all strategies and according to the update rules of the DDPG algorithm, the optimal strategy is selected for updating and improvement.
[0132] 2.41) Initialize NSGA-II parameters, including population size, maximum number of iterations, crossover rate, and mutation rate.
[0133] 2.42) Initialize DDPG parameters, including experience replay buffer size, batch size, discount factor, exploration noise, Actor network learning rate, and Critic network learning rate.
[0134] 2.43) Initialize the DDPG network and experience replay buffer: Initialize the Actor network, initialize the Critic network, initialize the NSGA-II population, use DDPG to evaluate individual strategies and calculate fitness.
[0135] 2.44) Use NSGA-II to perform selection and evolution operations, select the best individual from the individuals generated by NSGA-II, and optimize the best individual through the DDPG algorithm. The optimized and updated individuals serve as the basis of the next generation population.
[0136] The regional signal control strategy is sent to signal machine 1 and signal machine 2, the parameters of the optimal individual are directly applied to the strategy network of each signal machine 1 and signal machine 2, and the strategies A1 and A2 of signal machine 1 and signal machine 2 are updated.
[0137] 3.1) Use the adjacency matrix to topologically map the road network in the area, and correspond each node to the traffic lights at each intersection.
[0138] 3.2) Define the objective function:
[0139]
[0140] Among them, ω is the total reward, r i is the reward obtained at intersection i, n is the number of traffic lights in the area, i = 0, 1, …, n.
[0141] Constraints:
[0142] ω 891 ≥ω8
[0143] ω 891 -ω8≤M
[0144] Among them, j is the current iteration number, ω8 and ω 891 are the Pareto frontier solutions obtained after the jth and j+1th iterations of the NSGA-II algorithm, i.e., the total reward. The optimal solution ω obtained by the iteration is the maximum value of the total reward, and M is the convergence threshold. However, in order to shorten the training time, the Pareto optimal solution can be obtained after ω becomes stable. M is a smaller number, which can be ω×10 a2 .
[0145] 3.3) The central coordinator uses the road network topology data to obtain the regional signal control strategy and runs the NSGA-II algorithm through the central coordinator to obtain the Pareto optimal solution set.
[0146] The NSGA-II algorithm uses simulated binary SBX operators and NDX operators to encode real numbers, obtains strategies through local search, and then performs global search optimization strategies to propose a hybrid operator:
[0147]
[0148] Among them, P2 represents the usage probability of NDX operator, P Brepresents the probability of using the SBX operator, and j represents the current iteration number. Finally, the tools.selSPEA2 function is used to select the Pareto optimal solution set from the population.
[0149] Step 5: Option-Critic provides strategy instructions A1 and A2 to signal machines 1 and 2 according to the guidance of the central coordinator, allowing the agents to make decisions under specific road environments and specific traffic flow scenarios.
Claims
1. A vehicle-signal machine cooperative signal control method based on double-layer AMOC, characterized in that: The following steps are involved: Step 1: Take a single vehicle as a low-level agent and a single traffic signal as a high-level agent, initialize the strategies and value functions of the two-level agents, as well as the strategies and value functions of the central coordinator and each layer of low-level coordinators; Step 2: The low-level agent receives the intersection environment information sent by the traffic light, including the current vehicle status, the status of surrounding vehicles, the traffic signal status, the road structure and the speed limit information; Step 3: The signal unit collects information from lower-level agents and uses the received information to update its own strategy and value function; based on the intersection geometry data and the relationship between the agents, the AMOC algorithm is used to generate a single-point intersection signal control strategy; Step 4: Conduct network topology for the regional road network and connect all traffic lights at intersections in the region; each traffic light transmits its own strategy and value function to the central coordinator, which uses the AMOC algorithm to update the strategy and value function to obtain the regional signal control strategy; Step 5: The central coordinator uses the Option-Critic algorithm to provide strategy instructions to each intelligent agent, allowing the intelligent agent to make decisions under the road environment and traffic flow scenarios; sends the regional signal control strategy to each signal machine, applies the parameters of the optimal strategy to the strategy network of each high-level intelligent agent, and updates the strategy of the high-level intelligent agent.
2. The method according to claim 1, characterized in that The signal unit collects information from lower-level agents and uses the received information from lower-level agents to update its own strategy and value function. The steps include: 1.1) Establishing a vehicle-signal connection: The low-level agent connects to the wireless network provided by the signal and communicates with the signal through a wireless communication protocol; 1.2) Establish an application layer communication protocol on the wireless network. The low-level agent encapsulates the value function and strategy information into a data packet through the protocol and transmits it through the wireless communication protocol. The signal machine receives the data packet as the receiver and parses the value function and strategy information. 1.3) The vehicle status and the status of surrounding vehicles are converted into vector form as the input of the DDPG algorithm. According to the initialized low-level agent strategy and value function, the traffic light strategy and value function are updated, and its own status, strategy action and reward information are sent to the low-level coordinator.
3. The method according to claim 1, characterized in that: According to the intersection geometry data and the relationship between each intelligent agent, the AMOC algorithm is used to generate a single-point intersection signal control strategy, including: 2.1) defining a state vector according to the intersection geometry data and the intersection signal state, wherein the state vector includes the number of lanes and the vehicle position; The number of lanes and vehicle positions are discretized according to the lane channelization of each entrance. Each entrance corresponds to a processor, and finally the state vectors of all entrances are spliced to obtain the intersection state vector; 2.2) Define the action space, which is the timing plan of the signal machine; The action space is defined as a three-dimensional matrix. The first dimension of the matrix represents the number of phases N, the second dimension represents the number of entrance lanes M, and the third dimension represents the passage order K. Each element represents the green light time G of the phase on the corresponding entrance lane. i , the action space A is represented by A = [N, M, K]; Set the yellow light duration Y and the full red light duration R; the entire signal cycle C is: When selecting an action, the agent determines an action by specifying the travel time and travel order of each phase on each entrance lane; the signal machine updates the signal timing plan according to the action selected by the agent; 2.3) With the goal of minimizing the total delay of vehicles at the intersection and maximizing the efficiency of green light utilization, a reward function r is defined for the intersection; r=(1-x1)*D+x2E Among them, x1 and x2 are linear weight coefficients, D is the total vehicle delay, and E is the green light utilization efficiency; the total vehicle delay D is the time for all vehicles in the intersection to pass through the intersection minus the sum of the free-flowing time in a complete cycle period; the green light utilization efficiency E is the number of vehicles passing through divided by the saturated flow; the green light utilization rate and the total vehicle delay are standardized separately, and both are mapped to the range between 0 and 1; 2.4) Define the state space; NSGA-II is applied to the DDPG algorithm. According to the reward function, the objective function of DDPG is split into green light utilization rate and total vehicle delay, which are used as the optimization objectives of NSGA-II respectively. According to the algorithm flow of NSGA-II, a set of Pareto front solutions are generated using NSGA-II selection and evolution operations. The Pareto front solutions have different green light timing schemes corresponding to different strategies. By evaluating all strategies and according to the update rules of the DDPG algorithm, the optimal strategy is selected for updating.
4. The method according to claim 3, characterized in that The state vector is defined in step 2.1 as follows: <h2 style=";text-align:left;direction:ltr">P<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> ([S2,S3]) Among them, S1 represents a single lane state vector, S2 represents a single entrance state vector, S3 represents the intersection state vector; F is the number of vehicles, V F is the speed of vehicle F, P1 is the lane position code of vehicle 1, P F is the lane position code of vehicle F, P i is the lane position code of vehicle i, Indicates the phase state; L1 is the first lane state, is the N1th lane state, N1 represents the total number of lanes at the intersection; E1 is the first entrance state, is the N2th entrance state, N2 represents the total number of entrance lanes at the intersection; the lane position encoding represents the unique hot encoding vector of the position information of each vehicle, and the phase state is the green light duration of the lane phase.
5. The method according to claim 3, characterized in that: The definition of the state space in step 2.4 specifically includes: Initialize NSGA-II parameters, including population size, maximum number of iterations, crossover rate, and mutation rate; Initialize DDPG parameters, including experience replay buffer size, batch size, discount factor, exploration noise, Actor network learning rate, and Critic network learning rate; Initialize the DDPG network and experience replay buffer: initialize the Actor network, initialize the Critic network, initialize the NSGA-II population, use DDPG to evaluate individual strategies and calculate fitness; NSGA-II is used for selection and evolution operations, and the best individual is selected from the individuals generated by NSGA-II. The best individual is optimized by the DDPG algorithm, and the optimized and updated individual is used as the basis of the next generation population.
6. The method according to claim 1, characterized in that Get the regional signal control strategy, the process is as follows: 3.1) Use the adjacency matrix to topologically map the road network in the region, and correspond each node to the signal at each intersection; 3.2) Define the objective function: Among them, ω is the total reward, r i is the reward obtained at intersection i, n represents the number of traffic lights in the area, i = 0, 1, ..., n; Constraints: oh j+1 ≥ω j oh j+1 -oh j ≤M Among them, j is the current iteration number, ω j and ω j+1 are the Pareto frontier solutions, i.e., the total rewards, obtained after the j-th and j+1-th iterations of the NSGA-II algorithm, respectively; the optimal solution ω obtained at the end of the iteration is the maximum value of the total reward, and M is the convergence threshold; 3.3) The central coordinator uses the road network topology data to obtain the regional signal control strategy and runs the NSGA-II algorithm through the central coordinator to obtain the Pareto optimal solution set; The NSGA-II algorithm uses simulated binary SBX operators and NDX operators to encode real numbers, obtains strategies through local search, and then performs global search optimization strategies to propose a hybrid operator: Among them, P n represents the usage probability of NDX operator, P b represents the usage probability of the SBX operator, and j represents the current iteration number; Finally, the tools.selSPEA2 function is used to select the Pareto optimal solution set from the population.
7. The method according to claim 2, characterized in that In step 1.2, use the Tornado library in Python to establish a WebSocket application layer connection and create a WebSocket handler class named SignalHandler; When the vehicle establishes a WebSocket connection and sends a message, the on_message method is called to process the received message, and a response message is sent to the vehicle through the self.write_message method.
8. The method according to claim 2, characterized in that: Step 1.3 specifically includes: 1.31) Convert the strategy and value function into vector type, encapsulate them into data packets, and extend the SignalHandler class; First, the low-level agent uses the on_message method to parse the received message and extract the strategy and value function; then, the convert_to_vector function is used to convert the strategy and value function into vector type; the converted vector data is encapsulated into a data packet; finally, json.dumps is used to convert the data packet into JSON format, and self.write_message is used to send it to the signal machine; 1.32) The signal machine receives JSON data, including the weight parameters of the strategy and value function. The signal machine parses the strategy and value function in JSON format; then extracts the strategy weight and value function weight, builds a strategy and value function network and uses NumPy arrays to represent the weight; finally, a multi-layer perceptron is used to build a strategy network using the strategy weight and a value function network using the value function weight.
Citation Information
Patent Citations
Multi-ramp cooperative control method based on model predication control
CN108898854A
Regional traffic signal coordination optimization control system and method
CN109785619A
Regional traffic signal timing method and system based on reinforcement learning
CN115731724A
Control method and apparatus for traffic light, and road network system, electronic device and medium
WO2023206248A1
Cited By
Mixed traffic flow cooperative control method based on double-layer parameterization deep reinforcement learning
CN119479295A
Hybrid Traffic Flow Cooperative Control Method Based on Double-Layer Parameterized Deep Reinforcement Learning
CN119479295B
Logistics rapid distribution analysis system based on artificial intelligence
CN119809074A
A logistics rapid delivery analysis system based on artificial intelligence
CN119809074B
