Introduction

Traffic safety is always the top objective for developing road transportation since it must certainly guarantee the safety of every road user, not only drivers and passengers but also any road participant like cyclist and pedestrians must be protected. Beside traffic safety concern, traffic congestion is the next priority waiting for a solution, particularly in the urban area. Ranging from the traditional solution in the past like using a traffic signal to a very futuristic solution like the Autonomous Intersection Management (AIM), all of them used different techniques but share a common objective to improve the traffic throughput and reduce traffic congestion.

Basically, the traffic is congested when a condition on streets occurs which exceeds the street capacity and causes slower speeds, longer travel time and increased vehicular queue. The most common situation can be normally found by the physical use of streets by vehicles, for example, in the rush hour or the peak time of the day when traffic demand is substantially high, the interaction between vehicles slows the speed of the traffic stream. This characteristic is well studied in the transportation research [1, 2] and many models have been introduced to describe the traffic situation [3].

Traffic congestion mostly happens at the intersection as the intersection is the place where vehicles from many directions will meet and change their routes. To manage a traffic at an intersection, a traffic light is used. It is a global standard tool that everyone has a common understanding in how it works. Its mechanism is simple and straight forward to a problem. Vehicles who get red signal must stop and wait. Conversely, they allow to move when a green light is turned on. With following this signal, a potential accident can be totally prevented. However, traffic signal alone cannot effectively manage a congestion in a large network.

There are many proposed solutions to a congestion problem. They can be grouped into two main aspects and both tackle manipulation of traffic stream. The first aspect deals with the traffic infrastructure. It coordinates traffic signals to maintain a continuous flow from one to another intersection. Many research works have contributed to improve the signal timing for solving the congestion problem. The concept of green wave, which vehicles can travel continuously without having a stop at an intersection, is the ideal case to achieve. Over few decades, they implemented several methods to optimize the signal timing on an intersection corresponding to the traffic demand for example, Refs. [4, 5] designed Fuzzy logic table to determine the duration of signal, in [6] used Dynamic Programming and [7] proposed the hybrid agent architecture and neuro-fuzzy controller for decentralized control and many more. Such systems are now used in a lot of countries, i.e. \( \backslash {SCAT}''\) system in [8] proposed an optimization method to minimize the queue length and maximize the throughput. It was installed in Sydney, Australia since 1970 and other big cities such as Melbourne, South and Western Australia. Also it was used in many countries in a decade later. Similar system \(\backslash { SCOOT}''\) in [9] is a commercial platform that has been used in many metropolitan cities around the world. The second aspect deals with the road infrastructure. Cities expand number of lanes to increase road capacity, build new roads to connect new destinations and distribute the traffic from where there is a heavy congestion. Building more roads is not always solving a congestion in contrast, it can cause a worse traffic. In [10, 11] explained the effect of Braess’s paradox when the new road is added and results in worse traffic.

To encompass both traffic safety and efficiency, a connected autonomous vehicle is a potential solution. Since the majority of traffic accident are caused by a human driver [12], the autonomous vehicle, which takes over control from a human is the reasonable way to mitigate accidents caused by human error. A lot of works and tests, i.e., [13,14,15,16,17,18,19,20] have been carried out to prove the capability of autonomous vehicle. In addition, Ref. [21] shows the predictive trend of autonomous driving role in the transport planning and [22] reports demand of autonomous vehicle and its impact to the future road transportation.

A connected vehicle combines wireless communication technology V2X to allow a vehicle exchanges information with either other vehicles outside the line of sight or traffic infrastructure. It provides flexibility and power of obtaining data beyond sensing capability of a single autonomous vehicle. Reference [23] introduced the communication standard of IEEE 802.11p, Dedicated Short Range Communication (DSRC). It allocates the specific frequency of spectrum 5.9 GHz band for using only with vehicle communication. Several works used V2X for collision avoidance to improve traffic safety, i.e., [24]. Moreover, [25] showed the contribution of using V2V in controlling traffic signal. It adapts the effective green light to achieve the short queue and waiting time at an intersection. Also in [26, 27] used V2I to perform like a centralized controller to adjust the traffic signal.

In recent years, Autonomous Intersection Management (AIM) concept has been introduced. It is a futuristic solution for traffic management, which can strategically improve both road safety and traffic efficiency. There are some series of work focusing on this topic for instance, in [28,29,30] proposed a series of studies in decentralized collision avoidance at the intersection in late 90s before the first autonomous vehicle and wireless communication are well known. Another intensive study has come after the DARPA Urban Challenge, the self-driving car competition in 2007. References [31,32,33,34] introduced the AIM using multi agents system concept and designed the reservation protocol for managing traffic at an intersection. All works mentioned above attempted to increase the traffic throughput of each individual intersection. It does not present the equilibrium of traffic in the macroscopic because the dynamic of traffic in the network is not taken into account in those works. Therefore, we see the space of improving AIM in managing the overall networked throughput and avoiding the unbalanced traffic [35,36,37,38,39,40,41,42,43].

This paper is organized with seven sections. We started with the introduction and the background of the traffic management methods. The “Contribution” section presents our contribution and our proposed solution method. The “Problem statement” section defines the problem statement. The “Traffic at equilibrium” section introduces the traffic at equilibrium. The “Traffic flow model” section explains the Braess’s Paradox, the situation where the equilibrium will be twisted by the effect of route choices. The “Autonomous Intersection Management (AIM)” section presents our Autonomous Intersection Management system and consensus coordination algorithm. Following with the simulation results in the “Simulation results” section and the last section will lead to the conclusion of this work.

Contribution

The literature researches above introduced many solutions of managing traffic using automation technology ranging from adaptive traffic signaling, a connected vehicle to the Autonomous Intersection Management. However, they have not mainly focused on the macroscopic traffic management. With this point, the author sees the room of improving the networked traffic and particularly aim at the coordination technique of multiple autonomous intersections. The author proposes the consensus algorithm with the route assignment method to maximize traffic throughput of the multiple autonomous intersections. Furthermore, the Braess’s Paradox is investigated, where the route choice can deteriorate the equilibrium and traffic becomes worse.

Back to our previous work [44, 45], the aim for managing traffic at an intersection has been implemented. the centralized control architecture is applied using V2I communication to obtain traffic information and used Dynamic Programming to find an optimal trajectory to safely crossing an intersection. In addition, the works in Refs. [46, 47] are extended in the coordination method and the relationship with the macroscopic traffic model for controlling networked of autonomous intersections.

Based on the main control architecture provided in our latest work [48]. The multi-agents concept is used to represent the autonomous intersection network. Each autonomous intersection is represented as an intelligent agent, which has a bi-directional communication. The control strategy is divided into 2 levels. The lower level is a single autonomous intersection agent and uses the V2I communication to exchange information between vehicle agents. The centralized control principle is applied for the traffic management at this level. The upper level is the network of autonomous intersection agents. Exchanging of the traffic information of each intersection agent is carried out using I2I communication and a decentralized control principle has been applied to manage traffic flow of the entire road network. At this level, an intersection agent shares traffic density, traffic flow rate and average traffic velocity among its neighborhoods.

Representing the network of autonomous intersections with a graph model, an intersection is considered as a node and the link between each node is an edge. Since an autonomous intersection has a bi-directional communication, this network is modeled using the undirected graph to exchange information in both directions, incoming and outgoing. Hence, the traffic can be represented as the flow on the edge. The traffic flow model, Greenshield’s model, uses to explain the traffic characteristics and its dynamics. It is composed of three parameters which are the free flow velocity (v), traffic density \((\rho )\) and traffic flow (q).

In the previous work the discrete consensus algorithm alone was used to coordinate the traffic state on the edge in the autonomous intersections network and resulted in a higher performance \(20\%\) of overall traffic flow in the homogeneous traffic pattern. In this work, the route assignment technique is implemented to handle the heterogeneous traffic pattern such as an extra traffic to the same destination. The simulation of a multiple Autonomous Intersection Management with the heterogeneous traffic is presented. The results are plotted and evaluated with the Greenshield’s model. It shows that traffic in the network has been balanced and it achieves the maximum flow higher than the theoretical equilibrium point derived by the Greenshield’s model.

This paper aims to balance the traffic throughput in the network of autonomous intersections using the feedback consensus and at the same time stabilize the networked traffic by assigning a new optimal route choice while traffic is becoming inequilibrium.

Problem statement

Road accidents can be caused by many factors, human errors, car malfunctions, weather condition and road condition for instance. However, the majority is from human errors according to the statistic report of the road accidents in [12]. Many car manufacturers develop the Advanced Driver Assistant System (ADAS) with Active or Passive safety to help a driver control a car better in some hazardous situations or protect from them or at least warn a driver of the potential accident.

Recently, the autonomous vehicle technology shows a promising result to improve road safety. Many driving trials on the real world traffic environment have been tested and delivered notable results. Therefore, the autonomous vehicle is expected to be the solution of future traffic safety.

Apart from traffic safety problem, traffic congestion plays a crucial role in daily activity. The report [49] mentioned that road users spent millions of minute annually in traffic jam. It will cost billions dollars in wasting fuel and tons of CO\(_2\) emission will be released. It is an important problem to be solved. Many approaches have been proposed to increase traffic efficiency. Ranging from intelligent traffic signaling to a futuristic technology like autonomous vehicle, V2X communication and Autonomous Intersection Management (AIM) as listed in the literature reviews above. In particular, AIM system will be one of the key solutions to achieve both objectives of traffic safety and efficiency.

As the proposed work of AIM system in the previous work, the result showed the achievement of a higher throughput with a randomized traffic input. However, the heterogeneous traffic is not taken into account when the traffic is forced to the same destination, traffic jam will be definitely unavoidable. The normal AIM could maintain the flow until the number of vehicles reaches the road capacity, the traffic equilibrium point. Afterwards, the system will lose the stability. Therefore, the route assignment process has been implemented into AIM control architecture in this work to stabilize the traffic when the jamming is going to occurred. This logic is very common in real world environment since many of road users nowadays have a navigation device to determine the route to go in real-time.

In this work, the author attempts to solve the fundamental problem of traffic efficiency and in particular the heterogeneous traffic problem which remained from the previous work. The completed autonomous platform is proposed which coordinates information between autonomous vehicles and intelligent traffic infrastructures to balance the networked traffic using a feedback consensus and stabilize the heterogeneous traffic with the route assignment process.

Traffic at equilibrium

In the road network, the directed graph is used to represent the road connection at which each road allows only a single travel direction. The road with a specified traveled direction is considered as the edge and the node is the destination where vehicles can get off. With this model, the routes from Origin (O) to Destination (D) and the approximated travel time that responds to traffic congestion level can be determined. To define traffic equilibrium, it can be translated into 2 perspectives, which are system equilibrium and driver equilibrium.

System equilibrium

The first perspective concerns the result in macroscopic traffic where traffic flow in each branch expects to be fairly balanced. This problem fundamentally is how to share the resource among all participants. Since the term of resources in the road network perspective is represented by the number of roads and it is limited. To have system equilibrium, the system assumes to have power to control and assign the route for all vehicles. Hence, the system could maximize the utilization of resources and minimize the total cost such as total travel time.

Generally, it can be said that the system will have an equilibrium when the level of demand meets and not exceed the capacity of the supply. As well, because of the limitation of resource, demand comes with an increase of cost function. The same principle applied to traffic flow, demand is the OD route taken by drivers and the cost of the trip can be expressed as sum of the delay time on each road in the network. Thus, the demand level and cost reflect the increase of traffic congestion. For example, there are two possible routes to destination which give the same travel distance. System knows the capacity (\(x_{\max }\)) of each route and the number of vehicles (x) on each route is measurable. Then, the travel time (T) on both routes can be approximated as the function of average travel time from origin to destination (\(\bar{t}_{S_{\mathrm{o}} \rightarrow S_{\mathrm{d}}}\)) and the waiting time (\(t_w\)) as shown in Eq. 1. At first drivers can freely choose any routes to go but once one route is becoming congested where the waiting time is large (\(\rightarrow \infty \)), drivers will switch to another route to avoid the congestion as shown in the relationship in Eq. 3. This reaction will happen back and forth and the system will oscillate around the equilibrium point.

$$\begin{aligned}&T_i = \bar{t}_{S_{\mathrm{o}} \rightarrow S_{\mathrm{d}}}+t_{w,i} \end{aligned}$$
(1)
$$\begin{aligned}&\lim _{S_{\mathrm{o}} \rightarrow S_{\mathrm{d}}}t_{w,i} ={\left\{ \begin{array}{ll} f(x_i), &{} 0 \le x_i < x_{\max }.\\ \infty , &{} x_i \ge x_{\max }. \end{array}\right. } \end{aligned}$$
(2)
$$\begin{aligned}&i = {\left\{ \begin{array}{ll} 1, &{} t_{w,2} \rightarrow \inf .\\ 2, &{} t_{w,1} \rightarrow \inf . \end{array}\right. } \end{aligned}$$
(3)

where i is the route choice, \(T_i\) is the approximated travel time on each route choice, \(\bar{t}_{S_{\mathrm{o}} \rightarrow S_{\mathrm{d}}}\) is the average travel time from designated origin to destination, \(t_{w,i}\) is sum of the waiting time on each route, \(x_{\max }\) is the maximum capacity of the road, \(x_i\) is number of vehicles, and \(f(x_i)\) is the demand function on each route.

In case the system takes control on the other hand, it will compute the optimal number of vehicles and distribute to another route at a particular time depends on the traffic variation, to balance the cost of the trip on both routes. Hence, system equilibrium can be reached.

$$\begin{aligned} \bar{t}_{w} = f(x_1,x_2,\ldots , x_n) \end{aligned}$$
(4)

Driver equilibrium

The second focuses on the travel time of each driver. the driver equilibrium will be reached when each driver could have approximately the same in travel time to destination regardless of the route choices. The result expects to be similar to the objective of system equilibrium. However, the assumption of problem is based on different perspective. With driver equilibrium, the route choice will be chosen by the driver instead of system using knowledge of current traffic, i.e., navigation device. This rerouting method is basically a greedy algorithm where a driver chooses the route that provides the minimum travel time and expects to have total minimum travel time at the destination. For example, there are two different routes to destination where one of them has a speed restriction but has a shorter distance and both of them will give the same average travel time to destination under the free flow traffic condition. So, the route choices depend on the driver preferences.

Based on the driver equilibrium model, the decision of drivers can cause a bottleneck since all drivers can choose the same route at the same point of time before other drivers change to another route which has a longer distance but provides a higher flow. Once the travel time experienced from drivers of both routes is the same, the driver equilibrium is reached. And this value is expected to be the same as system equilibrium or Nash equilibrium.

With the greedy route choice, however, it can lead traffic condition to Braess paradox, which on adding and using the additional route will result in a worse traffic. The effect of Braess paradox is shown in the next section.

In this work, the system equilibrium is considered since the autonomous intersection agent has been implemented to coordinate the traffic information and allows to control vehicles. To maintain the traffic at equilibrium, the coordination method of using feedback consensus is proposed to distribute number of vehicles on each road in the network under the free flow condition. Additionally, the route assignment method uses to recover traffic back at equilibrium once traffic reached the road capacity.

Traffic flow model

In this section, the traffic flow model is introduced to interpret the level of traffic congestion in the road network. In [1, 2] explained a general traffic flow model that mostly recognizes the field of transportation engineer. It is used to design a road network in-out city and also monitor traffics. Traffic flow model focuses on how to move a group of vehicles rather than a single motion of each vehicle. Hence, traffic flow model interprets traffic situation with three parameters and their relationships.

  1. 1.

    Traffic density (\(\rho \)): is defined by the number of vehicles per one kilometer per lane (veh./km/lane).

  2. 2.

    Traffic flow rate (\(\textit{q}\)): is defined the number of vehicles passed a particular point per hour (veh./h).

  3. 3.

    Traffic velocity (\(\textit{v}\)): is defined the average velocity of vehicles on the observed road (km/h).

By the definition, traffic flow rate can be expressed as the product of traffic density and traffic velocity. In practice, all three parameters are observed in the real world traffic environment and correlated them to form a relationship between each parameter to represent the macroscopic traffic. Therefore, the continuity equation is basically the empirical formula and can be written as the following equation.

$$\begin{aligned} q = v\cdot \rho \end{aligned}$$
(5)

where \(\textit{q}\) is traffic flow rate, \(\textit{v}\) is traffic velocity, and \(\rho \) is traffic density.

In this work, the classic traffic flow model “Greenshield’s model” is introduced. Rakha and Crowther [3] as the referent traffic model. This model is the approximation function of the empirical data of the aforementioned three parameters. Greenshield’s model defines three corresponding relationship between those three parameters. As well, the detailed configuration of this model have been presented in the previous work [48]. The characteristic and their relationships will be briefly explained to outline toward our AIM controller design.

Fig. 1
figure 1

Traffic Flow model. a Represents the relationship between the average traffic density and the average traffic velocity. b Represents the relationship between the average traffic density and the average traffic flow rate. c Represents the average traffic flow rate and the average traffic velocity and d represents corresponding of three traffic parameters

Traffic velocity and traffic density

The relationship is modeled by the linear function. The average traffic velocity is decreased proportionally to the average traffic density. Greenshield’s model classified the traffic situation with two simple groups, composed of congested and uncongested traffic. The relationship between the average value of traffic density and velocity is plotted in Fig. 1a.

Traffic parameters according to the Greenshield’s model are used as listed in the following Table 1.

The uncongested traffic is defined by the level of velocity that vehicles can still drive continuously and comfortably. With those parameters above, traffic is said to be uncongested when vehicles can drive at least with 46 km/h. Below this threshold, traffic is becoming congested and technically, the traffic density at capacity \((\rho _{\mathrm{cap}})\) can be calculated. It indicates the maximum number of vehicles on the road that still keeps the average velocity at this velocity threshold \(v_{\mathrm{cap}}\) using the relationship function in Eq. 6.

$$\begin{aligned} \rho _{\mathrm{cap}}=\rho _{\mathrm{jam}}\cdot \Bigg (1-\dfrac{v_{\mathrm{cap}}}{v_{\mathrm{f}}}\Bigg ) \end{aligned}$$
(6)

Therefore, the traffic density at capacity \((\rho _{\mathrm{cap}})\) is rounded up to 38 vehicles/km/lane. The boundary condition can be set to classify the traffic situation using the threshold of traffic velocity and density as shown in the Eqs. 7 and 8.

$$\begin{aligned}&v_{\mathrm{cap}}\le v \le v_{\mathrm{f}} \end{aligned}$$
(7)
$$\begin{aligned}&0 \le \rho \le \rho _{\mathrm{cap}} \end{aligned}$$
(8)

The traffic is uncongested if two conditions above are satisfied. The average of traffic velocity is greater than the average velocity \(v_{\mathrm{t}}\) at capacity \(v_{\mathrm{cap}}\) and less than free-flow velocity \(v_{\mathrm{f}}\). The traffic density at the moment \(\rho _{\mathrm{t}}\) is lower than the threshold of traffic density at capacity \(\rho _{\mathrm{cap}}\). Otherwise, the traffic will become congestion.

Traffic density and traffic flow rate

Mathematically, traffic flow rate is determined by the continuity equation in Eq. 5. Hence, the relationship between traffic density and traffic flow rate is a nonlinear function and Greenshield’s model defined using a parabolic function. Once the average traffic velocity and traffic density are measured, average traffic flow rate can be approximated and similar interpretation is used to classify traffic situation.

In Fig. 1b shows the relationship of traffic density and flow rate. It has an equilibrium point on the top, where traffic flow rate will gradually reach the maximum \((q_{\mathrm{cap}})\) when traffic density reaches the threshold \((\rho _{\mathrm{cap}})\) on the left half plane. In this area, traffic is uncongested. Right after this point traffic flow rate will decrease to zero since traffic density is increasing and with the condition in Eq. 6. average velocity will reduce to zero.

Table 1 Greenshield’s model parameters

By substituting the threshold value of traffic density at capacity \(\rho _{\mathrm{cap}}\), the traffic flow at capacity \((q_{\mathrm{cap}})\) can be determined as:

$$\begin{aligned} q_{\mathrm{cap}}= v_{\mathrm{f}}\cdot \Bigg (\rho _{\mathrm{cap}}-\dfrac{\rho _{\mathrm{cap}}^2}{\rho _{\mathrm{jam}}}\Bigg ) \end{aligned}$$
(9)

Thus, the traffic flow rate at the capacity \((q_{\mathrm{cap}})\) will be approximately 1800 vehicles/h/lane and this point can indicate the boundary of the uncongested traffic.

Traffic flow rate and traffic velocity

The final relationship is represented by a parabolic function because it is also derived from the continuity equation as same as the traffic flow rate and traffic density relationship. Theoretically, it is a correspondent relationship of two relationships above. The congested and uncongested traffic is explained with the same threshold of the average traffic velocity, and flow rate at capacity \((v_{\mathrm{cap}}, q_{\mathrm{cap}})\) as shown in Fig. 1c. At the equilibrium point of this relationship, it will indicate the average traffic density at capacity \((\rho _{\mathrm{cap}})\) which it can derive as in Eq. 10.

$$\begin{aligned} q_{\mathrm{cap}}= \rho _{\mathrm{jam}}\cdot \Bigg (1-\dfrac{v_{\mathrm{cap}}}{v_{\mathrm{f}}}\Bigg ) \end{aligned}$$
(10)

Based on using Greenshield’s model, these 3 parameters provide a correspondent relationship, which reflects the traffic behaviour. To classify the traffic situation whether it is congested or uncongested, the triple equilibrium point is determined and the boundary condition is defined. As shown in Fig.  1a–c the congested and uncongested traffic are separated at the equilibrium point where the average traffic velocity, traffic density and traffic flow rate are at capacity (\(v_{\mathrm{cap}},\rho _{\mathrm{cap}}, q_{\mathrm{cap}}\)).

In Fig. 1d, 3 traffic relationships are plotted together. It shows that traffic equilibrium is the tip of the 3 curves where it gives the theoretical point of the maximum traffic flow rate. Traffic management in practice, the purpose is to balance traffic and operate under the uncongested condition up to this point or has ability to recover the congested traffic back to operate around this point.

In this section, the traffic model is introduced for monitoring the traffic situation and estimating traffic parameters on a road. This information will be used as feedback for the proposed closed-loop AIM traffic management. The coordination technique with using traffic model to balance the traffic throughput for AIM system will be explained in the next section.

Autonomous Intersection Management (AIM)

In this section, the traffic management is introduced, based on using the closed-loop control perspective. Autonomous Intersection Management (AIM) is the traffic signal-less platform where a traffic signal is replaced by the intersection manager and all vehicles are autonomous. Instead of recognizing traffic signal by driver perception, AIM uses the wireless communication to exchange data between vehicles and manage an intersection crossing.

The proposed AIM platform focuses on managing traffic in the macroscopic level where there are multiple connected intersections since traffic in a single intersection is usually modeled as a microscopic level. Rather considers the dynamic of vehicles, macroscopic traffic interests the traffic flow of an intersection and the impact to the entire road network. To be closed the real world traffic environment, macroscopic traffic is the best way to express traffic characteristic of the network of multiple intersections where the flow of each intersection will play a role in the network’s throughput.

AIM is modeled, based on using distributed control structure. Each single intersection is assumed to be identical and acts as the intelligent agent which responses to control autonomous vehicles crossing an intersection meanwhile, it can exchange traffic information to the neighbored intersection wirelessly. Therefore, the intersection manager models with two levels of communication.

  1. 1.

    Intersection level Intersection manager uses Vehicle to Infrastructure (V2I) communication to exchange information with autonomous vehicles for planning safe trajectories.

  2. 2.

    Network level Intersection manager uses Infrastructure to Infrastructure (I2I) communication to exchange traffic information with the neighborhoods for balancing and maximizing traffic throughput of the network.

In this work, the same platform of the previous work in [48] is used. There are nine connected intersections in a square grid with four ways and a single lane for incoming and outgoing road. The concept of multi-agents system is applied in such a way that a single intersection is considered as an autonomous agent that has ability to control itself, whilst the control command is dependent on the feedback information of its neighborhoods.

The graph theory [50] used to visualize and models the interaction between intersection managers in the network. A node represents an intersection manager and an edge represents their connections. The network model of AIM is explained in the following section.

Network modeling

Modeling the intersection network, the model is designed separately, based on its function which are composed of two networks. The first one is the road network where it represents vehicles flow and the second is the communication network where it represents the traffic information flow.

Road network

Road network is a physical model representing in the real world traffic environment. It can classify into three levels. The lowest level is a road level, which has fundamentally two functions, incoming and outgoing flow. The middle level is an intersection level, where multiple roads have been joined and vehicles can change a direction of travel. The top level is the network level. It connects multiple intersections together. Therefore, the road network can be modeled as illustrated in Fig. 2.

Fig. 2
figure 2

Modeling of a road network

A road network is simplified by connecting nine intersections in a square grid. Every intersection is a standard four ways intersection, which has two lanes of incoming and outgoing on each leg. The traffic flow model applies to explain traffic situation in a road network. The state of an intersection is defined with the vector of those three traffic parameters.

With using graph representation, each road is represented by an edge and an intersection is a node. Thus, traffic on each road is basically considered as flow, density and velocity on the edge. For the incoming traffic to an intersection i from the neighborhoods intersection j or the external input outside the network l, the state of a traffic towards an intersection inside the network can be expressed as:

$$\begin{aligned} s_{ij} = \begin{bmatrix} \rho _{\mathrm{in},ij} \\ v_{\mathrm{in},ij} \\ q_{\mathrm{in},ij} \end{bmatrix} ;\forall j \in e_{ij} \quad \hbox {and}\quad i \in {1,\ldots N_{i}} \end{aligned}$$
(11)

where \(s_{ij}\) is the state of traffic toward an intersection i from the neighbored intersections j, \(\rho _{\mathrm{in},ij}\) is the incoming traffic density (density on the edge), \(v_{\mathrm{in},ij}\) is the traffic velocity (velocity on the edge) and \(q_{\mathrm{in},ij}\) is the traffic flow rate (flow on the edge) on the same direction to an intersection i from an intersection j.

The second component is the traffic generated outside the network. The state of traffic connected to an intersection from the outside of network can be expressed as:

$$\begin{aligned} s_{il}= & {} \begin{bmatrix} \gamma _{\mathrm{in},il} \\ \beta _{\mathrm{in},il} \\ \alpha _{\mathrm{in},il} \end{bmatrix}; \forall l \in (1,2) \nonumber \\ s_{li}= & {} \begin{bmatrix} \gamma _{\mathrm{out},li} \\ \beta _{\mathrm{out},li} \\ \alpha _{\mathrm{out},li} \end{bmatrix}; \forall l \in (1,2) \end{aligned}$$
(12)

where \(s_{il}\) is the state of road toward an intersection i from the external source l, which l is a set of input direction (1: horizontal, 2: vertical), \(\gamma _{\mathrm{in},il}\), \(\beta _{\mathrm{in},il}\) and \(\alpha _{\mathrm{in},il}\) are the traffic density, traffic velocity and traffic flow rate with the direction to an intersection i from the external source l (in: incoming) respectively and in the opposite direction \(s_{li}\) is the state of road outward an intersection i to an external source l, \(\gamma _{\mathrm{out},il}\), \(\beta _{\mathrm{out},il}\) and \(\alpha _{\mathrm{out},il}\) are the traffic density, traffic velocity and traffic flow rate from an intersection i to an external source l (out: outgoing) respectively.

In addition, the outgoing traffic’s state can be defined in the same way. However, it is assumed that inside the road network, an outgoing traffic is practically an incoming traffic to a neighbored intersection. Hence, \(s_{ij}\) represents the state of an incoming traffic to an intersection i from an intersection j can refer to an outgoing traffic of an intersection j to an intersection i.

Since, the amount of vehicles drives on each road represents as the flow on the edge, each single intersection in AIM can measure the local traffic density by counting the requested messages that are transmitted from the incoming vehicles over the V2I communication. The collected traffic density information of each intersection can be determined by summing the traffic density of all incoming roads to intersection. As well, the intersection’s state is defined by the gross incoming traffic to an intersection as the node traffic.

$$\begin{aligned} \rho _{\mathrm{in},i}=\sum _{j\in e_{ij}}\rho _{\mathrm{in},ij}+ \sum _{l \in (1,2)}\gamma _{\mathrm{in},il} \end{aligned}$$
(13)

where \(\rho _{\mathrm{in},i}\) is the gross incoming traffic density of the intersection \(\textit{i}\) (density on the node). \(\rho _{\mathrm{in},ij}\) is the traffic density from an internal network, neighborhood intersection j (density on the internal edge), and \(\gamma _{\mathrm{in},il}\) is the traffic density from an external source l (density on the external edge).

The incoming traffic density uses to indicate the traffic condition of an intersection, traffic. In addition, the traffic of each road is normalized by the gross incoming traffic to an intersection. Thus, the distribution of traffic on each connected road can be defined.

$$\begin{aligned}&P(\rho _{\mathrm{in},ij}| \rho _{\mathrm{in},i}) = \frac{P(\rho _{\mathrm{in},i}| \rho _{\mathrm{in},ij})\cdot P(\rho _{\mathrm{in},ij})}{\rho _{\mathrm{in},i}} \end{aligned}$$
(14)
$$\begin{aligned}&\sum _{j\in e_{ij}}P_{j}(\rho _{\mathrm{in},ij})=1 \end{aligned}$$
(15)

where \(P(\rho _{\mathrm{in},ij}| \rho _{\mathrm{in},i})\) is the distribution of traffic on each incoming road toward intersection i given by the gross incoming traffic of an intersection i, \(P(\rho _{\mathrm{in},i}|\rho _{\mathrm{in},ij}) \cdot P(\rho _{\mathrm{in},ij})\) is the direct measured value of traffic on each road towards intersection i, the normalized term is the gross incoming traffic of an intersection i obtained from Eq. 13 and the summation of total probability is 1. The observed parameters v and q also represent with the corresponded probability distribution.

Apart of traffic density that it has direct measurement, the average of traffic velocity and traffic flow rate can be estimated by using traffic model. Refer to the Greenshield’s traffic model, the traffic condition on each road and also the intersection through those 3 traffic parameters and their relationships can be classified.

To maximize the traffic throughput in the road network, the traffic relationship shows that the value of the average traffic density and velocity in each road must be under the uncongested condition, which is bounded by the boundary conditions. In other words, the uncongested traffic can refer to the stability of the road network since the congested traffic or traffic jamming represents the instability.

Communication network

Different from the road network function which represents a physical interaction, the communication network is responsible for signal interaction, exchanging traffic data. An intersection is an autonomous agent represented as a node and the communication flow between each node is represented as an edge. The communication is modeled only within the network. An intersection is not allowed to communicate with external sources because the external source is assumed to be independent and not allow to control. The communication topology of the intersection network is illustrated in Fig. 3.

Fig. 3
figure 3

Communication network model

The information flow on the edge uses the bi-directional communication. Each node, which represents an intersection manager, can either receive or transmit the data package to their destination node. The communication is assumed to be flawless. It does not encountered the signal lost and delay.

$$\begin{aligned} c_{ij} = c_{ji}; \forall j\in e_{ij} \end{aligned}$$
(16)

where \(c_{ij}\) and \(c_{ji}\) is the valid bi-directional communication link between a pair of node.

The properties of a graph theory uses to model the interaction of the communication in the intersection network. A graph (G) with N elements is able to define into a set \(G=(V,E)\), where (V) is denoted by a finite set of vertices. (E) is the finite set of edges and represents the connection between a couple of nodes. Hence, the adjacency element, will have value 1 when there is an edge between each node, otherwise the value is equal zero. The adjacency matrix can be expressed as the following equation.

$$\begin{aligned} \begin{aligned} a_{ij}&= {\left\{ \begin{array}{ll} 1,\quad (n_{i},n_{j})\in E\\ 0,\quad \hbox {Otherwise}\\ \end{array}\right. }\\ \underline{A}&= [a_{ij}]; \quad \textit{i, j} \in N \end{aligned} \end{aligned}$$
(17)

The second component is the degree of a graph. It describes the number of connections at each intersection. The degree matrix is a diagonal matrix, where the degree element \(d_{ij}\) is equal to the row summing of adjacency elements and it can be expressed as:

$$\begin{aligned} \begin{aligned} d_{ij}&=\left\{ \begin{array}{l@{\quad }l} \sum \nolimits _{i=1}^{n},&{} (n_{i},n_{j})\in E \\ 0,&{} \hbox {Otherwise}\\ \end{array}\right. \\ \underline{D}&= [d_{ij}]; \quad \textit{i, j} \in N \end{aligned} \end{aligned}$$
(18)

From the graph theory, an interaction of a graph can explain through a graph laplacian. The Laplacian matrix describes the complete relationship of the intersection network. The simple way to determine the Laplacian matrix is subtracting the degree matrix with the adjacency matrix.

$$\begin{aligned} \begin{aligned} \underline{L}&=\underline{D}-\underline{A}\\&= \begin{bmatrix} d_{ij}&\quad -a_{ij+1}&\quad \dots&\quad -a_{iN} \\ -a_{i+1j}&\quad d_{i+1j+1}&\quad \dots&\quad -a_{i+1N} \\ \vdots&\quad \vdots&\quad \ddots&\quad \vdots \\ -a_{Nj}&\quad -a_{Nj+1}&\quad \dots&\quad d_{NN} \\ \end{bmatrix} \end{aligned} \end{aligned}$$
(19)

where \(\textit{i}\) is the row element of the matrix, \(\textit{j}\) is the column element of the matrix, \(\textit{N}\) is the number of node, \(\underline{A}\) is the adjacency matrix, \(a_{ij}\) is the adjacency element, \(\underline{D}\) is the degree matrix, \(d_{ij}\) is the degree element, and \(\underline{L}\) is the Laplacian matrix.

Two networks function are modeled for modeling AIM and will explain the conditions that both networks are stable. Since the road network represents the actual traffic, the stability of network is dependent on the traffic flow characteristic. The maximum capacity refers to the maximum number of vehicles that can drive on a road. It uses to indicate the stability of a network when the number of vehicles below the maximum capacity, the network will be stable and vice versa.

The second network, an undirected graph uses to model the communication topology. Thanks to the properties of the algebraic graph, the stability of a communication network can be guaranteed through the Laplacian matrix. More details of the stability and boundary conditions can be found [51] and a short summary will be explained in the next section.

Consensus coordination technique for AIM

Consensus algorithm is used because it has a distributed structure and scalability. Consensus requires only local information from the nearest neighborhoods to make them reach the common agreement. It has been intensively studied in multi-agents system [52], robot applications such as cooperative robots in [53, 54] and robots formation [55], distributed motion control of robotics network [56, 57] and flocking [58, 59]. Also, [60] used in distributed sensors network and showed a good performance in giving higher accuracy. Therefore, the advantage of reaching consensus (convergence) could be used for traffic management. Traffic on each road can meet the same level, giving by consensus algorithm. The discrete consensus algorithm is implemented to coordinate traffic information and determine the consensus value, which will balance the overall traffic of the entire road network. The system architecture of the AIM for multiple intersections is illustrated in Fig. 4.

Fig. 4
figure 4

The system architecture of AIM for multiple intersections

An intersection acts as the centralized controller. At the intersection level, it determines safe trajectories and manages vehicles crossing an intersection [44, 45]. However, at the network level, an intersection manager collects the traffic density on the road network. It is countable and uses to indicate the traffic condition, which is defined by traffic model. In practice, an intersection manager can know the traffic density on a road by counting a number of requested messages received from V2I communication. The traffic density of outgoing vehicles is not considered because they are normally the incoming vehicles to other intersections.

With using consensus algorithm, traffic density information is distributed to its neighborhoods in the intersection network through I2I communication. Since every intersection manager is assumed to be identical, it will coordinate traffic density of itself and its neighborhoods to compute the control output and then update the intersection’s state.

The traffic density uses as the coordinated information, as well as, representing the state of an intersection. Consensus algorithm expresses the dynamics of a local intersection as:

$$\begin{aligned} \dot{\rho _{i}}= \sum _{j \in N{i}} a_{ij}(\rho _j-\rho _i) \end{aligned}$$
(20)

Where the dynamics of the intersection’s state \((\dot{\rho _{i}})\) is the summation of differences \((\rho _j-\rho _i)\) from all neighbored intersection. With the communication network topology, the dynamics of the intersection network can be written in the vector form as:

$$\begin{aligned} \dot{\rho } = -L\rho \end{aligned}$$
(21)

The street network provides the gross traffic density of each intersection, and then consensus coordinates this information, based on the communication topology. Using Eq. 21 the global dynamics of AIM network can be derived as:

$$\begin{aligned} \begin{bmatrix} \dot{\rho _{1}} \\ \vdots \\ \dot{\rho _{N_{i}}} \end{bmatrix} = -L \cdot p \begin{bmatrix} {\rho _{1}} \\ \vdots \\ {\rho _{N_{i}}} \end{bmatrix} = -L \cdot p \begin{bmatrix} \sum \nolimits _{i} \xi _{ji} + \sum {i}\gamma _{ji}\\ \vdots \\ \sum \nolimits _{N_i} \xi _{jN_i} + \sum {i}\gamma _{jN_i} \end{bmatrix}\nonumber \\ \end{aligned}$$
(22)
Fig. 5
figure 5

Closed loop control block diagram of an intersection manager

Concerning the communication frequency, the data update rate is a discrete time. Hence, the discrete time consensus is implemented by using the difference equation. Then, the discrete time consensus for a local intersection of Eq. 20 can be derived as shown in the following equation.

$$\begin{aligned} \rho _{i}(k+1) = \rho _{i}(k)+\epsilon \sum _{j \in N{i}} a_{ij}(\rho _{j}(k)-\rho _{i}(k)) \end{aligned}$$
(23)

As well, the discrete version of the dynamics of intersection network in Eq. 24 is expressed as:

$$\begin{aligned} \rho (k+1) = P\cdot \rho (k) \end{aligned}$$
(24)

Where P is a Perron matrix \(P=I-\epsilon L\) and \(\epsilon \) is the step size \(\epsilon >0\). With, P is a Perron matrix and a step size \(\epsilon >0\). P must be satisfied a non-negative matrix. According to \(P=I-\epsilon L\), then it can be written as \(P=I-\epsilon D+\epsilon A\). The Perron matrix will be non-negative matrix, if \(I-\epsilon D\) is non-negative. Therefore, the sufficient condition of the step size is defined by \(0<\epsilon <1/\varDelta \) where, \(\varDelta \) is the maximum degree of a Perron matrix. In addition, the rows summation of the Laplacian matrix is equal to zero \(\sum _{j}l_{ij}=0\) so that L has a zero eigenvalue, \(\lambda _1=0\), and its corresponding eigenvector \(\underline{1}\), \(L\underline{1}=0\). Hence, a Perron matrix can be written \(P\underline{1}=I-\epsilon L\underline{1}\), which means the summation of all rows is 1. Also, 1 is a trivial eigenvalue of a Perron matrix since, the simple root of a Perron matrix is determined by \(\mu _{j}=1-\epsilon \lambda _{j}\), \(\lambda _{j}=0\). The sufficient conditions for the stability of a consensus in the network are provided in [51].

Since the proposed AIM platform is an intersection grid, formed of \(3\,\times \,3\) square as shown in the network modeling Fig. 4, the networked control system is composed of nine intersection managers. The distributed control structure is designed as a hierarchical level. Starting from an intersection level to a city level, where contains multiple intersections. Moreover, it can expand into a very large scale because the distributed consensus has the advantage of scalability because it requires only a coordination of a local information. The intersection control strategy is identical for every intersection manager. Figure 5 shows the improved version of closed loop control block diagram of AIM. From the previous work in [48], the consensus coordination for AIM without having a route assignment module is introduced. Only the homogeneous traffic where all vehicles can drive freely has been simulated and only velocity has been controlled.

In this work, the experiments attempt to create the potential traffic jam by forcing vehicles drive to the same destination. Consensus alone cannot handle the heterogeneous traffic well, thus the only solution is to reroute excessive vehicles to other road. Rerouting is a common logic that has been used in the navigation device. In the real world, many road users use this navigation device to find an optimal path to go in real time.

The function of AIM in general prioritizes the timing of crossing an intersection for autonomous vehicles. The control variable is the incoming time to an intersection which can be transformed to the average velocity because the distance between a vehicle and intersection is known. Technically, every vehicle has to send the requesting message to AIM in a particular range of communication before crossing an intersection. With this process, the traffic density of roads toward an intersection is counted through the V2I communication. However, the information is updated in a discrete time and it is depended on the communication refresh rate and must be satisfied the sufficient condition of the discrete consensus protocol.

The traffic flow rate of an intersection is regulated by using the local traffic density of their neighborhoods, obtained from I2I communication. Consensus algorithm coordinates the traffic density from the V2I measurement with its neighborhood from I2I feedback. This term is named as the feedback consensus. Using the discrete consensus in Eqs. 23 and 24, the desired value of traffic density is computed \(\rho _{i}^* (k)=\rho _{i}(k+1)\). Therefore, the residual density of an intersection is the difference between the desired traffic density and the current traffic density in a particular point of time. The error or residual can be expressed as the following equation.

$$\begin{aligned} e_{i}(k) = \rho _{i}^*(k)-\rho _{i}(k) \end{aligned}$$
(25)

Consensus algorithm takes the differences of neighborhoods to determine the common level of traffic density among the local intersection network. So, traffic density of neighborhoods expects to be closed to each others. Theoretically, traffic in the network will have a balance if the error term approaches zero in the finite time to make the current traffic density equal to the desired traffic density.

To manage the current traffic density to meet the desired traffic density is to minimize the error term, the Greenshield’s relationship of traffic velocity and traffic density is implemented. Since the model gives the direct relationship between them, it is obvious that changing the traffic velocity is the way to minimize the traffic density error of an intersection. The average of traffic velocity in the discrete time can be derived as:

$$\begin{aligned} \bar{v}_{i}(k)= \bar{v}_{i}(k-1)-\dfrac{v_{\mathrm{f}}}{\rho _{\mathrm{jam}}} e_{i}(k) \end{aligned}$$
(26)

From Eq. 26, the control velocity that could balance the level of traffic density in the local intersection network is calculated. Also, avoiding the abrupt change of control output, the filter is implemented to remove the short term fluctuation for smoothing the output response at the final step. The technique of moving average is applied by weighting the value between the current, computed value with the previous, desired value. The weighting coefficient is called the degree of filtering and the summation of them is unity. It is called the exponential moving average filter, which the responded speed is dependent on the weighting coefficient. In practice, the function of this filter is identical to the first order, low pass filter in the electronics circuit, suppressing the amplitude of a signal so that the frequency is higher than the cut-off frequency. The update of the desired average traffic velocity that suggests to vehicles on each street can be written in Eq. 26 as:

$$\begin{aligned} \bar{v}_{i}^*(k)= \alpha \bar{v}_{i}(k)+(1-\alpha )\bar{v}_{i}^*(k-1) \end{aligned}$$
(27)

where \(v_i^*(k)\) is the desired average of traffic velocity for an intersection \(\textit{i}\) at time step \(\textit{k}\), \(v_i(k)\) is the computed average traffic velocity from the Greenshield’s model at time step \(\textit{k}\), \(\bar{v}_{i}^*(k-1)\) is the previous time step \(k-1\) of a desired average traffic velocity and \(\alpha \) is the weight coefficient, \(\alpha \in [0,1]\).

The traffic velocity in Eq. 27 is transmitted to vehicles for planning trajectory by I2V communication (bi-directional communication of V2I). The frequency of the feedback loop must be set corresponding to the requirement of stability condition of a communication graph. In addition, the communication is assumed to be flawless. The package lost and communication delay are excluded. The pseudoalgorithm can be found in Ref. [48].

In heterogeneous traffic situation, controlling only traffic velocity might not be sufficient if the number of vehicles is exceeded the limit of road capacity \((\rho _{\mathrm{jam}})\). Even though consensus attempts to release vehicles out of an intersection as fast and as much as possible, the traffic congestion can still happen because the demand of using road is greater than what road can supply. Hence, the route assignment process is implemented for the further improvement to assist the consensus coordination when the traffic condition is become congested. It supports an intersection manager distribute an excessive vehicles to the neighborhoods, where have a lower density.

Route assignment

Refer to traffic model, it can normally evaluate traffic situation whether congested or uncongested. Also, it uses to activate the route assignment in this AIM closed loop control. The route assignment block is added as the additional process. It will not be used if traffic situation is under the uncongested condition but will be activated only when traffic congestion is detected.

Rerouting could provide a better path solution to destination for vehicle when the desired path is congested. However, there is a problem of rerouting strategy where sometimes rerouting or adding a new route to the network could have a worse result as represented in Braess’s paradox. Moreover, the question of which vehicle has to be rerouted and how often the optional route will be computed. For the driver perspective, driver does not want to change the route very often on the other hand, it is necessary for the system to distribute the excessive vehicles to stabilize the overall network traffic. Hence, the compromise between the system equilibrium and driver equilibrium to have a quasi equilibrium is necessary. Balancing traffic will be managed by the feedback consensus and stabilizing traffic which traffic is recovered from the congestion, will be responsible from the route assignment process.

The word route assignment is used instead of rerouting because the route assignment means a vehicle has to follow this assigned new route from the intersection manager but rerouting acts as a passive control to give a driver the best route option i.e. a navigation device has to reroute everytime when a driver change their decision.

Next a short introduction of Braess’s paradox will be explained and later describe the rerouting strategies.

Braess’s paradox

Figure 6 illustrated the fair case of road network where there are two available routes from the start node A to the destination node B. Traffic on both routes can have the equilibrium because they choose the route based on their own interest, which the traffic on both routes will converge in the finite time. As represented in the Table 2, the estimated travel time on both routes is a function of percentage of vehicles (x) on each route and (N) is a relationship function of time and number of vehicles plus with a constant value of c. In the fair case, let’s assume c is equal. Drivers will switch the route between these two choices and then, it can say that once \(x = 1-x\), there is the equilibrium on both routes.

Fig. 6
figure 6

Illustration of a road network and routing

Table 2 Traffic equilibrium on the road network

However, if the additional route is added to the network in such a way that driver can have a shortcut to the destination, traffic in the network might result in counterintuitive territory. For instance, if a bypass road from node B to C is added where it provides a shorter time \(c'\) than c as shown in Fig. 7. Drivers tend to go on the shortcut because they expect the less travel time.

Fig. 7
figure 7

Illustration of an augmented road network and routing

Table 3 Braess’s paradox on the road network

Table 3 showed the estimated travel time as a function of driver’s demand on each route where x and y is the percentage of vehicles on a normal route 1 and 2 respectively and the remain of \(1-x-y\) is the percentage of vehicles on a shortcut. The estimated travel time on all route, however, is increased compared to a normal road network without a shortcut. As it showed even when the percentage of vehicles is equally distributed to a normal road \(x=y\) and \(x+y<1\) since some drivers will go to a shortcut, the estimated travel time of this network is worse than the normal one. The new equilibrium is happened but it is worse for everyone. It has known as Braess’s paradox [10, 11]. Also, the network traffic problem is widely used as the case study in game theory where all vehicles can have the same benefit regardless the route choice they choose. Reaching the Nash equilibrium will be similar to the driver equilibrium but it can be either better for all or worse for all.

Greedy routing

There are two main factors that typically concern rerouting. The first factor is the shortest distance to desired destination. It is the most well known problem of finding the best route in term of minimum travel distance. The shortest route problem is fundamentally modeled, based on a graph function and we find the solution by searching through all connected graphs with different optimization process. Many algorithms have been proposed and mostly based on Bellman–Ford [61] and Dijkstra algorithm [62], for instance. The second factor concerns the minimum travel time. Difference from the shortest route, the minimum travel time takes the traffic condition into account to find the new route. Since the driver self interested in general without knowing the traffic, will choose the shortest route, that will cause the congestion on the shortest route and the travel time on this route could be higher than other longer routes. In recent, the energy consumption, emission and etc. are also taken into account to calculate the optimal route, using multi-objectives optimization process.

Refer to the Braess’s paradox, there is no shortcut route in the intersection network model. So, the different cost will be assigned to each route to artificially make a shortcut. In the intersection model, a single intersection has four legs, where a vehicle can travel in only three directions, go straight, go left and go right. We give the cost \((c={0,1,2})\) to those three directions where the lowest cost \((c=0)\) is given to go straight, the medium cost \((c=1)\) is for going right and the highest cost \((c=2)\) is for going left as illustrated in Fig. 8. The assumption is that the route which has a minimum change of driving direction provides the cheapest cost. Also, turning left is the most expensive because in practice, it has to wait for the oncoming traffic of the opposite road.

Fig. 8
figure 8

Assumption of giving route cost

This cost is a local cost, which is dependent on the current travel direction of a vehicle. It can say that going straight has priority over turning right and left, respectively.

For instance, the routing problem is conducted by setting the starting point at node A and the destination at node B as shown in Fig. 9. There are six possible shortest routes, direct from start to the destination. The experiment attempts to create the congestion on these routes to disturb the feedback consensus and use the route assignment to stabilize the traffic, recover from the potential congestion.

Fig. 9
figure 9

Heterogeneous traffic: create traffic congestion on the route between node 1 and node 9

The local route assignment algorithm is implemented, where the new route will be recomputed by the intersection manager and assigned to each incoming vehicle. The greedy algorithm is used to find the minimum time’s route, since every intersection in the network is square grid and identical, there is no difference in the total travel distance. However, The multi-objectives optimization is used to find optimal route in the real world traffic. The pseudoalgorithm for the greedy route assignment is represented in Algorithm 1.

figure a

The route assignment algorithm composes of four processes. The first process start with determining traffic on the edge and node where traffic on the edge is the actual traffic on the road measured by counting the incoming message of vehicles transmitted to an intersection manager over V2I communication and traffic on the node is the sum of all traffic on the edge, respectively. The second process determines the m number of shortest routes from the current intersection to the destination based on using the modified Dijkstra’s algorithm with the priority queue. The third process determines the priority and travel time of all shortest routes. The proposed assumption of driving direction uses to compute the priority of each route and traffic density level to compute the estimated travel time. After that it evaluates the score for each route based on decreasing value of priority P and time T. The last process is to find the best local route through the greedy algorithm.

Simulation results

The route assignment process has been integrated into the feedback consensus-based AIM to achieve the heterogeneous traffic pattern where the traffic congestion has been forced to happen. The simulation of multiple autonomous intersections management has been implemented based on the previous platform.

Heterogeneous traffic: single intended input single intended output

The first experiment, the heterogeneous traffic has been input at the node 1 to node 9 and the other sources are independent and assigned randomly. With the referent traffic model, the maximum traffic flow rate \((q_{\max })\) for a single lane is 1800 vehicles/h. For this reason, the range of the traffic flow rate is set between 1000 and 2000 vehicles/h/lane to test the system with the maximum capacity. The snapshot of the AIM simulator for multiple intersection management is shown in Fig. 10.

Fig. 10
figure 10

Screenshot of the AIM simulation of multiple intersection management

figure b

Three traffic parameters of all intersections in the network are collected and plotted their relationships against the Greenshield’s traffic model. Since the collected data are big and we would like to observe the trend over a long period, we used the nonlinear regression model to match the data set with the curve fitting using polynomial equation then, plot time series of three traffic parameters. Also, the variation and the probability distribution of networked traffic in each intersection are plotted. Lastly, we compare the performance of our method with the Greenshield’s model as the based line. All information are plotted in Fig. 11 respectively.

Fig. 11
figure 11

Result plot of 3 traffic parameters of 9 intersections. ac Represents the time series plot of average traffic flow rate, density and velocity. df Represents the variation plot of average traffic flow rate, density and velocity. gi Represents the probability distribution plot of average traffic flow rate, density and velocity. jl Represents the relationship plot between average traffic velocity and density, average traffic velocity and flow rate, and average traffic density and flow rate

Fig. 12
figure 12

Monte Carlo simulation of three traffic parameters. a Represents the approximation of average traffic flow rate. b Represents the approximation of average traffic density. c Represents the approximation of average traffic velocity

From the results, it showed that route assignment can stabilize the networked traffic even when the congestion has been preassigned, all vehicles from intersection 1 have been assigned to go to the same destination at intersection 9. This scenario used the greedy route assignment with the completed graph of the road network to find the local optimal route choice. There are multiple route choices to change from start to destination, so traffic can be faster distributed and stabilize in the finite time. The variation plot showed the trend of three traffic parameters. Each intersection can maintain the average value close to the same level. Also, their distributions showed that AIM tends to have a unimodal.

Table 4 Average of traffic parameters in the intersection network compared to the Monte Carlo approximation

The Monte Carlo simulation with 100,000 random seeds is simulated to approximate the traffic parameters. Figure 12 shows the approximation of the average value of traffic parameters in the free-flow condition and the comparison results are shown in Table 4. The result showed that the difference between an average traffic velocity of each intersection is smaller than \(\pm \, 10\%\), \((-\,7.01, 4.14)\%\) and better than the Monte Carlo approximation \(+\,30.4\%\). There is \((-\,10, 18.75)\%\) difference from the average of network traffic density and \(+\,3.75\%\) less density than Monte Carlo approximation. Lastly, the average traffic flow rate has the difference of \((-\,5.05,11.06)\%\) from the network average and \(+\,24\%\) higher flow than Monte Carlo approximation.

Since we introduce the different cost on the travel direction, it induced the Braess’s paradox. The result showed that the majority of route choice is assigned to go straight and go right where it provides cheaper costs. Together with feedback consensus in contrast, traffic that does not reach the congested boundary will not received any assigned route. The intersection manager will compensate the average incoming velocity to release an excessive vehicles. After traffic reached the threshold, route assignment will distribute vehicles to other routes. Hence, AIM will reduce the impact of Braess’s paradox. Table 5 shows the result of route choices. It demonstrates a similar idea to the well known logistic company UPS where it recommends driver not using left turn and provided a study to claim that avoiding left turn could reduce the travel time [63, 64].

Table 5 Preferences of route choices

With using the completed graph, traffic at each intersection shows no significant difference at the steady state. All traffic parameters are converged to the consensus value where it provides the system equilibrium. Also, driver equilibrium in theory will be achieved when travel time of all drivers from start to destination is the same. However, some drivers in practice sacrifice to have a longer travel time in exchange of the optimal of an entire network traffic flow. Hence, there is a trade off between the system equilibrium and the driver equilibrium. The ideal scenario is to have both of system and driver equilibrium but in the real world environment, it is depended on how important of the problem we interested, traffic flow in the system over driver journey time or vice versa.

Heterogeneous traffic: multiple intended inputs single intended output

Next, Multiple intended Inputs and Single intended Output (MiISio) scenario is applied to the AIM system to induce the congestion. Figure 13 shows traffic input from two sources and output only one source scenario. The input traffic at the similar flow is injected on both node A and randomly generate traffic to the others. The output destination is assigned to the same node B. Therefore, the congestion is expected to occur at the left above corner of the network. With this scenario, it is more difficult to avoid the congestion since there are multiple inputs and only single output. Difference from the last scenario, the distance to destination is short. Then, route assignment will have limited choices and the recovery process from the congestion could be slow.

Fig. 13
figure 13

Simulation of traffic congestion based on using multiple input single output

The experiment is designed with four configurations to see the influence of route assignment and the degree of information access. First of all, the MiISiO scenario is divided into two groups that are composed of using feedback consensus alone and with route assignment. Later in both groups, we separate the configuration, based on the information access into other two groups between using completed graph and only using the nearest neighbored graph.

  1. 1.

    Feedback consensus + route assignment + completed graph

  2. 2.

    Feedback consensus + route assignment + nearest neighbored graph

  3. 3.

    Feedback consensus + completed graph

  4. 4.

    Feedback consensus + nearest neighbored graph

Figure 14a, c, e represented the plot of the average value of three traffic parameters of all intersections in time series to see traffic’s behaviour. The polynomial equation is used to fit the data set to see their trends in longer operating time. The plot showed that traffic congestion obviously happens at the top left corner in particular at the exit intersection since there are double traffics, stream toward the same destination. In addition, we plotted the traffic at the congestion zone separately to compare with the traffic of the rest. As shown in Fig. 14b, d, f, traffic parameters in four configurations have been compared together with the based line, where it is defined using the average free-flow traffic of the other intersections. The plot of average traffic velocity and density showed the distinguish between using and without using route assignment. With using route assignment groups 1, 2, the average traffic density at the congested zone is lower than the groups of without using route assignment. Also, the average traffic velocity gives the corresponding outcome. Vehicles could drive with the higher velocity at the congested zone in using route assignment groups.

Apart from using route assignment result, we investigate the effect of information access. The plot showed that using the completed graph, which all intersection managers have a full access of traffic information of each others, gives a slightly better result than using only nearest neighbored graph, which the traffic information is limited to share with the nearest intersection manager. On the other hand, two groups of without using route assignment show no improvement either using completed graph or the nearest neighbored graph.

Based on our assumptions, the congested zone we conducted is relatively short then the congestion happens fast. Therefore, we expected that using route assignment will help AIM recover the congestion faster than without using it and the result proved our expectation is correct. Another consideration is the difference between level of information access. We expected that limiting the access of information will reduce the performance of AIM system. The trend of traffic parameters showed that knowing global information has an advantage only in using route assignment groups and no significant difference in without using route assignment groups. It is because the convergent time of feedback consensus alone is slower than the congested rate we input to AIM. Thus, knowing global information gives no advantage. In contrast, it showed an improvement when it is using together with route assignment because the excessive vehicles have been distributed to other routes which it could recover traffic congestion rate faster and assist the feedback consensus to stabilize the system.

Fig. 14
figure 14

Result plot of three traffic parameters of nine intersections with four configurations. ac Represents the time series plot of average traffic flow rate, density and velocity. df Represents the comparison plot of traffic parameters in congested zone with the network

Fig. 15
figure 15

Result plot of three traffic parameters of nine intersections. ac Represents the variation plot of average traffic flow rate, density and velocity. df Represents the distribution plot of average traffic flow rate, density and velocity

Fig. 16
figure 16

Comparison plot of traffic parameters between each configurations. a The average traffic flow rate. b The average traffic density. c The average traffic velocity

Table 6 Traffic in congested zone compared to the free flow traffic and Monte Carlo approximation

The plot of variation and distribution of all traffic parameters in four configurations is shown in Fig. 15. The plots showed multi modalities where there are high variations of mean. An obvious difference in the average value of traffic parameters at the congested zone and in particular, a large variation at the destination as we can notice in the distribution plot. At the entire network perspective, feedback consensus-based AIM has been failed to balance the overall network traffic in this scenario since there is a heavy traffic at some parts of a network whilst the others have a free flow traffic.

We summarized the data by configurations and categorized them with two traffic zones where one has heterogeneous congested traffic and another has homogeneous free flow traffic. Figure 16 shows the comparison plots of three traffic parameters between groups, based line and Monte Carlo approximation. The summary has been represented in Table 6. Group 1 and 2 show a slightly higher of an average traffic velocity and lower of an average traffic density than in group 3 and 4. The average traffic flow rate in theory, should have a similar level if traffic still operating under the uncongested condition because the traffic flow must be conserved between input and output. In practice, however, there is some slight difference between them due to the traffic fluctuation during the measured period. Comparing with the based line, where is the average traffic of all other intersections excluded the congested zone, showed that the network traffic is not balanced. The average of traffic density in group 1, 2 (using route assignment) are around \(45\%\) higher and in group 3, 4 (without using route assignment) are around \(70\%\) higher. But the average traffic velocity is reduced approximately \(10\%\) and \(20\%\) in with and without using route assignment from the based line, respectively. Moreover, the average traffic in all groups is uncongested. Therefore, our proposed AIM system proves that it could manage the heterogeneous traffic especially at the critical traffic when road demand exceeds the road capacity. The results showed that traffic congestion is recovered faster with using AIM.

Conclusions

The concept of total autonomous system for managing traffic at the crossing intersection scenario has been implemented and experimented. To balance the network traffic, the author proposed in the previous work the discrete consensus algorithm with the Greenshield’s traffic model to use as the feedback for the distributed control of the multiple autonomous intersections. Furthermore, the author improved the AIM system to handle the heterogeneous traffic by adding the route assignment process to help the consensus-based AIM to distribute the excessive vehicles to other routes with the local optimal choice based on using greedy algorithm. The first experiment showed that with using route assignment and have sufficient candidate routes, traffic in the network can be balanced in the finite time. The second experiments, the author conducted in four configurations to evaluate the performance of AIM. The results showed that with using route assignment in both completed graph and the nearest neighbored graph provide a better performance in recovering the traffic from congestion faster than the group without using route assignment. In addition, the group of using global traffic information gives a slight advantage over using local information. Lastly, the comparison results with the approximation of the normal traffic from Monte Carlo simulation are presented. AIM showed a clear performance in managing the network traffic both in homogeneous and heterogeneous traffic. Our proposed method of using feedback consensus to coordinate traffic information with the route assignment for the AIM demonstrates a success result in balancing the network traffic and stabilizing the traffic from the congestion.

Discussions

In this work, our proposed coordination method with route assignment has been developed based on a single lane intersection model. The assumption is conducted such that vehicles on each road will follow their predecessor, so there is no traffic caused by lane changing. In the real world traffic environment, however, the main road could be composed of multiple lanes and vehicles could change between lanes to change route. Hence, the multiple lanes intersection should be modeled before combined with AIM system.