Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

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

net/publication/308571384

A Self-Adaptive Traffic Light Control System Based on Speed of Vehicles

Conference Paper · August 2016


DOI: 10.1109/QRS-C.2016.58

CITATIONS READS
23 680

3 authors, including:

Yuanrui Zhang Yixiang Chen


East China Normal University East China Normal University
12 PUBLICATIONS   44 CITATIONS    100 PUBLICATIONS   371 CITATIONS   

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Yuanrui Zhang on 13 May 2019.

The user has requested enhancement of the downloaded file.


A Self-Adaptive Traffic Light Control System
Based on Speed of Vehicles
Jinyang Li∗ Yuanrui Zhang∗ Yixiang Chen∗†
∗ School
of Computer Science and Software Engineering,
MOE Research Center for Software/Hardware Co-Design Engineering,
East China Normal University, Shanghai 200062
† Corresponding author. Email: yxchen@sei.ecnu.edu.cn

Abstract—With the development of economy and the improve- effectively alleviate traffic congestion, achieve optimal control
ment of people’s living standard, the number of vehicles in city of traffic light, and this is called self-adaptive traffic light
is growing rapidly, problems like congestion and environment control system. SCOOT [4] in England and SCATS [5] in
pollution, which caused by traffic, are becoming more and more
serious. ITS (Intelligent Transportation System) has become Australia are two famous and successful self-adaptive control
one of the hottest topics discussed by domestic and foreign systems in the world. These two systems are area-control,
researchers, and how to solve the traffic congestion problem besides them, there are self-adaptive control systems for single
is especially important in ITS. In order to improve traffic intersection. For instance, a self-adaptive traffic light control
condition in intersections, and to enhance traffic efficiency, a system using photoelectric switch to count the number of the
self-adaptive traffic light control system based on vehicle speed
is proposed in this paper. This system is an instance of V2I cars proposed by literature [6]; traffic light control systems
(Vehicle to Infrastructure) communication model, which realizes based on wireless sensor network mentioned in literature [7],
data transmission between vehicles and traffic light, using V2I [8]; and the fuzzy control system comes forward in literature
protocols. Vehicles send speed messages to the traffic light when [9]. However, these systems are mostly based on the number
passing the intersection, and the system control the traffic light of the cars to control, to a certain extent, the number of the
by analyzing vehicle speed and current state of the traffic light.
This system can improve the traffic capacity and ease traffic vehicles can not reflect the condition of the intersection.
congestion effectively. This paper focus on self-adaptive traffic light control system
for single intersection, and designs such a system that uses
I. I NTRODUCTION vehicle speed as a basis to control the signal. This system can
Transportation is closely related to people’s daily life, and change the status and time of the traffic lights dynamically
people are strongly dependent on transportation. Transporta- to avoid traffic jams. Also, once the traffic congestions occur,
tion system has been developing, but in most countries and this system can dredge crossing vehicle and ease congestion
cities, the speed of traffic construction is far behind the speed as soon as possible.
of the number of motor vehicles. The imbalance between This paper is organized as follow: Section II is about the
these two speeds leads to traffic congestion, traffic accidents, system design, which describes the scene the system applies
environmental pollution and other issues. And one of most to, the communication mode, and the system architecture.
serious is the problem of traffic congestion. Since a long time, Section III gives a detailed description of how the system
many domestic and foreign researchers have been committed is implemented, focusing on the control algorithm and its
to solve this problem. With the development of Intelligent simulation. Section IV sums up the paper work, and gives
Transportation Systems (ITS) [1], [2], many traffic control the next work about this system.
systems are proposed.
II. S YSTEM D ESIGN
At present, the process of the control algorithm used by
most traffic lights is: First, use sampling method to survey A. Scene Description
the information of traffic intersection. Then use the statistical This system applies to a single intersection. To reduce
theory to calculate the delay time of the traffic lights in two system complexity and make it easy to implement, we will
directions, and set the time in advance [3]. In this way, the not consider the case of a vehicle turning left or right, that is,
traffic lights adjust statically. But, in practice, the number and assume that every car runs straightly.
speed of vehicles in intersections are dynamic, there is a big This traffic light control system can receive two speeds of
difference between the traffic conditions in different time. So a vehicle in every direction: one is when the vehicle passing
the traffic lights with fixed time do not meet the needs of the intersection, the other is the speed of the vehicle on the
actual intersection. Therefore, we have to find an intelligent next section after the vehicle passes the intersection. Thus
traffic light control system, which can automatically adjust the the system can judge the traffic condition, and then gives
time span of the traffic signal according to the number and instructions to the traffic light, like extend the length of the
speed of the cars passing the intersection. This traffic light signal time, convert the traffic light, and so on. The role played
control system can minimize the number of stranded vehicles, by this system is equivalent to a experienced traffic police, who
can direct traffic according to the current situation and ease module for collecting and sending speed, location, direction
the congestion when it occurs. and other messages of the vehicles.
Under this architecture, the system activity can be described
B. Communication Mode as follow: The data collecting module keeps collecting vehicle
Vehicle to Infrastructure (V2I) [10], [11] is a concept from messages, including speed, location, direction, and so on.
Internet of Vehicles (IoV) [12]. V2I means the communication When the car runs into the system scope (maximum data
between vehicles and the road infrastructure. Road infras- transmission distance supported by system), the data sending
tructure includes road, streetlights, traffic lights, electronic module sends these messages to the data receiving module
barricades, etc. This system is a typical system of V2I mode. on the traffic light. The traffic light transfers the received
We can see from Fig. 1 that the system uses the star network data to the controller. The controller judges the condition of
topology, that is, every vehicle communicate with the traffic the intersection and take actions to give proper instructions
light in the intersection. There is no interaction between car according to the algorithm. At last, the light module extends
and car. Cars just send messages to the traffic light, and the the light time or converts the light. This series of activities are
traffic receive all these messages. iterative.
III. S YSTEM I MPLEMENTATION
A. Data Collecting Module
The data collecting and sending device in this system is
an On-Board Diagnostic (OBD) device [13]. It is invented by
National Trusted Embedded Software Engineering Technology
Research Center. This device can automatically fit a variety
of vehicle buses and finish data collection. We can directly
connect it to the OBD interface of the car. And it can sent the
data away after some configuration.
B. V2I Communication Module
Fig. 1: System Network Topology
1) Communication Device: We use ZigBee [14]Module as
the V2I communication module in this system. ZigBee is
C. Modular Architecture a short-range, low-power, low-cost wireless communication
Two main parts of the system are the traffic light and the technology. ZigBee can spread 30-50 meters away in the
vehicles. Every part can be divided into different modules room, and is able to reach about 100 meters outdoors. ZigBee
according to different functions. The modular architecture is has strong self-organizing, strong self-healing capabilities, big
shown as Fig. 2. network capacity and good communication reliability, so it can
meet the system requirements.
2) Data Format: The format of data that passed from
vehicles to the traffic light is defined as follow. A piece of
data has 19 bytes, Data[0] (the first byte) to Data[18] (the
last byte). Data[0] uses the fixed value 0x55, signifying the
beginning of the data. Next is vehicle ID, it takes two bytes.
Then is some information of the vehicle. 2 bytes for speed, 4
bytes for latitude, 4 bytes for longitude, and 4 bytes for driving
direction. The speed collected by OBD is integer, so it can be
directly converted to hexadecimal. Latitude and longitude are
5 decimal places, so we have to convert them to integer first
and then convert them to hexadecimal. Driving direction is
represented by azimuth angle, and we set due north to be 0
degree, due east to be 90 degrees, and so on. Also, we convert
them to hexadecimal. We use Data[17][18] as the end of a
Fig. 2: Modular Architecture data, using the fixed value 0x0D 0xAA. We use two bytes
here rather than one byte, because all the data are random,
The traffic light part includes data receiving module, control 0x0D and 0xAA may occur and disturb judgment, two bytes
module and light module. Data receiving module is responsible can reduce the misjudgement rate. The data format is shown
for receiving data sent over by the vehicles. Control module, as Table I.
or shortly, the controller, is in charge of data processing and The OBD sends data with above format, and when the
instructions sending. And the light module displays. On the control module receives the data, it parses the data and decodes
vehicles part, there are data collecting module and data sending the data with the same logic and gets messages.
Byte Number Length(byte) Content Algorithm 1 Traffic Light Control Algorithm
0 1 Head of data
1 2 Vehicle ID Input:
3 2 speed Speeds of different direction and location
5 4 Latitude
9 4 Longitude
Output:
13 4 Driving direction Light time
17 2 End of data 1: if the light is currently green then
↑ ↑
2: if (V+T > Vmax && VT > Vmax ) && (VO < Vmin )
TABLE I: Data format
then
3: check whether the remaining time is less than or
C. Control Module equal to 10 seconds, if so, add 10 seconds to green
time
1) Controller: Traffic light controller is the most important 4: end if
part of this system. The controller is responsible for executing ↑
5: if (V+T > Vmin && VT > Vmin ) && !Empty(T In )
the control algorithm and controlling the lights. && Empty(O In)) then
2) Control Algorithm: The main problem that the control 6: check whether the remaining time is less than or
algorithm needs to solve is how to judge traffic condition equal to 10 seconds, if so, add 10 seconds to green
according to speed information and to give correct instructions time
to lights. 7: end if

In our previous work, a simple algorithm is proposed. We 8: if V+T < Vmin && VO > Vmin then
just consider the traffic light in the east-west (EW) direction, 9: check whether the remaining time is greater than or
and the other is diametrically opposite to it. In other words, equal to 10 seconds, and whether the green light has
if the light in EW direction is green, then set the light in been maintained for at last 30 seconds, if so, turn
south-north (NS) direction to be red. green light to red
Now, we think about how to coordinate two traffic lights. 10: end if
The main of the control algorithm is: For both traffic lights in 11: if V↑T < Vmin && V↑O > Vmin then
EW and NS directions, if no special circumstance occurs, base 12: check whether the remaining time is greater than or
time for red and green lights is 60 seconds. We set two critical equal to 10 seconds, and whether the green light has
speeds Vmax and Vmin . Speed over Vmax indicates that the been maintained for at last 30 seconds, if so, turn
road is clear. And Speed below Vmin means congestion. We green light to red
control each traffic light according to speed and current light. 13: end if
If the current light is green, in two cases we need to extend the 14: end if
green time. One case is that this direction is clear, and the other 15: if the light is currently red then
direction is blocked. In this case, we extend the green time to 16: if (V↑T < Vmin ) && (V+ ↑
O > Vmax && VO > Vmax )
avoid the vehicles of the blocked direction running into the then
intersection. Another case is that this direction does not have 17: check whether the remaining time is less than or
congestion and there are cars going to pass the intersection, equal to 10 seconds, if so, add 10 seconds to red
while there is no car in the other direction. So we lengthen the time
green time to reduce waste of road resources. Once congestion 18: end if

occurs in this direction, whether in the intersection or the 19: if Empty(T In)&&(V+ O > Vmin && VO > Vmin ) &&
next section, turn the green light into red. If the current !Empty(O In ) then
light is red, basic conditions are similar to conditions under 20: check whether the remaining time is less than or
green. Before take actions to the lights, we need to check the equal to 10 seconds, if so, add 10 seconds to red
remaining time and how long has the light been kept. If the time
remaining time is greater than 10 seconds, we don’t extend 21: end if
the time. If the remaining time is less than 10 seconds, we 22: if V↑T > Vmin && O light==RED then
don’t shorten the time. Also we don’t convert a light unless it 23: check whether the remaining time is greater than or
has kept green or red for 30 seconds. This step is to avoid the equal to 10 seconds, and whether the red light has
waste of resources and lights switching too often. The specific been maintained for at last 30 seconds, if so, reduce
algorithm is defined in Algorithm 1. ret time by 10 seconds
a) Algorithm Analysis: This algorithm applies to both 24: end if
EW direction and NS direction. In the algorithm, the subscript 25: end if
capital letter“T” means“This direction”, while “O” means
“Opposite direction”. In EW direction, we consider about the
cars coming from west to east, and in NS direction, we take
cars coming from south to north into account. The superscript the car is in the next section. For example, if we take the
“+” means the car is in the intersection, while “↑” means traffic light of EW direction, V+T is the speed of vehicles
in the intersection in EW direction, and V↑O is the speed of Function 1: EW green p()
vehicles running out of the intersection from south to north. 1 f u n c t i o n i n t e r v a l =EW green p ( )
2 i f ( V c EW > MAX && V n EW > MAX && N S l i g h t ==RED &&
Empty(O In) means that there is no coming car in the opposite V n NS < MIN)
direction. O light stands for the traffic in the other direction. 3 i f ( EW int <= EW clock + 1 0 )
4 i n t e r v a l = EW int + 1 0 ;
In addition, the unit of speed is kilometers per hour (km/h). 5 else
And we set Vmax as 40 km/h and Vmin as 20 km/h. 6 i n t e r v a l = EW int ;
7 end
b) Algorithm Safety and Liveness: For an algorithm, 8 e l s e i f ( V c EW > MIN && V n EW > MIN && Empty EW in==0 &&
safety and liveness are two important properties to be con- ( N S l i g h t ==RED) && Empty NS in ==1)
9 i f ( EW int <= EW clock + 1 0 )
sidered. In this system, these two properties are defined as 10 i n t e r v a l = EW int + 1 0 ;
follow: 11 else
12 i n t e r v a l = EW int ;
• Safety Safety means the situation where both traffic 13 end
lights are green simultaneously is not allowed. Because 14 e l s e i f ( V c EW < MIN && V n NS > MIN)
15 i f ( EW int >= EW clock +10 && EW clock > 3 0 )
this situation may cause traffic chaos and accidents. 16 i n t e r v a l = EW clock ;
• Liveness The algorithm allows the appearance that traf- 17 else
18 i n t e r v a l = EW int ;
fic lights in both directions are red. This happens when 19 end
it is too crowded to let more car running in. Liveness 20 e l s e i f ( V n EW < MIN && V n NS > MIN)
21 i f ( EW int >= EW clock +10 && EW clock > 3 0 )
guarantees once this situation occurs, traffic light of one 22 i n t e r v a l = EW clock ;
direction can go back to green. 23 else
24 i n t e r v a l = EW int ;
To ensure safety and liveness, the algorithm has made some 25 end
26 else
description. For example, if both lights are red, and next 27 i n t e r v a l = EW int ;
section of one direction is not blocked, then reduce the red 28 end
time of that direction. Besides, the traffic light needs to obey
We generate speed of cars randomly for one hour, and
the following rules.
then see how the traffic light works. The random speed as
• Rule 1 If a red light needs to convert, but the other light input is shown in Fig. 4. From up to down, the sub-graphs
is green and is not going to change, then the red light has ↑ ↑
represent how V+ +
EW , VEW , VN S , VN S , Empty(EW In) and
to wait until the green light needs to convert too. Then Empty(NS In) change during this time. The result of the
two lights can convert at the same time. simulation is presented in Fig. 5. In this figure, the red solid
• Rule 2 If both traffic lights are red, and happen to want line represents the traffic light of EW direction, while the black
to convert at the same moment, then convert the light dotted line stands for the light of NS direction. At every point
which has been kept red for longer time. in time, the light takes one of two values, value 1 or value 0.
c) Algorithm Simulation: To verify whether the algorith- Value 1 means the light is green, and 0 stands for red.
m is correct, we simulate the algorithm with Simulink/MAT- To make it clear, we pick three regions as three cases among
LAB. We construct a simulation model shown in Fig. 3. This 3600 seconds.
model describes how the algorithm works. The system has • Case 1 First, we find at what time the traffic lights
three states, R G, G R and R R. The anterior letter represents convert for the first time. Fig. 6 shows that, at 32nd
the traffic light of EW direction, while the posterior one is second, the traffic light in NS direction becomes red,
of NS direction. The initial state is R G. At every second, and the other light converts at 41st second. At 31nd
the function random() generates four random numbers be- second, V↑N S is 13.2269km/h, which means it is blocked.
tween 0-70 for V c EW (stands for V+ EW ), V n EW (stands While V↑EW is 52.1285km/h and is expedite. It meets
↑ +
for VEW ), V c NS (stands for VN S ), V n NS (stands for the condition to convert from green to red, so the light
V↑N S ), and two random integers with value 1 or value 0 for converts. For the light in EW direction, after the NS traffic
Empty EW in (stands for Empty(EW In)) and Empty NS in light becomes red, at 32nd second, V↑EW is 54.6159km/h,
(stands for Empty(NS In)). If Empty EW in is assigned with is greater than Vmin , so the red time is reduced by 10
value 1, then there is no coming car in EW direction, and value seconds, at 33rd second, V↑EW is 31.2749km/h, the red
0 means there are some cars coming in. The model receive time is cut again to 40 seconds, so the light goes to green
these numbers as input, and then set interval time. If the at 41st second.
traffic light in EW direction is green, the interval time EW int Note the period from 32nd second to 41st second,
takes the return value of function EW green p(). Function during this time, both lights are red. The system reaches
EW green p() is defined in Function.1 . The definition of this R R state because the block of NS direction. Then
other functions, namely EW red p(), N S green p() and the red time of unblocked direction is shortened and the
N S red p(), are similar to that. So we omit those definitions. system transfer to G R state.
The variable EW clock and NS clock represent how long • Case 2 This case is where the time of light is length-
has the light been kept. If clock time equals to interval time, ened. As Fig. 7 shows, the traffic light in EW direction
the traffic lights make the corresponding transitions between keeps red for 70 seconds (from 2975rd second to 3045rd
states. second). After analyze the speed, we find that the light
Fig. 3: Simulation Model

Fig. 4: Random Car Speed


Fig. 5: Result of Simulation.
NOTE: Red solid line: traffic light of EW direction. Black dotted line: traffic light of NS direction.
Value 1: Green. Value 0: Red.

• Case 3 From 1740th second to 1801 second, the traffic


light of NS direction kept red for 60 seconds. This is the
normal situation because the light time is not extended
or shortened. At 1801st second, two lights convert at the
same time. That is the system transfers from state G R
to state R G. This case is shown in Fig. 8.

Fig. 6: Case 1: The first time that the traffic lights convert

time changes 7 times. At 3007th, 3009th, and 3035nd


second, the time is shortened, and at 3023th, 3031th,
3034st, and 3038th second, the time is added by 10
seconds. As a result, the final time of this period is 70
seconds.
Fig. 8: Case 3: The normal situation

The simulation indicates that this system can control the


traffic light dynamically according to the algorithm. Also, in
this simulation, no situation that do not conform the safety
and liveness occurs.

IV. C ONCLUSION
Traffic congestion is one of the most serious problems
now. In order to increase road capacity and alleviate traffic
congestion, we propose a self-adaptive traffic light control
system by using ZigBee, OBD, and other techniques. In this
Fig. 7: Case 2: The extended red time of EW direction
system, when a car comes into the system range, it will collect
and send speed information to the traffic light controller. The
controller receives the information and controls the traffic
lights according to the speed. A traffic light control algorithm
is proposed in this paper. And the simulation proofs the
correctness of this algorithm. Compared with the original fixed
time traffic light control system, this system can effectively
alleviate the traffic pressure, improve intersection capacity, and
bring convenience to urban transportation.
The existing shortcomings at present is that the turning of
cars are not taken into consideration. So, further refinement of
the system is needed.
ACKNOWLEDGMENT
This work is supported by National Natural Science
Foundation of China(No.61370100), Shanghai Knowledge
Service Platform Project(No.ZF1213), and Project support-
ed by the Shanghai Committee of Science and Technolo-
gy(No.14511100400).
R EFERENCES
[1] Masaki I, Demir R, Crawley E F. System design for intelligent trans-
portation systems[C] Intelligent Vehicles Symposium, 1996. Proceedings
of the 1996 IEEE. IEEE, 323-326, 1996.
[2] Na Zhao, Jiabin Yuan, Han Xu. Survey on Intelligent Transportation
System[J]. Computer Science, 41(11), 7-11, 2014.
[3] Jinliang Zhao. The Design and Realization of Self-Adaptive Crossing
Traffic Control System[J]. Journal of Taiyuan University of Technology,
44(4), 35-355, 2013.
[4] Robertson D I, Bretherton R D. Optimizing networks of traffic signals in
real time-the SCOOT method[J]. Vehicular Technology IEEE Transactions
on, 40(1):11-15, 1991.
[5] .Long Chen, Sendi Peng, Ming Wei. Study on optimal timing scheme of
SCATS[J]. Silicon Valley, (12), 186, 2010.
[6] Yiqing Song, Run Zhang. Design and Realization of Self-Adaptive Traffic
Light Control System[J]. Computer Measurement & Control, 16(4), 497-
499, 2008.
[7] Qingquan Li, Binluo Liu. Research on traffic light control system based
on Wireless Sensor Network[J]. Science & Technology Association Forum,
(6), 71-73, 2010.
[8] Khalil M. Yousef, Jamal N. Al-karaki, Ali M. Shatnawi. Intelligent Traffic
Light Flow Control System Using Wireless Sensors Networks[J]. Journal
of information science and engineering, 26(3), 753-768, 2010.
[9] Wenbin Ye. Design and simulation for real-time traffic flow control
model research based on traffic light[D]. East China Normal University,
Shanghai, 2015.
[10] Milanes V, Villagra J, Godoy J, et al. An Intelligent V2I-Based Traffic
Management System[J]. IEEE Transactions on Intelligent Transportation
Systems, 13(1), 49-58., 2012
[11] Yun Wei, Huaiwei Lu, Zhaohui He. Research on V2I communication
performance of intelligent traffic system based on OPNET[J]. Automation
& Instrumentation, (2), 8-10, 2015.
[12] Jianqiang Wang, Chenwen Wu, Xiaojun Li. .Research on Architecture
and Key Technologies of Internet of Vehicles[J]. Control & Automation,
27(4), 156-158, 2011.
[13] Long SunMengliang LiDa Xu. The Application and Development of
OBD Technology[J]. Auto Engineer, (10), 54-58, 2011.
[14] Hongquan Pu, Junying Jia, Xiaojiao Zhang, Jianwei Sun. A Survey on
ZigBee Network Technology Reaearch[J]. Computer Systems & Applica-
tions, 22(9), 6-11, 2013.

View publication stats

You might also like