You are on page 1of 5

Journal of Applied Computer Science & Mathematics, no.

15 (7) /2013, Suceava

A Traffic Prediction Algorithm for Street Lighting Control Efficiency


1
Alexandru LAVRIC, 2Valentin POPA
1,2
Stefan cel Mare University, Computers, Electronics and Automation Department, Suceava, Romania
1
lavric@eed.usv.ro

Abstract–This paper presents the development of a traffic on the presence of vehicles and thus allowing for a further
prediction algorithm that can be integrated in a street lighting reduction of power consumption. Thus, when the presence of
monitoring and control system. The prediction algorithm must a vehicle is detected, the node will turn on the lamps at a
enable the reduction of energy costs and improve energy light intensity that can be set by the user. This paper presents
efficiency by decreasing the light intensity depending on the
traffic level. The algorithm analyses and processes the
the development of a traffic prediction algorithm that can be
information received at the command center based on the integrated in a street lighting monitoring system.
traffic level at different moments. The data is collected by The prediction algorithm must enable the reduction of
means of the Doppler vehicle detection sensors integrated energy costs and improve energy efficiency by decreasing
within the system. Thus, two methods are used for the the light intensity depending on the traffic level. The
implementation of the algorithm: a neural network and a k-NN algorithm must analyze and process the information received
(k-Nearest Neighbor) prediction algorithm. For 500 training at the command center on the traffic level at different
cycles, the mean square error of the neural network is 9.766 moments. This information is obtained using Doppler vehicle
and for 500.000 training cycles the error amounts to 0.877. In detection sensors integrated into the system. Thus, two
case of the k-NN algorithm the error increases from 8.24 for
k=5 to 12.27 for a number of 50 neighbors. In terms of a root
methods are used for the implementation of the algorithm: a
means square error parameter, the use of a neural network neural network and a k-NN prediction algorithm. There are
ensures the highest performance level and can be integrated in several papers in the scientific literature [16] - [24],
a street lighting control system. addressing traffic prediction algorithms but none of them
addresses their integration in a lighting control system to
Keywords: street lighting control; traffic prediction increase energy efficiency.
algorithm; neural network; dimming;
II. THE TRAFFIC PREDICTION ALGORITHM
I. INTRODUCTION
The system is equipped with a Doppler sensor that detects
The reduction of energy consumption is an increasingly the presence of vehicles and can be used for determining
debated issue at a European level [1]. Street lighting is traffic levels so that local government structures can take
designed to meet the requirements of local communities. The measures to reduce congestion. Thus, each sensor counts the
energy consumption per each lamp or possible energy losses number of vehicles that pass by during a certain period of
are also rather unknown [2]. Street lighting systems time (e.g. one hour) and the information is saved in a
administrators rely on the citizens, or on regular check-ups database. A first stage of the algorithm involves the use of
for the detection or reporting of the potential malfunctions, the information stored in this database for making forecasts
since there is no automatic lamp monitoring and control regarding the number of passing vehicles during different
system. Another problem would be the need to adjust the time intervals. Fig. 1 presents logical operations of the traffic
luminosity level depending on the changes in the prediction algorithm which include building the model,
environment, such as traffic levels. checking the accuracy of the generated model and eventually
Some related papers present and analyze various aspects applying the model to the data set.
of the street lighting monitoring and control systems [3] - The accuracy of the model increases with the number of
[15]. records in the database. The Rapid Miner [25], which is a
In a related work [3], we have presented the hardware and type of open-source software designed for data processing, is
software implementation of a street lighting monitoring and used for building and testing the model. The design of the
control system. The system includes: a street lighting LED algorithm must rely on a real set of data in order to enable
lamp (Elecromax), the WSN JN5148 module, the e-Box the accuracy of the traffic prediction model. Thus, the data
4300 module, a dimming circuit through the digital PWM set used is the one obtained by the public authorities in
method, a vehicle detection sensor and a malfunction Vermont, USA [26]. The data was collected after the
detection circuit. implementation of a vehicular traffic counter installed in
The system also includes a vehicle detection algorithm different areas of the city. Fig. 2 shows the traffic count for
which enables the dimming of the light intensity depending one week in January 2012.

13
Computer Science Section

of biological neural networks. A neural network consists of


an interconnected group of artificial neurons that process the
information by using a connectionist type of approach. In
most cases, an ANN network is an adjustable system that
changes its structure based on the external or internal
information that goes through the network during the training
stage. Modern neural networks are often used for modeling
the complex relationships between the set of inputs and the
set of outputs or to design data processing models. A feed-
forward neural network is a network where the connections
between inputs and outputs are not established evenly. In this
network, the information is translated in a single direction,
forward, from the input nodes, through the hidden nodes (if
any) to the output nodes [25].
The propagation algorithm is a supervised training
method, which can be divided into two phases: propagation
and updating of the weighting factors used. These steps are
repeated until the network performance level is as high as
possible. The output values are compared with the correct
answer in order to measure the error. The use of various
techniques allow for the error to be fed back to the network.
Fig. 1Traffic prediction algorithm. By using this information, the algorithm adjusts the weights
of each connection in order to diminish the error as much as
possible. After repeating this process for a sufficiently large
number of training cycles, the network will usually converge
towards a certain error.
A prediction model based on neural network training
cycles (Neural Net) is generated at a mode neural network
output; this model is implemented by means of the Apply
Model operator to the data set that trains the neural network.
In order to assess the performance of the proposed prediction
model, the Performance operator is used to check the model
error by correlating the data collected through the prediction
process with the actual information in the data set.
Fig. 3 presents the general structure of a neural network. A
Fig. 2 Traffic count.
neural network consists of neurons, the hidden layers and
The maximum number of vehicles is 135 at 5 a.m. and the neurons; the connections between neurons and the hidden
minimum number is of 7 vehicles at 1 a.m.In order to layers are called weighted connections.
develop the testing and evaluation of the traffic prediction Fig. 4 shows the structure of the prediction algorithm
device, a neural network and a prediction algorithm of the k- based on a neural network.
NN (k-Nearest Neighbor) type have been considered. Fig. 4 Fig. 5 shows the design process of the traffic level
and 5 show the data set processing mechanisms. The first prediction algorithm that uses a k-NN type of process.
part entails importing the database containing the data set
and subsequently applying it to the k-NN/neural network by
means of the Retrieve operator. The next step is setting the
label attribute, which is the attribute to be predicted by using
the Set Role operator. The Neutral Net operator generates an
information correlation model through a feed-forward neural
network fed by a multi-layer perceptron propagation
algorithm. This operator can only process numerical
attributes.
An artificial neural network (ANN-Artificial Neural
Network), found in the professional literature as the neural
network (NN), is a mathematical model or a measuring
model that is inspired by the structure and functional aspects Fig. 3 The structure of a Neutral Network.

14
Journal of Applied Computer Science & Mathematics, no. 15 (7) /2013, Suceava

classification method which is most common for these k


examples. Thus, the design of the prediction model employs
the weight factor method which entails that the closest
neighbors should contribute more to the designing of the
model [16].
Fig. 6 presents the variation of the RMS (Root Mean
Square) error generated by the prediction algorithm designed
by means of a neural network depending on the number of
training cycles. The training cycle parameter specifies the
number of training cycles used to train the neural network. In
a feed-backward propagation algorithm, the output values are
compared to the correct answer in order to calculate the
error. The error is then fed back through the network. By
using this information, the algorithm adjusts the weights of
each connection in order to reduce the error. The mean
Fig. 4 Algorithm designed by means of a neural network. square error was obtained by calculating the traffic in the
area at 11:00 p.m. on different days of the year.
Fig. 6 shows that as the number of training cycles applied
to the neural network used for the prediction model
increases, the mean square error decreases, but the time spent
processing the information increases significantly. Thus, for
500 training cycles, the mean square error is 9.766 and for
500.000 training cycles the error amounts to 0.877.
Fig. 7 shows the variation of the RMS error of the
prediction mechanism that uses a k-NN algorithm. The
collected data shows that the error increases at the same time
with the number of neighbors of the label variable applied to
the input of the prediction algorithm.
The accuracy of the prediction model requires the taking
into account of a large number of neighbors of the label
dataset, but the mean square error increases with the number
of neighbors. The error increases from 8.24 for k=5 to 12.27
Fig.5 Algorithm designed by means of a K-NN process.
for a number of 50 neighbors.
The k-NN operator generates a k-Nearest Neighbor pattern The collected data shows that a traffic prediction model
by processing the input set. This operator can be used as a using a neural network ensures the highest performance level
classification or a regression model depending on the data set and can be integrated into the street lighting monitoring and
type. control system. Table I shows the values obtained by
The k-NN algorithm is based on an analogy learning applying the prediction algorithm using a neural network.
process, by comparing a given trial data set of
training/learning examples, which are similar to it. The
training examples are described by n attributes. Each data set
is a dot in an n-dimensional space. When an unknown
example is inserted, a k-Nearest Neighbor algorithm searches
the type of model for the k training examples that are closest
to the unknown sample. These k training examples are the
closest k neighbors of the unknown sample. Proximity is
defined as a metric distance, such as the Euclidean distance.
The k-Nearest Neighbor algorithm is the simplest method of
learning. If the number of neighbors amounts to 1, the
example is then simply the attribute of the nearest neighbor.
The same method can be used to calculate regression by
assigning weights so that the nearest neighbors can
contribute more than the farther ones. The k-NN algorithm
consists of two stages: locating the k training examples that
are nearest to the unknown example and adopting the Fig. 6 The RMS error for the traffic prediction algorithm that uses a neural
network.

15
Computer Science Section

Fig. 8 The RMS error for the dimming prediction algorithm that uses a neural
network.
Fig. 7 The RMS error for the traffic prediction algorithm that uses a k-NN
process.

The data stand for the car traffic recorded at 11:00 p.m. on
different days of the year.
Another aspect that has been considered is the design of a
prediction algorithm for light dimming threshold depending
on the traffic predicted for the different times of the day and
by taking into account the previous decisions made by the
human user in similar situations. Thus, the following
dimming stages were considered, as presented in Table II.
Thus, apart from collecting the information related to the
number of vehicles, the system also saves and information on
the light dimming threshold. After processing the data set
applied to the input the algorithm must make the appropriate
dimming decision. The input set of data includes information
Fig. 9 The RMS error for the dimming prediction algorithm that uses a k-NN
about the traffic level and the previous dimming decision algorithm.
made by the user.
Fig. 8 shows the RMS error for the algorithm designed by The results show that the dimming prediction algorithm
means of a neural network. The minimum error obtained for depending on the number of vehicles during a specific time
a total of 50.000 training cycles amounts to 0.824. frame and using a neural network ensures the highest
Fig. 9 shows the RMS error for the dimming prediction performance level.
algorithm that uses a k-NN algorithm. The RMS error
increases from 12.17 for a number of 5 neighbors to 13.91 III. CONCLUSIONS
for k = 50.
The obtained results show that with the increasing number
TABLE I. DATA COLLECTED BY MEANS OF A NEURAL NETWORK of training cycles applied to the neural network used for the
Actual traffic Predicted traffic
Day
data data
design of the prediction model, the mean square error
1 46 45.99 decreases, but the information processing time increases
2 35 35.48 significantly. Thus, for 500 training cycles, the mean square
3 30 29.35 error is of 9.766 and for 500.000 cycles, the error amounts to
4 42 42.58 0.877. The use of the k-NN algorithm increases the error as
5 49 49.07
the number of neighbors of the label variable that is applied
TABLE II. LIGHT INTENSITY DIMMING STAGES to the input of the prediction algorithm increases as well. We
Traffic data Dimming must take into account a considerable number of neighbors
x  (0,30] 50%
of the label data set in order to ensure the accuracy of the
x  (30,60] 40%
model, but the mean square error will increase with the
x  (60,90 ] 30% number of neighbors. Thus, the traffic prediction model
x  (90,120] 20% using a neural network ensures the highest performance level
x  (120,150 ] 10% and can be integrated into the street lighting monitoring and
x  150 0% control system.

16
Journal of Applied Computer Science & Mathematics, no. 15 (7) /2013, Suceava

The obtained results show that the highest performance Power Engineering EPE , pp. 314-317, 2012.
level is ensured by a prediction algorithm for the different [10] Alexandru Lavric, Valentin Popa, Codrin Males, Ilie Finis, „New
Technologies in Street Lighting”, International Word Energy System
stages of light intensity dimming depending on the number Conference (WESC), pp. 811-816, 2012.
of vehicles during a specific time interval using a neural [11] Alexandru Lavric, Valentin Popa, „The Design and Development of a
network. Street Lighting Monitoring and Control System”,DAS Doctoral
In the next research phase, we will consider other Symposium, Suceava,pp. 66, 2012.
prediction and evolutionary algorithms such as Kalman [12] F. Leccese, “Remote-Control System of High Efficiency and
Filter and PSO (Particle Swarm Optimization) in order to Intelligent Street Lighting Using a ZigBee Network of Devices and
Sensors,” IEEE Transactions on Power Delivery, vol. 28, no. 1, pp.
increase the efficiency of the traffic prediction model. 21–28, Jan. 2013.
[13] Lavric A., V. Popa,”Comparative analysis of communication protocols
ACKNOWLEDGMENT and routing algorithms used in street lighting control systems,” Revista
Sisteme Distribuite, pag.32-35, Suceava, 2011.
This paper was supported by the project "Improvement of [14] W. Z. Mai, “Case Study of A Highly-Reliable Dimmable Road
the doctoral studies quality in engineering science for Lighting System with Intelligent Remote Control Brief Review of
development of the knowledge based society-QDOC” Dimming Technology for Road Lighting Systems,” Power Electronics
contract no. POSDRU/107/1.5/S/78534, project co-funded by and Applications, pp. 1–10, 2005.
the European Social Fund through the Sectorial Operational [15] F. Leccese and Z. Leonowicz, “Intelligent wireless street lighting
system,” 2012 11th International Conference on Environment and
Program Human Resources 2007-2013. Electrical Engineering, pp. 958–961, May 2012.
[16] Chen, Bor-Sen Sen, Peng, Sen-Chueh C., Wang, Ku-Chen,”Traffic
REFERENCES modeling, prediction, and congestion control for high-speed networks:
a fuzzy AR approach”, IEEE Transactions on Fuzzy Systems, pp. 491-
[1] Alexandru Lavric, Valentin Popa, Ilie Finis, Adrian M. Gaitan, Adrian 508, 2000.
I. Petrariu, “Packet Error Rate Analysis of IEEE 802.15.4 under
[17] De Fabritiis, Corrado, Ragona, Roberto, Valenti, Gaetano, ”Traffic
802.11g and Bluetooth Interferences”, 9th International Conference on
Estimation And Prediction Based On Real Time Floating Car Data,”
Communications, COMM 2012, pp. 259-262, 2012. Conference on Intelligent Transportation Systems, pp. 197-203, 2008.
[2] M. Young, Ç. Atıcı, T. Özçelebi, and J. J. Lukkien, “Exploring User-
Centered Intelligent Road Lighting Design : A Road Map and Future [18] Furtlehner, Cyril, J-M. Lasgouttes, and Arnaud de La Fortelle. "A
Research Directions,” IEEE Transactions on Consumer Electronics, belief propagation approach to traffic prediction using probe vehicles."
Vol. 57, No. 2, May 2011. Intelligent Transportation Systems Conference,pp. 1022-1027, 2007.
[3] Lavric Alexandru, Popa Valentin, Finis Ilie, Males Codrin, Gaitan, [19] Cheu, Ruey-Long. "Freeway traffic prediction using neural networks."
Adrian-Mihai, ”An original lighting monitoring and control system Fifth International Conference on Applications of Advanced
using Wireless Sensor Networks”, ECUMICT, pag. 167-173, 2012. Technologies in Transportation Engineering. 1998.
[4] Alexandru LAVRIC, Valentin POPA, Ilie FINIS, Daniel [20] Yuan Wen et al., “Traffic Incident Duration Prediction Based on K-
SIMION,”The design and implementation of an energy efficient street Nearest Neighbor”, Applied Mechanics and Materials, pp. 253-255,
lighting monitoring and control system,” Przeglad Elektrotechniczny, 2012.
Nr. 11, pp. 312-316, 2012.
[21] Xiangyu Zhou, Wenjun Wang, Long Yu “Traffic Flow Analysis and
[5] Alexandru LAVRIC, Valentin POPA, Ilie FINIS, Codrin MALES, Prediction Based on GPS Data of Floating Cars”, Proceedings of the
Performance evaluation of Tree and Mesh ZigBee Network 2012 International Conference on Information Technology and
Topologies used in Street Lighting Control Systems, Przeglad Software Engineering Lecture Notes in Electrical Engineering Volume
Elektrotechniczny, pp. 168-171, 2013. 210, pp 497-508, 2013.
[6] M. G. Shafer, E. Saputra, K. A. Bakar, and F. Ramadhani, “Modeling
[22] Baumann, Martin, “A Neural Network Model for Driver’s Lane-
of Fuzzy Logic Control System for Controlling Homogeneity of Light
Changing Trajectory Prediction in Urban Traffic Flow,” Mathematical
Intensity from Light Emitting Diode,” 2012 ational Conference on
Problems in Engineering,2013.
Intelligent Systems Modelling and Simulation, pp. 71–75, Feb. 2012.
[7] Alexandru Lavric, Valentin Popa, Codrin Males, Ilie Finis,” A [23] Xu, H., Ying, J., Wu, H., Lin, F., “Public Bicycle Traffic Flow
Performance Study of ZigBee Wireless Sensors Network Topologies Prediction based on a Hybrid Model,” Appl. Math, 7(2), pp. 667-674,
for Street Lighting Control Systems,” International Workshop on 2013.
Mobile Ad-Hoc Wireless Networks, France, pp. 130-133, 2012. [24] XU Gang, JIN Hai He, LIU Jing, “Traffic Status Prediction and
[8] M. C. Walden, T. Jackson, and W. H. Gibson, “Development of an Analysis Based on Mining Frequent Subgraph Patterns,” Advanced
Empirical Path-Loss Model for Street-Light Telemetry at 868 and 915 Materials Research, pp. 2543-2548, 2013.
MHz,” Antennas and Propagatio, pp. 3389–3392, 2011. [25] ”User Guide Rapid Miner” http://rapid-i.com/
[9] Alexandru Lavric, Valentin Popa, Ilie Finis, “The Design of a Street [26] „Trafic Measurements” http://www.aot.state.vt.us/planning/
Lighting Monitoring and Control System,” Conference Electrical and documents/trafresearch/publications/pub.htm
LAVRIC Alexandru graduated at the Faculty of Electronic Telecommunication and Information Technology. In 2008 he obtained a
Bachelor degree in Administrative Sciences from "Ştefan cel Mare" University of Suceava, Faculty of Economics and Public
Administration, in 2010 obtained a Master degree in Business Affairs and in 2012 a Master of science diploma in Computer and
Communications Networks. Since 2010, he is a PhD attending student in Electronics and Telecommunications. His main research areas are:
lighting control systems, WSN and wireless communication technologies.
POPA Valentin graduated at the "Gh. Asachi" Technical University of Iasi, Electrical, Electronics and Telecommunications Faculty, study
program- Electronics and Telecommunications in 1989. After finishing the faculty, he followed a PhD. study and graduated in 1998. Since
1992, he has been working at “Ştefan cel Mare” University of Suceava receiving the title of Prof. in 2005. His main research areas are:
RFID systems, intelligent sensor networks and wireless data transmission systems. From 2009, he is PhD coordinator. Currently, he is the
rector of the “Ştefan cel Mare” University of Suceava.

17

You might also like