DF Modelling and Simulation of Heterogeneous Traffic An investigation of autonomous vehicles impact on heterogeneous traffic in terms of traffic flow and safety Master’s thesis in Automotive Engineering Nicklas Pettersson Department of Mechanics and Maritime Sciences CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2020 Master’s thesis 2020:74 Modelling and Simulation of Heterogeneous Traffic An investigation of autonomous vehicles’ impact on heterogeneous traffic in terms of traffic flow and safety NICKLAS PETTERSSON DF Department of Mechanics and Maritime Sciences Division of Vehicle Safety Chalmers University of Technology Gothenburg, Sweden 2020 Modelling and Simulation of Heterogeneous Traffic NICKLAS PETTERSSON © NICKLAS PETTERSSON, 2020. Supervisor: Maytheewat Aramrattana and Niklas Strand, Swedish National Road and Transport Research Institute (VTI) Examiner: Pinar Boyraz Baykas, Vehicle Safety Division of Mechanics and Maritime Sciences Department Master’s Thesis 2020:74 Department of Mechanics and Maritime Sciences Division of Vehicle Safety Chalmers University of Technology SE-412 96 Gothenburg Telephone +46 31 772 1000 Typeset in LATEX, template by David Frisk Printed by Chalmers Reproservice Gothenburg, Sweden 2020 iv Modelling and Simulation of Heterogeneous Traffic An investigation of autonomous vehicles impact on heterogeneous traffic in terms of traffic flow and safety NICKLAS PETTERSSON Department of Mechanics and Maritime Sciences Chalmers University of Technology Abstract The development of Autonomous vehicles has intensified during recent years, and autonomous vehicles is believed to be a common sight on public roads in the near future. It is safe to say that autonomous vehicles will revolutionize the transporta- tion field in multiple ways, such as improved transportation comfort and improved traffic safety. The aim of this study is to investigate how autonomous vehicles will impact heterogeneous traffic in terms of traffic flow and safety. In the context of this study, heterogeneous traffic is defined as traffic situations with different vehicle types, both manually driven and autonomous. To investigate how autonomous vehicles impacts the flow and safety of heterogeneous traffic, simulation models of manually driven vehicles and autonomous vehicles was calibrated. The simulation models, which were calibrated based on a naturalistic data-set, represent cars and trucks which takes the preceding vehicle type under consideration. Simulations were executed in SUMO with various penetration rates of autonomous vehicles with the intention to analyze how the different penetration rates impact the heterogeneous traffic. The simulation results showed that the number of traffic conflicts tends to decrease as the penetration rate of autonomous vehicles increase for the same mean road speed. Also, the results showed that the mean road speed increase as the pene- tration rate of autonomous vehicles increase for the same vehicle flow rate. The difference in mean road speed for the different penetration rates increases as the vehicle flow rate gets bigger. This leads to the number of conflicts increase as the penetration rate increase when the vehicle flow rates are high. These results suggest the autonomous vehicles have the potential to improve the traffic safety by decreasing the number of conflicts and to improve the traffic flow by increasing the mean road speed and therefore lessen the travel time. However, the mean speed needs to be limited, or else the number of conflicts will significantly increase. Keywords: SUMO, Autonomous vehicle, Heterogenous traffic, Traffic flow, Traffic safety, car-following, lane-changes, Traffic simulation, HighD dataset, Model cali- bration. v Acknowledgements My three biggest thanks go to my examiner at Chalmers, Prof. Pinar Boyraz- Baykas, and my two supervisors at VTI, Niklas Strand and Maytheewat Aramrat- tana. Without your guidance, encouragement and support, the goals of this project could not have been reached. I also want to express gratitude to the two other members of the “Heterogeneous Traffic Team”, namely my friend and classmate Weicheng Xiao and his examiner Selpi Selpi. Thank you for your invaluable assist and for providing new perspectives on different issues that arose during this project. I am also very thankful to the staff at VTI for giving me the opportunity per- form this work at their office in Gothenburg. Thank you for your hospitality, overall kindness and, most importantly, free coffee. Finally, I want to thank my family and friends for your never-ending source of inspiration and support during this tough but fun time. Be bitter, stay angry and blame everyone. Nicklas Pettersson, Gothenburg, August 2020 vii Abbreviations • AV - Autonomous Vehicle • SV - Subject Vehicle • TV - Trailing Vehicle • LV - Leading Vehicle • TTC - Time-to-Collision • PET - Post-Encroachment Time • DHW - Distance Headway • THW - Time Headway • ALG - Adjacent Lane Gap • TRB - Transport Research Board • NDS - Naturalistic Driving Study • CC - Car with a preceding car • CT - Car with a preceding truck • TC - Truck with a preceding car • TT - Truck with a preceding truck • VTI - Swedish National Road and Transport Research Institute • CF - Car-following • LC - Lane-change ix Contents List of Figures xiii List of Tables xvii 1 Introduction 1 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Aim and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Limitations and Assumptions . . . . . . . . . . . . . . . . . . . . . . 2 1.4 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Theory 5 2.1 Standardized Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Simulation of Heterogeneous Traffic . . . . . . . . . . . . . . . . . . . 9 2.2.1 Simulation of Urban Mobility (SUMO) . . . . . . . . . . . . . 9 2.2.2 Lane-changing models . . . . . . . . . . . . . . . . . . . . . . 10 2.2.3 Car-following models . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.4 The impact of vehicle types . . . . . . . . . . . . . . . . . . . 12 2.3 Naturalistic Driving Studies . . . . . . . . . . . . . . . . . . . . . . . 13 2.3.1 Highway Drone Data-set . . . . . . . . . . . . . . . . . . . . . 13 3 Methodology 17 3.1 Analysis on HighD data-set . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.1 Extraction of initial states . . . . . . . . . . . . . . . . . . . . 19 3.1.2 Data extraction for Car-Following . . . . . . . . . . . . . . . . 19 3.1.3 Data extraction for Lane-changing . . . . . . . . . . . . . . . 22 3.2 Simulation environment . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.3 Calibrating Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3.1 Calibration of Lane-changing Models . . . . . . . . . . . . . . 27 3.3.1.1 Lane-change Eagerness and Willingness . . . . . . . 27 3.3.1.2 Speed factor . . . . . . . . . . . . . . . . . . . . . . . 32 3.3.1.3 Desired Time Headway . . . . . . . . . . . . . . . . . 33 3.3.2 Calibration of Car-following Models . . . . . . . . . . . . . . . 34 3.3.2.1 Desired Time Headway . . . . . . . . . . . . . . . . . 35 3.3.2.2 Driving Imperfection . . . . . . . . . . . . . . . . . . 36 3.4 Modeling Autonomous Vehicles . . . . . . . . . . . . . . . . . . . . . 37 3.4.1 Longitudinal Speed and Acceleration . . . . . . . . . . . . . . 37 3.4.2 Vehicle Gaps . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 xi Contents 3.4.3 Driving Imperfection . . . . . . . . . . . . . . . . . . . . . . . 38 3.4.4 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.5 Execution of Simulations . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.5.1 Traffic Flow Measurements . . . . . . . . . . . . . . . . . . . . 39 3.5.2 Traffic Safety Measurements . . . . . . . . . . . . . . . . . . . 39 4 Results 41 4.1 Lane-Change Calibration . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2 Car-following Calibration . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.3 Heterogeneous Traffic simulation with Car-following Models . . . . . 49 4.4 Heterogeneous Traffic simulation with Lane-changing Models . . . . . 55 5 Conclusion and Future Work 59 5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Bibliography 61 xii List of Figures 2.1 A visualization of vehicle headway . . . . . . . . . . . . . . . . . . . . 6 2.2 A visualization of Time-To-Collision . . . . . . . . . . . . . . . . . . . 7 2.3 A visualization of Post Encroachment Time. The upper part of the figure shows the vehicle positions at time t1 and the lower part of the figure shows the vehicle positions at time t2 . . . . . . . . . . . . . . 8 2.4 A visualization of the vehicle gaps used in traffic analysis. The green vehicle is the subject vehicle. . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 A example of a simulation conducted in SUMO . . . . . . . . . . . . 10 3.1 An overview of the projects work process . . . . . . . . . . . . . . . 18 3.2 The Distance Headway distribution during car-following for cars ex- tracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . . 20 3.3 The Distance Headway distribution during car-following for trucks extracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . 20 3.4 The Time Headway distribution during car-following for cars ex- tracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . . 21 3.5 The Time Headway distribution during car-following for trucks ex- tracted from the HighD data-set . . . . . . . . . . . . . . . . . . . . . 21 3.6 The Distance Headway distribution during lane-changing for cars ex- tracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . . 22 3.7 The Distance Headway distribution during lane-changing for trucks extracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . 23 3.8 The adjacent lane gap distribution during lane-changing for cars ex- tracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . . 23 3.9 The adjacent lane gap distribution during lane-changing for truck extracted from the HighD data-set. . . . . . . . . . . . . . . . . . . . 24 3.10 A example of the vehicle trajectory during a lane-change . . . . . . . 25 3.11 A snapshot of the built road during a simulation run . . . . . . . . . 26 3.12 The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 1. . . . . . . . . . . . 28 3.13 The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 3. . . . . . . . . . . . 29 3.14 The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 5. . . . . . . . . . . . 29 3.15 The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 1. . . . . 30 xiii List of Figures 3.16 The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 3. . . . . 30 3.17 The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 5. . . . . 30 3.18 The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.19 The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.20 The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.21 The number of conflicts against the lane-change eagerness and lcAssertive. 32 3.22 The mean DHW during a lane-change against the speed factor. . . . 33 3.23 The number of lane-changes against the speed factor. . . . . . . . . . 33 3.24 The mean DHW during a lane-change against the desired minimum THW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.25 The number of lane-changes against the desired minimum THW. . . . 34 3.26 The mean DHW during car-following against the desired minimum THW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.27 The mean of the actual THW during car-following against the desired minimum THW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.28 The mean dHW during car-following against the driving imperfection. 36 3.29 The mean THW during car-following against the driving imperfection. 37 4.1 Comparison of the Distance Headway distribution during lane-changing for cars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2 Comparison of the Distance Headway distribution during lane-changing for trucks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.3 Comparison of the adjacent lane front gap distribution during lane- changing for cars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.4 Comparison of the adjacent lane front gap distribution during lane- changing for trucks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.5 Comparison of the Time Headway distribution during car-following for cars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.6 Comparison of the Time Headway distribution during car-following for trucks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.7 Comparison of the Distance Headway distribution during car-following for cars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.8 Comparison of the Distance Headway distribution during car-following for trucks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.9 The average time loss for different penetration rate of AV. . . . . . . 49 4.10 The average depart delay for different penetration rate of AV. . . . . 50 4.11 The number of conflicts for different penetration rate of AV. . . . . . 51 4.12 The average mean network speed for different flow rates. . . . . . . . 52 xiv List of Figures 4.13 The average mean network speed for different traffic densities. . . . . 53 4.14 Flow rate vs traffic density for different penetration rate of AV . . . . 54 4.15 The percentage of vehicles that was involved in a traffic conflict . . . 55 4.16 Percentage of vehicles that perform a lane-change for different pene- tration rates of AV . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.17 Percentage of vehicles that perform a lane-change for different flow rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.18 Percentage of vehicles that perform a lane-change for different traffic densities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 xv List of Figures xvi List of Tables 2.1 The impact of vehicle types in terms if different driving attributes. . . 13 3.1 The result of the car-following analyse. . . . . . . . . . . . . . . . . . 21 3.2 The result of the lane-changing analysis. . . . . . . . . . . . . . . . . 25 3.3 List of the models that will be tuned in SUMO based on the HighD data-set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.4 Car and truck attributes used in SUMO . . . . . . . . . . . . . . . . 27 3.5 Description of the SUMO parameters related to lane-changes that was used during the calibration process. . . . . . . . . . . . . . . . . 28 3.6 The parameter values of the calibrated autonomous models . . . . . . 38 4.1 The parameter values of the calibrated lane-change models . . . . . . 41 4.2 Number of lane-changes extracted from the HighD data-set and the SUMO simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.3 The parameter values of the calibrated car-following models . . . . . 46 xvii List of Tables xviii 1 Introduction 1.1 Background Autonomous, or driverless vehicles have seen a rapid development during recent years and are predicted to be on the market in the near future. In fact, vehicles that are at level 3 of autonomy, also known as conditional autonomy, are already on the market. According to an article published by SAE International [1], a vehicle at level 3 of driving automation are able to drive without the driver intervening under certain condition, but the driver is required to be ready to take over the control of the vehicle at any moment. Autonomous vehicles will not only make travelling more convenient, they are expected to make improvements within the transportation field in terms of traffic flow and safety [2]. According to National Highway Traffic Safety Administration (NHTSA), 94% of all serious car crashes are caused by human error [2]. These crashes could potentially be prevented, which would significantly reduce the number of traffic fatalities and injuries, if autonomous vehicles were used instead of manually driven vehicles. NHTSA also states that a smoother traffic flow will lead to less time spent in traffic, a decrease in fuel costs and a decrease in vehicle emissions [2]. Autonomous vehicles are expected to make the traffic safer and smoother and reduce the traffic congestion under the condition that the other vehicles are driverless, or in other words, the road is only occupied by autonomous vehicles [2]. However, at the time when autonomous vehicles are introduced to public roads, they will at first share the road with the current road actors, such as manually driven cars, trucks, pedestrians and cyclists. Autonomous vehicles’ impact on traffic situations with different road actors must therefore be investigated. Traffic situations with different road actors will in this study be referred to as “heterogeneous traffic”. Two of the most fundamental driving maneuvers that occurs on traffic, and should therefore be considered when investigating heterogeneous traffic, are car-following and lane-changing maneuvers. The driving behavior during car-following and as- sociated vehicle dynamic variables such as acceleration, speed and position largely depend on the preceding vehicle [3]. These vehicle dynamic variables affect both traffic flow and traffic safety. A small distance gap between vehicles and a higher vehicle speed means a shorter reaction time in case of an emergency and is there- fore bad from a safety perspective. From a traffic flow perspective however, a small distance between vehicles and a high vehicle speed is good. This is because a higher 1 1. Introduction vehicle speed leads to a shorter travel time and a small gap between vehicles mini- mize the usage of road space. The driving behavior during a lane-change maneuver depends not only on the preceding vehicle but also on the vehicles in the adjacent lane [4]. The driver tends to decide if a lane-change is appropriate based on the front gap to the preceding vehicle and the lead gap to the vehicle in the adjacent lane [4]. These two vehicle gaps are visualized in figure 2.4. NHTSA states that crashes during a lane-changing maneuver results in around 60,000 injuries annually in the USA alone [5]. In this study, the impact of autonomous vehicles on heterogeneous traffic in terms of traffic flow and safety will be investigated. This project is carried out at Swedish National Road and Transport Research Institute as part of their research on au- tonomous vehicles impact on mixed traffic. The project’s aim and objectives are descried in section 1.2 and the limitations of the project are described in section 1.3. 1.2 Aim and Objectives This study aims to investigate how autonomous vehicles impact heterogeneous traf- fic in terms of traffic flow and safety. More specifically, the goal is to tune existing car-following and lane-changing models in SUMO so the models take preceding ve- hicle’s type, namely car and truck, under consideration. The models, which will represent manually driven cars and trucks, will be used to simulate different het- erogeneous traffic scenarios. The simulations will be run in SUMO (Simulation of Urban Mobility), which is an open source simulation program [6]. The models will be calibrated and validated with a Natural Driving Study (NDS) data-set called HighD (Highway Drone) data-set, which is a data-set primary used for safety vali- dation of autonomous vehicles [7]. The result from the simulation will be analyzed in terms of traffic flow and safety measurements, such as headway, spacing and number of conflicts, in order to investigate how the integration of autonomous vehicles and manually driven vehicles works in theory. The expected outcome of this project is microscopic traffic simulation models for heterogeneous traffic and an analysis on how traffic flow and safety in heteroge- neous traffic are affected by autonomous vehicles. The models and the simulation result are intended to be used by VTI (Swedish National Road and Transport Re- search Institute) in their future research on integration of autonomous vehicles in heterogeneous traffic. 1.3 Limitations and Assumptions A full representation of heterogeneous traffic includes multiple road actors, such as cars, trucks, motorcycles, pedestrians and bicycles, and multiple different traffic sit- uations, such as city driving, highway, road maintenance and parking lots. It also includes different traffic scenarios, such as car-following, roundabout, left-turns and lane-changing. It is also safe to say that driver behavior and traffic flow depends on 2 1. Introduction the weather and road conditions. In order to fully investigate autonomous vehicles’ impact on heterogeneous traffic, all these aspects need to be considered. This study is limited to car-following and lane-changing models of manually driven cars and trucks. The preceding vehicle types that will be considered are cars and trucks. Also, normal road conditions are assumed, hence no heavy rain or snow, fog, icy road etc. There is no publicly available dataset on autonomous vehicles, so the autonomous vehicles will be represented by existing models in SUMO. 1.4 Thesis Outline The remaining part of this report is divided into 4 chapters, namely “Theory”, “Methodology”, “Results” and “Conclusion and Future work”. Chapter 2, “The- ory”, provides the necessary background in order for the reader to understand the reasoning, results and conclusions of the study. The theory chapter contains stan- dardized definitions of driving performance measurements along with literature re- views of car-following and lane-changing models, the simulation program SUMO and the NDS data-set HighD. Chapter 3, “Methodology”, describes the working process of calibrating and validating the simulation models and conducting the simulation studies. In chapter 4, “Results”, the results of the conducted simulation studies are visualized and analyzed. The final chapter of the report, chapter 5, “Conclusion and Future work”, summarize the findings of the study and the possibilities of further research in the subject is being discussed. 3 1. Introduction 4 2 Theory Heterogeneous traffic flow can be defined as the number of vehicles passing a certain point during a certain time on a road with multiple road actors [8]. A desired, or smooth, traffic flow would therefore have a high rate of vehicles passing a point without so-called stop-and-go driving and vehicle queues. These kinds of temporary stops lead to environmental, economic and emotional drawbacks, such as increased vehicle emissions, increased fuel consumption, lost time and road rage [2], [9]. In fact, road rage is a big traffic safety problem since rage can lead to irrational behavior and unnecessary risk-taking [9]. Also, a lot of acceleration and braking, which is a consequence of poor traffic flow, leads to increased fuel consumption [10]. 2.1 Standardized Definitions In order to be able to compare this study with other studies in terms of test pro- cedures, simulation results and conclusions, it is important to have common and consistent definitions of relevant driving performance measurements. This is done by using the definitions stated by SAE International in their report called Opera- tional Definitions of Driving Performance Measures and Statistics [11]. The micro- scopic traffic parameters that are used in this study to investigate the traffic flow are described below together with the safety surrogate measures that will be used to determine how critical a situation is in terms of safety. Different traffic situations, in this case lane-change and traffic conflict, are also described below. Time Headway and Distance Headway The Transport Research Board (TRB) define Vehicle Time Headway (THW) as “the time interval between two vehicles passing a point as measured from the front bumper of a vehicle to the front bumper of the next successive vehicle” [12], [13]. Vehicle Distance Headway (DHW) is defined in the same manner as the distance between a vehicles’ front bumper and the preceding vehicles front bumper [14]. Vehicle Time Headway and Distance Headway, which are visualized in figure 2.1, are measured in seconds and meters respectively. 5 2. Theory Figure 2.1: A visualization of vehicle headway Vehicle Speed and Travel Time The speeds of the individual vehicles are together with headway the most funda- mental parameters in microscopic uninterrupted traffic flow [15]. Vehicle speed is inversely proportional to travel time, or in other words, an increased average vehicle speed is directly proportional to a decrease in travel time [15]. Travel time, which is the time it takes for a certain vehicle to travel from location A to location B, is an important measurement of traffic flow. Travel time loss is the difference between the desired travel time, that is the time required to travel a certain distance with the posted speed limit for the particular road without any interruption, and the travel time [16]. Examples of interruptions on that cause time loss are queue forming and departure delay, which is defined as the delay of the vehicle departure due to no available road space [16]. Traffic Conflict A traffic conflict can be defined as a traffic situation where a collision will occur unless one of the road actors involved in the situation or an ADAS makes an evasive maneuver, such as braking or steering [17]. The severity of the conflict depends on two factors, namely the conflict speed (CS) and Time-to-Accident (TA) [17]. The Swedish Traffic Conflict Technique [17] defines TA as “time remaining to a collision when the evasive action is taken by the relevant road user” and they define CS as “speed of the relevant road user when he/she takes the evasive action”. As the definition indicates, a lower TA and a higher CS leads to a more severe conflict. Traffic conflict analysis is an effective method for comparing the safety of different road situation [17], and could therefore be used to investigate the safety impact of autonomous vehicles in heterogeneous traffic. 6 2. Theory Time-to-Collision and Vehicle Clearance TTC, which is short for Time-to-Collision, is defined as “The time required for two vehicles to collide if they continue at their present speed and on the same path” [18]. TTC is an effective safety assessment measurement and often used to identify and determine the severity of a traffic conflict [18]. Research suggest that the desired TTC on Highways are 3 seconds [19], and a TTC below this value can be considered a critical situation. TTC is calculated by dividing the distance between the vehicle in question and the preceding vehicle with the relative speed of the two vehicles. The distance between the two vehicles is often referred to as the vehicle clearance and is visualized in figure 2.2. The equations needed to compute TTC is shown in equation 2.1 Figure 2.2: A visualization of Time-To-Collision TTC = D/(V e − V t) (2.1) Post Encroachment Time Post Encroachment Time, or PET, is defined as "the difference between times that a vehicle enters a conflict point until another vehicle arrives to this point"[20]. The conflict zone in car-following scenarios is usually the position of the preceding vehi- cles rear-end at a certain time, and PET is the time required for the EGO vehicle to reach the conflict zone. PET is used as a safety surrogate measurement where a lower PET means a higher risk of a collision [20]. Figure 2.3 shows a car-following scenario where the conflict zone is visualized with a latitudinal red line. The upper part of figure 2.3 shows the starting point at time t1 and the lower part of figure 2.3 show when the EGO car reaches the conflict zone at time t2. PET is defined as the difference between t2 and t1 according to equation 2.2. 7 2. Theory Figure 2.3: A visualization of Post Encroachment Time. The upper part of the figure shows the vehicle positions at time t1 and the lower part of the figure shows the vehicle positions at time t2 PET = t2 − t1 (2.2) Lane-change SAE International [11] defines lane-changes as “Movement of a vehicle from one vehicle lane to another lane with continuing travel in the same direction in the new lane”. According to SAE, the lane-change starts when “any part of the tire contact patch of a front tire touches the inside edge of the lane marking to either side of vehicle” and the lane-change is complete when “the vehicle is stably positioned and traveling in the new lane” [11]. The lane-change duration, which SAE defines as “Time interval, usually in seconds, over which a vehicle is moving from one travel lane to another” [11], is an important measurement of both traffic safety and traffic flow. Gap definitions in traffic Two of the most fundamental measurements that is used in order to determine if a lane-change can safely be performed are lag gap and lead gap. As the measurements in figure 2.4 indicates, the lag gap is the distance between the subject vehicle (SV) and the trailing vehicle (TV) in the target lane [11]. The lead gap is the distance between the SV and leading vehicle (LV) in the target lane [11]. The vehicle gaps of importance are shown in figure 2.4. 8 2. Theory Figure 2.4: A visualization of the vehicle gaps used in traffic analysis. The green vehicle is the subject vehicle. As the description of the parameters above indicates, there is a strong connection between traffic safety and traffic flow, and therefore, safety need to be taken into consideration when investigating traffic flow. A small vehicle time headway, for example, can be good in terms of macroscopic traffic flow since the flow rate is higher, but it also makes the potential TA smaller and therefore increase the severity of a potential conflict. 2.2 Simulation of Heterogeneous Traffic The main part of this thesis work is to calibrate and validate simulation models and use them in simulation studies. The theory behind these tasks are described in this subsection. The simulation software used in this project is introduced in section 2.2.1. Lane-changing and car-following simulation models are described in general terms in section 2.2.2 and section 2.2.3 respectively. How the preceding vehicle type impacts the driving behaviour is discussed in section 2.2.4. Also, NDS is described in general terms in section 2.3 and the specific NDS data-set used in this project to calibrate and validate the models is described more detailed in section 2.3.1. 2.2.1 Simulation of Urban Mobility (SUMO) As previously mentioned in section 1.2, the simulations in this study will be con- ducted in the open source simulation program SUMO. SUMO was developed by the German Aerospace Center (DLR) at the institute of transportation system with the intention to be used as a helping tool when investigating different traffic matters, such as route choice and vehicular communication. The development process started in 2001 and the program became publicly available in 2002. An informative article about the program written by parts of the development team [21] describes SUMO as a “full featured suite of traffic modeling utilities” with a road network included that can generate maps from many different sources. The road network can either 9 2. Theory be generated manually with the application “netgen” or by importing a real road network digitally from example Open Street Map [21]. SUMO is used for preparing and performing different types of microscopic simu- lations, such as car-following, lane-changing and intersections [16]. Figure 2.5 shows a road network generated in netgen with different vehicle models. Every vehicles route and department time is individually defined, more in dept vehicle parame- ters, such as velocity, physical properties and gap to the other vehicles, can also be defined [16]. The simulation is time-discrete and space-continues and simulation outputs can be generated after each time step. Many different types of outputs can be generated after a simulation run depending on the topic that is being investigated, for example emissions values and different kinds of surrogate safety measurements, such as TTC, DHW and THW. A snapshot of a conducted simulation in SUMO is shown in figure 2.5. The snapshot shows a manually built road with a pedestrian crossing and three vehicle models. Figure 2.5: A example of a simulation conducted in SUMO SUMO has a wide range of applications within the field of traffic simulation. The most popular research topic to investigate with SUMO is vehicle communication, that is vehicle-to-vehicle or vehicle-to-infrastructure communication [21]. The goal with simulating vehicle communication is to evaluate the benefits of vehicle commu- nication in terms of safety and traffic flow. Development and evaluation of traffic light programs are also some of the main applications of SUMO. It can also be used to investigate how road actors choose their route based on their desired destination. 2.2.2 Lane-changing models As previous stated, a lane change is defined by SAE International [11] as a “Move- ment of a vehicle from one vehicle lane to another vehicle’s lane with continuing 10 2. Theory travel in the same direction in the new lane”. Since lane-changing is one of the most fundamental maneuvers, they should be considered when investing the traffic flow and safety [22], [23]. Lane-changing models usually make a distinction between two types of lane-changes, namely mandatory and discretionary [22]. Mandatory lane- change (MLC) are lane-changes that needs to be executed in order for the driver to follow the desired route or that the current lane becomes unavailable. Discretionary lane-changes (DLC) in the other hand are lane-changes that leads to better traffic condition, such as higher vehicle speed, but is not necessary for the driver to suc- cessfully complete travel route [22]. Some models integrate MLC and DLC into one utility model, where MLC is the priority [22]. There are many different types of microscopic lane-changing models used for com- puter simulation available, the most common ones are so-called discrete-choice-based model and Rule-based models [23]. The discrete-choice-based model are easier to cal- ibrate compared with the Rule-based model [23] and lane-change models in SUMO are based on this type of model, and therefore, this model is of interest in this study. Most lane-changing models, including discrete-choice models, determine if a lane- change is possible based on the available vehicle gaps [22]. As described in section 2.1, the lag gap is the distance or time gap between the subject vehicle and vehicle behind it in the desired lane, see figure 2.4. The lead gap, on the other hand, is the gap between the subject vehicle and the vehicle in front of it in the desired lane, see figure 2.4. Both available lag gap and lead gap must be bigger than the critical lag gap and lead gap respectively [22]. The discrete-choice-based lane-changing model execute the lane-change maneuver based on these three steps [23]: 1. Checking lane-change necessity, 2. Choice of target lane, 3. Gap acceptance. 2.2.3 Car-following models Car-following models are the most fundamental part of traffic simulations and are characterized by the fact that they are only influenced by the preceding vehicle [3]. The driver behavior during car-following scenarios is also one of the key fac- tors when developing intelligent transportation systems (ITS) and advanced driving assistant systems (ADAS) [24]. There are different methods to model the behav- ior of the driver during car-following depending on the purpose of the model [3]. The two most common car-following model types are the safety-distance model and the desired-measured model [3]. The safety-distance model assume that the driver adjusts the speed and distance to the preceding vehicle so it can avoid a rear-end crash in case of an emergency brake [24]. The desired-measure model on the other hand adjust driving measurements, such as vehicle speed and the distance to the preceding vehicle, based on the difference between the desired measurements and the actual measurements [24]. Other models assume that all drivers have an optimal velocity based on the preceding vehicle’s driving state or that the driver behavior 11 2. Theory depends on the traffic state [24]. Car-following models used to investigate driver behavior needs to be adjusted based on the conditions of the simulation. For example, the driver behavior during car- following in a developing country differs from the driver behavior in an industrialized country due to different driving environments, driving culture, road quality and pro- portion of different road actors [24]. Therefore, a model might be representative in developing countries but not in developed countries. The models are calibrated us- ing microscopic data, usually naturalist driving data [24]. The purpose with the calibration is to minimize the gap between the simulation values and the values found in the naturalistic data [24]. The calibration process consists of three parts, and these parts are described below. 1. Measure of Performance (MoP): MoP is a driving parameter that is used to describe the driver behavior during car-following. The performance of the model is measured by comparing the value of the MoP measured in an NDS and the value of the same MoP measured when using the model in a simulation [24]. 2. Goodness of Fit (GoF): GoF measure the difference between the MoP mea- sured in an NDS and the simulated MoP and is therefore a measurement of the model performance [24]. The most common measurement method of GoF is Root Mean Square Error (RMSE), see equation 2.3. 3. Optimization algorithm: An algorithm used to minimize the GoF and therefore optimizing the model. RMSE = √√√√( 1 n ) n∑ i=1 (yi − xi)2 (2.3) 2.2.4 The impact of vehicle types Multiple studies have shown that the preceding vehicle type affects the driver behav- ior and therefore also the traffic flow in car-following and lane-changing situations [4]. A study conducted at the University of Science and Technology of China (USTC) shows that drivers tend to keep a longer distance to the preceding vehicle if they follow a truck compared to a passenger car [25]. A study on lane-changing behavior shows that the lane-changing maneuver is in general shorter if the preceding vehicle is a truck compared to a car [26]. The driver’s behavior is not only dependent on the preceding vehicle type, but also dependent on the vehicle that he or she is operating [27]. Therefore, the car-following type should also be considered. In this study, the effect of four car-following cases will be investigated, namely car-following-car (CC), car-following-truck (CT), truck-following-car (TC) and truck-following-truck (TT) will be investigated. Studies presented in an article about stability analysis of mixed traffic flow [27] shows that the car-following cases differs when it comes to reaction time, response sensibility and maximum velocity. The differences between the cases in regards of these parameters are ranked from highest (4) to lowest (1) and are 12 2. Theory shown in table 2.1 below. In other words, car-following case with the ranking 1 for respective parameter has the lowest reaction time, lowest maximum velocity and the lowest response sensibility. Parameters CC CT TC TT Reaction time 1 2 3 4 Maximum velocity 3 3 1 1 Response sensibility 4 3 2 1 Table 2.1: The impact of vehicle types in terms if different driving attributes. 2.3 Naturalistic Driving Studies European Naturalistic Driving and Riding for Infrastructure and Vehicle Safety and Environment (Udrive) defines Naturalistic Driving Study (NDS) as “A study un- dertaken to provide insight into driver behavior during every day trips by recording details of the driver, the vehicle and the surroundings through unobtrusive data gath- ering equipment and without experimental control” [28]. More simply, Naturalistic driving studies consist of recorded data of drivers performing their everyday activ- ities in real-world traffic [29]. Different data-set contains different traffic scenarios and different information about the driver behavior dependent on its intended use. For example, the data-set SHRP2 (the second Strategic Highway Research Project) contains information about critical situations, such as near-crashes, crashes and in- formation about the driver behavior that resulted in these situations [30]. This kind of data-set is often used to develop and evaluate ADAS. The Highway Drone Data- set, however, contains so-called normal driving. In other words, the data do not necessarily need to be of a critical event [7]. Generally, NDS can be conducted in two different way, either by recording indi- vidual vehicles or by recording specific locations on a road. SHRP2 is an example of an NDS that follows specific road users during a longer time in order to gain knowl- edge about the driver’s performance and behavior in terms of safety [30]. The DAS (Data Acquisition System) that was used to record the individual driver’s behavior consist of, among other things, cameras, both inside and outside of the vehicle, and sensors, such as radars and accelerometer [30]. An example of an NDS conducted by recording a specific location on a road is HighD data-set, which is the data-set that will be used in this study and is further discussed in section 2.3.1 below. 2.3.1 Highway Drone Data-set As stated in the introduction chapter, the HighD data set will be used in this study in order to modify the simulation models. According to [7], the data-set consists of 16.5 hours’ worth of recording with 110,000 vehicles, 5,600 lane-changes and a total 13 2. Theory of 45,000 driven km distributed on 6 different locations on German highways. The recording sessions was limited to sunny and windless days (from 8am to 5pm) dur- ing the winter seasons of 2017 and 2018. The vehicle types that are included in the data-set are almost limited to cars and trucks, since the recording took place dur- ing wintertime, the number of motorcycles are negligible. Also, since the recording was done on clear days without any strong winds, the quality of the data-set is great. As the name of the data-set indicates, the data are collected with a drone equipped with a single 4k camera that hovers over highways. Using a single camera avoids errors caused be transitions between cameras. The camera covers a longitudinal dis- tance of 450 meters and 2-3 lanes in each direction depending on the location. The drone provides an aerial perspective, also known as Bird’s-eye view, of the highway, which gives a high accuracy of the vehicles longitudinal and lateral positions and movements. The data was collected with the intention to be used for safety validation and safety assessment for highly autonomous vehicles, but the creators emphasize that the data-set can be used for simulation model research and traffic analysis. Since the amount of data are rather large, the vehicle trajectories in terms of position and movement are extracted through automatic annotation with a computer vision al- gorithm. Also, the safety assessment parameters TTC, DHW and THW are given for all vehicles. The data-set can be visualized in either MATLAB or Python. With these extracted parameters and trajectories, a script which is provided with the data-set can detect four maneuvers, namely: • Free driving: Longitudinal driving without being affected by the preceding vehicle. • Vehicle following: Longitudinal driving while being affected by the preceding vehicle. • Lane-changing: Change lane and keep driving in the new lane. • Critical maneuver: Situation with low TTC or THW to the preceding vehicle. The creators of the data-set derived some requirements that need to be fulfilled for the data-set to be appropriate to use for safety validation and traffic analysis. The behavior of the road users must not be affected by the fact that they are being recorded, hence the behavior must be naturalistic. Relevant information about the road, such as the number of lanes, speed limit and lane width, needs to be available. Also, all the road users position, speed and acceleration needs to be measured with high accuracy. Using an aerial perspective has many advantages when it comes to fulfilling these requirements. Since the drone is hovering over 100 meters over the highway, the road users are not aware that they are being recorded and therefore, naturalistic behavior is granted. Viewing the road from above prevents that a vehicle is blocked by another vehicle for example and therefore, all road users’ position and movement can be observed all the time. Finally, since the recording locations are fixed, the speed limit, lane width and other road characteristics can easily be noted. 14 2. Theory With all this considered, the HighD data-set seems to be the best alternative for this project. 15 2. Theory 16 3 Methodology The process of calibrating the car-following models and lane-changing models of cars and trucks is summarized in the workflow shown in figure 3.1. The first step is to analyze the HighD data-set and extract all relevant parameters using MATLAB. The extracted parameters will be used as initial states for the current simulation models in SUMO and used for comparison between the HighD data and the simulation output from SUMO. The process of extracting the parameters is described in section 3.1. The next step, which is described in section 3.2, is to build the simulation environment in SUMO. The biggest part of this project is the actual calibration of the models in SUMO so they represent the vehicles recorded in the HighD data-set. During this process, the current models available in SUMO are simulated with the initial states from the HighD data-set. The output from this simulation is compared with the HighD data-set. The models in SUMO are then calibrated by changing some of their parameters in order to minimize the difference between the HighD data the simulation output from SUMO. This part is described more in-depth in section 3.3. The final step is to conduct simulation experiments with the calibrated models in order to investigate how autonomous vehicles impact the heterogeneous traffic in terms of traffic flow and safety. The method of conducting these experiments is described in section 3.5. 17 3. Methodology Figure 3.1: An overview of the projects work process 3.1 Analysis on HighD data-set The HighD data-set consist of 60 recording session distributed on 180 comma sep- arated values-files (CSV-files). That is three CSV-files that consist of different information per recording session. These CSV-files are analyzed with MATLAB. The analysis includes extracting relevant parameters, visualize the trajectory dur- ing lane-change and examine the extracted parameters in terms of mean values and distribution. Different parameters were extracted depending on the intended use, that is if the extracted parameters are used as initial state for the SUMO models, calibrating lane-changing models or calibrating car-following models. 18 3. Methodology 3.1.1 Extraction of initial states In order to reproduce the traffic scenarios from the HighD data-set in SUMO, the initial values for some parameters needs to be extracted for each vehicle. The initial values for a certain vehicle are extracted from the first frame for which the vehicle in question is included. The parameters that defines the initial state for a vehicle are described below. • Vehicle ID: The name of the vehicle. • Class: The vehicle type, hence car or truck. • Departure time: The time in seconds when the vehicle enters the simulation. The department time is calculated by dividing the start frame number of the vehicle with the frame rate. • Departure lane: The vehicles starting lane. • Departure position: The distance in meter from the start of the department lane. • Initial speed: The vehicles initial speed in m/s. • Route: The simulation road has two direction, the route defines which direc- tion the vehicle is driving in. 3.1.2 Data extraction for Car-Following The traffic flow and traffic safety parameters that will be considered, and therefore extracted from the HighD data-set, for car-following scenarios are Distance Head- way (DHW) and Time Headway (THW). As previously stated in the introduction to this chapter, the purpose of extracting parameters from the HighD data-set is to calibrate simulation models in SUMO. Since the models will be calibrated with the intention to represent cars and trucks with either a car or a truck as the preceding vehicle type, these car-following cases need to be separated when extracting the parameters in question. The results of the parameter extraction are show in figure 3.2 – 3.5. The distri- bution of the DHW for each car and truck are shown in figure 3.2 and figure 3.3 respectively, and the distribution of the THW for each car and truck are shown in figure 3.4 and 3.5 respectively. As the figures show, the distributions tend to be right-skewed and the mean of the full distribution would not be a good representa- tion of the data-set. Therefore, the mean of the cluster for each car-following case will be considered when calibrating the models. 19 3. Methodology Figure 3.2: The Distance Headway distribution during car-following for cars ex- tracted from the HighD data-set. Figure 3.3: The Distance Headway distribution during car-following for trucks extracted from the HighD data-set. 20 3. Methodology Figure 3.4: The Time Headway distribution during car-following for cars extracted from the HighD data-set. Figure 3.5: The Time Headway distribution during car-following for trucks ex- tracted from the HighD data-set The results of the car-following analysis are presented in table 3.1. In addition to the mean DHW and THW for each car-following case, the table also shows the minimum of the DHW and THW for each vehicle. Type Nr. Avg. DHW AVG. THW Min. DHW Min. THW CC 98862 73.73 m 2.28 s 51.97 m 1.58 s CT 10759 73.81 m 2.61 s 50.95 m 1.82 s TC 12350 94.77 m 3.80 s 62.37 m 2.49 s TT 14352 83.88 m 3.35 s 64.89 m 2.71 s Table 3.1: The result of the car-following analyse. 21 3. Methodology 3.1.3 Data extraction for Lane-changing The traffic flow and traffic safety parameters that will be considered, and therefore extracted from the HighD data-set, for lane-change scenarios are Distance Headway (DHW) and Adjacent Lane Gap (ALG). The DHW and ALG are extracted when the lane-change maneuver starts. Besides of these two parameters, the lane-change duration will also be taken under account when calibrating the lane-change models in SUMO. The results of the parameter extraction are shown in figure 3.6 – 3.9. The distribu- tion of the DHW during a lane-change for each car and truck are shown in figure 3.6 and 3.7 respectively, and the distribution of the ALG during a lane-change for each car and truck are shown in figure 3.8 and 3.9 respectively. As the figures shows, the distributions tend to be right skewed and the mean of the full distribution would not be a good representation of the data-set. Therefore, the mean of the cluster for each car-following case will be considered when calibrating the models. Figure 3.6: The Distance Headway distribution during lane-changing for cars ex- tracted from the HighD data-set. 22 3. Methodology Figure 3.7: The Distance Headway distribution during lane-changing for trucks extracted from the HighD data-set. Figure 3.8: The adjacent lane gap distribution during lane-changing for cars ex- tracted from the HighD data-set. 23 3. Methodology Figure 3.9: The adjacent lane gap distribution during lane-changing for truck extracted from the HighD data-set. The lane-change duration was extracted by identifying the frame when the lane- change starts and the frame when the lane-change ends. The start and end of the lane-change were identified by looking at the lateral movement of the vehicle. When the vehicle started to move in the lateral direction, the lane-change was assumed to start, and when the movement in the lateral direction stopped, the lane- change was assumed to be completed. Since the identifying of the lane-changes was done automatically, some of the lane-changes was poorly identified. By plotting and manually inspecting the vehicle trajectory, the poorly identified lane-changes was detected and disregarded. Figure 3.10 shows the vehicle trajectory of a well identified lane-change. 24 3. Methodology Figure 3.10: A example of the vehicle trajectory during a lane-change The results of the lane-change analysis are presented in table 3.2. The table shows the average distance headway (DHW) and the average adjacent lane gap (ALG) for each car-following case during a lane-change. The table also show the average time needed for each car-following case to perform a lane-change. Type Nr. DHW ALG Duration CC 2621 42.04 m 157.8 m 6.99 s CT 693 42.64 m 164.6 m 7.09 s TC 329 39.03 m 164.8 m 7.98 s TT 90 40.45 m 169.6 m 8.00 s Table 3.2: The result of the lane-changing analysis. 3.2 Simulation environment The structure of the roads that was used when recording the data for the HighD data-set was rebuild in SUMO in order to reproduce the data from the HighD data-set in SUMO. Since the recording of the HighD data-set occurred at different locations, the road structures differ in terms of number of lanes. The roads have either two or three lanes in each direction. To simplify the simulations, a road with 25 3. Methodology three lanes in each direction will be used during this project. The built road in SUMO, which is shown in figure 3.11, is a freeway that consists of three lanes in each direction. The total length of the road is 420 meters. The figure also shows car-following simulation models of cars, which are represented by the smaller yellow symbols, and car-following model of a truck, which is represented by the bigger yellow symbol. Figure 3.11: A snapshot of the built road during a simulation run 3.3 Calibrating Models As stated earlier, Car-following and Lane-changing models in SUMO will be tuned based on the HighD data-set. The models will represent manually driven vehicles of the type’s car and truck. Also, the preceding vehicle type will be taken into account. In total, 8 models will be tuned, and their characteristics are presented in table 3.3. Model Ego Vehicle Type Prec. Vehicle Type Driver intention 1 Car Car Lane-Change 2 Car Truck Lane-Change 3 Truck Car Lane-Change 4 Truck Truck Lane-Change 5 Car Car Car-Following 6 Car Truck Car-Following 7 Truck Car Car-Following 8 Truck Truck Car-Following Table 3.3: List of the models that will be tuned in SUMO based on the HighD data-set The models in SUMO is calibrated by adjusting driving behavior parameters, but the vehicle attributes will remain constant during the calibration process. In order to make a distinction between cars and trucks, the values of the vehicle attributes for the two vehicle types are different. The vehicle attributes that will be used for the car and truck models are presented in table 3.4 below. 26 3. Methodology Parameter Description Value Car Value Truck Length The vehicles length 4.0 m 8.0 m Max speed The vehicles max speed 210 km/h 140 km/h Acc. The acceleration ability of the vehicle 2.9 m/s2 1.2 m/s2 Decel. The deceleration ability of the vehicle 7.5 m/s2 4.0 m/s2 Table 3.4: Car and truck attributes used in SUMO 3.3.1 Calibration of Lane-changing Models The lane-change models will be tuned by matching the DHW and the number of lane-changes archived from simulations in SUMO with the DHW and the number of lane-changes extracted from the HighD data-set. Also, the number of conflicts in the SUMO simulation should be as low as possible. TTC is used as the surrogate safety measure, and a traffic encounter is considered to be a conflict when TTC is 3 seconds or below. The DHW and the number of lane-changes extracted from the HighD data-set is presented in figure 3.6 - 3.7 and table 3.2 respectively. The tuning is done by experimenting with different parameters in SUMO and analysing the simulation result. Parameters related to the driver’s eagerness to perform a lane-change are being investigated in section 3.3.1.1. Parameters related to vehicle speed and desired vehicle gap are being investigated in section 3.3.1.2 and section 3.3.1.3 respectively. 3.3.1.1 Lane-change Eagerness and Willingness The parameters in SUMO related to the drivers eagerness and willingness to perform a lane-change that is investigated are “lcStrategic”, “lcCooperative”, “lcSpeedGain” and ”lcAssertive” [16]. These parameters are described in table 3.5 below. During the simulation process, the value of the parameters related to Lane-Change eager- ness, that is “lcStrategic”, “lcCooperative” and “lcSpeedGain”, was simultaneously increased with a value 2 after each simulation run. This process was repeated with three different values for “lcAssertive”, namely 1, 3 and 5. The result of this simu- lation process is shown in figure 3.12-3.25. 27 3. Methodology Parameter Description Value lcStrategic "The eagerness for performing strategic lane-changing" "Higher values result in earlier lane-changing" lcCooperative "The willingness for performing cooperative lane-changing" "Lower values result in reduced cooperation" lcSpeedGain "The eagerness for performing lane-changing to gain speed" "Higher values result in result in more lane-changing" lcAssertive "Willingness to accept lower front and rear gaps on the target lane" Higher value result in acceptance of lower front and rear gap on the target lane Table 3.5: Description of the SUMO parameters related to lane-changes that was used during the calibration process. Number of Lane-Changes As figure 3.12 –3.14 shows, the number of lane-changes increase when the driver has a higher eagerness to perform a lane-change. Also, when the driver is willing to perform a lane-change at a lower available rear and front gap on the target lane, the number of lane-changes increase further. However, a higher lane-change eagerness and the acceptance to perform a lane-change at lower gaps on the target lane leads to a higher amount of conflicts. Figure 3.21 shows the relation between the number of conflicts and the values of the parameters presented in table 3.5. Also, the result shows that TT performs significantly more lane-changes compared with the other car-following cases when the parameter "lcAssertive" is set to 1. This result might be hard to believe, especially since there are by far less TT cases compared with CC and CT cases. However, the adjacent lane gap tends to bigger when the SV is a truck compared with a car, see figure 3.18 - 3.20, which leads that trucks are more willing to perform a lane-change. When the value on the parameter "lcAssertive" increase, the willingness to accept lower adjacent lane gaps also increases, and more cars are willing to perform a lane-change. Figure 3.12: The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 1. 28 3. Methodology Figure 3.13: The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 3. Figure 3.14: The number of lane-changes against the eagerness to perform a lane- change when the parameter lcAssertive is set to 5. Distance Headway The mean Distance Headway to the preceding vehicle at the start of the lane-change is shown in figure 3.15-3.17. The mean DHW strictly increases for higher value on the parameter Lane-Change Assertive. Higher values on the parameters related to Lane-change eagerness tends to lead to a higher mean DHW but there is no strict correlation. 29 3. Methodology Figure 3.15: The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 1. Figure 3.16: The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 3. Figure 3.17: The mean DHW during a lane-change against the eagerness to per- form a lane-change when the parameter lcAssertive is set to 5. 30 3. Methodology Adjacent Front Gap Figure 3.18 - 3.20 shows the mean front gap at the target lane at the start of the lane-change maneuver for the different car-following cases. Since a higher value on the parameter Lane-Change Assertive leads to an acceptance of a lower adjacent gap when performing a lane-change, the mean front gap at the target lane decrease when the Lane-change Assertive increase. The result also shows that cars perform lane- changes with a significant lower adjacent front gap compared with trucks, which is in line with real life traffic. The result is also suggests that the target lane lead gap tends to be bigger for trucks than cars, which causes the truck models to perform more lane-changes than cars for lower values on the parameter "lcAssertive", see figure 3.12. Figure 3.18: The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 1. Figure 3.19: The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 3. 31 3. Methodology Figure 3.20: The mean adjacent front gap during a lane-change against the eager- ness to perform a lane-change when the parameter lcAssertive is set to 5. Number of Conflicts The number of conflicts for different values the SUMO parameters lcAssertive and lane-change eagerness is shown in figure 3.21. TTC is used as the safety surrogate measure, and when TTC is less than 3 seconds, the traffic encounter is considered a conflict [19]. Observe that the total number of vehicles in the simulation is around 110,000. As the figure shows, the number of conflict significantly increase when the parameters lcAssertive and lane-change eagerness increase. Based on these result, the parameter lcAssertive should not be set to a value higher than 3 in order to keep the number of conflicts at a reasonable value. Figure 3.21: The number of conflicts against the lane-change eagerness and lcAssertive. 3.3.1.2 Speed factor According to an investigation done by European Road Safety Observatory [31], around 40% to 60% of all car drivers exceed the speed limit. The investigation also shows that the most common road type where drivers exceeds the speed limit is 32 3. Methodology motorway. The SUMO parameter “SpeedFactor” allows the vehicle to exceed the speed limit with a factor according to the equation 3.1 below. Max Speed = Speed Limit ∗ SpeedFactor (3.1) The car models were equipped with a speed factor between 1 and 1.6 to see how it affects the simulation result. The mean Distance Headway for trucks during lane-changes significantly decrease when the speed factor increases from 1 to 1.2, see figure 3.22. Also, figure 3.23 shows that there is noticeable fewer lane-changes performed by trucks when the speed factor is 1.2 compared with a speed factor of 1. Figure 3.22: The mean DHW during a lane-change against the speed factor. Figure 3.23: The number of lane-changes against the speed factor. 3.3.1.3 Desired Time Headway The parameter “tau” models the drivers’ desired Time Headway. The driver will aim to maintain a Time Headway as close to the value of “tau” as possible without going below it [16]. As figure 3.24 shows, the desired Time Headway has a direct 33 3. Methodology impact on the Distance Headway during a Lane-Change, which makes sense since THW relates to DHW according to equation 3.2 below. Figure 3.25 shows that a higher desired Time Headway tends to lead to more lane-changes, car models in particular. DHW = THW ∗ V ehicle Speed (3.2) Figure 3.24: The mean DHW during a lane-change against the desired minimum THW. Figure 3.25: The number of lane-changes against the desired minimum THW. 3.3.2 Calibration of Car-following Models The tuning of the car-following models is accomplished in a similar fashion as the tuning of the Lane-changing models described in section 3.3.1. The car-following models will be tuned by matching the DHW and the THW archived from simula- tions in SUMO with the DHW and the THW extracted from the HighD data-set. Also, the number of conflicts in the SUMO simulation should be as low as possible. TTC is used as the surrogate safety measure, and a traffic encounter is considered 34 3. Methodology to be a conflict when TTC is 3 seconds or below [19]. The DHW and THW distri- bution extracted from the HighD data-set is presented in figure 3.2 - 3.5, and table 3.1 summarize the result from the HighD extraction during car-following. The tuning is done by experimenting with different parameters in SUMO and analysing the simulation result. In section 3.3.2.1, the parameter that models the desired Time Headway is investigated and the parameter that models the driving imperfection is investigated in section 3.3.2.2. 3.3.2.1 Desired Time Headway The SUMO parameter tau, which models the desired Time Headway and is further described in section 3.3.1.3, have a clear influence on the resulting Distance Headway and the actual Time Headway. Figure 3.26 and figure 3.27 illustrates how the Distance Headway and the actual Time Headway strictly increase when the desired Time Headway increase. However, figure 3.27 shows that there is a rather big difference between the Desired Time Headway and the actual Time Headway. The reason for this is partly because the parameter tau models the minimum desired Time Headway, and not the average desired Time Headway. Also, the actual Time Headway is not solely depended on the value of tau, it is also depended on how the model is implemented in general. In other words, multiple parameters influence the resulting Time Headway. Figure 3.26: The mean DHW during car-following against the desired minimum THW. 35 3. Methodology Figure 3.27: The mean of the actual THW during car-following against the desired minimum THW. 3.3.2.2 Driving Imperfection The SUMO parameter “sigma” models the driver imperfection. Sigma can be set to any decimal number between 0 and 1, where the sigma value 0 represent perfect driving and the sigma value 1 represent the biggest driving imperfection. According to [16] the parameter sigma causes random deceleration’s which leads to speed fluc- tuations and so called ”slow-to-start behaviour”. Figure 3.28 shows that a higher driving imperfection leads to a lower Distance Headway while the Time Headway seems to be unaffected according to figure 3.29. Figure 3.28: The mean dHW during car-following against the driving imperfection. 36 3. Methodology Figure 3.29: The mean THW during car-following against the driving imperfec- tion. 3.4 Modeling Autonomous Vehicles The next step is to model the autonomous vehicle that will be used in the hetero- geneous traffic simulation described in section 3.5. Since SUMO does not provide specific models of autonomous vehicles, the current models in SUMO needs to be modified. Just like the calibration of the manually driven vehicles described in sec- tion 3.3, models that represent both autonomous cars and autonomous trucks will be tuned. However, the models will not take the preceding vehicle type under con- sideration. In order to make a clear distinction between the autonomous models and the models of the manually driven vehicles, all of the calibration parameters in SUMO that can be used to model autonomous vehicles needs to be identified and modified. Un- fortunately, there is little to none public data on autonomous vehicles that can be used as a guideline in the calibration process. However, there are plenty of studies on modelling autonomous vehicles in SUMO that will be used as a basis for this calibration process. 3.4.1 Longitudinal Speed and Acceleration Autonomous vehicles are assumed to never exceed the speed limit, and their desired speed are assumed to be equal to the current speed limit. This can be compared with the driving behaviour of humans which often exceed the speed limit in order to keep up with the traffic flow [31]. The SUMO parameter speedFactor, which is described in section 3.3.1.2, adjust the models’ ability to exceed the speed limit with a certain factor. Since the models of autonomous vehicle are expected to stay within the speed limit, the parameter speedFactor is set to 1. 37 3. Methodology 3.4.2 Vehicle Gaps The SUMO parameter Tau, which is described in section 3.3.1.3, models the mini- mum desired Time Headway. The driver desired minimum THW is also dependent on the drivers reaction time [16]. Since autonomous vehicle has a lower reaction time than human drivers, the parameter Tau should be set to a lower number for the autonomous models. The SUMO parameter minGap, which is defined as the “minimum empty space in meters after leader” [16], should also be lower for the autonomous models due to lower reaction time. 3.4.3 Driving Imperfection As described in section 3.3.2.2, the SUMO parameters Sigma models the driver imperfection. Sigma can be set to any decimal number between 0 and 1, where a lower value on Sigma leads to a higher driving perfection. It is safe to assume that autonomous vehicles have a significant higher perfection than manually driven vehicles, and therefore the Sigma should be set to a low number for the autonomous models. 3.4.4 Result Based on the discussions presented in section 3.4.1 - 3.4.3, models of autonomous vehicles was calibrated in SUMO. The resulting models of an autonomous car and an autonomous truck is presented in table 3.6 below. Type Model minGap Sigma Tau speedFactor Accel Decel Auto. Car Krauss 0.5 m 0.0 0.2 s 1.0 3.5 4.5 Auto. Truck Krauss 0.5 m 0.0 0.2 s 1.0 2.7 4.5 Table 3.6: The parameter values of the calibrated autonomous models 3.5 Execution of Simulations The models of the autonomous vehicles tuned in the previous section will be used together with the models of the manually driven vehicles calibrated based on the HighD data-set , see section 3.3, in simulations of heterogeneous traffic in SUMO. As stated in section 1.2, “Aim and Objectives”, the purpose of the simulations is to investigate how autonomous vehicles impact heterogeneous traffic in terms of traffic flow and safety. All the simulations will be conducted on the road presented in section 3.2. The simulations will be executed with various penetration rates of autonomous vehicle, namely 0%, 25%, 50%, 75% and 100%, to investigate how the different penetration rates impact the heterogenous traffic. These six penetration rates will 38 3. Methodology be simulated 5 times each to ensure that the simulation result is reliable and trust- worthy. The initial states extracted from the HighD data-set, see section 3.1.1, that was used during the model calibration process will be reused as initial states for the simulations of heterogenous traffic. In other words, the HighD dataset will be duplicated in SUMO with the tuned models. Which initial states that is assign to the autonomous vehicles will be randomly chosen by a MATLAB-code, and the assigned initial states will be different for every simulation run. However, models of cars will always get an initial state extracted from a car, and vice versa for mod- els of trucks. The proportion of cars and trucks for the autonomous models will be the same as the proportion of cars and trucks in the HighD dataset, namely 77% cars. The measurements that will be used to investigate how autonomous vehicles im- pacts the traffic flow and traffic safety is described in section 3.5.1 and section 3.5.2 respectively below. The results of the simulations are presented in chapter 4, “Re- sult”, in section 4.3 and section 4.4. 3.5.1 Traffic Flow Measurements The simulation outputs that will be used to analyse the traffic flow is “Travel time”, “Vehicle delay”, and “Vehicle flow”. The output “Travel time” is defined by SUMO as “The time the vehicle needed to accomplish the route” [16], hence the time passed from the vehicle enters the simulation until the vehicle leaves the simulation. The output “Vehicle delay” is defined by SUMO as “The time the vehicle had to wait before it could start its journey” [16], hence the time difference between the set depart time and the actual time the vehicle enters the simulation. The vehicle flow rate, that is the number of vehicles per hour [veh/h] and the number of vehicles per kilo meter [veh/km], will also be considered when the traffic flow is analysed. 3.5.2 Traffic Safety Measurements The number of conflicts and collisions will be used as measurements of the traffic safety. A traffic encounter is considered a conflict when the surrogate safety measure reaches a certain critical value. In this case, TTC will be used as the surrogate safety measure and a TTC value of 3 seconds is considered critical [19]. 39 3. Methodology 40 4 Results The result chapter is divided into four sections. The first two sections cover the result of the calibration process of the lane-changing models and the car-following models, see section 4.1 and section 4.2 respectively. The two later sections, namely section 4.3 and section 4.4, cover the result of the heterogeneous traffic simulation in SUMO using the lane-changing models and the car-following models. 4.1 Lane-Change Calibration The result from the calibration process of the lane-changing models is presented in this section. The values of the simulation parameters and model types for each of the four calibrated lane-changing model is shown in table 4.1 below. In addition to these parameters, the models use the car and truck attribute parameters presented in table 3.4. The simulation parameters that is not presented in table 4.1 or table 3.4 are set to the SUMO standard values. During the calibration process of the lane-changing models described in section 3.3.1, one SUMO parameter was changed while the other parameters remained the same. This was done in order to see how each parameter affects the simulation results. This information was later used as a guideline when the SUMO models was fine calibrated based on the HighD data-set. During this calibration, parameters was changes simultaneously with the aim to match the HighD data-set as good as possible. Since multiple parameters was changed, the result presented in section 3.3.1 differs from the result presented in table 4.1. For example, if the desired min- imum distance headway is lower, the lane-change eagerness needs to be higher to archive the same amount of lane-changes, see figure 3.25. Type CF Model LC Model minGap tau Eagerness lcAssertive speedFactor CC Krauss LC2013 1.5 m 1.35 s 25 3 1.2 CT Krauss LC2013 1.5 m 1.9 s 2.2 2 1.2 TC Krauss LC2013 1.5 m 0.8 s 6.0 1 1.0 TT Krauss LC2013 1.5 m 1.0 s 0.5 1 1.0 Table 4.1: The parameter values of the calibrated lane-change models The lane-changing models presented in table 4.1 was calibrated by comparing the HighD data-set with the simulation result in SUMO in terms of the DHW when a 41 4. Results lane-change maneuver occur. More specific, the DHW distribution extracted from the HighD data-set was compared with the resulting DHW distribution from SUMO simulation with the intention to archive as similar distribution as possible. This was done with all of the four car-following cases, namely CC, CT, TC and TT, and the result are shown in figure 4.1 and figure 4.2. The upper part of figure 4.1 shows the DHW distribution extracted from the HighD data-set and the SUMO simulation result for cars during a lane-change maneuver when the preceding vehicle is another car. As the bar diagram shows, the simula- tion result in SUMO match the HighD data-set very well. The simulation models in SUMO tends to execute the lane-change maneuver with a slightly smaller DHW than the cars in the HighD data-set, but over all the calibration is good. The lower part of the same figure shows the DHW distribution for cars when the preceding vehicle type is a truck instead of another car. The majority of the lane-changes is executed when the DHW is in the range 20-45 meters for both the simulation mod- els in SUMO and the cars in the HighD data-set. Also, both distributions seem to follow the same pattern. Few cars perform a lane-change with a DHW smaller than 20 meters and a DHW greater than 55 meters. However, around twice as many cars perform a lane-change at the DHW range 35-45 meters in the SUMO simulation compared with the HighD data-set. Figure 4.1: Comparison of the Distance Headway distribution during lane- changing for cars. The two bar diagrams shown in figure 4.2 below shows the DHW distribution ex- tracted from the HighD data-set and the SUMO simulation result for trucks during a lane-change maneuver. The upper diagram shows the DHW distribution for trucks when the preceding vehicle type is a car and the lower diagram shows the DHW distribution when the preceding vehicle type is another truck. As the upper diagram shows, the calibrated Truck-Car models in SUMO tends to execute the lane-change maneuver when the DHW is within the range 5-45 meters. In the HighD data-set, truck tends to execute the lane-change maneuver when the DHW to the preceding 42 4. Results car is within the range 10-50 meters, with a clear peak at 15-25 meters. Even though there is a noticeable difference between the two distributions, they have a similar pattern. The number of Trucks that perform a lane-change when the preceding vehicle is another truck is extremely low in the HighD data-set, and therefore, it is hard to calibrate Truck-Truck lane-changing models. As the lower diagram in figure 4.2 shows, the calibrated Truck-Truck models in SUMO tends to execute the lane-change maneuver when the DHW is within the range 15-50 meters. In the HighD data-set, truck-trucks tends to execute the lane-change maneuver when the DHW is within the range 15-45 meters, but the DHW distribution is much wider compared to the models in SUMO. Figure 4.2: Comparison of the Distance Headway distribution during lane- changing for trucks. For further comparison between the HighD data-set and the simulation result from SUMO, the difference in adjacent lane front gap during a lane-change maneuver was also investigated. Figure 4.3 and figure 4.4 shows the adjacent lane front gap dis- tribution extracted from the HighD data-set together with the adjacent lane front gap distribution archived from the SUMO simulation. Observe that the model cali- bration was solely based on the DHW distribution. The comparison of the adjacent lane front gap distribution is only used to evaluate the calibrated lane-change models. The two bar diagrams shown in figure 4.3 below shows the adjacent lane front gap distribution extracted from the HighD data-set and the SUMO simulation result for cars during a lane-change maneuver. The upper diagram in figure 4.3 shows the distribution when the preceding vehicle type is another car and the lower diagram in the same figure show the distribution when the preceding vehicle type is a truck. As the two diagram shows, the lane-changing models in SUMO tends to execute the lane-change maneuver when the adjacent lane gap is smaller compared with the cars in the HighD data-set. The available adjacent lane front gap for cars during 43 4. Results a lane-change maneuver in the HighD data-set is equally distributed over a wide range while the models in SUMO tends to execute the lane-change when the front gap is within the range 5 – 50 meters. Figure 4.3: Comparison of the adjacent lane front gap distribution during lane- changing for cars. The distribution of adjacent lane front gap during a lane-change maneuver for trucks in the HighD data-set and the calibrated truck models in SUMO is shown in figure 4.4 below. The upper diagram in the figure shows the distribution when the preceding vehicle type is a car and the lower diagram show the distribution when the preceding vehicle type is a truck. As the diagrams shows, there is significantly less front gap data available for the SUMO models compared with the data extracted from the HighD data-set. The reason for that is the truck models in SUMO tends to execute the lane-change when there is no front vehicle in the adjacent lane. 44 4. Results Figure 4.4: Comparison of the adjacent lane front gap distribution during lane- changing for trucks. The lane-changing models was also calibrated based on the number of lane-changes that was exectuted in the HighD data-set. The number of lane-changes executed by the calibrated lane-changing models is presented together with the number of lane- changes extracted from the HighD data-set in table 4.2 below. As the table shows, the number of lane-changes executed by the SUMO models match the number of lane-changes executed by the vehicles in the HighD data-set very well. Car-following case Nr. LC HighD Nr. LC SUMO Difference. CC 2621 2789 168 CT 693 745 52 TC 339 322 17 TT 90 123 33 Table 4.2: Number of lane-changes extracted from the HighD data-set and the SUMO simulation 4.2 Car-following Calibration The result from the calibration process of the car-following models described in section 3.3.2 is presented in this section. The values of the simulation parameters and the models type for each of the four calibrated car-following models is shown in table 4.3 below. In addition to these parameters, the models use the vehicle attribute parameters presented in table 3.4. The simulation parameters that is not presented in table 4.3 or table 3.4 are set to the SUMO standard values. 45 4. Results Type LC Model CF Model minGap tau Sigma speedFactor CC LC2013 ACC 1.5 m 0.6 s 0.5 1.1 CT LC2013 ACC 1.5 m 0.6 s 0.5 1.1 TC LC2013 ACC 1.5 m 0.6 s 0.5 1.0 TT LC2013 ACC 1.5 m 0.6 s 0.5 1.0 Table 4.3: The parameter values of the calibrated car-following models The car-following models presented in table 4.3 was calibrated by comparing the average THW extracted from the HighD data-set with the average THW archived from the SUMO simulation. More specific, the THW during each timestep was extracted for each individual vehicle in the HighD data-set and the SUMO simula- tion. The mean value of the THW was calculated for each vehicle. The resulting mean THW distribution extracted from the HighD data-set was compared with the resulting mean THW distribution from the SUMO simulation with the intention to archive as similar distribution as possible. This was done with all of the four car-following cases, namely CC, CT, TC and TT, and the result are shown in figure 4.5 and figure 4.6. The THW distribution for cars with respect to the preceding vehicle type is shown in figure 4.5. The upper part of the figure shows the THW distribution when the preceding vehicle is another car and the lower part of the same figure shows the THW distribution when the preceding vehicle is a truck. As the two bar diagram shows, the cars in the HighD data-set has a noticeable lower mean THW compared with the calibrated car-following SUMO models. A big part of the cars in the HighD data-set has a mean THW less than 1.2 seconds while few of the car models in SUMO have a mean THW less than 1.2 seconds. Also, the number of cars in the HighD data-set that have a mean THW bigger than 2 seconds is quite few. This creates a big difference between the two distributions. Figure 4.5: Comparison of the Time Headway distribution during car-following for cars. 46 4. Results The two bar diagrams shown in figure 4.6 below shows the mean THW distribution extracted from the HighD data-set and the SUMO simulation result for trucks with respect to the preceding vehicle type. The upper diagram shows the THW distri- bution when the preceding vehicle is a car and the lower diagram shows the THW distribution when the preceding vehicle is another truck. Just like the case with the cars in the HighD data-set discussed in the paragraph above, the trucks in the HighD data-set has a significantly smaller mean THW compared with the SUMO models of trucks. Figure 4.6: Comparison of the Time Headway distribution during car-following for trucks. For further comparison between the HighD data-set and the simulation result from SUMO, the difference in mean DHW was also investigated. Figure 4.7 and figure 4.8 shows the DHW distributions extracted from the Highd data-set and the SUMO simulation for cars and trucks, respectively. Observe that the car-following models was solely based in the THW distribution, the comparison of the two DHW distri- bution is used to evaluate the calibrated models. The DHW distribution for cars with respect to the preceding vehicle type is shown in figure 4.7. The upper part of the figure shows the DHW distribution when the preceding vehicle is another car and the lower part of the same figure shows the DHW distribution when the preceding vehicle is a truck. As the figure shows, cars in the HighD data-set tends to have a lower DHW compared with the calibrated car- following models. Also, the DHW distribution extracted from the HighD data-set is clearly right skewed, while the calibrated SUMO models have a more uniformed DHW distribution. 47 4. Results Figure 4.7: Comparison of the Distance Headway distribution during car-following for cars. The distribution of DHW for trucks in the HighD data-set and the calibrated truck models in SUMO is shown in figure 4.8 below. The upper diagram in the figure shows the distribution when the preceding vehicle type is a car and the lower diagram show the distribution when the preceding vehicle type is a truck. As the figure shows, the distributions follow the same pattern as the distributions presented in figure 4.7 above. Trucks in the HighD data-set tends to have a lower DHW compared with the calibrated models of trucks. Also, the DHW distribution extracted from the HighD data-set is clearly right skewed, while the calibrated SUMO models have a more uniformed DHW distribution. Figure 4.8: Comparison of the Distance Headway distribution during car-following for trucks. 48 4. Results 4.3 Heterogeneous Traffic simulation with Car- following Models The calibrated car-following models was used with the models of autonomous ve- hicles described in section 3.4 in SUMO simulations of heterogeneous traffic. The result of these simulations is presented in this section. The simulations were exe- cuted with both the initial states extracted from the HighD data-set, see section 3.1.1, and random initial states. In the random initial states, the depart speed was set to a random value between 80 km/h and the speed limit. The depart lane was set to “best”, which is defined as “the lane which allow the vehicle the longest ride without the need to lane change” [16]. The depart position was set to “base”, which means that the vehicle starts at the beginning of the lane [16], and the depart time was set to the value extracted from the HighD data-set [16]. Figure 4.9 – 4.11 below shows the simulation result. Figure 4.9 below shows how the average time loss changes with the penetration rate of autonomous vehicles. Time loss is defined as “The time lost due to driving below the ideal speed” [16], and the ideal speed is the speed limit multiplied with the individual vehicles’ speed factor. In this case, the speed limit is set to 120 km/h and the simulation road is 420-meter-long. As the figure shows, the time loss decreases as the penetration rate of AV increase for both types of initial states. Figure 4.9: The average time loss for different penetration rate of AV. 49 4. Results Figure 4.10 below shows how the average depart delay changes with the penetration rate of autonomous vehicles. Depart delay is defined as “The time the vehicle had to wait before it could start its journey” [16], or in other words, the time needed for the lane to leave enough space for the vehicle to fit in. As the figure shows, the depart delay decrease as the penetration rate of AV increase for both initial states. In fact, when the penetration rate of AV is 75% and 100%, the depart delay is 0 for random initial states. Figure 4.10: The average depart delay for different penetration rate of AV. The number of conflicts when running the simulation with the initial states extracted from the HighD data.set is presented in the diagram shown in figure 4.11. As previously mention, TTC is used as the safety surrogate measure, and when the TTC is less than 3 seconds and 2 seconds, the traffic encounter is considered a conflict [19]. Observe that the total number of vehicles in the simulation is around 110,000. The number of conflicts significantly decrease when the penetration rate of AV is 100%. However, the number of conflicts does not strictly decrease when the penetration rate of AV increase from 0% to 50%. 50 4. Results Figure 4.11: The number of conflicts for different penetration rate of AV. To further investigate the impact of autonomous vehicles on heterogeneous traffic, the heterogeneous traffic simulation was run with different flow rates and traffic den- sities. Flow rate in SUMO is defined as the number of vehicles that pass a certain point per hour, and traffic density is defined as the number of vehicles that occupy a road per km. These simulations represent heterogeneous traffic on autobahn. The depart speed was set to a random value between 80 km/h and 200 km/h. In the sci- entific field “Traffic Engineering”, three fundamental diagrams are used to describe the traffic flow [32]. These three diagrams include the macroscopic traffic variables density, flow rate and mean speed. The three fundamental diagrams of traffic flow using the car-following models with different penetration rate of AV are presented in figure 4.12 – 4.14. Figure 4.12 shows how the average mean network speed varies with the flow rate for different penetration rates of AV. The mean network speed is defined as the mean speed of all the vehicles inserted in the simulation at a certain timestep. As the figure shows, a higher penetration rates of AV leads to a higher average mean network speed for all flow rates. A high speed is an indication on good traffic flow, and a higher speed leads to smaller time loss. 51 4. Results Figure 4.12: The average mean network speed for different flow rates. The second fundamental diagram of traffic flow is presented in figure 4.13 below and show how the average mean network speed varies with the traffic density for different penetration rate of AV. Observe that traffic density is not a simulation parameter in SUMO that can be defined. The traffic density was calculated from the different flow rates, and that is why different penetration rates of AV have a slightly different traffic density. The result shows that a higher penetration rate of AV leads to a higher average mean network speed, which is in line with the result presented in figure 4.12. 52 4. Results Figure 4.13: The average mean network speed for different traffic densities. The last of the three fundamental diagrams of traffic flow, which is presented in figure 4.14, show how the traffic density varies with the flow rate for different penetration rates of AV. A higher penetration rate of AV leads to a smaller traffic density for the same flow rate. 53 4. Results Figure 4.14: Flow rate vs traffic density for different penetration rate of AV The number of traffic conflicts was noted for all the simulations with different pen- etration rate of AV and with different flow notes. As mention before, TTC is used as the safety surrogate measurement, and a traffic encounter is considered a conflict when TTC is below 3 seconds [19]. The percentage of vehicles that was involved in a traffic conflict is presented in figure 4.15. The result of the simulations shows that the number of conflicts increase as the flow rate increase. For lower flow rates, homogeneous traffic has the lowest amount of conflicts. However, when the flow rate is 2000 vehicles per hour or more, the number of conflicts increase with the pene- tration rate of AV. The reason why a higher penetration rate of AV leads to more conflicts when the flow rate is high is because the mean network speed significantly increases when the penetration rate of AV increase. 54 4. Results Figure 4.15: The percentage of vehicles that was involved in a traffic conflict 4.4 Heterogeneous Traffic simulation with Lane- changing Models The heterogeneous traffic simulations in SUMO described in the previous section was repeated with the calibrated lane-changing models. The simulations were executed with both the initial states from the HighD data-set and with different flow rates. When the simulations was executed with different flow rates, the SUMO parameter “depart lane” was set to “best”, the parameter “depart position” was set to “base” and the parameter “depart speed” was set to 100 km/h. However, the lane-change simulations were not executed with random states since it gives unrealistic results. The result of the heterogeneous traffic simulations with the lane-changing models is presented in figure 4.16 – 4.18 below. The lane-change models were used together with the models of autonomous ve- hicles in SUMO using the initial states extracted from the HighD data-set. The simulations were executed with different penetration rate of AV and the result is shown in figure 4.16 below. The result of the simulations shows that the penetra- tion rate of AV has a relatively small impact on the number of lane-changes. The percentage of vehicles that perform a lane-change tends to increase when the pene- tration rate of AV increase from 0% to 25%, but the percentage tends to decrease 55 4. Results when the penetration rate of AV increase further from 25% to 75%. Figure 4.16: Percentage of vehicles that perform a lane-change for different pene- tration rates of AV Lane-changing simulations were also executed with different flow rates. Figure 4.17 shows how the number of lane-changes varies with the flow rate for different pene- tration rates of AV. As the figure shows, the percentage of vehicles that execute a lane-change increase as the flow rate increase. Also, a lower penetration rate leads the fewer lane-changes for the same flow rate. 56 4. Results Figure 4.17: Percentage of vehicles that perform a lane-change for different flow rates The number of lane-changes were also plotted against different traffic densities, and the result is shown in figure 4.18. As the figure shows, the percentage of vehicles that execute a lane-change increase as the traffic density increase. In other words, when there is less available free space on the road, vehicles tends to execute more lane-changes. Also, when the penetration rate of AV is smaller, vehicles tends to execute less lane-changes for similar traffic densities. 57 4. Results Figure 4.18: Percentage of vehicles that perform a lane-change for different traffic densities 58 5 Conclusion and Future Work 5.1 Conclusion This master thesis project had two main objectives to fulfill in order to investigate how autonomous vehicles impact heterogeneous traffic. The first main objective was to calibrate simulation models of cars and trucks based on the HighD data-set. The second main objective was using the models to conduct simulations of heterogeneous traffic with different penetration rate of autonomous vehicles. The last step of the project was to analyze the simulation result and, based on the result, conclude how the traffic flow and traffic safety are affected by autonomous vehicles. The result from the calibration process shows that the calibrated lane-change mod- els match the HighD data-set very well, both in number of lane-changes and the distribution of DHW during the lane-change maneuver. However, the car-following models average THW distribution did not match the average THW distribution of the vehicles in the HighD data-set as well. The reason for this is SUMO is modelling the desired minimum THW, and not the desired average THW. This resulted in a notable higher average THW among the car-following models compared with the vehicles in the HighD data-set. The primary focus of the project was to investigate how autonomous vehicles impact the traffic flow of heterogeneous traffic. The simulation results show that the average driving time loss decrease as the penetration rate of AV increase. The mean road speed increased as the penetration rate of AV increase. Also, the result showed that a higher penetration rate of AV leads to a smaller traffic density. In other words, the road is less occupied when the penetration rate of AV is higher for the same vehicle flow rate. All of these results are indications that the traffic flow improves as the penetration rate of AV increase. The secondary focus of the project was to investigate how the traffic safety is af- fected by the penetration rate of AV. The simulation result showed that the number of traffic conflicts tends to decrease as the penetration rate of AV increase if the mean road speed is the same. However, the mean road speed increase as the pen- etration rate of AV increase for the same vehicle flow rate. The difference in mean road speed for the different penetration rates increases as the vehicle flow rate gets bigger. This leads to the number of conflicts increase as the penetration rate in- crease when the vehicle flow rates are high. 59 5. Conclusion and Future Work In conclusion, the simulation results suggest that autonomous vehicles have a pos- itive impact on heterogeneous traffic. The traffic safety is improved due to less traffic conflicts and the traffic flow is improved due to higher mean road speed and lower traffic density for the same vehicle flow. However, the mean speed needs to be limited, or else the number of conflicts will significantly increase. 5.2 Future Work During the course of this project, new ideas and unexpected issues arose that could not be addressed