Implementation of Dynamic Fuzzy Logic Control of Traffic Light with Accident Detection and Action System using iTraffic Simulation

ABSTRACT


INTRODUCTION
Many current traffic light controllers are based on the 'time-of-the-day' scheme, which implements a finite number of pre-specified pattern of a traffic light, and these patterns are carried out depending upon the time of the day [1]. This automated system is one of the essential reasons for the traffic congestion, and it does not provide an optimal control for fluctuating traffic volumes. That may cause a significant waste of material and human casualties [2]. To alleviate this problem, many traffic control systems have been developed with limited success. Thus, traffic demands are still high and increasing [3]. Traffic congestion has been increasing in much of the world developed or not, and everything indicates that it will continue to get worse, representing an undoubted menace to the quality of urban life [4].
Traffic congestion has been causing many critical problems and challenges. Because of these congestion problems, people lose time, get frustrated, and there is a loss of productivity from workers, opportunities are lost, delivery delays. Thus, the costs go on increasing [5].
Our proposed dynamic hybrid fuzzy logic control system considers traffic situations of both upstream and downstream, in order to solve the congestion related to the vehicular traffic by reducing average vehicle waiting time at a road cross. It is based on the idea of minimizing the vehicles waiting time at traffic lights according to the traffic volume. It also devises a solution for specifying the accurate roadblock location, that is caused by either an accident or a breakdown of a vehicle. The main parts of the proposed system based on the principles of Fuzzy Logic: the proposed DWDC Algorithm, Accident Detection system and the Action system.
The main focus of this paper is to discuss the Action system, which is depending on the Accident Detection system. So that Fuzzy Logic is part of the detection system and contributes to the action taken. The Action System provides improved performance in the accident road when one or more of other roads have traffic. It focused on controlling the priority of traffic flow on each road. It has intuitive to take an appropriate action to solve the congestion on the accident road compared with normal DWDC. Once the disturbance is detected, the Action Systems feeds inputs to recalculate the new Green Interval Value to facilitate smoother traffic flow that does not affect other lanes.
The action system proposed has two parts, downstream and upstream. The downstream action system will begin by performing a comparison between the DWDC results and the result produced by DWDC with Fuzzy Logic Action System. As for the upstream action, the number of zones affected by the accident is measured by this part, these zones lie before the accident, and then adjust the traffic green light interval.
Different scenarios will be presented using iTraffic simulation at the end of this paper. iTraffic measures the accuracy of the system by measuring false alarm rate and incident detection rate using the simulation software and enough experimentation.

BACKGROUND
Tavladakis and Voulgaris in China explained the development of an area-wide traffic control system in this paper. They developed a traffic control system that can fit in many conditions and places, where the traffic density is continuously measured. Traffic condition/status is the baseline function of this system. Four different modes can control the traffic in this system: 1) The classical control mode; time of day plans mode.
2) The mode that can be executed at periods that have little traffic; vehicle-actuated mode.
3) The mode that enables the traffic control center operator to change some network nodes signaling manually; direct from the central computer mode. 4) The mode that enables the system to be adaptive to the traffic; real-time control mode. Some traffic control systems such as adaptive traffic control system, cyclic systems and acyclic are also covered in this paper [6].
Ding Fang et al. in his paper proposes a Signal control schematic diagram of single four phase intersections by adopting a dual input and single output fuzzy controller consisting of 39 fuzzy conditional statements. The experiments based on the proposed algorithm the controller is capable of adapting to a realtime control strategy for the traffic light by considering waiting vehicles in the next phase and ensure efficient control strategy focused on vehicle flow [7].

RELATED WORK
Big cities usually face the problem of continuously increasing traffic. Therefore, recent studies concentrated on developing and proving the traffic light control systems to solve the traffic problems. Khalil, et al [8] proposed a designed system that is capable of utilizing and managing effectively the controllers of traffic light by the use of Wireless Sensor Network (WSN) and two new algorithms to control the traffic. As for Hajeeh [9], he conducted an analytic study on traffic accidents in Kuwait. The result of his analysis indicated the important of improving the traffic monitoring system and enforcing traffic regulations to minimizing the traffic problem.
In 2014, an automated street light control was proposed by Zhu, J., and C. Raison [10], in order to minimize the cost and energy consumed by the street lighting. The system is based on microcontroller and ZigBee wireless network. Radio frequency identification (RFID) and Wireless Sensor Networks (WSN) were used in detection of traffic flow. RFID transmits collected data of traffic flow to the control system and WSN uses a designed algorithm to control the traffic flow. This system was proposed by Chao and Chen [11].
Song and Qin [12] classified and analyzed the features of the traffic flow simulation models in their paper according to scalability, accuracy and computability into three categories. In addition, they pointed out the advantages and shortages of these models. In Mulung and Andino paper [13], a Systematic Monitoring of Arterial Road Traffic (SMART) signal was proposed in Brunei Darussalam. Artificial intelligence was used in the SMART to help making the appropriate action to manage the traffic.
In 2016, Uddin, et al [14] proposed the use of HOG and SIFT as a combined future in detecting of individual object in crowded area. In addition, Yusupbekov, et al [15] discussed an adaptive fuzzy-logic traffic control systems (AFLTCS) in their paper. The system is capable to deal with uncertain and unclear information in the scenario of heavy traffic streams.
According to Yuan and Feng [16], a laser scanning data was used in traffic information acquisition platform, which combined the information and communication engineering theory and technology of data traffic detection. The system can execute multiple functions in parallel; detection of vehicle speed, automatic recognition of vehicle type, statistics calculation of traffic flow, and detected data processing. A Fuzzy Intelligent Traffic Signal(FITS) control system was introduced by Jin, et al [17]. The system implemented a control based on fuzzy logic and its main objective is improving the infrastructure of the traffic light.
As for Solangi, et al [18], a solution for traffic congestion was proposed. Their proposed system is based on Field Programmable Gate Array (FPGA), which optimizes the traffic lights functionality by managing the traffic efficiently. An Android application, based on intelligent system, was designed on smartphone. It can recognize the character on vehicle number plate and it is called Automatic Number Plate Recognition (ANPR) [19]. Jin and Kosonen implemented an intelligent traffic system to control violation and congestion in traffic and to detect stolen vehicle [20].

ACCIDENT DETECTION/ACTION SYSTEM MAP
The fuzzy Logic Accident Detection System comprised two main parts: (1) detection system, and (2) action system. Figure 1 illustrates that the DWDC algorithm is a base for the fuzzy system to calculate the green interval and then modify it to optimize the response to the accidents. The subsystems of the Fuzzy logic collaborate in data exchange, so some of them perform data accumulation to present statistical information while the others are moving around in timely fashion to provide live feedback and respond dynamically to traffic updates. Even though with a hefty data flow rate in such a system, since it has many subsystems especially when it is linked to other exact systems on other intersections to work together, the design of our system guarantees that no data conflict, nor data redundancy, or unwanted information being dealt with.
The flow of the system begins with routine data about Cross-Ratio, Gap Filling and end with an Upstream and Downstream action. While Sensors are considered of the basic requirement of Fuzzy controllers, it is present whenever the term "fuzzy controllers" is used that includes the fuzzy controller sensors as well. Logically, the system will start by detecting an accident with DWDC is being executed at the same time, and then shift to the action system to update the values into DWDC in the Down Stream. Ultimately, DWDC is executed. However, the action system will decide whether modification of the values it produces is needed or not. The following are detailed components of both Accident Detection/Action and Accident Action system.

Accident Detection/Action Physical Components Communication
a) Fuzzy Controller: defined as Microcontroller that controls the Inputs/Outputs operations, the Controller Inputs are the sensors in the road, whereas the outputs are the Actions to the traffic light on the Upstream and Downstream. This is to be concluded that the Controller is linked to the sensors as well as the traffic light of both the Upstream and the Downstream in order to execute the required action. b) Fuzzy Sensors "Sensors for short": defined as Generic Sensors, which measure the time each vehicle took to pass over them, then this time will be compiled to speed depending on the speed of the road.

Accident Action System Components
The amendments done to both the upstream and downstream traffic lights are performed by the action system. Each traffic light is allowed specific time, called the state time; mainly the green time or the green interval is affected. Letting as many cars as possible according to the updated value of the street length is the task of downstream, which is, of course, the main goal of any traffic light system. The upstream action is forced no matter what is the status of the downstream "accident or no accident." This action is a force because if the downstream is already clogged with cars, then it is hopeless to let many cars pass the downstream. Here are elaborations on Downstream and Upstream Action Systems: a) Downstream Action System After gathering all required information regarding the accident, which is performed by the detection system, the action system executes two actions against the downstream and the upstream separately. The results from DWDC will be compared to the results from DWDC with Fuzzy Logic Action System; this step will be performed by the downstream action system.
At best, whenever an accident occurred, a logical sound will be produced providing higher priority to other lanes that are accident-free. As a consequence, this action will avoid the system from decreasing the overall cross ratio and preventing further damage to the intersection. Moreover, the more decrease in traffic congestion in other lanes will result in an increase in the probability of the lane with accident taking more Green Time than usual; this ultimately will result in smoother traffic flow that does not affect other lanes. However, Choosing DWDC over Fuzzy Logic in the above case will outperform the Fuzzy Logic system since the latter makes results that do necessarily help the intersection be less congested.
In contrast, to optimize the decision of DWDC algorithm to suit the new road, then applying a traffic light system with DWDC and accident detection will deal with the situation more logically. This is illustrated in Figure 2, where the number of cars estimated to pass with accident detection enabled is approximately equal to the number of cars that can pass without affecting the cross ratio.   The accident usually affects a number of zones; these zones are appointed before the accident. The upstream action is very easy; it will measure the number of these zones and the traffic light green interval will be adjusted as a consequence. Because of the accident, the lanes that lie before the accident will move slowly. This status will depend heavily on the nature of the accident, plus the location and how many lanes were affected. In the end, a full zone will move slower than usual, letting fewer car passes is ideal to allow more time for cars to be cleared from the downstream.  Figure 4 above shows the upstream calculation and the steps it follows to perform it. The first step is to measure the cross Ratio of the upstream. Then at the second step, the system calculates the number of zones accessible in the downstream. Then the system can open the green traffic light for the convein time that will allow some cars from the upstream to fit into the empty zones in the downstream. Figure 5 illustrates how the upstream system flowchart is performed. Just to account for times where fewer cars are allowed to pass by Webster comparing to Action system, which considers being rare, the number of passing cars to the downstream with Webster system will be compared again to the number of passing cars to the downstream with the fuzzy logic action system.

Accident action system using itraffic
The focus will be on the simulation-oriented action system. The action system is focused on controlling the priority of traffic flow on each road. This means that the system picks a particular road that seems worthy and gives it extra time to allow as many cars to pass resulting in an improved cross ratio overall. For example, if the system sees decreased cross ratio and after checking the roads discovers that an accident has taken place, it responds by trying to minimize the effects of this accident by maximizing the number of cars that can pass as much as possible. The accident generator in the iTraffic system is set to generate accidents with the following setup:  Figure 7. iTraffic with Action System Enabled Figure 7 and Table1 Shows iTraffic system with Action system enabled. The mark represents an accident on the Right to Left road. The system response is more apparent through statistics as it is usually hard to tell the adjustment by viewing the road. A quick overview of the Action system results for each zone is displayed in the Table 2: From the results overview, it can be concluded that the action system is better applied if the accident is on an uncongested street and the others are congested, Meanwhile, if the street is congested, and an  Table 2 the percentages mentioned the improvement of Action system which means (% of total car crossed with Action -% of the total car crossed without Action).
In the following sections, a description of each scenario is displayed with details about the road variables and the simulation results with and without the action system.

Scenario 1 Simulation Description:
Using iTraffic software chosen number of track = 4, and the RTL flow = 3600 car/h, LTR=3600 car/h, TTB=1000 car/h, BTT=1500 car/h. The cycle interval is = 120s, the yellow switch interval=3s, the red switch interval = 1s, and the minimum green interval = 2.5s. The method is "Dynamic Webster, Cycle & Accidents Detection", the accident interval = 90s, the accidents count=15. The road is "right to left", track=2, and the sensor = (R, Y, G) mean (Zone1, Zone3, Zone5), every sensor the first time with action system and the second time without action system. Default speed=60, safe distance=20. Last simulation period=30 minute. The total crossed car in saturation flow = 4850 car/0.5h.
Results: As shown in Table 3, DWDC with action system does a better job of letting as many cars pass as possible. Accidents that took place in Zone 1 tend to have the least effect on how different the results are between DWDC with action system and DWDC without action system. For example, the number of cars that passed, when zone 1 was affected, under DWDC without Action System is a bit smaller than the number of cars that passed with DWDC with action system. However, that difference shows significantly when the affected zone is the furthest away from the traffic, like zone 5, where the difference rises to almost 350 extra cars with action system enabled.
The closer the zone affected by accident to the traffic light, the smaller the improvement action system brings along. This concept is displayed clearly in the Table 3, in Zone 1 the improvement did not exceed .5% out of 100% while it raised dramatically in Zone 5 to reach 6.5%, almost 13 times greater than Zone 1. This implies that the system can react more effectively when it has a broader set of zones to control, while it is crippled whenever the number of zones it can control drops.

Scenario 2 Simulation Description:
Using iTraffic software chosen number of track = 4, and the RTL flow = 7200 car/h, LTR=3600 car/h, TTB=1000 car/h, BTT=1500 car/h. The cycle interval is = 120s, the yellow switch interval=3s, the red switch interval = 1s, and the minimum green interval = 2.5s. The method is "Dynamic Webster, Cycle & Accidents Detection", the accident interval = 90s, the accidents count=15. The road is "right to left", track=2, and the sensor = (R, Y, G) mean (Zone1, Zone3, Zone5), every sensor the first time with action system and the second time without action system. Default speed=60, safe distance=20. Last simulation period=30 minute. The total crossed car in saturation flow = 6650 car/0.5h. Results: This scenario displays essential attributes to take in consideration whenever trying to apply the action system on a particular road; these attributes are traffic flow and road congestion. In the simulated intersection, the number of cars flowing from RTL is 7200. At the same time, that road is the one containing the accident. When these two factors meet: a) Highly Congested Road b) Accident on that Road