Analysis & Optimization of Traffic Congesion at Single Intersection Using MATLAB &
Analysis & Optimization of Traffic Congesion at Single Intersection Using MATLAB &
Vol: 06
https://www.itegam-jetia.org
ISSN ONLINE: 2447-0228
DOI: https://dx.doi.org/10.5935/2447-0228.20200020
Rakesh Roy1, Sourav Kumar Ghosh2, Naurin Zoha3 and Mohammad Arif-Ul-Islam4
1
Jashore University of Science and Technology (JUST). Jashore-7408, Bangladesh.
2
Bangladesh University of Textiles (BUTEX). Dhaka-1208, Bangladesh.
3
Bangladesh University of Engineering and Technology (BUET). Dhaka-1000, Bangladesh.
4
Noakhali Science & Technology University (NSTU). Noakhali-3802, Bangladesh.
Accepted: Jun 18th, 2020 Traffic jam is one of the most widespread problems commonly seen all over the world that
Published: June 30th, 2020 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
Copyright ©2016 by authors changes at constant intervals irrespective of the traffic density or time of the day. As a result,
and Galileo Institute of the measure fails to keep the optimal traffic flow throughout the day at every convergence. This
Technology and Education of study describes a possible and effective method to systemize traffic lights by considering the
the Amazon (ITEGAM). traffic density for a specific time of the day. The range of idle time or waiting time within the
This work is licensed under the queue is identified as a function of cycle time, effective green time and traffic arrival rate. After
Creative Commons Attribution plotting the values within the graph, the trend is observed for idle time with reference to these
International License (CC BY variables. The lower and upper bound for these independent variables like cycle time, effective
4.0).
green time and traffic arrival rate are decided from observed data sets. As the idle time comes
https://creativecommons.org/licen
ses/by/4.0/
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.
automation software, which is used to develop the optimized result widely used approximate delay formula is developed by Webster
and simulation of the traffic flow. [3] from a combination of theoretical and numerical simulation
For accurate analysis of our data, it is important to know approaches:
the distribution of the data set as the outcome of simulation highly
depends on the nature of the distribution. In this study, after 𝑔 2 1
𝑐 (1 − 𝑐 ) 𝑥2 𝑐 3 2+5(𝑔)
analysis, it is observed that the relevant data follow the Poisson 𝑑= 𝑔 + − 0.65 ( ) 𝑥 𝑐 (1)
distribution and the process utilizes Poisson Experiment that helps 2[1 − ( ) 𝑥] 2𝑞(1 − 𝑥) 𝑞2
𝑐
in getting outcomes occurring with this data set during a given time
interval or in a specified region.
where,
II. LITERATURE REVIEW d = average delay per vehicle (sec)
c = cycle length (sec)
Level of service (LOS) can be measure by traffic delays g = effective green time (sec)
𝑞
and queues. [1] Signal timings can be derived by considering either x = degree of saturation (flow to capacity ratio) = 𝑐
a single or a set of intersections. These methods are called isolated S = departure (saturation) flow rate from queue during effective
methods and coordinated methods, respectively [2]. Delay green (veh/sec)
minimization and capacity maximization are the most common C = capacity rate (veh/sec, or veh/cycle, or veh/h)
objective functions used by pre-existing methods. Delay may be q = arrival rate (veh/sec)
directly measured, leading to a data-driven approach, or estimated For this equation and from obtained data at different
(model-based approach). The first approximate expression for the segments of the daily minimum and maximum waiting time at that
delay at an intersection was given by Webster [3], this expression segment is obtained. MATLAB is used to find the maximum and
is still widely used. Other expressions include those of Newell [4] minimum waiting time for the range of arrival rate, effective green
Miller [5] and McNeil [6]. Viti [7] provides a review of delay time and cycle length. Departure rate is assumed to be constant
models. Dion [8] compares the performance of different delay from different observations as all vehicles depart at the same rate
models. Arena simulation is used to suggest several optimal when a green signal is on. Afterward, simulation is done to find the
solutions to manage the traffic queue in the most densely traffic consistency of this result with the arena.
intersection in the Malang city, Indonesia [9]. Existing traffic was The probability distribution of the Poisson random
estimated and a preassigned speed was proposed to synchronize the variable X, representing the number of outcomes occurring in a
traffic signal [10]. Fuzzy logic was developed to solve a linear given time interval or specified region denoted by t, is:
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 𝑝(𝑥; 𝜆𝑡) = (2)
comparative analysis [12]. A fuzzy c-means clustering algorithm 𝑥!
was applied to classify the traffic flow pattern which eventually
For x =0,1, 2…
ameliorated the signal control and traffic capacity [13]. Vehicle to
where λ is the average number of outcomes per unit time, distance,
vehicle (V2V) and vehicle to infrastructure (V2I) was integrated
area, or volume, and e = 2.71828…
into three simulation models to compare the system efficiency,
The mean values of arrival rates are calculated using the
total time, waiting time and WIP [14].
weighted mean method and its distribution is determined with the
help of the Chi-square formula.
III. METHODOLOGY
The mean arrival rate:
Here Webster equation is used to find out the range of
∑𝑘𝑛 = 1𝑓𝑛 ∗ 𝑥𝑛
waiting time as a function of cycle time, effective green time and 𝜆= (3)
arrival rate. These independent variables are found by observation ∑𝑘𝑛 = 1𝑓𝑛
in six different distinct times in the day. Their lower and upper
bound is used as a limit and using MATLAB maximum and The test statistic follows the chi-square distribution, designated as
minimum of waiting time is determined. χ2 Chi-square test statistic:
This new way to control traffic lights takes into
consideration the arrival rates of vehicles at an intersection from (𝑓0 − 𝑓𝑒 )2
𝑥 2 = ∑[ ] (4)
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 With k-1 degrees of freedom, where:
nature of the distribution of the arrival rates is found out using the k is the number of categories
help of Chi-square formula. Then the Arena program is created f0 is an observed frequency in a particular category
showing the network, using the values as input and necessary logics fe is an expected frequency in a particular category
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 𝑓𝑒 = 45𝑝 (5)
way (duration of red and green lights) the traffic lights change in
the animation is the proposed optimal way of controlling the traffic Now, it's needed to find the critical value corresponding
lights without the help of traffic police for that area for that to the chosen level of significance and degrees of freedom.
particular time and it corresponds to the waiting time obtained from If the value of chi-square is less than the critical value, the
the simulation result. For the data collection, a fairly busy area null hypothesis is accepted, otherwise, its rejected. Here, the null
(center at Latitude- 23.73688613, Longitude- 90.38740754) is hypothesis is that there is no difference between the observed and
chosen where a traffic jam is a common occurrence. At first, the expected value.
35
Roy et al., ITEGAM-JETIA. Vol. 06, Nº 23, pp 34-40. June, 2020.
After knowing the input data distribution and its mean All the vans/trucks have an equal uniform velocity of 25
value, the input is given to the Arena module and according to that, km/h.
the output is achieved. The data follows the Poisson distribution as Vehicle switching to each of the three routes is given by
per the calculations mentioned above. The following assumptions assumption.
are made in the intended model: The full Arena model (Figure 1) is developed for
Only two kinds of vehicles are available on the roads, simulation. Here four individual networks denote four routes that
vans, and trucks having an equal length. meet at an intersection.
36
Roy et al., ITEGAM-JETIA. Vol. 06, Nº 23, pp 34-40. June, 2020.
The Poisson Mean of arrivals (interarrival time) is. So, the For calculating route time (the time is taken for an entity
interarrival time of the vehicle comes from the science lab to move from one station to another), Given:
intersection is 1/2 sec = 0.00833 min. The velocity of an entity = 25 km per hour.
The Poisson Mean of other arrivals is as follows. Distance between New Market East Intersection to
Nilkhet West Intersection = 0.2 km.
Table 1: Poisson Mean of arrivals. So, route time from New Market intersection to Nilkhet
Location New New New New Market intersection = 0.2/25*60 = 0.48 min.
Market Market Market West Traffic The parameters of the create modules of the top part are
North East South as follows (As the model considers two types of vehicles in the road
Traffic Traffic Traffic so here two types of the entities are exhibited).
New Market
Entity 1 Expression POIS (0.0111) Minutes Infinite 0
East Traffic
New Market
Entity 2 Expression POIS (0.00833) Minutes 1 Infinite 0
South Traffic
The parameters of the route modules of the top part are as Here percentage indicates the priority of respective routes
follows. while switching from the intersection. Other decide module is
made in the same fashion. All other modules are made in the same
Table 3: The parameters of the decide modules. fashion.
Route
Name Units Station name
time
Nilkhet west
60
intersection
Figure 2: Route diagram of Arena simulation.
New Market N-way by 30 Science Lab South Source: Authors, (2020).
West Decide chance Intersection
To represent this module combination or Arena flow chart
10 New market south in a practical scenario for visual representation a route is drawn
exit (Figure 2) based on the concept of the module diagram. The
program is allowed to run with an animation speed factor (Time
Source: Authors, (2020). Units Per Frame) of 0.00066736.
37
Roy et al., ITEGAM-JETIA. Vol. 06, Nº 23, pp 34-40. June, 2020.
IV. RESULTS
Waiting Time vs Cycle Time Graph
From this data, a graph (Figure 3) for identifying how idle 20
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. 18
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 16
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
14
increases.
Waiting Time(sec)
10
14
12
10 8
Waiting Time
8
6
6
4
2
0 4
0 2 4 6 8
Period (Different Time of The Day)
Figure 3: Waiting time at different period of the day. 2
Source: Authors, (2020).
38
Roy et al., ITEGAM-JETIA. Vol. 06, Nº 23, pp 34-40. June, 2020.
12
10
8
6
4
2
0
0 20 40 60 80
Effective Green Time (sec)
39
Roy et al., ITEGAM-JETIA. Vol. 06, Nº 23, pp 34-40. June, 2020.
VI. REFERENCES
40