Control algorithm for the urban traffic using a realtime simulation

Many types of research have been interesting by real-time control of urban networks. This paper, basing on a simplified urban traffic model, proposes a novel control approach based on model predictive control concept to reduce congestion and improve the safety of cars on the roads. The contributions of this paper are: First, we consider vehicle heterogeneity, represented by a mathematical model called “S Model” and integrate it with a realtime simulator to evaluate the performance of controllers on real traffic conditions. Second, in order to assess each controller's success under particular circumstances, the structured network-wide traffic controller based on model predictive control (MPC) theory is compared to a fixed time controller (FTC). Using two scenarios, different indicators are tested, i.e total time spent, vehicle number, queue length. The results show that the model predictive control quickly converges, with the different scenarios, and further improves social welfare.


INTRODUCTION
Human life has been much more effective and comfortable since the invention of modern transportation. More people are purchasing their own private cars, giving them the right to drive to any destination at any time [1]. However, if the number of cars planning to travel on roads increases, but the ability of these roads is restricted or cannot rise at the same rate as the number of vehicles, then road users will no longer be able to drive as freely as they once did. Therefore, It is critical to adopt an efficient modelling and control approaches [2], [3], in order to maintain public roads in a well-organized state for all drivers. The thing that represents the main concerns of control engineers [4]- [6].
Several ideas have been suggested to address the problems created by congested traffic in urban areas. These options include either increasing the capability of existing roads by building new ones, or lowering traffic demand. (for example, by road pricing or enforcing rules for accessing certain traffic zones at certain periods of the day), as well as the ability to use the current capability of the roads by effective management approaches.
The first two measures are also less appealing because they necessitate large budgets and impose limits on local residents' daily travel [7]. This highlights the role of proficient control approaches in managing traffic in urban areas. As a result, the emphasis of this paper is on the third technique, which is the development of effective control methods for urban traffic networks. The number of vehicles intending on roads grows more and more, as the emergence of modern transportation. However, the capacity of the roads cannot increase with the growing of the vehicle's number. Consequently, the capacity of these roads remains limited.
For that, developing models that can offer a traffic control systems with the optimal performance and the low computation time, has become a very important matter [8]- [14]. In this regards, this work contributes with an efficient urban traffic control, by focusing on developing a traffic model, with an efficient estimation. To provide accurate predictions of the system's dynamics while still requiring minimal computating time, it's critical to investigate and develop models, as well as control methods for efficiently guiding dynamical systems towards a desirable or optimal output. In this regards, this work aim to develop an efficient control, modelling to optimise the use of traffic network's intersections.
The model predictive controller technique has been used in many research studies [15]. The use of S model [4] in the model predictive control (MPC) approach was the first in urban traffic control, and it showed better performance of MPC in terms of the number of vehicles in intersections. It presents an unconstrained MPC where the model is dynamic and nonlinear. The ability to personalize parameters is another benefit of model predictive control. Furthermore, MPC allows for the introduction of restrictions on the amount of green time and turning speeds for cars, ensuring safe traffic light control at each intersection [16]. The objective of this work is to provide a control algorithm for the urban traffic using a realtime simulation.
The structure of the paper is as follows: First, we presente the urban traffic model used during this work. Then we discuss control algorithm, the MPC. The details of applying the MPC-based controller for an urban traffic network in section 3 are then presented in reference to fixed time control (FTC). Finally, section 4 concludes the paper.

RESEARCH METHOD 2.1. Modelization
For urban traffic, We need to choose appropriate traffic models with proper modeling precision and low computing load. Different models have been proposed for urban traffic flow modelling, such as cell transmission model, the BLX model, link transmission model, the S-model and the store-and forward model [17], [18]. The S-model is qualified by a degree of representation of the real system, which has a trade-off between low computation and accuracy [19] The S-model is a discrete-time urban traffic flow model, and can deal well with the nonlinear behavior of traffic which is similar complex models [20], [21] . Hence, in this paper, the S-model is used as the urban traffic flow model. It's explained as follows: The network is represented by a collection of links and nodes, where each link symbolises a road and each node characterises an intersection. The link is indicated by the pair (u,d), where u is the upstream intersection of the road (u,d), and d represents the downstream intersection of the corresponding road, as shown in Figure 1. L and J are the sets of links and nodes. S model's purpose is to determine two states variables at every time step k d n u,d (k d ) and q u,d,o (k d ). Between intersections u and d, n u,d (k d ) reflects the total number of vehicles. The cumulative number of vehicles in the queue that want to move to another node is u,d,o (k d ).
(it could be a right turn, a left turn, or straight ahead). These state variables of the link (u,d) are updated by: and: where we have: Vehicles planning to transfer to node o from a queue in link (u,d) α u,d arriv (k d ): Average arriving flow at the tail of the queue during The flow rate leaving the link (u,d), over C d is dictated by taking the minimum between the capacity of the intersection, car's number arriving and waiting, and the available space in the downstream link, as: After a delay time τ (k d ), the entering flow rate of the link (u,d), arrives at the end of the queues [16], and it's represented by: The flow rate entering connection (u,d) is equivalent to the total of the flow rates leaving the upstream links and going through intersection u: The parameters C d , g d (k d ), β u,d , represent the cycle time, green time of the traffic signal at step k d , the split ratio, and the link capacity C u,d . Moreover, I veh and v free are the average length of the vehicles and the free flow rate. In addition, u and d are the input and output nodes from link [21].

Control algorithm
Model predictive control is a mature technology, which offers an integrated solution for controlling systems, and has the ability to deal with complex dynamics, interacting variables, and constraints implements. The MPC algorithm's main goal is to enforce and apply optimal control over a projection horizon Np in a rolling horizon Nu [22]. As a result, MPC is one of the most widely used advanced control methods in manufacturing.
The procedure carried by the MPC controller, as Figure 2 shows, is to find the best input sequence that minimizes expected control errors at each time stage k. (for discrete-time system). The behavior of the system is anticipated over a prediction horizon of N p time steps. Taking into consideration multiple variations, such as the predicted behavior of the system, the objective function of the controller, the system constraints. Moreover, A process for optimization is carried out, in order to obtain a sequence of the optimal control. The first element is added to the method as a result of this sequence.

Figure 2. Concept of the optimal control used in an MPC
The MPC approach is at the forefront of current research, especially in closed-loop systems. In this way, when dealing with systems that are subjected to external disturbances, model predictive control approach is a more robust control. That makes MPC favourable in comparison with classical optimal control methods, Fixed time control, for example, is used in an open-loop control system to solve optimization problems offline, such as optimizing the green time length of intersections in an urban traffic network. The prediction model is built using data from the actual measured number of vehicles (n u,d (k d )), expected future network traffic demands (d u,d (k d )), and intersection green time lengths (g d (k d )) as shown in Figure 3.

. Simulation environment
Vissim is a microscopic road traffic simulator. It aims to have an accurate description of the traffic dynamics, based on the individual behaviour of vehicles. Vissim offers many tools for the users, to access the simulator as in real traffic conditions. In addition, Vissim provide users access to other programs, to use there functions and data, through his interface: Vissim COM [23].
Vissim COM is a technology to enable inter-process communication between software. Through Vissim COM, the user is able to include control algorithms, defined on others programs, also preparing and post-processing of data, which aims to have an efficient control of the Vissim model. This paper uses MATLAB to connect with PTV Vissim. It can be programmed in various scripting languages (C++, Python…). The Vissim COM gui specifies a hierarchical model in which the simulator's functions and parameters are organized, allowing the user to dynamically control the characteristics of internal artifacts. I-Vissim is the leader of Vissim COM object model, as Figure 1 illustrates. The leading "I" of an object stands for Interface. Under I-Vissim, there are five main objects: I-Net, I-Simulation, I-Evalation, I-Graphics and I-Presentation.
For traffic network modelling purposes, a microscopic traffic simulator, i.e., Vissim was used. Vissim enables traffic control algorithms as external inputs by programming its signal controller, through the Vissim-COM interface [24]. By exploiting this feature, MATLAB was applied for online green time calculation. The robust control strategy was realized by using model predictive control. MPC was applied through the MATLAB script. The Figure 3 depiscts the closed-loop simulation environment. The states' traffic measurements were sent to MATLAB at the end of each cycle. The new control signals were restored to the traffic simulator Vissim after minimizing the cost function.

Simulation setup
A real-world urban traffic network was created in the simulation environment Vissim to assess the applicability and computational viability of this spatiotemporally discrete urban traffic model. The evaluated urban road network [25] is shown in Figure 4

Case 1: Constant demand
The efficiency of the MPC is compared to that of the fixed time control in this part. Since MPC needs demand prediction, as shown in Figure 5, it was presumed in MPC Case 1 that the demand predictive model will remain constant during the simulation period. For each subnetwork, the network input flow rates are set to be constant in time and equal to each (1500 veh/h. In the case of the outlying points in Figure 6(a), they say that using the nominal demand would degrade the controller's output because it underestimates demand during rush hours. Assuming the worst-case situation, increasing the demands would result in solutions that are too restrictive, decreasing the level quality than the underestimated case (100 percent or lower). To overcome this, the sensitivity analysis recommends assuming a demand that is higher than normal but not quite as high as the maximum demand during peak hours.
The evolution of the number of vehicles is depicted in Figure 6(a) throughout the simulation. It can be shown in this figure that not all controllers operate in the same way. Indeed, only the fixed time controller exhibited a significant loss of performance in comparison with the other MPC. It's worth noting that as the number of cars in the network rises, so does congestion, putting the transportation grid at risk of collapsing.
Associated with the number of vehicles in the network, as a result of the congestion, queues have formed. Figure 6(b) illustrates the evolution of the queue number of vehicles of the traffic network. There are significant differences with respect to the fixed time controller, as seen in Figure 6

Case 2: Measured demand
The demand depicted in Figure 5 is presumed to be calculated in this section. The inflow demands of vehicles are defined at each time step kd. As a result, MPC Case 1 will conclude that the demand is equal to its calculated value and constant over the forecast horizon in order to carry out the network behavior prediction. The variation in the number of vehicles in the traffic network is shown in Figure 7(a). The MPC controller's output was dramatically improved by knowing the value of the demand, as shown in Figure 7(a). Indeed, with respect to the other controller, the MPC reduced the number of cars during the first and the second peak of demand. Also, with respect to the FTC, the improvement of MPC was substantial.
The inclusion of the measured value of the demand resulted in a nearly 40% decline. The number of vehicles standing in a line exhibits a similar pattern. In terms of the number of vehicles in the network, taking into account the calculated volume of demand resulted in a 50% decrease in the number of vehicles during the first peak of demand. The same remark of the behaviour, during the second peak, between the the fixed time and MPC controllers. However, as predicted from the results in Figure 7(b), when the demand is calculated by the MPC controller, the behaviour of the vehicles waiting in a queue improves slightly in contrast to the previous example.

CONCLUSION
Researchers have studied the modelization and regulation of future urban traffic intersections thoroughly in the last decade, inspired by the rapid changes and possible advantages of future urban traffic intersections. In keeping with the trend, this paper offered optimal solution for urban traffic control, to minimize the total time spent by network users travelling through the signalized intersections.
Basing on the literature examples, the algorithms proposed are tested. We placed the proposed S model algorithm to the test on a traffic network that is similar to the one discussed in the paper, using a realtime simulation. To assess the quality of the solutions generated by the proposed method, we compared the different controllers: MPC and FTC. We applied the test and showed that the MPC is significantly better than the FTC technique, basing on several indicators (i.e. number of vehicles in the link, queue lengths, total time spent). There are several research areas to pursue in the future. For the case of oversaturated conditions in the network, it will be necessary to develop an advanced version of the proposed MPC algorithm. Another perspective related to compare this new MPC version with other controllers, in order to evaluate its performance. Abdennaceur Baghdad graduated from Lille University in France with a doctorate in electronics in 1992. He is currently a university professor with a PES rating at Hassan II University in Casablanca, Morocco, where he teaches hyper-frequencies, electrical engineering, antennas, and telecommunication networks. He is a member of Hassan II University's EEA&TI laboratory. Optical networking, electrical and integrated networks, telecommunication systems, and information technology were the subjects of his studies. He supervises and co-supervises a large number of doctoral theses. He serves on the planning committees of many international congresses in the same field of study.