Intelligent traffic signal lamp control method based on improved particle swarm optimization algorithm
By improving the intelligent traffic light control method of the particle swarm optimization algorithm (I-PSO) and dynamically adjusting the green light time, the problem that traditional methods cannot cope with changes in real-time traffic flow is solved, and the optimization of traffic flow and the reduction of traffic congestion are achieved.
Patent Information
- Application Number
- CN202411574742.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional traffic light control methods cannot flexibly adjust the green light time according to changes in real-time traffic flow, resulting in traffic congestion easily during peak hours.
An intelligent traffic light control method based on the improved particle swarm optimization algorithm (I-PSO) is adopted. Through real-time data collection and preprocessing, the particle swarm is initialized, the particle position is evaluated, the particle speed and position are updated, and adaptive inertia weight and local search enhancement are introduced. Mechanism to dynamically adjust the green time of the signal light.
The green light time of the signal light is adjusted according to the real -time traffic traffic, optimizing traffic flow, reducing traffic congestion, improving the efficiency of road traffic, and improving the intelligent level of signal light control.
Smart Images

Figure CN119360644A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of traffic control and relates to an intelligent traffic light control method, in particular to an intelligent traffic light control method based on an improved particle swarm optimization algorithm (I-PSO), which is used to dynamically adjust the green light time of a traffic light to optimize traffic flow and reduce traffic congestion. Background Art
[0002] Traditional traffic light control methods are usually fixed-time, which means that the green light time of the traffic light is switched according to a pre-set schedule. Although this method is simple and easy to implement, it has obvious limitations in practical applications. With the acceleration of urbanization, traffic flow is becoming more and more volatile, especially during peak hours in the morning and evening, when the number and direction of vehicles change significantly. Fixed-time controlled traffic lights often cause serious traffic congestion in this case because they cannot flexibly adjust the green light time according to changes in real-time traffic flow.
[0003] For example, during peak hours in the morning and evening, the traffic volume in the east-west direction may increase significantly, while the traffic volume in the north-south direction is relatively small. If the traffic lights still switch to green at fixed time intervals, the vehicles in the east-west direction will have to wait too long, while the vehicles in the north-south direction may not have enough vehicles passing during the green light period, thus wasting precious travel time. This situation not only increases the waiting time for drivers, but may also lead to further deterioration of traffic flow.
[0004] In addition, with the continuous development of intelligent transportation systems, people increasingly expect traffic control systems to be more intelligent and efficient to adapt to the ever-changing urban traffic environment. Therefore, a method that can dynamically adjust the green light time of traffic lights is needed to optimize traffic flow and reduce traffic congestion. Summary of the invention
[0005] In order to overcome the shortcomings of the existing technology, the present invention provides an intelligent traffic light control method based on an improved particle swarm optimization algorithm (I-PSO). By introducing adaptive inertia weight and local search enhancement mechanism, the method can dynamically adjust the green light time of the traffic light to optimize traffic flow and reduce traffic congestion.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] An intelligent traffic signal light control method based on an improved particle swarm optimization algorithm comprises the following steps:
[0008] Step 1: Data collection. The process is as follows:
[0009] 1.1. Real-time data collection;
[0010] 1.2. Data preprocessing, including:
[0011] 1.2.1. Cleaning data: removing invalid data and outliers;
[0012] 1.2.2 Formatting data: converting the collected data into a unified format;
[0013] 1.2.3 Storing data: storing the processed data in the database;
[0014] Step 2: Initialize the particle swarm. The process is as follows:
[0015] 2.1. Set the number of particles: Initialize the number of particles, each particle represents a possible green light time allocation scheme;
[0016] 2.2. Initialize particle position and velocity;
[0017] 2.3. Set parameters: Initialize algorithm parameters: inertia weight and acceleration coefficient;
[0018] Step 3: Evaluate the particle position. The process is as follows:
[0019] 3.1. Simulation calculation of fitness value: Using the traffic simulation model, the fitness function is calculated according to the position of each particle;
[0020] 3.2. Fitness value calculation: The fitness value of each particle position is calculated through simulation, and particles with high fitness values are set to represent a green light time allocation scheme with short waiting time and high traffic efficiency;
[0021] Step 4: Update particle velocity and position. The process is as follows:
[0022] 4.1. Update speed: According to formula v i (t+1)=wv i +c1.r1.(pbest i -x i (t)+c2r2(gbest-x i (t)) Update the velocity of each particle;
[0023] Among them, v i (t+1) is the velocity of particle i at time t+1;
[0024] w is the inertia weight, which is used to balance the global and local search capabilities of particles;
[0025] v i is the speed of i at time t;
[0026] c1 is the individual learning factor, regulating the effect of individual experience on particle velocity;
[0027] r1 is an individual random number, which is used to introduce randomness and increase the diversity of the algorithm;
[0028] c2 is the social learning factor, which regulates the effect of group experience on particle velocity;
[0029] r2 is a social random number, also used to introduce randomness;
[0030] r1 and r2 are random numbers between 0 and 1, used to increase the randomness and diversity of the algorithm;
[0031] pbest i is the best historical position of particle i;
[0032] gbest is the best of all particles’ best historical positions;
[0033] x i (t) is the position of particle i at time t;
[0034] 4.2 Update position: Use the particle's new velocity v i (t+1) Update the particle's position x i (t+1)=x i (t)+v i (t+1), ensure that the updated green light time is still within a reasonable range;
[0035] Step 5: Update the individual optimum and the global optimum. The process is as follows:
[0036] 5.1. Update individual optimality: For each particle, if the new position x i The fitness value of (t+1) is higher than the current individual optimal pbest i , then update pbest i ;
[0037] 5.2. Update the global optimum: If the fitness value of a particle's new position is higher than the current global optimum gbest, update gbest;
[0038] Step 6: Introduce adaptive inertia weight. This step involves the process of dynamically adjusting the inertia weight, which dynamically adjusts the weight value according to the current number of iterations. The specific adjustment method is to use a formula to calculate the new inertia weight w according to the current number of iterations t.
[0039] Among them, w max is the initial inertia weight, w min is the inertia weight at the end, t is the current iteration number, and T is the total iteration number;
[0040] Step 7: Add a local search enhancement mechanism. The process is as follows: after each iteration, perform a local search on particles with higher fitness values to further optimize their positions;
[0041] Step 8, termination condition: when the maximum number of iterations is reached, stop the iteration;
[0042] Step 9: Output the optimal solution: Output the global optimal position gbest, that is, the optimal green light time allocation plan.
[0043] Furthermore, in 1.1, an infrared sensor and a radar sensor device are installed at an intersection to detect the vehicle flow in each direction in real time; and a video surveillance device is installed to record the passing of vehicles in real time.
[0044] Furthermore, in 2.2, the position of each particle is represented by a vector, where t direction Indicates the green light time in the corresponding direction; the position of the initial particle is randomly distributed within a certain range, and the speed of the initial particle is randomly initialized.
[0045] Furthermore, in 3.1, the traffic simulation model is used to calculate the fitness function according to the position of each particle. The fitness function can be defined as Where T w is the total waiting time, E p is the traffic efficiency, ∈=0.001.
[0046] In step 7, local search is achieved by fine-tuning the position of the particle. in, is the current position of the particle, is the direction and amplitude of the adjustment, and α is a parameter that controls the amplitude of the adjustment, called the search step. The search step determines the size of the particle position adjustment. The larger the step, the larger the adjustment amplitude.
[0047] The beneficial effects of the present invention are mainly manifested in:
[0048] 1. Dynamically adjust the green light time: Use real-time collected traffic flow data to dynamically adjust the green light time of traffic lights to adapt to different traffic flow requirements.
[0049] 2. Optimize traffic flow: Through the improved particle swarm optimization algorithm (I-PSO), find the best green light time allocation plan to minimize traffic congestion and improve road traffic efficiency.
[0050] 3. Improve the level of intelligent control: By introducing adaptive inertia weight and local search enhancement mechanism, the search efficiency and accuracy of the algorithm are improved, making traffic light control more intelligent and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of the intelligent traffic light control method based on the improved particle swarm optimization algorithm. DETAILED DESCRIPTION
[0052] The present invention will be further described below in conjunction with the accompanying drawings.
[0053] Reference Figure 1 , an intelligent traffic light control method based on improved particle swarm optimization algorithm, comprising the following steps:
[0054] Step 1: Data collection. The process is as follows:
[0055] 1.1. Real-time data collection: Install infrared sensors, radar sensors and other equipment at a busy intersection to detect vehicle traffic in each direction in real time;
[0056] Install video surveillance equipment (such as cameras) to record the passing of vehicles in real time;
[0057] 1.2. Data preprocessing, including:
[0058] 1.2.1. Cleaning data: removing invalid data and outliers, such as erroneous readings due to sensor failure;
[0059] 1.2.2 Formatting data: converting the collected data into a unified format for subsequent processing and storage;
[0060] 1.2.3 Data storage: Store the processed data in a database for subsequent analysis;
[0061] Step 2: Initialize the particle swarm. The process is as follows:
[0062] 2.1. Set the number of particles: Initialize 100 particles, each particle represents a possible green light time allocation scheme;
[0063] 2.2. Initialize particle positions and velocities: The position of each particle is represented by a vector, e.g. where t direction Indicates the green light time in the corresponding direction;
[0064] The positions of the initial particles are randomly distributed within a certain range, for example, the green light time in each direction is between [20,40] seconds; the speed of the initial particles is randomly initialized in the range of [-5,5] seconds / iteration;
[0065] 2.3. Set parameters: Initialize algorithm parameters: inertia weight w=0.9, acceleration coefficient c1=2, c2=2.
[0066] Step 3: Evaluate the particle position. The process is as follows:
[0067] 3.1. Simulation calculation of fitness value: Using the traffic simulation model, the fitness function is calculated according to the position of each particle The fitness function can be defined as Where T w is the total waiting time, E p is the traffic efficiency, ∈ = 0.001;
[0068] 3.2. Fitness value calculation: Calculate the position x of each particle through simulation i (t) is the fitness value. It is assumed that particles with high fitness values represent green light time allocation schemes with short waiting time and high traffic efficiency;
[0069] For example, for particles The waiting time T under this scheme is calculated by simulation w =120s, traffic efficiency E p =0.8, fitness value
[0070] Step 4: Update particle velocity and position. The process is as follows:
[0071] 4.1. Update speed: According to formula v i (t+1)=wv i +c1.r1.(pbest i -x i (t)+c2r2(gbest-x i (t)) Update the velocity of each particle;
[0072] 4.2 Update position: Use the particle's new velocity v i (t+1) Update the particle's position x i (t+1)=x i (t)+v i (t+1), ensure that the updated green light time is still within a reasonable range (e.g. [20,40] seconds);
[0073] Step 5: Update the individual optimum and the global optimum. The process is as follows:
[0074] 5.1. Update individual optimality: For each particle, if the new position x i The fitness value of (t+1) is higher than the current individual optimal pbest i, then update pbest i ;
[0075] 5.2. Update the global optimum: If the fitness value of a particle's new position is higher than the current global optimum gbest, update gbest;
[0076] Step 6: Introduce adaptive inertia weight. The process is as follows: Dynamically adjust the inertia weight: Dynamically adjust the inertia weight w according to the current iteration number t, for example where w max =0.9, w min =0.4, T=100 is the total number of iterations;
[0077] Step 7: Add a local search enhancement mechanism. The process is as follows: After each iteration, perform a local search on particles with higher fitness values to further optimize their positions. Local search can be achieved by fine-tuning the positions of particles, for example Where α is the search step size, which can be dynamically adjusted according to the speed and position of the current particle;
[0078] Step 8, termination condition: when the maximum number of iterations T = 100 is reached, stop the iteration;
[0079] Step 9: Output the optimal solution: Output the global optimal position gbest, that is, the optimal green light time allocation plan.
[0080] In this embodiment, assuming that during a typical morning and evening rush hour (7:30 to 9:00 a.m.), the traffic volume in the east-west direction is large, while the traffic volume in the north-south direction is small, the implementation steps are as follows:
[0081] Step 1: Data collection: Install video surveillance equipment (such as cameras) to record the passing of vehicles in real time and perform data preprocessing.
[0082] Step 2: Initialize the particle swarm. The process is as follows:
[0083] Set 100 particles, each particle represents a possible green light time allocation scheme.
[0084] The position of each particle is represented by a vector, such as where t east =3, t south =15,t west =30, t north =15.
[0085] The positions of the initial particles are randomly distributed within a certain range, for example, the green light time in each direction is between [20,40] seconds.
[0086] The velocity of the initial particle is randomly initialized in the range of [-5,5] seconds / iteration.
[0087] Initialization algorithm parameters: inertia weight w=0.9, acceleration coefficient c1=2, c2=2.
[0088] Step 3: Evaluate particle position:
[0089] Using the traffic simulation model, the fitness function is calculated based on the position of each particle The fitness function can be defined as Where T w is the total waiting time, E p is the traffic efficiency, ∈=0.001.
[0090] It is assumed that particles with high fitness values represent a green light time allocation scheme with short waiting time and high traffic efficiency.
[0091] For example, for particles The waiting time T under this scheme is calculated by simulation w =120s, traffic efficiency E p =0.8, fitness value
[0092] Step 4: Update particle speed and position:
[0093] Update the velocity and position of the particles according to the standard formula of the particle swarm optimization algorithm.
[0094] Use the particle's new velocity v i (t+1) Update the particle's position x i (t+1)=x i (t)+v i (t+1), ensure that the updated green light time is still within a reasonable range (e.g. [20,40] seconds).
[0095] Step 5: Update individual best and global best: If the new particle position has a higher fitness value, update the individual best (pbest) and global best (gbest).
[0096] Step 6: Introduce adaptive inertia weight:
[0097] The inertia weight is dynamically adjusted according to the current number of iterations to balance exploration and development.
[0098] For example, in the early stage of iteration, w is larger to maintain a larger exploration ability; in the later stage of iteration, w is reduced to accelerate convergence.
[0099] Step 7: Add a local search enhancement mechanism. The process is as follows:
[0100] Perform local search on particles with higher fitness values to further optimize their positions.
[0101] Local search can be fine-tuned near the particle's current position, e.g. Where α is the search step size, which can be dynamically adjusted according to the speed and position of the current particle.
[0102] Step 8, termination condition: when the maximum number of iterations T = 100 is reached, stop the iteration;
[0103] Step 9: Output:
[0104] When the preset maximum number of iterations (such as 100) is reached, the global optimal position is output as the optimal green light time allocation scheme. For example, the final output gbest may be [35,10,35,10], which means that the green light time in the east-west direction is 35 seconds and the green light time in the north-south direction is 10 seconds.
[0105] In this embodiment, the intelligent traffic light control system that implements the method of this embodiment includes: a data acquisition module, which is responsible for collecting real-time traffic flow data; a simulation evaluation module, which is used to evaluate the traffic flow conditions under different green light time allocation schemes; an optimization control module, which is used to dynamically adjust the green light time of the traffic light using an improved particle swarm optimization algorithm (I-PSO); a traffic light control module, which is used to receive the optimized green light time allocation scheme and adjust the traffic light control strategy.
[0106] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.
Claims
1. An intelligent traffic signal light control method based on an improved particle swarm optimization algorithm, characterized in that the method comprises the following steps: Step 1: Data collection. The process is as follows: 1.
1. Real-time data collection; 1.
2. Data preprocessing, including: 1.2.
1. Cleaning data: removing invalid data and outliers; 1.2.2 Formatting data: converting the collected data into a unified format; 1.2.3 Storing data: storing the processed data in the database; Step 2: Initialize the particle swarm. The process is as follows: 2.
1. Set the number of particles: Initialize the number of particles, each particle represents a possible green light time allocation scheme; 2.
2. Initialize particle position and velocity; 2.
3. Set parameters: Initialize algorithm parameters: inertia weight and acceleration coefficient; Step 3: Evaluate the particle position. The process is as follows: 3.
1. Simulation calculation of fitness value: Using the traffic simulation model, the fitness function is calculated according to the position of each particle; 3.
2. Fitness value calculation: The fitness value of each particle position is calculated through simulation, and particles with high fitness values are set to represent a green light time allocation scheme with short waiting time and high traffic efficiency; Step 4: Update particle velocity and position. The process is as follows: 4.
1. Update speed: According to formula v i (t+1)=wv i +c1.r1·(pbest i -x i (t)+c2r2(gbest-x i (t)) updates the velocity of each particle, Among them, v i (t+1) is the velocity of particle i at time t+1; w is the inertia weight, which is used to balance the global and local search capabilities of particles; v i is the speed of i at time t; c1 is the individual learning factor, regulating the effect of individual experience on particle velocity; r1 is an individual random number, which is used to introduce randomness and increase the diversity of the algorithm; c2 is the social learning factor, which regulates the effect of group experience on particle velocity; r2 is a social random number, also used to introduce randomness; r1 and r2 are random numbers between 0 and 1, used to increase the randomness and diversity of the algorithm; pbest i is the best historical position of particle i; gbest is the best of all particles’ best historical positions; x i (t) is the position of particle i at time t; 4.2 Update position: Use the particle's new velocity v i (t+1) Update the particle's position x i (t+1)=x i (t)+v i (t+1), ensure that the updated green light time is still within a reasonable range; Step 5: Update the individual optimum and the global optimum. The process is as follows: 5.
1. Update individual optimality: For each particle, if the new position x i The fitness value of (t+1) is higher than the current individual optimal pbest i , then update pbest i ; 5.
2. Update the global optimum: If the fitness value of a particle's new position is higher than the current global optimum gbest, update gbest; Step 6: Introduce adaptive inertia weight. The process is as follows: Dynamically adjust the inertia weight: Dynamically adjust the inertia weight w according to the current iteration number t. Among them, w max is the initial inertia weight, w min is the inertia weight at the end, t is the current iteration number, and T is the total iteration number; Step 7: Add a local search enhancement mechanism. The process is as follows: after each iteration, perform a local search on particles with higher fitness values to further optimize their positions; Step 8, termination condition: when the maximum number of iterations is reached, stop the iteration; Step 9: Output the optimal solution: Output the global optimal position gbest, that is, the optimal green light time allocation plan.
2. The intelligent traffic light control method based on the improved particle swarm optimization algorithm as described in claim 1 is characterized in that, in the above 1.1, infrared sensors and radar sensor equipment are installed at an intersection to detect the vehicle flow in each direction in real time; video monitoring equipment is installed to record the passing of vehicles in real time.
3. The intelligent traffic light control method based on improved particle swarm optimization algorithm according to claim 1 or 2, characterized in that: In 2.2, the position of each particle is represented by a vector, where t direction Indicates the green light time in the corresponding direction; the position of the initial particle is randomly distributed within a certain range, and the speed of the initial particle is randomly initialized.
4. The intelligent traffic light control method based on improved particle swarm optimization algorithm according to claim 1 or 2, characterized in that: In 3.1, the traffic simulation model is used to calculate the fitness function according to the position of each particle. The fitness function can be defined as Where T w is the total waiting time, E p is the traffic efficiency, ∈=0.
001.
5. The intelligent traffic light control method based on improved particle swarm optimization algorithm as claimed in claim 1 or 2, characterized in that: In step 7, local search is achieved by fine-tuning the position of the particle. in, is the current position of the particle, is the direction and amplitude of adjustment, and α is a parameter that controls the adjustment amplitude, called the search step size.
Citation Information
Cited By
Pure fresh meat kitten immune dry food dehydration control method based on improved particle swarm optimization (PID) optimization
CN120178659A