UDC 004.942+656.052.1 Algorithm of Intelligent Urban Traffic

__________________________________________________________________________________________ The aim of this work is solution of a specific issue – traffic problem in a big city. To solve this problem we examined the city roads intersection - the main source of the traffic congestion. Intersection is a basic element in the technology of urban traffic regulation. Therefore, first of all, it is necessary to implement the intellectual regulation of vehicles movement through a separate intersection. Such regulation is carried out with a help of a computer program that takes into account the vehicle road situation at the intersection and the corresponding adjustment of the traffic lights signal phases. At a second stage it is necessary to plan an optimal route for each vehicle using, for example, A*-algorithm and the spectrum of data received from an infrastructure of the urban network. As a result of an application of these two phases of urban traffic regulation, an optimal movement regime of all city mobile transport is achieved.


Introduction
Traffic problems are extremely common for a modern metropolis but their resolution is to be achieved yet. First of all, such problems are due to traffic jam at the intersections and, as a consequence, the complexity of trip by each vehicle along chosen route. In order to prevent such phenomenon, the authors propose to apply a network of "smart" traffic lights at the first stage. Special sensors mounted at each intersection can significantly improve each individual crossroad capacity. But this is not enough. It is necessary to organize the optimal trip of each vehicle using mobile phones with a special applications Вісник Харківського національного університету імені В. Н. Каразіна, 2 0 1 9 13 or GPS-navigators coordinating their routes with city traffic management system (CTMS). Thus, it is possible to control and to make optimal routes for all moving vehicles (drivers of such vehicles will be called IR-drivers). In detail the situation regarding the route planning for each vehicle is described in [1,2]. Therefore, the main problem that will be solved in this article consists in the algorithms' combination for regulating the vehicles movement both through a separate intersection and throughout whole city. With this approach congestion level in metropolis can be much less than it is nowadays, and traffic functioning will move about to a qualitatively new level.
The basic problem of traffic regulation in urban network is optimization problem for vehicle traffic through a separate intersection which is a main source of traffic jams. By organizing effective traffic through crossroads, we will achieve higher traffic efficiency throughout a city. For organizing traffic, each vehicle needs to be registered. And there are many methods to register moving objects [1].
The most effective way to solve this problem is a method based on piezoelectric sensors mounted into a road surface. International Road Dynamics Inc. has developed a very effective design of the piezoelectric road traffic sensor RoadTrax BL [3]. The device is easily mounted into a roadway and is quite sensitive. A vehicle wheel pair riding on the sensor zone, 250 mV output signal is created, which is quite enough for registration. Generally, road sensors are divided into types, shown in Fig. 1. Fig.1 Classification of stationary sensors [4].The most suitable for the solution of the posed problem are sensors mounted into a roadway, namely, piezoelectric and inductive sensors. However, mounting inductive sensors into a road is more problematic. That is why the authors have chosen simple but very effective piezoelectric sensors. The study [5] is focused on the investigation of the piezoelectric sensor characteristics 12-DOF type. This is a new high-sensitivity sensor capable of recording across a wide range of values. The device operates at a frequency of 11 kHz with an error margin no more than 1%. Vehicles registration algorithm which determines their positions is considered in [6].
Theoretical aspects of traffic optimizing on a separate overloaded crossroad are investigated in [7]. So-called discrete-time model for a cross-shaped intersection was considered and optimized system of equations had been created. The similar work is presented in the paper [8].
A large-scale study of the combined information methods obtained from a variety of road sensors, such as detectors, video cameras and radars, is explored in [9]. The technology of connected vehicles is also being investigated here, which enables to collect and analyze communications such as Vehicle-to-Infrastructure (V2I) and Vehicle-To-Vehicle (V2V) and thus reduces the probability of traffic congestion, increases traffic safety and reduces fuel consumption.
From the analytical point of view, it is necessary to create an algorithm and a computer program that will ensure the effective switching of traffic lights in accordance with the traffic load. From the technical side vehicle registration is carried out using piezoelectric sensors that fix a number of wheel pairs, proportional to a number of vehicles, which either to drive into part of the road between adjacent intersections (so-called input sensors) or leave out this road segmentoutput sensors. In this case the input and output sensors at the neighboring intersections work consistently, transmitting data to CTMS. This allows controlling not only city crossings as autonomous objects, but all city routes as well.

Algorithms
The vehicle traffic regulation in a large city can be divided into two phases. The first phase includes a vehicle registration at separate intersections. The registration is organized as follows (Fig. 2). Here is shown a separate cross-shaped intersection equipped with piezoelectric sensors of RoadTrax BL mode [3], mounted into a road. Each sensor is a part of the signaling network connected to CTMS. When a vehicle wheel pair presses on such sensor, an electrical signal is being generated due to the piezoelectric effect and registered on CTMS.
The base of traffic regulation technology at the first phase is that an outgoing cell serves a separate regulated intersection. It is assumed that traffic lights cycle determined by a value that usually consists of the following components T = trh + tgh + tyh + tp , (1) where trh − duration of the red light phase time n the horizontal direction; tghduration of the green light phase in the horizontal direction; tyhduration of the yellow light phase in the horizontal direction; tpduration of the green light phase for pedestrians. The corresponding notation is also available for the traffic lights cycle in the vertical direction: trv, tgv, tyv .
Using given variables, the traffic regulation program can be written as follows: Let us analyze briefly this program regulating vehicle journeys through cross-shaped crossroads. Constant values of a type REDH are chosenred light in horizontal direction. Basically, the program analyzes a traffic load of the crossroads: the more direction, horizontal or vertical is loaded the longer is the green phase in the corresponding direction, within a traffic cycle, which is equal to 96 seconds in the chosen case. In order to simulate a real crossroad situation, the four generators of random variables are included in the program to simulate the loading. Actually, we are interested in ratio of the number of vehicles on the horizontal and vertical directions. In the program this ratio is denoted by coefficient k. The variation of this value simulates the traffic load changes at the intersection. Therefore, a range of numbers at the program output changes randomly each time. In particular, the value that specifies the green phase time (as well as the red one) in the horizontal and vertical directions changes from one traffic lights cycle to another.
Consequently, the presented program significantly improves the intersections capacity due to the "intellectual" mode of correlating the various traffic lights phases with the traffic loads on different directions at the crossroads. The program will produce different range of values at each run, but they will be correlated with the traffic load at the intersection: the more the direction is loaded the longer green phase in this direction will be and, accordingly, for the less loaded direction green light phase will be decreased proportionally. Generators of random variables Random gn = new Random () are used as simulation values determining the loading of each direction. The generators are set randomly, but within a real number of vehicles that load the intersection in each traffic lights cycle. Thus, the traffic lights become "intelligent".
We now proceed to the second phase of a traffic regulation. Let us note that "intelligent" regulation is carried out not only at a separate intersection, but also between adjacent intersections. Fig. 2 represents the scheme of such a regulation, where the sensors belonging to a separate intersection are shown, as well as the sensors that regulate traffic on AB  lane, between adjacent intersections. This section of the road is controlled by the input and output sensors working as a unit for the purpose of a route planning (see below). In other words, each intersection does not work autonomously, but in close cooperation with adjacent intersections. The interaction is carried out due to the fact that input and output sensors (in Fig. 2 sensors A and B) work as a unit. Therefore it is possible to follow up the vehicle dynamics along the AB  road lane. On qualitative level, the movement dynamics is the ratio between the vehicles which have arrived to AB  lane during certain time (for example, during the traffic lights cycle) and vehicles that have left the lane. Technically, the process is organized as follows: the sensor A (input sensor) registers vehicles that enter the AB  lane from all possible directions of the intersection A. In turn, the complex of output sensors at the intersection B registers vehicles that have left the road lane. Thus, the entire transport network of the city is controlled by an intelligent traffic management system. The most important traffic problem is calculating for each IR-driver the requested route allowing to minimum possible travel time. For this purpose, it is necessary to calculate such a route for a given moment of time and for a given travel congestion. The city transport network can be represented as a weighted graph (Fig. 3). This is the first key message. Using a theory of graphs, it is possible to plan optimal routes by means of appropriate algorithms, namely, Dijkstra', Floyd-Warshall', or A* [10]. For our purposes, the most suitable option will be the A*-algorithm. This algorithm allows planning optimal route between two given vertices of the weighted graph (for example, A and V on fig.3).The second message is that weight of the graph edges rapidly change, so they need to be registered on-line, constantly updating the database where these values are stored. Input and output sensors, working as a pair, produce a spectrum of quantities hh AB N and hh AB n . The first value is the number of vehicles that drive into the lane between adjacent intersections (on Fig. 2 it is AB  lane) during traffic light cycle, and the secondthe number of vehicles that left the same road on the neighboring intersection B during the same time. The closer is the ratio N A h B h /n A h B h to one; the better is the movement dynamics for the selected lane. On the contrary, the ratio less than one indicate either the blocked state of the intersection B (Fig. 2) or a nearly blocked state. Correspondingly, weight of an edge (in other words, the vehicle impedance of the lane → B ) assumes a bigger value, i.e.
In this situation the program looking for the optimal route in the graph dismisses such a weighed lane. Therefore, for optimal route planning on the graph (or in urban network), it is necessary to minimize the following value: Here h is an index denoting lane numbers along the route (in other words, the edges of the graph), which are interconnected and form an inseparable trajectory (a simple chain path in the terms of graph theory), connecting the origin A and the destination V positions of IR-driver path (Fig. 3).The value l A h B h represents geometrical distance between adjacent intersections. The symbol f indicates a number of lanes of type hh AB . For each declared pair ( , ) ii AB the program forms an inseparable chain linking points i A and V i from (2). Thus, all city roads are under control of CMTS. The values on the left side of the expression (2) are weights of the graph edges (Fig. 3). These values should be updated every 10 seconds and, accordingly, the intelligent traffic control system will plan routes for all IR-drivers taking into account traffic situation for a given time period. In other words, the system works in "on-line" mode, which radically distinguishes it from the existing similar systems, Google-maps, for example. Transmission of data received by CMTS from city network sensors to each user (IR-driver) is used. Urban traffic situation is very dynamic and changeable. That is why CMTS database is updated every 10 seconds, and, accordingly, the data received by IR-drivers have an online mode too.
The testing of the program has been performed on graph with number of vertices up to 150 and number of edges 430. The execution time is 4s 580ms. An algorithmic complexity of A*-algorithm is O (n), (ninput data volume) which makes it quite effective for programs with a large amount of input data.
It should be noted that information obtained from GPS is an important factor in improving the reliability of data derived from input and output sensors. The fact is that almost every driver has a GPS navigator or a smartphone with the Google Maps program. Therefore GPS data can be used as an additional source of information. The situation is described in details in [11][12][13][14][15]. Taking into account the specifics of task and statistical nature of received data there is no need to determine precisely a position of each vehicle: only statistical character of the data is important. Why is it importantly to combine the data from piezoelectric sensors with GPS data? The data received from the sensorsincoming and outgoinglocated between adjacent intersections play the main role in our program. But the considered technology involves using GPS-navigators by IR-drivers. It is therefore logical to use the information synthesized from both GPS and sensors data. An expediency of combining stationary and mobile data received from GPS-devices or smartphones is indicated in [16], for example. The similar algorithm of using GPS data for planning optimal routes is discussed in details in [17,18].

Conclusions
The aim of the work is to create solution for the urban traffic problems. It is planned to use this technology for practical purposes.