0% found this document useful (0 votes)
38 views5 pages

Paper 50-Intelligent Traffic Light Controller Using Fuzzy Logic

Uploaded by

CARRILLO GABRIEL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views5 pages

Paper 50-Intelligent Traffic Light Controller Using Fuzzy Logic

Uploaded by

CARRILLO GABRIEL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/351263526

Intelligent Traffic Light Controller using Fuzzy Logic and Image Processing

Article in International Journal of Advanced Computer Science and Applications · May 2021
DOI: 10.14569/IJACSA.2021.0120450

CITATIONS READS
14 611

4 authors, including:

Abdelkader Chabchoub Ali Hamouda

14 PUBLICATIONS 37 CITATIONS
Jordanian Sudanese college
11 PUBLICATIONS 26 CITATIONS
SEE PROFILE
SEE PROFILE

Chrif Adnen
Science faculty of Tunis- University of Tunis manar
98 PUBLICATIONS 606 CITATIONS

SEE PROFILE

All content following this page was uploaded by Abdelkader Chabchoub on 01 May 2021.

The user has requested enhancement of the downloaded file.


(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 4, 2021

Intelligent Traffic Light Controller using Fuzzy Logic


and Image Processing
Abdelkader Chabchoub 1, Ali Hamouda2, Saleh Al-Ahmadi3, Adnen Cherif4
Physics Department, Faculty of Sciences of Tunis - University of Tunis El Manar, Tunis, Tunisia1, 4
Electronics Department, Madinah Technical College and Interserve Learning & Employment, Leeds, United Kingdom2
Electrical Department, Faculty of Engineering, Islamic University of Medinah, Medinah, KSA3

Abstract—Today's traffic congestion in the big city is a Our controller is designed with fuzzy logic control [9], and at
serious problem, as it causes a lot of environmental pollution and each stop there are multiple sensors and cams to capture photos
difficulty in transportation, which leads to difficult daily life for and images. The processing algorithm is used to detect the
the human beings in addition to material losses. In this work a number of vehicles in each direction. And we used an optical
smart traffic light controller was designed using fuzzy logic and sensor equipped with cameras to detect the number of cars
image processing with MATLAB, to control movement in two coming to the traffic light, and another to detect the number of
ways, aided by a camera and auto sensors. The Fuzzy logic has cars leaving. The number of cars in the signal can be calculated
two inputs and six outputs designed, the console input is the by subtracting the number of cars entering from the number of
number of cars on each road and the time of the assumed red,
the exiting ones[12]. This process is repeated for each road,
yellow and green signal according to the vehicles congestion. The
simulation result is similar to the proposed control unit, as it
and the total entries for the first and second roads are the fuzzy
deals with the lights simultaneously according to the number of
logic inputs. The fuzzy Controller is designed to estimate the
cars in each branch of the road, which leads to the use of all the traffic time according to the number of cars at each road
time to operate the stoplights. Our system can be employed in irrespective of the fixed time [1]. The simulation result shows
solving the problem of traffic congestion in the big cities or the an excellent result, and the program can be designed and run-
smart cities. on microcontroller of PLC and/or any other controller. Also,
instead of an optical sensor, a magmatic or ultrasonic sensor
Keywords—Traffic congestion; smart city; traffic light; fuzzy can be used. Many researchers and papers focused on the study
logic; image processing; objects detections of traffic light and control. Conventional traffic light control
system currently handles traffic at one junction. However, the
I. INTRODUCTION synchronization of traffic light systems still caused congestion
Traffic congestion in many modern cities around the world within them. This work proposes a system based on a
is a severe problem. Many critical problems and challenges are microcontroller that controls the intensity of traffic using
caused by traffic congestion in the large and densely populated infrared sensors and achieves dynamic time slots at different
urban areas moving to different places with the abundance of levels. Also, the portable controller will solve the problem of
cars in crowded cities will become more difficult [11]. Due to cars stuck in traffic, which will benefit the economy, society
these traffic problems, people lose time, miss opportunities and and the environment. This paper discusses a solution that uses
get disappointed. Overcrowding directly impacts companies. a Special Purpose Simulation Tool (SPS) to improve signal
Due to that, there is a loss in the productivity of workers, and light timing at multiple signal and intersections [2].
opportunities are lost, delivery gets delayed and thereby the Autonomous vehicle and driver assistance systems use various
cost goes on increasing. To solve efficiently these congestion sensors such as sensor and radar to detect their surroundings,
problems, we designed an intelligent traffic control system. but they cannot detect standard traffic lights. To solve this
The essential goals of this paper are to improve safety, problem, a previous map booth is used to predict the location
minimize travel time and increase the capacity of of traffic lights.
infrastructures [6]. Our case in Al Madinah, Saudi Arabia is Traffic congestion due to inadequate space and funds has
that there are unlimited visitors during the Haj and Umra led researchers to think of a solution to reduce it. The solution
seasons, which increases the traffic congestion. A proposed is using intelligent system. One of them is the use smart traffic
fuzzy controller to control the car stream and traffic congestion light (STL) and wireless sensors network (WSN) [3]. The
[10] is related to the number of cars and population and road WSN collects data about traffic lanes in real time in terms of
size in Al Madinah and Makah cites. They are a different case. traffic quantity (TQ) and waiting time (WT). It then computes
First at the end of working days, in the morning, during the end a priority degree (PD) that determines order of green light
of the weeks and holidays, a huge number of people come to assignment [4]. For the past years, traffic signal control system
the Al Haram. In addition, the unlimited number of cars which was static and not efficient. For a better traffic control, there
cause traffic congestion, and the number of visitors will be should be a more efficient and dynamic system that handles
increase in Ramadan and Haj seasons. For these reasons, traffic traffic easily and more safely. This system will be better
control is a big challenge for these two cites. Everyone can particularly in the performance of traffic intersections control
repeatedly see that there are really traffic problems. Our [5]. The main objective for this study is to introduce a new
proposal to solve this problem via using artificial intelligent. traffic signal controller based on fuzzy logic. In the second part

396 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 4, 2021

of the study, the before-after measurements are introduced.  The left and right turns are not considered.
This paper proposes a traffic signal synchronization system
which inputs real-time data using fuzzy logic. The paper also  Fog logic unit inputs from the first and second paths
uses Q-learning module, so the system learns by is self by taken from sensors and cameras.
updating the set of role base [8].  The picture is taken from every point of view and is
This paper is organized as follows. In Section 2, the usually from several cameras.
proposed modules will be presented with, in particular the B. Design of Fuzzy Logic Controller
intelligent fuzzy logic controller design. Section 3 describes the
membership function Triangular types of function are used. Two fuzzy logic controllers were designed for controlling
Section 4 presents the fuzzy rule base and establishment also the flow of two ways (road one RO1 and Road two RO2)
the result of MATLAB simulation. Fig.1, with six traffic signals (green one, green two, red one ,
red two ,yellow one and yellow two). The number of cars on
II. PROPOSED MODULES road one can be calculated by fixing a sensor 30m from the
signal. Road one is assumed with three sub roads with full
The present traffic light depends on fixed time for each capacity of 24 cars, and road two is assumed with two sub
road. The first road, Ro1, has three signals (R1, G1 and Y1);
roads with maximum capacity of 16 cars as represented of
the second road has three signals (R2, G2 and Y2). The
fuzzy logic input. There are many sensors at each road, and the
controller is programed with fixed time for each pair (R1and function of the sensor is to activate the camera to capture cars
G2) having the same time. Also (R2 and G1), the third signals
photos then process them to calculate the actual number of cars
yellow once both (Y1 and Y2) have the same timing at all time.
in the specific zone and activate the controller to adjust signals
The duration of each one is with a fixed time all the time, and it
time.
will be monitored just manually by a policeman. Our proposed
system (artificial intelligent control) is fuzzy logic controller C. Fuzzy Logic Input and Image Processing
with multiple sensors and cams distributed around the traffic The number of cars is a very important and complicated
signal at each direction. The function of each sensor is to sense topic. If any car appears in the cams zoom, the first optical
if there is a car or not and if any car entered the target zone, in sensor or ultrasonic or metal detection sensor is used to activate
which case the sensor activates the camera to capture a photo, the camera to capture a photo. for the specific. zoom in which
and the photo is processed and the number of cars on the photo the car is detected, then it is sent to the processor to filter , and
are calculated. The same mechanism is applied to each road, is converted to the black and White color. Then the surrounded
and the signal time for the road is not fixed. It depends on the edge is detected as in Fig.2. and the inter space is filed with
number of cars on each road at a time, and the time must be set identified color to calculate the number of cars. We can
by the fuzzy logic controller which depends on the design of calculate the number of objects on the processed image [13].
the fuzzy rules and the number of cars at each road. Fuzzy
logic has been used extensively to develop a traffic light
controller because it allows the qualitative modeling of
complex systems that are difficult to solve using classic
mathematical models. It is also good for systems that have
multiple changes at a specific time. Several researchers have
proposed traffic light control systems using fuzzy logic. They
proposed FLSC for a 4-way isolated intersection from East /
West / North and South without moving traffic. This generally
provides better performance for FLSC compared to fixed time
and actuated controllers. Today, all FLSC research work has
developed based on unstable traffic conditions especially in
developed countries, [7]. The main objective of this research is Fig. 1. Fuzzy Logic Controller.
to design an intelligent fuzzy logic controller to control four
way traffic light. MATLAB fuzzy logic and image processing
tools books were used for simulations to examine and analyze
the effectiveness of the proposed FLSC. Then, the optimal
performance of the proposed controller is typically contrasted
with an optimized fixed time.
A. Design Criteria and Constraints
The following assumptions have been made to develop a
fuzzy logic control system for traffic lights:
 Interchange: It is a four-way intersection between the
traffic coming from the direction of the first road (north,
south) and the second road (west and east).
 When traffic moves from north and south it stops from Fig. 2. Image of Cars on the Roads and Steps of Image Processing Filtering
west and east and vice versa. and Objects Detection.

397 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 4, 2021

III. MEMBERSHIP FUNCTION IV. FUZZY RULE BASE AND ESTABLISHMENT


In this work, we used a triangular membership function due The basic function of the fuzzy rule base is to represent the
to their computational efficiency. The membership function for expert knowledge in a form of IF-THEN rule structure
each input-output ambiguous variable in FLSC is as follows: combined with AND/OR operators [8]. For e.g., IF the number
of cars in road one is C3 and in the second road is C11, then
 Membership function for the number of cars on two the output of traffic signal is adjusted according to the number
roads. of cars in each roads Fig.5. The fuzzy rule base is set of fuzzy
(Road one RO1and Road twoRO2) rules. It maps the combination of fuzzy inputs (number of cars
on each roads) to the corresponding fuzzy output (signal times
 Membership function for the output traffic signal. of RYG) Fig.6. In this paper we consider different membership
(R1,Y1,G1,R2,Y2and G2) of cars number and different time zoon, changed according to
the Traffic congestion.
The number of cars on the first input Road one RO1 is {C1,
C2, C3, C4,C5,C6,C7 and C8}, the second roads RO2 In our work this with different inputs, the extension time (z
is{C11,C22,C33,C44,C55 }, the total capacity of the cars on axis) is small when the access density (y axis) is small, and the
the roads covered by the cams zooms are assumed to be 24 on queue side density (x axis) is also small Fig.7. This indicates
RO and 15 on RO2 respectively. Traffic signal time has profit for time, unlike the other method, where on the three
linguistic variables as in the Fig.3. The potential membership axes the growth is external time. In other words, the outside
function of the number of vehicles standing in line is time grows slowly because it is large only when the reach side
represented in the line at traffic lights as shown in Fig.4. After density increases, and the intensity of the queue side is
the sensor activates the camera to capture photos from the road, constant. Another advantage is if the access side density is
it is processed in many steps: first converted to black and constant and the queue side density increases, then the rollover
White photo, filtered and edged, detected and filed as objects time shifts to medium to short. This is an important difference
then functions are used to calculate objects on the road as in between the other methods, especially in the fixed time system.
Fig.2.

Fig. 3. Membership Function the Time of First Output Signal Divided into Fig. 5. Fuzzy Logic Controller with Two Inputs Cars on Two Roads and Six
Three Time Zone ( T1, T2 and T3). Output are the Timing of the Traffic Signal ( R1,G1,Y1,R2,G2 and Y2).

Fig. 4. Rules Viewer for the Fuzzy Logic with Two Inputs ( Cars on RO1
and RO2) and Six Output are the Timing of the Traffic Signal ( R1, G1, Y1, Fig. 6. Rules Viewer Representing the Input and Output of each Roads, if
R2, G2 and Y2). Each Time of the Signal can be Determined by Fuzzy Logic they are 24 Cars on RO1 and 15 Cars on Road Two then G1=R2= 45.9 sec,
Controller and its Function of the Number of Cars at each Roads. Y1=Y2=4 sec and G2=R1=27.6 sec.

398 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 12, No. 4, 2021

REFERENCES
[1] R. Yuliani Kartikasari, G. Prakarsa,and D. Pradeka, “ Optimization of
Traffic Light Control Using Fuzzy Logic Sugeno Method”, International
Journal of Global Operations Research, Vol. 1, No. 2, pp. 51-61, 2020.
[2] B. Ghazal, K.Elkhatib, K. Chahine , M.Kherfan, “Smart Traffic Light
Control System”, ISBN: 978-1-4673-6941-1 IEEE, 2016.
[3] Roxanne Hawi, George Okeye , Michael Kimwele ,”Smart traffic light
control using fuzzy logic and wireless sensor network ”, Computing
Conference, London, UK , INSPEC Accession Number: 17486620 ,
DOI: 10.1109/SAI.2017.8252137. IEEE, 2017.
[4] Kasun N. Hewage , Janaka Y.Ruwanpure, “Optimization of Traffic
Light Timing Using Simulation”, Proceedings of the Winter Simulation
Conference, DOI:10.1109/WSC.2004.1371482 , 2004.
[5] Nathanie Fairfield , Chris Urmson , “ Traffic Light Mapping and
Detection”, IEEE International Conference on Robotics and
Fig. 7. Output of the Read Signal of Rod Two and Green Signal of Road
Automation,2011.
One Both are Identical.
[6] Sweta Pandey, Pratistha Mathur ,Tejashri Patil ,” Real time traffic signal
control using fuzzy logic controller “,1st International Conference on
V. CONCLUSION Intelligent Systems and Information Management (ICISIM) INSPEC
The system proposed here is very flexible. The fuzzy logic Accession Number: 17411069 , DOI: 10.1109/ICISIM.2017.8122190,
IEEE, 2017.
controller inputs can be taken from images taken from cameras
fixed at each road. Due to the flexibility of fuzzy logic in [7] J. Niittyamki; V. Kononen , “ traffic light controller based on fuzzy
logic “ Smc conference proceeding ieee. IAN.6778203 , IEEE.
dealing with stochastic systems, the traffic light control system Nashville, TN, USA. 8-11 Oct. 2000.
showed good results in our simulations. The proposed FLSC is [8] V.Iyer ; R.Jadhav , U. Mavchi , J. Abraham, “ Intelligent traffic signal
operated properly and efficiently in MATLAB environment. synchronization using fuzzy logic and Q-learning “ International
This controller gives a suitable green flexible timing that Conference on Computing, Analytics and Security Trends (CAST),
depends on the number of cars in each road, which can ensure Pune, India,2016.
vehicles are not allowed to wait too long on the road. While in [9] Sandeep Mehan “ Introduction of Traffic Light Controller with Fuzzy
the case of fixed time controller green time cannot be changed Control System “, Dept. of ECE, RIEIT, Railmajra, Punjab, India, ISSN
: 2230-7109(Online) | ISSN : 2230-9543(Print), IEEE 2011.
automatically, our system will give the green time according to
[10] Yi Hu, CQU, Peter Thomas, Member, IEEE, and Russel J. Stonier,
the traffic congestion. So, arriving cars must activate the traffic Member, IEEE. “Traffic Signal Control using Fuzzy Logic and
signal time. The performance of the FLSC is affected by traffic Evolutionary Algorithms”. IEEE,2007.
congestion. The fuzzy logic control system has proven better in [11] M. B. Jensen, M. P. Philipsen, A. Møgelmose, T. B. Moeslund, and M.
terms of improving the flow of traffic lights in the cities of M. Trivedi, “Vision for Looking at Traffic Lights” ,pp 1800-1815,IEEE
Madinah and Makkah cities. In the future, this system will be Transactions on Intelligent Transportation Systems, 2016.
proven on datasets from other countries, and to provide better [12] Roul De Charette, Fawzi Nashashibi, “Traffic light recognition using
results it will include a tracking stage to determine the traffic image processing compared to learning processes,” pp. 333–338,
IROS’09, IEEE, 2009.
situation on the road before arriving at the traffic light is
reached. [13] S. K. Kwon, E. Hyun, J.-H. Lee, J. Lee, and S. H. Son, “Detection
scheme for a partially occluded pedestrian based on occluded depth in
lidarradar sensor fusion,” Optical Engineering, vol. 56, p. 1,2017.

399 | P a g e
www.ijacsa.thesai.org
View publication stats

You might also like