Keywords

1 Introduction

In today’s times, traffic management has become one of the core concerns for an urban city. The constant increase in the number of vehicles has led to the recurring problem of traffic management. An increase in the infrastructure growth is a possible solution but turns out to be costly in terms of both time and effort. Countries all over the world are looking forward to developing efficient traffic management systems by making use of ICT technologies. The recent advancements in Wireless Sensor Networks (WSN) and low-cost low power consuming sensors have strengthened the regime towards creating an intelligent traffic management system [2]. Governments are trying to capitalize the power of present-day computing, networking and communication technologies for building systems that are able to improve the efficiency of current roads and traffic conditions. The advent of the Internet of Things and high availability of Cloud resources are helping us create mechanisms that can automate the transportation systems and enhance utilization of existing infrastructures [4].

The tiny sensors which we have today have their applicability across various fields such as health, surveillance, home automation and industrial practices. A network of such sensors is able to map an entire city and collect minutest of the details with minimum time and cost overhead. With IPv6 becoming more and more popular it becomes easy to allocate a sensor node with an IP address for its tracking and localization purposes [12]. Traffic systems can make use of such sensor nodes for gathering real-time information regarding traffic conditions like traffic flow, traffic congestion, etc. These sensors are also capable of vehicle classification, speed calculation and vehicle count [5]. The data being collected from these sensor nodes is diverse in nature and humongous in size. We are fortunate to live in times where we have efficient data analytics through machine learning algorithms for extracting information or say knowledge from these huge chunks of data. Machine learning algorithms are capable of making predictions regarding the levels of traffic congestion in a particular area of a city. They can very well depict patterns with respect to traffic flow and suggest measures that authorities can take to curb traffic-related problems. A traffic management system can only be successful when all of its actors work and communicate in sync with another. Talking about our work, we present an Intelligent Traffic Management System that caters to all traffic related issues of a smart city. Our model suggests an optimum route which it takes into consideration parameters like, travel time, travel cost (fuel consumption) and travel distance. Our system in use of machine learning algorithms predicts levels of traffic congestion at various time intervals. It also comes up with the concept of a green corridor catering to emergency vehicles.

The rest of the paper is categorized as follows: Sect. 2 elucidates the algorithm that depicts the workflow of the entire system, whereas its complete layered architecture and mathematical model are discussed in Sect. 3. Finally, Sect. 4 exhibits the implementation and simulation of our proposed system.

2 Algorithm

The working of our Intelligent Traffic Management System could be explained through the illustration of the algorithm that forms the core for it. The algorithm depicts the workflow of the system by representing the relationship between various actors and the information that they share in form of parameters among themselves.

figure a

3 Proposed Work

In this section, we discuss our proposed Intelligent Traffic Management System and all the various actors that constitute it. We present a layered architecture that depicts the functionalities of our traffic management system and showcases all the different entities which it comprises. The core of our proposed system is based upon presenting an optimum route followed by traffic estimation.

3.1 Design Objectives

In this subsection, we elucidate some of the prominent objectives which we intend to achieve through our proposed work. These objectives can also be considered as driving forces for designing our proposed intelligent traffic management system.

  • Traffic Monitoring: It can be considered as one of the key components of a smart city. Traffic monitoring allows the local authorities to monitor the flow of traffic pertaining to a particular area, route or street. It helps in keeping track of the inflow of traffic from other neighboring cities during specific days or a particular time of the year. Historical data of traffic monitoring can be very useful in smart city planning and city infrastructure development.

  • Pollution Avoidance: Rising pollution levels pose a threat to the environment as along with having adverse impacts on human health and wellbeing. The extent of air and noise pollution are directly proportionally to the intensity of traffic congestion in a city. Long-standing queues of vehicles result in the exorbitant emission of pollutants resulting in an increase in temperatures, a decrease in rainfall, respiratory problems, etc.

  • Route Optimization: In recent times, it has been observed that the shortest route doesn’t seem to work well in terms of total travel time, fuel consumption and average waiting time. In such scenarios, an optimum route is the best option for travel as it considers factors such as traffic congestion, distance traveled, total travel time and fuel consumption. An optimum route comprises of a tradeoff between all these parameters and sits well for a traveler in context to its time and money being spent on travel.

  • Green Corridor: It’s been a couple of years since the concept of a green corridor has seen the light of the day. It is a corridor which in reality is a route from a source to the destination comprising of various traffic signals all of which having a green signal. The green corridor is used to cater to the emergency vehicles by allowing them to reach their desired destination without any waiting time and at maximum speed.

  • Accident Detection: The overcrowded streets of present-day roads have given rise to the number of accidents. Accident detection is a crucial part of a traffic management system as it not only informs the medical services to attend to the accident hit personnel’s but also has an impact on the traffic flow and congestion levels of a particular region.

  • Jamming: Prevention of traffic jams and reduction in average waiting time are the two most important functionalities of an efficient traffic management system.

  • Vehicle Tracking: It helps the local administration in keeping track of vehicles in terms of the areas they are traveling, time of travel, speed, places visited and vehicle type. All of these parameters prove to be fruitful when it comes to maintaining a state of law and order in the city.

3.2 Layered Architecture

In this subsection we would be discussing the layered architecture of our proposed intelligent traffic management system. We would also be talking about the various actors along with their functionalities that constitute the system. Following is the diagram that depicts the layered architecture for our proposed system (Fig. 1).

Fig. 1.
figure 1

Intelligent traffic management system architecture

  • Traffic Management Controller (TMC): The purpose of the controller is to manage and govern the entire system [16]. It is the controller which orchestrates the functionalities of other application modules and entities within the system. The controller resides at the Cloud end and has detailed information regarding every vehicle, traffic signal, gateway, On Road Sensors and Traffic Management Unit. All of this information is stored and processed by the controller in order to generate optimized routes between the specified source and destination. The controller establishes a one to one connection with the middleware and circulates all of its orders through it. It is the controller which generates prediction data concerning with levels of traffic congestion at varying time intervals. The TMC is the one which uses a hop counter based flooding algorithm for broadcasting notifications regarding an accident, change of routes, road developmental activities and adverse climatic impact. The occurrence of an emergency vehicle and creating a green corridor for it is all done through the traffic management controller.

  • Gateways: All the information that has been sensed and collected by the on-road sensors are transmitted to the gateways [6]. Gateways act as a common point of contact wherein diverse kinds of information coming from heterogeneous types of sensors gets collected. The gateways use greedy based data collection algorithm for collecting data from various data sources. It is the gateway which is responsible for the global addressing of Vehicle Nodes (V) by making use of IPv4 addresses [9]. Each gateway is allotted a coverage area, wherein each on-road sensor and vehicle node has been given an IP address thus facilitating efficient identification of objects within that area. Every gateway is allocated more than one area so as to enhance the granularity of vehicle identification. The gateway also keeps track of its neighboring gateways along with the total number of vehicle nodes traveling in its area. Finally, the gateway transmits all forms of unstructured information to its subsequent traffic management controller.

  • Traffic Monitoring Unit (TMU): It acts as an intermediary node between On Road Sensors and Gateways. The purpose of adding a TMU is to enhance the response time of the system as communicating directly with the TMC could lead to increased latency cost. TMU provides a communication link between TMC and the rest of the system and also offers local processing and storage capabilities in order to boost the efficiency of the system [8]. Any information coming from an on-road sensor or vehicle node is addressed by the TMU which then subsequently informs the Controller and other devices on the network. All the instruction given by the Controller are communicated through the TMU to the respective vehicle nodes and local authorities. The traffic monitoring unit can also be considered as a Fog computing element as it resides at the edge of the network making its access both easy and efficient. It is the TMU which at regular intervals updates the traffic management controller about information regarding every entity involved in the system.

  • On Road Sensors (ORS): Sensors are the eyes and ears of the system as they detect the occurrence of events, surrounding conditions and transmit the collected information. The work of the on-road sensors is to monitor and perceive events or phenomena that take place on road. Every ORS can be categorized on the basis of three parameters namely, sensor type, methodology, and sensing parameters. Sensor type defines which type of sensor it is i.e. whether it is a homogeneous or a heterogeneous sensor or it is a single dimensional or a multidimensional sensor. Methodology talks about the ways in which a sensor gathers information [16]. It can be either active or passive in nature. Sensing parameters are the number of parameters which a sensor can sense. A sensor might just sense one parameter like body temperature or many parameters like in the case of an ECG. Each sensor node is provided an IP address which helps in its unique identification. Every sensor node communicates all of its sensor data to its subsequent gateway. Entities starting with the letter “S” represent the On Road Sensors in the physical topology. In case of our work, we have used inductive loop sensor technology. The following are the functionalities that an On-Road Sensor provides.

    • Vehicle Count

    • Vehicle Presence

    • Vehicle Speed

    • Vehicle Classification

    • Low Bandwidth Consumption

  • Vehicle Node: It is the vehicle for whom an entire transportation system is constructed in order to provide an effortless and convenient traveling experience. It can also be seen as a moving sensory node which continues to receive and transmit information while traveling. Each vehicle node is provided an IP address which helps in its unique identification. Every sensor node communicates all of its sensor data to its subsequent gateway. Entities starting with the letter “V” represent the Vehicle Node in the physical topology. Every transportation vehicle has an LED display installed that informs the pilot about the most optimum route and the constantly changing levels of traffic. All messages or notifications such as accident alert or prevention of entry in a particular area from the TMC can be seen on the LED display.

3.3 Mathematical Model

In this subsection we would be discussing the mathematical model for our proposed system. Following is the nomenclature table that describes all the various entities that have been used in this mathematical model (Table 1).

Table 1. Nomelclature table
$$ {\text{V}} = \left\{ {\Psi ,\updelta,{\text{E}}} \right\} $$
(1)

\( \Psi \in (0,1) \): Vehicle type i.e. 0 for light vehicle and 1 for heavy vehicles

\( \updelta \in (0,1) \): Vehicle state i.e. 0 for stationary and 1 for moving

\( {\text{E}} \in (0,1) \): Vehicle priority i.e. 0 for normal vehicles and 1 for emergency vehicles

$$ {\text{H}} = {\text{T}}/{\text{N}} $$
(2)
$$ \Phi = \sum ({\text{D}}/{\text{t}}) - (\sum {\text{D}})/{\text{T}} $$
(3)
$$ {\text{Total}}\,{\text{Distance}} = \sum {\text{D}} $$
(4)

\( {\ss}\propto 1/\Phi \)

\( {\ss} = {\rm K}/\Phi \)

$$ \Phi = ({\text{K}}/{\text{D}})\,{\text{X}}\,{\text{t}} $$
(5)
$$ {\text{t}} = (\Phi \,{\text{X}}\,{\text{D)}}/{\text{K}} $$
(6)
$$ \uptau = \sum {\text{t}} + {\text{T}} $$
(7)
$$ \upalpha = \left( {{\text{mileage}}\,{\text{X}}\,({\text{t}})2\,{\text{X}}\, ( {\text{speed)}}2} \right)/{\text{Total}}\,{\text{Distance}} $$
(8)

\( \left. {\begin{array}{*{20}l} {\upalpha \propto {\text{speed}}} \hfill \\ {\upalpha \propto {\text{time}}} \hfill \\ \end{array} } \right\}{\text{Vehicle}}\,{\text{Speed}} >\uptheta \)

\( \left. {\begin{array}{*{20}l} {\upalpha \propto 1/{\text{speed}}} \hfill \\ {\upalpha \propto {\text{time}}} \hfill \\ \end{array} } \right\}{\text{Vehicle}}\,{\text{Speed}}\, <=\uptheta \)

$$ {\text{F}} \leftarrow \left( {\upalpha,{\text{t}},{\text{D}}} \right) $$
(9)

RC > threshold value

$$ {\text{W}} \to {\text{V}}\{ {\text{speed}} = 0\} $$
(10)
$$ \Psi = 1 $$

In case the road capacity exceeds the threshold value, the traffic management controller will prevent entry of all heavy vehicles into that zone. Any such vehicle in the affected zone will be directed to stop until further directions from the central controller.

X = 3: Traffic light goes green 10 s prior to arrival of emergency vehicle at the intersection

\( {\text{V}}\left( {\text{E}} \right) = 1 \)

$$ \upomega = \left( {\left( {{\text{D}}/{\text{Speed}} - {\text{T}}} \right){\text{X}}\,100} \right)/\left( {{\text{D}}/{\text{Speed}}} \right) $$
(11)

4 Implementation and Simulation

The above mentioned algorithm is implemented on iFogSim framework. In iFogSim [17] there are various predefined classes that provide a simulation environment for Internet of Things combined with the benefits of cloud computing. It is a java based simulation toolkit and can be implemented either using Eclipse or NetBeans IDE. In our case we would be using the eclipse IDE. To run iFogSim on eclipse, we first need to download the eclipse IDE and install it. After successful installation of eclipse IDE, download the latest iFogSim package, extract it and import it in eclipse. Talking of our proposed work we have created our own classes in iFogSim and have portrayed our algorithm in form of java code.

In terms of implementing machine learning algorithms, we have made use of Weka [15], which is a popular open source tool for executing machine learning algorithms.

The following tables depict the simulation environment for our paper along with the improvements that can be seen after successful implementation of our model (Tables 2, 3 and 4).

Table 2. Vechile count per road
Table 3. Average waiting time per road
Table 4. Improved average waiting time per road

It is very much evident that the average waiting time has reduced for each road over all time intervals. Although, the degree of reduction in average waiting time varies from road to road but the predominant trend over the entire data set remains the same i.e. a decrease in the average waiting time.

As earlier as discussed in Sect. 2, our traffic estimation is based upon the Random Forest algorithm and below is a graph illustrating the correctness of our feature selection along with the algorithm that we have chosen. The graph depicts the comparison between the actual and estimated values of traffic in terms of vehicle count. As inferred from the graph below, the estimated traffic count may not be the same as that in actual but in a larger prospective the increase and decrease in the levels of traffic over all time intervals turnout to be the same for both estimated and actual values. Figure 2, 3 and 4 represents findings at different roads.

Fig. 2.
figure 2

Traffic estimation

Fig. 3.
figure 3

Accident detection

Fig. 4.
figure 4

Accident detection

Till now we have discussed how our proposed intelligent traffic management system turns out to be beneficial in terms of reducing the average waiting time for a given road along with making correct predictions with respect to varying levels of traffic. The following graphs present an analysis of our accident detection mechanism and presents a comparison between the estimates and actual number of accidents occurred for a particular road at different time intervals.

As per the above two figures, the estimated number of accidents always turn out to be greater than the actual number of accidents. This implies, that our system was able to detect real accidents but it also categorized other scenarios having similar characteristics as that of an accident as an accident itself. Thus resulting in an increase in the number of accidents as compared to the ones that actually happened.

5 Conclusion

Traffic Management System is one of the many domains of a Smart City wherein significant research can be seen. It is an area of work which has answers to many current day problems pertaining to traffic management of smart cities. We propose a novel Intelligent Traffic Management System for Smart Cities which facilitates Wireless Sensor Networks, Internet of Things, Cloud Computing and Data analytics. The work discusses the ways in an optimum route is suggested to the end user. The optimum route turns out to be beneficial than the shortest route in most cases in terms of fuel cost and total travel time. Through our research, we were successful in generating an optimum route along with making predictions regarding traffic congestion levels. The system also talks about events of accidents and how they may have an impact on the traffic flow of a region. Levels of precipitation, an occurrence of an accident, concept of a green corridor, the rate of fuel consumption, % flow of traffic and use of machine learning algorithms are some of the novel features of our work. In future, we intend to introduce the vehicle to vehicle communication and impact of speed breakers on traffic flow and congestion.