scieee AI-readable full text Open interactive document viewer

Study of a platooning use case in a dense urban scenario

Vera Llop, Antonio

Abstract

Vehicular networking and intra-/inter- vehicular information exchange has become one of the most recent and researched communication topics. The idea behind vehicular networking is to create mobile networks in roads and cities using vehicles and complementary structures, if required. Currently vehicular networks are not yet 100% real. Despite studies showing that they are possible, there are still many problems in the adaptation to real world. It is for this reason that in recent years plenty of different tools, frameworks and simulators have arisen allowing the simulation and behaviour analysis of these networks. One of the tools offering most accuracy and variety in terms of results is Veins (Vehicles in Network Simulator). One of the vehicular simulation applications available through Veins is Platooning which is the main application used in this study. The analysis and computation of the obtained results by Veins can also be easily complemented with other tools like Matlab and R. This study evaluates a use case of platooning in an urban scenario, where cars benefit of bus lanes. The results obtained in the simulations are very satisfactory and could be useful in future research to determine whether or not platooning in urban scenarios can become a reality.

Full text

STUDY OF A PLATOONING USE CASE IN A DENSE URBAN SCENARIO antonio vera llop Supervisor: Rajesh Sattiraju Fachbereich Elektro- und Informationstechnik Lehrstuhl für Funkkommunikation und Navigation Technische Universität Kaiserslautern Prof. Dr.-Ing. Hans D. Schotten May 2015 [ June 29,2015 at 10:04 –classicthesis ] Antonio Vera Llop: Study of a platooning use case in a dense urban scenario,© June 2015 [ June 29,2015 at 10:04 –classicthesis ] ABSTRACT Vehicular networking and intra-/intervehicular information exchange has become one of the most recent and researched communication topics. The idea behind vehicular networking is to create mobile networks in roads and cities using vehicles and complementary structures, if required. Currently vehicular networks are not yet 100% real. Despite studies showing that they are possible, there are still many problems in the adaptation to real world. It is for this reason that in recent years plenty of different tools, frameworks and simulators have arisen allowing the simulation and behaviour analysis of these networks. One of the tools offering most accuracy and variety in terms of results is Veins (Vehicles in Network Simulator). One of the vehicular simulation applications available through Veins is Platooning which is the main application used in this study. The analysis and computation of the obtained results by Veins can also be easily complemented with other tools like Matlab and R. This study evaluates a use case of platooning in an urban scenario, where cars benefit of bus lanes. The results obtained in the simulations are very satisfactory and could be useful in future research to determine whether or not platooning in urban scenarios can become a reality. iii [ June 29,2015 at 10:04 –classicthesis ] ACKNOWLEDGMENTS I would like to express my special appreciation and thanks to my advisor Rajesh Sattiraju. Thank you for your support and introduction to the world of research. I would also like to thank my friends and family for standing at my side all of this time. Without you it would not have been possible. iv [ June 29,2015 at 10:04 –classicthesis ] CONTENTS iintroduction to vehicular comunications 1 1 the beginning of vehicular networks 2 1.0.1Related work 3 1.1Thesis goals 5 1.2Thesis outline 5 ii vehicular communications technologies overview 7 2 v2v communication technologies 8 2.1Inter-vehicles communication 8 2.2Intra-vehicles communications 10 2.3Communication modes 12 2.4Applications 15 2.5Challenges 16 iii evaluation of v2v frameworks 18 3 v2v simulators 19 3.1Taxonomy of simulators 19 3.2Mobility Generators (Traffic Simulators) 20 3.3Communication networks simulators 21 3.4VANETs Integrated Simulators 22 3.5Hybrid VANETs Simulators 23 3.6Veins Simulator 24 3.6.1Traffic simulator: SUMO 25 3.6.2Network Simulator: OMNet++ 28 iv simulations and results 30 4 evaluation of platooning in a dense urban scenario 31 4.1KPI’S 31 4.2Entities of a Platoon 32 4.3Controller Models 32 4.3.1CC 33 4.3.2ACC 33 4.3.3CACC 34 4.4Platoon Maneuvering 35 4.4.1Join Maneuvering 35 4.5Particularities of PLEXE 36 4.5.1Platooning Capabilities in SUMO 36 4.5.2Platooning Protocols and Applications in Veins 37 4.6Evaluation of the Controller parameters 39 4.6.1Simulation set up 39 4.6.2Results 39 4.6.3Results evaluation 42 v [ June 29,2015 at 10:04 –classicthesis ] contents vi 4.7Use of Platooning in urban environments 43 4.7.1Map set up 43 4.7.2Network set up 43 4.7.3Explanation of the join maneuver simulation 43 4.7.4Dense urban traffic simulation 46 4.7.5Results 46 4.8Conclusion 49 4.9Future work 51 vappendix 52 a software installation 53 a.1Installing Omnet++ 53 a.2Downloading Plexe extension 53 a.3Building SUMO 54 a.4Building Plexe Veins 54 a.4.1Installing R 54 b simulation settings 56 b.1First Simulation 56 b.2Second Simulation 58 b.2.1Map set up 58 b.2.2Network set up 59 b.3Procesing data 60 c plots 62 bibliography 67 [ June 29,2015 at 10:04 –classicthesis ] LIST OF FIGURES Figure 1Chapter 2board diagram 8 Figure 2IEEE 1609 WAVE protocol architecture 10 Figure 3Simulator example 19 Figure 4Taxonomy of simulators 20 Figure 5Mobility Generators 21 Figure 6Network Simulator 22 Figure 7Veins www.ccs-labs.org/~dressler/projects/veins/ Last visit Juny 2015 24 Figure 8car-following diagram 27 Figure 9Platooning www.bbc.com/future/story/20130409- robot-truck-platoons-roll-forward Last visit: Juny 2015 31 Figure 10 Controllers 32 Figure 11 State machines of the sample join maneuver: joiner 36 Figure 12 State machines of the sample join maneuver: leader 36 Figure 13 Simulatons Flowchart 38 Figure 14 Time to reach the platoon (4vehicles) 40 Figure 15 Time to reach the platoon (7vehicles) 41 Figure 16 First part of the join maneuver 44 Figure 17 Second part of the join maneuver 44 Figure 18 Last part of the join maneuver 45 Figure 19 CO2emission plots 47 Figure 20 CO2emission (sinusoidal plots) 48 Figure 21 Plots of the results 50 Figure 22 Ideal trend 51 Figure 23 omnetpp.ini file (joinManeuverPlatoon example) 56 Figure 24 SUMO GUI: Freeway example 57 Figure 25 Route file 58 Figure 26 sumo.cfg file 59 Figure 27 JoinManeuverApp.cc 59 Figure 28 Plot changing bandwidth in a 4cars platoon 62 Figure 29 Plot changing psi in a 4cars platoon 63 Figure 30 Plot changing C1in a 4cars platoon 64 Figure 31 Plot changing bandwidth in a 7cars platoon 65 Figure 32 Plot changing C1in a 7cars platoon 66 vii [ June 29,2015 at 10:04 –classicthesis ] LIST OF TABLES Table 1Standards in Intra-vehicles communications 11 Table 2Communication modes/Technologies 13 Table 3Taxonomy of applications 15 Table 4Requirements 16 Table 5Use cases 16 Table 6Network and road traffic simulation parameters 39 Table 7CO2emission saving in the platoon 48 Table 8CO2emission total saving 49 viii [ June 29,2015 at 10:04 –classicthesis ] ACRONYMS AP Acces Point CAN Controller Area Network CARAVAN Communications Architecture for Reliable Adaptive Vehicular Ad Hoc Networks CW Contention Window DSRC Dedicated Short Range Communications DSDV Destination Sequenced Distance Vector EDCA Enhanced Distributed Channel Access GPS Global Positioning System ISO International Standardization Organization I2VInfrastructure-to-Vehicle ITS Intelligent Transport Systems IVC Inter-Vehicular Communications LTE Long Term Evolution MANET Mobile Ad-Hoc Network OBE On-Board Equipment OE Original Equipment OLSR Optimized Link State Routing Protocol PCV Positive Crankcase Ventilation QoS Quality of Service RSE Roadside Equipment TCP Transmission Control Protocol USB Universal Serial Bus UWB UltraWideband V2IVehicle-to-Infrastructure V2VVehicle-to-Vehicle VANET Vehicular Ad-Hoc Network Veins Vehicles in network simulation ix [ June 29,2015 at 10:04 –classicthesis ] 1.2 thesis outline 6 Chapter 2: In-depth view on the numerous use cases in vehicular technology and communication. This chapter describes intra and inter-vehicular communication and the differences between these, as well as exposng the challenges that V2V communications will have to face in the future. Chapter 3: Explanation of the use of simulators currently available along with their advantages/pitfalls in the context of vehicular communications as well as a more detailed description of the tools choosen for this thesis. Chapter 4: A simplified description of platooning followed by an evaluation of the test case performed: platooning in a highway and a city scenario. Chapter 1offers a general idea about past, present and future of vehicular communications, states the related research and projects taken into account for this thesis as well as enumerating the general goals for the thesis. The next chapter describes the current technology present in V2V communications. [ June 29,2015 at 10:04 –classicthesis ] Part II VEHICULAR COMMUNICATIONS TECHNOLOGIES OVERVIEW [ June 29,2015 at 10:04 –classicthesis ] 2 V2V COMMUNICATION TECHNOLOGIES This chapter is centered mainly on vehicular technologies and its layout can be viewed in the diagram in Figure 2.1. Figure 1: Chapter 2board diagram The aim of vehicular communication is intra- and inter-vehicular exchange of information. Inter-vehicle communication (IVC) comprises a wireless network in which cars, smart traffic signals and roadside units send, receive and retransmit signals. The usefulness of these networks lies in the provision of a number of new services which are collectively called Intelligent Transport Systems (ITS). Thanks to the ITS vehicles have more and better information on traffic conditions and can access services and data to improve ride comfort for passengers (such as VoIP, video on demand, etc.). In addition to this, it is also possible to obtain enriched location information so that navigation systems based on GPS can improve their effectiveness. As well as improving driving and transport to that which is currently known and in use, such networks open the door to new mechanisms which aim to simplify the task of driving and increase road safety. Thus, through these networks it may be possible to provide vehicle driver assistance or even can achieve automatic driving. 2.1 inter-vehicles communication During the last few years intra- and inter-vehicular communication has attracted a lot of attention. Voice and data communication have become important for road traffic telematics as well as for entertainment purporses. It is for this reason that the majority of car manufacturers build multimedia communication into their latest devices. 8 [ June 29,2015 at 10:04 –classicthesis ] 2.1 inter-vehicles communication 9 WAVE and Wi-Fi are the two most common technologies in inter-vehicular communication. However Wi-Fi is not so widely used due to safety reasons. MANET and VANETs are quite similar in that information needs to be transported through moving nodes in a geographic area. Due this similarity many of the early works suggests that the same algorithms can be used in VANETs again. However there are some significant differences to be mentioned. Node density, in MANETs has always been assumed to be constant. Mobility in VANETs is much more predictable and connectivity is much more dynamic in VANETs, specifically in urban environments due to quick changes of network connectivity caused by buildings and other obstacles that block the radio communication. Many of the VANET routing approaches build upon Wi-Fi. Both infrastructure based networking, and ad-hoc functionalities are provides by IEEE 802.11 protocol. Plenty of studies exist on the usability of Wi-Fi (IEEE 802.11a/b/g) for vehicular networking demonstrating the causes which limit the usability of Wi-Fi on vehicular networks (multi-path effects, speed-dependent signal fading, AP usage not optimized). In Figure 2.2we can see an overview of the IEEE 1609 WAVE protocol. Normally IEEE 802.11p describes the lower protocol layers, and WAVE include the full protocol stack. IEEE 802.11p is the basis of the WAVE protocol stack. It defines the physical and MAC layer. The PHY is quite similar to IEEE 802.11a, it also operates in the 5GHz band using orthogonal frequency-division multiplexing (OFDM). To minimize the multi-path effects, IEEE 802.11p doubles all timing parameters and reduces the channel bandwidth to 10 MHz instead of 20 MHz thus guaranteeing reliability of transmissions even for vehicles driving at more than 200 km/h. On the other hand the throughput is reduced from 6-54 Mbit/s to 3-27 Mbit/s and the communication range is up to 1000m given the maximum transmission power of 800mW. MAC layer include randomized MAC addresses, QoS support (provided by integrating the IEEE 802.11e enhanced distributed channel access (EDCA) mechanism) and a new ad-hoc mode. EDCA allows a faster access to wireless channel because it supports shorter interframe spaces for high-priority messages and reduces de contention window (CW) for higher-priority messages. Due the high expectation of vehicular networking to provide road-safety solutions to help prevent crashes and fatalities, responsible regulatory bodies worldwide have allocate a specific spectrum for IVC. Europe has regulated five 10 MHz channels dedicated to IVC using a frequency range in the 5.9GHz band. Between these channels we can find a single control channel (CCH) which is used for management and safety information by means of broadcast. Probably the most critical problem in vehicular networking is the scalability. A first step was to identify the upper capacity limits for unicast communication in ad-hoc networks. This fixed upper [ June 29,2015 at 10:04 –classicthesis ] 2.2 intra-vehicles communications 10 Figure 2: IEEE 1609 WAVE protocol architecture boundary cannot be reached using other routing strategies, so the solution was to include broadcast and multicast communication. 2.2 intra-vehicles communications Wireless communication techniques can also be used to perform automotive functions inside a vehicle. This section addresses how this is done and summarizes possible uses in the future. There are several wireless standards that can be utilized for intra-vehicle use: "IEEE 802.15.1- Bluetooth", "IEEE 802.15.3- UltraWideband (UWB), high data rate", and "IEEE 802.15.4- ZigBee, low data rate". A comparison of the three standards is shown in Table 2.1. Bluetooth has several advantages which make it the most commonly used intra-vehicle standard today. It is a proven technology which transmits voice and data, and is relatively cheap. It also has low power requirements and can penetrate obstacles such as walls. It has a large installed base and a guaranteed latency, as well as a stable specification. Automobile components and modules, normally connected by electrical signal wires, are increasingly being replaced by wireless signals. A reduction of 50% in the amount of signal wires is the goal. Typically, an automobile contains about 8 meters of wiring, so this would be a lot of wireless signals. A hybrid containing wired clusters of automobile components and wireless inter-cluster connections are becoming more common. An instrument dash panel is an example of a cluster. There are advantages to the hybrid wireless concept, such as the weight reduction due to the replacement of the signal wires, as well as simpler electrical wiring. The maintenance of the electrical submodules would also be easier. A systems approach to this idea [ June 29,2015 at 10:04 –classicthesis ] 2.2 intra-vehicles communications 11 Bluetooth ZigBee UWB Range 10 meters 10 meters < 10 meters Data Rate Medium Low High Throughput Medium Low High Interference Good Good Excellent Media Voice/Data Data Video/Radar Power Req 1mW <1mW 200uW Security Good Good Excellent Tx Penetration Good Good Excellent Mode FHSS DSSS DS, MBOA Frequency 2.4GHz .8, .9,2.4GHz 3,1-10.6GHz Channels 23 or 79 1,10 or 16 Evolving Error Correct 8-bit,16 bit 16 CRC Evolving Link BW 1MHz 20-250KHz 120MHz-1GHz Table 1: Standards in Intra-vehicles communications replaced an initial component-level approach to the point where in actuality international standards and off-the-shelf components are being used whenever possible. The implementation is evolving from desktop PCs, toggle switches, and lamps, to microcontroller cards, LEDs, silicon chips, auto sensors and actuators, as well as auto transducers. During the late 1980’s, a serial communication bus called the Controller Area Network (CAN) was developed. It was used in the automotive industry. Sensors, actuators, devices, switches, and displays can communicate over a CAN bus at speeds up to 1 Mbps. CAN has now been standardized as ISO 11898 by the International Standardization Organization. There are more than 1500 implementations of this standard. The hardware/ software implementation is being restructured so it can function as a physical layer below the CAN bus. This will allow the existing v networks to evolve to a wireless communication mode using Bluetooth technology. Wireless network behavior, under different conditions, is being evaluated by performance and reliability models. Various factors can be observed within these models: • Interferences from other networks • Electromagnetic environmental signals that could potentialy affect the wireless network performance and • High speed vehicular traffic effects on the wireless network • Possibility that electronic noise from spark plugs and other switching devices effect the wireless network [ June 29,2015 at 10:04 –classicthesis ] 2.3 communication modes 12 Infotainment, telematics, and mobile commerce are the most prominent application areas for Bluetooth, Wi-Fi, and WiMAX. The Original Equipment (OE) market for Bluetooth is expected to grow steadily from 2006 to 2012, while the OE market penetration for WiFi and WiMax should emerge during this time. High-end luxury sedans and SUVs are expected to become the first vehicles to adopt these technologies in North America. The fact that there are many different wireless network technologies in vehicles should stimulate the market’s growth as the market matures. Bluetooth, Wi-Fi,WiMAX, UWB, ZigBee, and wireless Universal Serial Bus (USB) are some of the new wireless technologies that are offering automakers and their suppliers many possibilities to enhance the potential of their products. 2.3 communication modes This section will describe all the different communication modes we can find on vehicular communications. The criteria used to differentiate between the choice of communication mode are for exemple the number of receivers of the message, the need of additional infrastructures and whether the communication is direct or not. V2Vbroadcast: in a V2Vlocal broadcast a vehicle sends messages to all vehicles within its communication range. To support this communication mode one needs to take into account that the neighbouring vehicles change very frequently and that the range of a vehicle is not very wide. Therefore depending on the security and importance of the message the means by which it is transmitted can be by bluetooth or Wi-Fi. However, most common in applications like collision avoidance (a local broadcast to inform neighboring cars of an accident) is DSRC. V2VMulti-hop dissemination: in multi-hop dissemination messages from one vehicle are relayed by other cars to reach vehicles that are outside the source vehicle communication range. Depending on the number of hops (which affects to the latency) this communication can be used to support hard or soft safety application. If for example the number of hops is very low, multi-hop dissemination can be used to support applications such as Emergency Electronic Brake Light. On the other hand if the number of hops is higher, it can be used to soft safetey purposes such as the distribution of hazardous road and traffic information. I2VLocal Broadcast: in this communication mode external infrastructure (roadside infrastructure) is required from which vehicles receive local broadcast. The information of this messages can be for example about traffic, dangerous road conditions or security credetials. There are two options in the implementation of this communication mode. One is through short-range radio transceivers [ June 29,2015 at 10:04 –classicthesis ] 2.3 communication modes 13 deployed along the roadside and the other using cellular, satellite, or digital radio broadcast services. V2IBidirectional Communications: vehicles require a lot of services for plenty of applications like navigation, email, electronic transactions or media download. To support this mode, both long an short-range radios are valid. V2Icommunications can also be used to broadcast messages from a vehicle to a group of vehicles through infrastructure application servers. Mode DSRC Wi-Fi Bluetooth 3G4G LTE V2V local broadcast Yes Yes Impractical With a server With a server V2V multi-hop Yes Yes Impractical With a server With a server I2V local broadcast Yes Yes Impractical Not offered by all network operators Not offered by all network operators V2I bidirectional Yes Yes Impractical Yes Yes Table 2: Communication modes/Technologies The fact that there is a wide range of different application scenarios is the reason why there is such a huge number of protocols for VANETs. Topology-based routing determines the network topology either in advance (proactive) or on demand (reactive). Hybrid versions also exist. Examples that include proactive routing protocols are Destination Sequenced Distance Vector (DSDV) and Optimized Link State Routing Protocol (OLSR). The idea of all proactive routing protocols is to determine the network topology before sending any data packets. When a node system starts, firstly is initiates its routing protocol and exchanges routing protocol messages with all neighboring nodes. Depending on the degree of dynamics and the frequency of the messages it might take a while to update the network topology. When a packet is about to be sent the routing protocol looks for a path to the destination node. This route could be expensive in terms of routing protocols overhead. On the other hand we have routing protocols based on other characteristics and resources, like high node mobility, which is a weak spot in old MANET routing solution. Nowadays many approaches have been developed to forward messages according to the store-carry-forward principle. This approach can be very successful depending on the mobility patterns of the nodes in the network. Energy is another characteristic used in routing protocols. This has been studied in wireless sensor networks (WSNs). It is however irrelevant in VANETs. The last characteristic to be mentioned is the geographic coordinates. They may replace the classical [ June 29,2015 at 10:04 –classicthesis ] 2.3 communication modes 14 assessment used in MANETs (ID-based routing). Ad-hoc routing will not be realizable in most IVC scenarios. The general idea is to make use of broadcast communication, and only re-broadcast the information if necessary. Clearly in extreme cases the network can be overloaded when a few nodes are participating, but this can be solved using some application-layer intelligence. This concept of broadcasting in vehicular communications has become known also as beaconing. An example of the usage of this communication mode is an application called city alarm, which consists in sending an alert message to all the vehicles in a spread area. ID or address-based routing using MANET protocols are not the best choice for VANETs. That is the reason why vehicles use a different address information known as geographic coordinates. Given that satellite navigation systems are such a basic instrument in vehicles one can assume that accurate geographic position information will be available in the near future. Greedy routing: messages that use geographic location as a destination address. In greedy routing each forwarding step routing is performed on the basis of neighbourhood information or identifying the node which is closest to the destination (in terms of geographic distance), instead of the classic routing using some routing table entries. This routing is very sensitive to the so-called “dead end” problem. Virtual coordinates: due the possible inefficiency of dead ends a possible alternative is a hierarchical solution which can be further extended to completely switch to virtual coordinates on the overlay by performing some coordinate transformation. This solves the dead end problem at the cost of quite substantial efforts for topology management. Geo assisted forwarding: the main idea is that vehicles are able to route packets “around the corner” if required. Vehicles will route the packet using a relay node located exactly at the intersection to make the communication possible. This is especially useful in urban environments where normally the line-of-sight communication is blocked. [ June 29,2015 at 10:04 –classicthesis ] 2.4 applications 15 2.4 applications This section deals with a taxonomy of applications based on the nature of the messages, as shown below in Table 3. Soft Safety Hard Safety Mobility Connectivity Convenience Icy Bridge Blind Spot Warning Live Traffic Updates Media Download Point-of Interest Notifications Disabled Vehicle Forward Collision Warning Route Guidance Email Tickets and Reservations Construction Zone Emergency Electronic Brake Light Off-Board Navigation Social Networking Intersection Movement Assist Platoonig Table 3: Taxonomy of applications The main aim of hard safety applications is to avoid imminent crashes or minimize the damage when crashes become unavoidable. These applications impose the most stringent requirements on the communication system in terms of latency and reliability. Soft safety applications are less time-critical as they increase driver safety but do not require immediate driver reaction. Some examples of soft safety applications are: icy roads, construction zones and traffic jams. Mobility applications are used to improve traffic flow. One example of these mobility applications is the one which is evaluated in chapter 4, Platooning. The aim of both connectivity and convenience applications is to make driving more enjoyable and to provide greater safety. The two tables below expose some of the requirements as well as a variety of use cases of all the applications mentioned above. [ June 29,2015 at 10:04 –classicthesis ] 3.4 vanets integrated simulators 22 Figure 6: Network Simulator ns-2: Is a discrete event simulator targeted at networking research. Ns provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks. As it has been commented before Monarch project expanded its horizon to wireless networks. glomosim: Global Mobile Information System Simulator (GloMoSim) is a network protocol simulation software that simulates wireless and wired network systems. GloMoSim is designed using the parallel discrete event simulation capability provided by Parsec, a parallel programming language. GloMoSim currently supports protocols for a purely wireless network. gtnets: The Georgia Tech Network Simulator (GTNetS) is a full-featured network simulation environment that allows researchers in computer networks to study the behavior of moderate to large scale networks, under a variety of conditions. The design philosophy of GTNetS is to create a simulation environment that is structured much like actual networks are structured. For example, in GTNetS, there is clear and distinct separation of protocol stack layers. omnet++: It is an extensible and modular C++ based tool dedicated mainly for the creation of network simulations. Sensor networks, wireless ad-hoc networks and photonic networks are also included. As coupling SUMO and OMNet++ is a possibility these seem to be the best option as chosen framework for the simulation to be evaluated. 3.4 vanets integrated simulators This section deals with the integrated simulators tools for VANET simulations which are openly available to the research community. [ June 29,2015 at 10:04 –classicthesis ] 3.5 hybrid vanets simulators 23 These integrated systems use a single model which includes both mobility and network simulation. ns3: Is a discrete-event network simulator for Internet systems targeted primarily for research and educational use. Ns-3has been developed to provide an open, extensible network simulation platform for networking research and education. In brief, ns-3provides models of how packet data networks work and perform, and provides a simulation engine for users to conduct simulation experiments. Some of the reasons to use ns-3include to perform studies which are more difficult or not possible to perform with real systems, to study system behaviour in a highly controlled, reproducible environment, and to learn about how networks work. nctuns The NCTUns is a high-fidelity and extensible network simulator and emulator capable of simulating various protocols used in both wired and wireless IP networks, including IEEE WAVE 802.11p media access layer. Its core technology is based on the novel kernel re-entering methodology invented by Prof. S.Y. Wang when he was pursuing his Ph.D. degree at Harvard University. Due to this novel methodology, NCTUns provides many unique advantages that cannot be easily achieved by traditional network simulators such as ns-2and OPNET. 6 Integrated simulators have a unified simulator resulting in simpler systems and loss of quality of the network simulator. These characteristics rule them out as an option for the study of this thesis. 3.5 hybrid vanets simulators Integrated simulators offer some advanced features for vehicular mobility modelling and network capabilities. On the other hand they are limited by a complex set up and low performance. A good alternative is to associate both network and mobility simulators creating hybrid MANETs simulators. mobireal: Is a novel network simulator for ubiquitous society with mobile devices. It can simulate realistic mobility of humans and automobiles, and enables to change their behaviour depending on a given application context. Therefore, one can get more detailed performance evaluation of network applications, routing protocols, infrastructure and so on which existing simulators cannot evaluate well. MobiREAL can easily describe mobility of nodes with C++. A probabilistic rule-based model is adopted to describe behaviour of mobile nodes, which is often used in cognitive modelling of human behaviour. The proposed model enables the description of how mobile nodes change their destinations, routes and speeds/directions based on their positions, surroundings (obstacles and neighbouring [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 24 nodes), information obtained from applications, and so on. The problem that restricts its use is that it is not free software. trans (Traffic and Network Simulation Environment): It is a GUI tool that integrates traffic and network simulators (SUMO and ns2) to generate realistic simulations of Vehicular Ad hoc Networks. TraNS allows the information exchanged in a VANET to influence the vehicle behaviour in the mobility model. For example, when a vehicle broadcasts information reporting an accident some of the neighbouring vehicles may slow down. Its use is very wide and also very popular. It is able to couple ns-2 networks and SUMO and its mobility traces are very realistic. veins: It consists of a network simulator based on OMNET ++ events and SUMO microscopic mobility generator, working engagingly and real time. This tool will be discussed more thoroughly further on. However, it is described briefly in this taxonomy simulators analysis and compared with other similar systems, specifically with TraNS. TraNS achieves interconnection between SUMO and ns-2using an active loop through which the network simulator sends control commands to traffic. This allows to stop vehicles and / or modify their routes. However, the control of the time simulation has not been considered on TraNS. The development process of TraNS has been discontinued. Figure 7: Veins www.ccs-labs.org/~dressler/projects/veins/ Last visit Juny 2015 After having exposed the current simulators available (mostly free software) a decision must be taken on the tools to be used this study. It seems that the VANETs simulation is best suited by hybrid simulators such as TraNS and Veins. Both of these use SUMO as a traffic simulator. TraNS uses ns-2as a network simulator and VEINS uses OMNeT++. Both are very valid options. However, most of the previous researchers on platooning use Veins as the main simulator. There is plenty of information and references available as to why Veins is the simulator of choice when aiming to create the most realistic simulation possible. 3.6 veins simulator this section describes how vehicular simulations are made using VEINS. As mentioned before, this simulator uses two important simulation tools: SUMO (traffic simulator) and OMNet++ (network simulator), including also a communication module to make the communication between both simulators possible. It is considered an [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 25 extension of SUMO and is called TraCI. We will analyse every block of the VEINS environment: first SUMO, then VEINS and finally we will pay special attention to the communication module. 3.6.1Traffic simulator: SUMO A wrong approach would be to believe that traffic could be described through departure time, route and duration, but this is completely false. Traffic is hardly conditioned by individual mobility, so, neither departure time nor routes are prefixed. This is a problem to model traffic, especially in private travels. This means that even complex mathematical formulas in some cases are unable to describe a particular movement. Both the human desire to leave and go somehwere else and the movement of the vehicle on the street have a strong and clear influence on traffic. Moreover, both factors influence each other: the load of roads (streets) depends on the departure times of drivers and their turn determines the speed of movement. The network load has an effect on the departure times of drivers, because they desire to move quickly and know the time of arrival at the desired destination. Apart from this, traffic is influenced by other parameters such as weather conditions, infrastructure or other incidents that may be affecting the system. With the proposal to achieve a simulation that takes into account all of these factors, the SMARTEST project was a collaborative initiative between different developed agencies and financed by the European Commission. Following the conclusions therein the Institute for Research in Transport (German Aerospace Center) together with the Applied Informatics Centre of Cologne (Germany) decided to develop an open source tool that would satisfy the needs discovered. Thus was born in 2000 SUMO, which is an acronym for Simulation for Urban MObility (Simulation for Urban Mobility). It is a package open source software for simulation of microscopic and multimodal traffic code. The first characteristic that gives an idea of the mobility model considers each vehicle as a distinct entity, increasing its computational load (as opposed with a macroscopic system, which would model only quantities of interest, such as vehicle density or average speed). 3.6.1.1Basic Paradigms SUMO is designed to simulate a road network traffic as big as a city, however it is also capable of modelling larger networks such as highway systems. Since the simulation is multimodal, which means that not only the movements of cars are modelled but also public transport systems, the most basic component of simulation is an individual human being. This human being is described by a departure time and route which it will take (which will be formed by sub-paths, which describe one way of traffic). [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 26 This implies that, for example, a person can drive to the nearest public transport station by car and continue its travel by other vehicles or even on foot. However, movement on foot is not contemplated in the simulation because this feature is irrelevant to the field of VANETs. As already stated, SUMO simulates traffic flow microscopically. This means that each vehicle moving by the simulated network is modelled individually and is characterized by a certain position and velocity. Per time interval, which has a duration of 1second, these parameters are updated depending on the vehicle position and the topology of the track where the vehicle moves. The simulation of vehicles is discretely in time and continuous in space, because the mobility model used by SUMO is continuous. 3.6.1.2SUMO Features SUMO is in constant evolution and development as it is an open source system. For the version used during the development of this project (the 0.22, but later will be discussed in more detail on this) the functions available to the simulator can be summarized roughly in the following main points: • Movement of vehicles in discrete time and continuous space • Supports different types of vehicles • Multilane roads • Lane change • Different modes of priority at intersections and traffic lights • GUI (Graphic user interface) • Supports road networks of tens of thousands of streets • High speed performance (reaching 100,000 updates / second per vehicle on a 1GHz) • Interoperability with other applications in real time • Supports import of topological maps for the road network • Microscopic routes (each vehicle has its own) • High portability (packages for Linux and Windows) • High interoperability by using XML data 3.6.1.3Mobility model In SUMO an extension called Gipps model is used (invented and described by Krauss). In this model, for each time instant the speed of the vehicle is adapted to the preceding vehicle. This results in collision-free behaviour for the following time intervals. This velocity v is calculated by the algorithm as follows: [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 27 v(t) = vp+g(t)·t−vp(t) ¯ v b(¯ v)+τ Where • v(t) is speed of the preceding vehicle at time t • g(t) is the distance or gap to the preceding vehicle at time t •τis the reaction time of the driver (usually 1s) • b is the deceleration function The mobility model used in SUMO is a car-following model. The diagram in Figure 8explains the behaviour applied in this model. Figure 8: car-following diagram 3.6.1.4Topological maps • Defined by the user manually, ie defining crosses and points between them the roads or streets), one by one • Random • Real maps by importation 3.6.1.5Origin/destination Equally, they can be user-defined, or be random 3.6.1.6Intersections management Traffic lights play an important role in the management of intersections. Besides implemented basic priority rules intersections can also be controlled by traffic lights in the simulation. [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 28 3.6.1.7Traffic generator The traffic generator is responsible for the production of traffic. This is where the car-following paradigm is implemented. The model assumes that the driver is subject to interaction with other vehicles, making the simulator resemble human behaviour. Regarding the generation of routes the model does not distribute vehicles statistically by the network; it uses daily plan data of drivers in terms of travel and departure times. This data is loaded into the simulator, but SUMO must however calculate routes itself from the data. There is a specific module simulator in charge of reading times of departure, points of origin and destination and calculates routes using Dijkstra’s algorithm (1959). Since street speed changes with traffic, the prior calculation to know the traffic routes cannot be set to a real situation. In this case, obtaining the route is performed by the balancing algorithm User Dynamic (Dynamic User Equilibrium) developed by Christian Gawron where the routing and simulation is repeated several times to achieve a behaviour of the real world similar to the drivers. 3.6.2Network Simulator: OMNet++ OMNeT++ is a discrete event simulator based on C++ for modelling communication networks, multiprocessors and other distributed systems. Motivation to develop OMNeT++ arose from the need for a powerful tool based on discrete event simulation for use in the academic, educational and commercial research-oriented institutions field. This tool is available to the public since September 1997, and its popularity has been increasing in the course of its development over the years. It is a project emerged in the Department of Telecommunications at the University of Technology and Economics, Budapest (Hungary). 3.6.2.1Modular structure OMNeT++ model consists of hierarchical modules that communicate with each other through message passing. The basic modules (called simple modules) are grouped into compound modules which can be grouped with other compounds, and so on without limitation; all of which are contained in the higher level called system module. All these simple modules are instances of a basic module named "type module” which is who provides the basic functionality to deploy modules which compose the model. Due to the hierarchical structure of this system, the messages (which may contain data structures) typically travel through chains of connections between modules. The communication interfaces between the modules are called gates, which in turn are connected to each other via connections. Each connection has three associated parameters, which facilitate the modelling of the communications network. These include the [ June 29,2015 at 10:04 –classicthesis ] 3.6 veins simulator 29 propagation delay, error rate bit and the information transfer rate. This is done to customize the behaviour of each module and its interaction with others. Chapter 3describes the diferent kinds of network simulators and mobility generators that suit the simulations which will be described in the next chapter. After analizing all the available tools, the decision concluded in using Veins for this study. Finally, what remains to be explained are the simulations carried out by the study, the results achieved and the conclusions drawn. [ June 29,2015 at 10:04 –classicthesis ] Part IV SIMULATIONS AND RESULTS [ June 29,2015 at 10:04 –classicthesis ] 4 EVALUATION OF PLATOONING IN A DENSE URBAN SCENARIO The possibility of a self-driving vehicle as part of a road train starts becoming real. This vehicle could drive solely by communicating with the leading vehicle forming a platoon. Platooning can be described as a group of vehicles which drive automatically due to the controllers they have installed allowing them to keep a constant distance with the preceding vehicle. This group of cars is called platoon, and vehicles can freely join or leave the platoon. Figure 9: Platooning www.bbc.com/future/story/20130409- robot-truck-platoons-roll-forward Last visit: Juny 2015 4.1 kpi’s Platooning has already been tested in highway scenarios. The key performance indicators to measure whether or not platooning improves ordinary driving are: • Fuel saving • Security • Travel time The reduced drag of a car driving directly behind another saves fuel. The human factor is one of the main causes of car accidents, so if the driver is substituted by automatic driving, this risk is decreased. Mantaining a constant speed prevents jams, decreasing also travel time. Obviously, there are not only benefits. Reduction of freedom and questions like: Which is the role of the driver?, are some inconvenients in platooning. The maximum number of vehicles that 31 [ June 29,2015 at 10:04 –classicthesis ] 4.5 particularities of plexe 38 Figure 13: Simulatons Flowchart [ June 29,2015 at 10:04 –classicthesis ] 4.6 evaluation of the controller parameters 39 4.6 evaluation of the controller parameters The goal of these simulaitons is to evaluate the viability of using platooning in urban areas. An evaluation of how CACC parameters affect the join maneuver described in section 4.4.1is the first step in finding which values of these parameters are most suitable in an urban environment. The source code which will be used in this simulation can be found under the veins-plexe-1.1branch for Veins. 4.6.1Simulation set up The starting point will be the joinManeuver example which can be found in the example list on PLEXE. The map used in this section will be the straight highway map. It can be found in the sumocfg directory of the joinManeuver example. The parameters evaluated will be the 3parameters of the CACC: ξ,C1,ωn. Simulations with diferent size of the platoon will be run also to check whether or not size has an effect on the join maneuver. The two sizes of the platoon in this study are 4and 6cars, excluding the joiner vehicle. All the value ranges can be set in the omnetpp.ini file, located in the main folder of the project. Table 6shows the values of all the parameters and also the parameter ranges to be analyzed. Appendix B explains how to set all the simulations step by step. Parameter Value communication Path loss model Free space (α=2.0) PHY model IEEE 802.11p MAC model 1609.4single channel (CCH) Frequency 5.89 GHz Bitrate 6MBit/s (QPSK R=1/2) Acces category AC_VI MSDU size 200 B Transmit power 20 dBm mobility Leader’s speed 100 Km/h Platoon size 4and 7 Car length 4m Maximum speed 120 Km/h controllers Engine lag τ0.5s Weighting factor C1[0.1,1] step=0.1 Controller bandwidth ωn[0.1,1]Hz step=0.1 Damping factor ξ[1,10] step=1 Desired gap gapdes 5m Distance gain kd0.7 Speed gain ks1 Table 6: Network and road traffic simulation parameters 4.6.2Results The goal of this study is the optimization of platoon creation in urban scenarios. Platooning is more effective the longer a car stays in the platoon, so the ideal would be for the joiner vehicle to reach the platoon as fast as possible. The criterion to determine whether or not the joiner vehicle belongs to the platoon is the distance between the joiner and the last vehicle in the platoon. When that distance becomes [ June 29,2015 at 10:04 –classicthesis ] 4.6 evaluation of the controller parameters 40 stable (less than 6meters), one can assume the joiner belongs to the platoon. Figure 14 shows the plots obtained, by using Matlab (the process is further detailed in appendix B.3): Figure 14: Time to reach the platoon (4vehicles) The results obtained when ξchanged (from 1to 10) were that in a100 seconds simulation the joiner only reached the platoon in the first case (ξ=1). So the plot is a single point when ξ=1, and the time to reach the platoon was 60.6seconds. From the 2plots above one can conclude that changing C1does not significantly alter the time which the joiner vehicle needs to reach the last vehicle of the platoon. The curve of the time required versus bandwidth of the controller showed that increasing the bandwidth affects the time to join the platoon considerably. A number of bugs were detected in the simulation when the value of the bandwidth was higher than 1. Using the results obtained in “Operating Platoons On Public Motorways: An Introduction To The SARTRE Platooning [ June 29,2015 at 10:04 –classicthesis ] 4.6 evaluation of the controller parameters 41 Programme”[8] in which the maximum number of vehicles in a platoon is assessed it is possible to build a more realistic simulation. Figure 15 shows the plots we obtain when the platoon is bigger. In this case there are 7cars (6plus the joiner): Figure 15: Time to reach the platoon (7vehicles) The evaluation of the situation changing ξis quite similar to the 4cars case because the joiner vehicle also reaches the platoon only in the case when ξ=1(57.6seconds). Both plots above are also quite similar to the 4vehicles case. Comparing the first plot of Figure 13 (C1), there are 2main differences. Firstly, the time to reach the platoon when C1takes values from 0.1to 0.7is not constant (although, is almost constant). Secondly, the time to reach the platoon is lower that in a 4cars platoon. These values in both plots are around 3-4seconds lower in comparision with the 4cars platoon case because the joiner vehicle starts both simulation cases (4and 7cars) on the same time step. [ June 29,2015 at 10:04 –classicthesis ] 4.6 evaluation of the controller parameters 42 4.6.3Results evaluation No significant changes were observed when the number of vehicles on the platoon increased from 4to 7. However a longer platoon is a more realistic case than a 2,3,4car platoon (maximum of 15). Therefore, in future, a 7car platoon simulation will be considered. All the plots of the distance, acceleration and speed vectors can be found in Appendix C. The next section explains how a join maneuver is run in an urban scenario. Distances in a city are much shorter than on a highway causing cars to remain less time in the platoon. In order to notice any advantages in terms of time and fuel economy it is crucial for the joiner to reach the platoon as fast as possible and spend as much time as possible in it. The results of this section will be used to determine which are the best values for an urban scenario. [ June 29,2015 at 10:04 –classicthesis ] 4.7 use of platooning in urban environments 43 4.7 use of platooning in urban environments Large cities have enabled special lanes in big streets for the exclusive use of buses and taxis. These lanes are an example of potential platoon lanes in urban environments. If a large part of the journey to be made by a car coincides with a number of other cars as well as a bus line, then a platoon line may be established. 4.7.1Map set up A city map is needed in order to set up the next simulation. So as to not complicate matters excessively it is better try to find a city area without complex intersections and crossings. A map of Barcelona (district of L’Eixample) was chosen for the simulation. Appendix B.2 explanains how to download and set all the files properly. 4.7.2Network set up After setting up the traffic section of the simulation the next step includes the application layer of the controller. The changes applied will not be very significant yet are required for a correct run of the simulation and to fix the bugs found. This will be explained further on. All the settings are detailed in the appendix B.2. The CACC parameters were analyzed in the highway scenario. At this stage the only thing left is to set up the most suitable values of the CACC in the omnetpp.ini file The following are the values which allow vehicles to join the platoon as fast as possible: •ξ=1 •ωn=1Hz •C1=0.5 4.7.3Explanation of the join maneuver simulation This section clarifies all the different parts of the simulations in the urban scenario and how cars behave in each part of the simulation. The simulation consists of 4different parts: The first one entails platoon formation, which drives along the rightmost lane of the main street on the map. There is a car in a perpendicular street which is the joiner and after turning right, it will join the platoon. [ June 29,2015 at 10:04 –classicthesis ] 4.7 use of platooning in urban environments 44 Figure 16: First part of the join maneuver The second part is when the car reaches the main street and detects that there is a platoon matching its route. It will then send the join request to the leader vehicle or bus, in this case. Figure 17: Second part of the join maneuver [ June 29,2015 at 10:04 –classicthesis ] 4.7 use of platooning in urban environments 45 In the third part the joiner vehicle reaches the platoon and continues its route with it. The last part is when the route of the joiner vehicle and the platoon finally differ causing the joiner car to leave the platoon and continue its route alone. Figure 18: Last part of the join maneuver [ June 29,2015 at 10:04 –classicthesis ] 4.7 use of platooning in urban environments 46 4.7.4Dense urban traffic simulation The goal of these simulations is to compare CO2emissions of the joiner car, with CO2emissions of a car driving the same route in a dense traffic situation (without using platooning). The simulation of this dense traffic will be only in the main street of the route, assuming that the CO2emissions on the rest of the trip are the same in both cases. The plexe-veins project: sinPlatoon allows simulation of a dense traffic situation. The idea of simulating high dense traffic in the main street is to force the vehicle to have a sinusoidal speed in that part of the simulation. To perform that, we just have to add the desired route to the route file of this example, change the number of cars (there will not be any platoon in this simulation, just a single car), and force a sinusoidal speed in the desired time steps (in the aplication layer file of the project). The same emissions than in the join maneuver simulation will be assumed, when the vehicle is not in the main street. The procedure is quite similar to all the set ups done previously and therefore will not be explained as in depth as in the other cases. The simulation is very simple yet it will be simulated at differents frequencies (meaning different traffic densities) to check how this affects the results. 4.7.5Results The results from the simulations described in the section 4.7will be computed an analyzed in this section. The steps taken to reach the results are explained in Appendix B. In Figure 20 are the plots of the CO2emission vector of the joiner vehicle versus time, in 4differents simulations. The values of ξand ωnhave been changed in each simulation. This has made it possible to check the correctness of the results obtained from the section 4.6 and wether they match in this new environment. [ June 29,2015 at 10:04 –classicthesis ] 4.7 use of platooning in urban environments 47 Figure 19: CO2emission plots The first peak of these plots belongs to the first part of the simulation when the joiner vehicle first accelerates until it reaches the first intersection. After that there is a second acceleration because the vehicle receives the position to join the platoon (second part of the simulation). Then the CO2emission, more or less, stabilizes (third part). The small variations are due to the platoon driving through intersections. Finally, around the 80 seconds, the vehicle leaves the platoon and turns left in an intersetion to continue its route (the third peak of the plots). In the plots where ξ=1and ωn=1Hz (plots 2and 4), the point when the fluctuations are smoother appears earlier than in plots 1 and 3. This means that the joiner vehicle reaches the platoon faster when the parameters of the controller are choosen from simulations in section 4.6 Figure 21 shows the CO2emission vector plotted when the sinusoidal speed is simulated. [ June 29,2015 at 10:04 –classicthesis ] A.3 building sumo 54 a.3 building sumo The procedure is similar for both Linux and Mac OS systems, but with some small differences in the commands. SUMO depends on some third party libraries which can be installed on a Linux machine with • $ sudo apt-get install libgdal-dev libproj-dev \ libxerces-c-dev libfox-1.6-dev libtool \ autoconf After installing the dependencies, SUMO can be configured with • $ cd ~/src/plexe-sumo • $ make -f Makefile.cvs • $ ./configure On both systems, SUMO can then be built by simply typing make on the command line. The final step is to add the SUMO bin directory to your PATH. Add to your .bash_rc • export PATH=$PATH:$HOME/src/plexe-sumo/bin Now you should be able to run SUMO by typing either sumo or sumo-gui for the command line and the GUI version respectively. a.4 building plexe veins Building Plexe Veins is the simplest step. Just type the following on the command line • $ cd ~/src/plexe-veins • $ make -f makemakefiles MODE=release • $ make MODE=release a.4.1Installing R R is a powerful statistical framework which can be used to parse, process, and plot data obtained through OMNeT++ simulations. The plots in Figures 1a and 1b have been obtained with a few lines of code. To install R, open a terminal and type • $ sudo apt-get install r-base You will then need to install OMNeT++ package for R, ggplot2, and reshape. To install ggplot2and reshape, open the R console and simply type • install.packages(c(’ggplot2’, ’reshape’)) Once installation is complete, exit the console by hitting CTRL+D twice. Download the OMNeT++ R package 7and then install it by typing [ June 29,2015 at 10:04 –classicthesis ] A.4 building plexe veins 55 • $ R CMD INSTALL /path/to/download/omnetpp_0.2-1.tar.gz on your terminal. Your R environment should now be correctly set up. [ June 29,2015 at 10:04 –classicthesis ] B SIMULATION SETTINGS b.1 first simulation This appendix explains how to set up the highway simulations. Starts explaining how to set the desired values of the controller for the first scenario. The figure below shows the files where the range of values for the simulations are set. This is the omnetpp.ini file of the joinManeuver project. Values can be set just typing the next line. Figure 23: omnetpp.ini file (joinManeuverPlatoon example) *.node[*].appl.caccC1= ${caccC1=0.1..1step 0.1} #weghting factor (default 0.5) This line could be translated as: set the C1parameter of the CACC controller of every node (node[*]) to values from 0.1to 1in 0.1steps. # it is only used to add notes (after # the code is not compiled). To run the simulation first of all we have to use this comand in the terminal, to prepare the socket that connects Omnet++ with SUMO, so we open a terminal an type: $ ./sumo-launchd.py -c /plexe-sumo/bin/sumo-gui Is important to say that the SUMO version used, has many changes from a clean SUMO version, therefore this version can be downloaded from the plexe website[6]. 56 [ June 29,2015 at 10:04 –classicthesis ] B.1 first simulation 57 The graphic user interface only allows to run simulations one by one, so ,in order to run all the simulation in a row, we will use another terminal command. However, before that this is necesary to add the next lines in the “freeway.sumo.cfg” that is located in the sumocfg directory of this same example: <gui_only> <start value="true"/> </gui_only> Then, everything is ready to launch the simulations. So the only thing left is change to the joinManeuverPlatoon directory and type in the shell: $ ./run -u Cmdenv -f omnetpp.ini -c JoinManeuver -G After that the SUMO GUI come out and automatically will start running the simulation. It is possible to see how the simulation elapses in the SUMO GUI and check that all the SUMO files are correclty set (number of vehicles, lanes, speed, type of vehicles). Figure 24: SUMO GUI: Freeway example Once all these 30 simulations have finished, every run has 3 different files as outputs: .vec, .sca and .vci. All of them can be found in the results directory. In the example already exists a tool to process and analyze the outputs of these simulations, it is a R script located in the analysis directory, which also need to be modified to load all the files and plot the desired results. The acquired plots from these scripts are: • distance (between a car and the previous one) • speed • acceleration [ June 29,2015 at 10:04 –classicthesis ] B.2 second simulation 58 of every vehicles (available in Appendix C). b.2 second simulation The second scenario is a little bit more complex, so this appendix explains how to download set and build the map and the network. b.2.1Map set up SUMO has compability with .osm exported maps from Open Street Map website[12], so we export map from the desired zone of Barcelona, and we obtain the .osm file. Second step will be convert this .osm file into a .xml file so we go to the /sumo/bin directory and type the next command: $ netconvert –osm-files cityAreaPoly.osm -o cityAreaPoly.net.xml We also need an aditional file that we create with this command: $ polyconvert –net-file kl.net.xml –osm-files kl.osm –type-file typemap.xml -o kl.poly.xml After that the route file has to be created. Using the .rou.xml file in the join maneuver example we create the our platooon route and our joiner route for our urban map. This route file looks like this: Figure 25: Route file The only thing remaining is create a .sumo.cfg file, referring to all the files we create before: Finally, we will check, whether or not, the routes and the maps we have created, work correctly typing this on the terminal: $ ./sumo gui -c sumofile.sumo.cfg [ June 29,2015 at 10:04 –classicthesis ] B.2 second simulation 59 Figure 26: sumo.cfg file When we run this command, we can check in the GUI of SUMO that the map has been built correctly and the cars drive through the correct routes. b.2.2Network set up First of all we need to add 3vehicles to the platoon, each one with the correspondig id, set the platoon lane we are going to use in the simulation, change the id of the last vehicle of the platoon (required to send to the joiner the correct position it has to join the platoon), set the time of the join maneuver request message, and also lead the joiner to the correct lane on the exact time step when it has to leave the platoon. Some of these changes can be seen on this figure: Figure 27: JoinManeuverApp.cc [ June 29,2015 at 10:04 –classicthesis ] B.3 procesing data 60 To correct the bugs that force vehicles to change line, the next line is necesary to change vehicle’s lane in the correct time step. traci->commandSetFixedLane(traci->getExternalId(), 0); b.3 procesing data Matlab is the tool choosen to procees the data. Typing the next shell command is possible to filter the desired vectors from the .vec output file: $ awk ’{if($1==number_of_desired_vector)print$4" "$3}’<output_file_from_omnet.vec >output.txt With this command the .txt file created, contains 2columns. Distance values in the first column, and the corresponding simulation time in the second column. With this format is easier to load the data into matlab. After starting up matlab and chososing the workspace where all the .txt files created before are, the only thing left is run this script to process the data and obtain the plots: [ June 29,2015 at 10:04 –classicthesis ] B.3 procesing data 61 a=[’1’,’2’,’3’,’4’,’5’,’6’,’7’,’8’,’9’,’10’]; time=zeros(1,10); for i=1:10; s1=’distance_’; if(i==10) s2=’0_0.2_0.5.txt’; else s2=’_0.2_0.5.txt’; end s3=strcat(s1,a(i)); s4=strcat(s3,s2); H=load(s4); b=H(:,1); k=find(b<0); d=b; for j=1:length(k) d(k(j))=NaN; end c=H(:,2); y=find(d<6); if (length(y)>0) time(i)=c(y(1)-300); else time(i)=NaN; end end time z=[12345678910]; plot(z,time) xlabel(’Psi’); ylabel(’Time to reach the platoon’); This script allows to load all the data from Omnet++, process and plot the curves that shows us how much the time takes the joiner vehicle to reach the platoon, versus all the values of the parameters assigned before. There is a few things that should be mentioned. The first 10 seconds the joiner car still do not exists and in this case Omnet assigns the value -1when that happens thats why have to fix that to process the data correctly. There is a first 30 seconds in the simulation when the scenario is being conformed and CACC is not working, so we have to take away this 30 first seconds when we want to compute the time that needs the joiner to reach the platoon. There are 6different scripts to compute every output data form all the values of the controller parameters. The differences between each script are minimum: name of the loaded files and value of the x axis. [ June 29,2015 at 10:04 –classicthesis ] C PLOTS −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 25 50 75 100 time acceleration factor(nodeId) 0 1 2 3 4 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 25 50 75 100 time distance factor(nodeId) 1 2 3 4 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 25 50 75 100 time speed * 3.6 factor(nodeId) 0 1 2 3 4 Figure 28: Plot changing bandwidth in a 4cars platoon 62 [ June 29,2015 at 10:04 –classicthesis ] plots 63 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 −4 −2 0 2 1 2 3 4 5 6 7 8 9 10 0 25 50 75 100 time acceleration factor(nodeId) 0 1 2 3 4 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 0 25 50 75 100 1 2 3 4 5 6 7 8 9 10 0 25 50 75 100 time distance factor(nodeId) 1 2 3 4 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 100 120 140 1 2 3 4 5 6 7 8 9 10 0 25 50 75 100 time speed * 3.6 factor(nodeId) 0 1 2 3 4 Figure 29: Plot changing psi in a 4cars platoon [ June 29,2015 at 10:04 –classicthesis ]