Adaptive Traffic Light Controller Using FPGA
Adaptive Traffic Light Controller Using FPGA
Adaptive Traffic Light Controller Using FPGA
Abstract—Through this paper, the design of ATLC using congestion. [1] B. Dilip et al. have implemented FPGA based
Spartan 3E FPGA is presented. It adapts to the traffic based on advance traffic light controller which controls the traffic light
density and it prioritizes emergency vehicles like ambulance, fire based on traffic density. However, this paper does not allocate
brigades etc. Due to urbanization, the number of vehicles in appropriate time for green signal based on the density. Also, it
metropolitan cities has increased tremendously resulting in
does not function effectively when two or more roads have
increase in traffic congestion. Traffic control is a challenging task
since its proper operation can bring the difference between same amount of traffic. [2] D. Bhavana et al. have presented
smooth flowing traffic and a grid-lock. Generally, the traffic traffic light controller, wherein specific switching mechanism
signals are fixed-time signals which follow a pre-determined is used to control traffic effectively. [5] Sourav Nath et al.
sequence of signal operation, always providing the same amount have designed FPGA based intelligence traffic light controller
of time to vehicle movement whether traffic is present or not. for 12 roads with 6 traffic lights. [7] Shwetank Singh et al.
This consumes more time and doesn’t have any provision for have implemented FPGA based dynamic traffic controller
sensing and prioritizing emergency vehicles. This problem can be which alters the timing based on density of traffic. [8] Taehee
overcome by using adaptive traffic light controller implemented Han has implemented intelligence traffic light Controller
on FPGA. The system is designed to sense the traffic density and
(ITLC) with VHDL which saves time by allocating signal
the presence of any emergency vehicles on individual roads. Once
an emergency vehicle is sensed, priority is given to the traffic of timing based on the width of the road, but no provision to
that particular direction. During normal operation, the signal will detect the presence of ambulance in order to ensure smooth
be controlled based on traffic density. The system has been ambulance movement. The above methods for traffic control
designed using Verilog HDL and is implemented on Spartan 3E have dynamic allocation of time based on density but don’t
FPGA. This system overcomes the limitations of conventional prioritize any emergency vehicle in the road. The adaptive
TLC by efficient traffic road management. traffic light controller (ATLC) presented in this paper is
designed using less number of states compared to above
Keywords— Adaptive Traffic Light Controller (ATLC), Finite
mentioned papers. Also we have employed One-hot encoding
State Machine (FSM), Field Programmable Gate Array (FPGA),
Density Sensor (DS)
for the FSM states. This makes operation run faster. The
ATLC ensures smooth movement of emergency vehicles by
continuously checking for the presence of an emergency
I. INTRODUCTION vehicle and prioritizing the road with the emergency vehicle.
One of the greatest obstacles is applying sound principles to Adaptive traffic light controller reduces conflicts in an area
traffic engineering is that simply installing a traffic signal will that is shared amongst multiple intersections. This is done by
solve any traffic problem. The traffic control mechanism controlling the access to junctions and allocating effective time
currently being used doesn’t have a provision for ensuring period between various users. ATLC has been implemented
smooth movement of ambulance. During peak hours, when using FPGA. The advantages of using FPGA over
people are travelling, traffic will be maximum. The absence of Microprocessors are more number of input and output ports,
an effective ATLC system results in traffic jams. This could improved performance, high speed, design flexibility etc.
lead to loss of life due to the inability of the ambulance to which are all very important in ATLC design, at the same time
reach the hospital on time. The problem arises due to an it is cheap compared to ASIC since mass production of custom
imbalance in the traffic movement at the junctions which IC becomes prohibitively expensive due to small quantity.
causes major congestion on the affected directions. For this, II. BLOCK DIAGRAM
many ideas about the traffic control systems have come up in
the recent past to simplify the complex problem of the traffic
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.
The idea of ATLC is to develop a 24-hr traffic light controller The sensors placed for detection of ambulance are:
to manage the traffic movement of the roads at the same time, x Along N side: Z1
achieving maximum utilization of the roads and to ensure x Along E side: Z2
smooth movement of ambulance at the junction. Maximum x Along S side: Z3
utilization of the road is achieved by measuring the traffic
x Along W side: Z4
density with the help of sensors. The sensors are placed along
each side of the intersection at fixed distances from the signal.
All these sensors are interfaced to the controller (FPGA). The The road where an ambulance is detected will go green. The
block diagram of adaptive traffic light controller is shown in traffic signal at that road remains green until the ambulance
fig.1. Whenever vehicles reach the junction along each side, passes the signal. Otherwise, the traffic signal at the road
the sensor detects the vehicles and sends a signal to the which has the highest number of active sensors at a given
controller. Based on the number of sensors active along each instant of time will go green. The duration for which it
road the controller decides which of the four roads has more remains green depends upon the number of sensors active at
traffic and makes it green. The controller also determines the that road. The operation of the ATLC can be divided into three
time for which the signal will be green based on the number of modes:
active sensors. However, if an ambulance present at one of the
roads; the road where it is present will go green, ensuring it ¾ Emergency mode:
passes smoothly. When an ambulance is detected at any sides of the
roads at the intersection, the road where the
ambulance is present goes green. It remains green
until the ambulance has passed the signal.
III. METHODOLOGY
The road structure depicted in fig.2 has four traffic signals
across each road at the junction. The four traffic signals are
represented by N, E, S, and W.
Along each of these roads four sensors are placed at a fixed
distance from the traffic signal. These sensors detect the
density of traffic across each road.
1613
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.
The timing set for the ATLC is as follows: traffic at N and W sides, moderate traffic at E and S sides. Let
the number of active sensors at N, W, S, E side be 4,3,2,1
¾ Emergency mode: respectively.
Once an ambulance is detected:
GREEN First the traffic signal at N side will go green and will remain
The signal will be green for 6s before turning green for about 26s.The remaining roads remain red
amber meanwhile. Next the signal at W side goes Amber for about 3s
AMBER and then turns green. It remains green for 21s. Now the signal
at S side goes amber for 3s before going green for 16s. Finally,
The signal will be amber for 3s before turning
the signal at E side goes amber for about 3s and turns green for
green again.
11s. Fig.3. illustrates the flowchart of ATLC.
The cycle repeats until the ambulance passes the
signal.
No. of Timing
sensor/sensors
active
1 6s+5s=11s
2 6s+10s=16s
3 6s+15s=21s
4 6s+20s=26s
1614
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.
Fig.4 and Table.2 depict the state diagram and state transition
table of the adaptive traffic light controller respectively. S0 is
the default state. The comparison of density takes place in S9
state. Depending upon which of the roads have higher density
the state changes. Also, a delay is generated for green light
depending upon the number of sensors active. For instance, If
X1 is active the transitions take place from S0 to S1 and
finally to S2 where N turns green. Depending upon the number
of sensors active along the N side, a delay is generated. In case
of emergency if any of the roads have ambulance sensor active
then the transition will take place from the existing state to the
state where the road with the ambulance sensor active goes
green.
Table.2. State transition table
1615
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.
Testbench results:
Input Z4 is activated along west side indicating the presence of an ambulance/emergency vehicle. This road is given priority over
any other road and needs to be cleared first. This feature is demonstrated in both simulation and hardware
Case(ii) 3 sensors on East side and 4 sensors on West side are activated
Fig.8. 3 sensors on East side and 4 sensors on West side are activated
The ATLC compares all the four roads for maximum density and selects the road with four sensors activated. The green light will
be ON for 6 + 20s. The result is obtained as expected both in simulation and hardware.
Case(iii) Sensor Z2 is activated on East side and 3 sensors are activated on South side
1616
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.
Fig.9. Sensor Z2 is activated on East side and 3 sensors are activated on South side
Z2 is activated on East side and three density sensors are activated on South side. As the priority is given to ambulance over
density the ATLC selects the East side. The result is obtained as required both in simulation and hardware.
V. CONCLUSION
An Adaptive traffic light controller using FPGA has been [4] S. Nath et al., “Design of an Intelligent Traffic Light Controller
successfully designed, simulated, implemented and the desired with VHDL", International Conference on Radar, Communication
results are obtained. The system has been designed using and Computing, Pp.92-97, 21 - 22 December, 2012
Verilog HDL and is implemented on hardware on Spartan 3E [5] Sourav Nath, Suman Sau, Abhishek Roy, “Design of FPGA
Based Intelligence Traffic Light Controller”, Conference on Radar,
FPGA using Papilio One 500k FPGA Board. The traffic Communication & Computing, SKP College, Tiruvannamalai, TN,
density at each of the four roads is sensed and accordingly December 2012.
time is allocated to the signal with maximum density such that [6] Y.S. Huang et al., "Design and Analysis Urban Traffic Lights
the traffic at that road is cleared. This system provides an Using Timed Colour Petri Nets," IEEE International Conf. on
efficient way for allocating the time to signals depending on Networking, Sensing and Control, pp. 248-253, 2006.
density and also has a provision to detect and give priority to [7] Shwetank Singh, et al., "Design and Implementation of FPGA-
ambulance. It overcomes the limitations of conventional traffic Based Adaptive Dynamic Traffic Light Controller", International
controllers, with the capability of providing varying green Conference on Emerging trends in Networks and Computer
cycle interval based on dynamic traffic load changes at every Communication (ETNCc), ISBN-978-1-4577-0239-6, 2011.
[8] Taehee Han and Chiho Lin, "Design of an intelligence traffic light
lane. The design of the ATLC is easy to realize and Controller (ITLC) with VHDL", Conference on Computers,
implement. It provides a fast response time ensuring efficient Communications, Control and Power Engineering (TEN CON '02),
traffic management. This design can further be modified by Proceedings 2002 IEEE Region 10, vol 3, pp: 1749 -1752, Oct. 2002.
incorporating changes based on the topology of an area. [9] WM El-Medany and MR Hussain, “FPGA-Based Advanced Real
Traffic Light Controller System Design”, IEEE International
Workshop on Intelligent Data Acquisition and Advanced Computing
Systems: Technology and Applications 6-8 September 2007,
REFERENCES Dortmund, Germany.
[1] B. Dilip, et al.,”FPGA Implementation of an Advanced Traffic [10] M.F.M.Sabri et al., “Design of FPGA-Based Traffic Light
Light Controller using Verilog HDL” International Journal of Controller System”, 2011 IEEE International Conference on
Advanced Research in Computer Engineering & Technology Computer Science and Automation Engineering.
(IJARCET) Volume 1, Issue 7, September 2012.
[2] D. Bhavana et al., “Traffic Light Controller Using FPGA “Int.
Journal of Engineering Research and Applications, ISSN: 2248-9622,
Vol. 5, Issue 4, (Part -6) April 2015, pp.165-168
[3] Tseng S. T, Song K. T. “Real-Time Image Tracking for Traffic
Monitoring”, IEEE, 5th International Conference on Intelligent
Transportation Systems, 2002.
1617
Authorized licensed use limited to: University of Exeter. Downloaded on May 08,2020 at 13:34:18 UTC from IEEE Xplore. Restrictions apply.