International Journal of Distributed Sensor Networks

Sensor Communications towards Intelligent Vehicle Networking

Guest Editors: Ching-Hsien Hsu, Shangguang Wang, Victor C. M. Leung, and Nik Bessis Sensor Communications towards Intelligent Vehicle Networking International Journal of Distributed Sensor Networks Sensor Communications towards Intelligent Vehicle Networking

Guest Editors: Ching-Hsien Hsu, Shangguang Wang, Victor C. M. Leung, and Nik Bessis Copyright © òýÔ Hindawi Publishing Corporation. All rights reserved.

is is a special issue published in “International Journal of Distributed Sensor Networks.” All articles are open access articles distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, pro- vided the original work is properly cited. Editorial Board

Jemal H. Abawajy, Australia Yao-Jen Chang, Taiwan Mohamed A. Haleem, USA Miguel Acevedo, USA Naveen Chilamkurti, Australia Kijun Han, Republic of Korea Cristina Alcaraz, Spain Wook Choi, Republic of Korea Qi Han, USA Ana Alejos, Spain H. Choo, Republic of Korea Zdenek Hanzalek, Mohammod Ali, USA Kim-Kwang R. Choo, Australia Shinsuke Hara, Giuseppe Amato, Italy Chengfu Chou, Taiwan Wenbo He, Canada Habib M. Ammari, USA Mashrur A. Chowdhury, USA Paul Honeine, France Michele Amoretti, Italy Tae-Sun Chung, Republic of Korea Feng Hong, Christos Anagnostopoulos, UK Marcello Cinque, Italy Chin-Tser Huang, USA Li-Minn Ang, Australia Sesh Commuri, USA Haiping Huang, China Nabil Aouf, UK Mauro Conti, Italy Xinming Huang, USA Francesco Archetti, Italy Alfredo Cuzzocrea, Italy Jose I. Moreno, Spain Masoud Ardakani, Canada Donatella Darsena, Italy Mohamed Ibnkahla, Canada Miguel Ardid, Spain Dinesh Datla, USA Syed K. Islam, USA Muhammad Asim, UK Amitava Datta, Australia Lillykutty Jacob, Stefano Avallone, Italy Iyad Dayoub, France Won-Suk Jang, Republic of Korea Jose L. Ayala, Spain Danilo De Donno, Italy Antonio Jara, Switzerland Javier Bajo, Spain Luca De Nardis, Italy Shengming Jiang, China N. Balakrishnan, India Floriano De Rango, Italy Yingtao Jiang, USA Prabir Barooah, USA Paula de Toledo, Spain Ning Jin, China Federico Barrero, Spain Marco Di Felice, Italy Raja Jurdak, Australia Paolo Barsocchi, Italy Salvatore Distefano, Italy Konstantinos Kalpakis, USA Paolo Bellavista, Italy Longjun Dong, China Ibrahim Kamel, UAE Olivier Berder, France Nicola Dragoni, Denmark Joarder Kamruzzaman, Australia Roc Berenguer, Spain George P. EŸhymoglou, Greece Rajgopal Kannan, USA Juan A. Besada, Spain Frank Ehlers, Italy Johannes M. Karlsson, Sweden Gennaro Boggia, Italy Melike Erol-Kantarci, Canada Gour C. Karmakar, Australia Alessandro Bogliolo, Italy Farid Farahmand, USA Marcos D. Katz, Finland Eleonora Borgia, Italy Michael Farmer, USA Jamil Y. Khan, Australia Janos Botzheim, Japan Florentino Fdez-Riverola, Spain Sherif Khattab, Egypt Farid Boussaid, Australia Gianluigi Ferrari, Italy Hyungshin Kim, Republic of Korea Arnold K. Bregt, Silvia Ferrari, USA Sungsuk Kim, Republic of Korea Richard R. Brooks, USA Giancarlo Fortino, Italy Andreas König, Ted Brown, USA Luca Foschini, Italy Gurhan Kucuk, Turkey Davide Brunelli, Italy Jean Y. Fourniols, France Sandeep S. Kumar, Netherlands James Brusey, UK David Galindo, Spain Juan A. L. Riquelme, Spain Carlos T. Calafate, Spain Ennio Gambi, Italy Yee W. Law, Australia Tiziana Calamoneri, Italy Weihua Gao, USA Antonio Lazaro, Spain José Camacho, Spain Preetam Ghosh, USA Didier Le Ruyet, France Juan C. Cano, Spain Athanasios Gkelias, UK Joo-Ho Lee, Japan Xianghui Cao, USA Iqbal Gondal, Australia Seokcheon Lee, USA João Paulo Carmo, Brazil Francesco Grimaccia, Italy Yong Lee, USA Roberto Casas, Spain Jayavardhana Gubbi, Australia Stefano Lenzi, Italy Luca Catarinucci, Italy Song Guo, Japan Pierre Leone, Switzerland Michelangelo Ceci, Italy Andrei Gurtov, Finland Shancang Li, UK Shuai Li, USA Gregory O’Hare, Ireland Hichem Snoussi, France Qilian Liang, USA Giacomo Oliveri, Italy Guangming Song, China Weifa Liang, Australia Saeed Olyaee, Antonino Staiano, Italy Yao Liang, USA Luis Orozco-Barbosa, Spain Muhammad A. Tahir, Pakistan I-En Liao, Taiwan Suat Ozdemir, Turkey Jindong Tan, USA Jiun-Jian Liaw, Taiwan Vincenzo Paciello, Italy Shaojie Tang, USA Alvin S. Lim, USA Sangheon Pack, Republic of Korea Luciano Tarricone, Italy Antonio Liotta, Netherlands Marimuthu Palaniswami, Australia Kerry Taylor, Australia Donggang Liu, USA Meng-Shiuan Pan, Taiwan Sameer S. Tilak, USA Hai Liu, Seung-Jong Park, USA Chuan-Kang Ting, Taiwan Yonghe Liu, USA Miguel A. Patricio, Spain Sergio Toral, Spain Leonardo Lizzi, France Luigi Patrono, Italy Vicente Traver, Spain Jaime Lloret, Spain Rosa A. Perez-Herrera, Spain Ioan Tudosa, Italy Kenneth J. Loh, USA Pedro Peris-Lopez, Spain Anthony Tzes, Greece Juan Carlos López, Spain Janez Perš, Slovenia Bernard Uguen, France Manel López, Spain Dirk Pesch, Ireland Francisco Vasques, Portugal Pascal Lorenz, France Shashi Phoha, USA Khan A. Wahid, Canada Jun Luo, Singapore Robert Plana, France Agustinus B. Waluyo, Australia Michele Magno, Italy Carlos Pomalaza-Ráez, Finland Honggang Wang, USA Sabato Manfredi, Italy Neeli R. Prasad, Denmark Jianxin Wang, China Athanassios Manikas, UK Antonio Puliato, Italy Ju Wang, USA Pietro Manzoni, Spain Hairong Qi, USA Yu Wang, USA Álvaro Marco, Spain Meikang Qiu, USA omas Wettergren, USA Jose R. Martinez-de Dios, Spain Veselin Rakocevic, UK Ran Wolš, Israel Ahmed Mehaoua, France Nageswara S.V. Rao, USA Chase Wu, USA Nirvana Meratnia, Netherlands Luca Reggiani, Italy Na Xia, China Christian Micheloni, Italy Eric Renault, France Qin Xin, Faroe Islands Lyudmila Mihaylova, UK Joel Rodrigues, Portugal Chun J. Xue, Hong Kong Paul Mitchell, UK Pedro P. Rodrigues, Portugal Yuan Xue, USA Mihael Mohorcic, Slovenia Luis Ruiz-Garcia, Spain Geng Yang, China José Molina, Spain Mohamed Saad, UAE eodore Zahariadis, Greece Antonella Molinaro, Italy Stefano Savazzi, Italy Miguel A. Zamora, Spain Salvatore Morgera, USA Marco Scarpa, Italy Hongke Zhang, China Kazuo Mori, Japan Arunabha Sen, USA Xing Zhang, China Leonardo Mostarda, Italy Olivier Sentieys, France Jiliang Zhou, China V. Muthukkumarasamy, Australia Salvatore Serrano, Italy Ting L. Zhu, USA Kamesh Namuduri, USA Zhong Shen, China Xiaojun Zhu, China Amiya Nayak, Canada Chin-Shiuh Shieh, Taiwan Yifeng Zhu, USA George Nikolakopoulos, Sweden Minho Shin, Republic of Korea Daniele Zonta, Italy Alessandro Nordio, Italy Pietro Siciliano, Italy Antonio-Javier García-Sánchez, Spain Michael J. O’Grady, Ireland Olli Silven, Finland Contents

Sensor Communications towards Intelligent Vehicle Networking, Ching-Hsien Hsu, Shangguang Wang, Victor C. M. Leung, and Nik Bessis Volume òýÔ , Article ID ç⠗ÞÀ, ò pages

Precise Relative Positioning of Vehicles with On-the-Fly Carrier Phase Resolution and Tracking, Fabian de Ponte Müller, Diego Navarro Tapia, and Matthias Kranz Volume òýÔ , Article ID ¥ ÀÔ¥ò, ÔÔ pages

A Mobility Model for Connected Vehicles Induced by the Fish School, Daxin Tian, Keyi Zhu, Jianshan Zhou, Jian Wang, Guohui Zhang, and He Liu Volume òýÔ , Article ID Ôâç —Ô, Ô pages

Summary Instance: Scalable Event Priority Determination Engine for Large-Scale Distributed Event-Based System, Ruisheng Shi, Yang Zhang, Lina Lan, Fei Li, and Junliang Chen Volume òýÔ , Article ID çÀýçòÀ, Ô¥ pages

Multitasking Planning and Executing of Intelligent Vehicles for Restaurant Service by Networking, Jun Zhang, Zhixian Chen, Ying Hu, Jianwei Zhang, Zhenhua Luo, and Xuehui Dong Volume òýÔ , Article ID òÞç—ò , Ô¥ pages

A Hierarchical Reputation Evidence Decision System in VANETs, Yang Yang, Zhipeng Gao, Xuesong Qiu, Qian Liu, Yuwen Hao, and Jingchen Zheng Volume òýÔ , Article ID ç¥Ô ÞÀ, ÔÔ pages

Accurate Real-Time Tra›c Speed Estimation Using Infrastructure-Free Vehicular Networks, Zongjian He, Buyang Cao, and Yan Liu Volume òýÔ , Article ID çýÔÀ¥, ÔÀ pages

A Multimetric Ant Colony Optimization Algorithm for Dynamic Path Planning in Vehicular Networks, Zhen Wang, Jianqing Li, Manlin Fang, and Yang Li Volume òýÔ , Article ID òÞÔýâÞ, Ôý pages Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 365879, 2 pages http://dx.doi.org/10.1155/2015/365879

Editorial Sensor Communications towards Intelligent Vehicle Networking

Ching-Hsien Hsu,1 Shangguang Wang,2 Victor C. M. Leung,3 and Nik Bessis4

1 Department of Computer Science and Information Engineering, Chung Hua University, Hsinchu 30012, Taiwan 2Beijing University of Posts and Telecommunications, Beijing 100876, China 3DepartmentofElectricalandComputerEngineering,TheUniversityofBritishColumbia,Vancouver,BC,CanadaV6T1Z4 4Department of Computing, Edge Hill University, Ormskirk, Lancashire L39 4QP, UK

Correspondence should be addressed to Ching-Hsien Hsu; [email protected]

Received 17 August 2015; Accepted 27 August 2015

Copyright © 2015 Ching-Hsien Hsu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

1. Introduction 2. Architecture and Mobility Sensor technologies have been widely used to make trans- Information representation and query processing are two portation clean, efficient, connected, and safe. Roadside core problems of event-based distributed systems such as wireless sensor and networking technology represents a cost- VANETs. To speed up the online query in distributed event- effective solution and can leverage the deployment of the based system, the paper entitled “Summary Instance: Scal- system as a whole. Sensors installed in cars continuously able Event Priority Determination Engine for Large-Scale gather important information, such as air bags, distance Distributed Event-Based System” by R. Shi et al. introduces detection, mechanical and electronic parts, tire pressure, the rule storage schema based on rule instantiation method collision force, and passengers’ conditions. Transmission of with Bloom filter technique. This approach leverages offline such information between cars can be used to implement efforts to increase the online query speed. This approach is differentiated mobile services. As a consequence, Wireless promising to provide an efficient scalable design for event Vehicular Sensor Network (VSN) has been widely accepted priority determination problem in large-scale distributed in developing the next generation intelligent transportation event-based systems. application systems as well as connected vehicles networking. The paper entitled “A Mobility Model for Connected However, VSN does not operate like the traditional wireless Vehicles Induced by the Fish School” by D. Tian et al. sensor network (WSN). For example, the motion of the proposed a mobility model of connected vehicles with vehicle, the environment of the roads, and other uncertain wireless communications. The proposed model consists of traffic conditions all pose challenges to the system. For safety the attraction of the goal, the repulsion of the obstacles, reason, the vehicle-vehicle and vehicle-gateway communi- the constraint of the road, and the interplays of vehicles cation modes must be stable. Therefore, how to keep link in the group including both attractive and repulsive affec- stability becomes an important issue. tion. Simulations were performed to verify that the wireless This special issue is in response to the increasing conver- communications among vehicles can improve the safety and gence of distributed sensor networks. Papers selected for this efficiency of traffic greatly, and the numerical experiments special issue represent recent progresses in the field, including prove the reasonableness of the model in terms of describing works on mobility architectures, vehicle communications the cooperative behaviors of connected vehicles with wireless and networking, algorithms in wireless sensor networks, communications. and services and applications in distributed systems. All of The paper entitled “A Hierarchical Reputation Evidence these papers not only provide novel ideas and state-of-the-art Decision System in VANETs” by Y. Yang et al. proposed a techniquesinthefieldbutalsostimulatefutureresearchinthe dynamic three-layer reputation evidence decision and man- sustainable environment. agement mechanism. The system helps in collusion avoidance 2 International Journal of Distributed Sensor Networks through reporting falsified reputation evidences of colluders. cooperating by sharing information and allocating task help In addition, an adaptive reputation evidence gathering cycle the vehicles to handle partially observability and uncertainty is presented to replace frequent polling mechanism and save in dynamic world. The proposed approach has made obvious the network traffic. The simulation results demonstrate that progress on improving the efficiency and robustness of the the proposed architecture has high performance of detection vehicles. for selfish and collusive behaviors. 5. Conclusions 3. Algorithms and Information Fusion All of the above papers either address original research in With the rapid growth in the number of vehicles, energy con- architectures, algorithms, services, and information fusion sumption and environmental pollution in urban transporta- methods or propose novel application models in the various tion have become a worldwide problem. Efforts to reduce intelligent mobility fields. They also trigger further related urban congestion and provide green intelligent transport research and technology improvements in application of become a hot field of research. The paper entitled “A Mul- connected vehicles services. This special issue serves asa timetric Ant Colony Optimization Algorithm for Dynamic landmark source for education, information, and reference Path Planning in Vehicular Networks” by Z. Wang et al. to professors, researchers, and graduate students interested presents a multimetric ant colony optimization algorithm in updating their knowledge about or active in vehicle net- to achieve real-time dynamic path planning in complicated working, intelligent mobility, and novel application models urban transportation. Based on multiple traffic information for distributed sensor networks. and planning requirements, the proposed algorithm selects The guest editors are deeply indebted to numerous themosteffectiveandsuitableplanningpath.Thisalgo- reviewers for their professional effort, insight, and hard work rithm provides a potential solution for energy consumption put into commenting on the selected articles that reflect the and environmental pollution in increasingly complex urban essence of this special issue. We are grateful to all authors for trafficenvironment,whichcouldbeusedinIntelligent their contributions and for undertaking two-cycle revisions Transportation System. of their manuscripts, without which this special issue could The paper entitled “Accurate Real-Time Traffic Speed not have been produced. We hope that this special issue will Estimation Using Infrastructure-Free Vehicular Networks” be a good addition to the area of next generation intelligent by Z. He et al. proposed a novel in-network traffic speed vehicles networking. estimation approach using infrastructure-free vehicular net- works. The proposed solution utilizes macroscopic traffic Ching-Hsien Hsu flow model to estimate the traffic condition. The authors Shangguang Wang demonstrate an application of the proposed solution in real- Victor C. M. Leung time route planning applications. Evaluation results show Nik Bessis that the proposed solution outperforms many existing ones in terms of accuracy and efficiency in traffic-aware route planning applications.

4. Applications and Services To make transportation more efficient and more safe, the paper entitled “Precise Relative Positioning of Vehicles with on-the-Fly Carrier Phase Resolution and Tracking” by F. de Ponte Muller¨ proposed a method to determine the relative position of two vehicles using a cooperative approach. The proposed approach is designed for low-cost single-frequency receivers that are already integrated in modern vehicles. This method has been tested in an open-sky rural environment with two vehicles driving behind each other. It has been demonstrated that the proposed approach is able to track with subcentimeter accuracy the baseline. This method is designed toruninrealtimeandisabletotrackupto30integer ambiguities on a modern notebook. The paper entitled “Multitasking Planning and Executing of Intelligent Vehicles for Restaurant Service by Networking” by J. Zhang et al. proposed an approach for multitasking in restaurant service of intelligent vehicles by networking. By integrating the plan executing and execution monitoring, the vehicles can work online in dynamic environment. As the vehicles are working in network, the mechanism for Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 459142, 11 pages http://dx.doi.org/10.1155/2015/459142

Research Article Precise Relative Positioning of Vehicles with On-the-Fly Carrier Phase Resolution and Tracking

Fabian de Ponte Müller,1 Diego Navarro Tapia,2 and Matthias Kranz3

1 Institute of Communications and Navigation, German Aerospace Center (DLR), 82234 Wessling, Germany 2Communications Engineering Department, University of Malaga,´ 29071 Malaga,´ Spain 3Embedded Interactive Systems Laboratory, University of Passau, 94032 Passau, Germany

Correspondence should be addressed to Fabian de Ponte Muller;¨ [email protected]

Received 19 December 2014; Accepted 16 June 2015

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Fabian de Ponte Muller¨ et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Forward collision warning systems, lane change assistants, and cooperative adaptive cruise control are examples of safety relevant applications that rely on accurate relative positioning between vehicles. Current solutions estimate the position of an in-front driving vehicle by measuring the distance with a radar sensor, a laser scanner, or a camera system. The perception range of these sensors can be extended by the exchange of GNSS information between the vehicles using an intervehicle communication link. One possibility is to transmit GNSS pseudorange and carrier phase measurements and compute a highly accurate baseline vector that represents the relative position between two vehicles. Solving for the unknown integer ambiguity is specially challenging for low-cost single- frequency receivers. Using the well-known LAMBDA (Least-squares AMBiguity Decorrelation Adjustment) algorithm, in this paper, we present a method for tracking the ambiguity vector solution, which is able to detect and recover from cycle slips and cope with changing satellite constellations. In several test runs performed in real-world open-sky environments with two vehicles, the performance of the proposed Ambiguity Tracker approach is evaluated. The experiments revealed that it is in fact possible to track the position of another vehicle with subcentimeter accuracy over longer periods of time with low-cost single-frequency receivers.

1. Introduction systems have also an accuracy degradation with ranging distance. However, more important than the limited ranging To make transportation more efficient and safer, today’s capabilities are their line-of-sight characteristic. All of them vehicles are already equipped with multiple Advanced Driver are not able to estimate the position of vehicles behind other Assistance Systems. Forward collision warning systems, lane vehicles, behind bends and crests, or around buildings. change assistants, and adaptive cruise control are safety The key approaches to solve these limitations and to related applications that require a highly accurate relative extend the awareness range of future intelligent vehicles are position to other vehicles. Today, these systems completely cooperative approaches based on vehicle-to-vehicle commu- rely on on-board ranging sensors to estimate the position nication. In recent years, big steps in the standardization of towards surrounding traffic participants. Radar sensors, laser intervehicle communication have been achieved in Europe, scanners, and vision-based systems offer a good relative posi- North America, and Japan. By transmitting special beaconing tion and relative velocity estimation to other vehicles. These messages, in near future, vehicles will be able to provide sensors, however, exhibit a series of important limitations. position information to their neighbors to create mutual While long-range radar sensors can measure the distance awareness up to a range of several hundreds of meters. In to other vehicles up to 200 m, laser scanners have lower this context, the basis for localization is Global Navigation sensing ranges. Cameras have a range limitation due to the Satellite Systems (GNSS) as the American GPS, the Russian limited distance between cameras in stereovision systems or GLONASS, or the European Galileo system. In [1], the due to pixel resolution in monocular systems. All of these authors presented a cooperative approach based on the 2 International Journal of Distributed Sensor Networks exchange of GNSS pseudoranges and the estimation of the In this work, we analyze the possibility of only using low- relative position between two vehicles. cost single-frequency GPS receivers to precisely estimate the In this work, we want to extend the concept of exchanging baseline between two vehicles by solving the integer ambi- GNSS pseudorange measurements, by additionally exchang- guity in the carrier phase measurements. A new approach, ing GNSS carrier phase measurements between vehicles. the Ambiguity Tracker, is described in the next section. To As opposed to pseudorange measurements, carrier phase find the correct integer ambiguity vector multiple Ambiguity measurements are around two orders of magnitude more Trackers are run in parallel and weighted according to certain precise and have the potential of achieving subcentimeter parameters. This approach is explained in Section 3.ABase- precise range to a neighboring vehicle. However, carrier phase line Tracking Filter is presented in Section 4.TheAmbiguity measurements come along with an inherent integer unknown Tracker approach is evaluated in real-world experiments and are highly sensitive to signals losses and obstructions. described in Section 5. The paper ends with the conclusions Cycle slips are discontinuities in the cycle count that heavily in Section 6. degrade the performance of carrier phase positioning solu- tions. 2. Ambiguity Tracker Real-Time Kinematic (RTK) is an approach to solve the absolute position of a moving receiver in real time using a A GNSS receiver is able to compute a position by estimating preciselysurveyedbasestation.Inautomotiveenvironments, the range towards at least four satellites. The estimate of this technique is often used as a position ground truth during the range towards a satellite is called pseudorange and it is experiments [2, 3]. For this purpose, usually expensive high- corrupted by several types of errors. The model for a pseudo- 𝜌𝑙 𝑒 𝑙 end GNSS receivers with specially designed antennas to range measurement 𝑒 from a receiver to a satellite is reducetheimpactofmultipathpropagationareused. 𝜌𝑙 =𝑟𝑙 +𝑐⋅(𝛿𝑡 −𝛿𝑡𝑙) +𝐼+𝑇+𝐸+𝑀+𝜖 , A number of groups have addressed the relative posi- 𝑒 𝑒 𝑒 𝜌 (1) tioning problem of vehicles by solving differenced carrier 𝑟𝑙 𝑐 phase ambiguities rather than using differenced pseudorange where 𝑒 isthetruerangetowardsthesatellite, is the speed of 𝑙 techniques. Ansari et al. have investigated cooperative relative light, 𝛿𝑡𝑒 is the receiver clock bias, 𝛿𝑡 is the satellite clock bias, positioning by exchanging RTK position solutions between and 𝐼, 𝑇,and𝐸 are the ionospheric delay, the tropospheric vehicles [4]. Their system also uses high-graded GNSS delay, and satellite position error, respectively. These errors receivers and a connection to a roadside unit delivering GPS are strongly correlated between close-by receivers. 𝑀 is the correctiondata.Basnayakeetal.[5] built a test platform for range estimation error due to multipath propagation and 𝜖𝜌 relative positioning yielding range errors of less than 1 m 99% contains all nonmodeled errors such as receiver noise. ofthetimeinopenskyand90%onobscuredroads.Travis The carrier phase measurement can be expressed in the et al. [6, 7]haveworkedonatrajectoryduplicationusing following way: carrier phase based relative positioning. They perform a 𝑙 𝑙 𝑙 𝑙 direct exchange of the measurements between the receivers to 𝜙𝑒 =𝑟𝑒 + 𝑐 ⋅ (𝛿𝑡𝑒 −𝛿𝑡)−𝐼+𝑇+𝐸+𝑀+𝜆⋅𝑁𝑒 +𝜖𝜙, (2) compute single differences and estimate the relative position 𝑙 by incorporating inertial measurements. They also use high- where 𝜆 is the 𝐿1wavelengthand𝑁𝑒 corresponds to the inte- end receivers and do not address the problem of cycle slips. ger number of cycles between the satellite and the receiver. Takasu and Yasuda worked on cycle-slip detection in Further information regarding GNSS satellite acquisition and automotive environments using dual-frequency high-graded trackingandGNSSmeasurementsanditserrorscanbefound receivers [8]. They propose an integration of GNSS and in [12]. inertial sensor inside a Kalman filter to exploit the com- Double differences are computed in order to cancel out plementary nature of both sensors. A Bayesian approach to some of the previously stated errors on the pseudoranges and cope with cycle slips and changing satellite constellation is the carrier phase measurements. In a first step, the pseudo- 𝑙 𝑙 proposed by Zeng et al. [9]. ranges 𝜌𝑒 and 𝜌𝑡 towards the same satellite at two receivers 𝑙 It is expected that vehicles will be rather equipped with 𝑒 and 𝑡 are subtracted to yield a single difference Δ𝜙𝑒𝑡.With low-cost single-frequency receivers than dual-frequency, this approach the errors common to both receivers, such as geodetic graded receivers. Unfortunately, such low-cost satellite clock errors and ephemeris errors, are canceled out receivers are less precise and suffer more often from losses of directly. In this use case, unlike RTK, the distance between lock. The automotive scenario is specially challenging regard- the antennas is below 1 km, and under this assumption, full ing the usage of GNSS, due to the presence of plenty of obsta- correlation of ionospheric and tropospheric errors can be cles above and next to the road. These obstacles in a highly assumed. It is true, however, that extreme ionospheric storms dynamic environment will produce often such loss of lock. can lead to ionospheric delay gradients above 400 mm/km, Henkel and Iafrancesco work on carrier phase solutions in making the fixing of carrier phase ambiguities practically vehicular environments for attitude determination using low- impossible [13]. Also sudden variations in the concentration cost receivers and sensor fusion by using multiple antennas of water vapor in the lower troposphere can, in rare cases, on the roof of a vehicle [10]. Kiam et al. propose a Kalman cause a difference between the tropospheric delays at different filter solution without additional sensors by exploiting the locations. Measurements with 2 to 3 km baselines yielded movement model of nodes carrying the receivers [11]. differences in the tropospheric error of around 3 cm [14]. International Journal of Distributed Sensor Networks 3

However, these events are rather seldom and, therefore, in this The system of linear equations with 𝑝 carrier phase double work we assume a sufficient correlation between the iono- differences contains 𝑝+3 unknowns, of which the baseline spheric and tropospheric delays at both ego and target vehicle b isavectorofrealnumbersandtheambiguityn avectorof and a perfect cancellation of their impact by means of double integers. Moreover, the variance-covariance matrix of ∇Δ𝜖𝜙 differences. is highly elongated. A brute force approach that finds the A synchronization procedure prior to the subtraction of integer ambiguity vector n that minimizes the residual error two pseudorange measurements to yield a single difference is ∇Δ𝜖𝜙 is usually impractical. The LAMBDA (Least-squares required in order to bring the measurements to a common AMBiguity Decorrelation Adjustment) method developed point in time [15]. For this, both the pseudoranges and the by Teunissen [16]isawell-knownalgorithmtoeffectively carrier phase measurements are extrapolated using the cur- estimate the integer ambiguities. Taking 𝑝 pseudorange and 𝑝 rent Doppler according to carrier phase measurements in (4) and (5),afloatsolutionn̂𝑓 fortheintegerambiguitiesisfound.ByperformingaZ-trans- 𝑙 𝑙 𝑙̇ 𝜌𝑒 (𝑡𝑒 +Δ𝑡)=𝜌𝑒 (𝑡𝑒)+Δ𝑡⋅𝜆⋅𝜙𝑒 (𝑡𝑒), formation, the highly elongated search space is decorrelated (3) and an integer search near the transformed float solution 𝑙 𝑙 𝑙̇ 𝜙𝑒 (𝑡𝑒 +Δ𝑡)=𝜙𝑒 (𝑡𝑒)+Δ𝑡⋅𝜆⋅𝜙𝑒 (𝑡𝑒), can efficiently be performed. The found integer ambiguity is transformed back to give the fixed integer ambiguity ň.Using 𝑙̇ b̌ where 𝜙𝑒 is the Doppler measurement from receiver 𝑒 to (5) the fixed baseline is computed. satellite 𝑙, 𝑡𝑒 is the time instant when receiver 𝑒 made the mea- The performance of the LAMBDA method is strongly surement (corrected by the receiver clock bias), and Δ𝑡 is the dependent on the correct selection of the measurement time difference to the common time instant agreed between covariance matrix. In this work the estimated carrier-to- the ego and target vehicle. This synchronization procedure noise ratio by the receiver is taken to compute the variance- yieldsgoodresultsaslongastherelativemovementbetween covariance matrices of ∇Δ𝜖𝜌 and ∇Δ𝜖𝜙.Therelationship receiver and satellite is uniform in the extrapolation time Δ𝑡. between the carrier-to-noise ratio and the pseudorange Here,wewanttotaketheopportunitytopointoutthe double differences noise for the used GPS receivers is assessed importance of possible system delays for a real-time appli- in [15]. cation. The time required for transferring the target vehicle’s The LAMBDA method, as described here, is performed at GNSS measurements to the ego vehicle, including processing each epoch. Errors in both, pseudoranges and carrier phase at the receiver and the on-board computer, message compo- measurements, will, in practice, cause the correct integer sition, modulation, channel access, transmission, demodula- ambiguity to be not the first solution given by the LAMBDA tion, and processing, will cause the estimation of the relative algorithm. However, these errors will average over time and position of the target vehicle in the ego vehicle to lag behind eventually the ambiguity can be fixed with high confidence. the actual position. The quantification of this delay and its Cycle slips are losses of the carrier phase count inside implication on a real-time driver assistance application falls the phase-lock loop (PLL). They are caused by momentary out of the scope of this work and is left as an important aspect loss of signal strength due to satellite line-of-sight obstruction to be regarded. or multipath-induced fading. Usually, the reacquisition of By subtracting two single differences towards satellites thecarrierphasemeasurementstakeslessthanonesecond. 𝑙 and 𝑚, a double difference that cancels also the receiver Often, a half wave length ambiguity remains, which is not clock biases in 𝑒 and 𝑡 is composed. A pseudorange double resolved until two consecutive navigation data subframes 𝑙𝑚 difference ∇Δ𝜌𝑒𝑡 is a projection of the baseline b between arereceived[8]. These so-called half-cycle slips need 8– 𝑚 both antennas towards the difference in unitary vectors u − 12stoberesolved.Cycleslipscausethecomputationofthe 𝑙 u . Hence, the following system of linear equations can be integer ambiguity to be reset and are the main reason for composed: the unavailability of a carrier phase solution in automotive environments. In static conditions, the detection of cycle slips on carrier ∇Δ𝜌 = U ⋅ b + ∇Δ𝜖𝜌, (4) phase double differences is simple, due to the discrete step of a few centimeters in the measurements. In dynamic conditions, where U is the matrix containing the differenced unitary however, a jump in the double difference carrier phase signal vectors u as row vectors and ∇Δ𝜖𝜌 contains the noncanceled remains undetected. The change in carrier phase double dif- errors, that is, pseudorange noise and multipath errors. By ference between two measurements taken at 4 Hz of two vehi- taking 𝑝≥3 double differences the baseline between the cles with a speed difference of 10 m/s is 2.5 m. Compared toa vehicles can be solved. Analogous to pseudoranges, double ∇Δ𝜙𝑙𝑚 half-cycle slip of around 9 cm the change due to the move- differences from carrier phase measurements 𝑒𝑡 can be ment of the vehicles is much greater. created. These contain the double differenced integer ambi- In this work a new algorithm to track the integer ambi- ∇Δ𝑁𝑙𝑚 guity 𝑒𝑡 . Therefore, the resulting system of linear equa- guity vector over time withstanding the occurrence of cycle tions contains not only the three unknowns of the baseline slips and attaining for changes in the satellite constellation is b vector , but also a vector of double differenced integer presented. The Ambiguity Tracker is once initialized using the n ambiguities : LAMBDAmethodandfromthenonitwilltracktheresulting ∇Δ𝜙 −𝜆⋅n = U ⋅ b + ∇Δ𝜖 . ambiguity vector over time by detecting cycle slips and half- 𝜙 (5) cycle slips. The following five steps along with the flow 4 International Journal of Distributed Sensor Networks diagram in Figure 2 describe the procedure of the Ambiguity Table 1: LAMBDA method performance. Tracker. Number of Correct ambiguity in candidate (a) Initialization.ThepreviouslydescribedLAMBDAmethod satellites 1st 2nd 3rd 4th 5th 0 is used to compute an integer ambiguity vector ň and a 3 0.49% 0.37% 0.33% 0.17% 0.26% ̌0 fixed baseline solution b from the current pseudorange and 4 0.66% 1.16% 1.82% 0.99% 2.15% carrier phase double difference measurements. 5 3.63% 5.44% 2.97% 3.13% 4.29% (b) Cycle-Slip Detection. Cycle slips on the carrier phase 6 49.43% 24.22% 14.83% 7.75% 1.98% measurements in epoch 𝑘 are detected by first predicting the 7 98.68% 1.32% 0% 0% 0% baseline in step 𝑘 from the baseline, baseline velocity, and 8 100% 0% 0% 0% 0% baseline acceleration in step 𝑘−1 according to

𝑘 𝑘−1 𝑘−1 1 𝑘−1 2 b̂ = b + ḃ ⋅Δ𝑡+ ⋅ b̈ ⋅Δ𝑡 , (6) (d) Quarantine. Carrier phase double differences that are 2 detected to be affected by a cycle slip are placed in the so- called quarantine. This is also the case for newly tracked satel- where lites or satellites that are reacquired after a signal blockage, b𝑘−1 + b𝑘−2 which are likely to be affected by half-cycle slips that jump ḃ𝑘−1 = , Δ𝑡 back after a few seconds. (7) ḃ𝑘−1 + ḃ𝑘−2 (e) Integer Ambiguity Computation.Thissteptriestocompute b̈𝑘−1 = , Δ𝑡 the integer ambiguity for the satellites placed in quarantine. 𝑘 This is done using the fixed baseline b from (10) along with Δ𝑡 𝑘 and is the time between GNSS measurements. In a second the satellite 𝑖 carrier phase measurements ∇Δ𝜙 to compute n̂𝑘 𝑖 step the integer ambiguity for the predicted baseline is an estimate computed with 𝑘 𝑘 𝑘 ∇Δ𝜙𝑖 − u𝑖 ⋅ b 𝑘 𝑘 𝑘 ̂ ∇Δ𝜙 − u ⋅ b̂ ∇Δ𝜖 𝑛𝑖 = . (11) n̂𝑘 = − 𝜙 . (8) 𝜆 𝜆 𝜆 Errors in the carrier phase measurements will cause this Thispredictedambiguityiscomparedtothatoftheprevious estimate to be not exactly an integer number. This fact is used 𝑘−1 𝑘 𝑘−1 step n̂ . The difference 𝑟=n̂ − n̂ will ideally to determine whether to remove the satellite from quarantine yield zero if no cycle slip occurred. However, due to errors and incorporate it into the baseline estimation in the next 𝑘 in the prediction and due to noise in the carrier phase step. If n̂𝑖 isclosetoanintegerthesatelliteisfreefromhalf- measurements, a suitable threshold for 𝑟 should be selected. If cycle slips and can be used in the next step. the threshold is selected too wide, some cycle slips might stay It should be noted that an Ambiguity Tracker needs at undetected, while if it is selected too tight prediction errors least four satellites without cycle slips in order to be able to and carrier phase noise will lead to faulty cycle-slips detection track its baseline solution, the common satellite and three and reduction of tracked satellites. The loss of messages satellites, in order to have three equations. Therefore, if an from the target vehicle due to blockage, fading, or message Ambiguity Tracker tracks three or less satellites without cycle collisions will have a detrimental impact on the performance slips, this Ambiguity Tracker is automatically reinitialised. of the cycle-slip detector, since Δ𝑡 increases and prediction errors grow. 3. Multiple Ambiguity Hypotheses b𝑘 (c) Baseline Computation.Thebaseline is computed by As explained in the previous section, the LAMBDA method solving is used to compute an integer ambiguity vector from pseu- dorange and carrier phase measurements, which is used to ∇Δ𝜙𝑘 −𝜆⋅n𝑘 = U ⋅ b𝑘, (9) initialize the Ambiguity Tracker. The success of the approach 𝑘 depends on the ability of single-epoch LAMBDA to find the where the ambiguities n arealreadyknownfromtheprevi- 𝑘 𝑘−1 correct ambiguity. Unfortunately, the success rates for low- ous epoch (n = n ). The best solution to (9) in a minimum cost single-frequency receivers are not higher than 40% [17]. mean squared error sense is given the least squares solution A real-world test was performed with a static known 2.131 m baseline over a period of five minutes. The LAMBDA 𝑘 𝑇 −1 −1 𝑇 −1 b =(U ⋅ Q∇Δ𝜙 ⋅ U) ⋅ U ⋅ Q∇Δ𝜙 method was used to output its first 5 ambiguity vector candi- (10) dates. Table 1 summarizes the percentage of hits of the correct 𝑘 𝑘 ⋅(∇Δ𝜙 −𝜆⋅n ), ambiguity vector in the different candidates depending on the number of tracked satellites. Tracking eight satellites where Q∇Δ𝜙 is the variance-covariance matrix of the carrier LAMBDAwasalwaysabletofindthecorrectambiguity phase double difference measurements. vector on the first candidate. However, the fewer the satellites International Journal of Distributed Sensor Networks 5

𝑘 usedare,themorethetrueambiguityvectorisspreadoverthe phase ∇Δ𝜙 and using the Ambiguity Tracker’s ambiguity 𝑘 different candidates. With five satellites, for instance, in less vector n in (5): than 20% of the epochs, the correct ambiguity was found on 𝑘 𝑘 𝑘 𝑘 one of the five first candidates. This limits the use of a single ∇Δ𝜖𝜙 = ∇Δ𝜙 − U ⋅ b −𝜆⋅n . (12) Ambiguity Tracker, since the likelihood of initializing with the correct ambiguity is strongly reduced with decreasing The figure of merit to weight each Ambiguity Tracker is the number of tracked satellites. In near future, receivers capable magnitude of the residual error. To compare residual vectors of tracking multiple constellation, as GLONASS and Galileo, of possibly different dimensions a normalization has to take are expected to enter the mass market, making the success place according to rates of single-epoch ambiguity LAMBDA increase [18]. Still 󵄨 󵄨 the problem persists in partially obstructed environments or 󵄨∇Δ𝜖𝑘 󵄨 𝑗 󵄨 𝜙󵄨 single-constellation receivers. 𝑒 = , (13) √ 𝑘 One possibility to overcome this limitation of the single- dim (∇Δ𝜖𝜙) epoch LAMBDA method is to apply it on successive epochs. 𝑗 Since random errors tend to average, eventually a single where 𝑒 is the normalized weight of the 𝑗th Ambiguity candidateambiguityvectorcanberegardedtobethecorrect Tracker and dim(⋅) is the function that yields the dimension- one. However, this method has to be reset each time a cycle ality of a vector. slip occurs. As in automotive environments the probability of The number of tracked satellites gives a measure on the cycle slips occurring is high, in this work we do not consider likelihood of the ambiguity vector being the correct one. multiepoch LAMBDA method but stick to the single-epoch Ambiguity Trackers following incorrect ambiguity vectors approach. We propose to run several Ambiguity Trackers in will often detect cycle slips and therefore discard satellites n parallel, each of them tracking a different ambiguity vector . measurement. Each Ambiguity Tracker represents a hypothesis on the base- Hence, both the current residual errors and the number of line between both vehicles. The idea behind this approach tracked satellites are used to weight each Ambiguity Tracker. is the fact that an incorrect ambiguity vector will eventually yieldalargeresidualerror. 3.3. Ambiguity Tracker Deletion and Fixing. When the weight With increasing time the wrong ambiguity vectors will of an Ambiguity Tracker falls below a certain value, the Ambi- yield inconsistent solutions. Figure 3 presents the residual guity Tracker is deleted and replaced by a new one. When the errors for several Ambiguity Trackers each following a dif- weight of an Ambiguity Tracker exceeds a certain threshold ferent ambiguity vector in the static environment of a 2.131 m it is highly likely that the integer ambiguity is the correct one baseline in an open-sky environment. The first Ambiguity and,consequently,thebaselinecanbesaidtobefixed. Tracker AT1 is tracking the correct ambiguity. It can be observed how the residual errors of the other Ambiguity Trackers grow steadily until they are reset. 4. Baseline Tracking Filter Running multiple Ambiguity Trackers in parallel consists of three steps. First, new Ambiguity Trackers need to be Once the correct solution is found, the baseline solution created. Second, the Ambiguity Trackers need to be weighted can be considered as a highly accurate relative positioning. according to some parameter that will eventually find the Indeed, using the Ambiguity Tracker approach presented in correct solution. Finally, the Ambiguity Tracker with the Section 2, this accurate baseline can be maintained over time highest weight is selected to be the fixed or correct baseline without using the LAMBDA method each epoch, avoiding solution. possible wrong ambiguity fixings or float solutions. However, the Ambiguity Tracker method may lose the 𝑃 trackingoftheaccuratebaseline.Atunnel,abridge,oreven 3.1. Ambiguity Tracker Creation. To create new Ambiguity a single tree near the road can cause the situation where the Trackers, the first 𝑃 integer ambiguity solutions of LAMBDA 𝑘 correctsolutioncannotbefurthertrackedbecausethelockon method taking the current measurements at time step the phase towards multiple satellites is lost at the same time. are considered. Each Ambiguity Tracker follows its integer In this case, the process to search again the correct solution is ambiguity over time according to the steps explained in restarted. This search may be improved if the system predicts Section 2.AnAmbiguityTrackerhasaweightassociatedwith thebaselineevolution.Theideaistogivemoreweightto it and all weights sum to one. In the first step, all 𝑃 Ambiguity /𝑃 those Ambiguity Trackers whose baseline coordinates are Trackers are initialized to a weight of 1 . In any later step, closer to the predicted baseline. In this way, the system a newly created Ambiguity Tracker gets a weight equal to /𝑃 /𝑃(𝑃 − ) increases its robustness and a solution is found more quickly. 1 by taking 1 1 weight from the existing Ambiguity In this section, we present a Baseline Tracking Filter that Trackers. estimates the baseline, the heading, and the speed of each vehicle. 3.2. Ambiguity Tracker Weighting. The previous analysis of the residual error suggests that this parameter can be used to 4.1. Kalman Filter. AKalmanfilterisarecursiveBayesian weight each Ambiguity Tracker. In each epoch the residual filter for linear Gaussian systems. The Kalman filtering 𝑘 error ∇Δ𝜖𝜙 is calculated by inserting the measured carrier technique consists of two recursive steps: a prediction and 6 International Journal of Distributed Sensor Networks an update step. The prediction step is carried out using the following equation:

𝑘 𝑘−1 𝑘−1 x =𝑓(x ) + ^ , (14)

𝑘−1 Baseline b where 𝑓(x ) is the prediction function, which defines the 𝑘−1 state transition model, and ^ is the prediction model noise. Note that the superscript indicates the instant of time or Target Ego 𝑘 vehicle t epoch. Next, the state x is updated by the observed data vehicle e defined by z. This measurement update step is modeled with the following equation:

𝑘 𝑘 𝑘 z =ℎ(x ) + 𝜂 , (15) Figure 1: Real-world experimental setup: ego and target test vehicles 𝑘 𝑘 where ℎ(x ) defines the measurement model and 𝜂 is the in open-sky environment. Each vehicle is equipped with a GNSS measurement noise. receiver and an antenna mounted on its roof. The baseline represents It should be pointed out that the noise vectors, ^ and the relative position between both vehicles. 𝜂,areassumedtobezero-meanwhiteGaussiannoisewith covariance matrices Q and R,respectively. A GNSS receiver estimates the three-dimensional velocity vector and the clock drift using Doppler or differenced carrier 4.2. Baseline Tracking Filter Description. The objective of this phase measurements, usually inside a Kalman filter. Taking filteristopredicttheevolutionofthebaselinebetween the horizontal component of the three-dimensional velocity the ego and target vehicle, which is defined as a three- vector the speed and the heading of the receiver can be dimensional vector expressed in ENU coordinates: b = 𝑇 measured. These measurements are used to update our states [𝑏𝐸 𝑏𝑁 𝑏𝑈] . For the purpose of our work we are only inter- as ested in predicting the east and the north components of the 𝜓̃𝑘 =𝜓𝑘 +𝜂 , baseline b. The state vector of the proposed Kalman filter is 𝑒 𝑒 𝜓𝑒 shown next: ̃𝑘 𝑘 𝜓𝑡 =𝜓𝑡 +𝜂𝜓 , 𝑇 𝑡 x𝑘 =[𝑏 𝑏 𝜓 𝜓 V V ] , (16) (19) 𝐸 𝑁 𝑒 𝑡 𝑒 𝑡 𝑘 𝑘 ̃V𝑒 = V𝑒 +𝜂V𝑒, 𝜓𝑒 V𝑒 where and are the heading and the speed of the ego 𝑘 𝑘 vehicle and 𝜓𝑡 and V𝑡 are the heading and the speed of the ̃V𝑡 = V𝑡 +𝜂V𝑡, target vehicle. The prediction equation is described by where 𝜓̃𝑒 and 𝜓̃𝑡 are the GNSS heading measurements and 𝑘 𝑘−1 𝑘 ̃V ̃V 𝑥 =𝑥 +Δ𝑡⋅𝑥̇ , (17) 𝑒 and 𝑡 arethespeedmeasurementsintheegoandtarget vehicle, respectively. The variance for the heading noise 𝜂𝜓 where Δ𝑡 is the time between two steps of the filter and the depends on the speed of the vehicle. At higher speed a more 𝑘 components of 𝑥̇ are: precise heading measurement is obtained, while at standstill the heading remains unobserved. The standard deviation of 𝑘 𝑘−1 𝑘−1 𝑘−1 𝑘−1 ̇ the noise in the speed measurement 𝜂V is, in such a benign 𝑏𝐸 =[V𝑡 ⋅ sin (𝜓𝑡 )−V𝑒 ⋅ sin (𝜓𝑒 )] + ]𝑏𝐸, environment, less than 1 cm/s [19]. ̇𝑘 𝑘−1 𝑘−1 𝑘−1 𝑘−1 Since the presented prediction equations are not linear in 𝑏𝑁 =[V𝑡 ⋅ cos (𝜓𝑡 )−V𝑒 ⋅ cos (𝜓𝑒 )] + ]𝑏𝑁, the state variables an approximation to the Kalman filter has 𝜓̇𝑘 = ] , to be implemented. The Extended Kalman filter linearizes the 𝑒 𝜓𝑒 (18) prediction equations using a first order Taylor approximation. 𝜓̇𝑘 = ] , 𝑡 𝜓𝑡 5. Experimental Results 𝑘 V̇𝑒 = ]V , 𝑒 This section will present the real-world tests that assess 𝑘 V̇𝑡 = ]V , the performance of the previously introduced Ambiguity 𝑡 Tracker, the Multiple Ambiguity Hypotheses, and the Base- ] ] ] ] ] ] line Tracking Filter. where 𝑏𝐸, 𝑏𝑁, 𝜓𝑒 , 𝜓𝑡 , V𝑒 ,and V𝑡 are the prediction noise of each of the state variables. The baseline coordinates are predicted using a motion model based on the previous states, 5.1. Test Setup. The experiments were performed using two and the speed and the heading of each vehicle. The prediction test vehicles. The target vehicle driving in front is a Renault of the heading and the speed of both vehicles is modeled with Clio, while the ego vehicle behind is a Mercedes G-400 (see the addition of a zero-mean white Gaussian noise. Figure 1). Each vehicle is equipped with a Ublox LEA-4T GPS International Journal of Distributed Sensor Networks 7

Input bk−1 Initialisation nk−1

∇Δ𝜙k 𝚫 with cycle slips 𝚫𝝓k Cycle-slip detector

k k ∇Δ𝜙 ∇Δ𝜙 free of cycle slips of new satellites

Baseline computationbk Quarantine

Ambiguity computation

nk

Figure 2: Ambiguity Tracker flow diagram. The LAMBDA method is used to initialize the Ambiguity Tracker. Cycle slips in the carrier phase double differences are detected using a prediction of the baseline. The baseline is fixed using the cycle-slip free measurements. Cycle-slip corrupted measurements and measurements from newly acquired satellites are placed in quarantine, whose ambiguity is later on computed using the fixed baseline.

×10−4 antennas.ForthispurposeaLeicaDistohandheldlaserrang- ing device has been used, which states to have a typical mea- 8 suring accuracy of ±1mmupto120m.Therangemeasure- 6 ment was carefully done by not blocking the sky view of the

(m) antennas with the measuring device and by correcting with

j 4 e the antenna phase offsets. Also repeated measurements were 2 performed and the average was taken as a ground truth. In 0 this way, with the Disto ranging device we are able to measure 0 200 400 600 800 1000 the distance between the patch antennas with subcentimeter Time (s) accuracy in static conditions. By comparing the measured range with the estimated AT1 AT4 AT2 AT5 baseline length of the different Ambiguity Trackers, the AT3 correct integer ambiguity vector can be identified in static conditions. As a further validation step, the baseline height Figure 3: A comparison of the normalized residuals of five different difference between the antennas assuming a flat road was Ambiguity Trackers for a static baseline in a 1000 s period. The compared to the baseline up-coordinate. Ambiguity Tracker following the correct integer ambiguity vector In addition, a laser scanner or Light Detection and Rang- (AT1) has the lowest normalized residual. ing (LIDAR) device is used in order to have a rough reference system in motion conditions. For this purpose, an LD- MRS automotive laser scanner from Sick is mounted in the receiver taking measurement at 4 Hz. The receivers output front part of the ego vehicle, specifically above the number pseudorange, carrier phase, and Doppler measurements, plate. The measurement update rate of this reference sensor is 12.5 Hz. This laser scanner can measure a two-dimensional which are logged along with the navigation messages in the baseline between the front part of the ego vehicle and the rear Receiver Independent Exchange Format (RINEX) on board part of the target vehicle. The geometrical offsets from the of each vehicle. All processing takes place offline. GNSS antennas to the laser scanner in the ego vehicle and A magnetic patch antenna from Ublox is placed on the totherearpartofthevehicleinthetargetvehiclehavebeen roof of each vehicle. The experiments were performed in precisely measured prior to the experiments and have been a rural open-sky environment in Hurlach, 70 km west of added to the baseline estimation of the laser scanner. As the Munich. Single trees next to the road were the only obstacles laser scanner measures the relative position in the body frame encountered that could momentarily block the line of sight to of the vehicle and the Ambiguity Tracker works in the East- the satellites. North-Up (ENU) coordinate system, only the baseline length As a reference system, we have compared the estimated will be compared. The up-component is not measured by the baseline length to the geometrical distance between the laser scanner and will present an error when comparing to the 8 International Journal of Distributed Sensor Networks

30 8.037 20 8.035 10

(m) 8.033 0 8.031 ∇Δ𝜌 −10 Baseline (m) length −20 0 10 20 30 −30 Time (s) 0 50 100 150 |b| ambiguity tracker Time (s) Disto reference (a) Pseudorange (a) Beginning of the experiment 30 5.714 20 5.71 10

(m) 0 5.706

∇Δ𝜙 −10 5.702 −20 Baseline (m) length 5.698 −30 172 177 182 187 192 0 50 100 150 Time (s) Time (s) |b| ambiguity tracker (b) Carrier phase Disto reference Figure 4: Pseudorange and carrier phase double differences for 13 (b) End of the experiment satellites in view during a 200-second run. At the beginning and at the end of the run the vehicles are at standstill. Figure 5: Baseline length estimated by the Ambiguity Tracker (green) and measured with Disto handheld laser ranging device (blue) at the beginning and at the end of a 200-second run. The errors of a few millimeters indicate that the correct integer ambiguity three-dimensional baseline of the Ambiguity Tracker. Other vector is tracked. possible error sources of the laser scanner are presented in [20]. 24 5.2. Ambiguity Tracker and Cycle-Slip Detector. The correct 20 tracking of an ambiguity vector is tested in a 200 s run. 16 First, both vehicles are at a standstill at approximately 8m distance; then they start accelerating up to 40 km/h and drive 12 at changing distances from 5 to 20 m and finally decelerate to 8 standstill. The baseline is accurately measured with the Disto Baseline (m) length 4 device at the beginning and at the end of the run. Figure 4 dis- 0 50 100 150 plays the pseudorange and carrier phase double differences to Time (s) all tracked satellites. The higher noise and the effect of mul- tipath can be observed on the pseudoranges in Figure 4(a), |b| based on carrier phase while Figure 4(b) reveals the high number of carrier phase |b| based on pseudorange losses of lock and consequent cycle slips. Other cycle slips LIDAR reference cannot be detected by mere visual inspection since they are Figure 6: A comparison between the baseline length based on the masked by the dynamics of the baseline during the run. pseudorange measurements (orange) and the baseline length based One single Ambiguity Tracker is initialized with the on the carrier phase measurements (green) during a 200 s run. correct integer ambiguity vector, which has been determined by applying LAMBDA successively to the 30 s initial standstill time, calculating the baseline for all most probable candi- respectively. Moreover, Figure 6 shows how the baseline dates, and comparing its length to the reference distance. To length tracked by the Ambiguity Tracker matches the LIDAR determine whether the Ambiguity Tracker is able to correctly reference. We can conclude that the Ambiguity Tracker follow the integer ambiguity vector with changing satellite did successfully track the ambiguity during the 200 s run. constellations and the multiple cycle slips, the baseline length Figure 6 also shows the baseline length from the Ambiguity of the Ambiguity Tracker and the references measured by the Tracker compared to the pseudorange solution. Meter-level Disto device at the beginning and at the end of the run are errors of the pseudorange baseline solution can be observed shown in Figure 5. An error of 3 mm and 2 mm is measured, during standstill and while driving. International Journal of Distributed Sensor Networks 9

×10−4 12 3 10 8 2 6 (m) j

4 e 1 2 0 0 50 100 150 0 Number of double differences double of Number 0 50 100 150 Time (s) Time (s) AT1 AT4 AT1 AT4 AT2 AT5 2 5 AT3 AT AT AT3 Figure 7: A comparison of the number of tracked double differences of five different Ambiguity Trackers during a 200 s run. The Figure 8: A comparison of the normalized residuals of five different Ambiguity Tracker following the correct integer ambiguity vector Ambiguity Trackers during a 200 s run. The Ambiguity Tracker (AT1) tracks generally more satellites. following the correct integer ambiguity vector (AT1) has generally the lowest normalized residual.

5.3. Multiple Ambiguity Hypotheses. The objective of this 1 testistoassesstheperformanceoftheMultipleAmbiguity 0.8 Hypotheses approach from Section 3.Forthis,thesamerun 0.6 as before is chosen and five Ambiguity Trackers are initialized 0.4 with the five most likely ambiguity vectors output by the Weight LAMBDA method at the initial epoch. The different Ambigu- 0.2 ity Trackers will be named AT1 through AT5, with AT1 being 0 0 50 100 150 the Ambiguity Tracker which is following the correct integer Time (s) ambiguity vector. Each Ambiguity Tracker maintains one ambiguity solution and, consequently, one possible baseline AT1 AT4 solution. According to the methods explained in Section 3, AT2 AT5 the Ambiguity Trackers are weighted according to their AT3 number of tracked double differences and the magnitude of Figure 9: An evaluation of the weight of five different Ambiguity their residuals. Trackers during a 200 s run. The Ambiguity Tracker following the Figure 7 shows the number of tracked double differences correct integer ambiguity vector (AT1) quickly gets more weight by each Ambiguity Tracker over the 200 s run. It can be than the others. observed how AT1 is usually tracking more satellites, while the other Ambiguity Trackers often detect false cycle slips and place satellites in quarantine. 5.4. Baseline Tracking Filter. In this test, the performance of The residual vector is given by (12). The normalized norm the Baseline Tracking Filter presented in Section 4 is evalu- of the residual vector for all five Ambiguity Trackers is shown ated. The strategy of this Kalman filter is to give more weight in Figure 8. It can be seen how, on average, the correct tothoseAmbiguityTrackerswhosebaselinecoordinatesare Ambiguity Tracker AT1 presents a lower residual error in the closer to this predicted baseline. This weighting parameter range below. will help to identify faster the correct solution in case that the Both parameters are used to weight each of the five correct solution is lost. Ambiguity Tracker hypotheses. Figure 9 shows the weight of In this case, this test run lasts almost 9 minutes, and it is each of the Ambiguity Trackers. As explained in Section 3, divided into two parts. The first part is the same stretch used the weight is a value between 0 and 1, and the sum of all in the previous two experiments. The second part begins with weights amounts to one. All weights are initialized to the same both vehicles at a standstill at approximately 5.7 m distance; value and quickly AT1, the Ambiguity Tracker we know that is then they start accelerating and finally they stop again at the the correct one from the previous experiment, gets a higher end of the stretch. weight. Each time the weight of an Ambiguity Tracker falls Inthesecondpartofthistestrun,theAmbiguityTracker below a certain threshold the Ambiguity Tracker is eliminated method loses the track of the correct solution mainly due and a new one is initialized with some weight that is “stolen” to obstacles near the road, which causes numerous cycle from the other Ambiguity Trackers. slips and many satellite blockages. One example is shown in This experiment demonstrates that weighting according Figure 10, where the baseline lengths of the five Ambiguity to the normalized residual and the number of tracked Trackersarecomparedwiththelaserscanner.Itcanbeseen satellites makes it possible to successfully find the correct how all five Ambiguity Trackers lose the track of their baseline Ambiguity Tracker. solutions in second 357. Until then, the correct solution is 10 International Journal of Distributed Sensor Networks

20 800 18 16 600 Real time 14 400 12 10 200 8 Baseline (m) length

Computation time (s) Computation 0 6 1 5 10 15 20 25 30 330 340 350 360 370 380 Number of ambiguity trackers Time (s) 4 Hz 1 4 AT AT 10 Hz AT2 AT5 AT3 LIDAR Figure 12: Computational complexity study with regard to the number of initialized Ambiguity Trackers. Two GPS receivers with Figure 10: A comparison of the baseline length of five different different measurement update rates have been analyzed. Ambiguity Trackers when an outage occurs. After the outage, the correct integer ambiguity vector is recovered by the Ambiguity Tracker AT1. on-board sensors, such as steering wheel angle sensor and 1 wheel tick odometers, could stabilize the baseline prediction 0.8 forlongerperiodsoftime.This,however,fallsoutofthescope of the current paper and is left as future work. 0.6 0.4 Weight 5.5. Computational Resources. The multiple Ambiguity 0.2 Tracker algorithm has been run on an Intel i7 64-bit processor 0 at 2.10 GHz. A recorded test run of 527 s has been processed 0 50 100 150 200 250 300 350 400 450 500 and the computation time has been measured. Figure 12 Time (s) shows the computation time in dependance of the number of AT1 AT4 initialized Ambiguity Trackers for both, processing measure- AT2 AT5 ments at 4 Hz and 10 Hz. The dashed red line represents the AT3 real-time processing limit, above which the computation time exceeds the real time. Up to 29 Ambiguity Trackers can Figure 11: An evaluation of the weight of five different Ambiguity beruninrealtimeat4Hzandupto16at10Hz. Trackers during a 527 s run using the Baseline Tracking Filter. The system correctly recovers after carrier phase loss of lock and the The previous analysis is performed on a test run in correct Ambiguity Trackers (AT1, AT5, and AT1) quickly get more a benign environment. The computation time is, however, weight than the others. partlycorrelatedtotheenvironment.Themorefrequentlythe cycle slips occur, the more the satellites are placed in quaran- tine and need to be checked for being healthy again. Conse- quently, a slightly lower number of Ambiguity Trackers are tracked by AT5. After the outage, the five Ambiguity Trackers expected to be run in more challenging signal conditions. are reinitialised. Without the Baseline Tracking Filter (not shown here) none of the Ambiguity Trackers is able to find the Regarding the memory requirements, each Ambiguity correct solution, all of them being initialized and discarded Tracker only stores the current integer ambiguity, the satellite over and over again. However, by incorporating the Baseline number of tracked satellites and satellites in quarantine, the Tracking Filter and predicting the baseline using the speed baseline, baseline velocity, and baseline acceleration. and the heading of each vehicle,itispossibletoweightthe reinitialized Ambiguity Trackers with the predicted solution 6. Conclusion andeventuallyfindthecorrectsolutionasshowninFigure 10. AT1isabletorecoverthecorrectsolution. In this paper we proposed a new method to determine The weight of each Ambiguity Tracker along the entire therelativepositionoftwovehiclesusingacooperative test run is shown in Figure 11. It can be seen how after the approach exchanging GNSS raw measurements. The Ambi- outage in second 357 AT1 quickly gets more weight than the guity Tracker solves and tracks the carrier phase double others. Therefore, we can conclude that the Baseline Tracking difference integer ambiguity vector and computes a precise Filter improves the global performance of the Multiple relative position between vehicles. The Ambiguity Tracker is Ambiguity Hypotheses method. based on single-epoch LAMBDA method to find the most An increased occurrence of signal obstructions and cycle likely integer ambiguity vector and be robust against cycle slips, for instance, while driving in an urban-like environ- slips. The approach is designed to be used for low-cost single- ment, will limit the applicability of the presented method. frequency receivers that are already integrated in modern To approach these scenarios a sensor fusion solution using vehicles. International Journal of Distributed Sensor Networks 11

We have demonstrated how running multiple Ambiguity [7] W.Travis,S.Martin,andD.M.Bevly,“Automatedshortdistance Trackers in parallel and correctly weighting them make it vehicle following using a dynamic base RTK system,” Interna- possible to find the correct integer ambiguity. A Kalman filter tional Journal of Vehicle Autonomous Systems,vol.9,no.1-2, tracking the baseline improves the method in situations of pp. 126–141, 2011. momentary blockage. The proposed method has been tested [8]T.TakasuandA.Yasuda,“Cycleslipdetectionandfixingby in an open-sky rural environment with two vehicles driving MEMS-IMU/GPS integration for mobile environment RTK- behind each other. It has been demonstrated that the pro- GPS,” in Proceedings of the 21st International Technical Meeting posed approach is able to track with subcentimeter accuracy of the Satellite Division of the Institute of Navigation (ION GNSS ’08), pp. 35–42, September 2008. the baseline using Ublox LEA 4T GPS receivers. This method is designed to run in real time and is able to track up to 30 [9] S. Zeng, “Performance evaluation of automotive radars using integer ambiguities on a modern notebook. carrier-phase differential GPS,” IEEE Transactions on Instru- mentation and Measurement,vol.59,no.10,pp.2732–2741,2010. Future lines of work include the integration of the pro- posed approach with on-board sensors to better predict the [10] P. Henkel and M. Iafrancesco, “Tightly coupled position and attitude determination with two low-cost GNSS receivers,” in baseline over time and with other relative positioning infor- Proceedings of the 11th International Symposium on Wireless mation sources, as, for instance, a radar or a laser scanner sen- Communications Systems (ISWCS’ 14),pp.895–900,Barcelona, sor, in order to weight the Ambiguity Trackers and be able to Spain, August 2014. find the correct solution more quickly. [11] J. Kiam, J. Cardenas, and P. Henkel, “Cost-effective cooperative RTK positioning of rowing boats,”in Proceedings of the Interna- Conflict of Interests tional Technical Meeting of the Institute of Navigation,SanDiego, Calif, USA, January 2014. The authors declare that there is no conflict of interests [12] P. Misra and P. Enge, Global Positioning System: Signals, Mea- regarding the publication of this paper. surements, and Performance, Ganga-Jamuna Press, Lincoln, Mass, USA, 2nd edition, 2006. [13]S.Pullen,Y.S.Park,andP.Enge,“Impactandmitigationof Acknowledgments ionospheric anomalies on ground-based augmentation of GNSS,” Radio Science,vol.44,no.1,ArticleIDRS0A21,2009. This work was accomplished in the frame of the DLR project [14]D.Lawrence,R.B.Langley,D.Kim,F.Chan,andB.Pervan, “Fahrzeugintelligenz und Fahrwerk.” The authors would like “Decorrelation of troposphere across short baseline,” in Pro- to thank the great support of Estefan´ıa Munoz˜ Diaz in the ceedings of the IEEE/ION Position, Location and Navigation realization of the real-world experiments. Symposium (PLANS ’06), pp. 97–102, 2006. [15]F.dePonte,A.Steingass,andT.Strang,“Zero-baselinemea- References surements for relative positioning in vehicular environments,” in Proceedings of the 6th European Workshop on GNSS Signals [1]F.dePonteMuller,E.M.Diaz,B.Kloiber,andT.Strang, and Signal Processing,2013. “Bayesian cooperative relative vehicle positioning using pseu- [16] P. Teunissen, “Least-squares estimation of the integer GPS dorange differences,” in Proceedings of the IEEE/ION Position, ambiguities,” in Invited Lecture, Section IV Theory and Method- Location and Navigation Symposium (PLANS ’14), pp. 434–444, ology, IAG General Meeting, Beijing, China,1993. Monterey, Calif, USA, May 2014. [17] A. Parkins, “Increasing GNSS RTK availability with a new [2] R. Schubert, E. Richter, and G. Wanielik, “Comparison and single-epoch batch partial ambiguity resolution algorithm,” evaluation of advanced motion models for vehicle tracking,” in GPS Solutions,vol.15,no.4,pp.391–402,2011. Proceedings of the 11th International Conference on Information [18] S. Verhagen, P. Teunissen, and O. Odijk, “Carrier-phase ambi- Fusion (FUSION ’08),pp.1–6,July2008. guity success rates for integrated GPS-Galileo satellite naviga- [3] N. Alam, A. T. Balaei, and A. G. Dempster, “Relative positioning tion,”in Proceedings of the Space, Aeronautical and Navigational enhancement in VANETs: a tight integration approach,” IEEE Electronics Symposium, pp. 139–144, 2007. Transactions on Intelligent Transportation Systems,vol.14,no.1, [19] L. Serrano, D. Kim, R. B. Langley, K. Itani, and M. Ueno, “A pp.47–55,2013. GPS velocity sensor: how accurate can it be? A first look,” in [4] K. Ansari, C. Wang, L. Wang, and Y. Feng, “Vehicle-to-vehicle Proceedings of the National Technical Meeting of The Institute of real-time relative positioning using 5.9–GHZ DSRC media,” in Navigation, pp. 875–885, January 2004. Proceedings of the IEEE 78th Vehicular Technology Conference [20] F. de Ponte, L. M. Navajas, and T. Strang, “Characterization (VTC Fall’ 13),pp.1–7,September2013. of a laser scanner sensor for the use as a reference system in [5] C. Basnayake, C. Kellum, J. Sinko, and J. Strus, “GPS-based vehicular relative positioning,” in Communication Technologies relative positioning test platform for automotive active safety for Vehicles,vol.7865ofLecture Notes in Computer Science,pp. systems,” in Proceedings of the 19th International Technical 146–158, Springer, Berlin, Germany, 2013. Meeting of the Satellite Division of The Institute of Navigation,pp. 1457–1467, September 2006. [6] W.Travis and D. M. Bevly, “Trajectory duplication using relative position information for automated ground vehicle convoys,” in Proceedings of the IEEE/ION Position, Location and Navigation Symposium (PLANS ’08), pp. 1022–1032, Monterey, Calif, USA, May 2008. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 163581, 15 pages http://dx.doi.org/10.1155/2015/163581

Research Article A Mobility Model for Connected Vehicles Induced by theFishSchool

Daxin Tian,1,2 Keyi Zhu,1,2 Jianshan Zhou,1,2 Jian Wang,1,2 Guohui Zhang,3 and He Liu4

1 Beijing Key Laboratory for Cooperative Vehicle Infrastructure Systems & Safety Control, School of Transportation Science and Engineering, Beihang University, Beijing 100191, China 2Jiangsu Province Collaborative Innovation Center of Modern Urban Traffic Technologies, Nanjing 210096, China 3School of Information Engineering, Academy of Armored Forces Engineering, Beijing 100072, China 4The Quartermaster Equipment Institute, The General Logistics Department of CPLA, Beijing 100010, China

Correspondence should be addressed to Guohui Zhang; [email protected]

Received 10 October 2014; Accepted 7 December 2014

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Daxin Tian et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

We proposed a mobility model of connected vehicles with wireless communications. The proposed mobility model is inspired by the fish school, which takes into account several significant attractive/repulsive potential fields induced by the expected mobility, the tendency to avoid collisions, and the road constraints. With this model, we present a comprehensive approach for designing and analyzing the potential fields acting on connected vehicles. Based on the Lyapunov stability theorem, a theoretical analysis is also provided to show that the cooperative collision avoidance and stable constrained flocking of connected vehicles can be performed by using this model. The numerical experiments prove the effectiveness of the wireless communication on the safety and efficiency of connected vehicles.

1. Introduction comprehensive evaluation of the influence of connected vehicles on the safety and efficiency. In recent years, more and more researches on swarm intelli- The wireless communication technologies expand the gencehavebeenadvancedandutilizedinthefieldsofengi- sensing range of vehicles and enhance the information neering, , , and transporta- interplays among vehicles moving in the same road section. tion [1]. The cooperative behaviors of vehicles have been For example, one popular application of these wireless com- researched for the sake of giving a deep insight into traffic munication technologies in vehicular system is vehicular ad models [2]. With the rapid growth of wireless communication hoc network (VANET) which is supported through vehicle- technologies, a large number of vehicles form a vehicular ad to-roadside (V2R) and vehicle-to-vehicle (V2R) communica- hoc network and cooperate with each other; thus collision tions. There are large numbers of studies on signal propaga- warning, road obstacle warning, intersection collision warn- tion in vehicle-to-roadside and vehicle-to-vehicle communi- ing, and lane change assistance can be improved [3, 4]. Those cations, such as works [5, 6], which focus on the mechanism connected vehicles move in a cooperative manner, which is of communication under various traffic situations. Besides, similar to some cooperative behaviors of animal flocking in other studies are working on the impacts of the cooperated nature. Therefore, it is convenient for researchers to model the vehicles on the transportation system where the communi- connected vehicles as a group by drawing an analogy to the cation technologies are widely deployed. For instance, the animal flocking. The goals of this paper are twofold: (i)to work [7] investigates the impact of the number of cooperative mathematically model the cooperative movements of the vehicles on the network performance under Nakagami fading connected vehicles with the wireless communications based channel. Moreover, the wireless communication also can be on the fish school, and, (ii) in the meanwhile, to provide the used to assist in developing the driving-assistance system 2 International Journal of Distributed Sensor Networks

[8], whereas there are few studies paying attention to the wireless communications. That is, the wireless communica- behaviors of the cooperative behaviors of the connected tions system can make each vehicle able to sense their own vehicles moving in the same road section as a group. It is a and environmental information as well as share the collected large challenge to model the cooperative behaviors of con- information with their neighbors, which is similar to the nected vehicles, because the interplays among vehicles as well environment-sensing behavior of fish school. Furthermore, as some environmental factors that influence the vehicular with wireless communication, vehicles are able to coordinate movement should be carefully identified at first and then their movement (velocity and direction) according to the mathematically formulated. Nevertheless, this work aims at environmental situation and the overall mobility of the this issue by following the bioinspired modelling approach. vehicle group. Each vehicle can interact with its neighbors in Since the cooperation is one characteristic of the animal real time via wireless communication system so that they flocking such as fish school, we draw on the mechanism canmoveinacooperativemanner.Thisissimilartothe of flocking in biosphere (i.e., the fish school) to model the cooperativebehavioroffishschoolwhichisinducedbythe cooperative behaviors of the connected vehicles. interplays among different fish. In this sense, some rules char- The cooperative behaviors of animal flocking are usu- acterizing the behaviors of fish school such as the cohesion, ally governed by the three rules: cohesion, separation, and the separation, and the alignment can be adopted to present alignment [9, 10]. Some other researchers turn to the evo- the cooperation of those connected vehicles to some extent. lutionary models to simulate the evolving animals. These In addition, another important character of fish school studies, for instance, the selfish herd theory11 [ ], the predator behavior is danger avoidance (such as avoiding obstacles or confusion effect12 [ ], and the dilution effect [13, 14], attempt to predators),whichcanbeanalogoustothecollisionavoidance. answer the key question of how flocking behavior evolves. As Moving fish can form a coordinated school and shift back to illustrated in some early studies, the typical examples for bio- an amorphous shoal within seconds when facing emergence logical behavior in the same movement pattern include bird or obstacles [24]. Obstacle avoidance has been studied in flocks, fish schools [15], insect swarms [16], and quadruped many flocking researches [25–27]. However, these studies herds [17]. Nowadays, as a collective behavior, flocking is not have not considered the realistic applications of the models. only exhibited by animals of similar size which aggregate Hence, it is significant to provide some mathematical models together, but also presented in the crowd and the vehicles for describing the mobility of connected vehicles when taking [18, 19]. In fact, cooperative behaviors are pervasive among obstacles avoidance into account. In the meanwhile, some all forms of self-propelled particles [20]. Hence, these fun- important factors should be additionally considered, well damental works pave the way to applying the rules and defined, and formulated in modeling, which include the approaches for modeling the biological cooperative behaviors constraints of road and the constraints of traffic rules, when to other engineering fields. drawing an analogy between the vehicle group and the fish Moreover, bioinspired approaches have been widely school. adopted in a lot of existing literature in the field of modeling In this paper, a novel model has been proposed to mobility of flocking individuals moving as a group [21–23]. In formulate the movement of connected vehicles with consid- nature, a large number of fish swim as a disciplined phalanx ering some realistic traffic situations where the constraints of and they can stream up and down at high speed, twist in the road and road obstacles exist. By analogy, connected vehi- different ways, vary school shapes, and avoid obstacles with- cles also follow some similar regulations governing the fish out collisions. In order to coordinate its behavior with the school. The interplay among connected vehicles is mathemat- overall schooling, fish has a sensor-response system to ically modeled by introducing the potential field functions steadily keep the relative position among their neighbors that are induced by fish school behaviors. In addition, a theo- regardless of their topology changing all the time. The lateral- retical analysis framework is provided to verify the rationality line system is very sensitive to changes in water currents and of proposed model. Finally, some numerical experiments are vibrations so that fish is able to dynamically and adaptively alsogiventodemonstratethemodelaswellasprovidea respond to their environmental changes in time [24]. The better understanding of the improvement of the safety and environmental signals can be propagated throughout the efficiency of traffic by wireless communication. group, which results in a unified group decision making. To The rest of the paper is as follows. Section 2 proposes better understand the basic nature of the influences at work in a mobility model to describe the connected vehicles and a school of fish, many works have discussed and presented an presents the stability analysis. In Section 3, extensive simula- algebraic approach to describe the interplay in the fish school tions are performed to verify the proposed model. Section 4 [22]. concludes this paper. Inspired by the aforementioned behaviors of fish school, we are allowed to draw an analogy between the connected vehicles and the fish school. With the assistance of the 2. Model of Cooperative Vehicles advanced sensors, such as velocity sensor, vehicular position- ing system, and navigation system, a vehicle can be provided 2.1. Mobility Model of Connected Vehicles. Moving as a group with the real-time information of velocity, acceleration, posi- in the same road section, each vehicle needs to maintain tion, and other basic parameters and even can feed back the different velocity and accelerate under the effects of forces. In collected information to its neighboring vehicles through the model, we address the attraction of the goal, the repulsion International Journal of Distributed Sensor Networks 3

in which v𝑖(𝑡) is the actual velocity at time 𝑡 of vehicle 𝑖 with (1) the mass 𝑚𝑖.Informula(1), F𝑖 (𝑡) is the attractive force by (2) the goal of vehicle 𝑖, F𝑖 (𝑡) istheinteractiveforceamong (3) connected vehicles, and F𝑖 (𝑡) is the environmental effects of vehicle 𝑖. Without special notation, the letters in bold rep- resent the term which is a vector within a two-dimensional plane. Under the effect of the goal, the vehicles are expected to move in the certain direction in the desired speed. Therefore, (1) F𝑖 (𝑡) stimulates the vehicle 𝑖 with a certain desired velocity V0 e (𝑡) ri: the equivalent radius 𝑖 in the expected direction 𝑖 . Hence, the expected veloc- di: the range of sensing ity can be formulated as i Vehicle 𝑜 𝑜 W v𝑖 (𝑡) = V𝑖 e𝑖 (𝑡) . (2) ri : local warning scope

However, in reality, the velocity v𝑖(𝑡) at time 𝑡 of vehicle 0 may deviate from the desired velocity v𝑖 (𝑡) due to the nec- essary deceleration, acceleration, or other unknowns. Thus, (1) 0 F𝑖 (𝑡) as a stimulus to force the vehicle back to the v𝑖 (𝑡) again with a relaxation time 𝜏𝑖 canbegivenby 𝑖 Figure 1: The interplay range of vehicle . 𝑜 (1) v𝑖 (𝑡) − v𝑖 (𝑡) F𝑖 (𝑡) =𝑚𝑖 . (3) 𝜏𝑖 of the obstacles, the constraints of the road, and the inter- Oneofthecharacteristicsofconnectedvehiclesiscooper- plays among vehicles in the group including both attractive ative behavior. The vehicles benefit from the wireless commu- and repulsive forces. Moreover, we assume that vehicles nication so that they can cooperate in moving as a group. The can communicate with other neighbor vehicles via wireless vehicles aggregate together in the same movement pattern communication technologies which reflect in sensing range while keeping the certain safe distance from each other. For which will be provided later. In this paper, the main notations the purpose of formulating the group forces among vehicles, used throughout the paper are given in Notations. we set the interactive forces into two categories including the In the model, each vehicle 𝑖 belongs to the set of vehicles attractiveforceandtherepulsiveforcewhichcanmakethe denoted by N ={1,2,...,𝑛}with the total number of vehicles vehicles run as a group while keeping a certain distance 𝑛(𝑛>.Inavehiclegroup,weconcentrateonthetarget 2) without collision. We lump the attractive and repulsive forces 𝑖 𝑗 ∀𝑖 =𝑗∉ N (2) vehicle and its neighbor , .Thevector in F𝑖 (𝑡) as follows: 𝑇 p𝑖(𝑡) = 𝑖[𝑥 (𝑡),𝑖 𝑦 (𝑡)] signifies the location of vehicle 𝑖 at time 𝑡 F(2) (𝑡) = ∑ (F𝐴 (𝑡) + F𝑅 (𝑡)). . Besides, we describe the force between mobility vehicles 𝑖 𝑖𝑗 𝑖𝑗 (4) due to the distance changes among them so that the interplay ∀𝑗∈𝑁𝑖(𝑡) ranges of each vehicle are significant. In this paper, each (2) vehicle is treated as a virtual sphere with the radius 𝑟𝑖 in F𝑖 (𝑡) is the accumulated forces among target vehicle 𝑖 𝐴 order to correct the drawbacks of overlap (see in Figure 1). and all other neighbor vehicles 𝑗 in its sensing range. F𝑖𝑗 (𝑡) The concept of the “local warning scope” is defined asthe 𝑖 𝑊 is the attractive force on vehicle from its neighbor vehicles. localcirclezonewithradius𝑟𝑖 of the vehicle warning that the Under the influence of the attractive force, the vehicles will situation may be dangerous when other vehicles or obstacles accelerate toward each other to keep them as a group. Mean- 𝑅 enter this area. In this paper, the vehicle can get the informa- while, the F𝑖𝑗 (𝑡) is the repulsive force on vehicle 𝑖 from its tion of the location, velocity, and other behaviors of neigh- neighbor vehicles to keep the safe distance and to avoid bor vehicles via communicating with other vehicles in its 𝑑 collisions among connected vehicles. sensing range with the radius as 𝑖 (see in Figure 1). In the short distances like the warning scope, the repul- In order to develop a mobility model which can reflect sion is increasing with the decreasing of the distances among an accurate traffic situation, the model not only considers the vehicle 𝑖 and its neighbors. Likewise, the attraction will play a interactive forces among vehicles in the group, but also takes leading role in making vehicles stay as a group when the the repulsive forces of obstacles and road boundaries into distances among vehicle 𝑖 and its neighbors are larger than account. These forces are described by a vector at every the warning scope. In the case that the neighbor vehicle is location in the force field. Following these considerations, we beyond the bounds of the sensing range 𝑑𝑖, the attraction will defined the effects induced by accumulated forces exerted on 𝑖 notexist.Similarly,therepulsiveforcewillnotcontributeto the vehicle as follows: the acceleration of a vehicle if it is not in the sensing range of the target vehicle. In order to depict this situation, we use the (1) (2) (3) 𝑚𝑖v̇𝑖 (𝑡) = F𝑖 (𝑡) + F𝑖 (𝑡) + F𝑖 (𝑡) , (1) concept of potential functions to formularize the attractive 4 International Journal of Distributed Sensor Networks and repulsive forces. Besides, according to the research [19, 1 22], the potential functions are used to describe the interplays 0.9 among individuals in fish school and vehicles, which also 0.8 can control the individual to avoid the obstacle through the repulsive potential field. 0.7 The effects of two kinds of interplays among vehicles, that 0.6 is, attraction and repulsion, are varying along with the chang-

(t) 0.5 ing relative distance between vehicles. And the comprehen- i,j sive impact of the interplays can be appropriately modeled 𝜑 0.4 with the potential field functions. A bump function model in 0.3 [28] is adopted to formulate the smooth potential functions with finite cutoffs. In this paper, for the sake of simplicity, the 0.2 bump function used to indicate the proximity between the 0.1 vehicles 𝑖 and 𝑗 is denoted by 𝜑𝑖𝑗 (𝑡) =𝑙 𝜓 (p𝑖(𝑡), p𝑗(𝑡)).Bycom- 0 bining 𝜑𝑖𝑗 (𝑡) and the attractive/repulsive potential functions 𝑈 (p (𝑡), p (𝑡)) 𝑈 (p (𝑡), p (𝑡)) 0 100 200 300 400 500 𝐴 𝑖 𝑗 and 𝑅 𝑖 𝑗 , the attractive/repulsive Δdi,j(t) (m) forces are defined as k = 0.2; l = 0.1 k = 0.5; l = 0.5 k = 0.5; l = 0.1 k = 0.2; l = 0.7 𝐴 k = 0.2; l = 0.3 k = 0.5; l = 0.7 F (𝑡) =−𝑚𝑖∇𝑈𝐴 (p𝑖 (𝑡) , p𝑗 (𝑡))−𝜌𝑖𝜑𝑖𝑗 (𝑡) v𝑖 (𝑡) , 𝑖𝑗 k = 0.5; l = 0.3 k = 0.2; l = 0.9 (5) 𝑅 k = 0.2; l = 0.5 k = 0.5; l = 0.9 F𝑖𝑗 (𝑡) =−𝑚𝑖∇𝑈𝑅 (p𝑖 (𝑡) , p𝑗 (𝑡))−𝜇𝑖𝜑𝑖𝑗 (𝑡) v𝑖 (𝑡) , Figure 2: Bump function with different parameters. where 𝜌𝑖 and 𝜇𝑖 are two positive real coefficients used to scale the magnitude of the attractive/repulsive forces, and they are The potential function of attractive force is designed as 𝜌 ,𝜇 ∈ (0, 1) limited as 𝑖 𝑖 in this paper. the form of a tangent function: Accordingtotheformofthebumpfunction,𝜑𝑖𝑗 (𝑡) can be expressed as 𝑈𝐴 (p𝑖 (𝑡) , p𝑗 (𝑡)) 󵄩 󵄩 𝜋(󵄩p (𝑡) − p (𝑡)󵄩 −(𝑟 +𝑟)) {1 󵄩 𝑖 𝑗 󵄩 𝑖 𝑗 𝜑 (𝑡) { 𝑘𝐴 tan ( ), 𝑖𝑗 {2 2(𝑑 −(𝑟 +𝑟)) = 𝑖 𝑖 𝑗 { 󵄩 󵄩 { Δ𝑑𝑖𝑗 (𝑡) −(𝑟𝑖 +𝑟𝑗) { 󵄩 󵄩 { 1, ∈ [0, 𝑙] , { when 󵄩p𝑖 (𝑡) − p𝑗 (𝑡)󵄩 ∈[(𝑟𝑖 +𝑟𝑗),𝑑𝑖), { when { { 𝑑𝑖 −(𝑟𝑖 +𝑟𝑗) 0, otherwise { { { Δ𝑑 (𝑡)+(𝑙−1) (𝑟 +𝑟 )−𝑙×𝑑 { 𝑖𝑗 𝑖 𝑗 𝑖 (7) 𝑘V (1+cos (𝜋( ))) , = { (1−𝑙) (𝑑 −(𝑟 +𝑟)) { 𝑖 𝑖 𝑗 and the repulsive potential function is given as follows: { { Δ𝑑𝑖𝑗 (𝑡) −(𝑟𝑖 +𝑟𝑗) { ∈ (𝑙, 1] , 𝑈 (p (𝑡) , p (𝑡)) { when 𝑅 𝑖 𝑗 { 𝑑𝑖 −(𝑟𝑖 +𝑟𝑗) 0, { otherwise, {1 1 { 𝑘 ( (6) { 𝑅 󵄩 󵄩 2 {2 (󵄩p (𝑡) − p (𝑡)󵄩 −(𝑟 +𝑟)) { 󵄩 𝑖 𝑗 󵄩 𝑖 𝑗 { 2 { 1 where 𝑘V is similarly a positive parameter within (0, 1) and the = { − ) , { 2 variable Δ𝑑𝑖𝑗 (𝑡) denotes the intervehicular distance between { (𝑑 −(𝑟 +𝑟)) { 𝑖 𝑖 𝑗 the vehicles 𝑖 and 𝑗 at the time 𝑡. In order to explore the { 󵄩 󵄩 { when 󵄩p𝑖 (𝑡) − p𝑗 (𝑡)󵄩 ∈((𝑟𝑖 +𝑟𝑗),𝑑𝑖], influence of the different parameters 𝑘V and 𝑙 on the adopted { 󵄩 󵄩 bump function, we conduct the numerical experiment with {0, otherwise, the settings of 𝑑𝑖 = 300 m, 𝑟𝑖 =𝑟𝑗 =5m, 𝑘V = {0.2, 0.5},and (8) 𝑙 = {0.1, 0.3, 0.5, 0.7, 0.9}.TheresultsareshowninFigure 2.It 𝑇 𝑇 can be found that this bump function is a scalar function that where the vectors p𝑖 =[𝑥𝑖,𝑦𝑖] , p𝑗 =[𝑥𝑗,𝑦𝑗] denote ranges between 0 and 1 and has different cutoffs with different the position of vehicles 𝑖,,respectively. 𝑗 𝑘𝐴 and 𝑘𝑅 are two values of 𝑘V and 𝑙.ItalsocanbeseeninFigure 2 that when scaling positive real coefficients. By introducing the potential 𝑘V = 0.2 and 𝑙=0the function has a sudden jump at a certain functions 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) and 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)),wecanfurther point. To guarantee the smoothness of the potential function, assume that the magnitudes of the attractive and repulsive we fix 𝑘𝑜 =𝑘𝐿 =𝑘V = 0.5 and 𝑙 = 0.3 in the following effects existing between two neighboring vehicles 𝑖 and 𝑗 are experiments. equal when distance Δ𝑑𝑖𝑗 (𝑡) = ‖p𝑖(𝑡) − p𝑗(𝑡)‖ between them International Journal of Distributed Sensor Networks 5

6 6

5 5

4 4 R A 3 3 U U

2 2

1 1

0 0 0 50 100 150 200 250 300 0 50 100 150 200 250 300 ‖pi(t) − pj(t)‖ (m) ‖pi(t) − pj(t)‖ (m)

kA = 0.01 kA = 0.1 kR = 𝜉 × 0.01 kR = 𝜉 × 0.1 kA = 0.05 kA = 0.5 kR = 𝜉 × 0.05 kR = 𝜉 × 0.5

(a) 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) with different 𝑘𝐴 (b) 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)) with different 𝑘𝑅

Figure 3: The variation of the potential functions with different parameter settings.

stays at a certain desired value. Let this desired distance be 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)), we conduct the following numerical experi- Δ𝑑 ∈ ((𝑟 +𝑟), 𝑑 ) 𝑑 𝑟 desire 𝑖 𝑗 𝑖 . Note that the attractive and repulsive ment where the sensing range 𝑖 is fixed at 300 m and 𝑖 has effects are represented by the gradients of the potential the same value with 𝑟𝑗 for simplicity; that is, 𝑟𝑖 =𝑟𝑗 =5m. In 𝑈 (p (𝑡), p (𝑡)) 𝑈 (p (𝑡), p (𝑡)) Δ𝑑 functions 𝐴 𝑖 𝑗 and 𝑅 𝑖 𝑗 with respect to addition, the desired distance desire issettobe50m,andthe the relative distance between the vehicles 𝑖 and 𝑗,respec- parameter 𝑘𝐴 discretely varies from 0.01 to 0.5. According to 5 tively. Accordingly, 𝑘𝐴 and 𝑘𝑅 should be set to satisfy the (9),theratioof𝑘𝑅 and 𝑘𝐴 canbecalculatedas𝜉 = 1.482×10 . partial differential equation ‖𝜕𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡)‖ = Hence, in this experiment, we can set the other parameter 𝑘𝑅 5 ‖𝜕𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡)‖ under the condition of Δ𝑑𝑖𝑗 (𝑡) = as 𝑘𝑅 =𝜉×𝑘𝐴 = 1.482 × 10 𝑘𝐴. The relevant results are given Δ𝑑 Δ𝑑 (𝑡) = Δ𝑑 desire.Bysubstituting 𝑖𝑗 desire into (7) and (8) in Figure 3. andsolvingtheequation‖𝜕𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡)‖ = From Figure 3,itcanbefoundthatthepotentialfunctions ‖𝜕𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡)‖, we can get the relationship of the are both monotonously varying along with the value of magnitudes of 𝑘𝐴 and 𝑘𝑅 as follows: the distance ‖p𝑖(𝑡) − p𝑗(𝑡)‖ between vehicle 𝑖 and vehi- cle 𝑗. The definitions of the functions 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) and 𝑘𝑅 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)) guarantee that the attractive and repulsive 𝑘 𝐴 potential fields have the important properties, respectively: ‖p (𝑡)−p (𝑡)‖ 𝜋 the smaller the distance 𝑖 𝑗 is, the smaller the effect =( of the attractive potential field becomes, while the effect of the 4(𝑑𝑖 −(𝑟𝑖 +𝑟𝑗)) repulsive potential field is increasing along with decreasing the distance ‖p𝑖(𝑡) − p𝑗(𝑡)‖.AsshowninFigure 3,when Δ𝑑 −(𝑟 +𝑟) ‖p (𝑡) − p (𝑡)‖ (𝑟 +𝑟) −2 𝜋 desire 𝑖 𝑗 𝑖 𝑗 decreasingly approaches the value of 𝑖 𝑗 , ×(cos ( ( )))) 𝑈 (p (𝑡), p (𝑡)) 𝑈 (p (𝑡), p (𝑡)) 2 𝑑 −(𝑟 +𝑟) 𝐴 𝑖 𝑗 isreducedtozerowhile 𝑅 𝑖 𝑗 dra- 𝑖 𝑖 𝑗 matically increases. This indicates that when a vehicle tends −3 ×(2(Δ𝑑 −(𝑟 +𝑟)) to collide with another vehicle, the attractive potential effect desire 𝑖 𝑗 should be weakened and the repulsive effect strengthened

−2 −2 −1 atthesametime.Hence,thecomprehensiveeffectresulting ×[(Δ𝑑 −(𝑟 +𝑟)) −(𝑑 −(𝑟 +𝑟)) ]) . desire 𝑖 𝑗 𝑖 𝑖 𝑗 from both the attractive and repulsive potential fields will (9) force the vehicle to avoid the collisions. Additionally, from Figure 3, it can be found that the larger the parameters Based on (9), it can be seen that once the desired distance 𝑘𝑅 and 𝑘𝐴 are, the steeper the slopes of 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) Δ𝑑 𝑑 𝑟 𝑟 𝑈 (p (𝑡), p (𝑡)) desire among vehicles and the parameters 𝑖, 𝑖,and 𝑗 are and 𝑅 𝑖 𝑗 become. At this point, large parameter given, the settings on 𝑘𝐴 and 𝑘𝑅 are expected to satisfy the settings on 𝑘𝑅 and 𝑘𝐴 wouldmakethepotentialfieldsmore relationship 𝑘𝑅 =𝜉×𝑘𝐴 where 𝜉 issettobetheresultofthe sensitivetothetime-relatedchangeintheintervehicular right side of (9). In order to explore the impact of the param- distance. Hence, an appropriate value of 𝑘𝑅 and 𝑘𝐴 should eters 𝑟𝑖 and 𝑟𝑗 on the potential functions 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) and be chosen carefully. According to the results presented by 6 International Journal of Distributed Sensor Networks

𝑜 Figure 3,wefix𝑘𝐴 = 0.1 and 𝑘𝑅 =𝜉×𝑘𝐴 for our model in the and the bump function 𝜑𝑙(p𝑖(𝑡), p𝑘(𝑡)) is represented as other following experiments for the sake of controlling the 𝜑 (p (𝑡) , p𝑜 (𝑡)) sensitivity of the potential field functions 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) and 𝑙 𝑖 𝑘 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)). On the other side, some other environmental factors Δ𝑑 (𝑡) −(𝑟 +𝑟𝑜) { 1, 𝑖𝑘 𝑖 𝑘 ∈ [0, 𝑙] , influencing the movement of the connected vehicles should { when 𝑑 −(𝑟 +𝑟𝑜) { 𝑖 𝑖 𝑘 be taken into account as well such as the road obstacles and { 𝑜 { Δ𝑑 (𝑡)+(𝑙−1) (𝑟 +𝑟 )−𝑙×𝑑 theroadconstraints.Thatis,thevehiclesontheroadmight { 𝑘 (1+ (𝜋 ( 𝑖𝑘 𝑖 𝑘 𝑖 ))) , = 𝑜 cos (1−𝑙) (𝑑 −(𝑟 +𝑟𝑜)) face the obstacles like accidents, road maintenances, and { 𝑖 𝑖 𝑘 other emergencies. Besides, the vehicles are also constrained { 𝑜 { Δ𝑑𝑖𝑘 (𝑡) −(𝑟𝑖 +𝑟 ) by the road boundaries, which is different from the fish { 𝑘 ∈ (𝑙,] 1 , { when 𝑑 −(𝑟 +𝑟𝑜) school. In this work, the effects arising from road obstacles { 𝑖 𝑖 𝑘 0, and road boundaries are modeled as { otherwise, (13) Δ𝑑 (𝑡) = ‖p (𝑡) − p𝑜(𝑡)‖ 𝑘 𝑙 F(3) (𝑡) = ∑ F𝑜 (𝑡) + F𝐿 (𝑡) , where 𝑖𝑘 𝑖 𝑘 and 𝑜 and are positive real 𝑖 𝑖𝑘 𝑖 (10) (0, 1) ∀𝑘∈𝑀 coefficients whose values are limited within . Considering the constraints of road is essential for real- istic modeling of connected vehicles moving as a group; the 𝑜 road constraints force which is similar to the force of the where F𝑖𝑘(𝑡) is the repulsive forces of the obstacle 𝑘, 𝑘= 𝐿 obstacle is defined as 1,2,...,𝑀(𝑀 is the amount of the road obstacles) and F𝑖 (𝑡) 𝐿 𝐿 𝐿 𝐿 isthevirtualrepulsiveforcethatforcesavehicletobeaway F𝑖 (𝑡) =𝐹𝑖 𝜓𝑙 (p𝑖 (𝑡) , p𝑖 (𝑡)) n𝑖 (𝑡) , (14) from the boundary of the road and to stay within the road when the vehicle is too close to one boundary and would 𝐿 𝐿 where 𝐹𝑖 is the maximum magnitude of the force F𝑖 (𝑡) and driveofftheroad.Sincethedecreaseintherelativedistance 𝐿 𝜓𝑙(p𝑖(𝑡), p (𝑡)) is also designed as a bump function as follows: between a vehicle and an obstacle or between a vehicle and 𝑖 oneroadboundarywouldleadtotheincreaseintherepulsive 𝐿 𝜓𝑙 (p𝑖 (𝑡) , p (𝑡)) effect on the vehicle, the repulsive forces of road obstacles and 𝑖 road boundaries should be formulated as decreasing func- Δ𝑑𝐿 𝑡 −𝑟 { 𝑖 ( ) 𝑖 tions of such a relative distance. By referring to the bump {1, when ∈ [0, 𝑙] , { 𝑅−𝑟 function given in (6),weproposethepotentialfieldfunctions { 𝑖 { Δ𝑑𝐿 (𝑡) + (𝑙−1) 𝑟 −𝑙×𝑅 to model the repulsive effect arising from road obstacles and { 𝑖 𝑖 𝑘𝐿 (1 + cos (𝜋 ( ))) , road boundaries as follows. = (1−𝑙) (𝑅 − 𝑟 ) 𝑂 𝑂 𝑂 𝑇 { 𝑖 { 𝐿 Define the vector p𝑘 =[𝑥𝑘 (𝑡),𝑘 𝑦 (𝑡)] as the position of { Δ𝑑 (𝑡) −𝑟 { 𝑖 𝑖 ∈ 𝑙, 1 , a certain obstacle denoted by 𝑂𝑘.Theobstacleinthispaper { when ( ] 𝑜 { 𝑅−𝑟𝑖 is treated as a ball with the radius 𝑟𝑘. When the vehicle 𝑖 {0, otherwise, approaches to the obstacle 𝑂𝑘 in proximity and the distance 𝑂 (15) ‖p𝑖(𝑡) − p𝑘 ‖ becomes smaller than the sensing range 𝑑𝑖, the vehicle 𝑖 will detect it and prepare for avoiding it. Further- 𝐿 𝑜 where 𝑘𝐿 ∈ (0, 1) and p𝑖 (𝑡) represents the position of the more, F𝑖𝑘(𝑡) should be a monotonically decreasing function 𝑂 𝑖 vehicle 𝑖’s center projection point on the nearest road bound- of the distance between the obstacle 𝑘 and the vehicle in the 𝐿 𝐿 𝑖 ary line at the time instant 𝑡,andΔ𝑑𝑖 (𝑡) = ‖p𝑖(𝑡) − p𝑖 (𝑡)‖. sensing range, and the vehicle should keep a certain distance 𝐿 𝐿 from the obstacles so as to avoid the collision. Then the n𝑖 (𝑡) is the unit direction vector from p𝑖 (𝑡) to p𝑖(𝑡) that function of the repulsive force induced by a bump function is perpendicular to the road boundary line, which can be defined in [28] is designed as calculated as 𝐿 𝐿 p𝑖 (𝑡) − p𝑖 (𝑡) n (𝑡) = . (16) 𝑜 𝑜 𝑜 𝑖 Δ𝑑𝐿 (𝑡) F𝑖𝑘 (𝑡) =𝐹𝑖𝑘 ×𝜑𝑙 (p𝑖 (𝑡) , p𝑘 (𝑡)) n𝑖𝑘 (𝑡) , (11) 𝑖 The parameter 𝑅 is the maximum range of the virtual road 𝑜 constraint force acting on a vehicle. From the equation above, where 𝐹𝑖𝑘 is the maximum magnitude of the obstacle repul- 𝑜 itcanbeseenthatwhentherelativedistancebetweenthe sive force F𝑖𝑘(𝑡),whichisascalar,andn𝑖𝑘(𝑡) is a unit vector 𝐿 vehicle 𝑖 and its nearest road boundary (i.e., Δ𝑑𝑖 (𝑡))islarger used to indicate the repulsive acting direction at the time 𝑅 𝑡 than , this virtual road constraint force is set to 0; otherwise, instant : the closer to the road boundary the vehicle is, the larger this repulsive force becomes. 𝑜 𝑜 In addition, in order to make the repulsive forces F𝑖𝑘(𝑡) (p𝑖 (𝑡) − p𝑘 (𝑡)) 𝐿 n (𝑡) = 󵄩 󵄩 and F (𝑡), respectively, induced by the obstacles and the road 𝑖𝑘 󵄩p (𝑡) − p𝑜 (𝑡)󵄩 (12) 𝑖 󵄩 𝑖 𝑘 󵄩 constraints dynamically coordinated with the attractive force International Journal of Distributed Sensor Networks 7

𝑜 arising from the desired velocity v𝑖 (𝑡),wecombinethem Proof. We can lump all the forces of every vehicle as follows: (1) with F (𝑡) defined in (3) andthendefinedthemaximum 𝑖 ∑ 𝑚 v̇ (𝑡) = ∑ (F(1) (𝑡) + F(2) (𝑡) + F(3) (𝑡)). magnitudes of these two repulsive forces as follows: 𝑖 𝑖 𝑖 𝑖 𝑖 (18) 󵄨 󵄨 ∀𝑖∈𝑉 ∀𝑖∈𝑉 𝐹𝑜 (𝑡) =𝛾 × 󵄨F(1) (𝑡) ⋅ n (𝑡)󵄨 𝑖𝑘 𝑖𝑘 󵄨 𝑖 𝑖𝑘 󵄨 Since the condition is given that 𝑑𝑖 =𝑑𝑗 for ∀𝑖 =𝑗∈𝑉̸ and 𝑚𝑖 󵄨 𝑜 󵄨 F𝐴(𝑡) F𝑅(𝑡) =𝛾𝑖𝑘 󵄨(v𝑖 (𝑡) − v𝑖 (𝑡))⋅n𝑖𝑘 (𝑡)󵄨 , these forces 𝑖𝑗 and 𝑖𝑗 are bidirectional for all vehicles 𝜏𝑖 𝐴 𝐴 𝑅 𝑅 𝑖∈𝑉,wehaveF𝑖𝑗 (𝑡) = −F𝑗𝑖(𝑡) and F𝑖𝑗 (𝑡) = −F𝑗𝑖(𝑡) according 󵄨 󵄨 (17) 𝐹𝐿 (𝑡) =𝛽 × 󵄨F(1) (𝑡) ⋅ n𝐿 (𝑡)󵄨 to (5).Atthispoint,wefurtherhave 𝑖 𝑖 󵄨 𝑖 𝑖 󵄨 𝑚 󵄨 󵄨 =𝛽 𝑖 󵄨(v𝑜 (𝑡) − v (𝑡))⋅n𝐿 (𝑡)󵄨 , (2) 𝐴 𝑅 𝑖 󵄨 𝑖 𝑖 𝑖 󵄨 ∑ F (𝑡) = ∑ ( ∑ (F (𝑡) + F (𝑡))) 𝜏𝑖 𝑖 𝑖𝑗 𝑖𝑗 ∀𝑖∈𝑉 ∀𝑖∈𝑉 ∀𝑗∈𝑁𝑖(𝑡) where |∗|istheabsolutevaluesignand𝛾𝑖𝑘 and 𝛽𝑖 are positive 𝐴 𝑅 𝐴 𝑅 sensitivity coefficients within (0, 1] which are used to scale = ∑ (F𝑖𝑗 (𝑡) + F𝑖𝑗 (𝑡) + F𝑗𝑖 (𝑡) + F𝑗𝑖 (𝑡))=0. 𝑜 𝐿 ∀𝑖=𝑗∈𝑉̸ and coordinate the magnitudes of 𝐹𝑖𝑘(𝑡) and 𝐹𝑖 (𝑡). ∀(𝑖,𝑗)∈𝐸(𝑡) 2.2. Stability Analysis of Connected Vehicles. Since connected (19) vehicles are equipped with wireless communications, one is Therefore, equation (1) can be rearranged as ∑∀𝑖∈𝑉 𝑚𝑖v̇𝑖(𝑡) = able to interact with the others in its sensing range. Thus, ∑ (F(1)(𝑡) + F(3)(𝑡)) these mobile terminals constitute a local vehicular network. ∀𝑖∈𝑉 𝑖 𝑖 . Now, recalling that the bump func- 𝜑 (p (𝑡), p𝑜(𝑡)) 𝜑 (p (𝑡), p𝐿(𝑡)) The communication topology of these connected vehicles tions 𝑙 𝑖 𝑘 and 𝑙 𝑖 𝑖 are limited within [0, 1] at any time instant 𝑡 can be presented by a bidirectional , we can get the inequality as follows: graph, which can also be called as communication graph. 󵄩 󵄩 󵄩F(3) (𝑡)󵄩 Let 𝐺(𝑡) = (𝑉,𝐸(𝑡)) denote this communication graph, and 󵄩 𝑖 󵄩 𝑉={𝑖|∀𝑖∈N} . As aforementioned in Section 2.1,we 󵄩 󵄩 assume that the sensing range of all the vehicles is identical; = 󵄩( ∑ 𝐹𝑜 (𝑡) ×𝜑 (p (𝑡) , p𝑜 (𝑡)) n (𝑡)) 𝑑 =𝑑(∀𝑖∈𝑉) 󵄩 𝑖𝑘 𝑙 𝑖 𝑘 𝑖𝑘 that is, 𝑖 . Subsequently, an edge in this 󵄩 ∀𝑘∈𝑀 communication graph 𝐺(𝑡) is used to indicate a bidirectional 󵄩 wireless communication interaction between a vehicle and 󵄩 +𝐹𝐿 (𝑡) 𝜓 (p (𝑡) , p𝐿 (𝑡)) n𝐿 (𝑡)󵄩 one member in this vehicle’s neighbor. That is, the set of those 𝑖 𝑙 𝑖 𝑘 𝑖 󵄩 󵄩 edges in 𝐺(𝑡) can be defined as 𝐸(𝑡) = {(𝑖, 𝑗)|‖p𝑖(𝑡)−p𝑗(𝑡)‖ < 𝑑} 𝐸(𝑡)∈ 𝑉×𝑉 󵄩 󵄩 and . For simplicity, we also denote the 󵄩 󵄩 𝑖 𝑖 ≤ 󵄩( ∑ 𝐹𝑜 (𝑡) ×𝜑 (p (𝑡) , p𝑜 (𝑡)) n (𝑡))󵄩 neighboring nodes of any node (i.e., the vehicle )inthe 󵄩 𝑖𝑘 𝑙 𝑖 𝑘 𝑖𝑘 󵄩 given communication graph 𝐺(𝑡) at any time instant 𝑡 as a set 󵄩 ∀𝑘∈𝑀 󵄩 𝑁𝑖(𝑡) = {𝑗 | (𝑖, 𝑗) ∈ .𝐸(𝑡), 𝑗∈𝑉} From the notation of 𝐸(𝑡), 󵄩 󵄩 + 󵄩𝐹𝐿 (𝑡) 𝜓 (p (𝑡) , p𝐿 (𝑡)) n𝐿 (𝑡)󵄩 it is obviously seen that the topology of this communication 󵄩 𝑖 𝑙 𝑖 𝑘 𝑖 󵄩 graph is varying over time due to the possibility of a vehicle (20) ≤ ∑ 𝐹𝑜 (𝑡) +𝐹𝐿 (𝑡) entering into or out of the communication range of a host 𝑖𝑘 𝑖 vehicle. Attempting to analyze the overall mobility of a given ∀𝑘∈𝑀 𝑚 󵄨 󵄨 vehicle group moving in the same road, we assume that the = ∑ 𝛾 𝑖 󵄨(v𝑜 (𝑡) − v (𝑡))⋅n (𝑡)󵄨 initial velocity of all those vehicles is the same and their 𝑖𝑘 𝜏 󵄨 𝑖 𝑖 𝑖𝑘 󵄨 ∀𝑘∈𝑀 𝑖 desired velocities at any time instant 𝑡 are also identical; that v (0) = v v𝑜(𝑡) = v𝑜(𝑡) 𝑖∈𝑉 𝑚 󵄨 󵄨 is, 𝑖 and 𝑖 for all vehicles . +𝛽 𝑖 󵄨(v𝑜 (𝑡) − v (𝑡))⋅n𝐿 (𝑡)󵄨 𝑖 󵄨 𝑖 𝑖 𝑖 󵄨 It should be noted that this assumption is reasonable since 𝜏𝑖 vehicles would move with a constant velocity in the same 𝑚 󵄩 󵄩 𝑚 󵄩 󵄩 direction when they are in an equilibrium traffic flow of the ≤ ∑ 𝛾 𝑖 󵄩v𝑜 (𝑡) − v (𝑡)󵄩 +𝛽 𝑖 󵄩v𝑜 (𝑡) − v (𝑡)󵄩 𝑖𝑘 𝜏 󵄩 𝑖 𝑖 󵄩 𝑖 𝜏 󵄩 𝑖 𝑖 󵄩 same road and encounter no emergencies or disturbances. ∀𝑘∈𝑀 𝑖 𝑖 Also, we assume that the sensing ranges of all the vehicles are 𝑑 =𝑑 ∀𝑖 =𝑗∈𝑉̸ 𝑚𝑖 󵄩 𝑜 󵄩 󵄩 (1) 󵄩 equal; that is, 𝑖 𝑗 for .Weintroduce =( ∑ 𝛾 +𝛽) 󵄩v (𝑡) − v (𝑡)󵄩 ≤ 󵄩F (𝑡)󵄩 . 𝑖𝑘 𝑖 𝜏 󵄩 𝑖 𝑖 󵄩 󵄩 𝑖 󵄩 the concept of the “group centroid,” which is represented as ∀𝑘∈𝑀 𝑖 𝑁 p𝑐(𝑡) = (1/𝑁) ×∑𝑖=1 p𝑖(𝑡). Now, we state the analysis results Hence, the magnitude of the attractive force induced by the of our proposed mobility model. 𝑜 desired velocity v𝑖 (𝑡) is larger than that of the force induced Corollary 1. Consider that connected vehicles with wireless by the obstacle and the road boundary. This implies that the communications evolve under the mobility model defined by mobility of the overall vehicle group is mainly dominated by 𝑜 (1),andgiventhat∑∀𝑘∈𝑀 𝛾𝑖𝑘 +𝛽𝑖 ≤1, v𝑖(0) = v, and v𝑖 (𝑡) = the potential field that can force vehicles to keep moving with 𝑜 v (𝑡) for all vehicles 𝑖∈𝑉, the overall group can asymptotically or asymptotically converge to the desired velocity even after 𝑜 converge to the desired velocity v (𝑡) which is defined in (2). being disturbed by the repulsive potentials resulting from 8 International Journal of Distributed Sensor Networks obstacles and road constraints. At this point, we prove 𝜕𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡)) 𝜕𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡)) =0+ ∑ = ∑ . Corollary 1. 𝜕p𝑖 (𝑡) 𝜕p𝑖 (𝑡) ∀𝑗∈𝑁𝑖(𝑡) ∀(𝑖,𝑗)∈𝐸(𝑡) Now,wefirstlyprovidesomepropertiesofthepotential (23) functions 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)) and 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)) related to the (2) interactive force F𝑖 (𝑡) as follows. For simplicity, we This finishes the proof of property (iii). equivalently denote 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) =𝐴 𝑈 (p𝑖(𝑡), p𝑗(𝑡)) and 𝑈𝑅(Δ𝑑𝑖𝑗 (𝑡)) =𝑅 𝑈 (p𝑖(𝑡), p𝑗(𝑡)),whereΔ𝑑𝑖𝑗 (𝑡) = ‖p𝑖(𝑡)−p𝑗(𝑡)‖. Similarly, we present Corollary 3 for the potential func- 𝑈 (Δ𝑑 (𝑡)) The following can be mathematically proven. tion 𝑅 𝑖𝑗 . Its proof can also be finished in the similar way of proving Corollary 2, so it is not needed to repeat them Corollary 2. 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) satisfies the following properties: (i) here in consideration of space. it is continuously differentiable for Δ𝑑𝑖𝑗 (𝑡) ∈ [(𝑟𝑖 +𝑟𝑗), 𝑑𝑖) Corollary 3. 𝑈 (Δ𝑑 (𝑡)) and is a monotonously increasing function of Δ𝑑𝑖𝑗 (𝑡) within 𝑅 𝑖𝑗 is (i) continuously differentiable Δ𝑑 (𝑡) ∈ ((𝑟 +𝑟), 𝑑 ] [(𝑟𝑖 +𝑟𝑗), 𝑑𝑖) that makes 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) → 0 with Δ𝑑𝑖𝑗 (𝑡) → for 𝑖𝑗 𝑖 𝑗 𝑖 while it is a monotonously ((𝑟 +𝑟), 𝑑 ] (𝑟𝑖 +𝑟𝑗) and 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) → ∞ with Δ𝑑𝑖𝑗 (𝑡)→𝑑𝑖; decreasing function defined on 𝑖 𝑗 𝑖 that satisfies 𝐴 𝐴 𝐴 𝑈𝑅(Δ𝑑𝑖𝑗 (𝑡)) → ∞ with Δ𝑑𝑖𝑗 (𝑡) → 𝑖(𝑟 +𝑟𝑗) and (ii) 𝑢𝑖𝑗 =𝑢𝑗𝑖 when denoting 𝑢𝑖𝑗 =𝜕𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡) 𝑈𝑅(Δ𝑑𝑖𝑗 (𝑡)) → 0 with Δ𝑑𝑖𝑗 (𝑡) →𝑖 𝑑 ; (ii) the partial derivative ∀(𝑖, 𝑗) ∈ 𝐸(𝑡) ∑ (𝜕𝑈 (Δ𝑑 (𝑡))/𝜕p (𝑡)) = for ;and(iii) ∀(𝑖,𝑗)∈𝐸(𝑡) 𝐴 𝑖𝑗 𝑖 𝑢𝑅 =𝜕𝑈(Δ𝑑 (𝑡))/𝜕Δ𝑑 (𝑡) 𝑢𝑅 <0 ∑ (𝜕𝑈 (Δ𝑑 (𝑡))/𝜕p (𝑡)) 𝑖𝑗 𝑅 𝑖𝑗 𝑖𝑗 ( 𝑖𝑗 )alsosatisfiesthesym- ∀𝑖=𝑗∈𝑉̸ 𝐴 𝑖𝑗 𝑖 . 𝑅 𝑅 metry 𝑢𝑖𝑗 =𝑢𝑗𝑖 for ∀(𝑖, 𝑗) ∈ 𝐸(𝑡);and(iii) ∑∀(𝑖,𝑗)∈𝐸(𝑡)(𝜕𝑈𝑅(Δ𝑑𝑖𝑗 Proof. It is easily obtained that the partial derivative of (𝑡))/𝜕p𝑖(𝑡)) =∀𝑖 ∑ =𝑗∈𝑉̸ (𝜕𝑈𝑅(Δ𝑑𝑖𝑗 (𝑡))/𝜕p𝑖(𝑡)). 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) with respect to Δ𝑑𝑖𝑗 (𝑡) is expressed as Inaddition,itissignificanttoanalyzetheintragroup mobility besides the basic characteristic of the overall group. 𝜕𝑈 (Δ𝑑 (𝑡)) 𝐴 𝐴 𝑖𝑗 𝜋 From model (1), it can be noted that the connected vehi- 𝑢𝑖𝑗 = = cle group model can be decomposed into two terms: the 𝜕Δ𝑑 (𝑡) 4(𝑑 −(𝑟 +𝑟)) 𝑖𝑗 𝑖 𝑖 𝑗 attractive/repulsive forces induced by the external potentials (1) (3) (2) −2 (21) including F (𝑡) and F (𝑡), and the interactive force F (𝑡) 𝜋(Δ𝑑 (𝑡) −(𝑟 +𝑟)) 𝑖 𝑖 𝑖 ×𝑘 ( ( 𝑖𝑗 𝑖 𝑗 )) >0 that exists among vehicles. According to the principle of inertial 𝐴 cos p (𝑡) 2(𝑑𝑖 −(𝑟𝑖 +𝑟𝑗)) frame of reference, when the group centroid 𝑐 is set as an original point of the inertial frame of reference, each vehicle’s Δ𝑑𝑖𝑗 (𝑡) ∈ [(𝑟𝑖 +𝑟𝑗), 𝑑𝑖) 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) motion relative to this reference frame is mainly dependent on for .Atthispoint, is a (2) monotonously increasing function that is defined on [(𝑟𝑖 + the interactive force F𝑖 (𝑡) induced by the attractive/repulsive 𝑟𝑗), 𝑑𝑖). Consequently, we further get potentials between vehicles instead of the external force poten- (1) (3) tials F𝑖 (𝑡) and F𝑖 (𝑡).Thus,inordertoanalyzetheintragroup lim 𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡))=𝑈𝐴 ((𝑟𝑖 +𝑟𝑗)) = 0, mobility, we turn to focus on the influence of the interactive Δ𝑑 (𝑡) → (𝑟 +𝑟 ) (2) 𝑖𝑗 𝑖 𝑗 force F (𝑡) between vehicles. Then, the derivative of a vehicle’s (22) 𝑖 𝑈 (Δ𝑑 (𝑡))=𝑈 (𝑑 )=∞ velocity relative to the reference frame (the relative velocity is lim 𝐴 𝑖𝑗 𝐴 𝑖 v𝑐(𝑡) 𝑡 Δ𝑑𝑖𝑗 (𝑡) →𝑑𝑖 denoted by 𝑖 )withrespecttothetimeinstant can be expressed as 𝐴 and 𝑢𝑖𝑗 >0for Δ𝑑𝑖𝑗 (𝑡) ∈ ((𝑟𝑖 +𝑟𝑗), 𝑑𝑖).Thus,property(i)is 𝑚 v̇𝑐 (𝑡) = F(2) (𝑡) . proven. Moreover, recall that we have assumed 𝑑𝑖 =𝑑𝑗 for 𝑖 𝑖 𝑖 (24) ∀𝑖 =𝑗∈𝑉̸ . This means that the sensing ability (sensing p𝑐(𝑡) 𝑖 range) of every vehicle is identical. Hence, according to Also, let 𝑖 be the relative position of the vehicle in the Δ𝑑𝑖𝑗 (𝑡) = 𝑗𝑖Δ𝑑 (𝑡),itcanbeseenthat𝜕𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡))/𝜕Δ𝑑𝑖𝑗 (𝑡) = reference frame. The vehicle dynamic system in the reference 𝐴 𝐴 frameisthenformulatedasfollows: 𝜕𝑈𝐴(Δ𝑑𝑗𝑖(𝑡))/𝜕Δ𝑑𝑗𝑖(𝑡);thatis,𝑢𝑖𝑗 =𝑢𝑗𝑖. Thus, property (ii) 𝑐 𝑐 is proven. Noting the definition of 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) and the ṗ𝑖 (𝑡) = v𝑖 (𝑡) , communication graph 𝐺(𝑡),whenonevehicle𝑗 is not in the 𝑁 (𝑡) 𝑖 1 neighbor 𝑖 of another vehicle ,therelativedistance v̇𝑐 (𝑡) = F(2) (𝑡) Δ𝑑 (𝑡) 𝑑 𝑖 𝑖 between them 𝑖𝑗 is larger than the sensing range 𝑖. 𝑚𝑖 Then, the potential 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) is set to 0 accordingly, as well 𝜕𝑈 (Δ𝑑 (𝑡))/𝜕Δ𝑑 (𝑡) = 0 (25) as 𝐴 𝑖𝑗 𝑖𝑗 .So,wehave =− ∑ {∇𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡))+∇𝑈𝑅 (Δ𝑑𝑖𝑗 (𝑡))} ∀𝑖=𝑗∈𝑉̸ 𝜕𝑈 (Δ𝑑 (𝑡)) ∑ 𝐴 𝑖𝑗 (𝜌 +𝜇) − ∑ 𝑖 𝑖 𝜑 𝑡 v𝑐 𝑡 . ∀𝑖=𝑗∈𝑉̸ 𝜕p𝑖 (𝑡) 𝑖𝑗 ( ) 𝑖 ( ) ∀𝑖=𝑗∈𝑉̸ 𝑚𝑖

𝜕𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡)) 𝜕𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡)) = ∑ + ∑ Based on the vehicle dynamic system model above, one form 𝜕p𝑖 (𝑡) 𝜕p𝑖 (𝑡) 𝐿(𝑡) ∀𝑗∈𝑉\𝑁𝑖(𝑡) ∀𝑗∈𝑁𝑖(𝑡) of the Lyapunov function for the whole group can be International Journal of Distributed Sensor Networks 9 designed by combining the potential field energy and the Theorem 4. Consider that connected vehicles with wireless kinematic energy as communications evolve under mobility model (1),andgiven 𝑜 𝑜 that ∑∀𝑘∈𝑀 𝛾𝑖𝑘 +𝛽𝑖 ≤1, v𝑖(0) = v and v𝑖 (𝑡) = v (𝑡) for all 𝐿 (𝑡) =𝑈(𝑡) +𝑉(𝑡) , (26) vehicles 𝑖∈𝑉.IfΔ𝑑𝑖𝑗 (0) > (𝑟𝑖 +𝑟𝑗) for ∀𝑖 =𝑗∈𝑉̸ ,those vehicles move as an overall group that tends to keep avoiding where the potential field term is 𝑈(𝑡) =∑∀𝑖∈𝑉 ∑∀(𝑖,𝑗)∈𝐸(𝑡) intrasystem collision. (𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡))+𝑈𝑅(Δ𝑑𝑖𝑗 (𝑡))) and the kinematic energy is 𝑉(𝑡) = 𝑐 2 Proof. According to Corollary 1, those vehicles tend to keep (1/2) ∑ ‖v (𝑡)‖ .Thus,bydifferentiating𝐿(𝑡) with respect 𝑜 ∀𝑖∈𝑉 𝑖 thesamedesiredvelocityv (𝑡).Furthermore,sincewehave tothetimevariable𝑡,onefurthergets 𝐿(𝑡)̇ ≤0 for 𝑡≥0, 𝐿(𝑡) ≤ 𝐿(0) <∞. If there were at least 𝑖 𝑗 𝐿̇ (𝑡) two vehicles and extending to collide with each other, that is, Δ𝑑𝑖𝑗 (𝑡) → 𝑖(𝑟 +𝑟𝑗), 𝐿(𝑡) = (𝑈(𝑡) + 𝑉(𝑡)) →∞ due to 𝑇 𝑈(𝑡) →∞ = ∑ ∑ (∇𝑈 (Δ𝑑 (𝑡))+∇𝑈 (Δ𝑑 (𝑡))) under the consideration of the property (i) in 𝐴 𝑖𝑗 𝑅 𝑖𝑗 Corollary 3. Hence, the contradiction occurs. At this point, ∀𝑖∈𝑉 ∀(𝑖,𝑗)∈𝐸(𝑡) any two vehicles 𝑖 and 𝑗 in the group do not extend to collide

𝑐 𝑐 𝑇 𝑐 with each other. That is, this theorem is proven. ⋅ ṗ𝑖 (𝑡) + ∑ (v𝑖 (𝑡)) ⋅ v̇𝑖 (𝑡) ∀𝑖∈𝑉 Theorem 5. Consider that connected vehicles with wireless communications evolve under mobility model (1),giventhat 𝑇 𝑐 𝑜 𝑜 = ∑ ∑ (∇𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡))+∇𝑈𝑅 (Δ𝑑𝑖𝑗 (𝑡))) ⋅ v𝑖 (𝑡) ∑∀𝑘∈𝑀 𝛾𝑖𝑘 +𝛽𝑖 ≤1, v𝑖(0) = v and v𝑖 (𝑡) = v (𝑡) for all vehicles ∀𝑖∈𝑉 ∀(𝑖,𝑗)∈𝐸(𝑡) 𝑖∈𝑉. Those vehicles that initially belong to the neighboring member of one certain vehicle 𝑖, that is, those ones (𝑖, 𝑗) ∈ 𝐸(0) { (∀𝑖 ∈ 𝑉), tend to keep connecting to this vehicle 𝑖 when all + ∑ (v𝑐 𝑡 )𝑇 { 𝑖 ( ) vehicles move as an overall group. ∀𝑖∈𝑉 { Proof. Similar to the proof of Theorem 4,since𝐿(𝑡)̇ ≤0 for 𝑡≥0𝐿(𝑡) ≤ 𝐿(0) <∞ ⋅(− ∑ {∇𝑈 (Δ𝑑 (𝑡))+∇𝑈 (Δ𝑑 (𝑡))} , . Recall property (i) in Corollary 2. 𝐴 𝑖𝑗 𝑅 𝑖𝑗 When any one neighboring member 𝑗 of a vehicle 𝑖 tends to ∀𝑖=𝑗∈𝑉̸ move out of the sensing range, that is, Δ𝑑𝑖𝑗 (𝑡) →𝑖 𝑑 ((𝑖, 𝑗) ∈ 𝐸(0)), 𝑈𝐴(Δ𝑑𝑖𝑗 (𝑡)) → ∞ so that 𝑈(𝑡)→∞.Hence,𝐿(𝑡) = (𝜌 +𝜇) } − ∑ 𝑖 𝑖 𝜑 (𝑡) v𝑐 (𝑡)) . (𝑈(𝑡) + 𝑉(𝑡)) →∞ when at least one pair (𝑖, 𝑗) is satisfying 𝑖𝑗 𝑖 } ̇ ∀𝑖=𝑗∈𝑉̸ 𝑚𝑖 Δ𝑑𝑖𝑗 (𝑡) →𝑖 𝑑 . This is contradictory to the fact that 𝐿(𝑡) ≤0 } 𝑡≥0 (27) for .Inthisway,weproveTheorem 5.

According to Corollaries 2 and 3,itshouldbenotedthat 3. Simulations 𝑇 ∑ (∇𝑈 (Δ𝑑 (𝑡))) ⋅ v𝑐 (𝑡) 𝐴 𝑖𝑗 𝑖 In this section, simulations achieved by MATLAB are pro- ∀(𝑖,𝑗)∈𝐸(𝑡) vided to verify the model proposed in previous section. The 𝑐 𝑇 analysis of the results is also given in this section in order − ∑ [(v𝑖 (𝑡)) ⋅∇𝑈𝐴 (Δ𝑑𝑖𝑗 (𝑡))] = 0, ∀𝑖=𝑗∈𝑉̸ to characterize the benefit of wireless communication among (28) vehicles for safety and efficiency of traffic. We set up a traffic 𝑇 ∑ (∇𝑈 (Δ𝑑 (𝑡))) ⋅ v𝑐 (𝑡) scene where an accident situation on the unidirectional road 𝑅 𝑖𝑗 𝑖 as the obstacle has to be avoided. Then we get the diagram ∀(𝑖,𝑗)∈𝐸(𝑡) of the trajectories of the connected vehicles to demonstrate 𝑐 𝑇 that the model can achieve the obstacle avoidance effectively. − ∑ [(v𝑖 (𝑡)) ⋅∇𝑈𝑅 (Δ𝑑𝑖𝑗 (𝑡))] = 0. ∀𝑖=𝑗∈𝑉̸ In addition, we also have the comparative numerical experi- ment of vehicles with wireless communications and without 𝐿(𝑡)̇ =− ∑ ∑ ((𝜌 +𝜇)/𝑚 )𝜑 (𝑡) wireless communications while travelling which characterize Therefore, ∀𝑖∈𝑉 ∀𝑖=𝑗∈𝑉̸ 𝑖 𝑖 𝑖 𝑖𝑗 the impacts of the communications in the connected vehicles. 𝑐 𝑇 𝑐 𝑐 𝑇 𝑐 (v𝑖 (𝑡)) ⋅ v𝑖 (𝑡).Since(v𝑖 (𝑡)) ⋅ v𝑖 (𝑡) ≥ 0 and ((𝜌𝑖 +𝜇𝑖)/ The simulation scene is assumed on a section of a uni- ̇ 𝑚𝑖)𝜑𝑖𝑗 (𝑡) ≥,wehave 0 𝐿(𝑡),whichmeansthatthose ≤0 directional road. The unidirectional road we concentrate on vehicles in the reference frame can asymptotically converge to is 2000 meters long and 50 meters wide. We suppose that an a stable state. In the actual reference frame, this fact suggests accident occurs on the road where the location of the center that those vehicles having knowledge of some other vehicles’ of it is marked as 𝑂1. The obstacle is a circle region with the stateintheirlocalneighbortendtomoveasanoverallgroup. center set to be 1000 meters away from the beginning bound- 𝑂 Now,basedonthis,wedeclarethefollowingresulttoillustrate ary of the simulation range and with radius of 𝑟𝑖 =5meters the potential of collision avoidance among vehicles equipped which needed to be detoured. Namely, a collision will occur with wireless communications. when the vehicle enters the circle area. 10 International Journal of Distributed Sensor Networks

50 50

45 45

40 40

35 35

30 30

25 25

20 20

15 15

10 10

5 5

0 0 980 990 1000 1010 1020 980 990 1000 1010 1020 (a) Average velocity V =10m/s (b) Average velocity V =15m/s

50

45

40

35

30

25

20

15

10

5

0 980 990 1000 1010 1020 (c) Average velocity V =20m/s

Figure 4: The travelling trajectory of vehicles.

The number and the velocity of vehicles are produced 3.1. Obstacle Avoidance Trajectory. Figure 4 shows the vari- randomly at the start of simulations. During the simulations, ous travelling trajectories of each vehicle when the vehicle thoseconnectedvehiclesarecontrolledbyourproposed group comes across the obstacle in different average veloc- model to move as a cooperative group, whose direction is ities. In these simulations, the average velocities are set to consistent. In all simulations, we fix the time interval for 10 m/s, 15 m/s, and 20 m/s separately in order to explore the updating the kinematic information of each vehicle at 0.1 s. performances of avoiding obstacles in different velocities. Besides, the physical parameters of the vehicle are given as Whatismore,thetotalnumberofvehiclesisthesame 𝑊 𝑟𝑖 =5m, 𝑑𝑖 = 300 m, 𝑚𝑖 = 2000 kg, and 𝑟𝑖 =7m. More- in these three simulations set as 𝑛=20.Theaxesin over, other parameters required in the simulations are set as Figures 4(a), 4(b),and4(c) are the referenced coordinates Δ𝑑 =50 𝜏 = 0.05 𝜌 = 0.1 𝜇 = 0.1 𝑘 = 0.5 desire m, 𝑖 s, 𝑖 , 𝑖 , V , used to measure the real-time position of vehicles moving 𝑘𝐴 = 0.1, 𝑘𝑅 = 1.482 × 105𝑘𝐴, 𝑘𝑂 = 0.5, 𝑙 = 0.3, 𝑘𝐿 = 0.5, ontheroad,whoseunitismeter.FromFigure 4,itcanbe 𝑅=3m, 𝛾𝑖𝑘 = 0.8 (𝑘=1,and∀𝑖 ∈ 𝑉), and 𝛽𝑖 = 0.6. observed that when encountering the obstacle, the vehicles International Journal of Distributed Sensor Networks 11 change into two subgroups like the behaviors of fish school In a real life traffic situation, the vehicle velocity will when the established information is locally broadcasted in significantlyaffectthemobilityoftheoverallvehiclegroup. the whole group. Subsequently, they are unified into a group In addition, it is necessary to evaluate the traffic efficiency again as before after successfully avoiding this obstacle. In of connected vehicles flocking as a group under different addition, comparing the travelling trajectory in different vehicle numbers (indicating the traffic density). Therefore, in average velocities, the conclusion can be drawn that the lower this paper, the impacts of the wireless communications of the average velocity of vehicles is, the easier the vehicles connected vehicles by varying vehicle velocity and vehicle unified together. Although various velocities have different number are studied. travelling trajectory, all the vehicles have been successfully Toanalyzetheimpactsonroadsafetylevel,firstly,wevary reachedandthevehicleshavestayedtogetherasagroupand the initial vehicle velocity from 10 m/s to 30 m/s and fix the avoided collisions or obstacles. This result indicates that the totalnumberofvehiclesat𝑁=30. At each vehicle velocity model of connected vehicles based on the behaviors of fish point, simulation has been performed 30 times repeatedly, school is effective in describing the cooperative behaviors in and the metrics 𝑃𝑜 and 𝑃V arethenaveraged.Additionally, avoiding obstacles. the standard deviations of these evaluation metrics are also calculated at each velocity. The relevant results are shown in Figure 5. As can be seen from these results, the danger 3.2.ImpactsofWirelessCommunications. In order to explore severity indicated by 𝑃𝑜, 𝑃V increases with increasing vehicle the influences of wireless communications on the overall velocity. Because the higher the velocity a vehicle moves mobility of connected vehicles, we also conduct other com- with on the road, the more the time this vehicle needs to parative numerical experiments. In the simulations, when any decelerate to a certain lower velocity and the larger the vehicle 𝑖 is considered to be equipped with wireless commu- possibility of the obstacle or other vehicles entering into nications, its sensing range is set to 𝑑𝑖 = 300 m; otherwise, the predefined local warning scope of vehicle 𝑖;thedanger the sensing range of a driver is limited to 𝑑𝑖 = 100 m severity on the road indicated by 𝑃𝑜 and 𝑃V is higher with if the relevant vehicle 𝑖 is not equipped with wireless com- higher vehicular mobility. Nevertheless, assisted with wireless munications and its driving decision is made dependent on communications, connected vehicles are able to make a deci- visual perception. Thus, those experiment results shown in sion on braking in advance and larger distance is reserved for the following figures marked byEquipped “ ” are related to changing their motion trajectory. Therefore, the metrics 𝑃𝑜 the specific case where every vehicle is considered to be able and 𝑃V obtained in the case marked by “Equipped” are lower to communicate with its neighbors via wireless communica- on the overall level than those in the “Unequipped”case.In tions, while the results marked by “Unequipped”areobtained Figure 5(b) especially, 𝑃V in the “Equipped” case is reduced by in the other case where all of the vehicles can only interact 57.89% on average compared with that in the “Unequipped” with others in the aforementioned shorter sensing range. For case when the vehicle velocity is larger than 10 m/s. Hence, comparison, the following performance metrics are defined. this suggests that vehicles can benefit from wireless com- (i) Probability of a Vehicle Moving into the Local Warning munications in terms of extending the perception range and enhancing traffic safety level. Scope of Obstacle 𝑃𝑜. Recalling that we assume there is an obstacle with the radius of 5 montheroad,itshouldbenoted Next, we turn to focus on the effects of different vehicle that even though a vehicle can successfully avoid colliding numbers of the group on the safety level. For comparison, with the obstacle, its situation may be dangerous when it is the following experiment is processed by varying the vehicle too close to this obstacle. Thus, the probability of an obstacle number from 10 to 70 and fixing the initial vehicle velocity entering into the predefined local warning scope of the at 20 m/s. Also, the simulations have been performed with 𝑖 30 replications per vehicle number and, subsequently, the vehicle canbeusedtoquantifythedangerseverityeven 𝑃 𝑃 when there are not any obstacle collisions occurring. results of 𝑜 and V obtained at each vehicle number are averaged. The error bars in Figure 6 also indicate the standard 𝑃 𝑃 (ii) Probability of a Vehicle Moving into the Local Warning deviations of 𝑜 and V. Some similar conclusions can be Scope of Other Vehicles 𝑃V. Similarly, the local warning scope drawn from Figure 6. The safety level on the road can be of a vehicle is defined as the local range with a radius of 7m more enhanced by wireless communications. When the that covers this vehicle. With this metric, we can also quantify vehicle number increases on the road, the traffic density is the danger severity of vehicles equipped with or without increased. Consequently, the distance between vehicles on wireless communications as moving even when no vehicle average decreases; this would lead to a lower safety level. 𝑃 collisions occur among them. However, the averaged value of 𝑜 corresponding to different Subsequently, let Event(𝑘) represent the total number of vehicle numbers in the “Equipped” case is about 11.5% lower the events occurring at the 𝑘th simulation epoch in which the than that obtained in the “Unequipped”case,whiletheoverall 𝑃 obstacle or other vehicles enter into the local warning scope averaged V of the “Equipped” case is reduced by about 22.61% of vehicle 𝑖,let𝑁=|N| be the total number of vehicles, compared to that of the “Unequipped” case. The reason is that, and TotalEpoch the total number of simulation epochs. These as discussed before, wireless communications expand the metrics 𝑃𝑜 and 𝑃V are calculated as follows: sensing range of each equipped vehicle in a group so as to enable them to adjust their velocity to the overall velocity of ∑TotalEpoch (𝑘) 𝑘=1 Event the group ahead of time, in the meanwhile guaranteeing a 𝑃𝑜 or 𝑃V = . (29) TotalEpoch ×𝑁 relatively larger reserved distance among vehicles. 12 International Journal of Distributed Sensor Networks

×10−3 ×10−4 11 12

10 10

9 8

8 6 o P P 7 4

6 2

5 0

4 −2 5 10 15 20 25 30 35 5 10 15 20 25 30 35 Different initial velocities (m/s) Different initial velocities (m/s)

Unequipped Unequipped Equipped Equipped

(a) 𝑃𝑜 (b) 𝑃V

Figure 5: The results of 𝑃𝑜 and 𝑃V under different initial velocity settings.

×10−3 0.015 1.6

0.014 1.4 0.013 1.2 0.012 0.011 1 o P P 0.01 0.8

0.009 0.6 0.008 0.4 0.007 0.006 0.2 0.005 0 0 10 20 30 40 50 60 70 80 0 10 20 30 40 50 60 70 80 Different vehicle numbers Different vehicle numbers Unequipped Unequipped Equipped Equipped

(a) 𝑃𝑜 (b) 𝑃V

Figure 6: The results of 𝑃𝑜 and 𝑃V under different vehicle numbers.

Infact,therearenoobstaclecollisionsorvehiclecollisions and 𝑃V instead of collision-related statistics, we can quantify occurring during simulations, which is because the proposed the impacts of wireless communications on the traffic safety mobility model is adopted to simulate the cooperative behav- level. This fact shown in Figures 5 and 6 implies that the road iors of connected vehicles. What is more, as theoretically capacity could be increased by deploying wireless communi- analyzed before, collisions can be avoided between vehicles cations onboard when considering keeping the road danger evolving with the comprehensive effects of potential forces in severity under a certain level. This is also in accordance with theproposedmobilitymodel.Eventhoughnocollisionsare the results in [29]. induced, the potential danger on the road in actual situations To provide a deep insight into the impacts of wireless may exist. Thus, with considering the evaluation metrics 𝑃𝑜 communications on the road traffic efficiency, we would like International Journal of Distributed Sensor Networks 13

8 12

7 10 6 8 5

4 6

3 Flow rate (veh/s) rate Flow Flow rate (veh/s) rate Flow 4 2 2 1

0 0 10 15 20 25 30 10 30 50 70 Different initial velocities (m/s) Different vehicle numbers

Unequipped Unequipped Equipped Equipped (a) Flow rate under different initial velocities (b)Flowrateunderdifferentvehiclenumber

Figure 7: The results of flow rate. to conduct some other simulations. Firstly, we fix the total rate obtained in the “Equipped”caseateachvehiclenumber vehicle number as 𝑁=30and then vary the initial vehicular point is obviously larger than that of the “Unequipped”case. velocity from 10 m/s to 30 m/s. At each velocity point, we This indicates that the vehicle group of a small or a large repeat the simulation 30 times and calculate the flow rate on size can benefit more from the wireless communication, since average. The flow rate is proposed here which is measured at thoseequippedvehiclescancoordinatetheirvelocitymore the section of the obstacle. Its calculation is defined as follows: smoothly according to the overall movement of the group in one simulation we can record the time instant 𝑡1 when via wireless communication systems. At this point, this result the first vehicle of the vehicle group passes the section located confirms that the wireless communications are promising to at the obstacle and 𝑡2 to indicate the time instant when the last improve the overall efficiency of the road traffic. vehicle passes this section. The simulation results obtained in the “Equipped”and“Unequipped” cases are given in Figure 7(a).FromFigure 7(a), it can be seen that the flow rate 4. Conclusions increases along with increasing the initial vehicular velocity in both compared cases. Logically, the increase in the velocity In this paper, the connected vehicles are analogized to the of each vehicle will lead to the increase in the mean speed fish schools in order to develop a more realistic model to of the overall traffic flow. Consequently, whether vehicles describe the mobility of the connected vehicles with the are equipped with wireless communications or not, a high wireless communications. The proposed model consists of vehicular velocity will promote the road traffic efficiency. the attraction of the goal, the repulsion of the obstacles, the Nevertheless, when comparing the results of the “Equipped” constraint of the road, and the interplays of vehicles in the and the “Unequipped”casesinFigure 7(a), the flow rate at group including both attractive and repulsive affection. Many each initial velocity setting obtained in the “Equipped”caseis simulations are performed to verify that the wireless com- higher than that of the “Unequipped” case. The reason is that munications among vehicles can improve the safety and effi- with the assistance of wireless communication those ciency of traffic greatly, and the numerical experiments prove equipped vehicles are able to sense the traffic condition far the reasonableness of the model in terms of describing the awayfromtheirownpositionssothattheycansmoothlyreact cooperative behaviors of connected vehicles with wireless to potential collisions ahead of time and efficiently avoid communications. collisions in a cooperative manner. Then, the overall mobility of the equipped vehicles can be better maintained than those Notations unequipped vehicles during vehicles operating collision avoidance. N: The set of vehicles In the next experiment, the initial velocity of all the p𝑖(𝑡): The position of vehicle 𝑖 at time 𝑡 vehicles is fixed at 20 m/s, and the total vehicle number is set 𝑟𝑖:Theequivalentradiusofvehicle𝑖 𝑊 to range from 10 to 70. Similarly, the simulations in this exper- 𝑟𝑖 : The local warning scope iment have been performed with 30 replications per vehicle 𝑑𝑖: The radius of sensing range of vehicle 𝑖 number point. The results are shown in Figure 7(b).Theflow 𝑚𝑖:Themassofvehicle𝑖 14 International Journal of Distributed Sensor Networks

(1) F𝑖 (𝑡): The attractive force by the goal of vehicle 𝑖 [7] R. Chen, Z. Sheng, Z. Zhong et al., “Connectivity analysis for (2) cooperative vehicular ad hoc networks under Nakagami fading F𝑖 (𝑡): The schooling force among vehicles (3) channel,” IEEE Communications Letters, vol. 18, no. 10, pp. 1787– F𝑖 (𝑡): The environmental effects of vehicle 𝑖 𝑜 1790, 2014. v𝑖 (𝑡): The expected velocity of vehicle 𝑖 at time 𝑡 v (𝑡) 𝑖 𝑡 [8] J. Wang, L. Zhang, D. Zhang, and K. Li, “An adaptive longitu- 𝑖 : Theactualvelocityofvehicle at time dinal driving assistance system based on driver characteristics,” F𝐴(𝑡) 𝑖 𝑖𝑗 : The attractive forces between vehicle and IEEE Transactions on Intelligent Transportation Systems,vol.14, its neighbor 𝑗 no.1,pp.1–12,2013. 𝑅 F𝑖𝑗 (𝑡): The repulsive forces between vehicle 𝑖 and [9] C. W. Reynolds, “Swarms, herds and schools: a distributed its neighbor 𝑗 behavioral model,” ACM SIGGRAPH Computer Graphics,vol. 𝑈𝐴(p𝑖(𝑡), p𝑗(𝑡)): The attractive potential function 21,no.4,pp.25–34,1987. 𝑈𝑅(p𝑖(𝑡), p𝑗(𝑡)):Therepulsivepotentialfunction [10] H. Hildenbrandt, C. Carere, and C. K. Hemelrijk, “Self- 𝑜 F𝑖𝑘(𝑡): The repulsive forces of obstacle 𝑂𝑘 organized aerial displays of thousands of starlings: a model,” 𝐿 Behavioral Ecology,vol.21,no.6,pp.1349–1359,2010. F𝑖 (𝑡): The repulsive force of lanes 𝑂 [11] R. S. Olson, D. B. Knoester, and C. Adami, “Critical interplay p𝑘 : Thepositionofacertainobstacle𝑂𝑘 𝑜 between density-dependent predation and evolution of the 𝑟𝑘: The radius of obstacle 𝑂𝑘 p𝐿(𝑡) 𝑖 selfish herd,”in proceedings of the 15th Genetic and Evolutionary 𝑖 :Thepositionofthevehicle’s center pro- Computation Conference (GECCO ’13),pp.247–254,July2013. jection point on the nearest road boundary 𝑡 [12] R. S. Olson, A. Hintze, F. C. Dyer, D. B. Knoester, and C. Adami, line at the time instant “Predator confusion is sufficient to evolve swarming behavior,” 𝐺(𝑡) : Communication graph JournaloftheRoyalSocietyInterface,vol.10,no.85,pp.3–5, 𝑃𝑜: Probability of a vehicle moving into the 2013. local warning scope of the obstacle [13] C. R. Tosh, “Which conditions promote negative density depen- 𝑃V: Probability of a vehicle moving into the dent selection on prey aggregations?” Journal of Theoretical local warning scope of other vehicles. Biology, vol. 281, no. 1, pp. 24–30, 2011. [14] C. C. Ioannou, V.Guttal, and I. D. Couzin, “Predatory fish select Conflict of Interests for coordinated collective motion in virtual prey,” Science,vol. 337,no.6099,pp.1212–1215,2012. The authors declare that there is no conflict of interests [15] B. L. Partridge, “The structure and function of fish schools,” regarding the publication of this paper. Scientific American,vol.246,no.6,pp.114–123,1982. [16] E. M. Rauch, M. M. Millonas, and D. R. Chialvo, “Pattern for- mation and functionality in swarm models,” Physics Letters A, Acknowledgments vol.207,no.3-4,pp.185–193,1995. ThisresearchissupportedbytheNationalNaturalScience [17] J. K. Parrish and W. M. Hamner, Animal Groups in Three Dimensions, Cambridge University Press, Cambridge, UK, 1997. Foundation of China under Grant nos. 61103098, 91118008 and 61302110 and the Foundation of Key Laboratory of Road [18] D. Helbing, I. J. Farkas, and T. Vicsek, “Freezing by heating in a driven mesoscopic system,” Physical Review Letters,vol.84,no. and Traffic Engineering of the Ministry of Education in 6, pp. 1240–1243, 2000. Tong ji University. [19] L. Lai and S. Qu, “Research on application of fish swarm behaviour in intelligent transportation system,” in Proceedings References of the 7th Advanced Forum on Transportation of China (AFTC ’11), pp. 195–200, 2011. [1] I. D. Couzin, “Collective cognition in animal groups,” Trends in [20]T.Vicsek,A.Czirok,´ E. Ben-Jacob, I. Cohen, and O. Shochet, Cognitive Sciences,vol.13,no.1,pp.36–43,2009. “Noveltypeofphasetransitioninasystemofself-driven [2] A. John, A. Schadschneider, D. Chowdhury, and K. Nishinari, particles,” Physical Review Letters,vol.75,no.6,pp.1226–1229, “Characteristics of ant-inspired traffic flow: applying the social 1995. insect metaphor to traffic models,” Swarm Intelligence,vol.2,no. [21] A. Huth and C. Wissel, “The simulation of the movement of fish 1, pp. 25–41, 2008. schools,” Journal of Theoretical Biology,vol.156,no.3,pp.365– [3] E. Hossain, G. Chow, V.C. M. Leung et al., “Vehicular telematics 385, 1992. over heterogeneous wireless networks: a survey,” Computer [22] C. M. Breder, “Equations descriptive of fish schools and other Communications,vol.33,no.7,pp.775–793,2010. animal aggregations,” Ecology,vol.35,no.3,pp.361–370,1954. [4] S. Wang, C. Fan, C.-H. Hsu, Q. Sun, and F. Yang, “A vertical [23] Y. Rochefort, H. Piet-Lahanier, S. Bertrand, D. Beauvois, and D. handoff method via self-selection decision tree for internet of Dumur, “Model predictive control of cooperative vehicles using vehicles,” IEEE Systems Journal,2014. systematic search approach,” Control Engineering Practice,vol. [5] J. Wang, Y. Liu, and K. Deng, “Modelling and simulating worm 32, pp. 204–217, 2014. propagation in static and dynamic traffic,” IET Intelligent Trans- [24] P. B. Moyle and J. J. Cech, “Fishes: an introduction to ichthyol- port Systems,vol.8,no.2,pp.155–163,2014. ogy,” International Review of Hydrobiology,vol.92,no.1,p.98, [6]T.Wu,J.Wang,Y.Liu,W.Deng,andJ.Deng,“Image-based 2007. modeling and simulating physical channel for vehicle-to- [25] M.Lindhe,P.Ogren,andK.H.Johansson,“Flockingwithobsta- vehicle communications,” Ad Hoc Networks,vol.19,pp.75–91, cle avoidance: a new distributed coordination algorithm based 2014. on Voronoi partitions,” in Proceedings of IEEE International International Journal of Distributed Sensor Networks 15

Conference on Robotics and (ICRA ’05),pp.1797– 1782, April 2005. [26] R. Olfati-Saber, “Flocking for multi-agent dynamic systems: algorithms and theory,” IEEE Transactions on Automatic Con- trol,vol.51,no.3,pp.401–420,2006. [27] H. G. Tanner, A. Jadbabaie, and G. J. Pappas, “Flocking in fixed and switching networks,” IEEE Transactions on Automatic Control,vol.52,no.5,pp.863–868,2007. [28] R. O. Saber and R. M. Murray, “Flocking with obstacle avoid- ance: cooperation with limited communication in mobile net- works,” in Proceedings of the 42nd IEEE Conference on Decision and Control,vol.2,pp.2022–2028,December2003. [29] P. Tientrakool, Y. C. Ho, and N. F. Maxemchuk, “Highway capacity benefits from using vehicle-to-vehicle communicaiton and sensors for collision avoidance,” in Proceedings of the Vehic- ular Technology Conference (VTC ’11), pp. 1–5, IEEE, September 2011. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 390329, 14 pages http://dx.doi.org/10.1155/2015/390329

Research Article Summary Instance: Scalable Event Priority Determination Engine for Large-Scale Distributed Event-Based System

Ruisheng Shi,1 Yang Zhang,2 Lina Lan,3 Fei Li,4 and Junliang Chen2

1 Key Laboratory of Trustworthy Distributed Computing and Service (BUPT), Ministry of Education, and School of Humanities, Beijing University of Posts and Telecommunications, Beijing 100876, China 2State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China 3School of Network Education, Beijing University of Posts and Telecommunications, Beijing 100088, China 4Siemens AG Austria, Siemensstrasse 90, 1210 Vienna, Austria

Correspondence should be addressed to Ruisheng Shi; [email protected]

Received 19 October 2014; Accepted 5 February 2015

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Ruisheng Shi et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Data prioritization problem is paramount for distributed publish/subscribe infrastructure to the timely delivery of real-time events since a large number of low priority events may clog the channel thereby causing high priority events to get delayed. The challenge raised for the event-based middleware in large-scale distributed system such as vehicular ad hoc networks is that event priority determination engine must be efficient and scalable in terms of priority rule size and event throughputs. This paper proposes an innovative approach based on Bloom filter and event discretization. A Bloom filter data structure is used to store the rule instances and their priorities. The complex rule evaluation is reduced to set membership testing as queries on Bloom filters. The time complexity of data prioritization is constant and independent of the number of priority rules. As event discretization signatures can be cached, this approach is cache friendly in nature. The previous computation results can be cached in overlay network nodes and reused to improve the system throughputs and determination time. We have evaluated our proposed approach and the results show a significant performance improvement.

1. Introduction process real-time event data will be crucial for the successful adoption of such applications. Flexible and efficient events With the advent of ubiquitous sensor-rich environments and routing mechanisms are paramount for the improvement of location-based services, distributed event-based systems with user experience. Publish/subscribe systems must support a the publish/subscribe communication paradigm have been large number of geographically distributed publishers and gaining popularity [1, 2]. For example, in vehicular ad hoc subscribers. Efficient communication between these brokers networks (VANETs), the applications logics are triggered is paramount. by various events from geographically distributed sources. Data of different importance are transported in the same In expressway monitoring system of VANETs, the sensing communication infrastructure. Large number of low priority data of vehicles are published continuously and the vehicle eventsmayoccupymuchbandwidthofeventbrokersand information system may subscribe to different data based on incur delivery delay of time sensitive data. We propose event the vehicle’s location. delivery on-time rate (EDOR) metrics to measure system With the increasing popularity of distributed event-based performance. Prioritized multiqueue approach is a natural systems (especially the publish/subscribe systems) and the choice to improve the system performance under given adoption in mission critical areas, performance and scalabil- system resources. However, the effectiveness of this approach ity issues are becoming a major concern [3, 4]. The perfor- depends on the performance and scalability of event priority mance and scalability of the event-based middleware used to determination engine (PDE). 2 International Journal of Distributed Sensor Networks

Ana¨ıve implementation of priority rule matching might infrastructure. However, if the overhead of prioritization is check each rule against event instance values. But this na¨ıve too high, the solution is not affordable for most soft real- approach performs poorly in large-scale system [5]. The time applications. These online applications require fast data performance of priority determination engine is dependent prioritization services. Low latency and high throughput onthenumberofrulesinthesystem.Sinceeachcondition under geographically distributed environment are demanded of the rules needs to be checked on the fly, this¨ıve na for the data prioritization engine. At the same time, it should approach is cache-unfriendly and may perform poorly under be scalable in terms of priority rule size. geographically distributed environment. A cache-friendly approach may alleviate the load of PDE dramatically and Rule Matching. Rule matching engines have been intensively achieve significant improvement of system performance in studied in the past decades. The most famous algorithm is terms of the speed of priority determination and event Rete, which was proposed by Charles L. Forgy at Carnegie- delivery on-time rate (EDOR). Mellon University in the 1970’s [5, 12]. Rete algorithm has Another na¨ıve priority policy is that event producer become very widely used; it is the basis of OPS5, CLIPS, and can determine the priority of events. Under this policy, the numerous commercial rule-based tools. priority is determined by different event producers. If most Techniques used in expert and rule-based systems sup- events are labeled as high priority, the system cannot benefit port expressive predicate languages [12]butareunableto much from the priority mechanism. We need global policy scale up to process millions of Boolean expressions. Most for resource scheduling in the overlay network. of the traditional rule-based systems used in expert systems focus on language expressiveness and their expected sizes are The design issues of efficient and scalable priority deter- assumedtobelessthanthousandsofBooleanexpressions. mination engine (PDE) are addressed in this paper. The latest Rete implementation declared that the scale can be In this paper, we present an innovative PDE design based up to 100 K rules with millions of objects and is at least 500 on Bloom filter and event discretization. First, the speed of times faster than the original Rete [13, 14]. Although advances priority determination is independent of the number of rules in the implementation of knowledge-based expert systems in the system. Second, this approach is cache friendly. The have provided substantial performance improvements, the system can handle large number of events in geographically rule matching speed in large-scale systems with millions distributed deployments. of Boolean expressions under severe time constraints for The results in this paper are an improved and extended example, submillisecond, is still an open issue. version of our conference paper in IEEE SCC 2012 [6]. The Many innovative approaches have been proposed to major extensions in this work are the following. First, the address fast rule matching against millions of Boolean expres- model is refined and expressed more accurately. Second, sions [15–18] recently. The rule matching performance has more related works are explored. Third, the discretization been improved significantly. But all these algorithms scale algorithm is detailed, which provides a much more thorough linearly with respect to the number of matched Boolean description compared to the preliminary results in [6]. expressions [15]. These algorithms focus more on top-k Finally,theevaluationmethodsandresultsareintroducedin matching Boolean expressions [15, 17, 18]. this paper. Compared with Rete and the aforementioned works, our approach focuses on the scalability and provides an inno- 2. Related Work vative solution on rule matching engine design under dis- tributed computing environment. Our approach is focused Data Prioritization. The internet services require soft real- on the scalability of online query speed of event priority rule time constraints, for example, 300 msec latency [7, 8]. For matching at the cost of offline large rule instance database some applications, a 100msec increase in latency can affect maintenance and cache management on broker nodes. its user experience significantly. Experiments of Amazon andGoogle[9] demonstrated that latencies at hundreds of 3. Model Description milliseconds could already result in significant financial loss. The absence of traffic prioritization causes latency-sensitive 3.1. System Model. The publish/subscribe system can be data stream to wait behind latency-insensitive data stream. classified by architecture as centralized publish/subscribe Events are useful, if and only if events are delivered within system and distributed publish/subscribe system [19]. As its deadline. Recent research works [7, 8, 10] addressed this the increasing scale of event-based systems, the distributed issue under datacenter environment and the solutions are publish/subscribe system attracts more attention from both mostly focused on transport layer protocols. In the cross- industry [20] and academia [21]. layer approach, named DeTail, the solution depends upon A generic publish/subscribe system (often referred to applications to properly specify data priorities based on how in the literature as event service or notification service) is latency sensitive they are [7]. composed of a set of broker nodes distributed over a com- The presence of data prioritization can alleviate this munication network. These nodes form an overlay network, issue significantly. Our system [11]introducesdataprior- which is a logical network built on the physical network. The itization into application layer, that is, publish/subscribe links between nodes are paths in the physical network. overlay network. In the overlay system, the prioritizations Formally [22] the distributed publish/subscribe system of application data can be handled by publish/subscribe can be represented as a 5-tuple 𝐺 = ⟨𝐵, 𝐶, 𝑃,𝑇 𝑆,𝐸 ⟩ where International Journal of Distributed Sensor Networks 3

C4 also may be refined into proper granularity per application C5 requirements. The discretization procedures can be defined by applications per business requirements. Broker network C C1 6 B7 B 1 B6 3.3. Priority Rule Model. The triple consisting of attribute, B B C2 3 4 C8 operator, and set of values is referred to as a Boolean predicate. A conjunction of Boolean predicates is a Boolean B2 B5 expression. A priority rule can be modeled as a set of Boolean C C3 9 expressions. The rule is expressed as a disjunction of Boolean Inner broker Access broker C10 expressions. For a given priority, there may be a set of priority Client rules specified by applications. ThesetofvaluesinallBooleanpredicatescomposedthe Figure 1: System architecture of distributed publish/subscribe metadata of the priority rule. An expressive set of operators overlay network. are supported: relational operators (<, ≤, =, =,̸ ≥, >)andset operators (∈, ∉). The metadata of discrete attributes shall be a subset of the corresponding attribute domain. The 𝐵={𝑏1,𝑏2,...,𝑏|𝐵|} is the set of system broker nodes. 𝐶={𝑐,𝑐 ,...,𝑐 } metadata of continuous attributes shall be an element of the 1 2 |𝐶| is the set of connections between corresponding attribute domain. broker nodes. 𝑃={𝑝1,𝑝2,...,𝑝|𝑃|} is the set of publish- 𝑆={𝑠,𝑠 ,...,𝑠 } 𝐸 = For example, given event schema of coal mine monitoring ers. 1 2 |𝑆| is the set of subscribers. 𝑇 ⟨𝑎 ,𝑎 ,𝑎 ⟩ 𝑎 {𝑇 ,𝑇 ,...,𝑇 } data, which is defined as 1 2 3 , 1 is a discrete variable 1 2 |𝐸𝑇| is the set of event types. which denotes the location identifier, 𝑎2 is a continuous The overlay topology of publish/subscribe network is 𝑎 shown in Figure 1. Client can be publisher or/and subscriber. variable which denotes methane (CH4) gas density, and 3 is Each client is connected to only one of the brokers in the timestamp field. 𝑝 =𝑎 ∈𝑆 𝑝 =𝑎 ≤𝐶 system.Thebrokerthatisconnectedtoclientiscalledthe Boolean predicates 11 1 1 and 21 2 1 can =𝑝 ∧𝑝 =(𝑎 ∈𝑆)∧ access broker from network view and is also called home construct a Boolean expression BE1 11 21 1 1 (𝑎 ≤𝐶) broker with respect to that client. The brokers that route 2 1 , which means that if the data come from locations 𝑆 𝑎 𝐶 events between brokers are called event router or inner in 1 andthevalueofattribute 2 is not greater than 1, broker. the event shall be determined as the corresponding priority. The metadata 𝑆1 and 𝐶1 suffice the following constraints: 𝑆1 ⊆ Dom(𝑎1) and 𝐶1 ∈ Dom(𝑎2).Similarly,BE2 can be 3.2. Event Model. Publish/subscribe based event models were defined as BE2 =𝑝12 ∧𝑝22 =(𝑎1 ∈𝑆2)∧(𝑎2 ≤𝐶2).The first introduced in the data and business domain as complex priority rule is defined as 𝑅1 = BE1 ∨ BE2 =(𝑝11 ∧𝑝21)∨ event processing [1]. Each event is described by a set of (𝑝12 ∧𝑝22).Thedata{𝑆1,𝐶1,𝑆2,𝐶2} are metadata defined by attributes, 𝑒=⟨V1, V2,...,V𝑘⟩ [23, 24]. application system, which may be constant or dynamically The tuple ⟨type(V1), type(V2),...,type(V𝑘)⟩ is called event changing under context. schema. A more succinct presentation is written as attribute The rule set for given priority can be modeled as a set vector {𝑎1,𝑎2,...,𝑎𝑘}. The events having the same schema of Boolean expressions, which are the union of the Boolean are classified into the same event type. Event type space is expression sets for the priority rules of the given priority. The defined as a set, denoted by 𝐸𝑇 ={𝑇1,𝑇2,...,𝑇|𝐸 |},where 𝑇 general format of priority Boolean function for a set of rules 𝑇𝑖 ={𝑎1,𝑎2,...,𝑎𝑘}, 𝑖∈[1,|𝐸𝑇|]. canbeformalizedas𝑅=𝑅1 ∨⋅⋅⋅∨𝑅𝑘 = BE1 ∨⋅⋅⋅∨BE𝑚 = Let 𝐸 be the set of all events published in the system. An 𝑓(𝑝1,𝑝2,...,𝑝𝑛).ThesizeofpriorityBooleanfunctioncanbe event 𝑒∈𝐸mustfollowoneofeventschemaintheevent measured by the number of Boolean expressions. type set 𝐸𝑇.Let𝐸𝑇 denote all events which follow the event 𝑖 We define the normal model of priority rule as a disjunc- schema defined by event type denoted by 𝑇𝑖 ={𝑎1,𝑎2,...,𝑎𝑘}. tion of Boolean expressions and each Boolean expression is Therefore, we have the following relations: defined as a conjunction of Boolean predicates. 𝐸=𝐸 ∪𝐸 ∪⋅⋅⋅∪𝐸 The transformation from nature language rule specifi- 𝑇1 𝑇2 𝑇𝑛 (1) cation to normal expression is another research topic in ∀𝑇 ∈𝐸 ,𝑇∈𝐸 :𝐸 ∩𝐸 =⌀. 𝑖 𝑇 𝑗 𝑇 𝑇𝑖 𝑇𝑗 requirement engineering, which is not addressed in this paper. For each event schema, the attributes vectors that deter- Givenaneventinstance,𝑒=⟨V1, V2, V3⟩.If𝑒 suffices the minetheeventpriorityarecalledprioritysignaturevector. conditions that V1 in set 𝑆1 and V2 ≤𝐶1,event𝑒 matches rule 𝑉 (𝑇 ) 𝑇 𝑅 𝑒 V Let Sig 𝑖 denote the signature vector for event type 𝑖. successfully; if event suffices the conditions that 1 in set 𝑉 (𝑇 )=⟨𝑎,𝑎 ,...,𝑎 ⟩ 𝑚 𝑆 V ≤𝐶 𝑒 𝑅 Sig 𝑖 𝑖1 𝑖2 𝑖𝑚 has priority attribute fields, 2 and 2 2,event matched rule successfully; if both where 𝑎𝑖𝑗 ∈{𝑎1,𝑎2,...,𝑎𝑘}, 𝑎𝑖𝑗 =𝑎𝑖𝑘 if and only if 𝑗=𝑘. failed, event 𝑒 does not match the priority rule 𝑅. We distinguish two types of attributes: continuous vari- In this simple example, we observe that the four condition ables and discrete variables. In our approach, the attributes tests denoted by Boolean predicates can be reduced to two with continuous value must be refined into discrete values attributes in event priority signature vector. We also observe with proper granularity. The attributes with discrete value that in condition tests on Boolean predicates 𝑝11 =𝑎1 ∈𝑆1 4 International Journal of Distributed Sensor Networks

𝑝 =𝑎 ∈𝑆 and 12 1 2, the computation time of condition test Rule management interface Event priority query interface depends on the size of set 𝑆𝑖 (𝑖 = 1, 2). The condition tests on Boolean predicates need be checked on the fly since past evaluationsonattributeswithcontinuousvaluescannotbe RIE PDE reused directly. (rule instantiation engine) (priority determination engine)

Generate instances from Event discretization 3.4. Assumptions and Design Goals. Our design has been rules signature generation guided by assumptions that offer both challenges and oppor- tunities. Hash computation on Query from the array of instance sets Bloom filters (1) The system shall support large-scale system running under geographically distributed environment. Update the array of Determination of (2) The speed of priority determination is paramount Bloom filters incoming event to ensure real-time event to be delivered timely. The performance shall be scalable with the scale of 0100100001001 P1 condition tests in rules and the traffic of events in 0010010100100 P2 overlay network. ···

(3) The problem of priority determination can accept 0010010100100 Pk false positive if the false rate can be controlled under A lossy summary of rule instances the acceptable rate. (4) Large amounts of condition tests in priority rules are Figure 2: Architecture of event priority rule matching engine. actually defined by small number of event signature attributes. (5) The condition tests in rules can be expressed as set membership query problem. The priority rules mostly is simple and independent of the number of condition tests are expressed as some attribute suffice some condition in rules and query can be answered by lookup local cache (in particular set, less than or greater than specified as long as possible. The key ideas of our approach are rule threshold value). The condition tests are not likely as instantiation, event (attributes) discretization, and caching- complex as the pattern match problem in artificial friendly signature-based rule matching mechanism under intelligence area. distributed event environment. As shown in Figure 2, the rule matching engine is decou- (6) The set of event types is known in advance. pled as two parts, offline rule instantiation and online query Our design goals on PDE focus on the following aspects. on event instance matching. The offline part is named rule instantiation engine (RIE). The online part is named priority (1)ThePDEshouldstrivetomaximizethenumberof determination engine (PDE). events that satisfy their deadline to contribute to Rule instantiation process tries to represent the event application throughput. priority rule set as a set of instances. If event priority is queried on this set directly, the computation time involved (2) The PDE should be able to accommodate to burst in performing the query is dependent on the number of the tolerance to improve the peak load: redefines the elements in set 𝑅. To reduce the computation time, the rule peak loads at which the publish/subscribe system can instance set 𝑅 is stored with Bloom filter data structure. The operate without impacting the user experience. computation time of query on Bloom filter is independent 𝑅 Toachievethesedesigngoals,weproposeourapproach: onthesizeofruleinstanceset .Furthermore,theamount summary instance. of storage required by the Bloom filter for each element in set 𝑅 is independent of its length. By employment of Bloom filter, the online query of event priority is reduced as two- 4. Solution hash function computation on event signature; refer to next section on Bloom filter theory. The basic ideas of our approach are composed of two main principles. First, make online query on event instance as simple as possible. The time consuming procedures should be 4.2. Preliminary. In order to keep this paper self-contained, done offline. Second, exploiting the power of cache on each this subsection presents a concise introduction on Bloom broker node to reduce network round trip may bring much filter. room for performance improvement. AftertheBloomfilterisproposedin1970s[25], it is first used in database communities. This technique has gained 4.1. Overview. To accommodate the aforementioned princi- popularity in network applications with the emergence of the ples, it would be best that the computation time of query Internet [26]. International Journal of Distributed Sensor Networks 5

A Bloom filter is a simple, space-efficient randomized 4.3.1. Rule Instantiation Process. First, we explain how RIE data structure for representing a set of strings compactly for transformsrulesintoasetofruleinstanceswithasimple efficient membership querying. It outperforms other efficient example. datastructuressuchasbinarysearchtreesandtriesasthe Consider event schema and rule description as follows. time needed to add an item or check whether an item 𝑇=⟨𝑎,𝑎 ,𝑎 ⟩ belonging to the set is constant irrespective of the cardinality (1) Event schema is defined as 1 2 3 ,where (𝑎 ) {𝐴,𝐵,𝐶,𝐷,𝐸} (𝑎 )=[0,1] of the set. Dom 1 is ,Dom 2 ,and (𝑎 )=[0,+∞) 𝑎 At first, we present the mathematics behind Bloom filters Dom 3 .Theattribute 1 denotes the concisely. A standard Bloom filter for representing a set location identifier where the data is generated. In this 𝑆={𝑥1,𝑥2,...,𝑥𝑛} of 𝑛 elements is represented by an example, the whole coal mine area is divided into 𝐴 𝐵 𝐶 𝐷 𝐸 𝑚-bit vector. All bits in the 𝑚-bit vector are initially set fiveareas,respectively,named , , , ,and .The 𝑎 𝑎 to 0. A Bloom filter uses 𝑘 independent hash functions attribute 2 denotes the methane gas density at 1.The 𝑎 {ℎ1,ℎ2,...,ℎ𝑘} with range {1,2,...,𝑚}.Foreachmember𝑥 gas density ranges from 0% to 100%. The attribute 3 of 𝑆,thebitsℎ𝑖(𝑥) are set to 1 for 1≤𝑖≤𝑘.Thebitscanbe denotes the timestamp for the generated data. set to 1 multiple times, but only the first change has an effect. (2) Rule set 𝑅=BE1 ∨ BE2 =(𝑃11 ∧𝑃21)∨(𝑃12 ∧𝑃22), After repeating this procedure for all members of the set, the where 𝑃11 =𝑎1 ∈𝑆1, 𝑃21 =𝑎2 ≤𝐶1, 𝑃12 =𝑎1 ∈𝑆2,and programming of the filter is completed [25–27]. 𝑃22 =𝑎2 ≤𝐶2.Thesets𝑆1 = {𝐴, 𝐵, 𝐶} and 𝑆2 ={𝐴,𝐷} The query process is similar to programming. To check arelocationsets.Thethresholdvaluesofthemethane 𝑦 𝑆 𝑘 whether an item is in , we generate hash values with gas density are 𝐶1 and 𝐶2. {ℎ1,ℎ2,...,ℎ𝑘} from item 𝑦. Then, we check whether all 𝑘 bits ℎ𝑖(𝑦) are set to 1. If at least one of these 𝑘 bites is unset Thefirstrulemeansthatiftheincomingeventdataare to 1, 𝑦 is clearly not a member of 𝑆.Ifall𝑘 bits are set to 1, generated from locations in set 𝑆1 = {𝐴, 𝐵, 𝐶} and the value we assume that 𝑦 is in 𝑆,althoughwearewrongwithsome of methane gas density is less than threshold value 𝐶1,the probability. Hence, a Bloom filter may yield a false positive. incoming event suffices the first rule. −𝑛𝑘/𝑚 𝑘 False-positive probability 𝑓 is 𝑓=(1−𝑒 ) ,where𝑛 is the The second rule means that if the incoming event data 𝑆 ={𝐴,𝐷} number of elements in 𝑆, 𝑘 is the number of hash functions, are generated from locations in set 2 and the value 𝐶 and 𝑚 isthesizeofbitvector.Wecanreducethevalueof𝑓 of methane gas density is less than threshold value 2,the by choosing appropriate values of 𝑚 and 𝑘 for given size 𝑛 of incoming event suffices the first rule. 𝑉 = the member set. In the optimal case, which minimizes false- Event priority signature vector can be inferred as sig ⟨𝑎 ,𝑎 ⟩ positive probability with respect to 𝑘, 𝑘 = (𝑚/𝑛) ln 2.This 1 2 from rule set specifications. 𝑓 = (1/2)𝑘 The attribute 𝑎2 is numeric value and shall be discretized corresponds to a false-positive probability ratio of . 𝑆 ={𝐴,𝐵,𝐶} into discrete value, which belongs to the set 𝑎2 . To accommodate the deletion operation on Bloom filters, The entity, which defines the discretization procedure, is Fan et al. proposed the idea of counting Bloom filters [28]. In called discretizer. Each attribute with numeric value in a counting Bloom filter, each entry in the Bloom filter is nota signature vector shall have particular discretizer, which is defined by application running over the publish/subscribe single bit but rather a small counter. When an item is inserted, infrastructure. the corresponding counters are incremented; when an item The set 𝑆𝑎 is defined as follows. Assume 𝐶1 <𝐶2;symbols is deleted, the corresponding counters are decremented. To 2 𝐴, 𝐵,and𝐶 denote the numeric range, respectively, 𝐴= avoid counter overflow, we choose sufficiently large counters (−∞, 𝐶1], 𝐵=(𝐶1,𝐶2],and𝐶=(𝐶2,+∞).For𝑃21 ={𝑎2 ≤ [26, 27]. The analysis from [26, 28]revealsthat4bitsper 𝐶1}, the condition test is transformed as 𝑃21 = {𝑇(𝑎2)∈ counter can suffice requirements of most applications. 𝑇(𝐶 )} 𝑇(𝑎 )∈𝑆 𝑇(𝐶 )={𝐴} 𝑇(𝐶 )⊆ 1 ,where 2 𝑎2 , 1 ,and 1 To accommodate membership queries of dynamic sets, 𝑆 𝑇(𝑎 ) 𝑎2 .The 2 is the discretized result of PDE discretizer on Guo et al. proposed dynamic Bloom filters (DBF)29 [ ]. event attribute 𝑎2.Theset𝑇(𝐶1) is the discretized result of Further improvements on scalability problem of Bloom filter RIE discretizer on threshold value 𝐶1 in condition tests on are addressed by scalable Bloom filter (SBF)30 [ ]. numeric value attribute 𝑎2. In order to reduce the need for computation of possibly Each rule instance is an element in rule instance space large number of different hash functions, the authors of31 [ ] =𝑆 ×𝑆 (IS), which is defined as IS 𝑎1 𝑎2 .Thecardinalityofthe have shown that only two hash functions are necessary to |𝑆 |×|𝑆 | |𝑆 |=5 |𝑆 |=3 set IS is 𝑎1 𝑎2 . In this example, as 𝑎1 and 𝑎2 , effectively implement a Bloom filter without any loss in the |IS|=15. asymptotic false-positive probability. We can deduct the instance representation format for rule 𝑅 as follows. (𝑝11 ∧𝑝21) = {⟨𝐴, 𝐴⟩, ⟨𝐵, 𝐴⟩, ⟨𝐶, 𝐴⟩} and (𝑝12 ∧ 4.3. Rule Instantiation Engine Footnotes. RIE (rule instan- 𝑝22) = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐵⟩, ⟨𝐷, 𝐴⟩,; ⟨𝐷,𝐵⟩} therefore, we get the tiation engine) is designed to program the event priority rule instance set determination rules into a set of Bloom filter structures. RIE 𝑆 = {⟨𝐴,⟩ 𝐴 , ⟨𝐵,⟩ 𝐴 , ⟨𝐶, 𝐴⟩} transforms abstract priority determination rules into con- 𝑅 crete instances and generates Bloom filter based summaries ∪ {⟨𝐴,⟩ 𝐴 , ⟨𝐴,⟩ 𝐵 , ⟨𝐷,⟩ 𝐴 , ⟨𝐷,⟩ 𝐵 } (2) of the large data set on rule instances per each priority. In this section, we show how RIE works. = {⟨𝐴,⟩ 𝐴 , ⟨𝐴,⟩ 𝐵 , ⟨𝐵, 𝐴⟩ , ⟨𝐶, 𝐴⟩ , ⟨𝐷,⟩ 𝐴 , ⟨𝐷,⟩ 𝐵 } . 6 International Journal of Distributed Sensor Networks

(1) Predicate: ⟨attribute, operator, value⟩. (2) Operators: OperatorEnumerator {<,≤,=,=,̸ ≥, >, ∈, ∉} defines the supported operator set. (3) BE: a list of predicates, which is ordered by event attributes. For example, 𝑎2 <50% ∧𝑎1 ∈{𝐴,𝐵,𝐶}∧𝑎2 >10% shall be formalized as 𝑎1 ∈{𝐴,𝐵,𝐶}∧𝑎2 <50% ∧𝑎2 >10% (4) Rule: a list of BEs (5) RuleSet: a list of rules (6) VecSig: signature vector is a list of attributes involved in priority rules logically. In this basic design schema, there is only one signature vector for each priority per event schema. The vector is initialized as bit vector with zero. If the attribute appeared in Boolean expressions, the corresponding bit is set to (1). (7) Discretizer: two types of hash table are defined. ⟨𝑖𝑑, ⟨𝑙, 𝑟⟩⟩ is designed for discretizer for continuous attribute and ⟨𝑖𝑑, 𝑠𝑒𝑡⟨int⟩⟩ is designed for discretizer for discrete attribute. (8) Signature for event instance: byte block structured as ⟨Event Type ID, Discretizer ID, an array of discretized attribute value in event instance⟩

Algorithm 1: Data structure.

Input RuleSet Output 𝑆𝑅,VecSig (1) generate BE list for RuleSet (2) for all predicate 𝑏𝑝 in RuleSet do (3) Get the attribute ID in predicate (4) Set the bit in signature vector to (1) (5) end for (6) for all BE 𝑏𝑒 do ⟨ 𝑆 ⟩ 𝑆 (7) predicates table attribute ID, attribute , attribute is an array of integer to denote a discrete set (8) for all predicate 𝑏𝑝 in 𝑏𝑒 do (9) 𝑇𝑝 :⟨𝑎,𝑜𝑝𝑡,V⟩→𝑆𝑎 : Tranform predicate 𝑝 triple into discrete set by attribute discretizers (10) Add set 𝑆𝑎 into predicates table (11) end for (12) Merge discrete sets on the same attribute by set intersect operation in predicates table 𝑆 (13) Generate the rule instance set be from merged predicates table by set product operation 𝑆 (14) Store the rule instances in set be into Bloom filter (15) end for

Algorithm 2: Rule instantiation algorithm.

The duplicated instance ⟨𝐴, 𝐴⟩ is eliminated during the Signature vector 110010000101 0 union operation of two sets. ··· 𝑆 ⊆ It is obvious that 𝑅 IS. The cardinality of set IS is the Event schema a1 a2 a3 an upperboundofthesizeofruleinstanceset𝑆𝑅. The key data structures are described in Figure 3 and Attribute ID 0 Algorithm 1. Type : continuous 1: discrete The procedure on rule instantiation process is described Discretizer as in Algorithm 2.First,transformtheconditiontestsasset Value Continuous type: ⟨id, ⟨l, r⟩⟩ membership determination with proper granularity, 𝑇𝑝 : Discrete type: ⟨⟨id, set id⟩⟩ ⟨𝑎, 𝑜𝑝𝑡, V⟩→𝑆𝑎 as shown in Algorithm 3.Second,translate the logic operators (conjunction, disjunction, and negation) Figure 3: Data structure of signature vector and attribute discretizer. as set operators (intersection/product, union, and set differ- ence) at line (6) to line (13) in Algorithm 2.Finally,𝑆𝑅 is the result of rule instantiation procedure. Signature vector is also 𝑆 generated during rule instantiation procedure at line (2) to instances be,whichisasubsetofruleinstancespaceIS.The line (5) in Algorithm 2. rule instance representation of rule set 𝑅, denoted by symbol 𝑅= ∨⋅⋅⋅∨ =𝑓(𝑝,𝑝 ,...,𝑝 ) 𝑆 𝑆 𝑆 Given BE1 BE|BE| 1 2 𝑛 and event 𝑅,istheunionofall be.Obviously, 𝑅 is a subset of rule 𝑉 =⟨𝑎,𝑎 ,...,𝑎 ⟩ priority signature vector sig 1 2 𝑚 ,ruleinstance instance space IS. spaceISistheCartesianproductof𝑆𝑎 ,𝑆𝑎 ,...,𝑆𝑎 ,where Our framework draws a schema of the discretizer, which 𝑆 (1≤𝑖≤𝑚) 1 2 𝑎 𝑚 𝑎𝑖 is the set defined by attribute 𝑖’s discretizer. can be customized by applications. The discretizer divides the Each Boolean expression can be represented by a set of rule domain of the attribute value into several ranges or discrete International Journal of Distributed Sensor Networks 7

Input predicate triple 𝑝 Output discrete set 𝑆 (1) switch(p. attribute.type) (2) case: continuous (3) ContinousDiscretizer cd = p. attribute.discretizer; (4) switch(p. operator) (5) case: Less (6) for all item in cd do (7) if 𝑝.value< item.lower (8) ; //do nothing (9) else if 𝑝.value< item.upper (10) S.insert(item.id); //false positvie rule are introduced (11) else 𝑝.value> item.upper (12) S.insert(item.id); (13) end for (14) break; (15) case: Great (16) for all item in cd do (17) if 𝑝.v< item.lower (18) S.insert(item.id); (19) else if 𝑝.value< item.upper (20) S.insert(item.id); //false positvie rule are introduced (21) else 𝑝.value> item.upper (22) ;//donothing (23) end for (24) break; (25) ... //other operators (26) break; (27) case: discrete (28) DiscreteDiscretizer dd = p. attribute.discretizer; (29) switch(p. operator) (30) case: In (31) for all item in dd do (32) if 𝑝.value∩ item.set !=⌀ (33) S.insert(item.id); //false positvie rule are introduced (34) end for (35) break; (36) case: NotIn (37) for all item in dd do (38) if item.set ⊆𝑝.value (39) ;//donothing (40) else //false positvie rule are introduced when item.set ∩𝑝.value =⌀̸ (41) S.insert(item.id); (42) end for (43) break; (44) ... //other operators (45) break;

Algorithm 3: Predicate transformation algorithm 𝑇𝑝 :⟨𝑎,𝑜𝑝𝑡,V⟩→𝑆𝑎. sets and these ranges or sets shall be disjoint with each other; their own discretizer for event schema according to business that is, for all 𝑆𝑖,𝑆𝑗 ∈ Discretizer, 𝑆𝑖 ∩𝑆𝑗 =⌀, 𝑖 =𝑗̸ . Each requirements. The id in discretizer hash tables is used to range or set in the discretizer is labeled with an identifier as compose the rule instance and event instance signature. shown at line (7) in Algorithm 1. To represent a discretizer for The signature vectors for event schema are generated continuous attribute, the hash table ⟨𝑖𝑑, ⟨𝑙, 𝑟⟩⟩ is employed, in Algorithm 2. The signature vectors are used for event where id denotes the identifier of the range and ⟨𝑙, 𝑟⟩ denotes signature generation procedure in Section 4.4.Thestructure thelowerboundandupperboundoftherange.Torepresent of signature vector is shown in Figure 3. a discretizer for discrete attribute, the hash table ⟨𝑖𝑑, 𝑠𝑒𝑡⟨int⟩⟩ is employed, where id denotes the identifier of the set and 4.3.2. Hash Computation on Instance Set 𝑆𝑅. For each element 𝑠𝑒𝑡⟨int⟩ denotes the discrete set. The applications can define in 𝑆𝑅, generate the signature for each rule instance tuple, 8 International Journal of Distributed Sensor Networks

Table 1: Example for rule instance structure. Broker PDE_service Event schema ID Discretizer ID Attribute 1 Attribute 2 32-bit integer 32-bit integer 32-bit integer 32-bit integer Find signature vector for example, ⟨𝐴, 𝐴⟩. The signature may be string composed Call discretizers by each field in the rule instance tuple. You may have more clever encoding approach of the signature. Anyway, the Generate signature computation complexity depends on the size of rule instance set. If event types share the same set of Bloom filters, event Event instance signature type identification shall be programmed into signature to ensure the uniqueness of each signature in the Bloom filter. Priority flag Event type identification is a unique string to distinguish event types. An alternative design choice is that each event type has its own set of Bloom filters for priority determina- Figure 4: Event priority determination procedure. tion. Different event discretizers will make the rule instance different even for the same event schema. If there are multiple discretizers defined by various applications, the discretizer need classifies the domain of discrete attribute, the algorithm identifier shall be contained in rule instance structure. An performs line (4) to line (6) in Algorithm 5. For example, example is shown in Table 1. 𝑎 ∈𝑆 = application defines discretizer for attribute 1 𝑎1 {𝐴,𝐵,𝐶,𝐷,𝐸}as 𝑆1 = {𝐴, 𝐵, 𝐶} and 𝑆2 = {𝐷, ;thefunction𝐸} 4.3.3. Update the Computation Results into Bloom Filters. For 𝑇𝑒 shall be executed 𝑇𝑒(V1):𝐵 →1 𝑆. each priority, one bit vector is dedicated for the summary of For continuous attribute, the discretizer performs line (1) 𝑆 𝑃={𝑃,𝑃,...,𝑃 } rule instance set 𝑅.TheBloomfilterset 1 2 𝑘 to line (3) in Algorithm 5. In this example, V2 =30%and 𝑘 is a lossy summary of rule instances for priorities. discretizer divide the domain of attribute 𝑎2 ∈(−∞,+∞) into three areas identified with 𝐴, 𝐵,and𝐶,respectively.If 4.4. Priority Determination Engine. The PDE discretizes 30% ≤𝐶1, 𝑇𝑒(V2):30% →𝐴. event instance values to generate the signature of priority The third attribute is not in signature vector; this and determine event priority by query rule database, which attribute has no effect on signature generation as line (3) in is represented by a group of Bloom filters. When multiple Algorithm 4. rules match the same event, the engine shall choose the high In this example, the final signature is represented by priority result. ⟨ETID0001, DISC01, 𝐵, 𝐴⟩ as the format shown in Table 1. Once the event signature is generated as shown in Figure 4, 4.4.1. Event Priority Signature Generation in Access Brokers. the access broker sends the event signature to PDE service The generation of event priority signature is based on the for priority determination. same priority signature vector and corresponding discretizer. The interaction procedure between broker node and PDE 4.4.2. Query Bloom Filter with Signature. Based on hash service is shown in Figure 4. computations on event instance signature string, PDE queries Consider signature and discretizer as follows: theBF-basedruleDBtodeterminetheeventpriority.PDE 𝑉 =⟨𝑎,𝑎 ⟩ returns the priority flag to the access broker. sig 1 2 ; 𝑎1 ∈𝑆𝑎 = {𝐴, 𝐵, 𝐶,; 𝐷,𝐸} 𝑎2 ∈(−∞,+∞); 1 4.4.3. Caching Query Result in Access Brokers. Since a large 𝑆𝑎 = {𝐴, 𝐵, 𝐶}; 2 amount of event instances may share the same signature, the 𝐴 = (−∞,1 𝐶 ], 𝐵=(𝐶1,𝐶2],and𝐶=(𝐶2,∞). roundtriptimeinthenetworkmaybesavedbycaching While the access broker receives a published event, the the hot signatures in local broker. The main memory access broker need generates the event signature. The signature time is typically less than 100 ns. Even the round trip time generation algorithm is shown in Algorithm 4 (line (1)–line inthesamedatacenterisabout500,000ns.Theroundtrip (7)). The signature is initialized in line (1). Assume that event time in wide area network may be over 100 ms, which is type ID is “ETID0001” and discretizer ID is “DISC01,” the about 6 orders of magnitude of main memory reference time. signature is represented as ⟨ETID0001, DISC01⟩. Thesavedtimeonnetworkroundtripmayspeedupthe determination of event priority significantly. Assume that event instance ⟨V1, V2, V3⟩ is ⟨B,30%, timestamp⟩.Wetraverseallattributevaluesineventinstance to transform event attribute value into discrete id. 4.5. Discussion on Discretization. The discretization can be For discrete attribute, the discretizer does nothing by flexibly defined by applications per business requirements. default. In this example, 𝑇𝑒(V1):𝐵 →.Ifapplication 𝐵 The basic principle is false positive. International Journal of Distributed Sensor Networks 9

Input event instance ⟨V1, V2,...,V𝑛⟩, Output event priority flag 𝑘 (1) Initialize signature with event type ID and discretizer ID (2) for all attibute value V𝑖 in event instance do (3) if this attribute is in SignatureVector then (4) 𝑇𝑒(V𝑖):V𝑖 →𝑖𝑑:tranform V𝑖 as id of discretizer (5) add id into signature (6) end if (7) end for (8) Query BF-based rule DB with signature to determine the event priority

Algorithm 4: Event priority query algorithm.

Input attribute value of event instance V𝑖 Output id (1) if this attribute is continous type then (2) traverse discretizer ⟨𝑖𝑑, ⟨𝑙, 𝑟⟩⟩ to locate id (3) end if (4) if this attribute is discrete type then (5) traverse discretizer ⟨𝑖𝑑, 𝑠𝑒𝑡⟨int⟩⟩ to locate id (6) end if

Algorithm 5: Transform event attribute value into discrete id: 𝑇𝑒(V𝑖):V𝑖 →𝑖𝑑.

False Positive.Fornumericvalueattribute𝑎,thecorrespond- 4.6.1. Online Query Performance. The computation is broken ing discretization set is defined as 𝑆𝑎 = {𝐴, 𝐵, 𝐶},where into two parts as shown in Algorithm 4. 𝐴 = (−∞,1 𝐶 ], 𝐵=(𝐶1,𝐶2],and𝐶=(𝐶2,∞).TheBoolean The first part is signature generation. The computation predicate 𝑝𝑗 =𝑎𝑖 ≤𝐶,where𝐶1 <𝐶<𝐶2.Byfalse-positive complexity depends on two system parameters: the size of principle, 𝑝𝑗 represented by rule instance set shall be {𝐴, 𝐵}, the priority signature vector and corresponding attribute not {𝐴}. discretizer. Assume that the priority signature vector is ,𝑎 ,...,𝑎⟩ 𝐷 𝑖= The definition of computation granularity on specific ⟨𝑎1 2 𝑠 and corresponding discretizer is 𝑖 ( 1, 2, . . . 𝑠 𝑒=⟨𝑒,𝑒 ,...,𝑒 ⟩ attribute 𝑎𝑖 decides the cardinality of corresponding set 𝑆𝑎 ). For an incoming event 1 2 𝑛 ,the 𝑖 ,𝑒 ,...,𝑒 ⟩ according to application requirement. priority signature vector is ⟨𝑒1 2 𝑠 . 𝐷 For discrete attributes, the discretizer is optional. It means The discretization result of 𝑖 function belongs to one set, whose size is 𝑁𝑖 =|𝐷𝑖|. Therefore, the computation that the discretizer can be composed of dummy (do nothing) ∑𝑠 𝑁 𝑁 functions. It is up to application requirements. If the original complexity is 𝑖=1 𝑖,where 𝑖 is constant parameter pre- defined by domain knowledge. For given domain problem, granularity of attribute value set is too fine, applications can ∑𝑠 𝑁 plug in a customized discretizer to achieve proper granularity. 𝑖=1 𝑖 is constant. For example, human body temperature set is {Low, Normal, Low Fever, Medium Fever, High Fever}. 𝑂(1) Performance.Thetraverseofcontinuousdiscretizercanbe Therefore, the first stage computation complexity is and improved by binary tree search. As it is trivial, we do not is independent of the number of rules in the system. discuss it in detail. The second stage computation is query on rule set Bloom The traverse of discrete discretizer can be avoided in most filters. The query computation complexity is 𝑚∗𝑘; 𝑚 denotes cases since there is no discretizer for discrete attribute by the number of priorities predefined by rule set and 𝑘 is the default. The employment of discrete discretizer can reduce parameter of Bloom filters. Since 𝑚 and 𝑘 are both constant the rule instance space size at the cost of computation efforts numbers for given rule set, the second stage computation in Algorithms 3 and 5, which increase the computation time complexity is 𝑂(1) and is independent of the number of rules of signature generation procedure. in the system. Therefore, the computation complexity of online query is 4.6. Analysis on System Performance. System performance 𝑂(1) and is independent of the number of rules in the system. analysis is divided by online query (interactions between The computation of signature generation depends on access broker and PDE) and offline rule instance summary the size of the priority signature vector and corresponding building (RIE module). attribute discretizer. Since these discretizers can work in 10 International Journal of Distributed Sensor Networks parallel, the speed of signature generation depends on the Table2:Workloaddistributionimpacts. slowest discretizer. It would not be the bottleneck in practice. In PDE, the main part of query computation time is two- (a) Matching time variance in SF algorithm on different workload distribu- tion (Unit: ms) hash function computation of the signature string [31]. Tokeepthecachefresh,theupdateonruleinstances Rule set size Uniform Zipf Variance shall be notified to access brokers. The cache management 100 K 245.37 375.62 53.08% procedure has no impact on the online query speed. 300 K 734.21 1089.25 48.36% 500 K 1226.42 1884.68 53.67% 4.6.2. Offline Building and Maintenance of Rule Instance 700 K 1716.16 2543.11 48.19% Database Based on Bloom Filters. Although offline work is 900 K 2211.40 3269.20 47.83% not time sensitive, we also need to evaluate the efforts on 1 M 2464.45 3778.07 53.30% rule instance database building. We want to know how to minimize the efforts on building instance database. (b) Matching time variance in SI algorithm on different workload distribu- Thebasicideaofruleinstantiationprocessispresentedin tion (Unit: ms), raw data Algorithm 2. Rule set size Uniform Zipf Variance The upper bound of rule instance set size is the cardinality 100 K 0.1133 0.1133 0.00% of rule instance space set. The applications shall choose pri- 300 K 0.1099 0.1099 0.00% ority signature vector to make the size m as small as possible. 500 K 0.1141 0.1094 −4.12% The attribute discretizer shall choose proper computation 700 K 0.1140 0.1109 −2.72% granularity to make the size of 𝑆𝑎 (1 ≤ 𝑖 ≤ 𝑚) as small as 𝑖 − possible. These efforts can reduce the size of instance space. 900 K 0.1125 0.1078 4.18% − The computation time of Bloom filter programming proce- 1 M 0.1125 0.1063 5.51% dure is 𝑂(|𝑆𝑅|). The application can dynamically adjust these (c) Matching time variance in SI algorithm on different workload distribu- parameters to improve the efficiency of offline computation. tion (Unit: ms) Minimizingtheofflinecomputationatmiddlewarelayer Rule set size Uniform Zipf Variance is the subject of ongoing work. A more efficient implemen- 100 K 0.11 0.11 0.00% tation requires further exploration. The goal is to reduce rule instance space size dramatically without introducing 300 K 0.11 0.11 0.00% significant impact on online query performance. 500 K 0.11 0.11 0.00% For rule maintenance efficiency, the delta rule change 700 K 0.11 0.11 0.00% shall be processed efficiently. The cache shall be managed 900 K 0.11 0.11 0.00% efficiently. These works will be addressed by future works. 1 M 0.11 0.11 0.00%

5. Evaluations distribution, and matching rate of event data set. Then, we In this section, we evaluate the query performance and scal- evaluate the false-positive issue in SI algorithm. ability of summary instance (SI) approach with simulations. The experiments were run on an Intel Xeon Dual-core E5645 Workload Size. We evaluate the impacts of workload size on 2.4 GHz machine with 8 GB of memory, of which 6 GB is the matching algorithms. Figure 5 illustrates the comparison allocated to the JVM. results for SF and SI algorithms under varying rule set size. The rule set size varies from 100 K to 1 M. The matching time of SF algorithm increases linearly with the workload 5.1. Data Set. To evaluate the performance of the summery sizeasshowninFigures5(a) and 5(b). The matching time instance based priority determination engine, we generate of SI algorithm is nearly constant as shown in Figures rule set with Boolean expressions ranging from 100 K to 5(a) and 5(b). SI algorithm illustrates impressive scalable 1000 K. Lacking the benchmarks and real application data, the performance. SF algorithm performance will degrade with rule data set and event data set were generated by a workload workload increases. The simulation results are consistent with generator which produces the data randomly by selecting our theoretical analysis. values from given value ranges. The value ranges can be specified in the configuration of data generator application. Workload Distribution.Theeffectsofworkloaddistribution are shown in Table 2 by comparing the performance of 5.2. Matching Algorithm. The brutal-force approach is an event matching under uniform distribution workload and exhaustive algorithm that scans and evaluates all BEs one Zipf distribution workload. The SF algorithm is sensitive to by one for each assignment. We call this approach SF in the workload distribution in data set. From experiment results in following experiments. We compare our approach SI with SF Table 2(a), the Zipf distribution workload introduces about approach in the following experiments. 50% matching time increases in SF matching algorithm compared with uniform distribution workload. The SI algo- 5.3. Experiment Results. In this section, we explore the rithm is robust with the workload distribution. There are impacts on matching time from workload size, workload no significant matching time increases in different workload International Journal of Distributed Sensor Networks 11

3000.00 4000.00

2500.00 3000.00 2000.00

1500.00 2000.00

1000.00 1000.00 500.00 Matching time/event (ms) time/event Matching Matching time/event (ms) time/event Matching 0.00 0.00 100 K 300 K 500 K 700 K 900 K 1 M 100 K 300 K 500 K 700 K 900 K 1 M Varying number of Boolean expressions Varying number of Boolean expressions SF SF SI SI (a) Uniform: work load size (b) Zipf: work load size

Figure 5: Varying workload size.

1200.00 1600.00 1400.00 1000.00 1200.00 800.00 1000.00 600.00 800.00 600.00 400.00 400.00 200.00 Matching time/event (ms) time/event Matching

Matching time/event (ms) time/event Matching 200.00 0.00 0.00 10 30 50 70 90 10 30 50 70 90 Varying matching rate of event set (%) Varying matching rate of event set (%) SF SF SI SI (a) Uniform: matching rate of event set (b) Zipf: matching rate of event set

Figure 6: Varying matching rate of event set.

distribution. Since the time precision of the computer system We can see that the performance of SI approach is robust is 100 milliseconds and the size of event data set is 10,000, with varying matching rates with different workloads. The the precision of matching time per event is about 0.01 experiment results under uniform workload are shown in milliseconds. The raw performance data of SI algorithm are Figure 6(a). The experiment results under Zipf workload are illustrated in Table 2(b). The variance can be ignored consid- shown in Figure 6(b). The matching time is nearly constant ering the time precession in our experimental environment. under varying matching rates and different workloads. The final results are shown in Table 2(c). The variance of performance is nearly zero. False-Positive Issue Evaluation. An important property of SI algorithm is the false-positive rate. We explore the false- Event Set Matching Rate. We consider the effects of matching positive issue in this experiment. rate of event data set. If one event instance does not match any There are two kinds of false-positive sources: Bloom filter rule in rule set, the SF algorithm needs to go through all rules query process and discretization process. The discretization intheruleset.Fromintuition,theaverageeventmatching process is defined by applications and can be adjusted at time will increase if matching rate in event data set decreases. application layer. This paper focuses on platform layer. The From Figure 6,wecanseethattheperformanceofSF discretizer design and optimization is out of the scope of algorithm is sensitive to the matching rate of event set. As this paper. An automatic adaptive mechanism is promising to the matching rate of event set increases, the average matching optimize the false-positive rate and computation efforts. This time per event decreases. The matching time decrease linearly optimization issue is out of the scope of this paper. We need with the matching rate of event data set. to address this issue in an independent paper. 12 International Journal of Distributed Sensor Networks

Table 3: False-positive rate evaluation in SI algorithm. significant scalability with workload size and stable perfor- mance with different workload distribution and various event BF-FPR Matched Unmatched SI result FPR data sets with varying event matching rates. In addition, it 0.1% 2000 8000 2000 0.00% also illustrates acceptable false-positive rate. Therefore, it is 1% 2000 8000 2005 0.06% a suitable approach providing scalable and robust priority 10% 2000 8000 2499 6.24% determination service. 20% 2000 8000 3563 19.54% 30% 2000 8000 4344 29.30% 6. Conclusion 40% 2000 8000 4644 33.05% 50% 2000 8000 5878 48.48% Information representation and query processing are two False positive rate in SI algorithm with different Bloom filter parameters. core problems of event-based distributed systems such as VANETs. In design problem of event priority rule matching engine, the two core problems are the rule representation and event instance priority determination. Rule representation We set up controlled experiments to evaluate the impacts means organizing rule policy information according to some of Bloom filter configuration on false-positive issue. We also format and mechanism, making information operable by verify that no false negative happened to support the theory the corresponding method. Query processing means making analysis results. decisions about whether an event instance with a given The test data set are designed as follows. The false positive attribute value belongs to a given set. of discretization process can be avoided by generating event To speed up the online query in distributed event-based data set and rule data set from predefined ranges based on system, we introduce the rule storage schema based on definition of discretizers. rule instantiation method with Bloom filter technique. This Weuseasimpleexampletoillustratedatasetconstruction approach leverages offline efforts to increase the online query principles. The attribute discretizer are defined as 𝐴= speed. This paper draws a fundamental framework for this (−∞, 1000], 𝐵 = (1000, 2000],and𝐶 = (2000, ∞).The approach. 𝑎< rules Const and Const can be randomly selected from The key features of our approach are the following: [900, 1000]. The discretization results of rule 𝑎

Acknowledgments [13] J. Owen, “World’s fastest rules engine,” September 2010, http://www.javaworld.com/javaworld/jw-09-2010/100920-rete- We express our thanks to anonymous reviewers who nt.html. checked our paper for their insightful and constructive [14] http://www.pst.com/reteii2.html. comments. This work was supported by National Grand [15] S. Whang, C. Brower, J. Shanmugasundaram et al., “Indexing Fundamental Research 973 Program of China under Grant boolean expressions,” in Proceedings of the 35th International no. 2013CB329605; National Natural Science Foundation Conference on Very Large Data Bases (VLDB ’09), Lyon, France, of China under Grant no. 91124002; Chinese Universities August 2009. Scientific Fund (BUPT2014RC0701); Transformation Project [16] M. Sadoghi and H.-A. Jacobsen, “BE-Tree: an index structure of Scientific and Technological Achievements in Henan to efficiently match Boolean expressions over high-dimensional Province (2014) no. 142201210009; Key Project of Science and discrete space,”in Proceedings of the International Conference on Technology in Henan Province (2014) no. 144300510001. Management of Data (SIGMOD ’11),pp.637–648,ACM,June 2011. [17] M. Sadoghi and H.-A. Jacobsen, “Relevance matters: capi- References talizing on less (Top-k matching in publish/subscribe),” in Proceedings of the IEEE 28th International Conference on Data [1] G. Cugola and A. Margara, “Processing flows of information: Engineering (ICDE ’12), pp. 786–797, IEEE, Washington, DC, from data stream to complex event processing,” ACM Comput- USA, April 2012. ing Surveys,vol.44,no.3,pp.15–84,2012. [18] A. Machanavajjhala, E. Vee, M. Garofalakis, and J. Shanmuga- [2]R.Shi,F.Liu,Y.Zhang,B.Cheng,andJ.Chen,“AnMID- sundaram, “Scalable ranked publish/subscribe,” Proceedings of based load balancing approach for topic-based pub-sub overlay the VLDB Endowment,vol.1,no.1,pp.451–462,2008. construction,” Tsinghua Science and Technology,vol.16,no.6, [19] P. T. Eugster, P. A. Felber, R. Guerraoui, and A.-M. Kermarrec, pp.589–600,2011. “The many faces of publish/subscribe,” ACM Computing Sur- [3] A. Hinze, K. Sachs, and A. Buchmann, “Event-based applica- veys, vol. 35, no. 2, pp. 114–131, 2003. tions and enabling technologies,” in Proceedings of the 3rd ACM [20] B. F. Cooper, R. Ramakrishnan, U. Srivastava et al., “PNUTS: International Conference on Distributed Event-Based Systems yahoo!’s hosted data serving platform,” Proceedings of the VLDB (DEBS ’09), Nashville, Tenn, USA, July 2009. Endowment,vol.1,no.2,pp.1277–1288,2008. [4]A.Schroter,G.Muhl,S.Kounev,H.Parzyjegla,andJ.Richling, [21] R. Baldoni and A. Virgillito, “Distributed event routing in “Stochastic performance analysis and capacity planning of publish/subscribe communication systems: a survey,” Tech. publish/subscribe systems,” in Proceedings of the 4th ACM Rep.,DIS,UniversitadiRomaLaSapienza,2005. International Conference on Distributed Event-Based Systems, [22] S. Kounev, J. Bacon, K. Sachs, and A. Buchmann, “A methodol- pp. 258–269, ACM, 2010. ogy for performance modeling of distributed event-based sys- [5] http://en.wikipedia.org/wiki/Rete algorithm. tems,” in Proceedingsofthe11thIEEEInternationalSymposium [6]R.Shi,Y.Zhang,J.Chen,B.Cheng,X.Qiao,andB.Wu,“Sum- on Object Oriented Real-Time Distributed Computing (ISORC mary instance: scalable event priority determination engine for ’08), pp. 13–22, IEEE, 2008. large scale distributed event-based system,”in Proceedings of the [23] S. Tian, G. Weber, and C. Lutteroth, “A tuplespace event model IEEE 9th International Conference on Services Computing (SCC for mashups,” in Proceedings of the 23rd Australian Computer- ’12), pp. 400–406, IEEE, Honolulu, Hawaii, USA, June 2012. Human Interaction Conference (OzCHI ’11),pp.281–290,ACM, December 2011. [7] D. Zats, T. Das, P. Mohan, D. Borthakur, and R. Katz, “DeTail: reducing the flow completion time tail in datacenter networks,” [24] T. Pongthawornkamol, K. Nahrstedt, and G. Wang, “Proba- in Proceedings of the Conference Applications, Technologies, bilistic QoS modeling for reliability/timeliness prediction in Architectures, and Protocols for Computer Communication (SIG- distributed content-based publish/subscribe systems over best- COMM ’12), pp. 139–150, ACM, August 2012. effort networks,” in Proceedings of the 7th IEEE/ACM Interna- tional Conference on Autonomic Computing,pp.185–194,ACM, [8] B. Vamanan, J. Hasan, and T. N. Vijaykumar, “Deadline-aware Washington, DC, USA, June 2010. datacenter tcp (D2TCP),”in Proceedings of the ACM Conference [25] B. Bloom, “Space/time trade-offs in hash coding with allowable on Applications, Technologies, Architectures, and Protocols for errors,” Communications of the ACM,vol.13,no.7,pp.422–426, Computer Communication (SIGCOMM ’12),pp.115–126,ACM, 1970. 2012. [26] A. Broder and M. Mitzenmacher, “Network applications of [9] R. Kohavi and R. Longbotham, “Online experiments: lessons bloom filters: a survey,” Internet Mathematics,vol.1,no.4,pp. learned,” Computer,vol.40,no.9,pp.103–105,2007. 485–509, 2004. [10]C.Wilson,H.Ballani,T.Karagiannis,andA.Rowtron,“Better [27] S. Dharmapurikar, P. Krishnamurthy, T. Sproull, and J. Lock- never than late: meeting deadlines in datacenter networks,” in wood, “Deep packet inspection using parallel bloom filters,” in ProceedingsoftheACMSIGCOMMConference(SIGCOMM’11), Proceedings of the 11th IEEE Symposium on High Performance pp. 50–61, 2011. Interconnects,pp.44–51,2003. [11] R.-S. Shi, Y.Zhang, J.-L. Chen et al., “Publish/subscribe network [28] L. Fan, P. Cao, J. Almeida, and A. Z. Broder, “Summary cache: service infrastructure design for EDSOA service platform,” ascalablewide-areaWebcachesharingprotocol,”IEEE/ACM Computer Integrated Manufacturing Systems,vol.18,no.8,pp. Transactions on Networking,vol.8,no.3,pp.281–293,2000. 1659–1666, 2012. [29] D. Guo, J. Wu, H. Chen, and X. Luo, “Theory and network [12] C. L. Forgy, “Rete: a fast algorithm for the many pattern/many applications of dynamic bloom filters,”in Proceedings of the 25th object pattern match problem,” Artificial Intelligence,vol.19,no. IEEE Conference on Computer Communications (INFOCOM 1,pp.17–37,1982. ’06),vol.1,April2006. 14 International Journal of Distributed Sensor Networks

[30] K. Xie, Y. Min, D. Zhang, J. Wen, and G. Xie, “A scalable bloom filter for membership queries,”in Proceedings of the IEEE Global Telecommunications Conference (GLOBECOM ’07),pp.543– 547, Washington, DC, USA, November 2007. [31] A. Kirsch and M. Mitzenmacher, “Less hashing, same perfor- mance: building a better bloom filter,” in Proceedings of the 14th Annual European Symposium on Algorithms,pp.456–467,2006. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 273825, 14 pages http://dx.doi.org/10.1155/2015/273825

Research Article Multitasking Planning and Executing of Intelligent Vehicles for Restaurant Service by Networking

Jun Zhang,1,2,3 Zhixian Chen,1,2,3 Ying Hu,1,2 Jianwei Zhang,4 Zhenhua Luo,1,2,5 and Xuehui Dong1,2,5

1 Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Xueyuan Avenue 1068, Shenzhen University Town, Shenzhen 518055, China 2The Chinese University of Hong Kong, Shatin, Hong Kong 3Shenzhen College of Advanced Technology, University of Chinese Academy of Sciences, Xueyuan Avenue 1068, Shenzhen University Town, Shenzhen 518055, China 4TAMS, University of Hamburg, Vogt-Kolln-Straße¨ 30, 22527 Hamburg, Germany 5Shenzhen Graduate School, Institutes of Technology, HIT Campus, Shenzhen University Town, Shenzhen 518055, China

Correspondence should be addressed to Ying Hu; [email protected] and Jianwei Zhang; [email protected]

Received 19 December 2014; Accepted 2 March 2015

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Jun Zhang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Indoor intelligent vehicles have been applied widely in restaurant service, where they are usually demanded to work for long period for multiple tasks and face the challenges of uncertainty, efficiency, and working online. In this paper, we propose an approach of multitasking planning and executing by networking for intelligent vehicles working for restaurant service. As to increase the efficiency of accomplishing multiple tasks, traditional HTN model is adapted to present the property of executing in parallel forthe plan. As working online, the new inserted task is decomposed to get its individual plan, which is then merged into the global plan by optimization modelled as a maximal weight clique problem through evaluating the relations among actions and optimizing based on maximal cost saving first. Additionally, the protected states and goal states of an action are monitored in execution monitoring while action executing. Once exception occurs, the replanning based on partially backtracking would repair it. Moreover, with the mechanism of cooperation by networking, vehicles can allocate tasks, share information, and cooperate for execution monitoring. Finally, the test and demonstration of the experiment for drink service in restaurant environment show the feasibility and the improvement on the efficiency of multitasking.

1. Introduction networking as multiagent system with heterogeneity, where each of them can work as an individual equipped with Today, indoor intelligent vehicles, sometimes also, namely, different capability for different job with others, and share , have been applied more and more widely not only in information with each other via network communication. logistics warehouses [1],butalsoinotherpublicareas,that Additionally, the working environments are usually uncon- is, restaurant [2–4], official building5 [ ], and hospitals [6], for structed and dynamic in these domains; in this condition, delivery, surveillance, and information inquiry. Particularly planning and executing for multitasking of the vehicles turns in restaurant domains, shown in Figure 1,thevehiclesare tobetoocomplexunderuncertainty.Andtherearetwo always demanded to deal with multitask in a long period, challenges to be taken up. wheremultipletasksareperformedconcurrentlyandeffi- One is that the vehicles have to plan multiple tasks ciently. in the world with partially observable information. In an Since the tasks may be too complex and the scale of the unconstructed and dynamic world, the vehicles may hardly world is too large [7, 8], they may also work by distributed acquire complete information required for tasks planning 2 International Journal of Distributed Sensor Networks

inference, then the simplified way is to make the uncertainty under the monitoring of sensors. Thanks to the development of the sensor networking, sensor communication technology has been employed for intelligent vehicles. In [21–23], the authors provided the low-cost solutions for indoor localization, especially for colocalization in a networking environment. In these studies, sensor networking plays an efficient role in extending the reachability and enhancing the robustness of the vehicles. However, in these methods, the sensor network has to be built Figure 1: Intelligent vehicle serving in restaurant. by deploying the sensors distributed in the work environment which would be a tough work in an unconstructed world. Instead of building a distributed sensor network in the with its own sensors; for example, to deliver a specified environment, cooperating in multiagent system provides an object, the location of the target object may be unknown alternativeviewtoplanunderuncertainty.Micalizioand sinceitisnotinsidethesearchingrangeorhasbeenmoved. Torasso presented a distributed approach for monitoring and Unfortunately, some unreachable information may be the key diagnosing the execution of a multiagent plan in partially for the planning, and the planner cannot get a feasible and observable environment [24]. However, the approach mostly efficient plan for the task without it. aimed at recovering the exception of plan execution rather Another challenge is that the vehicles have to plan and than preventing the failure of planning. execute online in dynamic world. In the real application, for In this paper, aiming for multitasking problem of intelli- example, restaurant, the tasks for the vehicles normally can- gent vehicles in restaurant environment, it is assumed that the not be preset in advance, and they may come stochastically at vehicles can share information in a multiple vehicles network any time. When a new task comes, the vehicle may be working with heterogeneity, and the main idea is to handle the for other tasks; at this time, the new task has to be inserted uncertainty and planning online through the cooperation of into the current task list and treated properly to get a more networking. Based on this idea, we propose a novel approach efficient plan rather than waits until the current tasks are to enhance the robustness and improve the efficiency of finished. Additionally, since the states of world may change multitasking by integrating multitasking planning, executing, dynamically by external events, exception may rise and lead and networking. The features of the approach and our to failure of the task when executing the plan. To recover the contributions are summarized as the following: failure, vehicles usually have to reconfigure its status, make a (i) extending the model of HTN planning for multi- new plan, and maintain it online. tasking planning under uncertainty and adapting the In the literatures, many studies have put their effect to decomposing algorithm for the extended model, rise to the challenges. On the one side, to figure out the uncertainty, previous works have shown their methods in (ii) developing the optimizer for parallelizing plans for information gathering, planning with incomplete informa- multiple tasks, in which the actions optimization is tion [9, 10]. Moreover, Markov decision processes (MDP) modelled as a maximum weighted clique problem by [11] and its expansion partially observable MDP (POMDP) evaluating the relations among actions and searching [12, 13]areappliedtopredictthestatesoftheworldandmake theactioncliquewithmaximalcostsaving, decision during planning. In [14], Kaelbling and Lozano- (iii) Presenting the method for integrating executing, Perez´ described an integrated strategy for task and motion monitoring, and replanning in dynamic environ- planning based on planning in belief space and showed ment, with which the execution can be monitored its robustness and flexibility in the mobile manipulation with the protected states, which must be kept from problems with substantial uncertainty. On the other side, for changing during the action execution, and goal states. planning and executing online, the methods of execution In addition, the algorithm of replanning based on monitoring and replanning have been developed in [15, 16]. partially backtracking is developed. As an alternative view, continuous planning [17] provides a The paper is structured as follows: Section 2 introduces practical approach to planning online in dynamic world [18]. the overall approach. In Section 3,taskdecomposingis In [19, 20], an approach based on continual planning was introduced.FollowedwithSection4, the optimization for proposed to enable the agents planning and acting in dynamic plan parallelizing is presented. After that, in Section 5,the environment, where the concept of assertions is introduced method for plan executing and monitoring is introduced. At todescribewhyandwhenanagentshouldswitchbetween last but not least, the experiments for restaurant service are planning and acting. demonstrated and the result is discussed in Section 6 and the Indeed, probability theory minimizes the uncertainty of conclusion and future work are summarized in Section 7. the world, and the mechanism of both execution monitoring and continual planning guarantees the achievement of the 2. Overall Approach task.However,theprobabilityapproachesarewithhigh computational cost. In an alternative opinion, if the future 2.1. Control Architecture. The design of the control architec- always cannot be predicted precisely by applying probability ture for intelligent vehicles networking has a very important International Journal of Distributed Sensor Networks 3 impact on the robustness of the system, and several different architectures have been described in [25]. However, different from most traditional multiagent systems, in this study, each vehicle in the network is supposed to be responsible Network for particular tasks and equipped with specified capabilities Menu service Surveillance different from others. At the meantime, each vehicle is expected to have more authorization of local control so that Networking interface new team members are facilitated to join in network. For Task service State service example, in an automated restaurant, there are two vehicles or tn+1 more; particularly, one is a waiter working for menu service, Task another one is for delivering food and clearing tables, and decomposing if there are others, they may provide reception service, or Replanning even others. Each vehicle may take on responsibility for Plan different jobs in serving for guests and work as individual parallelizing with high autonomy, as well as communicating with others Successful when necessary. Action Execution To realize both robustness and flexibility of the system, executing monitoring as a hybrid architecture, the distributed architecture Delivery service (DIRA) [26] is adapted to our system. Besides allowing Controllers Sensors autonomy in individual, the DIRA also facilitates explicit coordination among robots and employs the layered archi- Figure 2: The control architecture. tectures which are popular with single vehicle systems. Based on DIRA, the control architecture is shown in Figure 2. In this architecture, intelligent vehicles connected in net- work can interact with each other via their own networking In execution monitoring (EM) phase, the protected states interface, with which cooperation requests are published and and goal states will be monitored on semantic level with subscribed, and each vehicle has a complete layered archi- the sensors. Likewise, those states are also published to tecture with a loop of planning, executing, and monitoring the state service, so that other vehicles can cooperate for on task level (see in the blue dashed line). Taking the vehicle monitoring them. If there is no destroyed protected state and for delivery service as an example, the vehicle works online all goal states of an action are achieved, the action execution and waits for recalling. Once a new task is generated by task is successful and PE is recalled to execute next actions. service and inserted to task list, five processing phases are Otherwise, if either any protected state is destroyed, or the involved to accomplish it. goal states cannot be achieved in regular time, the execution In task decomposing (TD) phase, the initial states will be fails and the replanning tries to repair it. As to increase the checked whether there is complete information for planning. efficiency for replanning, a partially backtracking algorithm Due to the partially observability of the world, information is applied to minimize the cost of replanning. may be incomplete and undetermined. In this case, the vehi- Furthermore, the controllers and the sensors together clehandsoutarequestofstateacquisitiontotheinterface, constitute a route of reactive control for action execution in where the request is published to the network. Then, the behavior layer. The controllers include the mobile control, undetermined states would be acquired by the cooperation robot arm control, and pan-unit control, while the sensors fromothervehicles.Iftheknownstatesaresufficientfor include the laser, binocular vision, camera, and gyroscope. planning, TD is recalled to decompose the inserted task by And the geometric planners, including motion planning and using hierarchical task net (HTN) and its individual plan is path planning, are supposed to be implemented in behavior obtained. layer. In plan parallelizing (PP) phase, the individual plan of the inserted task is merged into the global plan for all processing 2.2. Cooperating by Networking. The cooperation among tasks, and the actions from each individual plans will be intelligent vehicles by networking includes two capacities: paralleled for multitasking. However, plan parallelizing will taskserviceandstateservice,asshowninFigure2.There,task process only one layer each time and generate a combined service allocates the tasks for the vehicles in network, while action. Only if the combined action is successfully executed thestateserviceprovidesthesharingstatesandpublishesthe ornewtaskisinserted,theparallelizationwillgoaheadto request of state acquiring and monitoring. next layer. This will save the computation consumption and For long term service, the vehicles in a restaurant have to increase the real-time performance. work online. Through task service, a vehicle can publish new In plan executing (PE) phase, the combined action in the tasks to other vehicles as well as receiving new tasks published global plan will be performed in parallel, where the actions from others. For example, when the vehicle for menu service are transformed into executing commands and sent to the gets an order from guest, then it will publish a new task to controllers;atthesametime,theprotectedstatesandthegoal task service, and others will receive and check whether the states are delivered to the execution monitoring. new task is suited for performing. If the new task is suited for 4 International Journal of Distributed Sensor Networks a vehicle, it will be inserted to the task list of this vehicle, and Definition 3 (operator). An operator 𝑜 is a 5-tuple others will ignore it. 𝑜= ( (𝑜) , (𝑜) , (𝑜) , (𝑜) , On the other hand, as discussed previously, the world name precond add delete the vehicles are working in is usually under uncertainty (1) protected (𝑜)), and dynamic, so that the information for TD and EM is often incomplete for individual vehicle. To handle this in which name(𝑜),precond(𝑜),add(𝑜),delete(𝑜),and problem, the state service enables the cooperation among the protected(𝑜) are, respectively, the set of the name, precondi- vehicles in network to share new states and publish request tions, positive effects, negative effects, and protected states. of state acquiring. On one side, in TD, before the task is decomposed, the current states have to be checked whether As the introduction of what should be monitored during they are sufficient to decompose the task; if there is lack action execution, the protected(𝑜) describes the states that of information, the request of acquiring this information is have to be protected and cannot be changed while executing published to state service and others can help to complete the action. In Box 1, an example of operator (!move base, this information; once the information is obtained, it will be ?from, ?to) is given. There, the head contains the name shared to state service, and the vehicle that needs it will be !move base and parameters “?from”and“?to”whichiswith able to continue working. On the other side, in EM, during a question symbol to distinguish from instance. The other execution monitoring, the protected states and goal states elements of operator are listed follow the head, particularly, the protected states (available, ?to)and(passable, ?from, ?to) have to be monitored online. For an individual vehicle, to indicate that to guarantee the execution of (!move base, ?from, monitor the change of the environment and execute an action ?to), the target location ?to mustbeavailableandtheway at the same time, sometimes, it is tough and inefficient. In this between ?from and ?to must be passable during the execution. situation, with the state service, other vehicles can be involved to monitor these states. Definition 4 (method). A method 𝑚 is a 4-tuple 𝑚=( (𝑚) , (𝑚) , (𝑚) , (𝑚)), 2.3. Action Knowledge of Restaurant Domain. To model the name task precond subtask (2) domain of restaurant service, the HTN model [11] is expanded in which name(𝑚) is the name of the method, task(𝑚) is the andtheSHOP2syntax[27] is employed to described the generalization of nonprimitive task, precond(𝑚) is a set of knowledge of the restaurant domain. As one of the most literals for the preconditions of the method, and subtasks(𝑚) famous planning method, HTN model provides a syntax are a set of ordered subtasks of 𝑚. of defining the methods by controlling the decomposing of tasks and avoiding the irrelevant searching branches, and this A method describes the prescription of decomposing a speedsupsignificantlythetaskdecomposition[28]. However, nonprimitive task into subtasks. And an example method, for cooperating and monitoring of the execution, the action namely (serve drink, ?drink ?guest),isdefinedinBox2. knowledgeshouldbeabletopresenthowtocooperateand In Figure 3, the plan hierarchy for the task of what to monitor, and it can be formalized as planning domain serve drink(drink1, guest1) is shown, in which 5 methods as follows. and 2 operators are involved. There, the red arrows indicate the executing order for the subtasks in the same layer, and Definition 1 (planning domain). A planning domain 𝐷 is a the grown boxes present the protected states of respective tuple 𝐷 = (𝑆, 𝑂, 𝑀),where𝑆=(𝑠0,𝑠1,𝑠2,...), 𝑂=(𝑜0,𝑜1, primitive action. 𝑜2,...),and𝑀=(𝑚0,𝑚1,𝑚2,...) are the limited sets, respectively, of states, operators, and methods. 3. Task Decomposing Similar with the traditional definition, planning domain 3.1. Problem Modelling. Similar to traditional HTN, a plan- includes the states, operators, and methods. And the three ning problem for multitasking is defined as Definition 5. elements are defined, respectively, as Definitions 2–4. Definition 5 (planning problem). A planning problem 𝑃 is Definition 2 (state). A state 𝑠 is an atomic sentence as the form modelled as a 3-tuple of (predicate, term, etc.) which describes a fact of the world. 𝑃=(𝐷,𝑆0,𝑇), (3) Even though the traditional HTN model is weak for handling uncertainty by assuming the knowledge about in which 𝐷 is the planning domain, 𝑆0 =(𝑠1,𝑠2,...,𝑠𝑛) is a set the working world is complete, we keep this property to of initial states, and 𝑇=(𝑡1,𝑡2,...,𝑡𝑛) is a list of target tasks. guarantee the high performance on planning efficiency and figure out the uncertainty through an exertional modular of A planning problem provides the action knowledge, ini- state acquisition, detailed in the following section. Different tial states, and the target tasks for the planner, and with them, from the belief state, the determined state indicates a fact. the solution will be found, if there is one. In traditional HTN For instance, (at, vehicle1, waypoint1) indicates that a vehicle, planning,thesolutionisdefinedasplan𝜋=⟨𝑎0,𝑎1,𝑎2,...⟩, namely, vehicle1 is at a way point namely waypoint1,and where 𝑎𝑖 is a primitive action and 𝜋 is a sequence of total (vehicle, vehicle1) indicates that vehicle1 is a vehicle. ordered actions. In the definition, the actions in 𝜋 can only be International Journal of Distributed Sensor Networks 5

Serve_drink (drink1, guest1)

Put_drink Get_drink (drink1, table1) (drink1, servicedesk)

Drive_to Drive_to (servicedesk) (table1) !grasp_place !grasp_place (drink1, tray1, table1) (drink1, servicedesk, tray1) Protected Protected (at, table1) Navigate_from_to (at, servicedesk) Navigate_from_to (in, drink, tray1) (stoparea, servicedesk) (available, tray1) (servicedesk, table1) (available, table1) (on, drink, servicedesk)

!move_base Navigate_from_to 2 1 (stoparea, servicedesk) (table , table ) !move_base Protected (servicedesk, table2) (available, servicedesk) !move_base Protected 2 1 (passable, stoparea, (table , table ) (available, table2) servicedesk) Protected (passable, servicedesk, (available, table1) table2) (passable, table2, table1)

Figure 3: Plan hierarchy for serving a drink.

(:operator (!move base, ?from, ?to) (:method (serve drink, ?drink ?guest) ( ; precondition ( ; preconditions ((location, ?from), (location, ?to), (passable, ?from, ?to), (drink, ?drink), (guest, ?guest), (at vehicle, ?from), (available, ?to)) (at, ?guest, ?table1), (on, ?drink, ?table2) ;delete ;subtasks ((at vehicle, ?from), (available, ?to)) (get drink, ?drink, ?table2), (put drink, ?drink, ?table1)] ;add ) ((at vehicle, ?to), (available, ?from)) ;protected ((available, ?to), (passable, ?from, ?to)) Box 2: An example of method. )

Box 1: An example of operator. Definition 7 (plan). A plan is

𝜋=⟨AC1, AC2,...,AC𝑛⟩ , (5) executed one by one corresponding with the orders. However, formultitasking,itcannotrepresentthesituationofexecuting actions in parallel. To provide a plan feasible for multitasking, which is a total ordering sequence of action clique AC𝑖. a concept of action clique and the new definition of plan are A plan is a hybrid construct, in which actions are ordered introduced. intwolayers.Intheplanlayer,theactioncliquesaretotal Definition 6 (action clique). An action clique is a pair ordered;there,anactioncliqueAC𝑖 is available only if the preconditions of all actions inside are satisfied after the performance of AC𝑖−1.However,incliquelayer,actionsare = (𝐴,) 𝐶 , AC (4) partial ordered and can be executed in parallel. In the whole planning process, the plan will appear in two in which 𝐴={𝑎1,𝑎2,...,𝑎𝑖} is a set of actions 𝑎𝑖 partially differentforms;tostoreandreusethem,thetasktreeandplan ordered and 𝐶 is a set of constraints among actions. tree are defined. 6 International Journal of Distributed Sensor Networks

Definition 8 (task tree). A task tree, TaskTree(𝑇𝑖),isahier- 4. Plan Parallelizing archical tree presenting the decomposing architecture of task 4.1. Process of Plan Parallelizing. The objective of PP is to 𝑇𝑖. parallelize all the individual plans for target tasks, so that A task tree shows how a task is decomposed into subtasks the tasks can be executed more efficiently in parallel, and the recursively until the primitive tasks are achieved. There, each processisshowninFigure4,andthesubprocessesarelisted nodestandsfortaskwhichmaybeaprimitivetaskora as follows. nonprimitive task, and the children nodes are its subtasks. Description of the Subprocesses (𝑃) Definition 9 (plan tree). A plan tree, PlanTree ,isareach- 𝑇𝑟1: new task is inserted and decomposed. ability tree representing the action paths to achieve the goals 𝑇𝑟2: the active AC is executed successfully. of the tasks. 𝑇𝑟3:theexecutionfortheactiveACfails.

A plan tree shows how to accomplish the tasks by 𝑇𝑜1:appendthenewplantreetoglobalplantree. executing the plan. In a plan tree, each node is an action or 𝑇𝑜2: activate the next layer of the global plan tree. action clique. Normally, the initial plan tree contains multiple branches, and each branch, from the root to the leaf, is an 𝑇𝑜3: replace the failing branches with repaired plan tree. action path to achieve the goals of respective tasks. Since the 𝑇𝑜4: insert the new AC and delete the actions of AC from plans will be paralleled layer by layer in plans parallelizing, respective branches. the actions distributed in each branch will be insisted into action cliques by optimizing. Finally, if the tree shrinks into a There, PP will be activated by three triggers and its single branch, it is the final plan tree for all tasks. respective operations of plan tree; after activating the new layer, the relations among the actions in active layer, as well as the relations between the actions and the executed AC, 3.2. Algorithm for Task Decomposing. The goal of TD is to areanalyzedinrelationanalyzing.Withtherelations,the generate the individual task tree and the individual plan tree optimization is performed to select actions into new AC, and for the tasks. As initialization, a global task tree rooted as then it will be inserted into the global plan tree by 𝑇𝑜4. “TaskTree” is created to store the task tree for each inde- Inthefollowing,weintroducethedetailsforrelation pendent task, which is attached as the subtree of “TaskTree.” evaluating and actions optimizing. Similarly, a global plan tree rooted as “PlanTree”iscreated, and every plan tree of each independent task will be attached 4.2. Action Relations. As the definition of action clique, the to the current action clique as a new child tree. actions in an action clique must be compatible for execution To plan online, the planner listens to task service and in parallel; hence, the relations among actions must be 𝑡 waits for new task insertion. Once a new task 𝑛 is inserted, evaluated. In literatures, the analyzing technique of action it will be the initial member of tasklist and decomposed relations has been introduced in Graphplan [29]andLCGP independently to get the task tree and plan tree by the [30]; inspired by these works, three relations are defined as function of decompose task(), shown in Algorithm 1. follows. The decompose task() performs a recursive process to decompose the inserted task. At the beginning, the ending Action Relations condition is checked, and once the tasklist is empty, it returns the tasktree and the plantree.Otherwise,theactivetask,which Relation 1 (independence). Consider is always the first element of tasklist,istreatedintwoways. (1) If activetask is an instance of operators, a circle block {del (𝑎𝑖)∩[pre (𝑎𝑗)∪add (𝑎𝑗)]} repeats the acquiring of sharing state and check precondition. (6) There, check precond() checks whether all preconditions of ∪{del (𝑎𝑗)∩[pre (𝑎𝑖)∪add (𝑎𝑖)]}=0. activetask are ready in renewed 𝑆0.Ifnot,itpublishesthe preconditions which are lacking to state service; or else, the preconditions are sufficient; it breaks the circle. And then Relation 2 (allowance). Consider 󸀠 󸀠 𝑆0 is renewed as 𝑆 by applying activetask.Andif𝑆 is not [del (𝑎𝑖)∩pre (𝑎𝑗)] ∪ [add (𝑎𝑖)∩del (𝑎𝑗)] = 0, false, activetask is added to plantree,anddecompose task() 󸀠 (7) is recalled to decompose next task in tasklist under 𝑆 . [pre (𝑎𝑖)∩del (𝑎𝑗)] ∪ [del (𝑎𝑖)∩add (𝑎𝑗)] =0.̸ (2) If activetask is an instance of methods, the function check precond() is implemented as it does in the first con- dition. While the preconditions of activetask are met, the Relation 3 (retraction). Consider subtasks of activetask will be added to the node of activetask as its children and inserted to the front of tasklist after deleting del (𝑎𝑖)=add (𝑎𝑗) or add (𝑎𝑖)=del (𝑎𝑗). (8) activetask from tasklist;afterthat,thedecompose task() is recalled with the new tasklist.Andthisprocesswillbe The relations are defined by the interplay between actions implemented until the ending condition is satisfied. as the equations in Action Relations. As the definition International Journal of Distributed Sensor Networks 7

decompose task(𝑆0, tasklist, tasktree, plantree) if tasklist is empty: return(tasktree, plantree) activetask ← tasklist(0) if activetask is an instance of operator: while 1: get sharing states and renew 𝑆0 check precond(𝑆0, activetask.precond) if there are preconditions not ready: publish the preconditions which are not ready else: break 󸀠 𝑆 ←𝛾(𝑆0, activetask) 󸀠 if 𝑆 is not False: plantree.add child(activetask) tasklist.remove(activetask) 󸀠 tasktree, plantree ← decompose task(𝑆 , tasklist, tasktree, plantree) if activetask is an instance of method: while 1: get sharing states and renew 𝑆0 check precond(𝑆0, activetask.precond) if there are preconditions not ready: publish the preconditions which are not ready else: break subtasks ← method(𝑆0, activetask).subtask tasklist.remove(activetask) tasklist ← insert subtasks in the front of tasklist tasktree.add children(subtasks) tasktree, plantree ← decompose task(𝑆0, tasklist, tasktree, plantree)

Algorithm 1: Decomposing task based on hierarchical decomposing.

restricted than the allowance. Different from the definition Tr1 To1 in LCGP, our definition of allowance is more strongly Relation Actions constrained and divided into two cases: 𝑎𝑖 allows 𝑎𝑗 and 𝑎𝑗 Tr2 To2 optimizing To4 analyzing allows 𝑎𝑖. But in LCGP, the allowance means only 𝑎𝑖 and 𝑎𝑗 Tr3 To3 are with allowance relation, and this definition includes the independence. The advance of our criteria is that the actions with allowance relation are ordered and are more appropriate i Tr Trigger for actions execution. Toi Tree operation There, the independence and allowance relations are Figure 4: Process of plan parallelizing. checked among the actions in the same layer of the plan tree, while the retraction relation is checked between an action in current layer and the actions in the latest action clique. And shown, the relation between actions is dependent on their the respective rules for assembling them in an action clique are listed as follows. precondition resource and output effect. There, 𝑎𝑖 and 𝑎𝑗 are independent with each other while the performance of 𝑎𝑖 does (i) If actions are independent of each other, they can not delete the preconditions and positive effects of 𝑎𝑗,andat be put together in an action clique and executed the meantime, the performance of 𝑎𝑗 does not delete those of simultaneously. 𝑎𝑖 either. And if the performance of 𝑎𝑖 will neither delete the 𝑎𝑗 𝑎𝑗 preconditions of norproducethenegativeeffectsof and, (ii) If two actions 𝑎𝑖 and 𝑎𝑗 are with allowance relation, 𝑎 at the meantime, the performance of 𝑗 will either delete the theycanbeputinthesameactioncliqueandincaseof 𝑎 𝑎 preconditions of 𝑖 or produce the negative effects of 𝑖,we independence relation, but with an allowance order, 𝑎𝑖 𝑎𝑗 say allows . Furthermore, a retraction relation between which indicates that 𝑎𝑖 can be executed before 𝑎𝑗 if 𝑎𝑖 𝑎𝑖 𝑎𝑗 𝑎𝑖 and is met while the positive effects of is equal to the allows 𝑎𝑗. negative effects of 𝑎𝑗,orviceversa. The criteria to justify whether certain actions or tasks are (iii) If there is any action in active layer with a retroaction parallelizable can be summarized as two relations: indepen- relation, it should be excluded from the candidates for dence and allowance. However, the independence is more the optimization. 8 International Journal of Distributed Sensor Networks

Besides, actions are not with any one of above relations; 11, 3 they are mutually exclusive and cannot appear in the same action clique. m21

4, 1 4.3. Optimizing as Maximum Weight Clique Problem. After the preselection by analysing the relations among actions, m25 15 1 6 1 the actions with independence and allowance relations will , , 122 g232 be optimized. And we model the optimization as a MWCP g 7, 2 (maximum weight clique problem) [31, 32], as m24 𝐺=(𝐴, 𝑊,𝐸) , (9) m21: (move_base, table2, table1) m25: (move_base, table2, table5) where m24: (move_base, table2, table4) 122 1 2 2 (i) 𝐴={𝑎1,𝑎2,...,𝑎𝑛} is a set of vertices representing g : (grasp_place, drink , tray , table ) 232 2 3 2 action candidates for action clique, g : (grasp_place, drink , tray , table )

(ii) 𝑊={𝑤𝑎 |𝑎𝑖 ∈𝐴}is a set of combined weights Figure 5: An example graph of MWCP. 𝑤 𝑖 𝑎𝑖 valued with the time cost for the execution of the according action and the number of times that this action has shown in current layer, As the rule of optimization, the selected actions clique (iii) 𝐸={(𝑎𝑖,𝑎𝑗)|𝑎𝑖,𝑎𝑗 ∈𝐴,𝑖=𝑗}̸ is a set of edges of the example in Figure 5 will be AC = {(𝑔122, 𝑔232, connecting the relative actions 𝑎𝑖 and 𝑎𝑗. 𝑚21), independence (𝑔122, 𝑔232) , allowance (𝑔122, 𝑚21), (𝑔232, 𝑚21)} In a MWCP, the vertices are the actions with indepen- allowance . dence relation or allowance relation in the active layer of plan tree. An edge indicates the relation between two connected 5. Plan Executing and Execution Monitoring actions, where an undirected edge presents an independence relation and a directed edge presents an allowance relation. 5.1. Plan Executing. After a planned action clique is generated An example graph of MWCP is shown in Figure 5,where by plan parallelizing, it is executed in PE. As an action clique the vertices are named with actions and their weights are consistedoftheactionsexecutableinparallel,PEshouldplay noted on the nodes. In the example, one independence and tworolesduringtheexecution:(1)tomanageandallocatethe six allowances are included. actions in action clique and (2) to transform the actions into Sincethegoalofoptimizationistofindanactionclique executing command. to reduce the time consumption for multitasking and the Algorithm 2 shows the main algorithm for executing plan. global optimization is always complicated and needs a huge There, PE works online and waits for the trigger until a new consumption of computation, the second best thing is to find AC is generated in PP through wait for ac(). Once an AC is the local optimum. As this, the rule of the optimization is got, the actions in AC will be executed iteratively until it is set as maximal-cost-saving-first compared with the total time empty.SincetheactionsinanACisexecutableinparallelbut cost to execute all actions involved in the action clique one by with allowance constrain, in which an action can only be exe- 𝑛 one, and the formula is as (10),where 𝑎𝑖 is the amount of that cuted immediately when there is no prefix action of it, all the 𝑎𝑖 appearing in the active layer of plan tree, and 𝑊(𝑐𝑥) is the free actions, without prefix action for them, are transformed cost of action clique 𝑐𝑥: to controllers, respectively, by tramsform to control (actioni) at once. At the meantime, their protected states and effected 𝑓 (𝑤 ,𝑐 )= (∑ (𝑤 ∗𝑛 |𝑎 ∈𝑐)−𝑊(𝑐 )) . states, including the positive effect and negative effect, are max 𝑎𝑖 𝑥 max 𝑎𝑖 𝑎𝑖 𝑖 𝑥 𝑥 𝑐𝑥 published to EM by publish to monitor (actioni) and then the (10) free actions will be removed from current AC as well. In tramsform to control (actioni), actioni is transformed However,sinceanactioncliquemaycontainallowance to control function by recalling the respective controller. For relations, the actions in clique have to be sorted by allowance example, an action !move base (Table1, Table2)istomove order. And 𝑊(𝑐𝑥) is equal to the maximum weight for all the vehicle from Table1 to Table2,whereTable1 and Table2 action paths in 𝑐𝑥,shownin will be mapping to the corresponding positions in the map and assigned to the navigation function as its parameters, in 𝑊(𝑐 )= (∑ (𝑤 |𝑎 ∈𝑎𝑝)|𝑎𝑝 ∈𝑐 ). which path planning is called to find a path way and drive the 𝑥 max 𝑎𝑖 𝑖 𝑘 𝑘 𝑥 (11) 𝑎𝑝𝑘 vehicle from the position of Table1 to the position of Table2. Likewise, the protected states of actioni are published to EM, In particular, if there is neither independence nor wheretheywillbemonitored. allowance relation among actions in the active layer, the After transforming the free actions to control, PE will optimization is simplified as wait for the response of EM. Once an action is successfully executed, it is returned as consummator and removed from 𝑓max (𝑤𝑎 ,𝑎𝑖)=max (𝑤𝑎 ∗(𝑛𝑎 −1)|𝑎𝑖 ∈𝐴). (12) 𝑖 𝑖 𝑖 the prefix list of other actions to free them for executing International Journal of Distributed Sensor Networks 9

execute plan() Entrance AC ← wait for ac() while AC is not empty: 3 for each 𝑎𝑐𝑡𝑖𝑜𝑛𝑖 in AC: if prefix of (𝑎𝑐𝑡𝑖𝑜𝑛𝑖)isempty: 𝑎𝑐𝑡𝑖𝑜𝑛 tramsform to control( 𝑖) 2 publish to monitor(𝑎𝑐𝑡𝑖𝑜𝑛𝑖) K2 AC.remove(𝑎𝑐𝑡𝑖𝑜𝑛𝑖) consummator ← wait for monitor() 1 for each 𝑎𝑐𝑡𝑖𝑜𝑛𝑖 in AC: 𝑎𝑐𝑡𝑖𝑜𝑛 if consummator in prefix of ( 𝑖): Kitchen remove consummator from prefix of (𝑎𝑐𝑡𝑖𝑜𝑛𝑖) activate PP to parallel next layer Figure 6: Map for the experiment.

Algorithm 2: Plan executing. the repairedplan is got and replaces the failure one waiting for next process of plan parallelizing by renew plantree(), and the immediately. When all actions in AC are executed, PE will repairedtask repairs the failure task tree by renew tasktree(). send a trigger to activate PP to parallel next layer of the global If not, the upper parent task is got and replanned recursively plan tree. untilsolutionisfoundortherootisreachedwithreturning false. 5.2. Execution Monitoring. In EM, the plan execution is monitored by two ways: (1) the protected states have to be 6. Experiment and Result kept and never be tampered until the execution is finished; (2) the goal states are expected to be realized, where the positive 6.1. Experiment Environment and Setting. The experiment is effect states are shown in current states and the negative tested in a dynamic environment setting with one entrance effected states are deleted from current states. andthreetablesdistributedinalaboratory,showninFigure6, Each state of protected states and goal states is monitored which simulates the scenario of drink service in auto- byaprocessoftheinvolvedsensor,inwhichthesensor mated restaurant. Three facilities, two intelligent vehicles, acquires the information and confirms the states. EM man- andsettledKinectareinvolvedinthenetworkingofthe ages the processes by calling or killing them and compares the experiment; each of them has the individual responsibility, confirmed states with the monitoring states of each action. but cooperating with each other for acquiring information There are three cases. and monitoring execution. For details, each facility has the following capability: (1) (i) If any protected state of an action has been confirmed K1, Kinect for surveillance settled at the door way of the to be tampered during executing the action, the exe- entrance, can detect and recognize the guest who enters cution fails, and the relative plan must be replanned. the service area or goes out from the entrance; (2) K2, a (ii) If the goal states are all confirmed to be achieved pioneer intelligent vehicle equipped with Kinect for menu andtheprotectedstatesareallkeptwellduringthe service, can detect and recognize which table the identified execution of an action, then the action is executed guest is sitting by and get his or her order for drink; (3) successfully. At this time, the action is sent to PE as K3, another intelligent vehicle equipped a 7 DOF arm and a a consummator, and this would activate the process gripper for deliver service, can serve the ordered drink to the of PE to go ahead to execute the next batch of free corresponding table and recycle the empty drink boxes after actions. guests leave. (iii) If the goal states cannot be confirmed in expected To cooperating in network, due to the convenience for time, then the execution of this action would be communicating among distributed machines in local area considered as failure, and it will be replanned also. network [33], ROS (robot operating system) is employed for the development of control systems. In addition, to enhance While the execution fails, the replanning is activated to therobustnessofthenetworking,weconstructahybrid recover it. As to improve the performance, an algorithm network environment by using wireless data transmission based on partially backtracking is designed to restrict the modules as the supplement. In the experiment, communi- replanning depth. As the basic principle, the replanning cation among all facilities is through one shared “roscore” always and iteratively tries to replan the nearest upper task of in ROS, shown as Figure 7, while K2 and K3 communicate the failure action or task until the new solution is obtained. through wireless data transmission. AsshowninAlgorithm3, the corresponding action in In Figure 8,wecanseetheflowchartofmultiplesensors. tasktreecanbeachievedbyAction2Task(), in which a dic- On the left top, K1’s and K2’s computers are connected in the tionary maps the actions between plan tree and task tree. The same local area network; among them, K2’s laptop is running parent task is then replanned. If the replanning is successful, as a ROS master, and other computers are running connect 10 International Journal of Distributed Sensor Networks

repaire plan(𝑆, fAction, preAction) fTask ← Action2Task(fAction) solution ← False while solution = False: fParent ← fTask.up if fParent is the root of TaskTree: return False repairedtask, repairedplan ← decompose task(𝑆, fParent, repairedtask, repairedplan) if repairedtask, repairedplan is not False: solution ← True renew tasktree(repairedtask) renew plantree(repairedplan)

Algorithm 3: Repair the failure plan by replanning based on partial backtracking.

/camera_base_link

/camera_base_link1

/camera_base_link2 /makers_from_tf /camera/base_link3

/tf /chatter _tf_laser /listener /openni_tracker /amcl_pose

/laser_static_tf_publisher

/amcl /gyro /gyro /odom_publisher /odom /move_base/goal /cmd_vel /scan /scan /move_base /move_base/result /map_server /map

/tf_static /execution_feedback /goal_move_base

/execute_plan

Camera /camera/rgb/image_color /camera/camera_nodelet_manager /camera/rgb/image_raw

/surf Object_match_result /surf

face_recognition

Face_recognition/action_topics /face_recognition

/face_recognition_client

Figure 7: ROS computation graph for K2. International Journal of Distributed Sensor Networks 11

K2

/position K2’s vehicle computer Point (1∼3) Map Run as ROS master Amcl/pose Laser Local K2’s laptop Kinect network Gyroscope Encoder Message /talker Wireless data cc guest point (1∼3) transmission module 1 lzh1guest point (1∼3)

xx guest Occur (1∼2) point (1∼3) /face_name

3 Wireless data K transmission module 2

K1’s computer Kinect Planner K3 Action execution

K1 Many sensors

Figure 8: The flowchart of multiple sensors.

with it, so that the K1’s and K2’s computers can share ROS topic with each other. They are assembled as a group. K1 sends topic of “/face name”tothegroupbyusingitsKinect sensor to detect guests and record their ID. And then K2’s Kinect sensor can detect guests and recognizes their names, at the same time; K2’s vehicle sensors send back a topic of “/position” to the group. Using all these topics, K2’s laptop can know the guests and their sitting tables; then it sends a topic message using K2’s wireless data transmission module to K3. K3’s planner receives the messages and works with them. In experiment, K1 monitors the entrance to detect and acquire training images for every new guest. Human detec- tion is realized by the skeleton tracking, which is the best known application of Kinect, and the joint positions of a Figure 9: Guest lzh1 is detected and recognized by K1. person standing in front of the camera can be detected and tracked through using the ROS package of openni tracker [34].Ifanewgueststaresatthecameraforcoupleofseconds, the desired number of training images is obtained from the Moreover, as to make the experiment easy going, but not video stream, and the ID for the new guest is then assigned the key point of our experiment, we design SURF detector [35]. Finally, the acquired images are stored and added to the to detect the images pasted on the drink box to classify the list of training imaged and shared with others. The process is drinks, shown in Figure 11. The red circles on the images are shown in the images of Figure 9. generated by SURF detector. As a pioneer vehicle, K2 is capable of SLAM (simultane- And as the delivery vehicle, K3 is able to execute the ous localization and mapping), communicating with K1 by drink identification, autonomous moving, grasping, and “roscore” and exchanging information with K3 by wireless place actions, and the tray on K3 is with the maximal capacity data transmissions. Equipped with the navigation stack of of carrying three drinks. With multitasking planning, K3 ROS, it is able to plan path, create a map from laser scan data, can treat the multiple tasks as a whole to save the cost locate itself in a map, and so forth. In Figure 9,K2startsto for task execution. When a new task is requested, it will routine patrol to detect and recognize every guest (as shown be inserted to the current task list, and the individual in Figure 10), confirm their table number through its current plan for it will be parallelized into the global plan. As locationandpose,acquiretheordersofdrink,andpublish an example, if two persons are coming or leaving at the them to K3. If the K2 detects the drink only but no person is same time, K3 could serve them in parallel and carry two near the table, it will infer whether the guest has gone by the drinks at once and deliver to them, respectively, shown in K1’s information. Figure 12. 12 International Journal of Distributed Sensor Networks

Figure 12: K3 is serving two drinks for two guests in parallel.

Figure 10: K2 has detected and recognized Guest lzh1 and cc and provided their location. Case 1 !detect_recognize 25 s (lzh1) !grasp_place Wait for lzh1’s order 35 s 33 s (drink1, table1)

!grasp_place 32 s !move_base (drink2, tray) 30 s (table1, table2)

27 s !move_base !grasp_place 1 35 s (kitchen, table ) (drink2, table2) Total time 217 s

Figure13:ResultofCase1.

Figure 11: Different drink box at different position is detected Case 2 precisely. !move_base 26 !move_base 1 s 59 (kitchen, table ) (table2, kitchen) s

!grasp_place 33 s 6.2. Testing and Result. To verify the feasibility and the (drink1, table1) !grasp_place 2 33 s improvement on the efficiency of the approach proposed, the (drink , tray) comparable testing and results are presented in two cases. !move_base 33 s (table1, table2) !move_base 54 s Case 1 (serving two guests in parallel by networking). In (kitchen, table2) thiscase,K3,workingwithnetworking,receivesanewtask !detect_recognize 52 s ( lzh1) that Guest lzh1 orders Drink2, while grasping and placing the 35 s !grasp_place 34 1 2 2 s Drink1 on the tray for serving it to Table1 for Guest cc.Atthis Wait for lzh ’s order (drink , table ) time, the new task is inserted and paralleled into the global Total time 389 s plan. As the result of parallelization, two tasks can be executed Figure 14: Result of Case 2. in parallel, and K3 would bring Drink1 together with Drink2 and serve them to Table1 and Table2, respectively.Theplan and the executing time are shown in Figure 13,andthewaiting time of drink service for Guest lzh1 is 217 s. The different bounding colors, red and green, highlight the differences actions between two cases. There, the red Case 2 (serving two guests by single vehicle). In Case 2,K3is color presents the actions which are involved in both cases working as a single vehicle, and it may not be able to detect but with different time costs. In two cases, the time cost the coming of new guest in first time, and new service task for !detect recognize (lzh1), colored with red, is different. has to wait until the current task is finished. This takes much Because in Case 1, K2 can use the shared data of lzh1’s face more time for the new guest to wait. With the same setting from K1 during executing !detect recognize (lzh1), while in and variables of Case 1, the plan and the executing time are Case 2, K3 has to obtain this data by itself. At this point, shown in Figure 14, and the waiting time for Guest lzh1 is it shows the advance of our method that the networking 389 s. improves the efficiency on acquiring information. And the green presents the actions that are involved in either of As the comparison between Cases 1 and 2,thetesting two cases. The actions of !move base (Table2, Kitchen) and whichisbasedontheproposedapproachandnetworking !move base (Kitchen, Table2) in Case 2 are not appear in Case saves 172 seconds for Guest lzh1 to get the drink service. 1 because K3 has paralleled the two tasks as a global plan. And International Journal of Distributed Sensor Networks 13 it shows the improvement of our approach on the efficiency [5] J. Lopez,´ D. Perez,´ E. Paz, and A. Santana, “WatchBot: A build- of multitasking. ing maintenance and surveillance system based on autonomous robots,” Robotics and Autonomous Systems,vol.61,no.12,pp. 1559–1571, 2013. 7. Conclusion and Future Work [6] J. B. Silva, C. Santos, and J. Sequeira, “Developing a timed nav- igation architecture for hospital delivery robots,” in Proceedings In this paper, we proposed an approach for multitasking in of the IEEE 3rd Portuguese Meeting in Bioengineering (ENBENG restaurant service of intelligent vehicles by networking. We ’13),pp.1–4,February2013. presented the adapted method of hierarchical decomposing [7] T. Arai, E. Pagello, and L. E. Parker, “Guest editorial—advances based on traditional HTN planning and the optimization in multirobot systems,” IEEE Transactions on Robotics and modelled as maximal weight clique problem for optimizing Automation,vol.18,no.5,pp.655–661,2002. the efficiency of multitasking. And by integrating the plan [8]Y.U.Cao,A.S.Fukunaga,andA.B.Kahng,“Coopera- executing and execution monitoring, the vehicles can work tive mobile robotics: antecedents and directions,” Autonomous online in dynamic environment. Additionally, as the vehicles Robots,vol.4,no.1,pp.7–27,1997. are working in network, the mechanism for cooperating by [9] A. Torreno,˜ E. Onaindia, and O.´ Sapena, “A flexible coupling sharing information and allocating task help the vehicles to approach to multi-agent planning under incomplete informa- handle partially observability and uncertainty in dynamic tion,” Knowledge and Information Systems,vol.38,no.1,pp.141– world. As shown in the experiment of restaurant service, 178, 2014. three facilities cooperated with each other in a hybrid [10] P. H. Tu, T. C. Son, and C. Baral, “Reasoning and planning with network and the comparing results between working by sensing actions, incomplete information, and static causal laws networking and working as individual support that the using answer set programming,” Theory and Practice of Logic proposed approach has made obvious progress on improving Programming,vol.7,no.4,pp.377–450,2007. the efficiency and robustness of the vehicles. [11] M. Ghallab, D. Nau, and P. Traverso, Automated Planning: Even though the feasibility of the proposed approach is Theory and Practice, Elsevier, 2004. verified, the uncertainty is not really figured out yet. The [12] J. Ma and B.-Q. Yin, “Simulation optimization of actions of future works will focus on the deeper integration with the robot based on POMDP model,” JournalofSystemSimulation, capability for predicting the change of the environment in real vol.20,no.21,pp.5903–5906,2008. world with much more uncertainty, to find the way to endow [13] S. Candido and S. Hutchinson, “Minimum uncertainty robot the indoor intelligent vehicles with more robustness so that path planning using a POMDP approach,” in Proceedings of it can work more unaffectedly and friendly in a human-robot the IEEE/RSJ International Conference on Intelligent Robots and coexisting world. Systems (IROS ’10), pp. 1408–1413, Taipei, Taiwan, October 2010. [14] L. P. Kaelbling and T. Lozano-Perez,´ “Integrated task and motion planning in belief space,” International Journal of Conflict of Interests Robotics Research,vol.32,no.9-10,pp.1194–1227,2013. [15] M. Fichtner, A. Grossmann, and M. Thielscher, “Intelligent The authors declare that there is no conflict of interests execution monitoring in dynamic environments,” Fundamenta regarding the publication of this paper. Informaticae,vol.57,no.2–4,pp.371–392,2003. [16] F. R. Noreils and R. G. Chatila, “Plan execution monitoring and Acknowledgments control architecture for mobile robots,” IEEE Transactions on Robotics and Automation,vol.11,no.2,pp.255–266,1995. This work is supported by National Natural Science Foun- [17] M.E.Desfardins,E.H.Durfee,C.L.Ortiz,andM.J.Wolverton, dation of China (no. 61210013 and no. 61473278) and Key “A survey of research in distributed, continual planning,” AI Research Program of the Chinese Academy of Sciences Magazine,vol.20,no.4,pp.13–22,1999. (KJZD-EW-TZ-L03). [18] J. S. Russell and P. Norvig, Artificial Intelligence: A Modern Approach, Prentice Hall, 2nd edition, 2003. [19] M. Brenner and B. Nebel, “Continual planning and acting in References dynamic multiagent environments,” Autonomous Agents and Multi-Agent Systems,vol.19,no.3,pp.297–331,2009. [1] P. R. Wurman, R. D’Andrea, and M. Mountz, “Coordinating hundreds of cooperative, autonomous vehicles in warehouses,” [20] G.-J. M. Kruijff, M. Brenner, and N. Hawes, “Continual planning AI Magazine,vol.29,no.1,pp.9–19,2008. for cross-modal situated clarification in human-robot interac- tion,” in Proceedingsofthe17thIEEEInternationalSymposium [2] L. Acosta, E. J. Gonzalez,´ J. N. Rodr´ıguez et al., “Design and on Robot and Human Interactive Communication (RO-MAN implementation of a for a restaurant,” Interna- ’08), pp. 592–597, Institute of Electrical and Electronics Engi- tional Journal of Robotics and Automation,vol.21,no.4,pp.273– neers Computer Society, Munich, Germany, 2008. 281, 2006. [21] L. Ming, Q. Kejie, C. Fengyu et al., “Towards indoor localization [3] Q.X.Yu,C.Yuan,Z.Fu,andY.Z.Zhao,“Anautonomousrestau- using Visible Light Communication for consumer electronic rant service robot with high positioning accuracy,” Industrial devices,”in Proceedings of the IEEE/RSJ International Conference Robot,vol.39,no.3,pp.271–281,2012. on Intelligent Robots and Systems (IROS ’14), pp. 143–148, [4]Q.-X.Yu,C.Yuan,Z.Fu,andY.-Z.Zhao,“Researchofthe Chicago, Ill, USA, September 2014. localization of restaurant service robot,” International Journal [22] Y. Sun, M. Liu, and M. Q.-H. Meng, “WiFi signal strength- of Advanced Robotic Systems,vol.7,no.3,pp.227–238,2010. based robot indoor localization,” in Proceedings of the IEEE 14 International Journal of Distributed Sensor Networks

International Conference on Information and Automation (ICIA 14), pp. 250–256, Hailar, China, July 2014. [23] L. Wang, M. Liu, and M. Q.-H. Meng, “Towards cloud robotic system: a case study of online co-localization for fair resource competence,” in Proceedings of the IEEE International Confer- ence on Robotics and Biomimetics (ROBIO ’12),pp.2132–2137, December 2012. [24] R. Micalizio and P. Torasso, “Monitoring the execution of a multi-agent plan: dealing with partial 30 observability,” in Pro- ceedings of the 18th European Conference on Artificial Intelligence (ECAI ’08),M.Ghallab,C.D.Spyropoulos,N.Fakotakis,and N. M. Avouris, Eds., pp. 408–412, IOS Press, Amsterdam, The Netherlands, 2008. [25] D. Kortenkamp and R. Simmons, “Robotic systems architec- tures and programming,” in Springer Handbook of Robotics,B. Siciliano and O. Khatib, Eds., pp. 187–206, Springer, Berlin, Germany, 2008. [26] R. Simmons, S. Singh, D. Hershberger, J. Ramos, and T. Smith, “First results in the coordination of heterogeneous robots for large-scale assembly,” in Experimental Robotics VII,D.Rus and S. Singh, Eds., vol. 271 of Lecture Notes in Control and Information Sciences, pp. 323–332, Springer, Berlin, Germany, 2001. [27] R. P.Goldman, D. Nau, and U. Kuter, Documentation for SHOP2, University of Maryland, 2011. [28] Q. Yang, “Formalizing planning knowledge for hierarchical planning,” Computational Intelligence,vol.6,no.1,pp.12–24, 1990. [29] A. L. Blum and M. L. Furst, “Fast planning through planning graph analysis,” Artificial Intelligence,vol.90,no.1-2,pp.281– 300, 1997. [30] M. Cayrol, P. Regnier,´ and V. Vidal, “Least commitment in Graphplan,” Artificial Intelligence,vol.130,no.1,pp.85–118, 2001. [31] I. M. Bomze, M. Budinich, P. M. Pardalos, and M. Pelillo, “The maximum clique problem,”in Handbook of Combinatorial Optimization, pp. 1–74, Springer, 1999. [32] P. R. Osterg¨ ard,˚ “A new algorithm for the maximum-weight clique problem,” Nordic Journal of Computing,vol.8,no.4,pp. 424–436, 2001. [33] Open Source Robotics Foundation, Running Ros across Multiple Machines, Open Source Robotics Foundation, 2009, http://wiki .ros.org/ROS/Tutorials/MultipleMachines. [34] P. Goebel, Ros by Example Hydro. Lulu, 2013, http://www.lulu .com/shop/r-patrick-goebel/ros-by-example-hydro-volume-1/ ebook/product-21393108.html. [35] P. Ziafati, AFaceRecognitionPackageforRos,GitHub,2014, https://github.com/procrob/procrob functional. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 341579, 11 pages http://dx.doi.org/10.1155/2015/341579

Research Article A Hierarchical Reputation Evidence Decision System in VANETs

Yang Yang,1 Zhipeng Gao,1 Xuesong Qiu,1 Qian Liu,1 Yuwen Hao,2 and Jingchen Zheng2

1 State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing 100876, China 2Information Management Center, General Hospital of Chinese People’s Armed Police Forces, Beijing 10039, China

Correspondence should be addressed to Yang Yang; [email protected]

Received 25 September 2014; Accepted 5 February 2015

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Yang Yang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

In VANETs, users are rational, independent, and selfish. Stimulation-based reputation management system is critical for them to avoid selfishness and promote network performance in large-scale VANETs. The current reputation mechanisms produce some problems, for example, overfull energy consumptions, confused collusion, and misreport. In order to detect selfish and collusive behaviors accurately and quickly, we propose a dynamic three-layer reputation evidence decision and management mechanism, which combine with Dempster-Shafer evidence integration mechanism to distinguish selfish nodes. In particular, the system helps in collusion avoidance through reporting falsified reputation evidences of colluders. In addition, we borrow ideas from Weber- Fechner’s law and design an adaptive reputation evidence gathering cycle for prolonging the lifetime of detector and overwhelming frequent polling for reputation evidences. The simulation results demonstrate that REDS has higher detection speed for selfish nodes and collusive observers and less network traffic of gathering reputations.

1. Introduction of the nodes. In the event of high-energy consumption and low bandwidth availability, some of the vehicle nodes in the Vehicular Ad hoc networks (VANETs) are one important network might refuse to forward other’s message packets. type of the mobile ad hoc networks (MANETs) developed Such nodes are called as selfish nodes and they always intend as the basis of Intelligent Transportation Systems (ITS) to to maximize their own profit, causing undesirable delays in provide safer, better, and more efficient road conditions. In the message delivery and increase the network latency, which VANETs, the main network nodes are the smart vehicles in turn affects the entire performance of the network. If a large and the road-side infrastructure units (RSUs) that are able number of selfish vehicles exist in VANETs, the performance to communicate with each other through vehicle-to-vehicle and function of VANETs will be greatly influenced. For these (V2V) and vehicle-to-infrastructure (V2I) communications. reasons, it is essential to detect selfishness and encourage Such communications provide a variety of applications them in order to promote performance of VANETs. Repu- ranging from exchanging life-saving information, such as tation mechanism is pivotal for node cooperation in packet environmental and driving hazards, to traffic congestion, forwarding in the large-scale vehicular ad hoc networks [1– touristic messages, and advertisements. 3]. Through reputation evaluation, selfish behaviors can be The V2V and V2I communications are at short distance discovered and punished in a certain degree. and high speed in VANETs. Because the communication In order to monitor and isolate misbehaving of packet range of vehicles is limited, packets in VANETs need other forwarding in VANETs, a number of reputation technolo- vehicles to forward cooperatively. However, in real applica- gies have developed to manage reputations and limit the tion scenarios, the vehicles are driven by humans and the negative impact of selfish nature. For an observed vehicle human behavioral tendencies are reflected in the behaviors node 𝑛0,anevaluator(itisusually𝑛0’s one-hop neighbor 2 International Journal of Distributed Sensor Networks

which is in 𝑛0’s communication range) may use watchdog it tends to be a colluder, and then its credit is also negative in method, and so forth, to observe 𝑛0’s forwarding behaviors the end. andevaluateitsreputation,orelsetheindirectneighbors In addition, the responsibility for transmitting reputation (it is usually not within 𝑛0’s communication range) can evidences leads evaluators to consume more network traffic. adopt recommended and mediate reputations from 𝑛0’s one- So we design an adaptive evidence gathering cycle in views of hop trustworthy neighbors [4, 5]. The direct observation vehicles’ mobility and personal applications. behaviors are usually influenced by channel noise or other In detail, our contributions are as follows. adverse conditions. If the observer is interfered, the sole reputation may be inaccurate. In the latter, the final evaluator (1) The dynamic three-layer reputation evidence combi- merges local reputations from reliable recommenders and nation system: in the current reputation management forms the global reputation in the end. However reputation technologies [8–10], the reputation manager ignores recommendation may cause some problems, such as overfull the reputation which deviates dramatically from the cost due to periodical reputation information exchanging, average value in order to avoid falsified reputation. It reputation storage, and management because of movement leads the accurate reputation to be abandoned when of vehicles and so on. It is difficult to distinguish exactly large-scale collusions exist. Our proposed scheme collusion from misreport and further to punish conspirators. combines Dempster-Shafer evidence with hierarchi- The network traffic consumption by continually report- cal evidence clustering on the dissimilar evaluation ing reputation data is another major concern problem. In layer to calculate more accurate reputations and VANETs, vehicle nodes belong to different individual. The detect selfish vehicle nodes in less time than other users are not willing to consume extra traffic or resources typical reputation algorithms. Especially it calculates for periodically reporting local reputations in order to avoid the trust degree of evaluators and therefore effectively influencing personal applications. In addition, reputations isolates collusive coordination observers that conspir- from different recommenders on the different period may atorially report higher reputation for selfish nodes. cause local reputations confusion (see Section 3.2). Calcu- (2) Adaptive reputation gathering cycle: too frequent lating reputation based on a reasonable reporting cycle is polling reputation evidences will cost plenty of net- essential for saving network traffic and resources and making work traffic. An adaptive reputation gathering cycle reputation more accurate. based on Weber-Fechner’s law is proposed in order Reputation management needs to better suit VANETs to maintain the stability of reputation management and increase the reputation accuracy, and thus we propose system and save network traffic. Considering vehi- a hierarchical reputation evidence decision system (REDS) cles’ movement and personal applications, dynamic based on the Dempster-Shafer evidence theory. The main changing cycle can seek a balance between reputation merit of Dempster-Shafer evidence method [6, 7]isthatit valuation accuracy and network traffic. combines different evidences, especially some uncertainties from different evidence sources. Uncertain evidences are The rest of papers are organized as follows. Section 2 pro- used to denote reputations caused by vehicle mobility and vides some related works about the reputation cooperation. channel noise and further promote reputation accuracy and Section 3 introduces our hierarchical reputation evidence mitigate the adverse impact of network characteristics. decision system (REDS), and Section 4 depicts the simu- REDS is a dynamic three-layer reputation evidence lation results with respect to typical reputation evaluation combination structure. In the lowest coordination observer algorithms and demonstrates our algorithm’s efficiency and decision layer, some of 𝑛0’s 1-hop neighbors which stay within superiority. In Section 5,weconcludethepaper. 𝑛0’s communication range during a complete reputation gathering cycle are regarded as coordination observers. They 2. Related Works detect and report 𝑛0’sforwardingbehaviorsasreputation evidences. The intermediate coordination manager combines Some research works have been done on vehicle stimulation the evidences reported from the coordination observers in cooperation in VANETs at present. Related research of its own detection domain using evidence theory and sends MANETs is relatively abundant. The stimulation coopera- merged data to 𝑛0’s host manager in the highest layer. tion mechanisms in the MANETs are generally classified In the end, the host manager calculates several reputation into virtual currency-based and reputation-based stimulation evidences and correspondingly forms 𝑛0’s credit. If 𝑛0’s credit system. In the virtual currency system, nodes pay virtual is negative, it is selfish. money (called nuglets) [11] for forwarding service. In detail, One of the advantages of the paper is that colluders a source pays for each forwarding node on the routing path. can also be detected through reputation evidence feedback. Andeachnodealsoneedstoprovideforwardingserviceto Colluders usually report higher reputations for each other gain nuglets. The previously mentioned price mechanism is and decrease other’s reputations. To avoid collusion, the host not flexible enough to maximize cooperators’ profits. For manager feeds the ultimate reputation back to different layers’ example, a source hardly evaluates accurately the total of evaluators. The upper evaluator can manage the trustworthy nuglets in the dynamic changing network environment. Some degree of evaluators of lower layer. The trustworthy degrees researchers introduce economic incentive technology in the of evidence directly influence evaluators’ credits. If an evalu- self-organized ad hoc networks. To maximize the payoff of ator’s reputation evidences are always deviated from others, relay nodes, Ji et al. [12]proposeagamepricing-basedrouting International Journal of Distributed Sensor Networks 3

Host manager m1 reputation decision n1 layer

n2 n6 m m m n 2 3 4 Coordination manager 0 reputation decision m1 layer n3 n1 n n3 n m4 2 4 n5 n6 m2 n4 n5 CO CO Observer reputation m3 decision layer

Observed Observed node Host manager node Coordination manager Coordination observer n0 (a) (b)

Figure 1: (a) Reputation-based network topology. (b) Three-layer reputation decision architecture.

mechanism. Packet-forwarding services are negotiated and self-organized network, there are some deficiencies that need auctioned in the orthogonal frequency-division multiplexing to be solved further, for example, reputation imprecision due setting. Mukherjee and Kwon [13] design a robust multiobject to vehicles’ mobility, reputation falsifying caused by collusion, bundled auction method for simultaneous partner selec- and so forth. And thus, our REDS effectively promotes rep- tion. After successful auction, a contractor (winning bidder) utation accuracy by using hierarchical reputation evidence achieves satisfied QoS and rewards the service provider decision and distinguishes suspect collusion vehicle nodes (seller). and decreases their trustworthy degree through reputation Reputation management systems are adopted to detect feedback. and isolate misbehaving nodes to release their negative influence on the network performance. In the light of adverse 3. Reputation Evidence Decision System impact of misbehaving nodes, the paper [14]presentsthe watchdog and detects uncooperative relay nodes. Detecting In the paper, we propose a dynamic three-layer reputation node maintains a buffer to store the number of neighbors’ evidence decision system. As illustrated in Figures 1(a) received and sent packets. But it is probably influenced by and 1(b), the hierarchical structure contains all of mobile channel collision. MobiGame [15] designs a user-centric rep- vehicles that are classified into 4 roles: host manager (HM), utation incentive system for delay tolerant network (DTN). coordination manager (CM), coordination observer (CO), Packet forwarding’s cost and reward can get a Bayesian and observed nodes. An observed node 𝑛0 has only one equilibrium through a game-theoretic scheme. Refaei et al. host manager (HM). HM is a special type of infrastructure [1] represent a time-slotted evaluation approach to detect called Road Side Unit (RSU), which is deployed along the timely node’s changing behaviors. In addition, the sequential road for connectivity. They are deployed in specific areas probability ratio test (SRRT) is used for judging whether a and completely cover the whole VANETs. HM is regarded as neighbor is selfish. Anantvalee and Wu [9] define two thresh- a trustful node, in charge of merging reputation evidences olds, THcoop and THselfish (TH > TH )toclassify coop selfish about the observed node and forming the final reputation. cooperative and selfish nodes, and then encourage suspicious CMs are also considered to be trustful in our paper. They nodes whose reputation in the range [THselfish,THcoop]to cooperate. are the coordination managers in the second layer. CMs take For the reputation store, DHT Trust overlay network [16] the charges of reputation decision, merge the reputation evi- uses CHORD to distribute local reputation to reputation dence from Cos, and send the local synthetically reputation manager. Finger nodes issue reputation feedback in the evidence to HMs. 𝑛 certain interval and fast aggregate local reputation into the In addition, 0 has a lot of 1-hop neighbors (vehicles 𝑛 global reputation. Li and Shen [8] propose the account- which stay within the range of 0’s communication radius aided reputation management system (ARM) to stimulate during a complete reputation gathering cycle), part of which 𝑛 selfish mobile nodes. The ARM system calculates reputations are COs. For example, suppose that 0 is an observed node and credits to distinguish selfishness from cooperation. In and a vehicle node 𝑛1 runs passing 𝑛0.Ifthetimefrom𝑛1 𝑛 𝑛 particular, the authors introduce the distributed hash table enters 0’s communication range to the time 1 runs out (DHT) to store circulating reputations and credits. As node of 𝑛0’s communication range is not less than the reputation mobility, DHT uses a lightweight maintenance protocol to gathering cycle, then 𝑛1 can be regarded as a coordination reduce the number of reputation structure reestablishment. observer. In the intermediate layer, several 𝑛0’s one-hop Although the above-mentioned references have provided neighbors, which stay within the range of 𝑛0’scommunication incentive mechanisms for selfish nodes in the wireless radius no less than two complete reputation gathering cycles, 4 International Journal of Distributed Sensor Networks are regarded as coordination managers. That is, if a coordi- into reputation decision in order to calculate reputation more nation observer 𝑛1 stayswithintherangeof𝑛0’s communi- accurately. Through reputation feedback on COs and CMs, cation radius no less than two complete reputation gathering we can fast detect selfish node and colluders. cycles, then it upgrades itself to a coordination manager. It is Moreover, we design a dynamic reporting cycle for coor- obvious that the coordination manager of one observed node dination managers and coordination observers according has relatively similar motion state with the observed node. to their mobility and resources. This is because they will However, if a CO or a CM runs out of the observed node’s consume extra network traffic for collecting and merging evi- communication range, it downgrades itself to a normal node, dences. However mobile vehicles belong to different individ- and will be no longer engaged in reputation gathering in the ual users, and then the extra network traffic consumption will current round until it enters the observed node’s commu- influence user’s personal applications. It means the reputation nication range again. In a reputation gathering cycle, each managers should save extra network traffic consumption. COchoosesthenearestCMin𝑛0’s communication range, 𝑛 detects the statistical value with respect to 0’s forwarding 3.1. Reputation Evidence Combination. In the Dempster- behaviors as reputation evidences through vehicle wireless Shafer evidence reasoning mechanism, evidences are denoted communication devices, and reports the reputation evidences as some possible events. Using reasoning combination rule to the CM. However, a CM manages several COs and merges to aggregate multiple belief evidences under uncertainty. To the evidences from COs in its management domain and calculateanaccuratecomprehensivereputation,weconsider 𝑛 sends to 0’s host manager (the highest layer). For a running effect of each reputation evidence rather than simply ignore 𝑛 observed node 0, if there is no CO in its communication the value that deviates largely from the average. We design range, then CMs detect the observed node’s forwarding the dynamic three-layer reputation evidence aggregation behaviors directly. If there is no CM in its communication structure for reputation evaluator at different layers. And fur- range, then COs report the reputation evidences directly thermore, the system executes reputation feedback to amend to HM. Each observed node has its own host manager each evaluator’s trust weight and distinguish colluders. that is responsible for calculating the account of forwarding In the coordination observer reputation decision layer, services. a set of hypotheses about observed forwarding behaviors is An example depicted in Figures 1(a) and 1(b) is given as Θ={𝑂,𝑂} 𝑂 𝑛 denoted as a frame of discernment . indicates follows. It is assumed that the observed vehicle node 0 has that the observer has monitored the forwarding events of 6 coordination observers which sequence from 𝑛1 to 𝑛6. 𝑚2 the monitored node and 𝑂 indicates that the observer does is the nearest CM to 𝑛3 and 𝑛4,so𝑛3 and 𝑛4 are managed not monitor any forwarding behaviors. In the following, the in the same domain of 𝑚2.Here𝑚2, 𝑚3,and𝑚4 are viewed Θ Θ power set 2 includes all the subsets of Θ.Here2 = as 𝑚1’s CO. The host manager of 𝑛0 is 𝑚1,whichisthe {{Φ}, {𝑂}, {𝑂}, {𝑂, 𝑂}} nearest road-side unit to 𝑛0.Inthelowestlayerofreputation ,eachsymbolofwhichrespectively evidence decision (coordination observer reputation decision represents the hypotheses about impossible, forwarded, non- layer), each coordination observer records the received and forwarded, and uncertainty. 𝑖 𝑛 forwarded packets of 𝑛0, judges the uncertain conditions Observer calculates 0’s BPA function per unit time as (may be caused by wireless channel unconventionality) by Θ inquiring the coordination observer, and forms the basic 𝑚:2 󳨀→ [0, 1] belief assignment (BBA) values (see Section 3.1 for more (1) 𝑚(𝑛) (Φ) =0. explanations) corresponding to the uncertain conditions. 𝑖,𝑗 According to 𝑛0’s behaviors and coordination observer’s monitoring value, the coordination observer reports BBA The BPA for proposition 𝑂 is values to its upper manager. They transmit the BBA value to (𝑛) 𝑚2. 𝑁𝐹𝑖,𝑛 𝑚(𝑛) ({𝑂}) = 0 , In the middle-layer of reputation decision, 𝑚2 merges 𝑖,𝑛0 (𝑛) (2) 𝑁𝑅𝑖,𝑛 the reputation evidences from 𝑛3 and 𝑛4 andsendsthelocal 0 synthetic reputation evidence to 𝑚1.As𝑛0’s host manager is 𝑚 𝑚 𝑁𝐹(𝑛) 𝑁𝑅(𝑛) 𝑖 1,so 1 combines different reputation evidences reported where 𝑖,𝑛0 and 𝑖,𝑛0 denote observer recording the by several coordination managers (𝑚2, 𝑚3, 𝑚4)andreputa- number of packets that 𝑛0 forwarded and received at 𝑛th tions reported from 𝑛1 and 𝑛2.Intheend,𝑚1 calculates the unit time in the normal wireless network environment when comprehensive value in the highest reputation decision layer. observer 𝑖 runs in 𝑛0’s communication range. However wire- Some reputation evaluation algorithms ignored the high less network conditions possibly cause adverse interferences deviated reputation which may be caused by misreport or (e.g., buildings’ obstruction, moving, channel noise, collision, falsification. On the one hand, the benign reputation may congestion, etc.), which lead to monitoring incompletely. be abandoned in the large-scale collusion environment and Define uncertainty being aroused by wireless channel uncon- then the benign node is classified into selfish. On the other ventionality. When an observer 𝑖 detects nonforwarding hand, they have no restraint measures to punish colluders events corresponding to node 𝑛0 caused by adverse wireless with falsified reports in many times. These falsified or mis- environment in a period, then it contacts any coordination reporting nodes are unsuitable to continue to serve as COs. observer 𝑘 which runs in the same CM’s domain. Observer So we introduce the Dempster-Shafer Evidence theory [17, 18] 𝑖 acquires 𝑛0’s forwarding data recorded by 𝑘 in 𝑖’s jammed International Journal of Distributed Sensor Networks 5

𝑖 period and treats it as uncertainty value. Observer deter- n mines whether the observed value is equal to 𝑘’s observed 1 en1 value. If it is, it means that detection behaviors are not affected + (𝑛) (𝑛) m2 𝐴𝐹 𝐴𝑅 en2 by network environment. It is assumed that 𝑖,𝑛0 and 𝑖,𝑛0 n 𝑖 2 indicate that observer records the number of packets that n 1 e 𝑛0 forwarded and received in the abnormal period. Consider m2 (𝑛) (𝑛) (𝑛) (𝑛) m1 𝐴𝐹𝑖,𝑛 =𝐴𝐹𝑘,𝑛 and 𝐴𝑅𝑖,𝑛 =𝐴𝑅𝑘,𝑛 . Consider 0 0 0 0 e n5 ∗ n5 + m1 e 𝑁𝐹(𝑛) +𝐴𝐹(𝑛) (𝑛) 𝑖,𝑛0 𝑖,𝑛0 𝑚𝑖,𝑛 ({𝑂}) = . (3) 0 𝑁𝑅(𝑛) +𝐴𝑅(𝑛) 𝑖,𝑛0 𝑖,𝑛0 em3 n If less, it means that 𝑖’s monitoring data has been affected 3 by network environment. And then 𝑖 should utilize 𝑘’s en3 + m observed value in its abnormal period. But in order to avoid e 3 n n4 collusion, 𝑖 will incompletely believe 𝑘’s observed value and 4 multiplies that value by a discount factor 𝛼,orelse,𝑖 abandons 𝑘 𝑘 ’s observed value because may fall into wireless channel + unconventionality. For example, 𝑖 gets 𝑘’s detected total Evidence combination rule number of forwarded and received packets in the anomalous Figure 2: Feedback for trustworthy weights. periodandthenBPAforproposition{𝑂, 𝑂} is (𝑛) 𝛼⋅𝐴𝐹𝑘,𝑛 𝑚(𝑛) ({𝑂, 𝑂}) = 0 . Through evaluation of trust weights of COs and CMs, 𝑖,𝑛0 (𝑛) (𝑛) (4) 𝑁𝑅𝑖,𝑛 +𝐴𝑅𝑘,𝑛 areputationevidencereportedbyaCOoraCMwillbe 0 0 influenced: Here the discount factor 𝛼 is defined as follows: Θ 𝑚𝑖 (𝐴) ←󳨀 𝑚 𝑖 (𝐴) ⋅𝜆𝑖 (∀𝐴 ∈ 2 ). (9) (𝑛−1) 𝑁𝐹𝑖,𝑛 𝛼= 0 , Define the reputation evidence combination rule based 𝑁𝑅(𝑛−1) 𝑖,𝑛0 (5) on reputation evidence feedback as follows: (𝑛) (𝑛) (𝑛) 1 𝑚𝑖,𝑛 ({𝑂}) = 1 −𝑖,𝑛 𝑚 ({𝑂}) −𝑚𝑖,𝑛 ({𝑂, 𝑂}) . 𝑚 (𝐴) =𝑚 ⊕𝑚 (𝐴) = ∑ 𝑚 (𝑋) 𝑚 (𝑌) . 0 0 0 𝑖𝑗 𝑖 𝑗 𝑖 𝑗 (10) 1−𝑘𝑋∩𝑌=𝐴 A coordination observer may be colluder that reports a higher reputation for selfish nodes. Once a CO is detected to Here 𝑘 is a normalized constant. Consider 𝑘= be a colluder, it will be not suitable for reputation gathering ∑𝑋∩𝑌=0 𝑚𝑖(𝑋)𝑚𝑗(𝑌). A new reputation evidence is deduced and decision even though it still runs within the observed through combining two BPAs 𝑚𝑖 and 𝑚𝑗.ButthetypicalD-S node’s communication range. These collusive COs will be algorithm may cause evidence conflict; for example, punished and isolated and will not be permitted to upgrade 𝑚1 :𝑚1 (𝐴) = 0.99, 𝑚1 (𝐵) = 0.01, 𝑚1 (𝐶) =0 themselves to be CMs. To detect colluders, 𝑚1 calculates the trust weights of coordination observers and coordination 𝑚2 :𝑚2 (𝐴) =0, 𝑚2 (𝐵) = 0.01, 𝑚2 (𝐶) = 0.99 managers which run within the range of 𝑛0’s communication radius during the current reputation gathering cycle and fur- 𝑘 = 0.9999, 𝑚 (𝐴) =𝑚(𝐶) =0, 𝑚(𝐵) =1. ther feedbacks them, respectively, to coordination managers (11) (Figure 2). Define the ultimate belief reputation calculated by the host manager as follows: The combined evidence represents the probability of event 𝐵 being 1 although BPAs of 𝑚1 and 𝑚2 about 𝐵 are 0.01. ∗ ∗ ∗ ∗ ∗ 𝑒 =⟨𝑚 ({𝑂}) ,𝑚 ({𝑂}),𝑚 ({𝑂, 𝑂}) , 𝑚 (Φ)⟩. (6) To further avoid evidence conflict, we improve D-S evidence rule integrated with hierarchical clustering theory Define the direction cosine between any evidence byany besides adding trust weight for each reputation evaluator. ∗ evaluators 𝑒𝑖 and 𝑒 as follows: In the coordination manager reputation decision layer, a coordination manager receives the coordination observers’ 𝑇 ∗ 𝑇 ∗ ∗ 𝑒𝑖 𝑒 𝑒𝑖 𝑒 belief reputation value in its own domain. If some evidence 𝜌𝑖 = cos (𝑒𝑖,𝑒 )=󵄩 󵄩 = . (7) 󵄩𝑒 󵄩 ⋅ ‖𝑒∗‖ 𝑇 ∗𝑇 ∗ 1/2 equals 0, then we use the hierarchical clustering mechanism 󵄩 𝑖󵄩 [(𝑒 𝑒𝑖)(𝑒 𝑒 )] 𝑖 𝑖 to combine evidences to avoid evidence conflict, or else it uses The trust weights of evaluators (coordination observers weighted D-S evidence combination rule. and managers) are defined as follows: It is assumed that the coordination manager acquires 𝑁 𝑁 𝑁 𝜌 evidences. Classify clusters according to evidences, and 𝜆 = 𝑖 . each cluster only includes a reputation evidence. When com- 𝑖 ∑ 𝜌 (8) 𝑛 𝑛 bining reputation evidences by using hierarchical clustering 6 International Journal of Distributed Sensor Networks

Begin 𝐷𝑖𝑗 =0,𝐷𝑘𝑙 =0, Do While n evidences are combined as a compositive conclusion For 𝑖=1to 𝑁 For 𝑗=1to 𝑁 Calculate 𝐷𝑖𝑗 according to formula (12); End For End For 𝐷𝑘𝑙 = minimize (𝐷𝑖𝑗 ); If ∃𝑚𝑖(𝐴𝑗) = 0 (𝑖 ∈ {𝑘, 𝑙}, 𝑗 =𝑂}, {{𝑂},{ {𝑂, 𝑂}}) Then Combine reputation evidences based on hierarchical clustering (formula (10)–(12)); Else Use reputation 𝐷-𝑆 evidence combination (formula (7)–(9)) for integration. And 𝑚𝑖𝑗 is regarded as a new gravity center if using hierarchical evidence clustering next combination. End If End While End

Pseudocode 1 theory, the distance between evidences is defined as distance Colluders report high reputation for selfish nodes and between their gravity centers. We assume the gravity centers low reputation for cooperators, so it also expects its ally to of clusters 𝜔𝑝 (each cluster only includes an evidence) and 𝜔𝑞 report high reputation in return. It can be regarded as selfish are 𝑥𝑝 and 𝑥𝑞,andthenumberofthesamplesinthemis𝑛𝑝 in certain extent. Given a trust weight of the coordination and 𝑛𝑞, respectively. Then we combine 𝜔𝑝 and 𝜔𝑞 as a new observer 𝑖, its selfish character factor will decline along with reputation evidence cluster 𝜔𝑖;thus𝜔𝑖 would own 𝑛𝑝 +𝑛𝑞 the decreasing trust weight. The punishment measure for a samples. Cluster 𝜔𝑖’s gravity center would be as follows: colluder 𝑗 is as follows (𝑛 is the current iteration): 1 𝑥 = (𝑛 𝑥 +𝑛 𝑥 ). (𝑛) 𝑖 𝑝 𝑝 𝑞 𝑞 (12) 𝑆0 ←󳨀 𝑆 0 −(𝜖−𝜆𝑗 ). (15) 𝑛𝑝 +𝑛𝑞 𝑆 𝜖 Assume that another evidence cluster 𝜔𝑗’s gravity center Here 𝑜 is only used for judging the selfishness and is an is 𝑥𝑗,theEuclideandistance𝐷𝑖𝑗 between clusters 𝜔𝑖 and 𝜔𝑗 is initial value. Credit that stimulates nodes to provide or share 𝑆 defined as follows. 𝐷𝑘𝑙 is the minimal value of 𝐷𝑖𝑗 (∀𝑖, 𝑗): more forwarding services is defined as follows. If 𝑜 of a node is less than zero, its credit correspondingly is cleared: √ 𝑇 𝐷𝑖𝑗 = (𝑥𝑖 −𝑥𝑗) (𝑥𝑖 −𝑥𝑗). (13) 𝐶 (𝑛) =𝐶(𝑛−1) −𝑝 +𝑅 +𝑐. 𝑖 𝑖 𝑖 𝑔𝑖 𝑖 (16)

The pseudocode of reputation evidence calculation is Here 𝐶𝑖(𝑛) is the observed node 𝑖’s credit in the process shown in Pseudocode 1. of 𝑛th reputation evaluation period of the host manager. In the host manager reputation decision layer, the host 𝑝𝑖 isthepaidcreditof𝑖 for sharing forwarding service. manager needs to know the relative degree about each 𝑐𝑖 is cost factor for consuming extra network traffic for coordination manager when evidence combination. Namely, ∗ reputation evidence report and combination. It is because it calculates the direction cosine between 𝑒 and 𝑒𝑚𝑖 reported the coordination observers consume extra network traffic for by each coordination manager and further gets the trust reputation report and combination that the corresponding weights of these coordination managers. And then it uses creditsshouldbeassignedtothem. the same combination mechanism and integrates reputation evidences per unit time reported by different coordination 3.2. Adaptive Reputation Gathering Cycle. However polling managers. may cause more network traffic consumption if vehicle High-reputed and low-reputed nodes should be rewarded 𝑆 nodes gather reputation more frequently. In VANETs, selfish or punished. Define a selfish character factor 𝑜 (is set as vehicles [19, 20] pursue the least cost to reduce network initial number) for each observed node. The host manager traffic consumption. But the responsibility for gathering calculates the global reputation 𝑅𝑔 and relation between 𝑆𝑜 𝑅 and merging reputation leads evaluator to consume more. and 𝑔 is It should seek a balance between gathering frequency and 󵄨 󵄨 𝑟 󵄨 󵄨 consumption of network traffic. Therefore, each neighbor 𝑆𝑜 ←󳨀 𝑆 𝑜 + (−1) ⋅ 󵄨0.5 − 𝑅𝑔󵄨 . (14) vehicle node which runs within the range of 𝑛0’s commu- Here 𝑟=0when 𝑅𝑔 ≥ 0.5;otherwise𝑟=1.When𝑆𝑜 < nication radius needs to determine an adaptive gathering 0, then the observed node is completely selfish and must be cycle according to its current applications in the network, isolated. and then according to the new reputation gathering cycle and International Journal of Distributed Sensor Networks 7 their velocities, vehicle nodes determine whether they can be 100 regarded as COs or CMs. The number of current applications 90 reflects traffic load and remaining resources of evaluators. The 80 more applications an evaluator has, the longer the gathering 70 cycle is set. 60 In the paper, we improve Weber-Fechner’s law [21]in 50 order to update gathering cycle that is subject to a variety of 40 environment stimulating factors, such as the number of cur- 30 20

rent applications and mobility of vehicles. Weber-Fechner’s all selfish nodes of (min) law uses a linear function of logarithm for describing the detecting time for Execution 10 relationship between individual’s response and incitement 0 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 due to external environments. In the following formula, Selfish degree 𝑆 denotes the intensity of sensation, 𝑅 the magnitude of stimulation, and 𝐾 a constant. Consider DS 𝑆=𝐾 𝑅. REDS ln (17) ARM

Assume that Will is the response degree of changing Figure 3: The time for detecting all selfish observed nodes. gathering cycle, which corresponds to VANETs environment reaction such as the number of current applications 𝐴 and the velocity of vehicles 𝑉.Thesetwoinfluencefactorscan 0.1823 > (𝑛−1) ×𝑘 = 0.0584 be considered as environment stimulating factors, and Will Will web ; then gathering cycle adds reflects the corresponding responses of changing gathering 1minute. (𝑛) cycle. Will should be recalculated before the 𝑛th cycle. As an evaluator is also a common mobile vehicle node, its traffic loads and computational resources are subjected toa 4. Simulation Analysis variety of applications. The larger the number of applications We conduct simulations to demonstrate the performance of executed on a vehicle node, the more traffic will be occupied. REDS in our paper. The simulated VANETs include 60/120 The gathering cycle will be prolonged companying with vehicle nodes randomly deployed in the 1 km driveway area. remaining traffic decreasing. As vehicles move quickly which The velocity of each vehicle is dynamically changed and isset makes the topology of VANETs change frequently. When a randomly from 50 km/h to 100 km/h. As shown in Figure 1, vehicle node moves at a high speed, its surroundings change theRSUsaredeployedalongtheroadandregardedtobe frequently. To gain more accurate reputation, the gathering 𝜔 𝑗=1,2 HMs. Different roles of vehicle nodes such as COs or CMs cycle should be moderately reduced. 𝑖𝑗 ( )isthe are determined by vehicle nodes themselves according to the weight of each environment stimulating factors: dynamic changing gathering cycles and vehicle’s velocities. 1 We assume all of managers are trustworthy, while coordina- (𝑛) =𝜔 𝐴(𝑛) +𝜔 , Will 1 ln 2 ln 𝑉(𝑛) tion observers maybe collude with observed nodes in order to report high reputation evidences for them. Colluders are 𝐴(𝑛) 𝑉(𝑛−1) divided into random collusion and group collusion. Group Δ (𝑛) = (𝑛) − (𝑛−1) =𝜔 +𝜔 , Will Will Will 1 ln 𝐴(𝑛−1) 2 ln 𝑉(𝑛) collusion means all of coordination observers in a group (18) advisedly overwhelm other groups. The initial credits of all of observed nodes (ONs) and COs are equal to 2. Physical (𝑛) where Will reflects the corresponding responses of chang- bandwidth is set to 2 Mbit/s. We compare our algorithm with (𝑛) ing gathering cycle, 𝐴 isthenumberofcurrentapplica- ARM [8] and purely D-S Proof Fusion mechanism. (𝑛) (𝑛) tions, and 𝑉 is the velocity of vehicles. ΔWill is the just The ARM system calculates reputations and credits to noticeable difference (JND) for changing the cycle according distinguish selfishness from cooperation. In particular, the ∃|Δ (𝑛)|> (𝑛−1) ×𝑘 𝑘 authors introduce the distributed hash table (DHT) to store to Weber-Fechner’s law. If Will Will web ( web 𝑘 circulating reputations and credits. As node mobility, DHT is Weber fraction, generally web =1/30),thenevaluator’s uses a lightweight maintenance protocol to reduce the num- gathering cycle increases or decreases 1 minute. Otherwise, ber of reputation structure reestablishment. the cycle is inalterable: Firstly we verify the validity of selfish node detection 𝑇+1, Δ (𝑛) > (𝑛−1) ⋅𝑘 , when the network size changes. In Figure 3,thereare10 { Will Will web { selfish observed nodes (ONs) and 10 cooperative ONs. In 𝑇= 𝑇−1, Δ (𝑛) <− (𝑛−1) ⋅𝑘 , the communication ranges of these observed nodes, we set { Will Will web (19) { 15 collusive nodes and 25 cooperative nodes (include ONs’ {𝑇, Else. host managers). We assume that all collusive nodes and

(𝑛−1) (𝑛) (𝑛−1) (𝑛) cooperative nodes have qualification to be COs, whereas all For example, 𝐴 =10, 𝐴 =12, 𝐵 = 0.3,and𝐵 = managers (including HMs and CMs) need to be cooperative (𝑛) (𝑛−1) (𝑛) 0.25. Consider Will = 1.9356,Will = 1.7533,Will = and trustworthy. That is to say, a collusive CO cannot upgrade 8 International Journal of Distributed Sensor Networks

2 1.8 5.2 1.6 4.8

1.4 4.4 1.2 4 1 3.6 0.8 3.2 0.6 2.8 Average creditAverage of selfish ONs 0.4 Average credit of cooperative ONs cooperative of credit Average 0.2 2.4 0 2 0 5 10 15 20 25 30 35 40 45 50 55 60 65 0 5 10 15 20 25 30 35 40 45 50 Execution time (min) Execution time (min)

DS DS REDS REDS ARM ARM (a) (b)

Figure 4: (a) Average credit of selfish ONs. (b) Average credit of cooperative ONs.

itself to a CM even though it runs within the corresponding observed node’s communication range all the time. 3.2 Figure 3 shows the time for detecting all of selfish 2.8 observed nodes. Here selfish degrees (ON’s drop packet rate) are defined in [0.6, 0.9]. REDS has the minimum detection 2.4 time for all of selfish nodes. The greater the selfish degree 2 is, the less the detection time is taken. While in the figure we see a comparative result in D-S when no one ticket veto 1.6 situation happens, and ARM shows the worst performance Average credit Average in this situation. As ARM only simply ignores anomalous 1.2 reputations rather than punishing colluders, it is difficult to 0.8 distinguish cooperators from collusive COs in the large-scale group collusion. And then ARM consumes the longest time 0.4 for detecting selfishness. 0 In Figure 4, we define, respectively, the selfish degree of 0 3 6 9 12 15 18 21 24 27 30 33 the coordination observer nodes in [0.8, 1] (Figure 4(a))and Execution time (min) [0, 0.2] (Figure 4(b)) and evaluate their credits according to REDS selfishness 60 REDS cooperation 60 the simulation setting as Figure 3.EachON’sinitialcredit REDS selfishness 120 REDS cooperation 120 is set to 2. For selfish ONs in REDS, the average credit decreases slowly in the start detection stage. That is because Figure 5: Average credits change over different network size. the reputation feedback has not distinguished all of collusive COs. As time goes on, collusive COs are detected one by one (shown in Figures 6–9).Basedonthis,theselfishON’scredits (shown in Figure 4(a))decreasequicklybecauselesscollusive forwarding node, the credits of cooperative ONs have stably COs report fake high reputation evidences. REDS and DS act increasedcomparedwithDSandARM. more steeply which means that they detect selfishness more In Figure 5, we evaluate whether the average credit of quickly than ARM. ARM puts selfish nodes into blacklist REDS would be influenced by the network size or not. The but has no ability to detect collusive COs. The selfish nodes’ simulation executes 33 minutes, respectively, with different reputation evaluations are always influenced by falsified high network size (60 or 120). The number of selfish nodes is 1/6 reputation reported by collusive COs. of the total. The total of cooperative ONs follows the number. Figure 4(b) represents average credit of cooperative ONs. We can see that the average credit of selfish observed nodes Selfish observed nodes are detected as quickly as possible has decreased to zero. The credit’s slope with 60 nodes is in the REDS, and thus the system has a higher throughput similar with 120 nodes, which means REDS executes stably than others. As more trustworthy nodes are selected to be regardless of the network size. When the rate of number of International Journal of Distributed Sensor Networks 9

6 14 ×10 2 12 1.8 10 8 1.6 6 1.4 4 1.2

The number of colluders number The 2 1 0 21 22 23 24 25 26 27 28 0.8 Execution time (min) 0.6 REDS random collude 0.4

REDS group collude (bytes) consumption traffic Network 0.2 Figure 6: The detection time for collusive COs. 0 0 102030405060 Execution time (min)

DS ARM REDS REDS-fc 1.8 Figure 9: Network traffic consumption. 1.5 1.2 0.9 0.6 COs to number of ONs is changeless, the declining ratio of 0.3 credit is also stationary. 0 We will verify the effectiveness of collusive COs’ detection

Average credit of colluders of credit Average −0.3 in REDS when the network size is 60. Define 15 collusive 1 5101520 26 nodes are randomly distributed and they have equal change to ∼ Execution time (min) be COs. In each coordination managers’ domain, 2 3random colluders are included at most in the random collusion mode. REDS group collude 15 Group collusion mode represents the network including REDS group collude 10 several random colluders and 1∼2 collusion groups. All of Figure 7: Average credit of group colluders. coordination observers in each collusion group agree with selfish observed nodes to report falsified high reputation evidences. Figure 6 demonstrates the detection time for collusive coordination observers. We can see that group collusion detection is slightly faster than random collusion in REDS. 2 ThroughreputationfeedbacksonCOsandCMs,REDS 1.7 amends their trust weights. We have assumed that all of coor- dination managers are trustworthy. As to group collusion, it is 1.4 easier for CM to evaluate the behaviors of all of coordination observers in its own management domain. 1.1 Figures 7 and 8 verify the stability of REDS in the 0.8 conditions of random collusion and group collusion. The network size is 60, and the total of colluders (including group 0.5 and random colluders) is 15. Figure 7 represents the average 0.2 credit of colluders when the number of group colluders is 10

Average credit of colluders of credit Average (5 random collusion, in addition) or 15 (no random collusion −0.1 in the network). We can see that average credit decreasing speed of 15 group colluders is 0.088 per minute, slightly faster −0.4 than 10 group colluders (0.069 per minute). According to 1 5 101520 26 the results of Figure 6, group colluders are detected in less Execution time (min) time due to the trustworthy weights of group colluders and their high-level coordination managers are always lower than REDS 60 REDS 120 others. Figure 8 presents observation results of average credit Figure 8: Average credit of colluders over different network size. of colluders over different network size (60 or 120). If all 10 International Journal of Distributed Sensor Networks collusivevehiclesbecomeCOs,thenthenumberofcollusive Acknowledgments COsis1/4ofthetotal.Weadoptreputationfeedbackand credit update in REDS, and each observed node insures more This work was partly supported by NSFC (61372108, than 5 COs to detect itself though the network size enlarges. 61401033), Ph.D. Programs Foundation of Ministry of Edu- REDS detects colluders in a stable speed and approximately cation of China (no. 20110005110011), Fundamental Research regardless of network size in the distributed conditions. Funds for the Central Universities (no. 2014RC1102), and Figure 9 represents the network traffic consumption Beijing Higher Education Young Elite Teacher Project in different reputation evaluation system. The simulation (YETP0474). settingsarefollowedasinFigure 3.Thepacketssizeof reputation evidence and weight feedback is 512 bytes. For References simplicity, the following algorithms do not add more nodes for new ONs after removed selfish ONs and collusive COs [1] M. T. Refaei, L. A. DaSilva, M. Eltoweissy, and T. Nadeem, to blacklist. It means that they only continue to detect old “Adaptation of reputation management systems to dynamic cooperative ONs. network conditions in ad hoc networks,” IEEE Transactions on Curves of DS and ARM have the same gradient and 𝑌- Computers,vol.59,no.5,pp.707–719,2010. value at the same time. ARM collects local reputation and [2] T. Chen, F. Wu, and S. Zhong, “FITS: a finite-time reputation calculates global reputation in the end. DS calculates the system for cooperation in wireless ad hoc networks,” IEEE comprehensive reputation evidence in the light of similar Transactions on Computers,vol.60,no.7,pp.1045–1056,2011. rule. DS detects selfish observed nodes faster than ARM [3] S. Wang, C. Fan, C.-H. Hsu, Q. Sun, and F. Yang, “A vertical according to Figure 3, and totally it shows a lower con- handoff method via self-selection decision tree for internet of sumption than ARM after 43 minutes. REDS-fc means the vehicles,” IEEE Systems Journal,vol.99,pp.1–10,2014. simulation results adopt reputation evidence feedback as [4] S. Zhong, Y. R. Yang, and J. Chen, “Sprite: a simple, cheat-proof, REDS, but coordination managers gather reputation evi- credit-based system for mobile ad-hoc networks,”in Proceedings dences at stable period. It produces more extra network of the 22nd Annual Joint Conference on the IEEE Computer and traffic consumptions than others because trustworthy weight Communications Societies (INFOCOM ’03),pp.1987–1997,San Francisco, Calif, USA, April 2003. feedback packets are distributed to coordination managers in fixed cycle. REDS determines an adaptive gathering cycle [5] J. Mundinger and J.-Y. Le Boudec, “Analysis of a reputation according to evaluators’ applications and velocities in the systemforMobileAd-HocNetworkswithliars,”Performance network. The changing gathering cycle can effectively reduce Evaluation,vol.65,no.3-4,pp.212–226,2008. gathering consumptions though adopting feedback evidence [6] D.Ghosh,D.A.Pados,R.Acharya,andJ.Llinas,“Ondempster- mechanism. So REDS makes better performance than others. shafer and bayesian detectors,” IEEE Transactions on Systems, Man, and Cybernetics Part A: Systems and Humans,vol.36,no. 5, pp. 688–693, 2006. [7] C. Romer and A. Kandel, “Applicability analysis of fuzzy 5. Conclusion inference by means of generalized Dempster-Shafer theory,” IEEE Transactions on Fuzzy Systems,vol.3,no.4,pp.448–453, In the paper, we propose a three-layer reputation evidence 1995. decision system (REDS) to detect misbehaving nodes in VANETs. REDS can distinguish fraudulent information from [8] Z. Li and H. Shen, “A hierarchical account-aided Reputation Management system for large-scale MANETs,” in Proceedings real reputation evidences and avoid credits of cooperative of the International Conference on Computer Communications nodes being affected by falsified information. Collusive coor- (INFOCOM ’11), pp. 909–917, Shanghai, China, April 2011. dination observers usually conspiratorially report fraudulent [9]T.AnantvaleeandJ.Wu,“Reputation-basedsystemforencour- reputation evidences in a random or group collusion way. aging the cooperation of nodes in mobile ad hoc networks,” in If only ignores highly deviated information rather than Proceedings of the IEEE International Conference on Communi- punishes premeditated reporters, collusion will always exist. cations (ICC ’07), pp. 3383–3388, IEEE, Glasgow, UK, June 2007. We feed back trust degree of each coordination observer to [10] F. Oliviero and S. P. Romano, “A reputation-based metric for its coordination manager, thus helping reputation evidence secure routing in wireless mesh networks,” in Proceedings of the combination and collusion detection. The credits of the IEEE Global Telecommunications Conference (GLOBECOM ’08), coordination observers decreased or increased according pp.1–5,NewOrleans,La,USA,December2008. to the results of their trust degree weights. Moreover, an [11] J.-P.Hubaux, T. Gross, J.-Y.Le Boudec, and M. Vetterli, “Toward adaptive reputation evidence gathering cycle is proposed to self-organized mobile ad hoc networks: the terminodes project,” replace frequent polling mechanism and save the network IEEE Communications Magazine,vol.39,no.1,pp.118–124,2001. traffic. The simulation results demonstrate REDS having high [12]Z.Ji,W.Yu,andK.J.R.Liu,“Agametheoreticalframework performance of detection for selfish and collusive behaviors. for dynamic pricing-based routing in self-organized MANETs,” IEEE Journal on Selected Areas in Communications,vol.26,no. 7,pp.1204–1217,2008. Conflict of Interests [13] A. Mukherjee and H. M. Kwon, “General auction-theoretic strategies for distributed partner selection in cooperative wire- The authors declare that there is no conflict of interests less networks,” IEEE Transactions on Communications,vol.58, regarding the publication of this paper. no.10,pp.2903–2915,2010. International Journal of Distributed Sensor Networks 11

[14] S. Marti, T. J. Giuli, K. Lai, and M. Baker, “Mitigating routing misbehavior in mobile ad hoc networks,” in Proceedings of the 6th Annual International Conference on Mobile Computing and Networking (MOBICOM ’00), pp. 255–265, Boston, Mass, USA, August 2000. [15] L. Wei, Z. Cao, and H. Zhu, “MobiGame: a user-centric rep- utation based incentive protocol for delay/disruption tolerant networks,” in Proceedings of the 54th Annual IEEE Global Telecommunications Conference (GLOBECOM ’11),pp.1–5, Houston, Tex, USA, December 2011. [16] L. Yaqiong, X. Weilian, L. Keqiu, C. Zhongxian, M. Geyong, and Q. Wenyu, “DHTurst: a robust and distributed reputation system for trusted peer-to-peer networks,” in Proceedings of the IEEE Global Telecommunications Conference (GLOBECOM ’10), pp.1–6,Miami,Fla,USA,2010. [17] R. R. Yager, “Cumulative distribution functions from Dempster- Shafer belief structures,” IEEE Transactions on Systems, Man, and Cybernetics Part B: Cybernetics,vol.34,no.5,pp.2080– 2087, 2004. [18] C. K. Murphy, “Combining belief functions when evidence conflicts,” Decision Support Systems,vol.29,no.1,pp.1–9,2000. [19] K. Liu, J. Deng, P. K. Varshney, and K. Balakrishnan, “An acknowledgment-based approach for the detection of routing misbehavior in MANETs,” IEEE Transactions on Mobile Com- puting,vol.6,no.5,pp.536–550,2007. [20] Y. Xi and E. M. Yeh, “Pricing, competition, and routing for selfish and strategic nodes in multi-hop relay networks,” in Proceedings of the IEEE 27th Conference on Computer Commu- nications (INFOCOM '08), pp. 1463–1471, Phoenix, Ariz, USA, April 2008. [21]P.Reichl,S.Egger,R.Schatz,andA.D’Alconzo,“Thelogarith- mic nature of QoE and the role of the Weber-Fechner law in QoE assessment,” in Proceedings of the IEEE International Con- ference on Communications (ICC ’10),pp.1–5,CapeTown,South Africa, May 2010. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 530194, 19 pages http://dx.doi.org/10.1155/2015/530194

Research Article Accurate Real-Time Traffic Speed Estimation Using Infrastructure-Free Vehicular Networks

Zongjian He, Buyang Cao, and Yan Liu

School of Software Engineering, Tongji University, Shanghai 201804, China

Correspondence should be addressed to Zongjian He; [email protected]

Received 22 April 2015; Revised 8 July 2015; Accepted 12 July 2015

Academic Editor: Ching-Hsien Hsu

Copyright © 2015 Zongjian He et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Real-time traffic speed is indispensable for many ITS applications, such as traffic-aware route planning and eco-driving advisory system. Existing traffic speed estimation solutions assume vehicles travel along roads using constant speed. However, this assumption does not hold due to traffic dynamicity and can potentially lead to inaccurate estimation in real world. In this paper, we propose a novel in-network traffic speed estimation approach using infrastructure-free vehicular networks. The proposed solution utilizes macroscopic traffic flow model to estimate the traffic condition. The selected model only relies on vehicle density, which is less likely to be affected by the traffic dynamicity. In addition, we also demonstrate an application of the proposed solution in real-time route planning applications. Extensive evaluations using both traffic trace based large scale simulation and testbed based implementation have been performed. The results show that our solution outperforms some existing ones in terms of accuracy and efficiency in traffic-aware route planning applications.

1. Introduction always reflect current situation since many emergent events (e.g., traffic accident) or temporary events (e.g. road surface Nowadays, public traffic is a serious problem in big cities. Bil- maintenance) can lead to significant traffic flow variation. lions of hours are wasted everyday on traffic congestions. In Recently, using vehicular crowdsourcing to collect float- addition,emissioncausedbyvehicleshasbecomeoneofthe ing car data (FCD) for speed estimation [7]hasattractedthe major sources of air pollution. To tackle these problems, peo- attention of both academic and industrial bodies. Compared ple have developed many intelligent transportation system with infrastructure based approaches, the data collection (ITS) applications to reduce vehicle traveling time by route cost of crowdsourcing is significantly reduced by leveraging planning [1] and to reduce emission by driving advisory [2]. individual users’ contribution. However, the data transmis- To develop such ITS applications, real-time traffic informa- sion cost is still considerably high due to the use of cellular tionisakeyprerequisite.Withaccuratereal-timetrafficinfor- data to collect FCD for centralized data processing. In many mation as prior knowledge, the performance of route plan- ITS applications (e.g., route planning), the real-time traffic ningandemissionreductioncanbesignificantlyimproved. information of a road segment is only interested by the nearby How to obtain real-time traffic information is one of the vehicles. In these scenarios, an in-network traffic speed major issues to be solved. Conventional methods leverage estimation solution is especially promising. Moreover, in- traffic monitoring infrastructures, such as video surveillance network processing can also reduce the cost of long distance cameras [3], inductive loops [4], or the combination of them data transmission. to collect traffic data [5]. The main problem of this approach With the rapid advancement of wireless communication is the low availability of these facilities, due to the high and embedded technology, using vehicular ad hoc networks deployment and maintenance cost. One alternative approach (VANET) to collect traffic information becomes popular is to analyze historical traffic data [6]tofindoutsomesta- recently [8–11]. Traffic information can be collected through tistical traffic patterns. Unfortunately, historical data can not vehicle to infrastructure (V2I) or vehicle to vehicle (V2V) 2 International Journal of Distributed Sensor Networks communication. However, it is not easy to collect floating car S data using VANETs. Considering the unique characteristics N1 N2 of VANETs and the application scenario, several challenging issues are raised: (i) Network Disconnection. Vehicle mobility is highly dynamic,whichcancausethenetworktobefre- quently disconnected. When using VANET to collect N3 traffic information, an interesting contradiction can be found between traffic condition and network condition. Good traffic condition (high vehicle speed, low traffic density) usually leads to poor network condition (high packet loss, opportunistic network) andviceversa.Thesolutionmusttoleratethepoor N4 N5 E network conditions. (ii) Vehicle Speed Variation.Vehiclesonroadsdonot Figure 1: Application scenario and system model: using V2V travel using constant speed. The individual vehicle communication to collect real-time traffic information. speedcanhaveremarkablechangeinashortperiod. For example, a red light is in front, or a taxi stops at the request of passengers. The instant variation of The contributions of this work can be summarized as floating car data can lead to inaccuracy to the traffic follows: estimation algorithm. A good analysis model must be able to eliminate this variation. (1) We propose a floating car data collection protocol, which leverages V2V communication. It can collect (iii) Insufficient Traffic Sampling.Duetotheinfrastruc- floating car data in segment level granularity and it is ture-less nature of VANETs, it is not easy to monitor adaptive to different network conditions. an area for a long period of time. Moreover, the fast-changing individual vehicle speed and fragile (2) We adopt Underwood density-speed traffic flow network topology can potentially interfere with the model [15] developed by traffic scientists to predict data collection. Hence, the data sampling is always the traffic speed. This model can eliminate the tempo- insufficient. The traffic estimation algorithm needs to rary speed variations to improve the estimation accu- deal with insufficient traffic sampling condition. racy, efficient enough for in-network data processing. (3)Weapplytheproposedsolutiontotheshortest- To tackle these challenges, some infrastructure based time route planning application. A heuristic based solution has been proposed. These solutions utilize roadside path finding algorithm is proposed to show how the unit (e.g., Wi-Fi access points [12], cellular base stations proposed solution works in real world applications. [13], etc.) and vehicle to infrastructure (V2I) communication to monitor the traffic condition of a fixed area. With the (4) Extensive evaluations and analysis are conducted help of roadside infrastructure, continuous sampling of an using both large scale simulation and testbed imple- area and caching collected data can easily be achieved. mentation. Evaluation results show that our solution However, these solutions have the same deployment problem outperformssomestaticanddynamicrouteplanning as those traffic facility based solutions. Other researches rely solutions. on the assumption that vehicles travel with constant speed [8, 14]. Without considering vehicle speed variation, some The remainder of this paper is organized as follows: straightforward traffic estimation algorithms like time mean relatedworksaresummarizedinSection 2.TheMICEprob- speed or space mean speed can be developed. However, this lem is formulated in Section 3.ThesolutiontoMICEis assumptiondoesnotholdinrealworldanditcanleadto presented in Section 4 in detail. In Section 5,anapplication inaccurate traffic speed estimation results. oftheproposedsolutionisintroduced.Theevaluations In this paper, we propose a novel in-network traffic and results will be analyzed in Section 6.Finally,Section 7 information collection and estimation solution. We name it concludes this paper. MICE or Model based Infrastructure-free traffic Collection and Estimation. In MICE, traffic information is collected 2. Related Work using infrastructure-free approach. Then, traffic condition is estimated using in-network data processing and macroscopic Several related works on using VANET to estimate traffic traffic flow model. The application scenario is depicted in speedcanbefoundinliterature.Wefirstintroducetheworks Figure 1. When a vehicle wants to know the traffic condition on traffic information collection, followed by existing traffic of nearby roads, it sends a traffic collection request using speed estimation solutions. V2V communication to ambient vehicles on demand. Those vehicles that received the request send their information back 2.1. Traffic Information Collection. Solutions on traffic infor- to the original vehicle for traffic condition estimation. mation collection can be classified by whether they rely International Journal of Distributed Sensor Networks 3 on road side infrastructure. Road side infrastructure can infrastructure-free data collections can usually get sparse simplify network protocol design since it is a convenient place data. to store, cache, and analyze data. Many infrastructure based Li et al. [14] proposed two traffic estimation algorithms: solutionshavebeenproposed[9, 10, 16, 17]. link-based algorithm (LBA) and vehicle-based algorithm PeerTIS and Kyun queue are two typical infrastructure (VBA). LBA estimates the road segment traffic only using based solutions. PeerTIS [13] firstly constructs a peer to peer vehicles at the beginning and the end of the road segments, overlay using cellular networks among vehicles. A traffic while VBA utilizes all vehicles. The results are compared with information dissemination protocol is developed to share the ground truth captured by video surveillance. Both LBA information among vehicles. The drawbacks of using cellular and VBA use vehicle speed to estimate traffic. The algorithms networks as infrastructures are the high communication cost. are suitable with dense data. Kyun queue [18] proposed a novel solution to use RSSI to BeeJamA [24] is a heuristic solution for dense data. monitor the road traffic congestion. Specifically, it monitors It is derived from the honey bee behavior to avoid traffic the length of the waiting queue in front of a road intersection congestion. A density-speed model is used to rate the con- by observing the interference caused by stopping cars. The gestion. However, this approach requires data to be collected proposed solution is simple and yet effective. However, road continuously from an area and therefore only works with the side wireless nodes still need to be deployed as infrastructures help of roadside infrastructure and V2I communication. in advance. Besides BeeJamA, researchers have developed many Infrastructure-free solutions only use communication other heuristic models like neural networks [25]basedand among vehicles and no extra infrastructure needs to be genetic algorithm [26] based solutions for traffic estimation. deployed. Therefore, it is more flexible8 [ , 19]. MobSampling, However, these heuristic algorithms usually demand dense Geocache, and V2R2 are three typical solutions of this type. data as training set and also require centralized processing. PGB [20] is an infrastructure-free data collection solu- Therefore, they are not suitable for the case of infrastructure- tion. The key idea is to allow receivers to determine forward- free VANET. ing or dropping the packet. With receiver-based decision, When dealing with sparse floating car data, different theoverheadofcontrollingmessage(e.g.,RTS/CST)can analysis models can be applied to estimate the traffic con- be eliminated, and the communication performance can dition. Some straightforward solutions use basic statistic be improved. The paper recommends using geographical analysis techniques like mean vehicle speed [8]ormeanpass information or signal strength to group the receivers, and time [17]. Unfortunately, these schemes only work under the only the receivers that satisfy the predefined conditions can assumption of constant vehicle speed. In real world, they may forward the data. not be able to accurately reflect the real traffic condition (e.g., MobSampling [21] uses infrastructure-free vehicular net- data are collected when the traffic light is red). works to collection traffic information. A role switching StreetSmart [19] is a congestion discovery solution using algorithm is developed to cache the data within certain V2V communication. It uses distributed clustering to calcu- geographical regions. When the vehicle with cached data late traffic condition. This approach is useful for long term moves out of the region, it is required to pass the data traffic monitoring since it needs to construct and maintain a to another vehicle. Geocache [22] is a pull-based geocast cluster structure. Unfortunately, it is not flexible enough for protocol combined with caching mechanism to reduce the on-demand traffic estimation. communication throughput. Both MobSampling and Geo- VAN [8] has exactly the same functional requirement cache work effectively under dense traffic. Otherwise, they and the same traffic collection design concern with our will fail if no nearby vehicle is available. V2R2 [23]uses work. It uses average speed to estimate the traffic condition unicast along the shortest path and multicast for the return and the candidate paths are bounded by packets’ time-to- trip to collect the traffic condition around navigation source live attribute. VAN can be considered as the state-of-the-art and destination. However, V2R2 ignores the data collection route planning solution using infrastructure-free vehicular of roads with sparse traffic, which may limit the application networks, and we will compare our solution with VAN in our scenarios of the solution. evaluation. Different from existing infrastructure-free solutions, our Different from the aforementioned solutions, MICE does solution is designed for both dense and sparse traffic sce- not require training dataset and only utilizes macroscopic narios. Moreover, our solution does not have the cost of traffic flow model to estimate traffic speed. This density-speed establishing and maintaining in-network cache. Therefore, model can handle sparse data since it only relies on vehicle there is no “warm-up” phase at the very beginning. density, which varies slightly in a continuous time period.

2.2. Traffic Speed Estimation. After floating car data is col- 3. Problem Statement lected, how to leverage these data to estimate traffic is another important issue. The traffic estimation algorithm must be 3.1. Preliminaries. In our research, we assume vehicles have designed according to the properties of the data. Generally, navigation devices with GPS installed onboard. The road floating data can be categorized as dense data and sparse networks topology, vehicle’s current position, velocity, and data, depending on the sampling frequency. Infrastructure global time can all be retrieved via GPS devices. In addition, based data collections are useful to obtain dense data, while we further assume vehicles can communicate with each other 4 International Journal of Distributed Sensor Networks using V2V communication standard like DSRC to form the Intuitively,thetrafficdensityandfloatingdatasnap- vehicular networks. shot have some correlations. Researchers have conducted Before we formulate the problem, some definitions shall extensive evaluations and built several models to investigate be introduced first. the correlation. Both urban driving scenario [27, 28]and highway driving scenario [29] have been studied. Among all Definition 1 (road segment). A road segment is a 5-tuple 𝑟= the models, Poisson arrival process has been widely adopted {𝑠(𝑥, 𝑦), 𝑒(𝑥, 𝑦), V𝑚𝑙, 𝑟}⃗ ,where𝑠 and 𝑒 are the start and end because of the versatility and simplicity. It has been used point with location (𝑥, 𝑦). V𝑚 isthespeedlimitoftheroad to model the arrival of cars at toll gate, traffic light waiting segment. 𝑙 is the number of lanes. 𝑟⃗ is the direction of the road queue, and a road segment. In our research, we adopt this segment and 𝑟∈{𝑠→𝑒,𝑒→𝑠}⃗ .Theroadsegmentlength result. Therefore, given a traffic snapshot of a road seg- can be approximately calculated by the Euclidean distance ment, the corresponding traffic density can be calculated as 2 2 ‖𝑟‖ = √(𝑒⋅𝑥−𝑠⋅𝑥) +(𝑒⋅𝑦−𝑠⋅𝑦) .Forconvenience follows. purpose, road segment can also be denoted using start and Since we also assume vehicles follow Poisson arrival ⟨ ⟩ process, as a result, the distances among consecutive vehicles end point as se . 𝑑 −𝜆𝑥 𝑉𝑟 are exponentially distributed with pdf 𝑓(𝑥) = 𝜆𝑒 . Definition 2 (vehicular network). Vehicular network is a Under this distribution, the traffic density can be expressed wireless ad hoc network formed by vehicles. At a specific time, as itcanbedefinedasagraphVN =(𝑉,𝐶),where𝑉 is the 𝑘= 1 = 1 =𝜆, vehicle set and 𝐶 is network connections. A vehicle V ∈𝑉 𝑑 (2) 󳨀→ 𝐸(𝑉𝑟 ) 1/𝜆 can be further defined as a 3-tuple {id, pos(𝑥, 𝑦), vel},where idistheunifiedidentifierofthevehicle,likeplatenumber.pos 𝐸(𝑉𝑑) 󳨀→ where 𝑟 is the mathematical expectation of the distance is current position and vel is current velocity. We denote the among vehicles on road segment 𝑟.Equation(2) shows that mean network transmission range as tr, which means there the traffic density is also exponentially distributed with mean exists a network connection between two vehicles if their value 𝑘.Moreover,(2) also shows that the distribution only Euclideandistanceislessthantr. relies on the number of vehicles on the road segment and their traveling speed will not affect the result. However, 𝑘 is Definition 3 (floating car data snapshot). A floating car data an unknown variable for each road segment. We will leave snapshot is the traffic state of a road segment at a particular this equation as an intermediate result to be used in later pointoftime.Itcanbedescribedasavectorofvehicles,their sections. positions, and velocities. The floating car data snapshot of The symbols and notations used in this paper are summa- 𝑡 road segment 𝑟 at time 𝑡 is denoted as 𝑉𝑟 =(V1,𝑡, V2,𝑡,...,V𝑛,𝑡). rizedinSummaryofNotations.

Definition 4 (traffic condition). Traffic condition of aroad 3.2. Problem Formulation. With the above definitions and segment can be defined as a series of floating car data assumptions, the objective of MICE is to (1) collect and then snapshotssampledfortheroadsegmentinconsecutivetime (2) estimate the traffic condition of a given road segment. periods 𝑝=[𝑡0,𝑡1,...,𝑡𝑛]. It can be denoted as a group of 𝑡 𝑡 𝑡 The traffic information collection problem is a design {𝑉 0 ,𝑉 1 ,...,𝑉 𝑛 } floating car data snapshots: 𝑟 𝑟 𝑟 . issue. We need to design a network data collection protocol Alternatively,itcanalsobetransformedasagroupof for VANET to collect traffic information. In practice, the vehicles that have appeared on the road segment during the 𝑉𝑝 ={V , V ,...,V } traffic density may vary from time to time. Consequently, time period 𝑟 1 2 𝑛 , and every vehicle has three the network connection is not always available when traffic attributes {id,𝑡𝑟,𝑠𝑟},whereidisthesameidentifierasin 𝑡 density is low. The design objective of the protocol is as Definition, 2 𝑟 is the time duration which appears on road follows: segment 𝑟,and𝑠𝑟 is the length travels on road segment 𝑟. Obviously, 𝑠𝑟 ≤𝑟⋅𝑙and 𝑡𝑟 ≤𝑡𝑛 −𝑡0. (1) Adaptive.Theprotocolshouldbeadaptivetodifferent With the latter representation, we can use space mean traffic density. Specifically, it needs to handle network speed to denote the traffic condition as disconnections in sparse traffic condition. (2) Infrastructure-Free. The protocol should not rely on ∑V∈𝑉𝑝 V ⋅𝑠𝑟 V = 𝑟 . (1) any road side infrastructure or cellular station. Only ∑ 𝑝 V ⋅𝑡𝑟 V∈𝑉𝑟 V2V networks should be used. This definition is reasonable because when people talk (3) On-Demand. The protocol should not wait a period of about traffic condition of an area, they usually refer to the time to warm up before it can function well. It must average condition during a time period, and so does our work on demand. definition. (4) Real-Time. The traffic information needs to be col- lected and estimated with low latency. Definition 5 (traffic density). Traffic density 𝑘 of a road segment is defined as the number of vehicles per unit length Sincewedonotutilizeinfrastructureorcache,theresults per lane. The inverse of density 𝑑=1/𝑘 isthemeanheadway ofadatacollectioninstanceareatrafficsnapshot,which distance between adjacent vehicles. canbeusedtoestimatethetrafficspeed.Thetrafficspeed International Journal of Distributed Sensor Networks 5

(a) Dense connection (b) Sparse connection

(c) Partial disconnection (d) Disconnection

Figure 2: Four VANET connection states, depending on different vehicle density. estimation problem can be regarded as a data analysis issue. (2) Sparse Connection. Vehicles on the same direction can It can be formulated as follows. only be connected with the help of vehicles from the opposite side. Given (3) Partial Disconnection. The vehicle does not have next (1) A single road segment 𝑟 = {𝑠(𝑥,𝑦),𝑒(𝑥,𝑦),V𝑚𝑙, 𝑟}⃗ . hop candidate, but it is still connected with the previous hop neighbor. (2) Space mean speed V in a period of time 𝑝= [𝑡0,𝑡1,...,𝑡𝑛]. (4) Total Disconnection. The vehicle does not have any 𝑡 neighbors, it is completely disconnected. (3) A traffic snapshot 𝑉𝑟 as specific time 𝑡∈𝑝. Thedesignobjectiveoftheprotocolistobeadaptive V =𝑓(𝑉𝑡) with all these connection states. Therefore, different packet Objective. Find a mapping function est 𝑟 to minimize forwarding strategies shall be considered for different state. The complete packet forwarding algorithm on the arrival ofa ΔV = (V − V)2 . est (3) newpacketisshowninAlgorithm 1. For dense connection, packets will be forwarded greedily Equation (3) shows that we want to minimize the error like GPSR [30] to the vehicle in neighbor table which is the between the estimated value and the calculated value (ground closest to road segment end and has the same direction as the truth). In our research, we use traffic trace and our own road segment (line (4)). For sparse connection, packets have testbed. In both cases, the ground truth of the traffic speed to be forwarded to a vehicle on the opposite direction (line canbeeasilyobtained. (6)). Otherwise, the vehicle will carry the received packet (lines (10) and (12)) for a while and try again. The packet 4. Solution carrying period is set to one second in our implementation. It is also possible that current vehicle is on the opposite direc- In this section, we focus on how to collect and estimate traffic tion of the road segment. In this case, vehicle will never carry speed for asingleroad segment. In real world, estimating packet, since the longer time it carries the packet, the further the traffic condition of a single road segment does not seem from the road segment end it will be. In this case, the vehicle necessary, since it can be directly observed by the drivers most attheoppositesidewillfirstlytrytoforwardthepacket of the times. However, the solution introduced in this section to vehicles with the same direction as the road (line (16)) can be easily extended to a road network composed by many andthenseekforanotheroppositedirectedvehicle,which connectedroadsegments. is closer to the road segment end as an alternative (line (18)). When designing the packet forwarding protocol, two 4.1. Traffic Information Collection. The traffic speed estima- widely adopted strategies can be considered: sender-based tion request can be initiated by any vehicle that wants to know decision and receiver-based decision, depending on who the surrounding information at any time. After the request is determines the next hop destination. They have differ- initiated, the request packets are forwarded to nearby vehicles ent strengths and weaknesses. Generally, solutions using hop by hop. To demonstrate how the protocol works, we use receiver-based decision can reduce the overhead of control- asingleroadsegment,forinstance. ling message by eliminating multiple handshakes. Differently, The traffic density changes from time to time, causing those using sender-based decision are more flexible and VANET to be disconnected frequently. Based on the connec- adaptive to the environment, because the sender usually tion status of VANET, we can define four different states, as collects information of all candidates and then makes deci- depicted in Figure 2. They are as follows: sion. In our application scenario, the protocol needs to be adaptive to different traffic conditions and flexibility isthe (1) Dense Connection. Vehicles on the same direction can key requirement. Therefore, we decide to adopt sender-based be connected directly. decision. 6 International Journal of Distributed Sensor Networks

Road direction

f b b f CTS CTS c c CTS s CTS d s Forward d CTS a e a e

tr tr

(a) Data collection (b) Packet forward

Figure 3: The RTS/CST scheme and forward strategy.

Input: The received packet 𝑝 Input:TheneighbortableNT Input: The current vehicle information vi Input: The current road segment 𝑟 (1) procedure trafficcollection(𝑝,NT,vi,𝑟) 󳨀→ (2) if 𝑟⋅𝑟=⃗ vi ⋅ vel then // same direction 󳨀→ (3) if ∃𝑉𝑠 ⊆ NT s.t. ∀V ∈𝑉𝑠, vi ⋅ vel =𝑟⋅𝑟⃗ and V is closer to 𝑟⋅𝑒then // Dense connection (4) Greedy forward 𝑝∪vi to 𝑉𝑠 (5) else if ∃𝑉𝑟 ⊆ NT s.t. ∀V ∈𝑉𝑟, V is closer to 𝑟⋅𝑒then // Sparse connection (6) Greedy forward 𝑝∪vi to 𝑉𝑟 (7) Feedback speedestimation(𝑝∪vi) (8) else if ¬∃V ∈ NT s.t. V is closer to 𝑟⋅𝑒and NT =⌀̸ then // Partial disconnection (9) Feedback speedestimation(𝑝∪vi) (10) Carry 𝑝 (11) else // NT =⌀Disconnection (12) Carry 𝑝 (13) end if →󳨀 (14) else // 𝑟⃗ ≠ vi, different direction 󳨀→ (15) if ∃𝑉𝑠 ⊆ NT s.t. ∀V ∈𝑉𝑠, vi ⋅ vel =𝑟⋅𝑟⃗ then // Forward to vehicles with same direction as road (16) Greedy forward 𝑝 to 𝑉𝑠 (17) else if ∃𝑉𝑟 ⊆ NT s.t. ∀V ∈𝑉𝑟, V is closer to 𝑟⋅𝑒then // Forward to vehicles with different direction as road (18) Greedy forward 𝑝 to 𝑉𝑟 (19) Feedback speedestimation(𝑝) (20) end if (21) end if (22) end procedure

Algorithm 1: Packet forwarding algorithm on receiving a new packet.

To implement the sender-based decision, we design an make no contribution to speed estimation. In this example, RTS/CTS scheme to collect traffic information as well as build vehicles {𝑎, 𝑏, 𝑐, 𝑑,𝑓} will receive the broadcasted RTS from neighbor table NT mentioned as an input of Algorithm 1. 𝑠 and send CTS back. 𝑠 will update its neighbor table This procedure can be illustrated as in Figure 3. When the accordingly and then the vehicle information from {𝑎, 𝑑} will forwarded packet is received by vehicle 𝑆, it will firstly broad- be appended to local packet. After applying Algorithm 1, 𝑠 will cast RTS with its own position information to all one-hop forward the packet to 𝑑.Vehicle𝑐 will not be selected simply neighbor vehicles. Then neighbors will respond by sending because its direction is opposite with the road, even though it a CTS packet together with the 3-tuple vehicle information is closer to 𝑛𝑒 than 𝑑. 󳨀→ {id, pos(𝑥, 𝑦), vel}. All the received vehicle information will The data collection result can be treated as a snapshot be used to build the neighbor table but only vehicles with of floating car data. After all vehicles on the road segment thesamedirectionsastheroadsegmentwillbestoredand are collected or one of the disconnection states occurs, the estimated later because the opposite side traffic conditions current traffic speed will be estimated. Specifically, speed International Journal of Distributed Sensor Networks 7 estimation algorithm is invoked if one of the following Underwood density-speed model 20 conditions is satisfied:

(1) Packet reaches a new road segment or destination. (2) Sparse connection or partial connection occurs. 15 (3) The specified time interval has elapsed.

Condition (2) has been shown in lines (7) and (9) of 10 Algorithm 1. Condition (3) is used to handle the special case that the traffic density is low but current vehicle moves slowly Vehicle speed (m/s) Vehicle (e.g., stop for red light or temporary parking). 5 After the speed has been estimated, the solution also uses greedy forwarding algorithms to send the estimated speed backtothesourcevehicle.Whenthesourcevehiclereceives 0 the estimated speed, it will store the data locally for further 0 0.1 0.2 0.3 0.4 0.5 usage. It is possible to receive multiple feedbacks for a single Vehicle density (vehicle/m) road segment. In this case, the one with the latest time stamp V = will be kept. Figure 4: Underwood density-speed traffic model with 𝑓 20, 𝑘𝑐 = 0.1. 4.2. Traffic Speed Estimation. The traffic speed estimation problem has been formulated in Section 3.Ifwelookat where V𝑓 is the free flow speed and 𝑘𝑐 is the optimum density. the objective function in (3), it looks like an optimization That is the density corresponding to the maximum traffic flow problem. However, it can not be directly solved by any opti- and 𝑘 is current density. Figure 4 shows a typical curve of mizationmethods,becauseweareusingsparsedata(traffic Underwood model. snapshot) to estimate the dense data (traffic condition). And When optimum traffic density 𝑘𝑐 occurs, the average the dense data is unknown but has correlations with the vehicle speed is V𝑓/2[15]. We further assume adjacent vehi- sparse data. To estimate the speed, we need to model the rela- cles keep a safety distance, which means if a vehicle applies tionship between the data we have and the data we want to get. maximum deceleration and stopped, a following vehicle must In this research, instead of training a model by ourselves, be able to stop before hitting the previous one. We adopt the which requires extensive dataset and computation, we decide safety distance defined in32 [ ]as to utilize existing macroscopic traffic models developed in traffic engineering. Macroscopic traffic model studies the 𝐷safe =𝑐𝑎𝑥+𝑐̈ V𝑥+𝑐̇ 𝑝, (5) relationship among density, flow, and speed. In our research, we select Underwood model [15], which is a typical density- where 𝑥̈ and 𝑥̇ denotetheaccelerationandvelocityof speed model. vehicles, respectively. For simplicity, 𝑐𝑎 is set to be 0, 𝑐V is set The reasons we choose Underwood density-speed model to be 2 seconds (two-second rule [33]), and 𝑐𝑝 = 10 m. In this are twofold. Firstly, several properties can be obtained from case, the optimum density 𝑘𝑐 canberepresentedas the floating data snapshot, like speed, density, vehicle posi- tion, and so forth. We need to select suitable features to 𝑘 = 1 = 1 = 1 . 𝑐 V + (6) build the model. Many existing works selected speed [8, 𝐷safe (𝑐V = V𝑓/2) (V𝑓/2)×2 + 10 𝑓 10 14, 17]. However, we observe that the variance of speed within a period of time is significant. To determine the Another issue is how to determine current density from varianceofthespeed,weanalyzethetraffictracedata the collected floating car data snapshot. As described in (2), 𝜆 𝜆 from Cologne (details are introduced in Section 6), and the is an unknown value. Now, we want to estimate from the VMR (variance-to-mean ratio) of speed is 8.7, while the collected floating car data snapshot. VMR of density is 4.5. Figure 5 shows the distribution of From the floating car data snapshot we collected, we can speed and density. Therefore, density is more stable than construct the vector of distances between adjacent vehicles 𝑉𝑑 =(𝑋,𝑋 ,...,𝑋 ) 𝑋 =‖V ⋅ , V ⋅ speedandcanbetterreflectthetrafficconditioninatime as 𝑟 1 2 𝑛−1 ,where 𝑖 𝑖 pos (𝑖+1) period. Secondly, many macroscopic density-speed models pos‖. Applying maximum likelihood parameter estimation have been calibrated using site data, for example, Greenberg, formula for exponential distribution, 𝜆 canbeestimatedas Underwood, and Drake [31]. Different models have different 1 strength and weakness. Underwood is more accurate for 𝜆= . (7) 𝑋 uncongested condition compared with other models. Judging from Figure 5(b), the probability of uncongested condition is Considering the traffic regulations, we assume free flow much higher than congested condition. speed is the same as maximum allowed speed; that is, V𝑓 = V𝑚. The original Underwood model can be described as Combining (4), (6),and(7) together, we get

−𝑘/𝑘𝑐 −(V𝑚+10)/𝑋 Vest = V𝑓𝑒 , (4) Vest = V𝑚𝑒 , (8) 8 International Journal of Distributed Sensor Networks

5 ×10 ×104 5 6

5 4

4 3

3 Times Times 2 2

1 1

0 0 0 10 20 30 0 10 20 30 Vehicle speed (m/s) Number of vehicles per lane (a) Speed distribution (b) Density distribution

Figure 5: The distribution of different vehicle properties. where 𝑋 is the average vehicle distance per lane and problem is a typical stochastic shortest path problem with ∑𝑖<𝑛−1 𝑋 recourse (SSPPR) in graph theory, which explores adjacent 𝑋= 𝑖=0 𝑖 ×𝑟⋅𝑙. (9) nodes in a graph until finding the destination. Before explor- (𝑛−1) inganode,theweightoftheassociatededgesisunknown.The It is also possible to fail to collect traffic information for problem has been proved to be NP-complete [34] and hence a road segment. This is mainly caused by the sparse traffic. has no polynomial time solution unless P = NP. In this case, we assume the average vehicle distance is larger Our objective here is not to propose a better approxima- than tr and 𝑋=tr. tion algorithm for this difficult problem. Instead, we just want The speed for a specific road segment can be estimated to demonstrate the application of our proposed estimation using (8) and (9).Theonlyvariablesintheseequationsarethe solution in a specific scenario. To solve this problem, we distances among vehicles, which can be obtained from traffic designed a heuristic solution according to two common information collection results. senses: (1) the longer the path is, the longer the time it may take. (2) It makes no sense to choose another longer path 5. MICE in Route Planning Application when shortest path is not congested. We name the candidate path selection algorithm Backoff-and-Fork or BnF in short. The previous section introduced how to collect traffic data The basic idea is derived from the two common senses. For and how to estimate traffic speed for a single road segment (1), we define a total length constraint, which means the total in MICE. In this section, we apply the proposed solution to a length of a candidate path can not exceed the threshold. For typical and popular ITS application: real-time route planning. (2), we define a speed threshold, which means if the estimated This application utilizes the estimated traffic speed to finda speedoftheshortestpathroadisslowerthanthethreshold, shortest-time route for a vehicle. To find the shortest-time othernearbyalternativepathswillbesearched. route, traffic condition of multiple road segments needs tobe The complete BnF algorithm is shown in Algorithm 2. collected and estimated. At the beginning, the algorithm will only choose the road However, designing such an application is not trivial. To segments on the shortest path as candidate paths (lines (1)– find a global shortest-time path, traffic information of all (3)). Then the data collection request packets are sent to all roads is prerequisite. But considering a city with thousands candidate paths. After that, whenever a packet arrives at a of roads in real world, it is not feasible to collect information new road segment, it will collect traffic information of all of all roads since the search space is extremely huge. To make neighbor road segments that have not been collected and thesolutionpractical,wehavetobetolerantwithasuboptimal then estimate speed (lines (7)–(9)). If the estimated speed solution by collecting traffic information for part of the roads is good enough, it will go on with the next road segments. andthenmakedecision. However, if the speed is lower than the predefined threshold Since the traffic information is unknown and should (line (10)), the algorithm will send a backoff packet to the beestimatedinreal-time,theshortest-timerouteplanning previous road segment (backoff). Then, all the neighbor road International Journal of Distributed Sensor Networks 9

Input: RN: The road network. Input: Navigation starting point 𝑛𝑠, end point 𝑛𝑒 and current road intersection 𝑛𝑐. Input: 𝑓Threshold: The speed threshold. Input: Θ: The length threshold. // Initialize. (1) for all sp ∈ shortestpath(RN, 𝑛𝑠, 𝑛𝑒) do (2) 𝑠𝑝.IsCandidate = True (3) end for // On packet arrive at road segments. (4) if 𝑛𝑐 == 𝑛𝑒 then (5) return (6) end if (7) for all 𝑟𝑠𝑐 ∈𝑛 .NeighborRoad do (8) if rs.IsCandidate and not rs.IsCollected then // Collect data on road rs. (9) EstimatedSpeed = speedestimate(rs) (10) if EstimatedSpeed/(𝑟𝑠 ⋅ V𝑚)<𝑓Threshold then // Backoff and fork. (11) for all 𝑟𝑝 ∈𝑛𝑐.NonCandidateNeighborRoad do (12) Length = shortestpathlength(RN −𝑟𝑝, 𝑟𝑝 ⋅𝑒, 𝑛𝑒) (13) if Length + CollectedLengh <Θthen (14) for all r ∈ shortestpath(RN −𝑟𝑝, 𝑟𝑝 ⋅𝑒, 𝑛𝑒) do (15) 𝑟.IsCandidate = True (16) end for (17) end if (18) end for (19) end if (20) end if (21) end for

Algorithm 2: Backoff-and-Fork candidate path selection.

segments that have not been selected as candidate path will S be used as a starting point to build a new shortest path to end point (fork), and the newly built shortest path will be added to the candidate path set if the length has not exceeded a b the threshold (lines (11)–(13)). To avoid overlapping between c the new and old shortest path, the paths connecting existing candidate paths are excluded when executing the shortest path algorithm (line (12)). d f Figure 6 can be used to demonstrate how the BnF algo- rithm works. The starting point and end point are 𝑆 and 𝐸, respectively. In the initial phase, the shortest path (𝑆,𝑐,ℎ,𝐸) h ⟨𝑆𝑐⟩ ⟨𝑆𝑐⟩ g is selected. Then, is collected. The estimated speed of i is good, so it continues with the next candidate path ⟨𝑐ℎ⟩. At this time, the estimated speed of ⟨𝑐ℎ⟩ is too slow, and the E 𝑐 𝑑 algorithm will back off to and fork to the neighbors and Collected path 𝑓.Thenewshortestpathsto𝐸 are found to be (𝑑, 𝑔, 𝑒) and Normal junction (𝑓,ℎ, 𝑒) ⟨𝑐𝑑⟩ ⟨𝑑𝑔⟩ ⟨𝑔𝐸⟩ ⟨𝑐𝑓⟩ Shortest path junction Candidate path . Then, new candidate paths , , , , Normal path Congested path and ⟨𝑓ℎ⟩ areaddedtothesearchlist. The algorithm will terminate when the request packets Figure 6: An example of Backoff-and-Fork algorithm. arrive at the navigation destination.

6. Performance Evaluation choose two evaluation methods because both of them have advantages and disadvantages. The traffic trace provides a 6.1. Experiment Setup. In this section, we evaluate the per- realistic evaluation scenario. However, some parameters like formance of MICE using both small-scaled testbed imple- the average vehicle density or speed are not configurable. mentation and traffic trace based large-scaled simulation. We Consequently, we can not use the trace to test the impact 10 International Journal of Distributed Sensor Networks

(a) iTranSNet testbed and topology (b) Cologne road network topology

Figure 7: iTranSNet testbed and cologne topology.

Predefined Cologne trace scenarios file

(1) Deploy (1) Import (6) Path iTranSNet SUMO planning result (2) Execute (2) Convert

NS trace file MICE MICE algorithm algorithm (7) Planning (3) Import performance

(3) Network and NS-3 (4) Execute estimation performance (5) Traffic collection performance Evaluation Evaluation results results (a) Implementation (b) Simulation

Figure 8: Evaluation flow chart. of these parameters. On the contrary, the testbed is more on MICAz with TinyOS [36]. In our implementation, we set flexible, but the road topology and traffic scale are very the transmission power to the lowest level (approximately limited. Figures 7 and 8 show the testbed, road network 1 m) to enable multihop among vehicles. The positions of all topology, and flow chart of the evaluation. mini cars can be determined by sensors on iTranSNet. The We implemented the MICE on iTranSNet [35]. The vehicles follow the traffic light control rules [37]. We run the iTranSNet is a testbed with several programmable mini cars, experiments under several configurations: dense traffic (25 which is modified from toy cars by ourselves. The moving cars), sparse traffic (12 cars), and some intermediate values. speed of the toy cars is very slow, approximately 0.4 m/s, The experiments are repeated 50 times with arbitrary route and we can control the speed with program. The size of planning starting and end points. iTranSNet platform is 3 m × 6m.Theroadnetworktopology For simulation, we use the traffic trace dataset from of iTranSNet is illustrated in Figure 7(a).Theminicarsare Cologne in Germany provided by [38], where detailed controlled by onboard MICAz wireless sensor nodes. The analysisofthetracecanalsobefound.Trafficsimulator MICAz sensor nodes can also communicate with each other SUMO [39]isusedtosimulatethetrafficmobilityand using IEEE 802.15.4. The MICE algorithm is implemented network simulator NS-3 [40]isusedtosimulateVANETs International Journal of Distributed Sensor Networks 11

×104 12000 2

10000 1.5 8000

6000 1 Total time (s) Total

4000 count packets Total 0.5 2000

0 0 0 500 1000 1500 2000 0 500 1000 1500 2000 Total length (m) Total length (m)

Dense Dense Sparse Sparse (a) Latency (b) Number of packets

Figure 9: Network evaluation results using iTranSNet testbed.

Table 1: NS-3 simulation parameters. received. We use the time stamp of the last packet instead of the first one because Algorithm 1 may send multiple Parameter Value feedbacks; the last one is the one we finally use and it usually MAC/PHY standard IEEE 802.11p SCH contains more accurate estimation than the previous ones. Propagation delay mode Constant speed The network overhead is represented by the total number of MAC type Ad hoc Wi-Fi MAC packets that have been sent. Propagation loss model Range propagation loss model Figure 9 shows the traffic collection evaluation results. Transmission range 100 m Two major factors are evaluated: path length and traffic Packets carry duration 1 second density. The results (distance and time cost) of multiple Neighbor wait duration 0.3 second evaluations are added together and plotted in Figure 9. From Figure 9(a),wecanseethatthelatencyincreasesas thepathlength.Andforthesamelength,thelatencyfor communication and run MICE algorithm. Table 1 shows sparse traffic is usually larger than the case of dense traffic. other parameter settings for NS-3. The simulation process Thisiscausedbythefrequentpacketcarryinginsparse worksasdepictedbyFigure 8(b):firstly,asubsetofthetraffic traffic condition. Figure 9(b) showsthatthetotalnumberof trace file (geographical region [50.9222–50.9552, 6.9077– packets transmitted also increases as the path length. For the 6.9624]) is imported into SUMO to generate the trace file same length, more packets are transmitted in dense traffic that can be used by NS-3. After that, NS-3 simulator will condition. This is because of the RTS/CST scheme depicted run the MICE algorithm using the mobility trace and get in Figure 3. When the traffic is dense, after an RTS is sent, the route planning result as output. Meanwhile, the network more CTS replies are generated and transmitted over the air. performance data are generated. Finally, the route planning Figure 10 illustrates the traffic collection evaluation results are imported into SUMO again to evaluate the route results using traffic trace. Werun the experiments many times planning performance. A Python script is used to automate and sum up the distance and time consumption. As we can this process and the simulation is repeated 50 times with see, the increase trend of latency and the number of packets arbitrary starting and end points as well as starting time. sent are similar as the results obtained by testbed. Moreover, theresultsaremoreconvincingsincetheroadcondition, vehicle speed, and distribution are more realistic. The net- 6.2.TrafficCollectionEvaluation.To evaluate the perfor- work latency of is less than 1 min/km. In real application mance of traffic collection protocol, we are interested in the scenario, the delay is acceptable. network latency and the network overhead. The network latency is defined as 𝑇latency =𝑇req −𝑇last feedback,where𝑇req is the time stamp of the collection request which is sent and 6.3. Speed Estimation Evaluation. To evaluate the perfor- 𝑇last feedback is the time stamp of the last feedback which is mance of traffic speed estimation algorithm, we consider 12 International Journal of Distributed Sensor Networks

×104 15000 2

1.5 10000

1

Total time (s) Total 5000

Total packet count packet Total 0.5

0 0 0 50 100 150 200 0 50 100 150 200 Total length (km) Total length (km) (a) Latency (b) Number of packets

Figure 10: Network evaluation results using traffic trace.

14

12

10

8

6

4 Mean estimation error estimation Mean

2

0 0 0.05 0.1 0.15 0.2 Density (vehicle/(m∗lane))

MICE VAN

Figure 11: Traffic density and speed estimation accuracy. the impact of traffic density and time window length 𝑝 in the density-speed model used by MICE can better reveal the traffic conditionDefinition ( ). 4 Data of a single road segment truth in most cases. However, the estimation error of MICE is collected and estimated. The road segment is selected has a remarkable increase trend when the traffic density randomly and the experiments are repeated 50 times. We is high. There are two reasons for this. First, Underwood compare our solution with VAN [8], which calculate the density-speed model we select performs better in low density mean speed of collected vehicles to represent the traffic speed. scenario. Second, when vehicle density reaches 0.2 (headway The mean estimation error is calculated using (10). Therefore, distanceis5m),thetrafficishighlycongestedandthevehicles the smaller the error is, the better the method works are almost stopped. Then, the variance is not significant, the 2 mean speed method used by VAN can even better reflect the 𝑛 (V𝑖 − V) est ground truth. 𝐸 = ∑ . (10) 𝑖=1 𝑛 Figure 12 shows the relationship between estimation error and time window size. The size of the time window affects the Figure 11 illustrates the relationship between traffic den- value of traffic condition mean speed V. If the time window sity and the estimation error. The unit of density is the is small enough, V is close to instant speed. In this case, the number of vehicles per meter per lane. From this figure, estimation errors tend to be significant. This trend can be we can see that, in most of the cases, the estimation errors observed in Figure 12(a).ForFigure 12(a),thevehicledensity of MICE are smaller than VAN, which indicates that our is fixed at 0.05 vehicle per meter per lane. For Figure 12(b), method outperforms VAN in traffic speed estimation. The the density of traffic trace can not be controlled. In most of key insight is that, compared with mean speed used by VAN, the cases, MICE performs better than VAN, which further International Journal of Distributed Sensor Networks 13

6 100

5 80

4 60 3 Error Error 40 2

20 1

0 0 0 50 100 150 200 0 50 100 150 200 Time window size (s) Time window size (s)

MICE MICE VAN VAN (a) Testbed (b) Trace

Figure 12: Time window size and speed estimation accuracy.

Successful collection ratio 0.95

0.9

0.85 (%) 0.8

0.75

0.7 Sparse Dense Density

Figure 13: Collection ratio.

validates that density-speed model is a better option than the shortest-time path in SUMO or iTransNet testbed to mean speed. Another observation is that the relationship obtain the actual time consumption. In this way, we can find between time window size and the accuracy of the algorithm out the performance of these solutions in real applications. is not obvious. This result reveals the insight that, in real case, We firstly evaluate the successful collection ratio of the traffic condition is stable within certain time period (e.g., road segments. The collection ratio is defined as count(𝐶𝑖)/ within 200 seconds). It is also noticeable that the errors in count(𝐶),wherecount(𝐶) isthenumberofroadsegments Figure 12(b) are much larger than Figure 12(a). This is mainly in all candidate paths and count(𝐶𝑖) isthenumberofroad because, in real traffic traces, the variation of car speed is segments that has been collected successfully. The collection much larger (0–80 km/h) than that in testbed (0–1.5 km/h). failure is usually caused by packets loss or extreme sparse traffic. In Figure 13, a steady increase for successful collection 6.4. Route Planning Application. Finally, we evaluate the ratiocanbefound,fromabout75%to95%.However, performance of different speed estimation solutions by the increase trend is not obvious after the density reaches putting them into route planning application. We calculate a specific threshold. The reason for this is that, after the the shortest-time path using the estimated traffic speed threshold is reached, the VANETs approximately become a from these solutions and then let the vehicles travel along fully connected graph. Therefore, the packet loss rate is then 14 International Journal of Distributed Sensor Networks

Candidate path searched 500

400

300

200

Candidate path length (km) length path Candidate 100

0 0.5 1 1.5 2 2.5 3 3.5 4 Shortest path length (km)

BnF Ellipse

Figure 14: Candidate path.

0.8 0.8

0.6 0.6

0.4 0.4 (%) (%)

0.2 0.2

0 0 Dense Sparse Same Diff. SP = MST= MVAN= M

All same Dijkstra = MICE All different VAN = MICE (a) Results using testbed (b) Results using trace

Figure 15: Overview of shortest-time path planning results. reduced dramatically. The average collection ratio using trace better result when route planning. Then, the total length of the onNS-3isabove90%sincethetraceiscollectedduring candidate path is depicted in Figure 14.Wecanseethatour morning rush hour. BnFalgorithmcansaveupto75%ofthesearchpaths.Asa The performance of BnF algorithm is also evaluated. The result, the network communication overhead can be reduced evaluation is only performed with trace data since the results significantly. are not obvious on iTranSNet due to the small scale. We Finally, we evaluate the route planning performance compare our heuristic solution with a spatial constrained using different route planning algorithms. For route planning broadcast solution, which collects traffic information of all evaluation, we are interested in the effectiveness of route roads within an ellipse with navigation starting point and end planning, that is, how much time can be saved, and the travel point as two foci of the ellipse. In the evaluation, we set the overhead, that is, how many extra distances have to be trav- length threshold Θ to 3 times of the shortest path length and elled in order to bypass the congested road segments. In the then increase the speed threshold 𝑓Threshold gradually until evaluation, we compare MICE with two static route planning our solution and the ellipse-based solution have the same or algorithms: shortest path Dijkstra algorithm (SP, the weight International Journal of Distributed Sensor Networks 15

Overall efficiency Time saved 12 2

10 0

8 −2 6 −4 Time cost (min) Time

4 (min) saved Time

−6 2

0 −8 0 2 4 6 0 2 46 Shortest path distance (km) Shortest path distance (km)

SP SP VAN VAN MICE MICE Distance increased 0.2

0.15

0.1

0.05 Increased distance (km) distance Increased 0

−0.05 0246 Shortest path distance (km) SP VAN MICE

Figure 16: Performance results for path planning application in dense traffic using iTranSNet testbed.

of edges is ‖𝑟‖) and shortest-time Dijkstra algorithm (ST, the completely different results. This is caused by the small scale. weight of edges is ‖𝑟‖/𝑟⋅V𝑚)andonedynamicrouteplanning For traffic trace based simulation, only 30% of the results are algorithm VAN [8], which uses mean speed to estimate traffic. identical.Itcanalsobeobservedthatthesimilaritybetween On iTranSNet, due to hardware limitation, the maximum MICE and VAN is higher than the two static ones. allowed speed for all road segments is the same; thus the The overall efficiency charts in Figures 16 and 17 reveal that shortest path and the shortest-time planning algorithm are our algorithm works better in dense traffic conditions, com- identical. Therefore, we ignore the results for shortest-time pared with spare ones. This conclusion does not contradict planning algorithm on iTranSNet. the results from Figure 11,becausetheshortest-timeroute Given the same navigation starting and ending points, planning algorithms can bypass dense road segments and different route planning algorithms may generate either the select sparse ones automatically. In sparse traffic scenarios, same or different route planning results. Figure 15 shows theperformanceofthethreealgorithmsisquitesimilardueto the similarity and differences of the algorithm output. On traffic congestion, although MICE indeed has some improve- iTanSNet testbed, the route planning results for SP, VAN, ment. In contrast, MICE has about 25% time saving compared and MICE solutions are quite similar: about 60% of the total with Dijkstra algorithm and about 15% time saving compared trieshavethesameresult,andonly5%oftotaltrieshave with VAN. For the trace based simulation case in Figure 18, 16 International Journal of Distributed Sensor Networks

Overall efficiency Time saved 4 0.05

3.5 0

3 −0.05 2.5 −0.1

Time cost (min) Time 2 Time saved (min) saved Time

−0.15 1.5

1 −0.2 0 0.5 1 1.5 2 0 0.5 1 1.5 2 Shortest path distance (km) Shortest path distance (km) SP SP VAN VAN MICE MICE

Distance increased 0.2

0.15

0.1

Increased distance (km) distance Increased 0.05

0 0 0.5 1 1.5 2 Shortest path distance (km) SP VAN MICE

Figure 17: Performance results for path planning application in sparse traffic using iTranSNet testbed.

MICE has about 15% time saving compared with Dijkstra Figure 18, it is interesting to discover that the overhead of algorithm and about 5% time saving compared with VAN. MICE is only a little higher than the shortest-time algorithm The time saved charts in Figures 16 and 17 use the same and about 10% lower than VAN. In these figures, the improve- evaluation results as overall efficiency but use the time cost ment of MICE is not that obvious. As depicted in Figure 15, for the shortest path as baseline for better understanding. An about 75% of the path planning results for VAN and MICE interesting observation can be found in which, in the trace are the same. In order to reflect the real performance, we did based simulation, sometimes the shortest-time algorithm not remove these duplicated results in the charts. spends even longer time than shortest path one. The result is consistent with our experiences. However, analyzing the 7. Conclusion resultisoutofthescopeofthispaper. Finally, the distance increased chart shows the travel In this paper, we have proposed MICE, a traffic estimation overhead to bypass the congested road. It also uses shortest solution by collecting and analyzing surrounding traffic path length as baseline. It is observed that the travel overhead information using VANETs in real-time. The traffic collec- is controlled within 10%. For the trace based simulation in tion solution is infrastructure-free and scalable compared International Journal of Distributed Sensor Networks 17

Overall efficiency Time saved 12 2

10 1

8 0 6 −1 Time cost (min) Time

4 (min) saved Time

−2 2

0 −3 0 2 4 6 0 2 4 6 Shortest path distance (km) Shortest path distance (km)

SP VAN SP VAN ST MICE ST MICE

Distance increased 1.5

1

0.5 Increased distance (km) distance Increased

0 0 2 4 6 Shortest path distance (km)

SP VAN ST MICE

Figure 18: Performance results for path planning application using traffic trace.

𝑡 with conventional infrastructure based ones. We have also 𝑉𝑟 : The vector containing floating car data for road employed a novel density-speed traffic model to estimate segment 𝑟. a.k.a snapshot traffic condition using the collected floating car data. Then, 𝑘: The traffic density for a single road segment we have applied the proposed algorithm to a shortest-time 𝑑: Themeanheadwaydistanceofaroadsegment route planning applications to demonstrate the performance Vest: The estimated traffic speed for specific road segment of the solution. Extensive evaluations using both testbed 𝐷safe: Minimum safety distance between adjacent vehicles based implementation and trace based simulation have been 𝑘𝑐: The optimum density or the maximum flow density 𝑃 conducted. The results have shown that our solution can out- 𝑉𝑟 : Vehicles appearing in road segment 𝑟 during time perform some existing ones in terms of network transmission period 𝑝 𝑑 overhead, route planning effectiveness, and traffic overhead. 𝑉𝑟 : The vector containing distance between adjacent vehicles for road segment 𝑟. Summary of Notations 𝑟 or ⟨se⟩: A single road segment Conflict of Interests ‖𝑟‖: Thelengthofroadsegment𝑟 VN: The vehicular networks The authors declare that there is no conflict of interests tr: Mean network transmission range for VN regarding the publication of this paper. 18 International Journal of Distributed Sensor Networks

Acknowledgment [15] A. May, Traffic Flow Fundamentals, Prentice Hall, 1990. [16] M. H. Arbabi and M. C. Weigle, “Using vehicular networks This research is partially supported by Microsoft Research to collect common traffic data,” in Proceedings of the 6th Asia Accelerating Urban Informatics with Azure Program. ACM International Workshop on VehiculAr Inter-NETworking (VANET ’09), pp. 117–118, ACM, New York, NY, USA, Septem- References ber 2009. [17]Y.Yu,B.Liu,T.Wu,andM.Liu,“Flow-basedtravelplanvia [1] Z. He, J. Cao, and T. Li, “MICE: A real-time traffic estimation VANET,” International Journal of Digital Content Technology based vehicular path planning solution using VANETs,” in and its Applications,vol.5,no.6,pp.163–171,2011. Proceedings of the 1st International Conference on Connected [18] R. Sen, A. Maurya, B. Raman et al., “Kyun queue: a sensor Vehicles and Expo (ICCVE ’12), pp. 172–178, December 2012. network system to monitor road traffic queues,” in Proceedings [2] C. Li and S. Shimamoto, “An open traffic light control model for of the 10th ACM Conference on Embedded Network Sensor reducing vehicles’ CO2 emissions based on ETC vehicles,” IEEE Systems (SenSys ’12), pp. 127–140, ACM, Toronto, Canada, Transactions on Vehicular Technology,vol.61,no.1,pp.97–110, November 2012. 2012. [19] S. Dornbush and A. Joshi, “Streetsmart traffic: discovering and [3]B.Tian,Q.Yao,Y.Gu,K.Wang,andY.Li,“Videoprocessing disseminating automobile congestion using vanet,” in Proceed- techniques for traffic flow monitoring: a survey,” in Proceedings ings of the Vehicular Technology Conference (VTC-Spring ’07), ofthe14thIEEEInternationalIntelligentTransportationSystems pp. 11–15, April 2007. Conference (ITSC ’11), pp. 1103–1108, October 2011. [20] V. Naumov, R. Baumann, and T. Gross, “An evaluation of inter- [4] K. Singh and B. Li, “Estimation of traffic densities for multilane vehicle ad hoc networks based on realistic vehicular traces,” in roadways using a markov model approach,” IEEE Transactions Proceedings of the 7th ACM International Symposium on Mobile on Industrial Electronics, vol. 59, no. 11, pp. 4369–4376, 2012. Ad Hoc Networking and Computing (MobiHoc ’06),pp.108–119, [5] Q.-J. Kong, Z. Li, Y. Chen, and Y. Liu, “An approach to Urban May 2006. traffic state estimation by fusing multisource information,” IEEE [21] L. Garelli, C. Casetti, C. Chiasserini, and M. Fiore, “Mobsam- Transactions on Intelligent Transportation Systems,vol.10,no.3, pling: V2v communications for traffic density estimation,” in pp. 499–511, 2009. Proceedings of the 73rd IEEE Vehicular Technology Conference [6] J.Jeong,S.Guo,Y.Gu,T.He,andD.H.C.Du,“Trajectory-based (VTC-Spring ’11), pp. 1–5, 2011. data forwarding for light-traffic vehicular Ad Hoc networks,” [22] A. Lakas and M. Shaqfa, “Geocache: sharing and exchanging IEEE Transactions on Parallel and Distributed Systems,vol.22, road traffic information using peer-to-peer vehicular commu- no. 5, pp. 743–757, 2011. nication,” in Proceedings of the IEEE 73rd Vehicular Technology [7] R. Stanica, M. Fiore, and F.Malandrino, “Offloading floating car Conference (VTC Spring ’11), pp. 1–7, IEEE, May 2011. data,” in Proceedings of the IEEE 14th International Symposium [23] J.-W. Ding, C.-F. Wang, F.-H. Meng, and T.-Y. Wu, “Real-time on a World of Wireless, Mobile and Multimedia Networks vehicle route guidance using vehicle-to-vehicle communica- (WoWMoM ’13),pp.1–9,June2013. tion,” IET Communications,vol.4,no.7,pp.870–883,2010. [8] W.Chen,S.Zhu,andD.Li,“VAN:vehicle-assistedshortest-time [24] H. F. Wedde and S. Senge, “Beejama: a distributed, self- path navigation,” in Proceedings of the 7th IEEE International adaptive vehicle routing guidance approach,” IEEE Transactions Conference on Mobile Adhoc and Sensor Systems (MASS ’10),pp. on Intelligent Transportation Systems,vol.14,no.4,pp.1882– 442–451, November 2010. 1895, 2013. [9] K. Collins and G.-M. Muntean, “A vehicle route management [25] V. Hodge, R. Krishnan, T. Jackson, J. Austin, and J. Polak, solution enabled by wireless vehicular networks,”in Proceedings “Short-term traffic prediction using a binary neural network,” of the IEEE INFOCOM Workshops, pp. 1–6, IEEE, April 2008. in Proceedings of the 43rd Annual Universities’ Transport Studies [10] F. Calabrese, M. Colonna, P. Lovisolo, D. Parata, and C. Ratti, Group Conference (UTSG ’11), Open University, Milton Keynes, “Real-time urban monitoring using cell phones: a case study in UK, 2011. Rome,” IEEE Transactions on Intelligent Transportation Systems, [26] H. Kanoh and K. Hara, “Hybrid genetic algorithm for dynamic vol.12,no.1,pp.141–151,2011. multi-objective route planning with predicted traffic in a real- [11] T.Nadeem, S. Dashtinezhad, C. Liao, and L. Iftode, “Trafficview: world road network,” in Proceedings of the 10th Annual Genetic traffic data dissemination using car-to-car communication,” and Evolutionary Computation Conference (GECCO ’08),pp. ACM SIGMOBILE Mobile Computing and Communications 657–664, ACM, New York, NY, USA, July 2008. Review,vol.8,no.3,pp.6–19,2004. [27] G. Comert and M. Cetin, “Analytical evaluation of the error [12] C. Lochert, B. Scheuermann, C. Wewetzer, A. Luebke, and in queue length estimation at traffic signals from probe vehicle M. Mauve, “Data aggregation and roadside unit placement for data,” IEEE Transactions on Intelligent Transportation Systems, a vanet traffic information system,” in Proceedings of the 5th vol. 12, no. 2, pp. 563–573, 2011. ACM International Workshop on VehiculAr Inter-NETworking [28]G.K.S.Mung,A.C.K.Poon,andW.H.K.Lam,“Distributions (VANET ’08), pp. 58–65, ACM, September 2008. of queue lengths at fixed time traffic signals,” Transportation [13] J. Rybicki, B. Scheuermann, M. Koegel, and M. Mauve, Research Part B: Methodological,vol.30,no.6,pp.421–439,1996. “PeerTIS—a peer-to-peer traffic information system,” in Pro- [29] F. Bai and B. Krishnamachari, “Spatio-temporal variations of ceedings of the 6th ACM International Workshop on VehiculAr vehicle traffic in VANETs:facts and implications,”in Proceedings Inter-NETworking (VANET ’09), pp. 23–32, September 2009. of the MobiHoc6th ACM International Workshop on VehiculAr [14] X. Li, W. Shu, M. Li, H.-Y. Huang, P.-E. Luo, and M.-Y. Wu, Inter-NETworking (VANET ’09),pp.43–52,ACM,September “Performance evaluation of vehicle-based mobile sensor net- 2009. works for traffic monitoring,” IEEE Transactions on Vehicular [30] B. Karp and H. T. Kung, “Gpsr: greedy perimeter stateless Technology,vol.58,no.4,pp.1647–1653,2009. routing for wireless networks,” in Proceedings of the 6th Annual International Journal of Distributed Sensor Networks 19

International Conference on Mobile Computing and Networking (MobiCom ’00), pp. 243–254, ACM, New York, NY, USA, 2000. [31] S.Ardekani,M.Ghandehari,andS.Nepal,“Macroscopicspeed- flow models for characterization of freeway and managed lanes,” Institutul Politehnic din Iasi. Buletinul. Sectia Constructii. Arhitectura,vol.57,no.1,2011. [32] D. N. Godbole and J. Lygeros, “Longitudinal control of the lead car of a platoon,” IEEE Transactions on Vehicular Technology, vol. 43, no. 4, pp. 1125–1135, 1994. [33] Wikipedia, “Two-second rule—wikipedia, the free encyclope- dia@online,” 2013, https://en.wikipedia.org/wiki/Two-second rule. [34] G. Andreatta and L. Romeo, “Stochastic shortest paths with recourse,” Networks, vol. 18, no. 3, pp. 193–204, 1988. [35] U. Poly, “iTransnet,” 2010, http://imc.comp.polyu.edu.hk/isens- net/doku.php?id=research. [36] P. Levis, S. Madden, J. Polastre et al., “Tinyos: an operating system for sensor networks,” in Ambient Intelligence,W.Weber, J. Rabaey, and E. Aarts, Eds., pp. 115–148, Springer, Berlin, Germany, 2005. [37]B.Zhou,J.Cao,X.Zeng,andH.Wu,“Adaptivetrafficlightcon- trol in wireless sensor network-based intelligent transportation system,” in Proceedings of the 72nd IEEE Vehicular Technology Conference Fall (VTC ’10), pp. 1–5, IEEE, Ottawa, Canada, September 2010. [38] S. Uppoor and M. Fiore, “Large-scale urban vehicular mobility for networking research,” in Proceedings of the IEEE Vehicular Networking Conference (VNC ’11), pp. 62–69, November 2011. [39] M. Behrisch, L. Bieker, J. Erdmann, and D. Krajzewicz, “Sumo— simulation of urban mobility: an overview,”in Proceedings of the 3rd International Conference on Advances in System Simulation (SIMUL ’11), Barcelona, Spain, October 2011. [40] T. Henderson, M. Lacage, G. Riley, C. Dowell, and J. Kopena, “Network simulations with the ns-3 simulator,” in Proceedings of the ACM SIGCOMM Conference on Data Communication (SIGCOMM ’08),Seattle,Wash,USA,2008. Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 271067, 10 pages http://dx.doi.org/10.1155/2015/271067

Research Article A Multimetric Ant Colony Optimization Algorithm for Dynamic Path Planning in Vehicular Networks

Zhen Wang, Jianqing Li, Manlin Fang, and Yang Li

Faculty of Information Technology, Macau University of Science and Technology, Avenida Wai Long, Taipa, Macau

Correspondence should be addressed to Jianqing Li; [email protected]

Received 30 April 2015; Accepted 2 July 2015

Academic Editor: Shangguang Wang

Copyright © 2015 Zhen Wang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

With the rapid growth in the number of vehicles, energy consumption and environmental pollution in urban transportation have become a worldwide problem. Efforts to reduce urban congestion and provide green intelligent transport become a hot field of research. In this paper, a multimetric ant colony optimization algorithm is presented to achieve real-time dynamic path planning in complicated urban transportation. Firstly, four attributes are extracted from real urban traffic environment as the pheromone values of ant colony optimization algorithm, which could achieve real-time path planning. Then Technique for Order Preference by Similarity to Ideal Solution methods is adopted in forks to select the optimal road. Finally, a vehicular simulation network is set up and many experiments were taken. The results show that the proposed method can achieve the real-time planning path more accurately and quickly in vehicular networks with traffic congestion. At the same time it could effectively avoid local optimum compared with the traditional algorithms.

1. Introduction and min-max Multidepot Vehicle Routing Problem [6]but did not mention real-time path planning. Li et al. [7] With the rapid development of green intelligent transporta- studied the Travelling Salesman Problem (TSP) with the ant tion, many intelligent transportation path planning algo- colony optimization algorithm and proposed a new multipath rithms were proposed, in order to achieve the optimal plan- routing algorithm based on improved ant colony algorithm. ning path with the least cost from a source to a destination In the paper the ACO was improved in three aspects: add the within a reasonable time. These algorithms focused on the utilization ratio of router’s buffer queue into the criterion of combination of swarm intelligent algorithm, such as artificial selection; update the global pheromone with the utilization bee colony algorithm [1], genetic algorithm [2], and ant ratio of link; select multiple paths to transfer data. This colony algorithm [3], to reduce energy consumption and algorithm can achieve network loading balance and reduce environmental pollution in urban transportation with traffic the likelihood of congestion, but unfortunately it did not congestion. Ant colony optimization algorithm (ACO) [4]is consider real-time traffic and routing planning. Zeng et al. an abstract evolution based on the observation of ant colonies [8] proposed an improved ant colony optimization algorithm searching for food. Considering the similarity between a vehi- by dynamically adjusting the number of ants to solve the cle and an ant in searching for a path, ant colony optimization Chinese Traveling Salesmen Problem. The algorithm only algorithm is widely used in the research and application considered how to get the global best result easily but failed of intelligent transportation. Many scholars have proposed to consider multifactors of road and real-time navigation. different optimization models of the ant colony optimization Moghaddametal.[9] proposed an advanced particle swarm algorithm, based on different research objects and in differ- algorithm to solve uncertain vehicle routing problems in ent application fields. Narasimha and Kumar proposed an which the customers’ demands are supposed to be uncer- improved ant colony optimization algorithm based on solv- tain with unknown distributions. Lee et al. [10]investi- ing the min-max Single Depot Vehicle Routing Problem [5] gated the vehicle routing problem with deadlines, to satisfy 2 International Journal of Distributed Sensor Networks the requirements of a given number of customers with minimum travel distances, while respecting both uncertain customer demands and travel times. At the same time, Philip Chen et al. [11] used the algorithm of Multiple Attribute Decision Making and Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) method, to calculate the best path with the assumption that the road and vehicles are equipped with Internet of Things sensor device, to obtain instant traffic information. But the algorithm is similar to the Dijkstra algorithm [12] to a certain degree; it can only produce partial optimal results. The above-mentioned papers have explored intelligent path planning problems, but there are still some aspects that need to be tackled, particularly in view of the existing intelligent traffic navigation. The existing path planning algorithms mainly focus on the shortest path. Some of them can plan a better path in urban areas with the comprehensive factors, such as path length, driving speed, and road grade, and avoid the heavy traffic path in the beginning of path planning. But for urban Figure 1: The model of road traffic network. traffic problems, especially during rush hours, it is obvious that the shortest path is not always the fastest one, as the traffic situation is a dynamic changing process. Once the result is produced by the existing algorithms, they will not transferred. The main functions of these nodes are described be able to be changed. This means that they would fail to as follows. dynamicallyadjustpathplanningaccordingtothereal-time traffic situation. (A) Information Nodes (as Solid Circles in Figure 1). They Based on the wireless sensor network in the application of are deployed at the intersections, to monitor and receive intelligent transportation [13–15], A Multimetric Ant Colony data (including traffic flow and average velocity) from the Optimization (MACO) algorithm is presented to deal with vehicles moving toward them in all directions, and transmit intelligent traffic real-time path planning problems. The best the comprehensive traffic data to every direction. path is calculated automatically according to dynamic real- time traffic using this algorithm, which can be the shortest (B) Relay Nodes (as Solid Squares in Figure 1).Theyare distance, the shortest time, the best road condition, or the best deployed along both sides of the road and send the data path of comprehensive situations according to customers’ received from the information node in the opposite direction requirements. The MACO contributes to not only planning of the traffic to subsequent vehicles to plan paths. a best path with considering multiple factors of the road, butalsoadjustingthepathplanningdynamicallywiththe (C) Vehicle-Mounted Sensor Nodes. They are installed in real-time traffic situation. And, furthermore, the MACO can vehicles and can transfer data in two ways, that is, by contribute to the best average velocity with the least energy gathering data from relay nodes or the information nodes consumption in green intelligent transportation. The rest of along the road ahead. The optimal route can be identified this paper is organized as follows. The system model of an throughcalculation;meanwhile,dataofthevehicleitself, intelligent transportation network is presented in Section 2. such as average velocity, average time, and path length, and The path planning algorithm based on the ant colony opti- other information will be sent to the node, allowing for the mization algorithm is discussed in Section 3. Section 4 shows comprehensive integration of the information. the simulation results. Finally, the conclusions are given in The three kinds of nodes form a wireless Internet of Section 5. Things for the transportation system. The vehicle-mounted nodes receive data on the traffic ahead from the information 2. System Model nodes and relay nodes to plan a path. Meanwhile, the vehicle can also send its own driving data to relay nodes and 2.1. Intelligent Transportation Network Settings. Avehicular information node, for the traffic network to process data. network is set up for intelligent transportation [15], which The information nodes can simultaneously receive data from includes two subnetworks. The first one is the basic road vehicles in all directions adjacent to the intersection and network, which is deployed in the information node at the then send back processed comprehensive traffic data in the intersection and relay nodes along the roads. The second opposite direction and through relay nodes and spread such is the network of vehicle-mounted sensors. Figure 1 is a data to a further distance. Since the traffic conditions are schematic view of transport at an intersection, in which the constantly changing, it is necessary to put a timestamp on solid line arrows indicate the direction of traffic and the all the information transferred. When the data is received by dotted line arrows indicate the direction in which data is the farther nodes overtime, the nodes will identify such data International Journal of Distributed Sensor Networks 3 as non-real-time and invalid data and will simply discard the 3. Path Planning Algorithm data. 3.1. The Ant Colony Optimization Algorithm. Basedonthe path planning problem in intelligent transportation and the 2.2. Parameters. Assume there are 𝐾 intersection nodes in similarity of ant colony foraging and pathfinding, we can total in the vehicle network. The road segment is either a use the ant colony optimization algorithm to implement the one-way or two-way street. Based on the driving directions path planning in intelligent transportation [13]. As in the of vehicles, the road network can be understood as a directed whole system, different vehicles have different destinations; graph 𝐺. For a vehicle on any segment, it must be driving however, it is assumed that the vehicles share the same away from an intersection and at the same time towards route as the same group of ants in the same road segment. another intersection. For the road segment, the direction in When vehicles pass through a road segment, they transmit which vehicles drive away from an intersection is defined integrated traffic data to the information node, which are as outdegree, and the direction in which the vehicles drive similar to the pheromones of the ant colony optimization toward the intersection is defined as indegree. So the vehicle algorithm. When subsequent vehicles plan a path, they can navigation problem can be the conversion of path planning use these data as an important reference. problem from 𝐴 to 𝐵 onthedirectedgraph. The parameters of ant colony optimization algorithm are Suppose there are 𝑛 outdegrees at an intersection, that is, defined as shown in the following. 𝑛 road segments leaving the intersection. For each outdegree, 𝐿 𝑊 𝐶 it is defined that length is ,width ,roadgrade (based The Description of Parameters on speed limits), and average driving speed 𝑉.Forthe intersection node, comprehensive evaluation is applied to 𝑚: the number of ants (vehicles), each intersection outdegree. 𝑑𝑖𝑗 : the distance between element (intersection) 𝑖 and 𝑗 Definition element (intersection) , 𝜏𝑖𝑗 (𝑡) 𝑡 ∗ :at moment, the residual pheromone on the Road Length 𝐿 .Suppose,inadirectedgraph𝐺 abstracted path between element (intersection) 𝑖 and element from an urban road network, there are 𝑛 outdegrees, with 𝑗 − (intersection) , and at initial time, all the residual lengths of (𝐿1,𝐿2,𝐿3,...,𝐿𝑛),respectively.𝐿 is the road pheromones of paths which are precomputed, segment with the shortest length (outdegree length). The 𝑝𝑘 𝑘 𝑗 outdegree lengths are normalized as follows: 𝑖𝑗 :theprobabilitythatant chooses element from element 𝑖, − ∗ 𝐿 tabu𝑘: recording the element that the 𝑘th ant has gone 𝐿𝑖 = . (1) 𝐿𝑛 through,

allowed𝑘 ={0, 1,...,𝑛 − 1}−tabu𝑘:recordingthe Road Width 𝑊.Thewidthoftheoutdegreeisbasedontraffic allowed element that ant may choose next time, 𝑊 = lane. Supposing only one lane, then 𝑖 1andthenumber 𝜂𝑖𝑗 : the expectations that ants go through from ele- 𝑖 𝑖 of indicates the th outdegree of the intersection. ment 𝑖 to element 𝑗, ∗ 𝛼 Road Grade 𝐶 . The road grade is calculated according to the : determining the relative influence of the speed limits. To calculate simply, we suppose the maximum pheromone trail, speedlimitofthecityroadis120km/h;theroadgradeis 𝛽: determining the relative influence, normalized as follows: 𝜌: Pheromone evaporation rate, 𝐶 ∗ 𝑖 Δ𝜏𝑘(𝑡) 𝑘 𝐶𝑖 = . (2) 𝑖𝑗 : the amount of pheromone ant deposits on 120 the path form element 𝑖 to element 𝑗 visited at 𝑡 time, 𝑄 𝑉∗ 𝑚 : the intensity coefficients of pheromone which are Average Velocity .Suppose vehicles pass a road segment increased, in a particular period; the average velocity of each vehicle is 𝐿𝑘: the length of the tour built by the 𝑘th ant. 𝐿 𝑉 = 𝑖 , 𝑖 Suppose there are 𝑚 ants (vehicles) in the system, every 𝑇end −𝑇start (3) ant has the following characters: (∑𝑖 𝑉) ∗ 1 𝑖 𝑉𝑘 = ;𝑖=1, 2,...,𝑛, (A) To select the next intersection according to the prob- 120 ∗𝑛 ability function with the value of the pheromones between intersections (suppose 𝜏𝑖𝑗 (𝑡) as pheromone where 𝑉𝑖 denotes the average velocity of each vehicle, 𝐿𝑖 the on edge 𝑒(𝑖, 𝑗) at that moment (𝑡)), length that the vehicle drives, 𝑇start the time the vehicle takes to drive in, and 𝑇end thetimethevehicletakestodriveout. (B) To ensure walking along the legal path, the ants ∗ Thus 𝑉𝑘 is the average speed after normalizing all the vehicles being forbidden to access roads which they have at a certain period. passed before except when there is no other route to 4 International Journal of Distributed Sensor Networks

the destination which is controlled by the tabu table Decision Making (MADM). TOPSIS method is often used (suppose tabu𝑘 represents the 𝑘th ant’s tabu table and for solving MADM problems [19, 20]. MADM problems can tabu𝑘(𝑠) represents the 𝑠th element in tabu table), have several solutions [21], in which the most ideal solution (C) To update pheromones on every edge which it has is named the positive ideal solution and the worst solution walked along when the journey is completed. named the negative ideal solution. In the TOPSIS method, the solution which is closest to the positive ideal solution At beginning, the initial value of pheromone on every and farthest from the negative ideal solution is the optimal path is unequal. Suppose 𝜏𝑖𝑗 (0)=𝐶0 (𝐶0 as the precomputed solution [22]. 𝑘 constant). 𝑝𝑖𝑗 (𝑡) presents ant 𝑘’s probability to be transferred from 𝑖 to 𝑗 at 𝑡 time: 3.2.1. Normalized Road Decision Matrix. Suppose each inter- section contains 𝑚 outdegrees; each of outdegree contains 𝑛 𝜏𝛼 (𝑡) ⋅𝜂𝛽 (𝑡) attributevalueintheroadnetwork;thenthematrixbelowis { 𝑖𝑗 𝑖𝑗 𝑘 { 𝑗∈ formed: 𝛼 𝛽 if allowed𝑘 𝑝𝑖𝑗 = {∑ 𝜏 ⋅𝜏 (𝑡) (4) { 𝑠∈allowed 𝑖𝑗 𝑖𝑠 𝑎11 𝑎12 ⋅⋅⋅ 𝑎1𝑛 , [ ] {0otherwise [𝑎 𝑎 ⋅⋅⋅ 𝑎 ] [ 21 21 2𝑛 ] 𝐴=(a , a , a ,...,a )=[ ] , ={, ,...,𝑛 − }− 1 2 3 𝑚 [ . . . ] (7) where allowed𝑘 0 1 1 tabu𝑘 denotes inter- [ . .⋅⋅⋅. . ] sections permitted as the next step by ant 𝑘,tabu𝑘 (𝑘 = 1, 2,...,𝑚) records the intersections ant 𝑘 walks through, [𝑎𝑚1 𝑎𝑚1 ⋅⋅⋅ 𝑎𝑚𝑛] and the set of tabu𝑘 is adjusted dynamically with evolution where (a1𝑖, a2𝑖,...,a𝑚𝑖) represent different outdegrees section processing.Theheuristicfunctionof𝜂𝑖𝑗 denotes the visibility (a , a ,...,a ) (𝑖, 𝑗) of the same intersection; 𝑖1 𝑖2 𝑖𝑛 represent different of edge , calculated with some heuristic algorithms. Nor- parameters of the same section. mally let 𝜂𝑖𝑗 =1/𝑑𝑖𝑗 ,where𝑑𝑖𝑗 denotes the distance between 𝑖 𝑗 𝑘 𝑑 the nodes and .Forant , the smaller the 𝑖𝑗 ,thebiggerthe 𝜔󸀠 =(𝜔󸀠 ,𝜔󸀠 , 𝑘 3.2.2. Calculating the Weight Vectors. Let 1 2 𝜂𝑖𝑗 and the greater the 𝑝𝑖𝑗 .Obviously,theheuristicfunction 󸀠 ...,𝜔𝑛) be the initialized weight value of attribute vector. It 𝑖 𝑗 𝛼 󸀠 denotes expectations of ants access node to node . denotes needs to calculate weight vector 𝜔 maximizing all deviation the importance of trajectory and 𝛽 denotes the importance of 𝑛 values for all the vectors. Formulate a nonlinear program- visibility. After moments, the ant finishes one travel and the ming model: pheromones have to be adjusted on each path as follows: 𝑚 𝑛 𝑛 󸀠 󸀠 max 𝐹(𝜔 )=∑ ∑ ∑𝜔 𝑑(𝑟𝑖𝑗 ,𝑟𝑙𝑗 ), 𝜏𝑖𝑗 (𝑡+𝑛) =(1−𝜌)⋅𝜏𝑖𝑗 (𝑡) +Δ𝜏𝑖𝑗 , 𝑗 𝑖=1 𝑗=1 𝑙=1 𝑚 (5) (8) Δ𝜏 = ∑Δ𝜏𝑘, 𝑚 𝑖𝑗 𝑖𝑗 ∑𝜔󸀠2 =1, ≤𝜔󸀠 ≤ , 𝑘=1 Subject to 𝑗 0 𝑗 1 𝑗=1 𝑘 where 𝜌 (𝜌 ⊂ [0, 1]) is the pheromone decay factor; (Δ𝜏𝑖𝑗 ) where 𝑑(𝑟𝑖𝑗 ,𝑟𝑘𝑗 ) is the distance between different varieties describes pheromones of ant 𝑘 left on the road segment 𝑒(𝑖𝑗) which belong to the same attribute. Set that of this travel; (Δ𝜏𝑖𝑗 ) describes pheromones of all ants left on 2 𝑑(𝑟 ,𝑟 )=(𝑟 −𝑟 ) . the road 𝑒(𝑖𝑗) of this travel: 𝑖𝑗 𝑘𝑗 𝑖𝑗 𝑙𝑗 (9) 𝑄 To solve formula (9),let { if 𝑘th ants access 𝑒 (𝑖, 𝑗) in this travel Δ𝜏𝑘 = 𝐿 𝑚 𝑛 𝑛 1 𝑚 𝑖𝑗 { 𝑘 (6) 𝐻(𝜔󸀠,𝜉)= ∑ ∑ ∑𝜔󸀠𝑑(𝑟 ,𝑟 )− 𝜉(∑𝜔󸀠 −1). 𝑗 𝑖𝑗 𝑙𝑗 2 𝑗 (10) {0otherwise. 𝑗=1 𝑖=1 𝑙=1 𝑗=1

3.2. The Pheromone Computation of MACO. The key part of The partial derivatives of formula (10) are computed as 𝑘 󸀠 𝑛 𝑛 MACO is to determine parameter 𝑝𝑖𝑗 ,namely,theprobability 𝜕𝐻 (𝜔 ) = ∑ ∑𝑑(𝑟 ,𝑟 )−𝜉𝜔󸀠 =0, 1≤𝑗≤𝑚, of ant 𝑘 transfer from node 𝑖 to node 𝑗 at time 𝑡,andfirstlywe 𝜕𝜔󸀠 𝑖𝑗 𝑖𝑙 𝑗 𝑗 𝑖=1 𝑙=1 determine the initial value of pheromone 𝜏𝑖𝑗 (0). (11) 󸀠 Every intersection has some attribute values and every 𝜕𝐻 (𝜔 ) 1 𝑚 attributeneedsadifferentweight.Thisshowstheimportant =− (∑𝜉󸀠2 −1)=0, 1≤𝑗≤𝑚. 𝜕𝜉 2 𝑗 grade, to calculate the pheromones in ant colony optimization 𝑗=1 algorithm. So set a weight value for each attribute of each From formula (11),get outdegree of intersection as (𝜔1,𝜔2,...,𝜔𝑛),andcalculatethe weight with the maximizing deviation method [16]andTech- ∑𝑛 ∑𝑛 𝑑(𝑟 ,𝑟 ) 󸀠 𝑖=1 𝑙=1 𝑖𝑗 𝑙𝑗 nique for Order Preference by Similarity to Ideal Solution 𝜔 = , 1≤𝑗≤𝑚. 𝑗 (12) (TOPSIS) method [17]. The maximum deviation method was √ 𝑚 𝑛 𝑛 2 ∑𝑗=1 (∑𝑖=1 ∑𝑙=1 𝑑(𝑟𝑖𝑗 ,𝑟𝑙𝑗 )) presented in [18]tosolvetheproblemofMultipleAttribute International Journal of Distributed Sensor Networks 5

󸀠 𝜔 𝜔 12345678 Normalizing the final weight from 𝑗 to 𝑗,get 700

𝜔󸀠 𝑛 𝑛 9 10111213141516 𝑗 ∑𝑖=1 ∑𝑙=1 𝑑(𝑟𝑖𝑗 ,𝑟𝑙𝑗 ) 600 𝜔𝑗 = 𝑚 = ,1≤𝑗≤𝑚.(13) ∑ 𝜔󸀠 ∑𝑚 ∑𝑛 ∑𝑛 𝑑(𝑟 ,𝑟 ) 𝑗=1 𝑗 𝑗=1 𝑖=1 𝑙=1 𝑖𝑗 𝑙𝑗 17 18 19 20 21 22 23 24 500

So we have the weights of different attributes, and then we 25 26 27 28 29 30 31 32 can obtain the data of every intersection. 400 33 34 35 36 37 38 39 40 300 3.2.3. Calculating the Positive and Negative Ideal Solutions. 41 42 43 44 45 46 47 48 According to the weight value determined from (13),wecan 200 formulate the normalized decision matrix and obtain the 49 50 51 52 53 54 55 56 positive and the negative ideal solutions as follows: 100

𝜒 =𝜔𝑟 57 58 59 60 61 62 63 64 𝑖𝑗 𝑗 𝑖𝑗, 0 0 200 400 600 800 1000 1200 1400 𝜒∗ =[𝜒∗,𝜒∗,...,𝜒∗], 1 2 𝑛 (14) Source Destination − − − − 𝜒 =[𝜒1 ,𝜒2 ,...,𝜒𝑛 ], Travel distance Lane status Travel time Multiattribute ∗ − subject to 𝜒 =[1], 𝜒 =[0]. Figure 2: The navigation path planning under different conditions.

3.2.4. Calculating the Pheromone Values of MACO. Euler distancecanbeachievedwith𝑚 degrees on each intersection 2 𝑇(𝑛) = 𝑂(𝑁⋅𝑛 ⋅𝑚). And the real-time complexity of MACO node as follows: is lower than ACO because of distributed computing adopted 𝑚 in MACO, which means the pheromones are computed in 2 ∗ ∗ 𝑝𝑖 = √∑𝑑(𝜒𝑖𝑗 ,𝜒𝑗 ) ,1≤𝑖≤𝑛, informationnodesandtheMACOrunineveryvehicletoget 𝑗=1 a very path for the vehicle itself. And next step we will study (15) the algorithm complexity furthermore. 𝑚 − − 2 𝑝𝑖 = √∑𝑑(𝜒𝑖𝑗 ,𝜒𝑗 ) ,1≤𝑖≤𝑛. 𝑗=1 4. Simulation We mainly pay attention to several different types in the According to the definition of TOPSIS method, the process of navigation algorithm: time priority, distance pri- neareritistothepositiveidealsolutionthefartheritisfrom ority, road condition priority, and integrated priority. Time thenegativeone,thebetterthesolutionwillbeobtained.The priority refers to arriving at the destination with minimum pheromones of each outdegree can be achieved as follows: time, distance priority refers to arriving at the destination 𝑝∗ with the shortest path, road condition priority refers to 𝑝 = 𝑖 , 1≤𝑖≤𝑛. arriving at the destination with the best intersection line, and 𝑖 𝑝− +𝑝∗ (16) 𝑖 𝑖 integrated priority preference refers to combining different road properties and then arriving at the destination with the Combining the experiment with the above algorithm, least cost. several other parameters in the ant colony optimization To illustrate conveniently, a road map measured with 8 algorithm are determined as follows: by 8 squares is adopted to simulate road navigation. In the

Δ𝜏𝑖𝑗 (0) =𝑝𝑖, designedgridmap(Figure 2), each intersection represents a road traffic intersection. Each node can adjoin the adjacent { 𝑄 { if the 𝑘th ant passed this 𝑒(𝑖𝑗) in this travel (17) nodes bidirectionally. To stimulate path planning under Δ𝜏𝑘 = 𝐿 𝑖𝑗 { 𝑖𝑗 different conditions, it is assumed that the path (49-56) and , {0else path (2-58) have two-way four-lane widths and other roads are of two-way two-lane width; here (𝑖-𝑗) represents the linear 𝐿 𝑒(𝑖𝑗) where 𝑖𝑗 is the length of . connection from node 𝑖 to node 𝑗. Each of the horizontal distances between the intersections is set at 200 meters; 3.3. The Algorithm Complexity of MACO. The algorithm the vertical distance between each intersection is set at 100 complexity of MACO is similar to ACO according to MACO meters. At the same time, the average speed of road (57-64) is basedonACO.Weassumethat𝑚 ants have to traverse 𝑛 set at 20 km/h, the average speed of road (49-56) is 30 km/h, elements (intersections in this paper) after 𝑁 circulations the average speed of roads (41-48) and (33-40) is 40 km/h, and to get a solution of MACO. The effects of low power can the average speed of the other roads is 60 km/h. be neglected if 𝑛 is lager enough when calculating the In the following, different navigation algorithms of time complexity, and the time complexity of MACO is MACO and two famous algorithms (the Dijkstra algorithm 6 International Journal of Distributed Sensor Networks

B Table 2: Statistics of three algorithms in normal situation. Starting point → Time Algorithm Distance (meter) destination (second) Dijkstra A → C8870539 A algorithm B → C10300589 ∗ A → C9090467 A algorithm B → C10300589 A → C9090467 MACO B → C10300589

andaveragevelocityandthensimulateMACOinSUMO environment and then carry on the simulation under velocity and time preference. ∗ C As shown in Figure 3, the Dijkstra algorithm, A algo- rithm, and MACO apply to plan a path from point A to point The Dijkstra algorithm ∗ C and path from point B to point C separately; the results are The A algorithm shown in Table 2. First of all, the algorithms are adopted and The MACO algorithm make a comparison from point A to point C. The Dijkstra Figure 3: Normal traffic map in Zhuhai City. algorithm chooses a path with distance of 8870 meters and time539seconds;MACOchoosesapathwithdistanceof 9090 meters and time of 467 seconds, which is the same as the ∗ Table 1: Different planning path ON 8 × 8gridchart. A algorithm. Then the algorithms are adopted to compare from point B to point C, respectively. Path distance of all three Navigation mode Path length (m) Time (s) algorithms is 10300 meters, with the time of 589 seconds. The Dijkstra navigation algorithm 1400 252 results show that the path planned by the Dijkstra algorithm ∗ A algorithm 2200 132 is the shortest path and would not consider velocity and other MACO factors. Distance priority 1400 252 MACO can consider the comprehensive factors, so, from Road condition priority 1600 178 point A to point C, although the path planned by MACO is longer than the path planned by the Dijkstra algorithm, it Time priority 2200 132 still saves time since the average velocity is higher, which is ∗ Integrated priority 1800 150 thesameastheA algorithm planned. For the path whose average path length and velocity are all optimal, MACO is ∗ consistent with the result of the Dijkstra algorithm and the A ∗ and the A algorithm) are adopted to analyze the network. algorithm, such as from point B to point C, passes through the First, the Dijkstra algorithm and MACO are adopted to plan distance of 10300 meters, using identical times of 589 seconds, the shortest path and the result show that the planned paths respectively. are the same one (57-64), with the length of 1400 meters Among the above, the left convergence curves of Figure 4 and time of 252 seconds. If MACO is only concerned with are based on time (velocity) priority; the right convergence the path length, the result obtained is consistent with the curves of Figure 4 are based on distance priority. On the left Dijkstra algorithm. When only road width is considered, the of the Figure 4 there are two convergence curves and we get planned path by MACO is (57-49-56-64), with the length of the below convergence curve of travel time when we try to 1600 meters and the time of 178 seconds. The path planned get a planning path only considering the high velocity or by MACO is (57-25-32-64) with the length of 2200 meters short travel time with MACO, and at same time we get the and 132 seconds if only the average velocity be cared about, convergence curve of travel distance accordingly as the above ∗ that is the same as the A algorithm planned. When MACO one. And on the right of Figure 4 there are two convergence integrates road conditions such as path length, road width, curves, too. We get the above convergence curve of travel road grade, and average velocity for analysis, the optimal distance when we try to get a planning path only considering planning path is (57-41-48-64), with the length of 1800 meters the shortest travel distance with MACO, and at the same time and the time of 150 seconds. The simulation results of several we get the convergence curve of travel time accordingly as the different ways of navigation are shown in Table 1. belowone.Wecanseethatallthecurvescanbeconverged Now we simulate with Zhuhai City map; as shown in normally under two situations. Figure 3,wechoosetheareawith60roadintersectionsas In order to further illustrate the advantages of MACO, coordinates. For each section between two adjacent intersec- simulation is carried out with this map and path, but set tions, we stimulate the path length, road width, road grade, limitedvelocityinsomesectionsasshownintheshadow International Journal of Distributed Sensor Networks 7

20 20 15 15 10 10 5 5 Travel distance Travel distance Travel 0 0 0 20 40 60 80 100 0 20406080100 Iterations Iterations 35 35

30 30

25 25 Travel time Travel time 20 20 02040 60 80 100 0 20406080100 Iterations Iterations (a) Time (velocity) priority convergence curves (b) Distance priority convergence curves

Figure 4: Convergence curves of MACO.

cases and the path planned is still consistent with the normal circumstances, path length from point A to point C and point B to point C is 8870 meters and 10300 meters, but the time it takes increases to 803 and 872 seconds, respectively. And MACO fully considers the congestion; the paths planned are longer than normal and the path planned by the Dijkstra algorithm increased to 10380 meters and 11290 meters from point A to point C and point B to point C, but the time is less than the Dijkstra obviously, as 591 seconds and 663 seconds, ∗ which are consistent with the A algorithm planned. MACO not only considers the integrated traffic informa- tion according to the requirement of path planning, but also can make path plans according to users’ requirements. Below we still use Figure 5 traffic map and make analysis with only focusing on the path length, road width, average velocity, and comprehensive situation separately, as shown in Table 4. According to Table 4, taking congestion into consider- ation, from point A to point C, the distance priority takes Figure 5: Traffic map of congestion situation in Zhuhai. the distance of 8870 meters but the longest time of 803 seconds; the road condition priority only considers the road width which chooses the longest distance of 11600 meters and Table 3: Statistics of three algorithms in congestion situation. takes 655 seconds; it is similar between time priority and the integrated priority, the distance of 10380 meters, and takes 591 Starting point → Time Algorithm Distance (meter) seconds. From point B to point C, the distance priority has the destination (second) shortest distance of 10300 meters but takes the longest time of Dijkstra A → C8870803872 seconds; the road condition priority planned the longest algorithm B → C10300872distance path for 12510 meters and takes 726 seconds in total; ∗ A → C10380591compared to the comprehensive case, time priority planned a A algorithm B → C11290663longer distance path of 11530 meters and takes 647 seconds; integrated priority has a distance of 11290 meters and takes A → C10380591 MACO 663seconds.Fromtheaboveitcanbeconcludedthatthe B → C11290663comprehensive situation, namely, integrated priority, takes account of path length, road width, road grade, and average velocity, so the distance and the time of the path planned part of Figure 5. Assuming that it is facing congestion, the cannot be the best, but it provides the optimal comprehensive simulation results are shown in Table 3. solution. From Table 3 we can see that if we set the shadow part as a The MACO has an important feature that it can plan path traffic jam, the Dijkstra algorithm would not consider special in real time with the dynamic traffic situation. Using ring map 8 International Journal of Distributed Sensor Networks

A A

C C

B B

The Dijkstra algorithm The Dijkstra algorithm ∗ ∗ The A algorithm The A algorithm The MACO algorithm The MACO algorithm (a) In the normal traffic situation (b) In the heavy traffic situation

Figure6:MapofAreiaPretainMacau.

Table 4: Statistics under congestion situation using MACO.

Algorithm Priority Distance (meter) Time (second) Distance priority (as the Dijkstra algorithm) 8870 803 → Road condition priority 11600 655 A C ∗ Time priority (as the A algorithm) 10380 591 Integrated priority 10380 591 Distance priority (as the Dijkstra algorithm) 10300 872 → Road condition priority 12510 726 B C ∗ Time priority (as the A algorithm) 11530 647 Integrated priority 11290 663

of Areia Preta in Macau, for example, these further illustrate the Dijkstra algorithm plans a path whose travel distance is the simulation results obtained by the algorithm as shown in 1290 meters and the travel time is 104 seconds; it has the Figure 6. shortest path but the longest travel time. MACO chooses a ∗ Figure 6 shows two different situations in the urban traffic path as good as the A algorithm whose travel distance is of Macau. The left of the maps shows normal traffic situation 1406 meters and the travel time is 94 seconds. The path which and that means there are no traffic jams. The right one of MACO chose is longer than that of the Dijkstra algorithm’s the maps shows the dynamic traffic situation, meaning that but the time is shorter. the traffic congestion is dynamically changing. The shadow In order to describe the algorithms in detail, suppose part of Figure 6 is the traffic jam with an average speed of there are three cars travelling along the different paths 20 km/h; other sections are normal traffic roads. Bold line planned above. When they travel to point C, the congestion shows two-way four-lane road with the average speed of happensinfrontofthepath.Becausetheycannotplan 60 km/h and other roads indicate two-way two-lane roads dynamically the path according to the traffic situation, the with the average speed of 50 km/h. The unidirectional road cars adopt the planned path by the Dijkstra algorithm and ∗ segments are omitted for simplification. Simulation is carried the A algorithm toward destination with no change of out with the path planning from point A to point B.Alsothe the route. They take 1290-meter travel distance with 142 ∗ Dijkstra algorithm, A algorithm,andMACOareadoptedto seconds and 1406-meter travel distance with 216 seconds make contrastive analysis, as shown in Table 5. finally,respectively.Atthesametime,thecarwhichtakesthe The obvious differences are shown among three algo- path planned (shown as red dotted line) by MACO changes rithms from the planned path. In the normal traffic situation, toanewroute(shownasredsolidline)whichisplanned International Journal of Distributed Sensor Networks 9

Table 5: Statistics of Macau under the real-time traffic situation. Traffic situation Priority method Distance (meter) Time (second) Dijkstra algorithm 1290 104 ∗ Normal traffic situation A algorithm 1406 94 MACO algorithm 1406 94 Dijkstra algorithm 1290 142 ∗ Dynamic traffic situation A algorithm 1406 216 MACO algorithm 1464 120

1500 1464 350000 303696 1450 300000 14061406 1406 1400 250000 183180 1350 200000 175680 1300 1290 1290 150000 134160 132164 132164 1250 100000 1200 50000 Dijkstra∗ MACO 0 A ∗ DijkstraA MACO Normal traffic situation Dynamic traffic situation Normal traffic situation Dynamic traffic situation Figure 7: The distance cost comparison of two situations. Figure 9: The comprehensive cost comparison of two situations.

250 216 algorithm has increased drastically, the Dijkstra algorithm 200 is the second, and the MACO algorithm stands with least 142 150 120 increase.Theresultsshowthatthoughitcangivethesame 104 94 94 plannedpathinnormaltrafficsituation,MACOisbetter 100 ∗ than other algorithms, that is, the Dijkstra algorithm and A 50 algorithm, because MACO can adjust dynamically planning 0 path according to dynamic traffic situation and represent an ∗ DijkstraA MACO optimal path with integrating the path length, road width, Normal traffic situation road grade, and average velocity with the least cost. Dynamic traffic situation

Figure 8: The time cost comparison of two situations. 5. Conclusion Thispaperhasdevelopedanovelmultiple-metricantcolony optimal algorithm for vehicle path planning, in which four dynamically and has a travel distance of 1464 meters with kinds of traffic attributes are considered, and some phases travel time of 120 seconds. The real paths they traveled are of the algorithm are discussed. A new general metric has shown in the right map of Figure 6. been introduced as the pheromone value of ant colony opti- From Figure 7, which shows the distance cost comparison mization algorithm. Based on multiple traffic information of normal traffic situation and dynamic traffic situation, we and planning requirements, the proposed algorithm selects ∗ canseethatintwosituationstheDijkstraalgorithmandA themosteffectiveandsuitableplanningpath.Simulation algorithmhavenochangeofplanningpath.ButforMACO results demonstrate that the presented algorithm could easily algorithm, the length of the planned path in dynamic traffic achieve the suitable path according to different requirements, situation is longer than that in normal traffic situation. Then including the shortest path planning and the shortest time from Figure 8, which shows the time cost comparison of planning, in the real-time vehicular traffic networks. This three algorithms in normal traffic situation and dynamic algorithm provides a potential solution for energy consump- traffic situation, we can see that all the time costs of three tion and environmental pollution in increasingly complex algorithms have increased, and the MACO algorithm has urban traffic environment, which could be used in intelligent the minor increase of time cost comparing with other two transportation system. algorithms. To further compare the three algorithms, we construct comprehensive cost data using time cost to multiply Conflict of Interests distance cost as shown in Figure 9.Fromnormaltraffic situation to dynamic traffic situation, the comprehensive The authors declare that there is no conflict of interests ∗ costs of three algorithms are all increased. The cost of A regarding the publication of this paper. 10 International Journal of Distributed Sensor Networks

References International Journal of Distributed Sensor Networks,vol.2014, Article ID 961073, 12 pages, 2014. [1] A. Rekaby, A. A. Youssif, and A. Sharaf Eldin, “Introducing [16] G.-W. Wei, “Maximizing deviation method for multiple Adaptive Artificial Bee Colony algorithm and using it in solving attribute decision making in intuitionistic fuzzy setting,” traveling salesman problem,” in Proceedings of the Science and Knowledge-Based Systems,vol.21,no.8,pp.833–836,2008. Information Conference (SAI ’13), pp. 502–506, October 2013. [17] D.-F.Li, “TOPSIS-based nonlinear-programming methodology [2] N. Chaiyaratana and A. M. S. Zalzala, “Recent developments in for multiattribute decision making with interval-valued intu- evolutionary and genetic algorithms: theory and applications,” itionistic fuzzy sets,” IEEE Transactions on Fuzzy Systems,vol. in Proceedings of the 2nd International Conference on Genetic 18, no. 2, pp. 299–311, 2010. Algorithms in Engineering Systems: Innovations and Applications [18] Y. M. Wang, “Using the method of maximizing deviations (GALESIA ’97),vol.446,pp.270–277,Glasgow,Scotland, to make decision for multi-indices,” System Engineering and September 1997. Electronics, vol. 7, pp. 24–26, 1998. [3] M. Dorigo, G. Di Caro, and L. M. Gambardella, “Ant algorithms [19] M. Johnson and S. Silas, “Position aware and QoS based service for discrete optimization,” Artificial Life,vol.5,no.2,pp.137– discovery using TOPSIS for vehicular network,” International 172, 1999. Journal of Engineering Science & Technology,vol.5,pp.576–582, [4] M. Dorigo, M. Birattari, and T. Stutzle,¨ “Ant colony optimiza- 2013. tion,” IEEE Computational Intelligence Magazine,vol.1,no.4, [20] O.Bali,S.G¨ um¨ us¨¸, and M. Dagdeviren,˘ “A group MADM pp.28–39,2006. method for personnel selection problem using Delphi tech- [5] K. S. V. Narasimha and M. Kumar, “Ant colony optimization nique based on intuitionistic fuzzy sets,” Journal of Military and technique to solve the min-max single depot vehicle routing Information Science,vol.1,no.1,pp.1–13,2013. problem,” in Proceedings of the American Control Conference [21] H. Zhang and L. Yu, “MADM method based on cross-entropy (ACC ’11), pp. 3257–3262, July 2011. and extended TOPSIS with interval-valued intuitionistic fuzzy [6]K.S.V.Narasimha,E.Kivelevitch,andM.Kumar,“AntColony sets,” Knowledge-Based Systems,vol.30,pp.115–120,2012. optimization technique to Solve the min-max multi depot [22] G.-H. Tzeng and J.-J. Huang, Multiple Attribute Decision Mak- vehicle routing problem,”in Proceedings of the American Control ing: Methods and Applications, CRC Press, Boca Raton, Fla, Conference (ACC ’12),pp.3980–3985,June2012. USA, 2011. [7] L. Li, S. Ju, and Y. Zhang, “Improved ant colony optimization for the traveling salesman problem,” in Proceedings of the International Conference on Intelligent Computation Technology and Automation (ICICTA ’08), pp. 76–80, IEEE, Hunan, China, October 2008. [8] D. Zeng, Q. He, B. Leng et al., “An improved ant colony optimization algorithm based on dynamically adjusting ant number,” in Proceedings of the IEEE International Conference on Robotics and Biomimetics (ROBIO ’12),pp.2039–2043, December 2012. [9] B. F. Moghaddam, R. Ruiz, and S. J. Sadjadi, “Vehicle routing problem with uncertain demands: an advanced particle swarm algorithm,” Computers & Industrial Engineering,vol.62,no.1, pp.306–317,2012. [10] C. Lee, K. Lee, and S. Park, “Robust vehicle routing problem with deadlines and travel time/demand uncertainty,” Journal of the Operational Research Society,vol.63,no.9,pp.1294–1306, 2012. [11] C. L. Philip Chen, J. Zhou, and W. Zhao, “A real-time vehicle navigation algorithm in sensor network environments,” IEEE Transactions on Intelligent Transportation Systems,vol.13,no. 4, pp. 1657–1666, 2012. [12] E. W. Dijkstra, “A note on two problems in connexion with graphs,” Numerische Mathematik,vol.1,pp.269–271,1959. [13] E. Amiri, H. Keshavarz, M. Alizadeh, M. Zamani, and T. Kho- dadadi, “Energy efficient routing in wireless sensor networks based on fuzzy ant colony optimization,” International Journal of Distributed Sensor Networks,vol.2014,ArticleID768936,17 pages, 2014. [14] Y. Liu, S. Zhang, J. Fan, and J. Jia, “A path planning algorithm with a guaranteed distance cost in wireless sensor networks,” International Journal of Distributed Sensor Networks,vol.2012, Article ID 715261, 12 pages, 2012. [15] Y. Jo, J. Choi, and I. Jung, “Traffic information acquisition system with ultrasonic sensors in wireless sensor networks,”