Mitigating Traffic Congestion at Road Junction using Fuzzy Logic

—The timing of traffic lights at intersections is determined by the Local Authority. It is based on the peak hour statistics and the timing is maintained even during an off-peak hour. This one standard green time will be used every time in a day regardless of the number of vehicles and the road width. This approach will have a long green traffic light even though the number of vehicles is only a few and hence, will cause a long waiting time at the intersections. Therefore, the aim of this study is to vary the timing of traffic lights at junctions according to the number of vehicles. This paper will also consider road width variable which have not been considered so far. Fuzzy logic rules will be used to classify the number of vehicles and road width and time taken for vehicles to move at the intersections which was proposed in a previous work. The new timing will commensurate with the number of vehicles and road width. Field test data were gathered from Sala Benda and Semplak intersections which are amongst the busiest intersections in Bogor, Indonesia. Comparisons were made and show that the green light timing obtained is appropriate to the two factors considered. Also the waiting time for vehicles in each traffic cycle was also reduced. This study have formulated an optimal green lights timing in each intersection and will be used by local authorities to determine the timing of green traffic lights at the intersection and hence, can implement traffic control and an appropriate waiting time.


I. INTRODUCTION
Monitoring and controlling city traffic are a big problem in many countries. Indonesia is one of the highest traffic conglomerates in the world with the capital Jakarta as the largest and densest urbanized area in Indonesia [1]. One of the causes of traffic congestion is the large population (4th place in the world) and an unbalanced distribution of the Indonesian population [2]. With the huge population and consequently increasing vehicle ownership on the highways and thus the need for traffic control on the highways, the Department of Traffic and Road Transport (DLLAJR), the Ministry of Transport as the main authority in Indonesia need to find new ways or steps to resolve this problem. The steps taken by the Ministry of Transport have included the development of new roads and bridges in the city center, the development of several highways in the city as internal, middle and outer lanes as well as public transport acquisitions such as Light Rail Transit (LRT), Public Transit (MRT) and various new mode buses namely Transjakarta, Transbogor. Given the rapid growth of population and large urban development as well as human activities and life spans, it is undeniable that almost every major city in Indonesia faces serious transport problems, including traffic congestion and delays, especially at intersections. Traffic congestion can cause many problems, and has the biggest impact that road users will face. Vehicles on the road will experience a deep decline in travel speed, requires longer travel time. The effect is that the cost of travel such as time, fuel consumption, wear and tear, carbon emissions and so on, must be borne by road users.
The road system of any country is basically a network of roads that cover all places and regions. The highways will be built to accommodate high traffic between major cities. From here, the highway will have several entrances and exits to connect business centers, residences, government administration offices and even schools or colleges. Therefore, the road system will have many intersections. The traffic light system is a means of traffic management at the intersection to provide a system of circular motion between the intersections of the intersection. With this movement system, it will reduce accidents and be organized as well as give you the right to cross at all intersections.
Local authorities in Indonesia refer closely the Manual Kapasiti Jalan Indonesia (MKJI) [3] or Indonesia Road Capacity Manual (IRCM) to determine the traffic lights timing at each junction which is a one standard time used throughout the day. The number of vehicles on the road varies to the time of day where a high number of vehicles can be seen in the morning for office workers commuting to work, the business traffic at mid-morning, lunch traffic and going home traffic. In between these times and also during the weekends, the traffic has a different profile throughout the day. This will result in long waiting time for junctions with fewer vehicles. Hence, it is hoped that with varying the green time according to the number of vehicles, the waiting time will be greatly reduced.

II. LITERATURE STUDY
This literary study will provide an overview of the setting of green lights followed by the discussion of traffic light modelling focusing on the classification of traffic light timing at intersections. And lastly, a review traffic monitoring methods at junctions. www.ijacsa.thesai.org

A. Overview of Green Lights Settings
In Indonesia, the timing of the traffic light at the intersection is determined by reference to the Manual Kapasiti Jalan Indonesia (MKJI) [3] or Indonesia Road Capacity Manual (IRCM) solely using one standard time. The manual explained that the average number of vehicles is the basis for determining the daytime green light setting taken during peak hour traffic. This means that the green light is fixed and does not change although the number of vehicles at a given time is fewer or greater than the peak time scenario. This will affect other junctions in the same intersection as more time are allocated to the branch [4] [5]. Also, it will cause a delay due to long waiting time in cases that there are few vehicles in the branch. Adjusting the green time according to the number of vehicles should be analyzed so that each junction of the intersection will be given an appropriate time to allow all vehicles to pass the junction. The author in [6] mentioned that the control at traffic lights is important but the author proposed using RFID. Data from traffic monitoring is in the form of vehicle densities, and current behavior of the junction must be captured in real-time.

B. Traffic Light Modelling
In an effort to mimic the behavior of traffic lights, mathematical models have been created and can be used to make theoretical models. The mathematical description of the general features of signal processing modeling has been studied for more than four decades [7]. Based on the traffic light model with image processing, it also uses an artificial intelligence model to determine signal lights. Fuzzy logic model [8] is a method of fuzzy inference system, in which the estimation of the behavior of the signal lights, and the accuracy of the model depends on the number of vehicles. The signal light controller is designed for crossing traffic based on a normal system using a single two-way intersection.
The system in Fig. 1 is an automatic signal transmission using an IR sensor and a Microcontroller. The top-down design approach is adopted [8]. This approach involves breaking down the system into smaller units to allow designers to gain more insight into the system. The system is broken down into several units which are Power Supply Unit, Control Unit and Sensor Unit. From the tests conducted on the circuit, it is observed that LEDs of the same color have the same time, and that each of the four poles of the traffic light controls, alternating and repeating until the circuit is disconnected from power. Sensors help in keeping the count of vehicles entering the road and the microcontroller then allocates an appropriate time delay as to give the right priority to each road. The microcontroller used is an optocoupler, used to provide coupling while ensuring electrical isolation between input and output. Another purpose of an optocoupler is to prevent rapid voltage or high voltage changes on one side of the circuit from transmission deviations or damage components on the other side of the circuit. This new design will reduce time delays, increase efficiency and reduce accidents by including modifications [8].
Other models for determining signal traffic using Fuzzy smart circuits are, the results of frequency simulation (number of cars completing cycles) per minute for predetermined (fixed) traffic control and fuzzy logic traffic control systems [9][10] [11]. According to analysis, the fuzzy logic traffic control system consistently performs better because it has a higher frequency (number of cars completing cycles) at a certain point in time. However, it should be noted that there are variations in performance at certain time points where the number of cars completing cycles is relatively higher for fuzzy logic traffic control systems than for pre-time (fixed) traffic control systems [12]. The researchers interpreted this finding as a further indicator of performance improvement in fuzzy logic traffic control systems based on estimates at certain points during high traffic density, so that the number of cars completing the cycle was slightly higher than the density in low traffic [13] [14].
TOPSIS Fuzzy Algorithm is a new method using problem solving to understand the human behavior on the decision making [1]. The TOPSIS Fuzzy Algorithm concept which must have the shortest geometry distance from the positive ideal solution and the longest geometry distance for the negative ideal solution. This fuzzy method determines the traffic lights by determining the length of the vehicle closest to the traffic light on. This study produces an optimal green light time but however only consider the number of vehicles in the branch only.

C. Traffic Monitoring
To determine the average traffic density, it is necessary to monitor the number of vehicles passing the highway [15] Monitoring is usually carried out by observers. The observers sometime will generate errors in the calculation process due to vehicle congestion, environmental influences or internal investigators themselves [17] [18]. In addition, human calculations require separate costs which indicate the implementation becomes less efficient [8]. Therefore, this study will also design and calculate the number of vehicles on the branch, using cameras and C ++ programming with the OpenCV library (18). OpenCV is used as its own subprogram or library which can be combined to be multiple functions in the programming which relates to digital image.
The author in [19] proposes a case in which the traffic junction topology monitoring will control traffic light systems. The system uses a camera which is connected to the computer and is place at the center of the junction and it has multiple sensors based on RFID. ZigBee traffic monitoring will be depending on the parameter used in the traffic monitoring. www.ijacsa.thesai.org Measurements are made to determine the number of vehicles, movement and classification of the vehicle at a certain location.
Another work by [20] is developed to combine the dynamic smart algorithm to monitor and predict the parameter strategy for traffic light. This system used wireless technology and low power energy. This system is going to be one of the traffic light systems that are very effective in Taiwan [8].
In discussing the traffic light system, there is a huge gap where road width was not considered when determining the green time. Therefore, a clearer and accurate determination of green timing at traffic lights that considers the number of vehicles and road width would appropriately reduce the traffic congestion due to ineffective green light timing is the main focus of this paper. This work will also consider the time taken to cross the junction based on values proposed by [1] [11] Fuzzy classification will be the focal of this work. By monitoring, examining and determining the number of vehicles that will pass the junctions and the road width, it can determine the green light time with respect to the NWHS proposed by [1] [21].

III. METHODOLOGY
The overall methodology is shown in Fig. 2 which illustrates the two inputs required that is the road width and the number of vehicles in the branch. The output is the appropriate green time at the intersection. The method will use image processing at the intersection to determine the number of vehicles and use Google maps to determine the width of the road. Both inputs will be used for the classification in Fuzzy logic which will determine various levels of membership, then will be used to determine the level of green time membership. The original equation in IRCM will be modified to include the road width criteria and the proposed NWHS from [1].

A. Fuzzy Rule Recommendations and Green Classifications
Fuzzy logic is one way to map the input space to the output space [4] [10]. The fuzzy logic has been selected to map data input points to membership values or referring to membership levels with fuzzy sets. The first step in computing is to create a set of fuzzy variables [22]. There are two input variables that have been indicated by their degree of membership, namely the number of vehicles (few, moderate and many), width of the road (wide, medium and narrow) [16] [23]. The green light output, on the other hand, is short, moderate and long membership. The fuzzy assembly for each variant is shown in Table I.  The inputs were further detailed as given in Table II. Determination of the number of vehicles from the camera, mapped to degree of membership is illustrated as a straight line using the data in the table. The number of vehicles were classified into three categories, namely, many, moderate and few vehicles; for example, many vehicles are in the range of 20 to 60 vehicles.
Road width (LJ) denotes the width of the road; however, further modification was used which is the LJ coefficient factor. This factor is based on the number of lanes that the width of the road can accommodate. Having several lanes in the branch will increase the number of vehicles to cross the junction at each click timing. For example, the number of vehicles to pass the junction is doubled if the LJ coefficient is 2. And the same calculation for other road width is given in Table II.
In this study, the value of NWHS as proposed by [3] where the average value of all possible types of vehicles on the road is used. The image processing capability will determine the number of vehicles only but not the type of vehicles that crosses the junction. From [1], car took 1.86 seconds to cross, the bus took 2.58 seconds while the truck took 2.77 seconds. Because vehicles on the road in Bogor are a combination of these three types of vehicles, they will certainly affect the short-term movement of vehicles. This is the reason why the NWHS value used in this work has been modified as the average time of all number of cars, buses and trucks take to cross the road and has a value of 2.73 seconds. This value was not considered in previous work. The following Fuzzy rules were used to classify the green time output for all JK and JK input conditions that were previously categorized as above. The Fuzzy Rule Recommendations for the green light consists of nine rules and are as follows: a) If the number of vehicles in the branch is many and the road width is wide then the green time is short. b) If the number of vehicles in the branch is many and the road width is medium then the green time is moderate. c) If the number of vehicles in the branch is many and the road width is narrow then the green time is long. d) If the number of vehicles in the branch is moderate and the road width is wide then the green time is short. e) If the number of vehicles in the branch is moderate and the road width is medium then the green time is moderate.
f) If the number of vehicles on the branch is moderate and the road width is narrow then the green time is long. g) If the number of vehicles in the branch is few and the road width is wide then the green time is short.
h) If the number of vehicles in the branch is few and the road width is medium while the green time is moderate.
i) If the number of vehicles on the branch is few and the road width is narrow then the green time is long.
The graphical representation of the nine rules is illustrated in Fig. 3.

B. Determination of Green Lights Time
From IRCM, the original equation did not consider the road width and since the number of lanes that can be determined based on the road width, therefore, the LJ coefficient factor is used and not the exact road width. Therefore, Equation  (1) is the equation used in Traffic Controller (TC) algorithm which uses two inputs that is the number of vehicles (JK) and LJ coefficient factor. The intersections to be studied are the Sala Benda and Semplak intersections. From Table II and the nine fuzzy rules, the green time for each class of vehicles (many, moderate or few) and each class of road width (wide, medium or narrow) will be calculated using Equation (1). Only the highest number of vehicles in each category are used (many=60, moderate=25, few=8) while the LJ coefficient factor will be 1, 2 or 3 depends on the road width at Sala Benda and Semplak intersections. These values were calculated for each input category of vehicles and road width. The output will be the three categories and the range of green time are short, moderate and long as given in the following and also follow the nine fuzzy rules and shown schematically in Fig. 3. The classification of green time is shown in Fig. 4, where it depicts the LJ coefficient of 1 and 3 only.

IV. RESULTS
Data collected from Sala Benda intersection are tabulated in Table III while Table IV has data collected for Semplak intersection. The number of vehicles and the timing of the green lights are recorded and road width is obtained from Google Map. These are the data for MKJI system. The results of the calculation of the number of vehicles at the crossing of the Sala Benda and the video capture were captured between 10:00 and 10:30 and the vehicle calculation is about 80% accurate.

A. Inspection at the Sala Benda Intersection
The Sala Benda has three branches and road width obtained from Google Maps is 6.96 meters for branch 1, 6.73 meters for branch 2 while branch 3 is 7.03 meters. Based on Table I, all 3 branches have LJ coefficient factor of 3. Data was collected at 9 am to 10 am and also at 12 noon to 1 pm and as shown in Table III.

B. Inspection at the Semplak Intersection
Semplak has four different branches and the width of the branch 1is 6.96 meters, branch 2 is 7.19 meters, branch 3 is 6.86 meters, and branch 4 is 7.11m obtained from Google Maps also. With these widths, the LJ coefficient factor is 3 for all branches. Refer Table IV. Notice that the green time for MKJI is also found at the intersection where the green time is constant in each branch despite the changing number of vehicles. This is the basic approach that is followed in MKJI.

C. Comparison between MKJI and TC
Using Equation (1), the green time of each simulation and for each branch were calculated as shown in Table V and  Table VI. The difference in green time using the MKJI and TCs are also given. The waiting time for both MKJI and TC were also shown which the total waiting experience by all branches for every cycle.
As illustrated in Table V, at Sala Benda, the green time depends on the number of vehicles in the branch and shows a difference in timing ranging from -9 % to -91%. As discussed in the literature, MKJI gets the green time during peak hour in a day. This means that the green time will not change if the number of vehicles decreases or increases, in other words MKJI is fixed throughout the day. For TC, the green time will change according to the number of vehicles queueing in each branch. Also shown in the same table is the waiting time for vehicles in the next branch waiting for the traffic light at their branch to be green. As illustrated, in Table VI, at Semplak intersections which has four branches, the green time depends on the number of vehicles in the branch and shows a percentage difference in timing ranging from +2 % to -73.16%. MKJI gets the green www.ijacsa.thesai.org time during peak hour in a day and this means that the green time will not change if the number of vehicles decreases or increases. In other words, MKJI is fixed throughout the day.
Comparing the waiting time at Sala Benda, the waiting time correspond to the number of vehicles in each branch. In other words, smaller number of vehicles will have a small green time and hence less waiting time. For the first simulation, branch 3 has to wait for a total of 81.9 seconds to start crossing the intersection for TC while for MKJI, vehicle in branch 3 has to wait for a total of 117 seconds. Other simulations also show the same profile and have less waiting time for TC compared to MKJI.

V. CONCLUSION
This project shows that incorporating the number of vehicles and road width in TC implementation, using fuzzy logic, have shown that optimization of green time at traffic lights can reduce congestion. The difference in green time obtained from the simulation compared to the field test at the intersection of Sala Benda is very significant with a range of difference from -9.00% to -91.0% and at the intersection of Semplak from + 2.05% to -73.19%. This shows that with the TC method, the green time at Sala Benda and Semplak intersections can be adjusted based on the number of vehicles and the width of the road in the field.
The findings of this study can also provide three classifications of green time at intersections using TC methods as the basis for the fuzzy rules used. This Fuzzy rule was formulated using three categories of the number of vehicles namely many, medium and few vehicles with road width input categorized into 1 lane, 2 lanes and 3 lanes. From here, based on TC, green time are classified as short time ranges from {7.3, 22, 54} seconds each for a width of 1 lane, 2 lanes and three lanes respectively; moderate time ranges from {11, 34, 82} seconds while the long green time times ranges from {22, 68, 164} seconds. This is in contrast to the MKJI which gives a green time day value for the whole day, regardless of how many vehicles are lined up at the intersection.
The proposed TC compared to the work of other researchers is much better in terms of green time. Previous work uses the input of the number of vehicles only, whereas the intersection of four branches is more complex. TC uses the number of vehicles and the width of the road. Incorporating road width in traffic light system has not been done in previous work proposed to reduce congestion. This work shows a good performance in terms of optimizing the amount of green time as needed, if the traffic light setting uses TC rules then the result is green time according to the number of vehicles and short waiting time in the next branch depending on the arrival of the vehicles in each phase.
Based on the classification of green time given in Section III(B), at Sala Benda and Semplak intersections, all timings can be classified to have short green time which ranges from 7.3 to 54 seconds.