Traffic Signal Timing Scheme Based on the Improved Harris Hawks Optimisation

With the continuous increase of urban vehicles, traffic congestion becomes severe in the metropolitan areas and higher car utilisation areas. The traffic signal timing scheme can effectively alleviate traffic congestion at intersections. We need to make a profound study in the traffic signal timing. An optimisation model is established, which not only takes the average delay time of vehicles, the number of vehicle stops and the traffic capacity, but also takes the exhaust emissions as the evaluation indexes. The model is too complex and involves too many variables to be solved by using multi-objective programming. Thus, the Harris Hawks Optimisation (HHO) with few parameters and high search accuracy was used to solve the model. To avoid the disadvantages of poor search performance and easy to fall into local optimisation of the Harris Hawks Algorithm, multi-strategy improvements were introduced. The experimental effects show that during the peak hours of traffic flow, the improved algorithm can reduce the average vehicle delay by 36.7%, the exhaust emission by 31.2% and increase the vehicle capacity by 41.6%. The above indicators have also been upgraded during the low peak stage


INTRODUCTION
Because urban traffic is a massive project with many controlled variables, it has become a perennial difficulty among the urban problems.With the continuous growth of vehicle ownership and the increasing saturation of the traffic network, the traffic congestion problem becomes more and more serious.The intersection is the main area of traffic congestion.The signal-controlled intersections and traffic jams cause a huge waste of time and energy for drivers.About 30% of the time spent in traffic occurs at intersections.In addition, most of the traffic accidents occur near the intersections, resulting in casualties and property losses [1].Traffic congestion not only reduces the capacity of a single road, but also affects the traffic in the whole area due to the cumulative effect.At the same time, traffic congestion causes slow driving speed and continues to emit carbon-oxygen compounds, sulphur dioxide and other pollutants into the air.Up to 60-70% of the pollutants in the city are caused by vehicle exhaust emissions, and the pollutants discharged during traffic congestion are more than smooth traffic [2].The resulting environmental pollution problem is increasingly prominent.
The scientific management about traffic congestion at urban intersections is conductive to the realisation of convenient traffic and the sustainable development, so it has important research significance [3].If the traffic efficiency in the urban intersection is low, there will be serious blockage, and it needs to be evacuated effectively to ensure the normal traffic.Among the many intersection schemes, the method of urban road expansion is an expensive and short-sighted solution.Practice has proved that a good intersection signal

Traffic Signal Timing Scheme Based on the Improved Harris Hawks Optimisation
Hongluan ZHAO 1 , Mengmeng SU 2  timing scheme is helpful to improve the traffic flow and reduce the congestion.
Traditional signal timing method still has an important reference value.The most commonly used scheme is the Webster method [4], which only considers the vehicle delay as the optimisation index.Its calculation is simple, easy to get the ideal results.However, as the traffic situation gets more and more complex, this method is often inconsistent with the actual condition.The multi-target signal timing model has achieved good results.For example, under the current situation which advocates green environmental protection and maintains the ecological environment, exhaust emissions and stop times also need to be considered.It is necessary to take the travel benefits and exhaust emissions into account comprehensively.
Park et al. [5] improved the traditional Genetic Algorithm (GA) for traffic signal timing optimisation under supersaturated traffic conditions, using a penalty function to minimise the delay and maximise the throughput.Chin et al. [6] proposed a signal timing method based on Genetic Algorithm to optimise the goal of minimal vehicle delay and maximal capacity with the timing parameters of signal offset, cycle time, green light segmentation and phase sequence.Rouphail et al. [2] studied the relationship between vehicle delays and exhaust emissions, which are the highest in accelerated mode and double those during vehicle delays.Papatzikou [7] proposed a fast algorithm to find the optimal timing of signal phase and minimise the total delay of the whole period.Mercader et al. [8] proposed an optimal signal timing strategy for a multiphase intersection, minimising the number of queuing vehicles, and finally verified the effectiveness of the proposed strategy with two examples.Ceylan et al. [9] used Genetic Algorithms to solve traffic signal control and traffic allocation, and studied the optimisation of signal timing with random users.Some optimal algorithms are also used to solve the traffic signal problems.Chentoufi [10] studied a hybrid Particle Swarm Optimisation (PSO) and tabu search algorithm for adaptive traffic signal timing optimisation.Liu et al. [11] established a timing model with the goal of minimising the total delay in one region on the basis of the traditional Firefly Algorithm (FA).Hawash [12] researched traffic signal scheduling systems based on the Whale Optimisation Algorithm (WOA) in order to minimise the average travel time.Zhao [13] invented a patent about a real-time adaptive signal timing optimisation method based on the improved Gray Wolf algorithm (GWA).Qiao et al. [14] established a multi-intersection traffic signal control model to minimise the traffic delay.A new algorithm was proposed based on the Artificial Immunisation and Fireworks Algorithm.
To sum up, most scholars solved the problems by establishing the objective functions, using the meta-heuristic algorithms or through the simulation software.This paper constructs a signal timing model with average delay, stop times, traffic capacity and exhaust emissions as the indicators.
By consulting the meta-heuristic algorithms, Harris Hawks Optimisation (HHO) has been successfully applied in many fields in recent years, which can help to solve some complex optimisation problems, such as non-linear programming problems, multi-objective optimisation problems, etc.Compared with other traditional optimisation algorithms, the HHO has the advantages of high search efficiency, fast convergence speed and strong global search ability, showed in [15].Therefore, it is a fast, powerful and high-performance algorithm with the strong competitiveness and selected as the method to solve the model.But the traditional Harris Hawks Algorithm has its defects and the search process is prone to fall into the local optimum, so it is necessary to improve it with some strategies.The improved algorithm is used to solve the problem and the signal timing scheme is obtained with the highest comprehensive benefit.

TIMING MODEL OF TRAFFIC SIGNALS
The traffic situation at urban intersections is a complex process, which includes not only a variety of traffic parameters, but also the identification of transportation entities, data collection and feasibility calculation.The traffic state of urban intersections is characterised by tendency, complexity and periodicity, and also has some non-linear characteristics.A good intersection signal timing scheme helps to improve the traffic flow and reduce the congestion.The main purpose of signal timing is to maximise the efficiency of the intersection, not only to make full use of road traffic resources, but also to protect the benefits of road users.The traffic capacity, vehicle delay and the number of stops are important indicators to evaluate the traffic situation at the intersections.With the increasingly severe situation of environmental protection, an indicator of exhaust emissions is also to be considered.Therefore, the goal of intersection signal timing is to optimise the maximal capacity, minimal vehicle delay, number of stops and exhaust emissions in this paper.

The vehicle average delay model
The vehicle average delay refers to the additional average consumption time through the intersection.The TRRL method [4] and the HCM method [16] only with average delay as the optimisation target, often cannot meet the reality.When the flow ratio is close to 1, the best signal cycle tends to +∞ by the TRRL method.It obviously does not conform to the actual situation and thus does not adapt to the saturation.The compensation coefficient of stops is introduced in ARRB method [17], which enhanced the adaptability.However, the best signal cycle calculation of this method is similar to TRRL method, so it is not suitable for the situation of high traffic saturation, high density and low flow.The above three methods provide strong theoretical guidance for the study of traffic signal timing, but they also have their own shortcomings.This paper uses the Webster delay model to calculate the average vehicle delay with the following formulas: where D i is the delay time of the i th phase vehicle through the intersection, C the best signal cycle length, λ i the green signal ratio, , C g g i i i m = is the effective green time.y i is the flow rate of the i th phase, q i the current traffic flow of the i th phase and D the average delay time at the intersection.n is the number of phases.

The stops number model
In the modern urban traffic control system, stops number refers to the average number of stop times at the intersection under the influence of signal lights.In many control systems or control methods, the stops number is an important optimisation target, which has close relationship with the fuel consumption, exhaust emissions and delay time.Therefore, the correct evaluation of the vehicle stops at the intersection is an effective control for the traffic system.The calculation formulas of the average stops number model are as follows: .
where H i is the average number of stops at the i th phase, H is the average number of stops at the intersection.C, g i , y i , q i are same as above.

The capacity model
Capacity refers to the maximum number of vehicles passing through an intersection within a unit time under certain road and traffic conditions.As traffic congestion often occurs when traffic flow is saturated, the capacity of the signal intersection is calculated based on the concept of saturated flow rate.According to the HCM, the capacity calculation formulas at an intersection are as follows: where Q i is the vehicle capacity of the i th phase, s ij the saturation flow rate of the i th -phase j th -inlet, Q is the vehicle capacity at the intersection.

The exhaust emissions model
Traffic pollution includes exhaust emissions, noise and vibration.Relatively speaking, the problem of exhaust emissions is more prominent.The air pollution comes mainly from traffic exhaust pollution in many areas with dense vehicles, which seriously threatens the life and health of urban residents.The control of vehicle emissions has become an urgent problem to be solved.The acceleration and deceleration of the vehicle during the driving process will increase the exhaust emissions.So the environmental pollution is aggravated as the vehicle is frequently accelerating and decelerating at the intersection.Therefore, there is a need to consider the exhaust emissions of ordinary cars at the busy intersection whose vehicle model is as follows: where E i is the exhaust emissions of the i th phase in seconds and e is the unit idle emission factor, generally taking 5g (pch/h).

Construction of the objective function
In the available research it can be found that the current traffic timing focuses on the travel benefits of vehicles while ignoring the environmental protection and other factors.It is particularly unreasonable to only consider the economy ignoring the green development.The comprehensive correlations of vehicle delay, stops number, traffic capacity, exhaust emissions and the green split of each phase, and cycle length are relatively high, so these indicators can be used to evaluate the intersection.
In order to improve the traffic capacity at the intersection, and reduce the exhaust emissions, the vehicle delay and stops, a non-linear multi-objective optimisation model was established.We wanted to find the best signal cycle and the effective green time of each phase to make the vehicle delay, stops and emissions minimised and the capacity maximised.The four indicators need to be assigned different weight coefficients to convert them into the same standard for calculation. . .
where D 0 , H 0 , Q 0 , E 0 are the initial vehicle delay, stop times, traffic capacity and exhaust emissions at the intersection, respectively.g min and g max are the minimum and maximum effective green light time for each phase, respectively.L is the start-up loss time, i.e. the time loss at the beginning of the green light period due to the driver's reaction time and the vehicle's start-up time in a signal cycle.α where Y is the sum of the maximum flow of all the phases in one cycle.s i is the saturation flow of the i th phase.
The model involves too many variables to be solved by using multi-objective programming.The use of intelligent algorithm is more efficient and accurate.Among the heuristic algorithms, the Harris Hawks Optimisation (HHO) has few parameters, high search accuracy and it is easy to operate, among other things.However, the algorithm also has the disadvantage of poor search performance for low-dimensional problems and it easily falls into local optimisation [15].Thus this paper will first try to improve the Harris Hawks Algorithm.

AN IMPROVED HARRIS HAWKS ALGORITHM
The Harris Hawks Algorithm (HHO) is a swarm intelligent optimisation algorithm proposed by simulating the cooperative and chasing behaviour of Harris Hawks [15].Each Hawk constantly adjusts its position and direction when foraging until it finds the best food.Applying this foraging behaviour to the optimisation problem, we can treat the Hawks as the solutions and the food as the optimal solution of the problem.The proposed algorithm controls the inter-conversion between exploration and exploitation based on the escape energy of the prey, i.e. the global search and local search capability of the balanced algorithm.But the structure of the traditional Harris Hawks Algorithm has some defects and the search process is prone to fall into the local optimum with low convergence accuracy.

Algorithm introduction
The HHO algorithm includes both the global exploration and the local exploitation stage, specifically described below.

Exploration stage
At this stage, the exploratory mechanism of the HHO is proposed.Harris Hawks perch randomly in certain locations and wait for preys according to the below two strategies, each with equal chance.
where t is the number of iterations.X(t) is the current position of Hawks and X(t+1) is the one in the next iteration.X rand (t) is the position of the individual randomly selected from the current population.X rabbit (t) is the position of the current optimal solution.r 1 , r 2 , r 3 , r 4 and k are the random numbers inside (0,1).UB and LB are the upper and lower bound of the population, respectively.X m (t) is the average position of the current population, attained as follows.
where X i (t) represents the position of each hawk in the iteration t and N is the number of the hawks.

Transition from exploration to exploitation
The HHO algorithm moves from the exploration to the exploitation based on the escape energy of the prey.In the escape behaviour, the energy of the prey is significantly reduced.The formula is as follows.
where S is the escape energy of the prey.T indicates the maximum number of iterations.s 0 is the initial state of the energy, the random number inside (-1,1).In addition, when |S|≥1, Harris Hawk searches for prey through peer-to-peer strategy (exploration phase).When |S|<1, four different strategies are adopted according to the value of a random number (exploitation stage) as follows.

Exploitation stage
During this stage, the Harris Hawk conducts raids through the target prey detected in the previous stage of the attack, while the prey attempts to escape.Based on the escape behaviour of the prey and the chasing strategy of the Harris Hawks, four possible strategies have been proposed in the HHO to simulate the attacking stage.
Suppose that r is the chance of a prey when successfully escaping (r<0.5) or not successfully escaping (r≥0.5)before surprise pounce.When |S|≥0.5, soft besiege happens and when |S|<0.5, hard besiege occurs.
Case 1: Soft besiege.When r≥0.5, |S|≥0.5, the prey has enough energy and tries to escape by random jumps, but fails.The Harris Hawk raids its prey by encircling it softly with the following location update formulas.

X t X t S JX t X t
where ΔX(t) is the difference between the optimal and current position in the iteration.J=2(1-r 5 ) represents the random jump strength of the prey during the escaping procedure, where r 5 is a random number inside (0,1).
Case 2: Hard besiege.When r≥0.5, |S|<0.5, the prey is exhausted and has low escaping energy.The Harris Hawk makes a surprise pounce through a hard besiege.The location update formula is as follows: Case 3: Soft besiege with progressive rapid dives.When r<0.5, |S|≥0.5, the prey has enough energy to successfully escape.The Harris Hawks still evaluate and decide their next move based on the following rule and besiege before the attack.
Then, they compare the possible result of such a movement to the previous dive to detect whether it will be a good dive or not.If it is not reasonable when they see that the prey is performing more deceptive motions, they also start to perform irregular, abrupt and rapid dives when approaching the prey, based on the LF patterns as follows: where d is the dimension of the problem, R is the random vector of d dimensions and LF is the levy flight function whose formula is as follows: .

LF x v
where μ, v are the random numbers within (0,1).β is the default constant, set to 1.5.Therefore, the final strategy for position updating in the soft besiege phase is as follows: Case 4: Hard besiege with progressive rapid dives.When r<0.5, |S|<0.5, the prey does not have enough energy to escape.Therefore, a hard siege is held before chasing and killing the prey.The Harris Hawk tries to decrease the average distance from the prey.The strategy for location updating is as Equations 18  where T and t are the maximum number and the number of current iteration, respectively.X m (t) is same as Equation 12.

Improvement strategy
In order to enhance the distribution of the initial solution in the search space, the Elite Opposite Learning strategy is introduced to increase the population diversity of the algorithm.The Gold Sine algorithm is applied to the formula of the global search to further improve the exploration stage of the algorithm.To obtain more reasonable results, it is very important to achieve a balance between the exploration and exploitation.Then some modifications of the algorithm are introduced in the Harris Hawks Algorithm based on the non-linear control parameters.

Elite Opposition-Based Learning (EOBL)
Tizhoosh [18] proposed the Opposition-Based Learning (OBL) mechanism to improve the effect and accuracy of learning by introducing the opposition concepts.The mechanism computes the fitness values of the two solutions between the current solution and its opposition counterpart, finds a more efficient solution and selects the best one to proceed to the next iteration.It turns out that the OBL improves the population diversity of the algorithm.The mathematical model of the OBL is as follows.x=(x 1 , x 2 ,..., x d ) is a feasible solution in the current population, where d is the dimension of the space.x j ![a j ,b j ], j=1,2,…,d.The opposition solution x̆=(x̆1, x̆2,..., x̆d) is defined as the following equation: Elite Opposition-Based Learning (EOBL) [19] is an improved opposition learning mechanism, which further enhances the performance and generalisation ability of the algorithm by introducing the elite model.Elite individuals have more useful information than the other ones.EOBL generates its corresponding opposition population based on the elite individuals in the current population, and then selects the excellent individuals from the current population and opposition population to form the new one.The EOBL mechanism can enhance the population diversity and improve the global search capability of the algorithm.
Let X i =(x i,1 , x i,2 ,…, x i,d ) be the elite individual in the current population and the opposition solution where x i,j ![da j ,db j ].W!U(0,1), which is the generalised factor.da j and db j are the dynamic boundaries, which can be defined as da j =min(x i,j ), db j =max(x i,j ).However, x̆i j may exceed the search boundary.To solve this problem, a random value is assigned to the transformed individuals within the boundary, as follows: , ,

Gold Sine Algorithm
The Golden Sine Algorithm (Golden_SA) is an optimisation method based on the Golden division principle and the Sine function.It was proposed by Tanyildizi et al. [20] to solve the continuous optimal problem.The Golden_SA algorithm combines the Golden partition coefficient and the Sine function.It gradually approaches the optimal solution by continuously narrowing the search range and thus improves the convergence speed.At the same time, according to the special relationship between the Sine function and the unit circle, Golden_SA can traverse all the points on the unit circle, which gives the algorithm a good global search ability.The position updating is too random as k≥0.5 at the global search phase in the traditional HHO algorithm, resulting in a weaker global search ability.Therefore, this paper integrates the Golden_SA algorithm into the global search stage of the HHO, and the improved location updating formula is as follows: where R 1 and R 2 are random numbers within [0,2π] and [0,π], respectively.x 1 and x 2 are the coefficients based on the Golden division principle, ( ) , , / .
The other symbols are same as before.r 3 and r 4 are same as in Formula 11.

Non-linear Control Parameter
Although the Gold Sine algorithm improves the global exploration capability of the HHO algorithm, it is important to balance the exploration and exploitation stages of the meta-heuristic algorithm.Therefore, a non-linear control parameter is introduced into the HHO algorithm as follows to execute the transition from exploration to exploitation smoothly.
= -a k (27) The besiege strategy remains unchanged after adding the non-linear control parameters.Therefore, in soft besiege with progressive rapid dives, Formulas 17 and 18 are modified as follows: In addition, in a progressive rapid besiege, Formula 22 is modified as follows: Combining the above contents, the steps to improve the Harris Hawks Optimisation (the improved algorithm is abbreviated as IHHO) are as follows: Step 1: Parameter initialisation.Define the dimension d, the maximum iteration number T and the number of population individuals N. Determine the upper and lower limit of the cycle duration and set the traffic flow data.
Step 2: Add the Elite Opposition-Based Learning to initialise the population and calculate the fitness value of the Harris Hawks population individual according to the signal timing target function.
Step 3: Calculate the jump strength J and the prey energy S.
Step 4: If |S|≥ 1, update the global search location according to the Formula 26.
Step 5: If |S|<1 and r≥0.5, update the location of local exploitation according to Formulas 14-16.
Step 6: If |S|<1 and r<0.5, update the local exploitation indexes according to Formulas 21 and 27-30 incorporating the non-linear control parameter location.
Step 7: Calculate the fitness value of Steps 4~6, and update the better fitness value if the global optimal solution is obtained.
Step 8: Update the fitness value, individual position and prey energy value.
Step 9: Loop condition judgment.If the condition is met, the loop ends.Output the optimal signal cycle and the optimal fitness value.If not satisfied, jump to Step 3.

Experimental results and discussions
The optimal performance of the Harris Hawks Algorithm is tested through nine functions.Using the above strategy, by using the Matlab R2017b, the performance of the modified algorithm was tested on a PC.The functions are shown in Table 1, where F1-F4 are the uni-modal test functions, F5-F7 the multi-modal test functions, and F8-F9 the fixed dimension test functions.
To verify the effectiveness of the improved algorithm (IHHO), several heuristic algorithms with good performance were compared.In the experiment, the classical Harris Hawks Optimisation (HHO), Particle Swarm Optimisation (PSO), Firefly Algorithm (FA), Whale Optimisation Algorithm (WOA), Grey Wolf Optimisation (GWO) and the improved Harris Hawks Algorithm (IHHO) were selected for comparison.To ensure the fairness of the experiment and the reliability of the data, the common parameters of the six algorithms were kept consistent and performed 30 independent experiments for each test function, setting a population size of 30 and a maximum number of iterations of 500.
Figure 1 shows the convergence graph of the test functions, where the green solid line represents PSO, the blue dotted line is the FA, the black double line is the WOA, the purple dotted line is the GWO, the blue star solid line is the HHO, the red circle solid line is the IHHO, and the dimension of the test functions is 30 dimensions.
It can be seen from the convergence diagram that the optimisation accuracy of the improved Harris Hawks Algorithm (IHHO) is much higher than Particle Swarm Optimisation (PSO), Firefly Algorithm (FA), Whale Optimisation Algorithm (WOA), Grey Wolf Optimisation (GWO) and Harris Hawks Optimisation (HHO), and also has more advantages in the convergence speed.More specifically, according to the F1-F4 convergence diagram, the convergence accuracy of the IHHO is greatly improved with the obvious advantages.From the F5-F7 convergence diagram, the convergence rate of IHHO is the fastest.When other algorithms fall into the local optimum and have no chance of finding a better solution, the IHHO finds a better solution by adding the Golden Sine algorithm and non-linear parameters.F8-F9 is the convergence curve of the fixed dimension function and the IHHO also shows a relative advantage in the convergence accuracy and speed.Overall, the effect of the IHHO is better, which is a significant improvement compared to the traditional HHO.

ALGORITHM TESTING FOR A REAL INTERSECTION
The intersection is composed of two main roads, east-west and north-south, which are located in an important section in the city and have important impacts on traffic.The commonly used phases at intersections include two phases, three phases and four phases.When the traffic flow in all four directions of an intersection is high, a four-phase system should be used.The four-phase intersection is more advanced because it uses four signal phases to control the traffic flow.It has higher flexibility and accuracy, which can more advisably allocate traffic flow to various traffic directions, effectively reducing traffic congestion and accidents, and improving road traffic efficiency.The schematic diagram of the intersection is shown in Figure 2 and the phase diagram is shown in Figure 3.To verify the effectiveness of the proposed algorithm and model, the actual intersection at Youyi Road in Qinhuangdao City of China was selected.The data is the traffic flow on 20 October 2020.The intersection is a typical four-phase signal light control.The traffic flow data of the intersection is shown in Table 2.The required experimental data is collected through the STF1000S wireless geomagnetic sensor and video detector.Through investigation, it was found that the motor vehicle saturation flow in each lane at this intersection was 1912 pcu/h.Loss time L=15 s.According to the established multi-objective traffic signal timing model, set Harris Hawks population N=200, the cycle duration is 180 s, lower limit is 30 s, iteration T=500.In the MATLAB software, the best signal period of peak and low peak can be obtained by the IHHO algorithm.The four indicators under the timing scheme are obtained at the same time, as shown in Table 3.According to Table 3, during the traffic flow rush hours, the IHHO can reduce the average vehicle delay by (39-24.7)/39=36.7%,increase the vehicle capacity by 41.6% and reduce the exhaust emission by 31.2%.During the low peak period of traffic flow, the IHHO algorithm can reduce the average delay of vehicles by 16.3%, increase the capacity of vehicles by 37% and has no significant change on exhaust emissions and stops.After the above comparison, it can be found that the timing scheme proposed in this paper can effectively reduce vehicle delays, exhaust emissions and improve the traffic capacity during peak and low peak periods.At the same time, it can be seen that the optimisation results obtained by using the HHO and IHHO algorithm are better than the current signal timing scheme and the Webster scheme.

CONCLUSION
The adjustment of traffic signal timing can greatly alleviate the traffic congestion, considering not only traffic efficiency but also exhaust emissions.Traffic capacity, vehicle delay, exhaust emission and the number of stops are taken as optimisation indicators, using the effective green light time and signal cycle time of intersections as constraints to establish a traffic signal timing model.The Harris Hawks Optimisation was improved through multiple strategies (IHHO) and used to solve the multi-objective signal timing model.Compared to the original scheme and the Webster method, the effectiveness and feasibility of the traffic signal timing were verified.
Its disadvantage is that it does not consider the impact between intersections across the entire region.In the traffic area, due to the mutual influence between intersections, the next step is to consider the coordinated timing of intersections in the regions.In future works, it is possible to utilise other evolutionary schemes such as mutation and crossover schemes, multi-swarm, evolutionary updating structures and chaos-based phases to develop the Harris Hawks Optimisation.
and 21, but

Table 1 -
Test Function Information

Table 2 -
The traffic flow data of the intersection

Table 3 -
Comparison of simulation results of different timing schemes