Sunteți pe pagina 1din 6

2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

PLC Based Traffic Control System with Emergency


Vehicle Detection and Management
Shajnush Amir1, Mirza Sarwar Kamal2, Syeda Shabnam Khan3, K.M.A Salam4
Department of Electrical and Computer Engineering
North South University, Dhaka, Bangladesh
1
shajnush.amir@northsouth.edu, 2sarwar.kamal@northsouth.edu
3
syeda.khan@northsouth.edu, 4kazi.salam@northsouth.edu

Abstract— This paper depicts the design of an automated Additionally, mere simulation results [2], fail to illuminate the
traffic control system with a distinctive attribute of emergency full scenario of traffic control systems. Also systems that employ
vehicle control. Upon being interrupted by an emergency signal, Emergency signal detection based on specific radio frequency
the system automatically retains the state of the normal sequence transmission can contradict with broadcasting regulations of a
and gives the corresponding road a green light signal as long as the country [6].
emergency signal is high. As soon as the emergency signal becomes
low, the system instantly jumps back to the retained state of the RFID tags have long rad range, no line of sight requirement,
normal sequence. Emergency Signal detection is RFID based. The and can withstand harsh environments and can track objects in
system is designed using Programmable Logic Controller (PLC) real time. In the proposed system, a PLC based traffic control
ladder logic program. The system was implemented in a PLC system is developed. RFID tags are used to detect emergency
simulated environment. Later, it was tested in a hardware vehicles and activate the emergency protocol. In normal
prototype. The test results indicated that it can be implemented in operating conditions, the normal signal sequence is maintained,
the real world without altering the original code. This PLC based when the emergency protocol is activated, the state of the system
system can be used to replace the conventional traffic control just before emergency override is retained, when emergency
system. By including additional input and output modules into the state passes, the system returns to the exact state before the
PLC system, this system can be easily extended to dynamically emergency override. This ensures that none of the roads miss
manage the traffic system of an entire city. their signal sequence after the emergency sequence. Moreover,
a paradoxical situation arises when considering a situation when
Keywords—Traffic Jam; Traffic Control; Programmable Logic
Controller (PLC); Emergency Vehicle
two or more roads have emergency vehicle to clear because that
would turn on traffic flow for more than one road at the same
time. This problem has been resolved by implementing High
I. INTRODUCTION Priority Encoder in the system. The system was first simulated
Traffic congestion is a severe problem in many cities of the and then a prototype was developed
world today. The problem is particularly severe in developing
countries. Traffic congestion severely disrupts emergency II. SYSTEM DESIGN
vehicles especially Ambulances. Every year many patients die
on the way to hospitals as a result of wasted time in traffic jams. This paper attempts to design a traffic light control system
Other emergency vehicles like Fire Truck, Police patrols also for crossroads of four roads. The primary focus is to add a
struggle in their line of duty. Many researchers focused on traffic special feature of emergency control after developing a general
signal control system [1-7]. Many traffic control systems do not purpose traffic control system. The system has 12 lights
have special provisions for emergency vehicles [1,4,5]. Even operating. The sequence for each road is always green(G) to
though some systems employ emergency vehicles management, yellow(Y), then to red(R) and to green(G). On first startup, the
they do not retain the state before emergency resulting in turn system starts from road 1 with green light and all the others roads
loss in some roads of a junction [3,6]. In modern day scenario, with red light. Then sequentially, the green light moves from
this is a very important feature, especially for urban road 1 to road 2, then to road 3 and finally to 4. There is a timer
environments. Some systems require manual control which which resets after every cycle. When a Road is green, the traffic
introduces scope for human error [5]. Moreover, some systems flow is assumed to be as illustrated in the fig. 1. The green light
use mechanisms like weight machines to detect traffic density stays activated for 10s. The yellow light stays activated for 3s.
[5]. These mechanisms are expensive and require high As the system is a prototype, the timing limit of the lights can be
maintenance, which makes the system impractical for large scale changed accordingly without changing the program. On each
implementation. There are many different methods to road, there is a RFID sensor which will track any emergency
implement traffic control system. Some systems are PLC based vehicle with a RFID tag. The sensors are connected to the PLC
[1,2,4,5] while others are microcontroller based [3,6]. Both in such a way that they act as input signals to the PLC. There are
methods have their own advantages but PLC offers a wide area two scenarios in which an emergency vehicle can be detected in
expandability which is essential for traffic control systems. a road. For example, let us assume that in the first scenario, road

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1467


2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

1 is already green. Upon detecting an emergency vehicle, the


PLC will keep the green light of the road 1 activated and will
activate the red lights of the other roads. In the second scenario,
where the road 1 is red, and let us assume that road 2 is green.
Then the PLC will activate the yellow light of road 2 and keep
the other roads red. After 3s, the red light of road 2 will activate
along with the green light of road 1. The traffic flow directions
when green light of road 1 is active is as illustrated in fig. 2. In
both the cases, the green light of road 1 will stay activated until
the emergency vehicle leaves the road 1. As soon as the
emergency vehicle leaves road 1, the system will go back to the
retained state before the emergency input for road 1 was
activated.

Fig. 1. Traffic flow in a crossroad.

Fig. 3. Timing digram

From the timing diagram it can be seen that for the first 10s
G1 is active, followed by 3s of Y1, R1 stays off for the entire
13s. Next, G2 stays on for 10s and the cycle continues. From
this, 8 different states can be identified that can explain this
cycle. State 1 is when G1 is on, State 2 is when Y1 is on, State
3 is when G2 is on etc. So, 8 different states and their transitions
are identified as shown in fig. 4. S1 through S8 represent State 1
through 8 and T1 through T8 represent Transitions 1 through 8.
Additionally, S1 has a First Pass arrowhead which dictate that
whenever the system is powered on the system will always start
from S1.
Fig. 2. Traffic flow when road 1 is green.

First a timing diagram is derived as per the assumption of


specification of the traffic junction, i.e, 10s of Green followed
by 3s of Yellow followed by Red. The system always starts
operating from Road 1 by design. The timing diagram of the
prototype is illustrated in fig. 3.

Fig. 4. State diagram of the system

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1468


2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

The state table is then derived and is shown in Table 1. It ܵͶ ൌ ൫ܵͶ ൅ ܵ͵ሺܶ݅݉݁‫ ݎ‬൒ ʹ͵‫ݏ‬ሻ൯ ቀܵͶ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ʹ͸‫ݏ‬ሻቁ
shows the state of all the 12 light outputs and their corresponding
state 0 = Off, 1 = On. During state 1 G1 is on, G2 through G4 (12)
are off. R1 is off. R2 through R4 is on and all yellow lights are ܵͷ ൌ ൫ܵͷ ൅ ܵͶሺܶ݅݉݁‫ ݎ‬൒ ʹ͸‫ݏ‬ሻ൯ ቀܵͷ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ͵͸‫ݏ‬ሻቁ
off. In the same manner the state table is derived from the timing (13)
diagram.
ܵ͸ ൌ ൫ܵ͸ ൅ ܵͷሺܶ݅݉݁‫ ݎ‬൒ ͵͸‫ݏ‬ሻ൯ ቀܵ͸ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ͵ͻ‫ݏ‬ሻቁ
TABLE I. State Table
(14)
State G Y R G Y R G Y R G Y R ܵ͹ ൌ ൫ܵ͹ ൅ ܵ͸ሺܶ݅݉݁‫ ݎ‬൒ ͵ͻ‫ݏ‬ሻ൯ ቀܵ͹ ൅ ሺܶ݅݉݁‫ ݎ‬൏ Ͷͻ‫ݏ‬ሻቁ
4 4 4 3 3 3 2 2 2 1 1 1
(15)
1 0 0 1 0 0 1 0 0 1 1 0 0
ܵͺ ൌ ൫ܵͺ ൅ ܵ͹ሺܶ݅݉݁‫ ݎ‬൒ Ͷͻ‫ݏ‬ሻ൯ ቀܵͺ ൅ ሺܶ݅݉݁‫ݎ‬ ൏ ͷʹ‫ݏ‬ሻቁ
2 0 0 1 0 0 1 0 0 1 0 1 0
3 0 0 1 0 0 1 1 0 0 0 0 1 (16)
4 0 0 1 0 0 1 0 1 0 0 0 1
5 0 0 1 1 0 0 0 0 1 0 0 1 A simple algorithm is used to implement the emergency
6 0 0 1 0 1 0 0 0 1 0 0 1 protocol.
7 1 0 0 0 0 1 0 0 1 0 0 1
8 0 1 0 0 0 1 0 0 1 0 0 1 Algorithm 1 Algorithm for Emergency in road n

Input: Emergency input of road n


Subsequently, from the state diagram (fig. 4) the state
Boolean equations are derived. It can be seen from the state Output: Green light on in road n
diagram that S1 has 2 arrowheads going in and 1 arrowhead
going out. So, S1 is true when the system is already in S1 OR 1: if green light already on in road n
when the system was in S8 and T8 became true AND T1 cannot
be true OR a First Pass is detected. This is written as Boolean 2: continue green light until emergency input is on
equation (1). Using this logic all other state equations (2)
through (8) are derived as shown below: 3: else
ܵͳ ൌ ሺܵͳ ൅ ܵͺܶͺሻܵͳܶͳ ൅ ‫ݏݏܽܲݐݏݎ݅ܨ‬ (1) 4: change to yellow for 3 seconds in all roads except n
ܵʹ ൌ ሺܵʹ ൅ ܵͳܶͳሻܵʹܶʹ (2)
5: turn green light on in road n and red light in all other
ܵ͵ ൌ ሺܵ͵ ൅ ܵʹܶʹሻܵ͵ܶ͵ (3)
roads
ܵͶ ൌ ሺܵͶ ൅ ܵ͵ܶ͵ሻܵͶܶͶ (4)
ܵͷ ൌ ሺܵͷ ൅ ܵͶܶͶሻܵͷܶͷ (5) 6: end
ܵ͸ ൌ ሺܵ͸ ൅ ܵͷܶͷሻܵ͸ܶ͸ (6)
RFID sensors will act as inputs to the system.
ܵ͹ ൌ ሺܵ͹ ൅ ܵ͸ܶ͸ሻܵ͹ܶ͹ (7)
ܵͺ ൌ ሺܵͺ ൅ ܵ͹ܶ͹ሻܵͺܶͺ (8)
A paradoxical state would arise in the system if two or more
The state equations are dependent on the conditions of the emergency inputs turn on at the same time. To avoid this
transition. In this case, all the transitions will be time based and situation a 4:1 high priority encoder with enable bit is used to
can be easily computed from the timing diagram. For example, ensure that only one emergency input enters the system at a time.
T1 occurs after G1 is on for 10s and goes to S2. So, T1 is The EN bit of the encoder is set to be logical OR of all the
equivalent to Timer • 10s, in S2, Y1 is on for 3s and then transits emergency inputs so that the encoder is enabled when any of the
to S3, so T2 is equivalent to Timer • 13s etc. In this manner all emergency input is turned on.
the state equations are expanded. The transition conditions will
change according to need and design. The expanded state ‫ ܰܧ‬ൌ ‫ ͳݕܿ݊݁݃ݎ݁݉ܧ‬൅ ‫ ʹݕܿ݊݁݃ݎ݁݉ܧ‬൅ ‫ ͵ݕܿ݊݁݃ݎ݁݉ܧ‬൅
equations after application of De Morgan’s Law are as follows: ൅‡”‰‡…›Ͷ (17)

ܵͳ ൌ ൫ܵͳ ൅ ܵͺሺܶ݅݉݁‫ ݎ‬൒ ͷʹ‫ݏ‬ሻ൯ ቀܵͳ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ͳͲ‫ݏ‬ሻቁ ൅ A block diagram of the High priority encoder is shown in fig.
‫ݏݏܽܲݐݏݎ݅ܨ‬ (9) 5. The emergency road priority can be assigned as required.
Priority has been assigned according to road number, but with
ܵʹ ൌ ൫ܵʹ ൅ ܵͳሺܶ݅݉݁‫ ݎ‬൒ ͳͲ‫ݏ‬ሻ൯ ቀܵʹ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ͳ͵‫ݏ‬ሻቁ
the help of statistical data from actual implementation site,
(10) higher priority can be assigned to roads that are frequented by
ܵ͵ ൌ ൫ܵ͵ ൅ ܵʹሺܶ݅݉݁‫ ݎ‬൒ ͳ͵‫ݏ‬ሻ൯ ቀܵ͵ ൅ ሺܶ݅݉݁‫ ݎ‬൏ ʹ͵‫ݏ‬ሻቁ emergency vehicles.
(11)

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1469


2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

The flowchart signifies the operation of the emergency


protocol when any of the emergency signal is activated.

A. Hardware Setup
An Alan Bradley Micrologix 1200 PLC system is used to
prototype the system. Additionally, two Lab Volt Traffic Light
Module 3291 (fig. 7) has been used to simulate a 4 junction
traffic system.

Fig. 5. Block diagram of the encoder system.

The operation of emergency protocol is illustrated through a


flowchart in fig. 5.

Fig. 7. Lab Volt Traffic Light Module

B. Software Setup
RSLogix 500 is used to to develop the ladder logic code of
the system. Additionally, RSLogix Emulate 500 has been used
to test and troubleshoot the ladder logic program in a simulated
environment. A portion of the ladder program is shown in fig.
8.

Fig. 8. A portion of the ladder program.

This is the ladder logic equivalent of equation (10). Here it


can be seen that AND and OR logics are converted to relay logic
using series and parallel connection. In the first part, S1 switch
is in series with a comparator, which implements Timer • 13s
implementing AND, and they are in parallel with S2 switch
which then implements the OR logic. In this manner all the states
are coded into the system.

III. RESULTS AND DISCUSSION


Simulation results and prototype testing returned very good
Fig. 5. Flowchart of the emergency control system. results and matched with the initial design. A figure of a timing
diagram captured from a live test session is illustrated in fig. 9.

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1470


2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

Fig. 9. Time diagram from a live session.

The data is then labelled to confirm that the system is


working according to design as can be seen in from fig. 10. Fig. 11. Encoder operation in use

As illustrated in fig. 12, the system works according to


Algorithm 1 when emergency 4 is on and returns to retained state
after the emergency state passes. During the emergency, G2 is
turned off and all the roads have yellow on for 3s, then G4 is
turned on and all other roads have red lights on. After the
emergency it can be seen that the G2, which was stopped
unexpectedly during emergency is turned on and completes its
remaining allotted time. The level of each of the outputs are
same before and after the emergency. Verifying the retention of
the state before emergency.

Fig. 10. Timing diagram of the test session with labelling.

Fig. 12. Emergency Operation output


Comparing fig. 10 and the timing diagram of the initial
design fig. 3, it can be seen that the design and the output pules
are the same and the transition times also match. Out of 5696 bytes of Memory available in the Allan Bradley
Moreover, the emergency protocol works as planned and MicroLogix 1200 PLC, the developed system only required 475
does not run into a paradoxical state as seen from fig. 11. Even bytes which is a mere 8.3% of the total memory. Coupled with
though emergency 3 and 4 are on at the same time, the input is I/O expansion modules, the system can be expanded to
encoded and only emergency 4 is activated and G4 is turned on. accommodate 12 4-road cross junctions. Using larger PLCs that
are available today, the system can be implemented to control

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1471


2017 International Conference on Intelligent Computing,Instrumentation and Control Technologies (ICICICT)

about 1000 junctions. Therefore, the proposed system can be ACKNOWLEDGEMENT


used to cater to the control of city-wide traffic control. We would like to take this opportunity to express our sincere
In accordance with the results, the system prioritizes gratitude to Dr. K. M. A. Salam for his untiring support and
emergency vehicles and at the same time accommodates the guidance. We would like to thank Dr. Lamia Iftekhar for her
retention of original state so that the sequence of regular traffic sincere support. We are also much obliged to every one of the
flow is maintained. authors said in our list of sources without whose work we would
be at misfortune.
IV. CONCLUSION
REFERENCES
PLC Based Traffic Control System with Emergency Vehicle
Detection and Management system was first simulated and then
[1] Y. Liu and X. Chen, “Design of Traffic Lights Controlling System Based
tested in a prototype. Simulated results matched the design on PLC and Configuration Technology,” 2009 International Conference
perfectly and subsequently the prototype yielded desired results. on Multimedia Information Networking and Security, pp. 561–563, 2009.
The results showed that the emergency management algorithm [2] S. V. Viraktamath, P. Holkar, P. V. Narayankar, and J. Pujari, “Adaptive
works and is capable of retaining the state of the system before Intelligent Traffic Control System using PLC,” International Journal of
emergency protocol is initiated. The results confirmed that the Innovative Research in Computer and Communication Engineering, pp.
system is implementable in real world situations. At the present, 287–290, Jan. 2015.
the system uses predefined timing sequence for the traffic light [3] N. H. Kham and C. M. Nwe, “Implementation of Mordern Traffic Light
Control System,” International Journal of Scientific and Research
signals. In the future, the system can be developed to provide Publications, pp. 1–6, Jun. 2014.
adaptive control into the timing sequence so that it can alter the
[4] C. Barz, C. Todea, T. Latinovic, D. M. Preradovic, S. Deaconu, and A.
timing sequence of each road in response to the level of traffic Berdie, “Intelligent traffic control system using PLC,” IOP Conference
density on each road, providing congestion control feature. For Series: Materials Science and Engineering, vol. 144, pp. 1–7, 2016.
emergency vehicle detection RFID tag is used. RFID based [5] M. D. Srivastava, Prerna, S. Sachin, S. Sharma, and U. Tyagi, “Smart
system will be easier and cheaper to introduce in countries that Traffic Control System using PLC and SCADA,” International Journal of
regulate mandatory RFID license plate tags [8]. Modern systems Innovative Research in Science, Engineering and Technology , vol. 1, no.
involve, computer vision based traffic management system 2, pp. 169–172, Dec. 2012.
which achieve adaptive traffic control [7]. The developed [6] N. M. Z. Hashim, A. S. Jaafar, N. A. Ali, L. Salahuddin, N. R. Mohamad,
and M. A. Ibrahim, “Traffic Light Control System for Emergency
system initiates an approach to achieve the same goal but Vehicles Using Radio Frequency,” IOSR Journal of Engineering, vol. 3,
without the need for image processing. In a city, it was found no. 7, pp. 43–52, 2013.
that about 1277.5 million work hours are lost due to traffic [7] T. Osman, S. S. Psyche, J. M. S. Ferdous, and H. U. Zaman, “Intelligent
congestion [9]. Present work and future work on the system aims traffic management system for cross section of roads using computer
to achieve a city-wide deployable system and provide a solution vision,” 2017 IEEE 7th Annual Computing and Communication
to traffic congestion and save valuable work hours Workshop and Conference (CCWC), 2017
[8] “Digital licence plates mandatory from 2016,” The Financial Express -
bd, 14-Oct-2015. [Online]. Available: http://print.thefinancialexpress-
bd.com/2015/10/14/111890. [Accessed: 01-May-2017].
[9] S. Khan, “Economic loss of traffic gridlock,” The Financial Express - bd,
17-Jul-2014. [Online]. Available: http://print.thefinancialexpress-
bd.com/2014/07/17/45710/print. [Accessed: 01-May-2017].

978-1-5090-6106-8/17/$31.00 ©2017 IEEE 1472

S-ar putea să vă placă și