ANALYSIS AND OPTIMIZATION OF TRAFFIC CONGESTION AT SINGLE INTERSECTION USING MATLAB AND ARENA SIMULATION

Traffic jam is one of the most widespread problems commonly seen all over the world that causes loss of billions of dollars and useful hours per annum. Traffic lights are used at the intersections to manage the traffic flow, but one problem of those traffic lights is that the color changes at constant intervals irrespective of the traffic density or time of the day. As a result, the measure fails to keep the optimal traffic flow throughout the day at every convergence. This study describes a possible and effective method to systemize traffic lights by considering the traffic density for a specific time of the day. The range of idle time or waiting time within the queue is identified as a function of cycle time, effective green time and traffic arrival rate. After plotting the values within the graph, the trend is observed for idle time with reference to these variables. The lower and upper bound for these independent variables like cycle time, effective green time and traffic arrival rate are decided from observed data sets. As the idle time comes in the form of a range, an estimation of traffic congestion at a particular time is yielded from the method. This traffic flow is analyzed using Arena. The result of idle time using Arena is analogous with the previously analyzed model using MATLAB. Also, at the end of the study, a simulation video is generated that gives practical visual experience.


I. INTRODUCTION
With emerging economic development, vehicles maintain a substantial increase in quantity and as a result queuing phenomenon is so common in road traffic. The intersection is the main concentrated area of a stream of people and vehicles. It is one infrastructure construction of connecting the roads to make it work as an interconnected network. Generally, traffic congestion corresponds to the intersection directly which makes it evident that road intersections play a prime role in determining the traffic congestion situation depending on the road capacity and time of the day. Traffic control in an optimal manner at these intersections can be an effective way to reduce traffic congestions.
Traffic congestion has nowadays become one of the main hindrances in the big cities like Dhaka and Chittagong in Bangladesh. Mostly because of the high density of population and uncontrolled numbers of vehicles, the productive time loss due to congestion is counted in billions every year. There are many intersections in Dhaka, some of which are more important than others to control the overall jam in the city as those lie in the locus of the town. Traffic everywhere in Dhaka is controlled by the traditional way where the time of signaling is constant. It may not be the right approach as the traffic flow is not constant throughout the day and timing of the day must be considered as a variable. For example, usually, the entrance roads of educational institutes may be busy at the early hours of the day whereas in the evening the exits of office roads may be busy. This study focuses on an important intersection of Dhaka city to minimize the queue based on a simulation result. Here traffic flow analysis is done using MATLAB and Arena. MATLAB is used to find out the range of the waiting time and Arena, discrete event simulation and automation software, which is used to develop the optimized result and simulation of the traffic flow.
For accurate analysis of our data, it is important to know the distribution of the data set as the outcome of simulation highly depends on the nature of the distribution. In this study, after analysis, it is observed that the relevant data follow the Poisson distribution and the process utilizes Poisson Experiment that helps in getting outcomes occurring with this data set during a given time interval or in a specified region.

II. LITERATURE REVIEW
Level of service (LOS) can be measure by traffic delays and queues. [1] Signal timings can be derived by considering either a single or a set of intersections. These methods are called isolated methods and coordinated methods, respectively [2]. Delay minimization and capacity maximization are the most common objective functions used by pre-existing methods. Delay may be directly measured, leading to a data-driven approach, or estimated (model-based approach). The first approximate expression for the delay at an intersection was given by Webster [3], this expression is still widely used. Other expressions include those of Newell [4] Miller [5] and McNeil [6]. Viti [7] provides a review of delay models. Dion [8] compares the performance of different delay models. Arena simulation is used to suggest several optimal solutions to manage the traffic queue in the most densely traffic intersection in the Malang city, Indonesia [9]. Existing traffic was estimated and a preassigned speed was proposed to synchronize the traffic signal [10]. Fuzzy logic was developed to solve a linear programming traffic model to efficiently control the intelligent traffic lights [11]. Deep reinforcement learning is used to analyze the traffic flow. Three different methodologies are developed for comparative analysis [12]. A fuzzy c-means clustering algorithm was applied to classify the traffic flow pattern which eventually ameliorated the signal control and traffic capacity [13]. Vehicle to vehicle (V2V) and vehicle to infrastructure (V2I) was integrated into three simulation models to compare the system efficiency, total time, waiting time and WIP [14].

III. METHODOLOGY
Here Webster equation is used to find out the range of waiting time as a function of cycle time, effective green time and arrival rate. These independent variables are found by observation in six different distinct times in the day. Their lower and upper bound is used as a limit and using MATLAB maximum and minimum of waiting time is determined.
This new way to control traffic lights takes into consideration the arrival rates of vehicles at an intersection from different directions at different times. For this purpose, an area is chosen where the traffic flow needs to be optimized, all the mean arrivals rates at the intersections in that area are calculated and the nature of the distribution of the arrival rates is found out using the help of Chi-square formula. Then the Arena program is created showing the network, using the values as input and necessary logics so that the traffic flow is optimal and cars don't get piled up at any intersection and the resulting animation visually proves that. The way (duration of red and green lights) the traffic lights change in the animation is the proposed optimal way of controlling the traffic lights without the help of traffic police for that area for that particular time and it corresponds to the waiting time obtained from the simulation result. For the data collection, a fairly busy area (center at Latitude-23.73688613, Longitude-90.38740754) is chosen where a traffic jam is a common occurrence. At first, the widely used approximate delay formula is developed by Webster [3] from a combination of theoretical and numerical simulation approaches: where, d = average delay per vehicle (sec) c = cycle length (sec) g = effective green time (sec) x = degree of saturation (flow to capacity ratio) = S = departure (saturation) flow rate from queue during effective green (veh/sec) C = capacity rate (veh/sec, or veh/cycle, or veh/h) q = arrival rate (veh/sec) For this equation and from obtained data at different segments of the daily minimum and maximum waiting time at that segment is obtained. MATLAB is used to find the maximum and minimum waiting time for the range of arrival rate, effective green time and cycle length. Departure rate is assumed to be constant from different observations as all vehicles depart at the same rate when a green signal is on. Afterward, simulation is done to find the consistency of this result with the arena.
The probability distribution of the Poisson random variable X, representing the number of outcomes occurring in a given time interval or specified region denoted by t, is: where λ is the average number of outcomes per unit time, distance, area, or volume, and e = 2.71828… The mean values of arrival rates are calculated using the weighted mean method and its distribution is determined with the help of the Chi-square formula. The mean arrival rate: The test statistic follows the chi-square distribution, designated as χ2 Chi-square test statistic: With k-1 degrees of freedom, where: k is the number of categories f0 is an observed frequency in a particular category fe is an expected frequency in a particular category = 45 Now, it's needed to find the critical value corresponding to the chosen level of significance and degrees of freedom.
If the value of chi-square is less than the critical value, the null hypothesis is accepted, otherwise, its rejected. Here, the null hypothesis is that there is no difference between the observed and expected value.
After knowing the input data distribution and its mean value, the input is given to the Arena module and according to that, the output is achieved. The data follows the Poisson distribution as per the calculations mentioned above. The following assumptions are made in the intended model: Only two kinds of vehicles are available on the roads, vans, and trucks having an equal length.
All the vans/trucks have an equal uniform velocity of 25 km/h. Vehicle switching to each of the three routes is given by assumption.
The full Arena model (Figure 1) is developed for simulation. Here four individual networks denote four routes that meet at an intersection. The Poisson Mean of arrivals (interarrival time) is. So, the interarrival time of the vehicle comes from the science lab intersection is 1/2 sec = 0.00833 min.
The Poisson Mean of other arrivals is as follows. For calculating route time (the time is taken for an entity to move from one station to another), Given: The velocity of an entity = 25 km per hour. Distance between New Market East Intersection to Nilkhet West Intersection = 0.2 km. So, route time from New Market intersection to Nilkhet intersection = 0.2/25*60 = 0.48 min.
The parameters of the create modules of the top part are as follows (As the model considers two types of vehicles in the road so here two types of the entities are exhibited). The parameters of the route modules of the top part are as follows.  Here percentage indicates the priority of respective routes while switching from the intersection. Other decide module is made in the same fashion. All other modules are made in the same fashion. To represent this module combination or Arena flow chart in a practical scenario for visual representation a route is drawn (Figure 2) based on the concept of the module diagram. The program is allowed to run with an animation speed factor (Time Units Per Frame) of 0.00066736.

IV. RESULTS
From this data, a graph ( Figure 3) for identifying how idle time varies at different periods of the day is plotted. The graph shows the upward trend which indicates as the time proceeds towards the evening, vehicles wait longer and it becomes evident that vehicles are more likely to stack at a traffic jam at this hour. From this data, it can be estimated how much time one should keep in hand to reach a destination on time.
Another graph (Figure 4) for waiting times against arrival rates was plotted. From the data and graph, it is evident that waiting times increase with the arrival rates. Another graph ( Figure 5) was also plotted for waiting time against cycle length. From the data and graph, it is evident that waiting time increases as cycle length increases.   In another graph (Figure-06) for change of waiting time against effective green time, it is evident that waiting for time decrease as an effective green time increase. Next, the analysis of traffic flow and waiting time using Arena was done (Figure-07) and it was found that for a particular arrival rate, waiting time is quite analogous for both the cases.
For entity 1, the Poisson Mean of arrivals (interarrival time) is 1/λ. So the interarrival time of vehicle comes from New Market East Traffic (From Nilkhet west intersection)is 1/1.5 sec = 0.0111 min. For entity 1 from Arena simulation, we have found that it has minimum tends to zero min per vehicle and a maximum of 0.06998177 min per vehicle. This means it has to wait time minimum tends to zero sec per vehicle and maximum 4.1989062 sec per vehicle. This value has quite a similarity with.    This study shows how waiting time varies as a function of arrival rate, effective green time and cycle length. Webster's equation is used to illustrate this analysis and Arena simulation finds the consistency of the analysis and finds the optimal way to control traffic. But this model is not flawless, there are some limitations: • Here, the student version of Arena was used, which didn't allow adding many modules in the model which could make the simulation more realistic and descriptive. It can only accommodate 150 entities.
• This model is not a generic one irrespective of the area analyzed. For other areas, different traffic networks and arrival rates would have to be used.
• Again, in Webster's equation, to find the effect of arrival rate, effective green time and cycle length with waiting time one parameter is taken as variable and the rest are kept constant for every case for simplicity of analysis.
Although there are some drawbacks, this model gives a good scenario of traffic congestion and provides a method to optimize it. Further study can be done by taking larger areas into consideration, giving priority to the roads in a more realistic manner and, of course, considering a range of values for the different variables instead of its crisp mean value.