Urban traffic signal control method based on accelerated iterative learning control
By introducing a random forest regression model and particle swarm optimization algorithm into iterative learning control, the initial iterative control signal and learning gain are optimized, solving the problems of slow convergence speed and low utilization of historical data in urban traffic signal control, and realizing fast and high-precision traffic signal control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2023-08-29
- Publication Date
- 2026-04-21
AI Technical Summary
Existing iterative learning control suffers from slow convergence speed and low utilization of historical data in urban traffic signal control.
An accelerated iterative learning control method is adopted, which combines a random forest regression model and a particle swarm optimization algorithm to optimize the initial iteration control signal and learning gain. Online optimization accelerates the convergence speed and reduces the tracking error.
While ensuring convergence, it can quickly and accurately track the desired trajectory, improve the efficiency of road network traffic, and solve the problems of slow convergence speed and low utilization of historical data in iterative learning control algorithms in urban traffic signal control.
Smart Images

Figure CN117058876B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban traffic signal control, and more specifically to an urban traffic signal control method based on accelerated iterative learning control. Background Technology
[0002] In recent years, with the development of science and technology and the popularization of new energy vehicles in my country, more and more people are choosing new energy vehicles as their preferred mode of transportation. By the end of 2022, my country's car ownership had reached 419 million vehicles. However, with the increase in car ownership, traffic congestion has become increasingly serious, and the single traffic control method used in the past can no longer meet the current needs of urban traffic. Therefore, urban intelligent traffic signal control has gradually become a research hotspot in the field of intelligent transportation. By automatically adjusting the duration of traffic lights based on the dynamic changes in traffic flow at intersections and adjacent road segments, the queuing time of vehicles at intersections can be minimized, thereby improving the overall efficiency of urban traffic control systems. Since traffic flow has strong nonlinear, time-varying, and periodic characteristics, and iterative learning control is a fast trajectory tracking control method for repeatable systems, it does not require an accurate system model; it only needs to know the system's input and output to achieve the tracking of the desired trajectory. Therefore, applying iterative learning control to urban traffic signal control is very suitable.
[0003] Currently, there are two main factors affecting the convergence speed of iterative learning control: the initial iterative control signal and the learning gain. While iterative learning control systems applied in urban traffic signal control generally exhibit good convergence and robustness, most do not consider the convergence speed. This is because the convergence conditions in the convergence proofs of iterative learning control are typically derived based on an infinite number of iterations, failing to reflect the convergence speed. Furthermore, if iterative learning control uses a 24-hour iteration cycle, it means that each additional iteration requires an extra day. Therefore, research on how to track the desired trajectory quickly and accurately while ensuring convergence is highly significant. Summary of the Invention
[0004] The purpose of this invention is to provide an urban traffic signal control method based on accelerated iterative learning control, which solves the problems of slow convergence speed and low utilization of historical data in current iterative learning control algorithms used in urban traffic signal control.
[0005] The technical solution adopted in this invention is an urban traffic signal control method based on accelerated iterative learning control, comprising the following steps:
[0006] Step 1) Select the road network to be studied, establish the road network state space equation, i.e., the traffic flow model, according to the principle of vehicle number conservation, and introduce the iterative learning control algorithm into the traffic flow model to establish a traffic flow model based on iterative learning control;
[0007] Step 2) Create a historical iteration information database to build and train the random forest regression model;
[0008] Step 3) During the iteration (k>1) process of the traffic flow model based on iterative learning control, the learning gain of the iterative learning control is optimized online using the particle swarm optimization algorithm.
[0009] Step 4) Save the iterative data of the traffic flow control model based on iterative learning that meets the conditions to the historical iterative information dataset, and continue to improve the historical iterative information dataset.
[0010] The invention is further characterized in that,
[0011] Step 1 is as follows:
[0012] Step 1.1) The traffic flow model used is the store-and-forward model proposed by Gazis. Assuming that road segment z has two adjacent intersections j1 and j2, then q z (t) represents the traffic flow of vehicles entering road segment z from intersection j1 in the upstream segment, r z (t) represents the traffic flow on road segment z entering the downstream road segment from intersection j2, s z (t) represents the traffic flow exiting road segment z from the middle exit of road segment z, and d z (t) represents the traffic flow entering road segment z from the middle entrance of road segment z, such as Figure 2 As shown, based on the principle of vehicle number conservation, the number of vehicles in road segment Z can be obtained as shown in formula (1):
[0013]
[0014] Where: t is the number of sampling steps; ΔT is the sampling period, which is equal to the signal period, ΔT = T; n z (t) represents the number of vehicles on road segment z at time t; τ is the set of road segments where vehicles enter intersection j1; w,z r is the turning rate of a vehicle entering road segment z from upstream road segment w; w (t) represents the output flow rate of the upstream segment w; S z Let z be the saturation flow rate of road segment z; V represents the total effective green light duration for road segment z; z Let z be the set of phases on road segment z that have the right-of-way. Let J be the green light duration for the m-th phase at intersection j2;
[0015] Assume x j,i (t) represents the average queue length of the i-th approach lane at intersection j at time t; a j,i (t) represents the vehicle arrival rate at the i-th approach lane of intersection j at time t; v j,i Let (t) be the vehicle arrival rate of the i-th approach lane of intersection j at time t. Then, the average queuing equation for the i-th approach lane of intersection j at time t+1 is shown in formula (2):
[0016]
[0017] Where: u j,m (t) represents the green light duration for the m-th phase at intersection j; S j,i Let q be the saturation flow rate of the i-th approach lane at intersection j; j,i (t) represents the input flow of the i-th approach lane at intersection j at time t; since each phase of the intersection controls one approach lane, m = i;
[0018] Finally, based on formulas (1) and (2), the vehicle queue length equations for all controlled roads in the entire road network are obtained, as shown in formula (3):
[0019] x(t+1)=Ax(t)+Bu(t)+Ed(t) (3)
[0020] Where: x(t) is the state vector, reflecting the average queue length of all roads; u(t) is the control vector, reflecting the green light duration of all phases at all intersections; d(t) is the state disturbance vector, usually caused by vehicles entering or leaving the road segment through entrances and exits in the middle of the road segment; state matrix A is the identity matrix; input matrix B reflects the topology, phase, period, saturation flow, and turning rate of the road network; E is the state disturbance coefficient matrix.
[0021] Step 1.2) To ensure that the average queue lengths of all approach lanes are balanced, the difference in average queue lengths of each approach lane is selected as the output of the traffic flow model. Assume an intersection j with i (i > 2) approach lanes, whose average queue lengths at time t are x... j,1 (t),x j,2 (t),…,x j,i (t), the average of the average queue lengths of the four entrance lanes. As a baseline, the differences are calculated with each of the four lanes, as shown in formula (4):
[0022]
[0023] Where: y j,i (t) represents the output of the i-th approach lane at intersection j;
[0024] Based on formula (4), the output equation of the entire road network can be derived as shown in formula (5):
[0025] y(t)=Cx(t) (5)
[0026] in: It is a diagonal matrix; n is the number of intersections;
[0027]
[0028] Finally, combining formulas (3) and (5), the state-space equation of the entire road network is obtained, as shown in formula (6):
[0029]
[0030] Where: y(t) is the output vector, reflecting the average queue length difference between roads at the intersection; the output matrix C is a diagonal matrix;
[0031] Step 1.3) Connect the iterative learning control algorithm with the state-space equation of the road network. First, define the output error of the road network state-space equation as shown in formula (7):
[0032] e k (t)=y d (t)-y k (t) (7)
[0033] In the formula: y d (t) represents the desired output of the system; y k (t) represents the actual output of the system; k represents the number of iterations;
[0034] In urban traffic signal control, due to the influence of signal cycles and pedestrian crossing times, the green light time for each phase at each intersection cannot be increased or decreased indefinitely; adjustments are needed. k (t) is restricted as shown in formula (8):
[0035]
[0036] The open-loop and closed-loop PD-type iterative learning control law is shown in equation (9):
[0037] u k+1 (t)=sat[u k (t)]+β1[e k (t+1)-e k [(t)]+β2e k+1 (t) (9)
[0038] Where: sat[u k[(t)] represents the control input; β1 represents the differential learning gain; β2 represents the proportional learning gain;
[0039] Finally, combining formulas (6), (7) and (9), we can obtain the traffic flow model based on iterative learning control, as shown in formula (10):
[0040]
[0041] Step 1.4) Use the traffic flow model based on iterative learning control obtained by formula (10) to iterate, and optimize the initial iterative control signal u0(t) and learning gains β1 and β2 online during the iteration process, so as to accelerate the convergence speed of iterative learning control and reduce tracking error.
[0042] Step 2 is as follows:
[0043] Step 2.1) Collect and save the data with the lowest error value in each time interval of the historical iteration, and build a historical iteration information dataset. The collected data includes the state vector x of each approach lane at each intersection. k (t) and its output error e k (t) and the corresponding control vector u k (t);
[0044] Step 2.2) Train a random forest regression model using the historical iterative information dataset, and convert the control vector u of each approach lane at each intersection in the road network into a random forest regression model. k (t) is the output of the random forest regression model, representing the state vector x of each approach lane at each intersection in the road network. k (t) and its output error e k (t) is used as the input to the random forest regression model;
[0045] Step 2.3) Generate bootstrap sampling training subsets and regression trees: Use the Bootstrap resampling method to randomly sample the training dataset, generating N subsets of the training dataset and N regression trees;
[0046] Step 2.4) Node splitting and growth: When each node of the regression tree splits and grows, M random subsets are extracted from the input parameters of the random forest regression model set in step (2.2) as the splitting subsets of the current node; the CART method is used in each subset to select the optimal way to split the node according to the "minimum squared error" criterion. No pruning is performed during the splitting process, and the value of M remains unchanged.
[0047] Step 2.5) Generate a random forest regression model: Each regression tree grows recursively from top to bottom. During the process, the random forest modeling process parameters (number of subtrees, maximum depth of subtrees, maximum number of leaf nodes in subtrees, minimum number of leaf nodes in subtrees) are continuously adjusted. Once the split termination condition is met, the regression tree stops growing. Finally, all individual regression trees are combined together to form a random forest regression model.
[0048] Step 2.6) Testing the Random Forest Regression Model: All generated regression trees are aggregated to form a random forest regression model. The model is then tested using its coefficient of determination R0. 2 The evaluation of the root mean square error (RMSE) of the test set determines the model's prediction performance. If the prediction performance is unsatisfactory, the random forest modeling process parameters are adjusted and modeling continues until the expected results are achieved.
[0049] Step 2.7) Predict the initial iteration control signal: When the traffic flow model based on iterative learning control is in its initial iteration, the initial iteration state vector x0(t) and output error e0(t) are input into the trained random forest regression model. The arithmetic mean of the predicted values of each individual regression tree is calculated using the "simple averaging method" to finally obtain the initial iteration control signal u0(t) of iterative learning control (initial signal timing scheme).
[0050] Step 2.8) Apply the obtained initial iteration control signal u0(t) to the initial iteration of the traffic flow model based on iterative learning control, and continue iterating.
[0051] In step 2.6, if the coefficient of determination R 2 A value less than 0.9 indicates poor predictive performance.
[0052] Step 3 specifically involves:
[0053] Step 3.1) When iterating the traffic flow model based on iterative learning control (k>1), the output error e at time t of the k-th iteration is... k (t) is used as the input to the particle swarm algorithm, and the learning gains β1 and β2 of the iterative learning control are used as the output of the particle swarm algorithm.
[0054] Step 3.2) Setting the fitness function: In order to accelerate the convergence speed of iterative learning control, the absolute value of the iteration error is integrated over the control period T as the fitness function, and the learning gain is optimized based on the principle of minimizing the fitness function, as shown in formula (11):
[0055]
[0056] Where: e k (t) can be derived from formula (10), e kThe expression for (t) is as follows:
[0057] e k (t)=y d (t)-CAx k (t-1)+CB{sat[u k-1 (t-1)]+β1[e k-1 (t)-e k-1 [(t-1)]+β2e k (t-1)}+CEd k (t-1);
[0058] Step 3.3) Initialize the particle swarm size C and the position P of each particle. α and speed V α As shown in formula (12):
[0059]
[0060] Where: P α V represents the D-dimensional position vector of the α-th particle; α Let D represent the D-dimensional velocity vector of the α-th particle; since the two gains of the iterative learning control are optimized, D = 2;
[0061] Step 3.4) Using formula (11), calculate the fitness value fit[P] of each particle. α ];
[0062] Step 3.5) For each particle α, use its fitness value fit[P] α ] and individual extreme values fit[P best,α Compare, if fit[P] α ]<fit[P best,α ], then use P α Update P best,α That is, P best,α =P α ;
[0063] Step 3.6) For each particle α, use its fitness value fit[P] α ] and global extremum fit[G best Compare, if fit[P] α ]<fit[G best ], then use P α Update G best G best =P α ;
[0064] Step 3.7) Iteratively update the particle position P α and speed V αAs shown in formula (13):
[0065]
[0066] Where: c1 and c2 are acceleration constants, let c1 = c2 = 1.5; r1(λ) and r2(λ) are uniformly random numbers in the range [0,1]; d = 1,2,…,D; p αd Let p be the position of the particle. αd ∈[p min ,p max ];v αd Let v be the velocity of the particle. αd ∈[v min ,v max ]; λ is the number of particle swarm iterations;
[0067] Step 3.8) For the position p of each particle αd and speed v αd Boundary condition processing is performed. If the value exceeds the set range p... αd ∈[p min ,p max ] and v αd ∈[v min ,v max If ], then set it as a boundary value;
[0068] Step 3.9) Determine if the particle swarm optimization (PSO) algorithm termination condition is met: if so, terminate the PSO algorithm and transfer the global optimal position information G. best =[g1,g2] are used as the learning gains β1 and β2 of iterative learning control, respectively, and applied to the traffic flow model based on iterative learning control; otherwise, return to step 3.4);
[0069] Step 3.10) Determine whether the iterative learning control algorithm meets the termination condition: if yes, end the current iterative learning control algorithm; otherwise, return to step 3.1) and continue to optimize the learning gain of the traffic flow model based on iterative learning control for each iteration.
[0070] The beneficial effects of this invention are:
[0071] (1) The method of the present invention uses the random forest regression algorithm to apply the initial control value of the iterative learning control.
[0072] While optimizing the initial signal timing, this invention also uses a particle swarm optimization algorithm to optimize the learning gain of the iterative learning control and applies it to the PD-type iterative learning control. The convergence speed of iterative learning control is mainly related to the selection of the initial iterative control signal and the learning gain. Therefore, this invention ensures the convergence of the iterative learning control algorithm while achieving a faster convergence speed and lower tracking error, thus enabling the road network to reach equilibrium more quickly and improving the overall traffic efficiency of the road network. This allows the iterative learning control algorithm applied in urban traffic signal control to track the desired trajectory quickly and accurately while ensuring convergence, thereby improving the convergence speed and tracking accuracy of the iterative learning control algorithm and solving the problems of slow convergence speed and low utilization of historical data in current iterative learning control algorithms applied in urban traffic signal control.
[0073] (2) The present invention is a city traffic signal control method based on accelerated iterative learning control, which simultaneously solves the problem of selecting the initial iterative control signal and the problem of online optimization of the learning gain, so as to accelerate the convergence speed of iterative learning control and reduce the tracking error, thereby enabling the traffic network to reach the equilibrium state faster and improve the overall traffic efficiency of the network. Attached Figure Description
[0074] Figure 1 This is a flowchart illustrating the urban traffic signal control method based on accelerated iterative learning control according to the present invention.
[0075] Figure 2 This is a schematic diagram of the traffic flow model of the urban traffic signal control method based on accelerated iterative learning control of the present invention.
[0076] Figure 3 These are experimental comparison images of the urban traffic signal control method based on accelerated iterative learning control according to the present invention. Detailed Implementation
[0077] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0078] This invention proposes an urban traffic signal control method based on accelerated iterative learning control, such as... Figure 1 As shown, it includes the following steps:
[0079] Step 1) Select the road network to be studied, establish the road network state space equation, i.e., the traffic flow model, according to the principle of vehicle number conservation, and introduce the iterative learning control algorithm into the traffic flow model to establish a traffic flow model based on iterative learning control;
[0080] Step 1 is as follows:
[0081] Step 1.1) The traffic flow model used is the store-and-forward model proposed by Gazis. Assuming that road segment z has two adjacent intersections j1 and j2, then q z (t) represents the traffic flow of vehicles entering road segment z from intersection j1 in the upstream segment, r z (t) represents the traffic flow on road segment z entering the downstream road segment from intersection j2, s z (t) represents the traffic flow exiting road segment z from the middle exit of road segment z, and d z (t) represents the traffic flow entering road segment z from the middle entrance of road segment z, such as Figure 2 As shown, based on the principle of vehicle number conservation, the number of vehicles in road segment Z can be obtained as shown in formula (1):
[0082]
[0083] Where: t is the number of sampling steps; ΔT is the sampling period, which is equal to the signal period, ΔT = T; n z (t) represents the number of vehicles on road segment z at time t; τ is the set of road segments where vehicles enter intersection j1; w,z r is the turning rate of a vehicle entering road segment z from upstream road segment w; w (t) represents the output flow rate of the upstream segment w; S z Let z be the saturation flow rate of road segment z; V represents the total effective green light duration for road segment z; z Let z be the set of phases on road segment z that have the right-of-way. Let J be the green light duration for the m-th phase at intersection j2;
[0084] Assume x j,i (t) represents the average queue length of the i-th approach lane at intersection j at time t; a j,i (t) represents the vehicle arrival rate at the i-th approach lane of intersection j at time t; v j,i Let (t) be the vehicle arrival rate of the i-th approach lane of intersection j at time t. Then, the average queuing equation for the i-th approach lane of intersection j at time t+1 is shown in formula (2):
[0085]
[0086] Where: u j,m (t) represents the green light duration for the m-th phase at intersection j; S j,i Let q be the saturation flow rate of the i-th approach lane at intersection j; j,i (t) represents the input flow of the i-th approach lane at intersection j at time t; since each phase of the intersection controls one approach lane, m = i;
[0087] Finally, based on formulas (1) and (2), the vehicle queue length equations for all controlled roads in the entire road network are obtained, as shown in formula (3):
[0088] x(t+1)=Ax(t)+Bu(t)+Ed(t) (3)
[0089] Where: x(t) is the state vector, reflecting the average queue length of all roads; u(t) is the control vector, reflecting the green light duration of all phases at all intersections; d(t) is the state disturbance vector, usually caused by vehicles entering or leaving the road segment through entrances and exits in the middle of the road segment; state matrix A is the identity matrix; input matrix B reflects the topology, phase, period, saturation flow, and turning rate of the road network; E is the state disturbance coefficient matrix.
[0090] Step 1.2) To ensure that the average queue lengths of all approach lanes are balanced, the difference in average queue lengths of each approach lane is selected as the output of the traffic flow model. Assume an intersection j with i (i > 2) approach lanes, whose average queue lengths at time t are x... j,1 (t),x j,2 (t),…,x j,i (t), the average of the average queue lengths of the four entrance lanes. As a baseline, the differences are calculated with each of the four lanes, as shown in formula (4):
[0091]
[0092] Where: y j,i (t) represents the output of the i-th approach lane at intersection j;
[0093] Based on formula (4), the output equation of the entire road network can be derived as shown in formula (5):
[0094] y(t)=Cx(t) (5)
[0095] in: It is a diagonal matrix; n is the number of intersections;
[0096]
[0097] Finally, combining formulas (3) and (5), the state-space equation of the entire road network is obtained, as shown in formula (6):
[0098]
[0099] Where: y(t) is the output vector, reflecting the average queue length difference between roads at the intersection; the output matrix C is a diagonal matrix;
[0100] Step 1.3) Connect the iterative learning control algorithm with the state-space equation of the road network. First, define the output error of the road network state-space equation as shown in formula (7):
[0101] e k (t)=y d (t)-y k (t) (7)
[0102] In the formula: y d (t) represents the desired output of the system; y k (t) represents the actual output of the system; k represents the number of iterations.
[0103] In urban traffic signal control, due to the influence of signal cycles and pedestrian crossing times, the green light time for each phase at each intersection cannot be increased or decreased indefinitely; adjustments are needed. k (t) is restricted as shown in formula (8):
[0104]
[0105] The open-loop and closed-loop PD-type iterative learning control law is shown in equation (9):
[0106] u k+1 (t)=sat[u k (t)]+β1[e k (t+1)-e k [(t)]+β2e k+1 (t) (9)
[0107] Where: sat[u k [(t)] represents the control input; β1 represents the differential learning gain; and β2 represents the proportional learning gain.
[0108] Finally, combining formulas (6), (7) and (9), we can obtain the traffic flow model based on iterative learning control, as shown in formula (10):
[0109]
[0110] Step 1.4) Use the traffic flow model based on iterative learning control obtained by formula (10) to iterate, and optimize the initial iterative control signal u0(t) and learning gains β1 and β2 online during the iteration process, so as to accelerate the convergence speed of iterative learning control and reduce tracking error.
[0111] Step 2) Create a historical iteration information database to build and train the random forest regression model. During the initial iteration (k=1) of the traffic flow model based on iterative learning control, the random forest regression model is used to predict the initial iteration control signal u0(t), thereby reducing the initial iteration error and accelerating the convergence speed of the iterative learning control.
[0112] Step 2 is as follows:
[0113] Step 2.1) Collect and save the data with the lowest error value in each time interval of the historical iterations, and establish a historical iteration information dataset. Table 1 shows a portion of the data in the historical iteration information dataset, where the collected data includes the state vector x of each approach lane at each intersection. k (t) and its output error e k (t) and the corresponding control vector u k (t);
[0114] Table 1. Partial Data of Historical Iteration Information for Urban Traffic Signal Control Method Based on Accelerated Iterative Learning Control
[0115]
[0116] Step 2.2) Train a random forest regression model using the historical iterative information dataset, and convert the control vector u of each approach lane at each intersection in the road network into a random forest regression model. k (t) is the output of the random forest regression model, representing the state vector x of each approach lane at each intersection in the road network. k (t) and its output error e k (t) is used as the input to the random forest regression model;
[0117] Step 2.3) Generate bootstrap sampling training subsets and regression trees: Use the Bootstrap resampling method to randomly sample the training dataset, generating N subsets of the training dataset and N regression trees;
[0118] Step 2.4) Node splitting and growth: When each node of the regression tree splits and grows, M random subsets are extracted from the input parameters of the random forest regression model set in step (2.2) as the splitting subsets of the current node; the CART method is used in each subset to select the optimal way to split the node according to the "minimum squared error" criterion. No pruning is performed during the splitting process, and the value of M remains unchanged.
[0119] Step 2.5) Generate a random forest regression model: Each regression tree grows recursively from top to bottom. During the process, the random forest modeling process parameters (number of subtrees, maximum depth of subtrees, maximum number of leaf nodes in subtrees, minimum number of leaf nodes in subtrees) are continuously adjusted. Once the split termination condition is met, the regression tree stops growing. Finally, all individual regression trees are combined together to form a random forest regression model.
[0120] Step 2.6) Testing the Random Forest Regression Model: All generated regression trees are aggregated to form a random forest regression model. The model is then tested by evaluating its coefficient of determination (R²). 2 The evaluation of the root mean square error (RMSE) of the test set determines the model's predictive performance. If the coefficient of determination (R²) is... 2 If the value is less than 0.9, the prediction effect is not good. In this case, the random forest modeling process parameters are adjusted and modeling continues until the expected effect is achieved.
[0121] Step 2.7) Predict the initial iteration control signal: When the traffic flow model based on iterative learning control is in its initial iteration (k=1), the control vector x0(t) and output error e0(t) of the initial iteration are input into the trained random forest regression model. The arithmetic mean of the predicted values of each individual regression tree is calculated using the "simple averaging method" to finally obtain the initial iteration control signal u0(t) of iterative learning control (initial signal timing scheme).
[0122] Step 2.8) Apply the obtained initial iteration control signal u0(t) to the initial iteration (k=1) of the traffic flow model based on iterative learning control, and continue iterating.
[0123] Step 3) During the iteration (k>1) process of the traffic flow model based on iterative learning control, the particle swarm optimization algorithm is used to optimize the learning gain β1 and β2 of iterative learning control online, so as to minimize the iteration error under the optimized learning gain, thereby accelerating the convergence speed of iterative learning control.
[0124] Step 3 specifically involves:
[0125] Step 3.1) When iterating the traffic flow model based on iterative learning control (k>1), the output error e at time t of the k-th iteration is... k (t) is used as the input to the particle swarm algorithm, and the learning gains β1 and β2 of the iterative learning control are used as the output of the particle swarm algorithm.
[0126] Step 3.2) Setting the fitness function: In order to accelerate the convergence speed of iterative learning control, the absolute value of the iteration error is integrated over the control period T as the fitness function, and the learning gain is optimized based on the principle of minimizing the fitness function, as shown in formula (11):
[0127]
[0128] Where: e k (t) can be derived from formula (10), e k The expression for (t) is as follows:
[0129] e k (t)=y d (t)-CAx k (t-1)+CB{sat[u k-1 (t-1)]+β1[e k-1 (t)-e k-1 [(t-1)]+β2e k (t-1)}+CEd k (t-1);
[0130] Step 3.3) Initialize the particle swarm size C and the position P of each particle. α and speed V α As shown in formula (12):
[0131]
[0132] Where: P α V represents the D-dimensional position vector of the α-th particle; α Let D represent the D-dimensional velocity vector of the α-th particle; since the two gains of the iterative learning control are optimized, D = 2;
[0133] Step 3.4) Using formula (11), calculate the fitness value fit[P] of each particle. α ];
[0134] Step 3.5) For each particle α, use its fitness value fit[P] α ] and individual extreme values fit[P best,α Compare, if fit[P] α ]<fit[P best,α ], then use P α Update P best,α That is, P best,α =P α ;
[0135] Step 3.6) For each particle α, use its fitness value fit[P] α ] and global extremum fit[G best Compare, if fit[P] α ]<fit[G best ], then use P α Update G best Gbest =P α ;
[0136] Step 3.7) Iteratively update the particle position P α and speed V α As shown in formula (13):
[0137]
[0138] Where: c1 and c2 are acceleration constants, let c1 = c2 = 1.5; r1(λ) and r2(λ) are uniformly random numbers in the range [0,1]; d = 1,2,…,D; p αd Let p be the position of the particle. αd ∈[p min ,p max ];v αd Let v be the velocity of the particle. αd ∈[v min ,v max ]; λ is the number of particle swarm iterations;
[0139] Step 3.8) For the position p of each particle αd and speed v αd Boundary condition processing is performed. If the value exceeds the set range p... αd ∈[p min ,p max ] and v αd ∈[v min ,v max If ], then set it as a boundary value;
[0140] Step 3.9) Determine if the particle swarm optimization (PSO) algorithm termination condition is met: if so, terminate the PSO algorithm and transfer the global optimal position information G. best =[g1,g2] are used as the learning gains β1 and β2 of iterative learning control, respectively, and applied to the traffic flow model based on iterative learning control; otherwise, return to step 3.4);
[0141] Step 3.10): Determine if the iterative learning control algorithm meets the termination condition. If yes, end the current iteration of the iterative learning control algorithm. Otherwise, return to step 3.1) and continue to optimize the learning gain of the traffic flow model based on iterative learning control for each iteration.
[0142] Step 4) Iterate the data (state vector x) of the traffic flow control model based on iterative learning that meets the conditions. k (t), output error e k (t), control vector u k (t) is saved to the historical iteration information dataset to continue improving the historical iteration information dataset.
[0143] To verify the effectiveness of the urban traffic signal control method based on accelerated iterative learning control, simulation experiments were conducted on the traffic flow model proposed in formula (6) using three methods: PD-based iterative learning control, random forest-based iterative learning control, and particle swarm optimization (PSO) iterative learning control. The PD-based iterative learning control method is the method described in step 1; the random forest-based iterative learning control method is the method described in steps 1 and 2; and the PSO iterative learning control method is the method described in steps 1 and 3. Figure 3 As shown, the urban traffic signal control method based on accelerated iterative learning control has a faster tracking speed and a lower convergence error.
[0144] This invention presents an urban traffic signal control method based on accelerated iterative learning control. By addressing the issues of initial control signal selection and learning gain optimization in the initial iteration, it reduces the initial error of iterative learning control and accelerates its convergence speed. This allows it to achieve low tracking speed and low tracking error while maintaining convergence, thereby balancing the traffic flow across all intersections and approach lanes and improving the overall traffic efficiency of the road network. It solves the problem of slow convergence speed in current iterative learning control algorithms used in urban traffic signal control.
[0145] Example 1
[0146] A method for urban traffic signal control based on accelerated iterative learning control, characterized by the following steps:
[0147] Step 1) Establish a traffic flow model based on iterative learning control;
[0148] Step 2) Create a historical iteration information database to build and train the random forest regression model;
[0149] Step 3) During the iteration of the traffic flow model based on iterative learning control, the particle swarm optimization algorithm is used to optimize the learning gain of the iterative learning control online.
[0150] Step 4) Save the iterative data of the traffic flow control model based on iterative learning that meets the conditions to the historical iterative information dataset, and continue to improve the historical iterative information dataset.
[0151] Example 2
[0152] A method for urban traffic signal control based on accelerated iterative learning control, characterized by the following steps:
[0153] Step 1) Establish a traffic flow model based on iterative learning control;
[0154] Step 1 is as follows:
[0155] Step 1.1) The traffic flow model used is the store-and-forward model proposed by Gazis. Assuming that road segment z has two adjacent intersections j1 and j2, then q z (t) represents the traffic flow of vehicles entering road segment z from intersection j1 in the upstream segment, r z (t) represents the traffic flow on road segment z entering the downstream road segment from intersection j2, s z (t) represents the traffic flow exiting road segment z from the middle exit of road segment z, and d z (t) represents the traffic flow entering road segment z from the middle entrance of road segment z. According to the principle of vehicle number conservation, the number of vehicles in road segment Z can be obtained as shown in formula (1):
[0156]
[0157] Where: t is the number of sampling steps; ΔT is the sampling period, which is equal to the signal period, ΔT = T; n z (t) represents the number of vehicles on road segment z at time t; τ is the set of road segments where vehicles enter intersection j1; w,z r is the turning rate of a vehicle entering road segment z from upstream road segment w; w (t) represents the output flow rate of the upstream segment w; S z Let z be the saturation flow rate of road segment z; V represents the total effective green light duration for road segment z; z Let z be the set of phases on road segment z that have the right-of-way. Let J be the green light duration for the m-th phase at intersection j2;
[0158] Assume x j,i (t) represents the average queue length of the i-th approach lane at intersection j at time t; a j,i (t) represents the vehicle arrival rate at the i-th approach lane of intersection j at time t; v j,i Let (t) be the vehicle arrival rate of the i-th approach lane of intersection j at time t. Then, the average queuing equation for the i-th approach lane of intersection j at time t+1 is shown in formula (2):
[0159]
[0160] Where: u j,m (t) represents the green light duration for the m-th phase at intersection j; S j , i Let q be the saturation flow rate of the i-th approach lane at intersection j; j,i (t) represents the input flow of the i-th approach lane at intersection j at time t; since each phase of the intersection controls one approach lane, m = i;
[0161] Finally, based on formulas (1) and (2), the vehicle queue length equations for all controlled roads in the entire road network are obtained, as shown in formula (3):
[0162] x(t+1)=Ax(t)+Bu(t)+Ed(t) (3)
[0163] Where: x(t) is the state vector, reflecting the average queue length of all roads; u(t) is the control vector, reflecting the green light duration of all phases at all intersections; d(t) is the state disturbance vector, usually caused by vehicles entering or leaving the road segment through entrances and exits in the middle of the road segment; state matrix A is the identity matrix; input matrix B reflects the topology, phase, period, saturation flow, and turning rate of the road network; E is the state disturbance coefficient matrix.
[0164] Step 1.2) Assume an intersection j with i approach lanes, and the average queue length at time t is x. j,1 (t),x j,2 (t),…,x j,i (t), the average of the average queue lengths of the four entrance lanes. As a baseline, the differences are calculated with each of the four lanes, as shown in formula (4):
[0165]
[0166] Where: y j,i (t) represents the output of the i-th approach lane at intersection j;
[0167] Based on formula (4), the output equation of the entire road network can be derived as shown in formula (5):
[0168] y(t)=Cx(t) (5)
[0169] in: It is a diagonal matrix; n is the number of intersections;
[0170]
[0171] Finally, combining formulas (3) and (5), the state-space equation of the entire road network is obtained, as shown in formula (6):
[0172]
[0173] Where: y(t) is the output vector, reflecting the average queue length difference between roads at the intersection; the output matrix C is a diagonal matrix;
[0174] Step 1.3) First, define the output error of the road network state space equation as shown in formula (7):
[0175] e k (t)=y d (t)-y k (t) (7)
[0176] In the formula: y d (t) represents the desired output of the system; y k (t) represents the actual output of the system; k represents the number of iterations;
[0177] For u k (t) is restricted as shown in formula (8):
[0178]
[0179] The open-loop and closed-loop PD-type iterative learning control law is shown in equation (9):
[0180] u k+1 (t)=sat[u k (t)]+β1[e k (t+1)-e k [(t)]+β2e k+1 (t) (9)
[0181] Where: sat[u k [(t)] represents the control input; β1 represents the differential learning gain; β2 represents the proportional learning gain;
[0182] Finally, combining formulas (6), (7) and (9), we can obtain the traffic flow model based on iterative learning control, as shown in formula (10):
[0183]
[0184] Step 1.4) Iterate using the traffic flow model based on iterative learning control obtained from formula (10), and optimize the initial iterative control signal u0(t) and learning gains β1 and β2 online during the iteration process.
[0185] Step 2) Create a historical iteration information database to build and train the random forest regression model;
[0186] Step 3) During the iteration of the traffic flow model based on iterative learning control, the particle swarm optimization algorithm is used to optimize the learning gain of the iterative learning control online.
[0187] Step 4) Save the iterative data of the traffic flow control model based on iterative learning that meets the conditions to the historical iterative information dataset, and continue to improve the historical iterative information dataset.
[0188] Example 3
[0189] Based on Example 2, step 2 specifically includes:
[0190] Step 2.1) Collect and save the data with the lowest error value in each time interval of the historical iteration, and build a historical iteration information dataset. The collected data includes the state vector x of each approach lane at each intersection. k (t) and output error e k (t) and the corresponding control vector u k (t);
[0191] Step 2.2) Train a random forest regression model using the historical iterative information dataset, and convert the control vector u of each approach lane at each intersection in the road network into a random forest regression model. k (t) is the output of the random forest regression model, representing the state vector x of each approach lane at each intersection in the road network. k (t) and its output error e k (t) is used as the input to the random forest regression model;
[0192] Step 2.3) Generate bootstrap sampling training subsets and regression trees: Use the Bootstrap resampling method to randomly sample the training dataset, generating N subsets of the training dataset and N regression trees;
[0193] Step 2.4) Node splitting and growth: When each node of the regression tree splits and grows, M random subsets are extracted from the input parameters of the random forest regression model set in step (2.2) as the splitting subsets of the current node; the CART method is used in each subset to select the optimal way to split the node according to the "minimum squared error" criterion. No pruning is performed during the splitting process, and the value of M remains unchanged.
[0194] Step 2.5) Generate a random forest regression model: Each regression tree grows recursively from top to bottom. During the process, the parameters of the random forest modeling process are continuously adjusted. Once the splitting termination condition is met, the regression tree stops growing. Finally, all the individual regression trees are combined together to form a random forest regression model.
[0195] Step 2.6) Testing the Random Forest Regression Model: All generated regression trees are aggregated to form a random forest regression model. The model is then tested using its coefficient of determination R0. 2 The root mean square error of the test set is evaluated to determine the model's prediction performance. If the prediction performance is not good, the random forest modeling process parameters are adjusted and modeling continues until the expected results are achieved.
[0196] Step 2.7) Predict the initial iteration control signal: When the traffic flow model based on iterative learning control is in its initial iteration, the initial iteration state vector x0(t) and output error e0(t) are input into the trained random forest regression model. The arithmetic mean of the predicted values of each single regression tree is calculated using the "simple averaging method" to finally obtain the initial iteration control signal u0(t) of iterative learning control.
[0197] Step 2.8) Apply the obtained initial iteration control signal u0(t) to the initial iteration of the traffic flow model based on iterative learning control, and continue iterating.
Claims
1. A method for urban traffic signal control based on accelerated iterative learning control, characterized in that, Includes the following steps: Step 1) Establish a traffic flow model based on iterative learning control; Step 2) Create a historical iteration information database to build and train the random forest regression model; Step 2 is as follows: Step 2.1) Collect and save the data with the lowest error value in each time interval of the historical iteration, and build a historical iteration information dataset. The collected data includes the state vector of each approach lane at each intersection. and output error and the corresponding control vector ; Step 2.2) Train a random forest regression model using the historical iteration information dataset, and convert the control vectors of each approach lane at each intersection in the road network into... As the output of the random forest regression model, the state vector of each approach lane at each intersection in the road network is... and its output error As input to the random forest regression model; Step 2.3) Generate bootstrap sampling training subsets and regression trees: Use the Bootstrap resampling method to randomly sample the training dataset, generating N subsets of the training dataset and N regression trees; Step 2.4) Node splitting and growth: When each node of the regression tree splits and grows, M random subsets are extracted from the input parameters of the random forest regression model set in step (2.2) as the splitting subsets of the current node; the CART method is used in each subset to select the optimal way to split the node according to the "minimum squared error" criterion. No pruning is performed during the splitting process, and the value of M remains unchanged. Step 2.5) Generate a random forest regression model: Each regression tree grows recursively from top to bottom. During the process, the parameters of the random forest modeling process are continuously adjusted. Once the splitting termination condition is met, the regression tree stops growing. Finally, all the individual regression trees are combined together to form a random forest regression model. Step 2.6) Testing the Random Forest Regression Model: All generated regression trees are aggregated to form a random forest regression model. The model is then tested using its coefficient of determination R0. 2 The root mean square error of the test set is evaluated to determine the model's prediction performance. If the prediction performance is not good, the random forest modeling process parameters are adjusted and modeling continues until the expected results are achieved. Step 2.7) Predict the initial iteration control signal: During the initial iteration of the traffic flow model based on iterative learning control, the initial iteration state vector is... Output error The predicted values of each individual regression tree are fed into a trained random forest regression model, and the arithmetic mean of the predicted values is calculated using a "simple averaging method." This yields the initial iterative control signal for iterative learning control. ; Step 2.8) Obtain the initial iteration control signal This is applied to the initial iteration of the traffic flow model based on iterative learning control, and the iteration continues. Step 3) During the iteration of the traffic flow model based on iterative learning control, the particle swarm optimization algorithm is used to optimize the learning gain of the iterative learning control online. Step 3 specifically involves: Step 3.1) When iterating the traffic flow model based on iterative learning control, the first... k Second iteration t Output error at time The learning gain, controlled by iterative learning, is used as input to the particle swarm optimization algorithm. and As the output of the particle swarm optimization algorithm; Step 3.2) Set the fitness function: Set the absolute value of the iteration error within the control period. T The inner integral is used as the fitness function, and the learning gain is optimized based on the principle of minimizing the fitness function, as shown in formula (11): (11) in: The expression is as follows: In the formula, the state matrix A The identity matrix; input matrix B It reflects the topology, phase, period, saturation flow, and turning rate of the road network; E This is the state perturbation coefficient matrix; Step 3.3) Initialize the particle swarm size C and the position of each particle. and speed As shown in formula (12): (12) in: Indicates the first individual particles D 3D position vector; Indicates the first The D-dimensional velocity vector of each particle; due to the optimization of the two gains of the iterative learning control, therefore ; Step 3.4) Use formula (11) to calculate the fitness value of each particle. ; Step 3.5) For each particle Use its fitness value and individual extreme values Comparison, if Then use renew ,Right now ; Step 3.6) For each particle Use its fitness value and global extrema Comparison, if Then use renew ,Right now ; Step 3.7) Iteratively update the particle positions. and speed As shown in formula (13): (13) in: and Let be the acceleration constant. ; and for Uniformly distributed random numbers within a given range; ; The position of the particle, and ; The velocity of the particle, and ; This represents the number of particle swarm iterations. Step 3.8) Position of each particle and speed Perform boundary condition processing; if it exceeds the set range... and If so, then set it as a boundary value; Step 3.9) Determine if the particle swarm optimization (PSO) algorithm termination condition is met: if so, terminate the PSO algorithm and transfer the global optimal position information. The learning gain is used as the control for iterative learning. and Apply it to the traffic flow model based on iterative learning control; otherwise, return to step 3.
4. Step 3.10) Determine whether the iterative learning control algorithm meets the termination condition: if yes, end the current iterative learning control algorithm; otherwise, return to step 3.1) and continue to optimize the learning gain of the traffic flow model based on iterative learning control for each iteration. Step 4) Save the iterative data of the traffic flow control model based on iterative learning that meets the conditions to the historical iterative information dataset, and continue to improve the historical iterative information dataset.
2. The urban traffic signal control method based on accelerated iterative learning control according to claim 1, characterized in that, Step 1 is as follows: Step 1.1) The traffic flow model used is the store-and-forward model proposed by Gazis. Road segment z has two adjacent intersections. j 1 and j 2, then For vehicles on the upstream section from the intersection j 1. Traffic flow entering section z. For vehicles on road segment z, from the intersection j 2. Traffic flow entering the downstream section This represents the traffic flow exiting road segment z from the middle exit. Let Z be the traffic flow entering Z from the middle entrance of Z. According to the principle of vehicle number conservation, the number of vehicles in Z can be obtained as shown in formula (1): (1) in: t This represents the number of sampling steps. To ensure that the sampling period is equal to the signal period, ; for The number of vehicles on road segment z at time point; For vehicles to enter the intersection j The set of road segments of number 1; For vehicles from the upstream section w Entering the section of road z The turning rate; upstream section w ; output flow rate; For road section z saturation flow rate; For road section z Total effective green light duration; Let z be the set of phases on road segment z that have the right-of-way. Intersection j 2nd m The green light time for each phase; for t Intersection j No. i Average queue length per entrance lane; for t Intersection j No. i Vehicle arrival rate at each entrance lane; for t Intersection j No. i The vehicle arrival rate of each entrance lane, then t +1 hour intersection j No. i The average queuing equation for each entrance lane is shown in formula (2): (2) in: Intersection j No. m Green light duration for each phase; Intersection j No. i The saturation flow rate of each inlet channel; The intersection at time t j No. i The input flow of each approach lane; since each phase of the intersection controls one approach lane, therefore ; Finally, based on formulas (1) and (2), the vehicle queue length equations for all controlled roads in the entire road network are obtained, as shown in formula (3): (3) in: This is a state vector that reflects the average queue length across all roads; This is a control vector that reflects the green light duration for all phases at all intersections; The state disturbance vector is typically caused by vehicles entering or exiting the road segment via entrances or exits in the middle of the road segment; the state matrix... A The identity matrix; input matrix B It reflects the topology, phase, period, saturation flow, and turning rate of the road network; E This is the state perturbation coefficient matrix; Step 1.2) Assume a having Intersection of one entrance lane j Their average queue lengths at time t are respectively The average of the average queue lengths of the four entrance lanes As a benchmark, the differences are calculated with each of the four lanes, as shown in formula (4): (4) in: Intersection j No. i The output of the import channel; ; Based on formula (4), the output equation of the entire road network can be derived as shown in formula (5): (5) in: It is a diagonal matrix; n The number of intersections; ; ; Finally, combining formulas (3) and (5), the state-space equation of the entire road network is obtained, as shown in formula (6): (6) in: The output vector reflects the average queue length difference between roads at the intersection; the output matrix... C It is a diagonal matrix; Step 1.3) First, define the output error of the road network state space equation as shown in formula (7): (7) In the formula: The expected output of the system; This is the actual output of the system; k This represents the number of iterations. right The restrictions are as shown in formula (8): (8) The open-loop and closed-loop PD-type iterative learning control law is shown in formula (9): (9) in: For control input; The differential learning gain; For proportional learning gain; Finally, combining formulas (6), (7) and (9), we can obtain the traffic flow model based on iterative learning control, as shown in formula (10): (10) Step 1.4) Iterate using the traffic flow model based on iterative learning control obtained from formula (10), and adjust the control signal for the first iteration during the iteration process. and learning gain and Conduct online optimization.
3. The urban traffic signal control method based on accelerated iterative learning control according to claim 1, characterized in that, In step 2.6, if the coefficient of determination R 2 A value less than 0.9 indicates poor predictive performance.
Citation Information
Patent Citations
Face detection method, device, computer equipment and storage medium
CN107169463A
Intersection traffic state identification method based on PSO-ELM algorithm
CN114333307A