# Intelligent Traffic Management System Based on the Internet of Vehicles (IoV)

Authors: Samir A. Elsagheer Mohamed; Khaled A. AlShalfan
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

The present era is marked by rapid improvement and advances in technology. One of the most essential areas that demand improvement is the traffic signal, as it constitutes the core of the traffic system. This demand becomes stringent with the development of Smart Cities. Unfortunately, road traffic is currently controlled by very old traffic signals (tri-color signals) regardless of the relentless effort devoted to developing and improving the traffic flow. These traditional traffic signals have many problems including inefficient time management in road intersections; they are not immune to some environmental conditions, like rain; and they have no means of giving priority to emergency vehicles. New technologies like Vehicular Ad-hoc Networks (VANET) and Internet of Vehicles (IoV) enable vehicles to communicate with those nearby and with a dedicated infrastructure wirelessly. In this paper, we propose a new traffic management system based on the existing VANET and IoV that is suitable for future traffic systems and Smart Cities. In this paper, we present the architecture of our proposed Intelligent Traffic Management System (ITMS) and Smart Traffic Signal (STS) controller. We present local traffic management of an intersection based on the demands of future Smart Cities for fairness, reducing commute time, providing reasonable traffic flow, reducing traffic congestion, and giving priority to emergency vehicles. Simulation results showed that the proposed system outperforms the traditional management system and could be a candidate for the traffic management system in future Smart Cities. Our proposed adaptive algorithm not only significantly reduces the average waiting time (delay) but also increases the number of serviced vehicles. Besides, we present the implemented hardware prototype for STS.


---

## Body

## 1. Introduction

In many countries, including several developed countries, regardless of the extensive efforts devoted to develop and improve traffic flow, traditional traffic signals still have the following well-known problems:(a)
They provide inefficient time management on road intersections. This forces vehicle commuters to wait unnecessarily, which in turn causes traffic jams, pollution, extra delays, etc.(b)
Intelligence cannot be obtained and they are not adaptive. Currently, at intersections, each road is assigned a constant fraction of time to be green regardless of the number of vehicles or flow density. This generates inefficient traffic flow by not distributing time according to traffic congestion. In some periods during the day, some roads may be more crowded than others, requiring more time to reduce congestion. However, the traditional traffic signal cannot provide this feature.(c)
There is a need for a signal that directly closes once there are no more vehicles on the road in an intersection and opens the next road to avoid unnecessary waiting until the constant timer expires as explained in pointa and point b.(d)
They are not immune to some environmental conditions, like rain, fog, and the like. Thus, they may not work correctly in these conditions or be visible. This causes accidents and fatalities.(e)
They have no method of giving priority to emergency vehicles (Ambulances, Firemen, Police, etc.). Such vehicles require intelligent traffic signals to open the road for them even before arriving at the intersection.(f)
There are many other drawbacks of the traditional traffic management systems due to the inability of the traditional traffic signals to help provide dynamic and adaptive services.Based on the previously mentioned drawbacks of the traditional traffic management system, it is clear that there is a great need to improve its functionality by providing some form of intelligence to enable dynamism and adaptivity. This, in turn, can help in reducing traffic jams and road congestion, thus minimizing the travel time and reducing pollution. The traditional traffic management system was designed several decades ago. The number of vehicles was very small at that time and the traditional system was sufficient to efficiently manage the traffic with the available technology at that time. It is clear that with the massive increase in the number of vehicles and the inability to increase the sizes and the number of roads in many cities, there is a need for smarter solutions that use recent and most sophisticated technologies to adopt a smart traffic management system.Thus, there is a great and urgent need to replace the traditional traffic signal system with a new system: An Intelligent Traffic Management System (ITMS). This ITMS system will provide many services that cannot be provided by the traditional system and it will solve the previously mentioned problems.Internet of Vehicles (IoV) [1–4] or connected vehicles is a recent research venue that allows the development of many promising applications in Smart Cities [5–7] based on the Intelligent Transportation Systems (ITS). IoV [8] will be deployed widely in Smart Cities. Thus, instead of deploying dedicated infrastructure and very complex and expensive legacy systems to control and manage traffic, why not use the essential building block of future Smart Cities without any extra complexity and provide a better performance, hence solving most of the problems in the old system.There are many efforts in the literature seeking intelligent traffic control. Most of the existing approaches rely solely on counting the vehicles on each road segment at the intersection. These approaches are named sensor-based technologies that include inductive loops, magnetometer, microwave radar, laser radar, ultrasonic, acoustics, video cameras [9], and counting cables [10]. In-depth studies of these sensor-based approaches are given in [11, 12]. Table 1 summarizes the features of each of these approaches. However, these techniques cannot be deployed largely because of the complexity and the very high manufacturing cost. In addition, they are not scalable or reliable. Damage of the counting cable and even the video cameras can limit the reliability of the whole system.Table 1
Strengths and weaknesses of commercially available sensor technologies [11].
TechnologyStrengthsWeaknessesInductive loopFlexible, well understood, provides basic traffic parameters, immune against weather condition, accurate.Complex, very expensive, requires pavement cut, expensive maintenance, cannot detect vehicle classes.Magnetometer (two-axis fluxgate magnetometer)Supports wireless communication, immune against weather conditions, better than the inductive loop for overloads of trafficSame as the inductive loop. In addition, require multiple units for full lane detection.Magnetic (induction or search coil magnetometer)Suitable for bridge decks, no pavement cuts for installation, better than the inductive loops to stresses of traffic.Cannot detect stopped vehicles.Microwave radarImmune against weather conditions, speed measurement, lane coverage.Cannot detect stopped vehicles.Active infrared (laser radar)Measurement of location, speed, and vehicle class Multiple lane operation.Not working well in bad weather conditions. Installation and maintenance very expensive.Passive infraredSpeed measurement.Not working in bad weather conditions.UltrasonicMultiple lane operation, height detection.Not working well in bad weather conditions. Installation and maintenance very expensive.Video image processorMultiple lanes, zones. Wide-area detection.Installation and maintenance costs and efforts. Not working well in bad weather conditions. Very expensive.In this paper, we propose the use of the existing IoV and VANET infrastructure to provide an efficient and intelligent traffic management system. We provide the details of the proposed architecture that reuses the same building blocks of IoV and VANET without incurring any further complexity of extra components or hardware or any special deployment. We propose the Smart Traffic Signal architecture and its operation. Furthermore, we present an adaptive algorithm to provide efficient and near-to-the-optimal traffic management of local intersections supporting any number of phases that is fully parameterized. Moreover, we present a simulator that we have developed for simulating and studying the effectiveness of the proposed algorithm compared to the fixed-time algorithm under different traffic conditions and in different scenarios. One essential feature of the proposed architecture is that it supports any adaptive algorithm without having to change the architecture.Tables2 and 3 show the most used abbreviations in this paper.Table 2
Abbreviations used in the paper.
ITMSAn intelligent traffic management systemSTSSmart traffic signalIoVInternet of vehicles (IoV)ITSIntelligent transportation systemsVANETVehicular ad-hoc NETworksOBUOnboard unitGNSSGlobal navigation satellite systemPPPPrecise point positioningRSURoadside unitRTKReal-time kinematicATMAAdaptive traffic management algorithmV2VVehicle-to-vehicle communicationV2IVehicle-to-infrastructure communicationTable 3
Notations—parameter and symbol definitions that are used in the algorithms and the figures.
SymbolDescriptionℛThe number of roads at the intersection (default: 4)ℒrThe number of lanes on the roadr.TgminMinimum time to open a road (default: 3 sec)TgmaxMaximum time to open a road, to prevent the starvation of roads having few vehiclesTrmaxMaximum time for a red signal. This is very important to avoid starvationTyTransition time to change the open road state from open to closed. Equivalent to the yellow light signalTturnoverTotal estimated time to service one round of all the roadstrrTime at which the roadr became redtgTime since green light is onrgThe currently open road (similar to the green light)gtA timer for the open road (green timer)τCurrent timedrRoad heading directionSℒrThe intersection stop line for the roadrdirDistance from the current location of vehiclei on the road r to the intersection stop line SℒrDmaxMaximum distance from the intersection stop lineSℒr on any road to consider any vehicle in the vehicle count. Typically, this value is set to 400 metersVrNumber of vehicles queued on the roadr within a distance Dmax from the intersectionIn the proposed system, there will be no need for color lights. Vehicles will be able to communicate with the Intelligent Signals wirelessly to achieve their services and provide the following features: the ideal traffic flow as the opening (green light) for any road will be based on a dynamic priority; the opening time will be based on the number of waiting vehicles. This can optimize the waiting time (reduce the delay), reduce traffic congestion, give priority to crowded roads, and eliminate useless openings, thus facilitating adequate traffic flow. This in turn can reduce the total travel time and hence reduce pollution and fuel consumption. The ITMS can also provide priority access to emergency, police, and firefighter vehicles to seamlessly navigate the roads and arrive at open intersections.The rest of this paper is organized as follows. Related works are presented in Section2. Technologies that are essential for developing the proposed Intelligent Traffic Management System (IMTS) are highlighted in Section 3. This includes VANET, IoV, and Positioning Systems. Furthermore, Section 4 provides the details of the proposed IMTS architecture, the Smart Traffic Signal (STS), and the operation of the IMTS. In Section 4.1, we provide the proposed adaptive algorithm for traffic management and signal control to reduce the average waiting time and increase the number of serviced vehicles. In Section 5, we present our developed simulator and the obtained results. Finally, Section 6, provides the general conclusion and the future research direction.


## 2. Related Works

The problem of road traffic management has been an active research topic for several decades. Several attempts to propose an intelligent traffic control system are found in the literature. For example, in [13], the design of the Intelligent Traffic Light Controller Using Embedded System is proposed. Again, they use the traditional means to count the number of vehicles. In [14], the development of an intelligent traffic light for reducing traffic accidents is proposed. In [15], an intelligent traffic light control method based on the extension theory for crossroads is presented. An Agent Approach for Intelligent Traffic-Light Control is presented in [11].The most common method is to install a tricolor signal at each road intersection to manage the access to the critical section (the intersection). Several variants of priority and critical section access are deployed. One of the variants is the round ribbon, which allocates a constant time for the open road (turning on the green light), then a fixed time for the transition period by turning on the yellow light, and then closing the road by turning on the red light, and repeating the process for the next road, etc. This is the least effective approach for managing traffic; however, it is the most common system worldwide except in several developed countries.An algorithm to manage the operation of a single traditional traffic light signal for an intersection having four-way roads is presented in [16], suggesting adjusting the traffic according to the traffic condition. Although the proposed algorithm is claimed to be adaptive, it considers fixed periods of the days similar to the study presented in [17]. Similarly, a calendar-based history information approach is proposed in [18].Another study using multi-agent communication based on edge computing architecture and IoT for traffic light control is presented in [19]. The authors propose a multi-agent reinforcement learning (MARL) system for global traffic signal management. Similar studies based on MARL are presented in [20, 21]. Other agent-based approaches are given in [11, 12]. Another study using reinforcement learning is given in [6] to maximize the number of vehicles crossing the intersections using Q-learning. Similarly, deep reinforcement learning is proposed in [22]. Ant colony optimization approach is proposed in [23] and the artificial bee colony optimization approach is proposed in [24]. Social IoV [25] proposed for managing traffic is presented in [26].Several studies are based on the congestion level of the roads. For example, in [27], an adaptive algorithm is presented and evaluated. In this study, the aim is to use V2V so that each vehicle can estimate the congestion level of the traffic and can reroute to the least congested route. Another study based on V2V communication is proposed in [28]. A framework for traffic optimization based on vehicle rerouting to reduce traffic congestion is given in [29]. In another study in [30], a system based on V2I communications is proposed. In addition, this study considers securing incident detection and dissemination from different types of attacks. Different experiments for traffic signal control based on the Floating Car Data (FCD) are given in [31]. FCD was used also in [32] for management techniques of vehicle tracking data.Modular Timed Synchronized Petri Net model is proposed in [33] for traffic signal management to reduce environmental impact. Pareto max flow algorithm is presented in [34] and Cellular Genetic Algorithm is proposed in [35].There are several research works on using cameras to count the number of vehicles for traffic management and optimization. A recent study using the Internet of smart-cameras is presented in [36]. The solution is based on WSN and VANET by deploying a very large number of cameras connected in a dedicated infrastructure. The video stream of the cameras is sent to centralized servers to process them and extract useful traffic information that can be used to control the traffic signals. Other studies based on WSN are provided in [37, 38]. Several approaches based on IoT are proposed such as in [5, 39]. The authors in [40] propose the use of expert systems and AI to process the images extracted from cameras for traffic management. Pheromone-based Multi-Agent System based on the use of cameras and sensors is proposed in [21].An interesting study selecting the best charging station for electric vehicles according to the traffic condition to minimize commuting time is presented in [41]. A parallel algorithm to synchronize intersections in large and dense zones suggesting improving the average speed-based Bus Rapid Transit is proposed in [42]. A similar study based on a hybrid heuristic approach is presented in [43]. Finally, in [44], the authors suggest the use of the speed of vehicles at the intersection as an optimization parameter for traffic light control.In this paper, unlike the previously mentioned studies, we provide a complete architecture of a smart traffic management system and a smart traffic signal controller based on IoV technology that can be deployed effectively. Although other studies already suggested the use of V2I communication as the basis of the traffic management system, in this paper, we provide a complete study and performance analysis for different traffic conditions. As stated before, this study does not require any extra hardware like counting cables, computer vision, and camera systems [21, 36]. There is no need for expensive and complex systems to extract useful features such as computer vision or deep learning approaches [5, 39, 40] or parallel processing [42].


## 3. Technologies to Implement ITMS

This Section presents the Vehicular Networks, which are the base communication technology for the system. Then, an overview of the positioning system is provided.


### 3.1. Vehicular Networks

The direct communication between vehicles using an Ad Hoc network is referred to as inter-vehicle communication (IVC) or Vehicular Ad-hoc NETworks (VANETs) [45–48]. VANET has two communication types. Vehicle-to-Vehicle (V2V) communication allows vehicles to exchange messages among them on the road. Vehicles can communicate with an infrastructure deployed alongside the roads using Vehicle-to-Infrastructure (V2I) communication. Each vehicle has its Onboard Unit (OBU) that is similar to the vehicle computer with extra features allowing the services and layers of VANET. The infrastructure is a network of Roadside Units (RSU) that is installed on the roadside. Figure 1 depicts the topical architecture of VANET.Figure 1
Vehicular Ad-hoc Network (VANET) architecture [46].The next generation of VANET is referred to as the Internet of Vehicles (IoV) [8, 49–51] that extends the functionality of VANET and inherits several features of the Internet of Things (IoT). In Addition to V2V and V2I communication services, IoV includes several others. As shown in Figure 2, IoV involves V2P (Vehicle-to-Pedestrian, allowing the communication with vulnerable road users), V2S (Vehicle-to-Sensor, on the inside of the vehicle), V2H (Vehicle-to-Home, of the owner of the vehicle), V2B (Vehicle-to-Building, the surrounding buildings in the smart city), V2G (Vehicle-to-Grid, for electric charging), V2D (Vehicle-to-Device, for all the onboard devices), and V2R (Vehicle-to-Road signs). IoV and VANET are the main enablers of the future Intelligent Transportation Systems (ITS) [52] as shown in Figure 3.Figure 2
Internet of Vehicles architecture for the smart cities [7].Figure 3
Intelligent transportation systems (ITS) [49].The wireless communication is subject to the IEEE 802.11p standard that defines enhancements to IEEE 802.11 standards required to support Intelligent Transportation Systems (ITS) applications. The IEEE 802.11p controls data exchange between high-speed vehicles and between vehicles and the roadside infrastructure (RSUs) in the licensed ITS band of 5.9 GHz (5.85–5.925 GHz) [53].VANETs/IoVs allow the development and creation of many new services. Safety-related services include crash or collision avoidance, emergency warning system, lane-changing assistant, intersection coordination, traffic sign/signal violation warning, road-condition warning, and traffic violation detection [54]. Other services may include toll collection, commerce transactions via vehicles, traffic information systems, navigation, automatic driving, weather information, gas station or restaurant locations, and interactive communications such as Internet access, music download, exchanging messages between drivers or passengers, and multimedia entertainment. For more details, please refer to [55].


### 3.2. Positioning System

IoV/VANET technology is still in the research phase, where there are some challenges to be undertaken before its actual deployment in the Smart Cities. The most critical one is the positioning system (aka localization system) for the vehicles. In other words, this system answers the question “how to provide each vehicle with its real-time location?” There exist several positioning techniques that are suitable for different application categories [56–61]. Each application or service provided by IoV/VANET has its own requirements of the positioning system. Some applications may tolerate some error levels in the positioning information. Other applications require a very accurate and reliable positioning system. An example of the first category is traffic management applications. Most of the safety applications, on the other hand, require the second category. Some examples are collision avoidance, automatic driving, and lane tracking. The accuracy of the positioning system must be within the centimeter. In addition, its availability must be guaranteed. If it fails for some time, catastrophic circumstances may occur such as collisions.The most common and widely used Positioning System is the Global Navigation Satellite System (GNSS) [62–64], a satellite navigation system with global coverage. There are several GNSS systems, namely, Global Navigation Satellite System (GLONASS) [65, 66], Global Positioning System (GPS) [67–69], BeiDou Navigation Satellite System (BDS) [70], Galileo [71], Quasi-Zenith Satellite System (QZSS) [72, 73], and others. GNSS positioning systems have several drawbacks. The most unacceptable disadvantage would be the inaccuracy of the resulting measurements. For example, GPS devices can produce an error of up to 10 meters. This accuracy may seem to be acceptable for several applications. On the other side, as mentioned before, other applications like collision avoidance, automatic driving, and lane tracking demand precise and accurate positioning information.Although there are several ways to improve the accuracy of the GNSS systems, such as using a ground base station that acts as a correcting base station (examples Differential GPS and RTK), GNSS still suffers from weak signals and thus do not work efficiently in tunnels, underground, and in highly dense areas with buildings. One way to overcome the accuracy problem and to provide centimeter-location service is by combining two or three frequencies broadcasted by each GNSS constellation as used in [74]. Furthermore, PPP (Precise Point Positioning), refer to Figure 4, is another technology that aims to provide a very accurate positioning service based on GNSS by providing worldwide networks for error corrections in real-time. Corrections are transmitted to the vehicle using RSU (Roadside unit) in VANET/IoV or directly from the Internet. Lastly, RTK (Real-Time Kinematic), as shown in Figure 5, sends error corrections from reference receivers in the city. The range of the coverage of the receiver can reach up to 40 Km. On the other hand, nanotechnology is a field of science that is concerned with controlling matter on a scale between 1nm and 100 nm. It provides solutions for sensing, actuation, radio, embedding intelligence into the environment, power-efficient computing memory, energy sources, human-machine interaction, materials, mechanics, manufacturing, and environmental issues. A proposal for using Nanotechnology as a positioning system for VANET is given in [59, 76]. There are other positioning systems that are used in IoV and VANET such as the Received Signal Strength [58, 60, 77–79], and UAV [80].Figure 4
PPP (precise point positioning) technique to improve the accuracy of GNSS positioning using the Internet [75].Figure 5
RTK (real-time kinematic) technology to provide centimeter-accurate location using a correcting ground station [75].


## 3.1. Vehicular Networks

The direct communication between vehicles using an Ad Hoc network is referred to as inter-vehicle communication (IVC) or Vehicular Ad-hoc NETworks (VANETs) [45–48]. VANET has two communication types. Vehicle-to-Vehicle (V2V) communication allows vehicles to exchange messages among them on the road. Vehicles can communicate with an infrastructure deployed alongside the roads using Vehicle-to-Infrastructure (V2I) communication. Each vehicle has its Onboard Unit (OBU) that is similar to the vehicle computer with extra features allowing the services and layers of VANET. The infrastructure is a network of Roadside Units (RSU) that is installed on the roadside. Figure 1 depicts the topical architecture of VANET.Figure 1
Vehicular Ad-hoc Network (VANET) architecture [46].The next generation of VANET is referred to as the Internet of Vehicles (IoV) [8, 49–51] that extends the functionality of VANET and inherits several features of the Internet of Things (IoT). In Addition to V2V and V2I communication services, IoV includes several others. As shown in Figure 2, IoV involves V2P (Vehicle-to-Pedestrian, allowing the communication with vulnerable road users), V2S (Vehicle-to-Sensor, on the inside of the vehicle), V2H (Vehicle-to-Home, of the owner of the vehicle), V2B (Vehicle-to-Building, the surrounding buildings in the smart city), V2G (Vehicle-to-Grid, for electric charging), V2D (Vehicle-to-Device, for all the onboard devices), and V2R (Vehicle-to-Road signs). IoV and VANET are the main enablers of the future Intelligent Transportation Systems (ITS) [52] as shown in Figure 3.Figure 2
Internet of Vehicles architecture for the smart cities [7].Figure 3
Intelligent transportation systems (ITS) [49].The wireless communication is subject to the IEEE 802.11p standard that defines enhancements to IEEE 802.11 standards required to support Intelligent Transportation Systems (ITS) applications. The IEEE 802.11p controls data exchange between high-speed vehicles and between vehicles and the roadside infrastructure (RSUs) in the licensed ITS band of 5.9 GHz (5.85–5.925 GHz) [53].VANETs/IoVs allow the development and creation of many new services. Safety-related services include crash or collision avoidance, emergency warning system, lane-changing assistant, intersection coordination, traffic sign/signal violation warning, road-condition warning, and traffic violation detection [54]. Other services may include toll collection, commerce transactions via vehicles, traffic information systems, navigation, automatic driving, weather information, gas station or restaurant locations, and interactive communications such as Internet access, music download, exchanging messages between drivers or passengers, and multimedia entertainment. For more details, please refer to [55].


## 3.2. Positioning System

IoV/VANET technology is still in the research phase, where there are some challenges to be undertaken before its actual deployment in the Smart Cities. The most critical one is the positioning system (aka localization system) for the vehicles. In other words, this system answers the question “how to provide each vehicle with its real-time location?” There exist several positioning techniques that are suitable for different application categories [56–61]. Each application or service provided by IoV/VANET has its own requirements of the positioning system. Some applications may tolerate some error levels in the positioning information. Other applications require a very accurate and reliable positioning system. An example of the first category is traffic management applications. Most of the safety applications, on the other hand, require the second category. Some examples are collision avoidance, automatic driving, and lane tracking. The accuracy of the positioning system must be within the centimeter. In addition, its availability must be guaranteed. If it fails for some time, catastrophic circumstances may occur such as collisions.The most common and widely used Positioning System is the Global Navigation Satellite System (GNSS) [62–64], a satellite navigation system with global coverage. There are several GNSS systems, namely, Global Navigation Satellite System (GLONASS) [65, 66], Global Positioning System (GPS) [67–69], BeiDou Navigation Satellite System (BDS) [70], Galileo [71], Quasi-Zenith Satellite System (QZSS) [72, 73], and others. GNSS positioning systems have several drawbacks. The most unacceptable disadvantage would be the inaccuracy of the resulting measurements. For example, GPS devices can produce an error of up to 10 meters. This accuracy may seem to be acceptable for several applications. On the other side, as mentioned before, other applications like collision avoidance, automatic driving, and lane tracking demand precise and accurate positioning information.Although there are several ways to improve the accuracy of the GNSS systems, such as using a ground base station that acts as a correcting base station (examples Differential GPS and RTK), GNSS still suffers from weak signals and thus do not work efficiently in tunnels, underground, and in highly dense areas with buildings. One way to overcome the accuracy problem and to provide centimeter-location service is by combining two or three frequencies broadcasted by each GNSS constellation as used in [74]. Furthermore, PPP (Precise Point Positioning), refer to Figure 4, is another technology that aims to provide a very accurate positioning service based on GNSS by providing worldwide networks for error corrections in real-time. Corrections are transmitted to the vehicle using RSU (Roadside unit) in VANET/IoV or directly from the Internet. Lastly, RTK (Real-Time Kinematic), as shown in Figure 5, sends error corrections from reference receivers in the city. The range of the coverage of the receiver can reach up to 40 Km. On the other hand, nanotechnology is a field of science that is concerned with controlling matter on a scale between 1nm and 100 nm. It provides solutions for sensing, actuation, radio, embedding intelligence into the environment, power-efficient computing memory, energy sources, human-machine interaction, materials, mechanics, manufacturing, and environmental issues. A proposal for using Nanotechnology as a positioning system for VANET is given in [59, 76]. There are other positioning systems that are used in IoV and VANET such as the Received Signal Strength [58, 60, 77–79], and UAV [80].Figure 4
PPP (precise point positioning) technique to improve the accuracy of GNSS positioning using the Internet [75].Figure 5
RTK (real-time kinematic) technology to provide centimeter-accurate location using a correcting ground station [75].


## 4. Proposed Intelligent Traffic Management System (ITMS)

The overall architecture of the proposed Intelligent Traffic Management System (ITMS) is shown in Figure6. The architecture inherits all the features and the functional layers of IoV. However, the Onboard Unit (OBU) is upgraded by adding several modules that are essential for the operation of the ITMS. A new component is added which is the Smart Traffic Signal (STS). These two components operate together in order to provide all the required services from the ITMS. In the next subsections, we provide details about each component.Figure 6
The architecture of the proposed ITMS based on IoV for Smart Cities.


### 4.1. The Onboard Unit of the Vehicle

Each vehicle will be equipped with an onboard unit, as shown in Figure6, having the following components:(a)
Internet of Vehicles (IoV) Protocol Stack that contains the implementation of all layers and communication features for IoV, enabling the vehicle to communicate securely with the other entities (vehicles, infrastructure, RSU, pedestrians, sensors, road equipment, cloud servers, grid, devices, etc.).(b)
GNSS and Location Service Unit allows the vehicle to know its current position, its speed, and its direction in degrees.(c)
V2S and S2V Communication Unit is used for the Vehicle-to-Signal and Signal-to-Vehicle communication (an additional communication protocol that is essential for exchanging messages between the vehicle and the STS).(d)
Smart Traffic Signal Communication Unit controls and manages the communication between the vehicle and the smart traffic signal.(e)
Driver UI is used for the communication with the driver of the vehicle. This unit must have an LCD to display the information to the driver as well as loudspeakers to give audible instructions to the driver. This unit should also implement a speech recognition engine to interact verbally with the driver. It displays and voice prompts the driver to stop or to go depending on the decision obtained from the STS.(f)
V2V Communication Unit implements the Vehicle-to-Vehicle functionality enabling communication among nearby vehicles.(g)
Wireless Transceiver Unit allows the communication between the vehicle and the STS. The vehicle will send its position, speed, direction, and other information to the smart signal. The traffic information is received from the smart signal wirelessly. This information contains which road direction has pass-signal and how much time is remaining. The wireless system is configured to work in Ad-Hoc networking mode to be able to communicate with the smart signals(h)
The System Controller controls the operations and other devices in the system.(i)
Security and Antitampering Unit that implements the necessary level of security and privacy of the vehicles. This contains the digital certificate of the vehicle that has been issued by the traffic authority or the vehicle manufacturer. It must contain also a group of anonymous certificates issued for this vehicle to be used for communication among other vehicles to maintain the privacy of the driver and prevent tracking of the vehicle. This unit is responsible for securing the communication between the vehicle and other entities including the traffic signals. RSUs will periodically broadcast the certificates of the trusted smart traffic signals to ensure that the vehicle is always communicating with a legitimate traffic signal. For the security aspects of ad-hoc networks and securing such systems and more specifically IoV and interconnected vehicles, please refer to [1, 51, 76, 81–88].


### 4.2. Smart Traffic Signal (STS) Controller

The Smart Traffic Signal (STS) is a system that has to be placed in the center of the road intersection or any corner as shown in Figure7. It must contain the following components as shown in Figure 6.(a)
Intersection Priority Management that implements the priority of the intersection at which this smart signal is placed.(b)
Internet of Vehicles (IoV) Protocol Stack is similar to the Onboard Unit as explained before. Some functionality may not necessarily be implemented in the STS. This includes V2G, V2S, V2H, etc.(c)
V2S and S2V Communication Unit for is used for the Vehicle-to-Signal and Signal-to-Vehicle communication (an additional communication protocol that is essential for exchanging messages between the vehicle and the STS)(d)
Emergency Priority Management Unit is used to detect the presence of any arriving emergency vehicle to open the road for it without having to wait at the intersection.(e)
Intersignal Coordination Unit is used for global traffic management so that smart traffic signals communicate among each other in a city and provide the minimum travel time according to the traffic flow.(f)
Security and Antitampering Unit is similar to the Onboard Unit as explained before.(g)
Traffic Signal Controller manages the other units and controls the traffic signal operations.(h)
Wireless Transceiver is used for the physical communication between the signal and the vehicles.Figure 7
The smart traffic management system (STMS) is placed in the intersection. STMS must be programmed by the heading angle (denoted by d1, d2,…,d5) of each road in the interaction. Vehicles to be considered in the optimization algorithm are those currently between the stop line (SLi, i = 1, 2, … 5) andDmax: away from the intersection.


### 4.3. Operation of the STS

The operation of the smart traffic signal is as follows:(i)
The STS will not have the traditional three lights; instead, it will broadcast the signals wirelessly using the S2V communication unit.(ii)
No need to place a GNSS receiver in the STS; its position can be programmed once by the engineer responsible for installation. However, if the STS will be used as GNSS/RTK error correction ground base station, it must include the GNSS receiving unit so that it can calculate the error and send it to the nearby vehicles to accurately calculate their location, speed, and direction.(iii)
The wireless transceiver enables the STS to communicate wirelessly with the vehicles, collect the locations of nearby vehicles, and broadcast the traffic control information (the pass-signal to specify which road can pass and the others have to stop).(iv)
The controller controls and manages the operations of the STS. It takes the decision based on the adaptive algorithm that will be explained later.(v)
The STS in each intersection receives the information from the waiting vehicles on each road. The collected information is vehicle UID from its certificate or any of the anonymous certificates list in the case when the privacy of the vehicles is mandated, vehicle current position, vehicle speed, and vehicle moving direction. The STS periodically collects all the information and updates its internal database.(vi)
The controller, based on the current road statistics obtained from the vehicle’s information in the internal database, executes the desired algorithm (details are given in the next subsections) and decides which road has to be opened at any given time. It sends this information wirelessly using the broadcast mode so that all the vehicles waiting in the intersection know if they can move forward (pass) or stop.(vii)
It should be noted that pedestrian handling is out of the scope of this paper. This could be explored in future research work.


### 4.4. Adaptive Traffic Management Algorithm

One of the essential components of the ITMS is the Adaptive Traffic Management Algorithm (ATMA). ATMA’s main aim is to adaptively optimize the traffic signal according to the traffic density, to minimize the waiting time (delay), and to maximize the flow rate at the intersection. Using the proposed architecture and the features of IoV, all the essential information such as the number of waiting vehicles in the intersection, the waiting time of each vehicle, the vehicle type (normal, truck, or emergency), the flow rate of the open road, and the state of each road segment can be collected in real time by the STS without any extra hardware (only IoV components and the STS). This information, if used by an efficient ATMA, can lead to optimal traffic management. In this subsection, we present the proposed ATMA that governs the operations of the STS. We define the parameters and symbols used in the proposed algorithm in Table3.The pseudocode of the main algorithm is defined as shown in Algorithm1 listing. The algorithm to select the next open road in the intersection is given in the Algorithm 2 listing. Handling the emergency or priority vehicles is given in Algorithm 3. Please refer to Figures 8–10 for a flowchart illustration of each part of the algorithm.Algorithm 1: Proposed adaptive traffic management algorithm.
Inputs: ℛ, ℒr, Tgmin, Tgmax, Trmax, Ty, Tturnover, Sℒr, dir, Dmax as defined in Table 3.Initialize variables(1)
For eachrinR(i)
Settrr=τ # set the closing time for the roads equals the current time(ii)
SetVr=0 # initialize the vehicle counts in all the roads(2)
Setgt=Tgmin+Tgmax/2 # initialize the Open Timer to the average of the minimum and maximum open timers(3)
Setrg=1 # Set the current open road to be the first one(4)
Repeat forever:(5)
Calculate the number of vehicles in each road with the distance to the intersection<Dmax#   To minimize the computation and iterating on a very large number of entries, we use the following approach:(6)
# For the open road, when a vehicle is crossing the intersection stop lineSℒrg from any lane ℒrg,(7)
SetVrg=Vrg−1(8)
# For all the roads including the open one, on the arrival of any vehicle on the roadr in any lane ℒr,(9)
SetVr=Vr+1(10)
If (no more cars are withinDmaxin the open road): # the open road is empty(11)
Wait for the transition time, Ty(12)
Close the open road, rg(13)
Call “Select Next Open Road” algorithm.(14)
If (Emergency vehicle on a Closed Roadrem):(15)
Call Handle_Emergency_Vehicle rem,rg:(16)
Ifτ>tg+gt: # When the green timer expired(17)
Call “Select Next Open Road” algorithm.(18)
Inform the vehicles about the currently open road(19)
Periodically send a broadcast message to all the roads: “the only road rg having heading directiondrg” is open for at most gt.(20)
Continue RepeatingEnd of the Main Algorithm.Algorithm 2: Select next open road.
Settg=τ(1)
Settrrg=τ(2)
#To prevent starvation, find the road with the largest close time with the condition that it has vehicles, excluding those having no vehicles(3)
Letrlw represents the road with the longest close time and initialize it to −1(4)
Forxin all the roadsℛ:(5)
ifτ−trx>TrmaxandVx>0then Setrlw=x(6)
Ifrlw>=x, then Setrg=rlwelse Setrg=argmaxVr # select the road having the largest number of cars(7)
# now specify the green light time based on the number of cars(8)
LetNv=∑i=1i=ℛVi(9)
Setgt=Vrg/Nv×Tturnover(10)
#Adjust the calculated green timer to be within the maximum and minimum allowed values for the open timer(11)
Ifgt>Tgmaxthen Setgt=Tgmax(12)
Else ifgt<Tgminthen Setgt=TgminEnd of “Select Next Open Road” algorithm.Algorithm 3: Handle emergency vehicle.
To handle the situation when there is an emergency vehicle on a closed roadInputs:rem: the closed road that has the emergency vehiclerg: the currently open road(1)
Send a warning message to all vehicles on the open roadrg that the road will be closed now due to the existence of an emergency vehicle on another road(2)
Wait for the transition time,Ty(3)
Close the open road,rg(4)
Open the roadrem having the emergency vehicle(5)
Keep that roadrem open until the emergency vehicle sends a message that it has crossed the intersection (overriding the Trmax threshold)(6)
Wait for the transition time,TyEnd of “Handle Emergency Vehicle” algorithm.Figure 8
Flowchart of the overall proposed adaptive traffic management algorithm.Figure 9
Flowchart for handling the emergency vehicle.Figure 10
Flowchart for the process of selecting the next open road.As depicted in Algorithm1 listing and in Figure 8, after initializing the variables, the system repeats forever the following. It calculates the number of vehicles in each road with the distance to the intersection <Dmax. In the case when there are no more vehicles within Dmax in the open road (the open road is empty), the road is closed after waiting for the transition period. Then, select the next open road. At any time if an emergency or priority vehicle arrives on any closed road, then send a warning message to all vehicles on the open road rg that the road will be closed now due to the existence of an emergency or priority vehicle on another road. Then, wait for the transition time, Ty, and after that close the open road, rg. Then, open the road rem having the emergency vehicle and keep it open until the emergency vehicle sends a message that it has crossed the intersection (overriding the Trmax threshold). On the expiration of the green timer, the system will decide dynamically which road should be open. A dynamic algorithm called “Select Next Open Road” (as shown in Algorithm 2 listing and Figure 9) is devised to estimate the best road to open in order to optimize the traffic flow, minimize the average waiting time, and increase the number of serviced vehicles (crossing the intersection):(i)
To prevent starvation (few vehicles waiting too long on a road while there are many vehicles on the other roads), find the road with the largest close time with the condition that it has vehicles, excluding those having no vehicles. If this road is closed more thanTrmax, then this road will be the next one to open.(ii)
Otherwise, the road having the largest number of vehicles will be the next one to open.(iii)
The green time (the open time) will be set dynamically as the ratio of the number of vehicles of the selected road and the total number of waiting vehicles on all the roads multiplied by the cycle timeTturnover.(iv)
Adjust the calculated green timer to be within the maximum and minimum allowed values for the open timer.


### 4.5. Operation of the Smart Traffic Management System

Since IoV is used when any vehicle is going to travel on any road, before going to that road, it must know all the public keys of all the STSs. This can be downloaded to the internal memory of the On-Board unit using the RSU or directly from the server using long-distance communication (e.g., 4G, 5G, LoRa, etc.). The vehicles will trust only the STS’s with these public keys. This is to avoid any attack from any fake or malicious STS.In this section, we are going to explain the overall operation procedure and algorithm that manage the functionality of the Intelligent Traffic Management System.(i)
Each STS periodically broadcasts its digital certificate, the heading angles, the Ending Lines (ELs) pointsPi1 and Pi2 coordinates.(ii)
The vehicles that are on the intersection managed by this STS can know the Ending Line of the current road. They will not cross it unless this road opens. If for any reason the vehicle crosses this line while the state of the current road is “Closed,” the vehicle will record it in its internal memory as a red-light signal crossing violation. The information that will be saved is the STS ID, the current road, the current location, the Ending Line (EL) pointsPi1 and Pi2 coordinates, and the current time. Knowing this is very simple by using the heading angle, the current location, and the Ending Line.(iii)
When the vehicle is approaching the intersection, it broadcasts its location and its heading angle. This information will be received by the STS.(iv)
The STS counts all the vehicles that are waiting on each road.(v)
When there are no emergency vehicles on any of the roads, the STS selects the road having the maximum number of waiting vehicles and decides to open it for them. This is simply done by sending periodically broadcast messages containing only the road information (heading angle and the remaining time to close that road).(vi)
Vehicles receive the broadcast messages from the STS and compare the received heading angle with its heading angle. If they are the same with some tolerance, it knows that the intersection is open for it and moves forward, otherwise, it waits.(vii)
Opening a road should not exceed a maximum amount of time. Once changed to a given road, a timer starts. If some vehicles remain on that road before the expiration of the timer, that road is closed and the STS decides which other road has the maximum number of vehicles and opens it.(viii)
To avoid traffic congestion and save time, if a road is open and it has few vehicles, then once the last vehicle enters the intersection area, the STS switches to the next road after waiting three seconds (similar to the yellow signal). It does not wait for the total duration of the open period.(ix)
To prevent starvation, where some crowded roads get the priority and some roads having low traffic flow wait for a long period of time, there is another timer that is assigned to each road. This timer is reset each time this road is closed (changing its state from open to close). The STS checks all these timers before making the decision on which road will be opened. If it finds any of these timers exceeding the maximum allowed closing time, it selects the road having the max value of this timer and opens it.(x)
In the case where one road has an approaching emergency vehicle (police, ambulance, firemen, etc.), the normal procedure is suspended, and that road will open immediately until the emergency vehicle crosses the intersection. Subsequently, that road closes and the normal procedure takes effect once more.(xi)
Before opening the road for the emergency vehicle, the STS sends a warning signal to all the vehicles and waits three seconds before closing the currently opened road and opens the road having the emergency vehicle.(xii)
When installing the STS, it has to be programmed to ensure its absolute position (error-free) and the heading angle (d1, d2, d3, d4, d5, etc. as in Figure6) for each road that joins that intersection.


### 4.6. The Procedure of Installing the STS

Each STS must be installed and set up in a specific way to operate correctly. Here are the steps that must be followed for each STS in an intersection, please refer to Figure6.(1)
All STS hardware must be placed in the middle of the intersection or in any corner of any road on the condition that the emitted signals can reach all the vehicles in all the roads for at least a length of 400 meters in any of the roads.(2)
Its absolute position is not required; thus, there is no need to have GPS receiver in its hardware.(3)
The engineers must use a centimeter-accurate positioning system, namely, RTK or DGPS to obtain the coordinates of the Ending Line (EL) of each road. Each road,i, has an Ending Line (ELi) where the vehicles must not cross while this road is closed. Each Ending Line has two points (Pi1 and Pi2) intersecting with the road edges. The exact accurate coordinates of Pi1 and Pi2 must be measured and saved in the STS.(4)
For each roadi, the heading angle di must be calculated and saved in the STS.(5)
The STS must be connected to the infrastructure by any of the following communication means: cellular networks 3G, 4G, or 5G; fiber optics; microwave communications; or any long-distance reliable data communication.(6)
A digital certificate, which is issued from the traffic authority CA, must be saved in the STS. It must contain the public key of that STS. It will be used to encrypt any message sent to that STS. In addition, the private key related to that public key must be saved in the memory of the STS. This private key will be used to digitally sign any message sent out from that STS.


### 4.7. Hardware Implementation of STS

We have implemented the system in a hardware prototype to test and validate the operation of the STS controller for traffic management. This hardware is for a single STS for managing traffic locally.


## 4.1. The Onboard Unit of the Vehicle

Each vehicle will be equipped with an onboard unit, as shown in Figure6, having the following components:(a)
Internet of Vehicles (IoV) Protocol Stack that contains the implementation of all layers and communication features for IoV, enabling the vehicle to communicate securely with the other entities (vehicles, infrastructure, RSU, pedestrians, sensors, road equipment, cloud servers, grid, devices, etc.).(b)
GNSS and Location Service Unit allows the vehicle to know its current position, its speed, and its direction in degrees.(c)
V2S and S2V Communication Unit is used for the Vehicle-to-Signal and Signal-to-Vehicle communication (an additional communication protocol that is essential for exchanging messages between the vehicle and the STS).(d)
Smart Traffic Signal Communication Unit controls and manages the communication between the vehicle and the smart traffic signal.(e)
Driver UI is used for the communication with the driver of the vehicle. This unit must have an LCD to display the information to the driver as well as loudspeakers to give audible instructions to the driver. This unit should also implement a speech recognition engine to interact verbally with the driver. It displays and voice prompts the driver to stop or to go depending on the decision obtained from the STS.(f)
V2V Communication Unit implements the Vehicle-to-Vehicle functionality enabling communication among nearby vehicles.(g)
Wireless Transceiver Unit allows the communication between the vehicle and the STS. The vehicle will send its position, speed, direction, and other information to the smart signal. The traffic information is received from the smart signal wirelessly. This information contains which road direction has pass-signal and how much time is remaining. The wireless system is configured to work in Ad-Hoc networking mode to be able to communicate with the smart signals(h)
The System Controller controls the operations and other devices in the system.(i)
Security and Antitampering Unit that implements the necessary level of security and privacy of the vehicles. This contains the digital certificate of the vehicle that has been issued by the traffic authority or the vehicle manufacturer. It must contain also a group of anonymous certificates issued for this vehicle to be used for communication among other vehicles to maintain the privacy of the driver and prevent tracking of the vehicle. This unit is responsible for securing the communication between the vehicle and other entities including the traffic signals. RSUs will periodically broadcast the certificates of the trusted smart traffic signals to ensure that the vehicle is always communicating with a legitimate traffic signal. For the security aspects of ad-hoc networks and securing such systems and more specifically IoV and interconnected vehicles, please refer to [1, 51, 76, 81–88].


## 4.2. Smart Traffic Signal (STS) Controller

The Smart Traffic Signal (STS) is a system that has to be placed in the center of the road intersection or any corner as shown in Figure7. It must contain the following components as shown in Figure 6.(a)
Intersection Priority Management that implements the priority of the intersection at which this smart signal is placed.(b)
Internet of Vehicles (IoV) Protocol Stack is similar to the Onboard Unit as explained before. Some functionality may not necessarily be implemented in the STS. This includes V2G, V2S, V2H, etc.(c)
V2S and S2V Communication Unit for is used for the Vehicle-to-Signal and Signal-to-Vehicle communication (an additional communication protocol that is essential for exchanging messages between the vehicle and the STS)(d)
Emergency Priority Management Unit is used to detect the presence of any arriving emergency vehicle to open the road for it without having to wait at the intersection.(e)
Intersignal Coordination Unit is used for global traffic management so that smart traffic signals communicate among each other in a city and provide the minimum travel time according to the traffic flow.(f)
Security and Antitampering Unit is similar to the Onboard Unit as explained before.(g)
Traffic Signal Controller manages the other units and controls the traffic signal operations.(h)
Wireless Transceiver is used for the physical communication between the signal and the vehicles.Figure 7
The smart traffic management system (STMS) is placed in the intersection. STMS must be programmed by the heading angle (denoted by d1, d2,…,d5) of each road in the interaction. Vehicles to be considered in the optimization algorithm are those currently between the stop line (SLi, i = 1, 2, … 5) andDmax: away from the intersection.


## 4.3. Operation of the STS

The operation of the smart traffic signal is as follows:(i)
The STS will not have the traditional three lights; instead, it will broadcast the signals wirelessly using the S2V communication unit.(ii)
No need to place a GNSS receiver in the STS; its position can be programmed once by the engineer responsible for installation. However, if the STS will be used as GNSS/RTK error correction ground base station, it must include the GNSS receiving unit so that it can calculate the error and send it to the nearby vehicles to accurately calculate their location, speed, and direction.(iii)
The wireless transceiver enables the STS to communicate wirelessly with the vehicles, collect the locations of nearby vehicles, and broadcast the traffic control information (the pass-signal to specify which road can pass and the others have to stop).(iv)
The controller controls and manages the operations of the STS. It takes the decision based on the adaptive algorithm that will be explained later.(v)
The STS in each intersection receives the information from the waiting vehicles on each road. The collected information is vehicle UID from its certificate or any of the anonymous certificates list in the case when the privacy of the vehicles is mandated, vehicle current position, vehicle speed, and vehicle moving direction. The STS periodically collects all the information and updates its internal database.(vi)
The controller, based on the current road statistics obtained from the vehicle’s information in the internal database, executes the desired algorithm (details are given in the next subsections) and decides which road has to be opened at any given time. It sends this information wirelessly using the broadcast mode so that all the vehicles waiting in the intersection know if they can move forward (pass) or stop.(vii)
It should be noted that pedestrian handling is out of the scope of this paper. This could be explored in future research work.


## 4.4. Adaptive Traffic Management Algorithm

One of the essential components of the ITMS is the Adaptive Traffic Management Algorithm (ATMA). ATMA’s main aim is to adaptively optimize the traffic signal according to the traffic density, to minimize the waiting time (delay), and to maximize the flow rate at the intersection. Using the proposed architecture and the features of IoV, all the essential information such as the number of waiting vehicles in the intersection, the waiting time of each vehicle, the vehicle type (normal, truck, or emergency), the flow rate of the open road, and the state of each road segment can be collected in real time by the STS without any extra hardware (only IoV components and the STS). This information, if used by an efficient ATMA, can lead to optimal traffic management. In this subsection, we present the proposed ATMA that governs the operations of the STS. We define the parameters and symbols used in the proposed algorithm in Table3.The pseudocode of the main algorithm is defined as shown in Algorithm1 listing. The algorithm to select the next open road in the intersection is given in the Algorithm 2 listing. Handling the emergency or priority vehicles is given in Algorithm 3. Please refer to Figures 8–10 for a flowchart illustration of each part of the algorithm.Algorithm 1: Proposed adaptive traffic management algorithm.
Inputs: ℛ, ℒr, Tgmin, Tgmax, Trmax, Ty, Tturnover, Sℒr, dir, Dmax as defined in Table 3.Initialize variables(1)
For eachrinR(i)
Settrr=τ # set the closing time for the roads equals the current time(ii)
SetVr=0 # initialize the vehicle counts in all the roads(2)
Setgt=Tgmin+Tgmax/2 # initialize the Open Timer to the average of the minimum and maximum open timers(3)
Setrg=1 # Set the current open road to be the first one(4)
Repeat forever:(5)
Calculate the number of vehicles in each road with the distance to the intersection<Dmax#   To minimize the computation and iterating on a very large number of entries, we use the following approach:(6)
# For the open road, when a vehicle is crossing the intersection stop lineSℒrg from any lane ℒrg,(7)
SetVrg=Vrg−1(8)
# For all the roads including the open one, on the arrival of any vehicle on the roadr in any lane ℒr,(9)
SetVr=Vr+1(10)
If (no more cars are withinDmaxin the open road): # the open road is empty(11)
Wait for the transition time, Ty(12)
Close the open road, rg(13)
Call “Select Next Open Road” algorithm.(14)
If (Emergency vehicle on a Closed Roadrem):(15)
Call Handle_Emergency_Vehicle rem,rg:(16)
Ifτ>tg+gt: # When the green timer expired(17)
Call “Select Next Open Road” algorithm.(18)
Inform the vehicles about the currently open road(19)
Periodically send a broadcast message to all the roads: “the only road rg having heading directiondrg” is open for at most gt.(20)
Continue RepeatingEnd of the Main Algorithm.Algorithm 2: Select next open road.
Settg=τ(1)
Settrrg=τ(2)
#To prevent starvation, find the road with the largest close time with the condition that it has vehicles, excluding those having no vehicles(3)
Letrlw represents the road with the longest close time and initialize it to −1(4)
Forxin all the roadsℛ:(5)
ifτ−trx>TrmaxandVx>0then Setrlw=x(6)
Ifrlw>=x, then Setrg=rlwelse Setrg=argmaxVr # select the road having the largest number of cars(7)
# now specify the green light time based on the number of cars(8)
LetNv=∑i=1i=ℛVi(9)
Setgt=Vrg/Nv×Tturnover(10)
#Adjust the calculated green timer to be within the maximum and minimum allowed values for the open timer(11)
Ifgt>Tgmaxthen Setgt=Tgmax(12)
Else ifgt<Tgminthen Setgt=TgminEnd of “Select Next Open Road” algorithm.Algorithm 3: Handle emergency vehicle.
To handle the situation when there is an emergency vehicle on a closed roadInputs:rem: the closed road that has the emergency vehiclerg: the currently open road(1)
Send a warning message to all vehicles on the open roadrg that the road will be closed now due to the existence of an emergency vehicle on another road(2)
Wait for the transition time,Ty(3)
Close the open road,rg(4)
Open the roadrem having the emergency vehicle(5)
Keep that roadrem open until the emergency vehicle sends a message that it has crossed the intersection (overriding the Trmax threshold)(6)
Wait for the transition time,TyEnd of “Handle Emergency Vehicle” algorithm.Figure 8
Flowchart of the overall proposed adaptive traffic management algorithm.Figure 9
Flowchart for handling the emergency vehicle.Figure 10
Flowchart for the process of selecting the next open road.As depicted in Algorithm1 listing and in Figure 8, after initializing the variables, the system repeats forever the following. It calculates the number of vehicles in each road with the distance to the intersection <Dmax. In the case when there are no more vehicles within Dmax in the open road (the open road is empty), the road is closed after waiting for the transition period. Then, select the next open road. At any time if an emergency or priority vehicle arrives on any closed road, then send a warning message to all vehicles on the open road rg that the road will be closed now due to the existence of an emergency or priority vehicle on another road. Then, wait for the transition time, Ty, and after that close the open road, rg. Then, open the road rem having the emergency vehicle and keep it open until the emergency vehicle sends a message that it has crossed the intersection (overriding the Trmax threshold). On the expiration of the green timer, the system will decide dynamically which road should be open. A dynamic algorithm called “Select Next Open Road” (as shown in Algorithm 2 listing and Figure 9) is devised to estimate the best road to open in order to optimize the traffic flow, minimize the average waiting time, and increase the number of serviced vehicles (crossing the intersection):(i)
To prevent starvation (few vehicles waiting too long on a road while there are many vehicles on the other roads), find the road with the largest close time with the condition that it has vehicles, excluding those having no vehicles. If this road is closed more thanTrmax, then this road will be the next one to open.(ii)
Otherwise, the road having the largest number of vehicles will be the next one to open.(iii)
The green time (the open time) will be set dynamically as the ratio of the number of vehicles of the selected road and the total number of waiting vehicles on all the roads multiplied by the cycle timeTturnover.(iv)
Adjust the calculated green timer to be within the maximum and minimum allowed values for the open timer.


## 4.5. Operation of the Smart Traffic Management System

Since IoV is used when any vehicle is going to travel on any road, before going to that road, it must know all the public keys of all the STSs. This can be downloaded to the internal memory of the On-Board unit using the RSU or directly from the server using long-distance communication (e.g., 4G, 5G, LoRa, etc.). The vehicles will trust only the STS’s with these public keys. This is to avoid any attack from any fake or malicious STS.In this section, we are going to explain the overall operation procedure and algorithm that manage the functionality of the Intelligent Traffic Management System.(i)
Each STS periodically broadcasts its digital certificate, the heading angles, the Ending Lines (ELs) pointsPi1 and Pi2 coordinates.(ii)
The vehicles that are on the intersection managed by this STS can know the Ending Line of the current road. They will not cross it unless this road opens. If for any reason the vehicle crosses this line while the state of the current road is “Closed,” the vehicle will record it in its internal memory as a red-light signal crossing violation. The information that will be saved is the STS ID, the current road, the current location, the Ending Line (EL) pointsPi1 and Pi2 coordinates, and the current time. Knowing this is very simple by using the heading angle, the current location, and the Ending Line.(iii)
When the vehicle is approaching the intersection, it broadcasts its location and its heading angle. This information will be received by the STS.(iv)
The STS counts all the vehicles that are waiting on each road.(v)
When there are no emergency vehicles on any of the roads, the STS selects the road having the maximum number of waiting vehicles and decides to open it for them. This is simply done by sending periodically broadcast messages containing only the road information (heading angle and the remaining time to close that road).(vi)
Vehicles receive the broadcast messages from the STS and compare the received heading angle with its heading angle. If they are the same with some tolerance, it knows that the intersection is open for it and moves forward, otherwise, it waits.(vii)
Opening a road should not exceed a maximum amount of time. Once changed to a given road, a timer starts. If some vehicles remain on that road before the expiration of the timer, that road is closed and the STS decides which other road has the maximum number of vehicles and opens it.(viii)
To avoid traffic congestion and save time, if a road is open and it has few vehicles, then once the last vehicle enters the intersection area, the STS switches to the next road after waiting three seconds (similar to the yellow signal). It does not wait for the total duration of the open period.(ix)
To prevent starvation, where some crowded roads get the priority and some roads having low traffic flow wait for a long period of time, there is another timer that is assigned to each road. This timer is reset each time this road is closed (changing its state from open to close). The STS checks all these timers before making the decision on which road will be opened. If it finds any of these timers exceeding the maximum allowed closing time, it selects the road having the max value of this timer and opens it.(x)
In the case where one road has an approaching emergency vehicle (police, ambulance, firemen, etc.), the normal procedure is suspended, and that road will open immediately until the emergency vehicle crosses the intersection. Subsequently, that road closes and the normal procedure takes effect once more.(xi)
Before opening the road for the emergency vehicle, the STS sends a warning signal to all the vehicles and waits three seconds before closing the currently opened road and opens the road having the emergency vehicle.(xii)
When installing the STS, it has to be programmed to ensure its absolute position (error-free) and the heading angle (d1, d2, d3, d4, d5, etc. as in Figure6) for each road that joins that intersection.


## 4.6. The Procedure of Installing the STS

Each STS must be installed and set up in a specific way to operate correctly. Here are the steps that must be followed for each STS in an intersection, please refer to Figure6.(1)
All STS hardware must be placed in the middle of the intersection or in any corner of any road on the condition that the emitted signals can reach all the vehicles in all the roads for at least a length of 400 meters in any of the roads.(2)
Its absolute position is not required; thus, there is no need to have GPS receiver in its hardware.(3)
The engineers must use a centimeter-accurate positioning system, namely, RTK or DGPS to obtain the coordinates of the Ending Line (EL) of each road. Each road,i, has an Ending Line (ELi) where the vehicles must not cross while this road is closed. Each Ending Line has two points (Pi1 and Pi2) intersecting with the road edges. The exact accurate coordinates of Pi1 and Pi2 must be measured and saved in the STS.(4)
For each roadi, the heading angle di must be calculated and saved in the STS.(5)
The STS must be connected to the infrastructure by any of the following communication means: cellular networks 3G, 4G, or 5G; fiber optics; microwave communications; or any long-distance reliable data communication.(6)
A digital certificate, which is issued from the traffic authority CA, must be saved in the STS. It must contain the public key of that STS. It will be used to encrypt any message sent to that STS. In addition, the private key related to that public key must be saved in the memory of the STS. This private key will be used to digitally sign any message sent out from that STS.


## 4.7. Hardware Implementation of STS

We have implemented the system in a hardware prototype to test and validate the operation of the STS controller for traffic management. This hardware is for a single STS for managing traffic locally.


## 5. Obtained Results

### 5.1. ITMS Simulator

We have developed an event-based simulator in Python simulating the proposed algorithm. The simulator is fully parameterized to simulate any intersection having a variable number of roads in the intersection. Vehicles’ inter-arrival time in each road is obtained by exponential random distribution function expovariate (1/rate), with the rate (real number) being the desired mean rate. For example, if rate = 0.5, this means that the mean of the inter-arrival time between two vehicles on this road is 0.5, that is, approximately two vehicles every one second. Each road can have a specific inter-arrival rate. Queuing theory is used to implement the vehicle’s state starting from its arrival into theDmax waiting for the ITMS to open its road according to the proposed algorithm until it reaches the top of the queue and crosses the intersection line, Eℒg. The time required by a vehicle to cross this line, ts, is parameterized. In addition, the following parameters are implemented and can be set to any value to study their effect: ℛ, Tgmin, Tgmax, Trmax, Ty and ℒr.In addition, the simulator simulates the Fixed-Time algorithm that exists in all the legacy tri-color traffic signals for different configuration parameters (ℛ, Tgreen, Tyellow, and ℒr). For each run, the simulator calculates the total vehicles arriving on all the roads; the number of vehicles crossing the intersection while their road is open; and the total and average waiting time. All these values are calculated for the Proposed Algorithm (PA) and the Fixed-Time (FT) Algorithm. The source code of the developed simulator is available upon request for any researcher.To evaluate the effectiveness of the proposed Algorithm (PA) compared to the Fixed-Time (FT) Algorithm, we have fixed the random seed to a constant so that all the simulator runs have the same random pattern to eliminate the effect of the random pattern on the results. The next subsections provide the obtained results for different scenarios.To study the effect of one or more parameters on the performance of the two algorithms, we set the following defaults: −ℛ=4, Tgreen=60sec, Tyellow=2sec, Tred=600, ℒr=1), Tgmin=5sec, Tgmax=60sec, Trmax=200sec, and Ty=2sec. The simulation time is fixed to 1 hour = 36,000 ds (decisecond). Descriptions of the abbreviations that are used in the next figures are given in Table 4.Table 4
Abbreviations in the figures.
Optimal algorithmMaximum number of vehicles that can be serviced (crossing the intersection). This is a function of the service time and the traffic density. It can be calculated using:min〖N,T/s〗, where N is the total arrived vehicles, T is the total simulated period, and s is the vehicle service time.FTFixed-time algorithm. To evaluate the effectiveness of our proposed ITMS, fixed-time traffic light control (FT). Traffic lights are cycled in a fixed phase sequence with a fixed duration of each phase. It is one of the most widely used traffic control policies in the real world.PAThe proposed algorithm as described in Section 4.AWTAverage waiting time of all the arrived vehicles during the total simulated period.


### 5.2. Effect of Arrival Rates

To study the effect of the traffic density on the performance of the Proposed Algorithm (PA), we have prepared two scenarios. In both scenarios, the inter-arrival rater of one road is varied from 1 to 20 sec. In the first scenario, the other three roads have different arrival rates (10, 15, and 20 sec). In the second scenario, the other three roads have a constant low rate (r = 30 sec). Please note that the traffic density decreases with the increase in the value of r. As shown in Figure 11, for high traffic density, the proposed algorithm outperforms the FT one in terms of the number of serviced vehicles. It can be seen that the number of serviced vehicles using the FT algorithm is constant for the rates from 1 to 9. It can also be seen that the PA gives almost the same results as the Optimal Algorithm.Figure 11
The number of serviced vehicles using the optimal algorithm, the fixed-time (FT), and the proposed algorithm (PA) when varying the rates of one road. (a) Different constant rates on the other three roads (10, 15, 20). (b) All the other roads have the same rate (30).
(a)(b)In terms of the Average Waiting Time (AWT), the performance of the FT is very poor for high traffic density that can reach (370, 550 s) for the two scenarios, as shown in Figure12. However, using the PA, the AWT is reduced significantly (47, 18 s) for the two scenarios. With the decrease of the traffic density (r > 8.5), the PA still outperforms the FT by a factor of at least 4 folds.Figure 12
Average waiting time (AWT) in seconds using the fixed-time (FT) and the proposed algorithm (PA) when varying the rates of one road. (a) Different constant rates on the other three roads (10, 15, 20), (b) All the other roads have the same rate (30).
(a)(b)


### 5.3. Performance on Different Traffic Densities

The effectiveness of our PA can be further demonstrated when the traffic density is not the same on each road. To illustrate this, we have varied the traffic density on one road starting from a very high arrival rate (smaller values ofr), namely, r = 1 to 20 sec. The other three roads are charged with low traffic density, namely, r = 30 (equivalent to one vehicle every 30 sec). The results are shown in Figures 13(a) and 14(a).Figure 13
The number of serviced vehicles using the Optimal Algorithm (OA), the Fixed-Time (FT), and the Proposed Algorithm (PA) when the road(s) has/have varying traffic density (varyingr from 1 to 20) and the other road(s) has/have constant low traffic density (constant r:30). (a) Fixing the arrival rate on three roads and varying the rate on the fourth road. (b) Fixing the arrival rate on two roads and varying the rate on the third and fourth roads equally. (c) Fixing the arrival rate on one road and varying the rate equally on the other three roads. (d) Varying the inter-arrival rate equally on all the four roads.
(a)(b)(c)(d)Figure 14
Average waiting time (AWT) using the fixed-time (FT) and the proposed algorithm (PA) when the road(s) has/have varying traffic density (varying r from 1 to 20) and the other road(s) has/have low traffic density (constant r:30). (a) Fixing the arrival rate on three roads and varying the rate on the fourth road. (b) Fixing the arrival rate on two roads and varying the rate on the third and fourth roads equally. (c) Fixing the arrival rate on one road and varying the rate equally on the other three roads. (d) Varying the inter-arrival rate equally on all the four roads.
(a)(b)(c)(d)This represents an actual situation for a specific type of traffic congestion, where only one road is very charged and the other intersecting roads are not. We have repeated the same scenario but by varying the traffic density on two roads and fixing the traffic density at a low rate on the other two roads. The results are shown in Figures13(b) and 14(b).Next, another simulation run is performed by varying the traffic density on three roads and fixing the traffic density at a low rate on the fourth road. The results are shown in Figures13(c) and 14(c). Finally, we have varied the traffic rate equally on all the roads from very high density (r = 1) to low rate (r = 20). The results are shown in Figures 13(d) and 14(d).Each subfigure in Figure13 shows the obtained number of serviced vehicles using the Optimal Algorithm (OA), the Fixed-Time (FT), and the Proposed Algorithm (PA) for each scenario. As you can see, PA outperforms the FT in the first three cases with a significant improvement, which is almost equal to that of the OA. For example, in the case when only one road has varied traffic density and the others have fixed low density, the number of serviced vehicles when r = 1 were: PA = 1754, FT = 786, and OA = 1774. This gives a percentage of 223% of serviced vehicles compared to FT.As the traffic density decreases, PA continues providing the performance of the OA; however, the FT continues to provide almost the same low number of serviced vehicles (around 780). When the rate is very low (r > 9), the total arriving vehicles is very low and thus all the algorithms give almost the same performance with a slight improvement of the PA over the FT. The upper bound that can be reached using FT is improved with the increase of the number of roads having varied traffic density as follows: 786, 1100, 1418, 1733 compared to 1754, 1738, 1730, 1733 for the PA.The proposed algorithm contributes to significantly reducing the Average Waiting Time (AWT) in the four cases as shown in Figure14. For Example, in the first scenario, when r = 3 the AWT is PA = 18 sec, FT = 655 sec. This means that the FT is providing AWT 36 times longer than the PA in this case. As expected, the AWT decreases with the decrease of the traffic density until a certain limit using the FT and the PA as shown in the four subfigures.The reason for this great improvement is as follows. In the FT system, the road will be open for a fixed duration even if no vehicles are waiting on the currently open road. Thus, for low traffic density, in the FT system, the intersection will remain idle (not servicing any vehicle) while other roads may have several waiting vehicles. This yields fewer serviced vehicles and more waiting time (delay). However, our proposed system will avoid this issue by minimizing the idle time of the intersection and dynamically switching to another road if there are no waiting vehicles in the open road. This maximizes the number of serviced vehicles and minimizes the average waiting time. When the traffic density increases on all the roads, the improvement decreases. The only case when the two systems give the same results is when all the four roads are crowded. In all the other cases, our system demonstrates an improvement.


### 5.4. Effect of Changing the Maximum Open Period and Green Time

We run different simulation scenarios to change the maximum open period,Tgmax, for the proposed algorithm and the Green period for the FT algorithm. However, the Green period of the FT algorithm does affect the number of serviced vehicles. As shown in Figure 15, the number of serviced vehicles is 800 for the FT algorithm compared to 1083 for both the OA and PA algorithms. Similarly, Figure 16 depicts that the average waiting time is significantly decreased when using PA. Tgmax has almost no effect on the AWT using PA. However, the AWT using FT increases with the increase of the Green period. As it is expected, for the number of serviced vehicles, this parameter does not affect and regardless of its value, the number of serviced vehicles using PA equals that of the OA. This is because the proposed algorithm calculates adaptively the optimal value to open the road according to the current traffic density on all the roads. Furthermore, in the case when there are no more vehicles on the open road, it closes this road immediately after waiting for the transition period. This also contributes to maximizing the number of serviced vehicles and in addition reduces the average waiting time significantly compared to the FT algorithm.Figure 15
Effect of changing the maximum open period,Tgmax, or the fixed green period in the FT algorithm on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 16
Effect of changing the maximum open period or the fixed green period in the FT algorithm on the average waiting time (AWT) using the FT and PA algorithms.


### 5.5. Effect of Changing the Minimum Open Period

Tgmin (Minimum Open Period) does not affect the performance of the FT algorithm. However, it has a significant effect on the PA. As shown in Figure 17, increasing this value beyond a certain threshold (depending on the traffic density) tends to degrade the performance of PA by reducing the number of serviced vehicles. This is also true for the AWT as shown in Figure 18. The AWT at 10 sec equals 70 sec using PA and 550 using FT. The AWT increased from 70 sec to 450 sec when the Tgmin increased from 10 sec to 100 sec. The reason for this considerable impact on both the number of serviced vehicles and the AWT is: by increasing the Tgmin, the intersection may stay idle without servicing any vehicle and thus increase the queue of waiting vehicles. This suggests that the recommended value of Tgmin must be as small as possible; however, it must be greater than the service time of the longest vehicle.Figure 17
Effect of changing the minimum open period or the fixed green period in the FT algorithm on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 18
Effect of changing the minimum open period on the average waiting time using FT and PA algorithms.Simulation results showed thatTrmax (the maximum close period) has a slight impact on the number of serviced vehicles using PA, as shown in Figure 19. Increasing Trmax decreases the AWT as shown in Figure 20. This parameter does not affect the FT algorithm. Smaller values of Trmax eliminate the optimization based on the traffic density on the roads and give priority to the starved roads by opening the roads having the maximum close time (equivalent to the red time). This in turn reduces the number of serviced vehicles and thus increases the AWT. For PA to give results that equal to the Optimal Algorithm, the value of Trmax should be greater than 70 sec.Figure 19
Effect of changing the maximum close period on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 20
Effect of changing the maximum close period on the average waiting time using FT and PA algorithms.


### 5.6. Effect of the Number of Roads (Phases) in the Intersection

To study the effect of the number of incoming roads (phases) at the intersection on the number of serviced vehicles and the average waiting vehicles, we have run different scenarios. Two of them will be presented here.First, we have set the same inter-arrival rate (same traffic density) on all the roads but by decreasing the traffic density with the increase of the number of roadsℛ using this equation, 30×ℛ−2. We have varied ℛ from 3 to 9. The results are shown in Figures 21 and 22. Ideally, for high traffic density, the number of serviced vehicles should be constant and equal to the OA for both the PA and FT. However, when the traffic density decreases by increasing r as shown in Figure 22, the number of serviced vehicles decreases and the PA outperforms the FT algorithm. Regarding the AWT, it decreases with the increase of ℛ and the PA is always lower than the FT as in Figure 21.Figure 21
Effect of changing the number of roads at the intersection (all the roads have the same traffic density that decreases with the increase of the number of roads) on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 22
Effect of changing the number of roads at the intersection (all the roads have the same traffic density that decreases with the increase of the number of roads) on the average waiting time.In the second scenario, we kept the traffic rate constant (r = 30 sec) for all the roads except for one of the roads where we simulated high traffic density (r = 2.5 sec). The results are shown in Figures 23 and 24. The number of serviced vehicles using PA equals that of the Optimal Algorithm. However, the FT can service almost half of those serviced by the Optimal Algorithm. Similarly, for small ℛ, the PA yields very low AWT compared to the FT. The performance of the FT improves gradually with the increase in ℛ.Figure 23
Effect of changing the number of roads at the intersection (one road has a high rate and the others have a low rate) on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 24
Effect of changing the number of roads at the intersection (one road has a high rate and the others have a low rate) on the average waiting time.


## 5.1. ITMS Simulator

We have developed an event-based simulator in Python simulating the proposed algorithm. The simulator is fully parameterized to simulate any intersection having a variable number of roads in the intersection. Vehicles’ inter-arrival time in each road is obtained by exponential random distribution function expovariate (1/rate), with the rate (real number) being the desired mean rate. For example, if rate = 0.5, this means that the mean of the inter-arrival time between two vehicles on this road is 0.5, that is, approximately two vehicles every one second. Each road can have a specific inter-arrival rate. Queuing theory is used to implement the vehicle’s state starting from its arrival into theDmax waiting for the ITMS to open its road according to the proposed algorithm until it reaches the top of the queue and crosses the intersection line, Eℒg. The time required by a vehicle to cross this line, ts, is parameterized. In addition, the following parameters are implemented and can be set to any value to study their effect: ℛ, Tgmin, Tgmax, Trmax, Ty and ℒr.In addition, the simulator simulates the Fixed-Time algorithm that exists in all the legacy tri-color traffic signals for different configuration parameters (ℛ, Tgreen, Tyellow, and ℒr). For each run, the simulator calculates the total vehicles arriving on all the roads; the number of vehicles crossing the intersection while their road is open; and the total and average waiting time. All these values are calculated for the Proposed Algorithm (PA) and the Fixed-Time (FT) Algorithm. The source code of the developed simulator is available upon request for any researcher.To evaluate the effectiveness of the proposed Algorithm (PA) compared to the Fixed-Time (FT) Algorithm, we have fixed the random seed to a constant so that all the simulator runs have the same random pattern to eliminate the effect of the random pattern on the results. The next subsections provide the obtained results for different scenarios.To study the effect of one or more parameters on the performance of the two algorithms, we set the following defaults: −ℛ=4, Tgreen=60sec, Tyellow=2sec, Tred=600, ℒr=1), Tgmin=5sec, Tgmax=60sec, Trmax=200sec, and Ty=2sec. The simulation time is fixed to 1 hour = 36,000 ds (decisecond). Descriptions of the abbreviations that are used in the next figures are given in Table 4.Table 4
Abbreviations in the figures.
Optimal algorithmMaximum number of vehicles that can be serviced (crossing the intersection). This is a function of the service time and the traffic density. It can be calculated using:min〖N,T/s〗, where N is the total arrived vehicles, T is the total simulated period, and s is the vehicle service time.FTFixed-time algorithm. To evaluate the effectiveness of our proposed ITMS, fixed-time traffic light control (FT). Traffic lights are cycled in a fixed phase sequence with a fixed duration of each phase. It is one of the most widely used traffic control policies in the real world.PAThe proposed algorithm as described in Section 4.AWTAverage waiting time of all the arrived vehicles during the total simulated period.


## 5.2. Effect of Arrival Rates

To study the effect of the traffic density on the performance of the Proposed Algorithm (PA), we have prepared two scenarios. In both scenarios, the inter-arrival rater of one road is varied from 1 to 20 sec. In the first scenario, the other three roads have different arrival rates (10, 15, and 20 sec). In the second scenario, the other three roads have a constant low rate (r = 30 sec). Please note that the traffic density decreases with the increase in the value of r. As shown in Figure 11, for high traffic density, the proposed algorithm outperforms the FT one in terms of the number of serviced vehicles. It can be seen that the number of serviced vehicles using the FT algorithm is constant for the rates from 1 to 9. It can also be seen that the PA gives almost the same results as the Optimal Algorithm.Figure 11
The number of serviced vehicles using the optimal algorithm, the fixed-time (FT), and the proposed algorithm (PA) when varying the rates of one road. (a) Different constant rates on the other three roads (10, 15, 20). (b) All the other roads have the same rate (30).
(a)(b)In terms of the Average Waiting Time (AWT), the performance of the FT is very poor for high traffic density that can reach (370, 550 s) for the two scenarios, as shown in Figure12. However, using the PA, the AWT is reduced significantly (47, 18 s) for the two scenarios. With the decrease of the traffic density (r > 8.5), the PA still outperforms the FT by a factor of at least 4 folds.Figure 12
Average waiting time (AWT) in seconds using the fixed-time (FT) and the proposed algorithm (PA) when varying the rates of one road. (a) Different constant rates on the other three roads (10, 15, 20), (b) All the other roads have the same rate (30).
(a)(b)


## 5.3. Performance on Different Traffic Densities

The effectiveness of our PA can be further demonstrated when the traffic density is not the same on each road. To illustrate this, we have varied the traffic density on one road starting from a very high arrival rate (smaller values ofr), namely, r = 1 to 20 sec. The other three roads are charged with low traffic density, namely, r = 30 (equivalent to one vehicle every 30 sec). The results are shown in Figures 13(a) and 14(a).Figure 13
The number of serviced vehicles using the Optimal Algorithm (OA), the Fixed-Time (FT), and the Proposed Algorithm (PA) when the road(s) has/have varying traffic density (varyingr from 1 to 20) and the other road(s) has/have constant low traffic density (constant r:30). (a) Fixing the arrival rate on three roads and varying the rate on the fourth road. (b) Fixing the arrival rate on two roads and varying the rate on the third and fourth roads equally. (c) Fixing the arrival rate on one road and varying the rate equally on the other three roads. (d) Varying the inter-arrival rate equally on all the four roads.
(a)(b)(c)(d)Figure 14
Average waiting time (AWT) using the fixed-time (FT) and the proposed algorithm (PA) when the road(s) has/have varying traffic density (varying r from 1 to 20) and the other road(s) has/have low traffic density (constant r:30). (a) Fixing the arrival rate on three roads and varying the rate on the fourth road. (b) Fixing the arrival rate on two roads and varying the rate on the third and fourth roads equally. (c) Fixing the arrival rate on one road and varying the rate equally on the other three roads. (d) Varying the inter-arrival rate equally on all the four roads.
(a)(b)(c)(d)This represents an actual situation for a specific type of traffic congestion, where only one road is very charged and the other intersecting roads are not. We have repeated the same scenario but by varying the traffic density on two roads and fixing the traffic density at a low rate on the other two roads. The results are shown in Figures13(b) and 14(b).Next, another simulation run is performed by varying the traffic density on three roads and fixing the traffic density at a low rate on the fourth road. The results are shown in Figures13(c) and 14(c). Finally, we have varied the traffic rate equally on all the roads from very high density (r = 1) to low rate (r = 20). The results are shown in Figures 13(d) and 14(d).Each subfigure in Figure13 shows the obtained number of serviced vehicles using the Optimal Algorithm (OA), the Fixed-Time (FT), and the Proposed Algorithm (PA) for each scenario. As you can see, PA outperforms the FT in the first three cases with a significant improvement, which is almost equal to that of the OA. For example, in the case when only one road has varied traffic density and the others have fixed low density, the number of serviced vehicles when r = 1 were: PA = 1754, FT = 786, and OA = 1774. This gives a percentage of 223% of serviced vehicles compared to FT.As the traffic density decreases, PA continues providing the performance of the OA; however, the FT continues to provide almost the same low number of serviced vehicles (around 780). When the rate is very low (r > 9), the total arriving vehicles is very low and thus all the algorithms give almost the same performance with a slight improvement of the PA over the FT. The upper bound that can be reached using FT is improved with the increase of the number of roads having varied traffic density as follows: 786, 1100, 1418, 1733 compared to 1754, 1738, 1730, 1733 for the PA.The proposed algorithm contributes to significantly reducing the Average Waiting Time (AWT) in the four cases as shown in Figure14. For Example, in the first scenario, when r = 3 the AWT is PA = 18 sec, FT = 655 sec. This means that the FT is providing AWT 36 times longer than the PA in this case. As expected, the AWT decreases with the decrease of the traffic density until a certain limit using the FT and the PA as shown in the four subfigures.The reason for this great improvement is as follows. In the FT system, the road will be open for a fixed duration even if no vehicles are waiting on the currently open road. Thus, for low traffic density, in the FT system, the intersection will remain idle (not servicing any vehicle) while other roads may have several waiting vehicles. This yields fewer serviced vehicles and more waiting time (delay). However, our proposed system will avoid this issue by minimizing the idle time of the intersection and dynamically switching to another road if there are no waiting vehicles in the open road. This maximizes the number of serviced vehicles and minimizes the average waiting time. When the traffic density increases on all the roads, the improvement decreases. The only case when the two systems give the same results is when all the four roads are crowded. In all the other cases, our system demonstrates an improvement.


## 5.4. Effect of Changing the Maximum Open Period and Green Time

We run different simulation scenarios to change the maximum open period,Tgmax, for the proposed algorithm and the Green period for the FT algorithm. However, the Green period of the FT algorithm does affect the number of serviced vehicles. As shown in Figure 15, the number of serviced vehicles is 800 for the FT algorithm compared to 1083 for both the OA and PA algorithms. Similarly, Figure 16 depicts that the average waiting time is significantly decreased when using PA. Tgmax has almost no effect on the AWT using PA. However, the AWT using FT increases with the increase of the Green period. As it is expected, for the number of serviced vehicles, this parameter does not affect and regardless of its value, the number of serviced vehicles using PA equals that of the OA. This is because the proposed algorithm calculates adaptively the optimal value to open the road according to the current traffic density on all the roads. Furthermore, in the case when there are no more vehicles on the open road, it closes this road immediately after waiting for the transition period. This also contributes to maximizing the number of serviced vehicles and in addition reduces the average waiting time significantly compared to the FT algorithm.Figure 15
Effect of changing the maximum open period,Tgmax, or the fixed green period in the FT algorithm on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 16
Effect of changing the maximum open period or the fixed green period in the FT algorithm on the average waiting time (AWT) using the FT and PA algorithms.


## 5.5. Effect of Changing the Minimum Open Period

Tgmin (Minimum Open Period) does not affect the performance of the FT algorithm. However, it has a significant effect on the PA. As shown in Figure 17, increasing this value beyond a certain threshold (depending on the traffic density) tends to degrade the performance of PA by reducing the number of serviced vehicles. This is also true for the AWT as shown in Figure 18. The AWT at 10 sec equals 70 sec using PA and 550 using FT. The AWT increased from 70 sec to 450 sec when the Tgmin increased from 10 sec to 100 sec. The reason for this considerable impact on both the number of serviced vehicles and the AWT is: by increasing the Tgmin, the intersection may stay idle without servicing any vehicle and thus increase the queue of waiting vehicles. This suggests that the recommended value of Tgmin must be as small as possible; however, it must be greater than the service time of the longest vehicle.Figure 17
Effect of changing the minimum open period or the fixed green period in the FT algorithm on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 18
Effect of changing the minimum open period on the average waiting time using FT and PA algorithms.Simulation results showed thatTrmax (the maximum close period) has a slight impact on the number of serviced vehicles using PA, as shown in Figure 19. Increasing Trmax decreases the AWT as shown in Figure 20. This parameter does not affect the FT algorithm. Smaller values of Trmax eliminate the optimization based on the traffic density on the roads and give priority to the starved roads by opening the roads having the maximum close time (equivalent to the red time). This in turn reduces the number of serviced vehicles and thus increases the AWT. For PA to give results that equal to the Optimal Algorithm, the value of Trmax should be greater than 70 sec.Figure 19
Effect of changing the maximum close period on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 20
Effect of changing the maximum close period on the average waiting time using FT and PA algorithms.


## 5.6. Effect of the Number of Roads (Phases) in the Intersection

To study the effect of the number of incoming roads (phases) at the intersection on the number of serviced vehicles and the average waiting vehicles, we have run different scenarios. Two of them will be presented here.First, we have set the same inter-arrival rate (same traffic density) on all the roads but by decreasing the traffic density with the increase of the number of roadsℛ using this equation, 30×ℛ−2. We have varied ℛ from 3 to 9. The results are shown in Figures 21 and 22. Ideally, for high traffic density, the number of serviced vehicles should be constant and equal to the OA for both the PA and FT. However, when the traffic density decreases by increasing r as shown in Figure 22, the number of serviced vehicles decreases and the PA outperforms the FT algorithm. Regarding the AWT, it decreases with the increase of ℛ and the PA is always lower than the FT as in Figure 21.Figure 21
Effect of changing the number of roads at the intersection (all the roads have the same traffic density that decreases with the increase of the number of roads) on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 22
Effect of changing the number of roads at the intersection (all the roads have the same traffic density that decreases with the increase of the number of roads) on the average waiting time.In the second scenario, we kept the traffic rate constant (r = 30 sec) for all the roads except for one of the roads where we simulated high traffic density (r = 2.5 sec). The results are shown in Figures 23 and 24. The number of serviced vehicles using PA equals that of the Optimal Algorithm. However, the FT can service almost half of those serviced by the Optimal Algorithm. Similarly, for small ℛ, the PA yields very low AWT compared to the FT. The performance of the FT improves gradually with the increase in ℛ.Figure 23
Effect of changing the number of roads at the intersection (one road has a high rate and the others have a low rate) on the number of serviced vehicles using the OA, FT, and PA algorithms.Figure 24
Effect of changing the number of roads at the intersection (one road has a high rate and the others have a low rate) on the average waiting time.


## 6. Conclusions and Future Directions

In this paper, we have provided an analytical study of all the services that can be provided by the proposed Intelligent Traffic Management System (ITMS). The proposed ITMS employs the existing IoV and VANET infrastructure to provide an efficient and intelligent traffic management system without incurring any further complexity of extra components or hardware or any special deployment. In addition, we provided the Smart Traffic Signal architecture and its operation that are suitable for the requirements of Smart Cities. Furthermore, we presented an adaptive algorithm to provide efficient and near-to-the-optimal traffic management for local intersections supporting any number of phases and fully parameterized. Moreover, we presented a simulator that we have developed that simulates the proposed algorithm to study its effectiveness compared to the fixed-time algorithm under different traffic conditions and in different scenarios. We have studied the effectiveness of our proposed system in different traffic scenarios including varied traffic conditions on each segment of the intersection, the minimum and maximum open time (virtual green time), the maximum close time (red time) which is used to prevent starvation, the number of roads, and the service time. Obtained results showed that our ITMS effectively outperforms the traditional traffic management systems with a considerable improvement in terms of the average waiting time and the number of serviced vehicles.Future work directions may include extending the proposed algorithm for global traffic management, including the optimization of all the intersections in Smart Cities. Furthermore, handling the pedestrian in the intersection using Vehicle-to-Pedestrian (V2P) communication and the wearables is one of the possible important future works. This may include the development of an extra communication model, namely, Pedestrian-to-Infrastructure (P2I). Another work direction is to use Deep Learning and AI in the optimization process for the traffic management process using the current location, destination, and speed of each vehicle to provide better and efficient traffic management.



---

*Source: 4037533-2021-05-27.xml*