• No results found

TostartwithIwouldliketothankmyindustrialsupervisorDetlefSchollemainlyforthesupportandguidancethroughoutthethesisbutalsoforgivingmetheopportunitytoworkwiththisproject.IwouldliketoexpressmygreatthankfulnesstomyacademicsupervisorMasoumehParsehforthehelpfulad

N/A
N/A
Protected

Academic year: 2021

Share "TostartwithIwouldliketothankmyindustrialsupervisorDetlefSchollemainlyforthesupportandguidancethroughoutthethesisbutalsoforgivingmetheopportunitytoworkwiththisproject.IwouldliketoexpressmygreatthankfulnesstomyacademicsupervisorMasoumehParsehforthehelpfulad"

Copied!
60
0
0

Loading.... (view fulltext now)

Full text

(1)

IN

DEGREE PROJECT

MECHANICAL ENGINEERING,

SECOND CYCLE, 30 CREDITS

,

STOCKHOLM SWEDEN 2019

Evaluation of Prediction Models in

Trajectory Planning for Overtaking

Maneuvers

LINDA TRUONG

KTH ROYAL INSTITUTE OF TECHNOLOGY

(2)
(3)

Examensarbete TRITA-ITM-EX 2019:434

En utvärdering av prediktionsmodeller i

spårplanering för omkörningar

Linda Truong

Godkänt

2019-06-11

Examinator

Martin Törngren

Handledare

Masoumeh Parseh

Uppdragsgivare

ALTEN Sverige AB

Kontaktperson

Detlef Scholle

Sammanfattning

Utveckling av autonoma omkörningar skulle kunna förbättra säkerheten genom mer exakt

beslutsfattande av om, när och hur en omkörning ska exekveras. Därmed kan kollisionsrisker

orsakade av den mänskliga faktorn minska. Spårplanering är en strategi för att planera en

omkörning, där spåret är definierat som en väg med innehållande information om position,

hastighet och acceleration med avseende på tid. Syftet med denna studie är därmed att förbättra

beslutstagandet för att exekvera en omkörning autonomt.

Det finns flera olika metoder för att lösa spårplanerande problem i existerande litteratur. Denna

studie använder en rörelseplanerare som varierar tillståndsvariabler inom ett tillståndsrum, som

optimerar ryckiga rörelser från start till slut tillstånd. Kostnadsfunktionen för ryck minimeras vid

användning av ett femtegradspolynom. Denna studie varierar slut positionen och kan därför

använda ett fjärdegradspolynom. Algoritmen för rörelseplaneraren genererar ett kollisionsfritt

spår till ego-fordonet, för att kunna utföra en omkörning av det observerade fordonet, innan

vägen går ihop från två filer till en fil. Omfattningen av denna studie består av en utvärdering av

hur de tre olika prediktionsmodellerna CA, CV och IDM i kombination med en rörelseplanerare,

påverkar restiden. Rörelseplaneraren baseras på en variation av tillståndsvariablerna i

tillståndsrummet. Dessutom kommer tre olika vägfriktioner inkluderas som dynamiska

begränsningar. Restiden anses vara tiden från när ego-fordonet startar omkörningen till att den

uppnått sammanslagningspunkten.

(4)
(5)

Master of Science Thesis TRITA-ITM-EX 2019:434

Evaluation of Prediction Models in Trajectory Planning

for Overtaking Maneuvers

Linda Truong

Approved

2019-06-11

Examiner

Martin Törngren

Supervisor

Masoumeh Parseh

Commissioner

ALTEN Sverige AB

Contact person

Detlef Scholle

Abstract

Developing autonomous overtaking could enhance safety by more accurate decision making of

if, when and how to execute an overtaking and thereby decrease the collision risk caused by the

human factor. Trajectory planning is a strategy to plan overtaking maneuvers, where a trajectory

is defined as a path containing position, velocity and acceleration information along with time

stamps. The purpose of this study is therefor to improve the decision-making for executing

overtakes autonomously.

There are several methods mentioned in the literature on how to solve path/trajectory problems.

This study will use a state space sampling based motion planner, that optimizes the jerk between

the start and end state. The jerk cost function is minimized by the use of quintic polynomial. This

approach samples the end position, hence will a quartic polynomial be used instead. The motion

planning algorithm will generate a collision free trajectory for the ego vehicle, to overtake an

observed vehicle before the two lanes merges to one lane. The scope of this thesis is to evaluate

how the three different prediction models CA, CV and IDM in conjunction with the state space

sampling based motion planner affects the travel time. Additionally will three different road

friction conditions be considered as constraints. The travel time is considered as the time from

when the ego vehicle starts the overtaking to when it reaches the merging point.

(6)
(7)

Acknowledgement

To start with I would like to thank my industrial supervisor Detlef Scholle mainly for the support and guidance throughout the thesis but also for giving me the opportunity to work with this project. I would like to express my great thankfulness to my academic supervisor Masoumeh Parseh for the helpful advices and the support in my academic process. Lastly, I would also like to show my gratitude to Lars Svensson for his help with defining the scope of this thesis in the early stage and his generous effort to support and share his expertise in trajectory planning.

(8)
(9)

Abbreviations

Abbreviation Definition

CC Cruise Control

ACC Adaptive Cruise Control

ADAS Advanced Driving Assistance System IDM Intelligent Driver Model

CV Constant Velocity CA Constant Acceleration V2V Vehicle to Vehicle V2I Vehicle to Infrastructure

RRT Rapidly-Exploring Random Tree PFM Potential Field Method

CTRV Constant Turn Rate and Velocity CTRA Constant Turn Rate and Acceleration CSAV Constant Steering Angle and Velocity CCA Constant Curvature and Acceleration TTC Time To Collision

FPGA Field Programmable Gate Array V2X Vehicle to Everything

(10)
(11)

List of Figures

1.1 Stages for a scenario when the red vehicle in the convoy wants to exit the platooning. . . 1

1.2 Use case of the overtaking. . . 3

2.1 Hierarchy of the decision-making system. . . 5

2.2 Cartesian Coordinates. . . 7

2.3 Fren´et Coordinates [1]. . . 7

2.4 Lane change maneuvers [2]. . . 8

2.5 Stages of an overtaking process. . . 10

2.6 Representation of saf etygap between the ego-vehicle and the observed vehicle. . . 11

4.1 Flow chart of the proposed algorithm. . . 19

4.2 Generated trajectory set with different prediction horizon, before truncating and extending the trajectories to a common prediction horizon of 3s. . . 20

4.3 Generated trajectory set with a common prediction horizon of 3s. . . 20

4.4 The same trajectory set from figure 4.3, where the light green trajectories are within the dynamic constraints which represents the dynamic feasible trajectories. The colorful trajectories are invalid. . . 21

4.5 The light green trajectories are valid, the other colorful trajectories are invalid and the pink thicker trajectory is the final selected trajectory. . . 22

4.6 Outcome scenarios of the planner. . . 22

5.1 Merging point at 100 m, for CV, CA and IDM. Scenario 1 on dry road. . . 25

5.2 Merging point at 100 m, for CV, CA and IDM. Scenario 1 on wet road. . . 26

5.3 Merging point at 100 m, for CA and IDM. Scenario 1 on icy road. . . 27

5.4 Merging point at 100 m, for CV and IDM. Scenario 2 on dry road. . . 27

5.5 Merging point at 100 m, for CA. Scenario 2 on dry road. . . 28

5.6 Merging point at 100 m, for IDM. Scenario 2 on wet road. . . 29

5.7 Merging point at 100 m, for CA. Scenario 2 on wet road. . . 29

5.8 Merging point at 100 m, for CV. Scenario 2 on wet road. . . 30

5.9 Merging point at 100 m, for CA and CV. Scenario 3 on dry road. . . 30

5.10 Merging point at 100 m, for IDM. Scenario 3 on dry road. . . 31

5.11 Merging point at 100 m, for CA and CV. Scenario 3 on wet road. . . 31

5.12 Merging point at 100 m, for IDM. Scenario 3 on wet road. . . 32

5.13 Merging point at 100 m, for CV, CA and IDM. Scenario 3 on icy road. . . 32

(12)
(13)

List of Tables

5.1 Result for scenario 1 on dry road. . . 26

5.2 Result for scenario 1 on wet road. . . 26

5.3 Result for scenario 1 on icy road. . . 26

5.4 Result for scenario 2 on dry road. . . 28

5.5 Result for scenario 2 on wet road. . . 28

5.6 Result for scenario 2 on icy road. . . 29

5.7 Result for scenario 3 on dry road. . . 31

5.8 Result for scenario 3 on wet road. . . 32

5.9 Result for scenario 3 on icy road. . . 33

5.10 Collision rates for 100 iterations. . . 33

(14)
(15)

Contents

Sammanfattning Abstract Acknowledgement Abbreviations List of Figures List of Tables 1 Introduction 1 1.1 Background . . . 1 1.2 Problem Statement . . . 2 1.3 Research Question . . . 3 1.4 Purpose . . . 3 1.5 Goals . . . 3 1.6 Methodology . . . 4 1.7 Ethical Considerations . . . 4 1.8 Delimitations . . . 4 1.9 Report Outline . . . 4 2 Frame of reference 5 2.1 Architecture of Decision Stage . . . 5

2.2 Motion planning . . . 6

2.3 Fren´et coordinates . . . 6

2.4 Prediction Motion Model . . . 8

2.4.1 Linear kinematic physic-based models . . . 9

2.4.2 Intelligent Driver Model . . . 9

2.5 Vehicular Motion - Overtaking . . . 10

2.6 Collision prediction . . . 11

2.7 Cost function . . . 11

2.8 Monte Carlo Simulation . . . 12

2.9 Alten System Architecture . . . 12

2.9.1 Hardware . . . 12

2.10 State of the Art - Trajectory planning for overtaking . . . 12

2.10.1 Quartic polynomial . . . 13

(16)

4.5 Outcome scenarios of the planner . . . 22 4.6 System performance . . . 23 5 Results 25 5.1 Scenario 1 . . . 25 5.1.1 Dry road . . . 25 5.1.2 Wet road . . . 26 5.1.3 Icy road . . . 26 5.2 Scenario 2 . . . 27 5.2.1 Dry road . . . 27 5.2.2 Wet road . . . 28 5.2.3 Icy road . . . 29 5.3 Scenario 3 . . . 30 5.3.1 Dry road . . . 30 5.3.2 Wet road . . . 31 5.3.3 Icy road . . . 32 5.4 Collision probability . . . 33

6 Discussion and Conclusion 35 6.1 Discussion . . . 35

6.2 Conclusion . . . 37

7 Future Work 39

(17)

Chapter 1

Introduction

This chapter is an introduction of the thesis, where relevant background knowledge, purpose, scope and research question is presented. Ethical considerations related to this field is also described. The outline of the report is defined in the end of this chapter.

1.1

Background

A contributing factor of tomorrow’s sustainable transport system is platooning [3]. Platooning is when a group of vehicles cooperates in such a way that a small distance between the vehicles is maintained. This results in improved traffic throughput, reduced energy consumption and increased safety and comfort [4]. Today’s developed applications for autonomous vehicles improves transport time, safety, comfort and energy consumption both in highway driving and urban environments. Cruise Control (CC), Adaptive Cruise Control (ACC), automatic parking and blind angle vehicle detection are a few of the systems developed within the autonomous field, defined as advanced driving assistance system (ADAS) [5]. One of the companies that are developing platooning is Scania, where trucks in the convoy is following a lead truck autonomously using inter-vehicle communication [6]. The international bodies like the EU have increased their interest in platooning [3]. In some cases there will be scenarios where one vehicle in the convoy needs to exit the platooning, hence the exiting vehicle then needs to make space in front to allow the vehicles behind to overtake and continue the chain, see figure 1.1. This overtake can be solved by trajectory planning where efficient travel time is of importance. The arrow in figure 1.1 defines the desired position of the two vehicles behind the exiting vehicle. The trajectory to reach this desired position can be achieved by trajectory planning.

Figure 1.1: Stages for a scenario when the red vehicle in the convoy wants to exit the platooning.

(18)

Trajectory planning is considered as one of the most important and challenging tasks in the field of autonomous vehicles [7]. A step closer to fully automated driving is that the vehicle needs to plan different maneuvers while adapting to the surrounding traffic environment [8]. A vehicle trajectory is a generated path that contains the geometric position, velocity and acceleration information along with time stamps. One of the most common challenging maneuvers is overtaking, which in general can be seen as three maneuvers: lane changing, exceeding and merging [9]. A feasible real-time trajectory planner is achieved when potential collisions with both dynamically and stationary obstacles are avoided [7]. In it is mentioned that 30 percent of the overtaking accidents in Germany are caused by the humans mis-judging the distance and speed of forthcoming vehicles. Thus, developing autonomous overtaking could enhance safety by more accurate decision making of if, when and how to execute an overtaking and thereby decrease the collision risk. Hence, the purpose of this thesis is to improve the decision making for executing an autonomous overtaking.

This study will build upon a previous master thesis work performed at Alten [10], that included a study on overtaking, where the trajectory of the ego-vehicle was planned and future motion of the observed vehicle was predicted to achieve a decrease of collision rates. The used trajectory generation algorithm, state space sampling based motion planner, was chosen due to the capabilities of generating alternative final states and with high replanning frequencies [2]. It is mentioned in future work in [10], that there are still several different prediction models [11] that has not been investigated, that might improve the results of the algorithm.

1.2

Problem Statement

In [11] a few physic based motion models is investigated and tested, on an ego vehicle, for scenarios both in highways and urban environment. The approach only present results considering the accuracy of the prediction models on the ego-vehicle itself but has not been combined in a system of an overtaking scenario. Combining different prediction models in an overtaking system could give results that varies, where the best prediction model might not imply the best system properties. The approach in [10] con-sidered the linear physic-based prediction models constant velocity (CV) and constant acceleration (CA) on the observed vehicle that is being overtaken. As a build-on of [10], this thesis will not only consider the physic-based prediction models CA and CV but also additionally consider a more complex model, intelligent driver model (IDM), as a prediction model for the observed vehicle. The use of prediction models combined with a trajectory planner is a method to cancel out the generated trajectories that leads to collision. The desired properties for this system is low travel time given within a collision prob-ability threshold. Another add on [10] is that the user case, see figure 1.2, will consider three different weather condition that affects the tire-road friction and thereby changes the constraints of the vehicle dynamics. The different complexity levels of prediction models in combination with the planner might give different behaviour when different constraints are taken in to concern. Hence, this thesis will utilize a mechatronic system, where both software and mechanics are considered.

The term travel time in this study refers to the time between the start of the overtaking maneuver to passing the merging point, considering the ego-vehicle. The overtaking maneuver can be performed several times with Monte Carlo simulation, which is based on random sampling. This random sampling will be conducted on the observed vehicle’s motion. A set amount of iteration for the Monte Carlo simulation results in a final collision probability, where a minimum travel time can be retrieved. The simulated ground truth of the observed vehicle can also be compared with the final prediction, which will be the baseline to compare the accuracy of the different prediction models. Considering different tire-road friction and accuracy of the prediction models enables discussion on how the properties for each prediction model affects the system.

(19)

Figure 1.2: Use case of the overtaking.

1.3

Research Question

Due to limited time of this study, three prediction models will be investigated, where one is considered more complex (IDM). The remainder are two simpler models (CV and CA), which are physics-based mo-tion models and are in general most used [12]. Thus, the work for this thesis includes utilizamo-tion of both the linear physics-based models (CV, CA) and IDM as prediction models in combination with the state space sampling based motion planner to perform an overtaking of an observed vehicle, during different road friction condition. Hence, the research question is formulated as following: Using several prediction models with different complexity levels in conjunction with a state space sampling based motion planner, how does the choice of prediction model impact efficiency in terms of travel time, considering scenarios of an overtaking with different road friction conditions?

1.4

Purpose

The purpose of this study is to improve the decision making of executing an overtaking by finding a minimum allowed travel time within a collision rate. It is of high importance that the ego vehicle accurately determines if it is safe to perform an overtaking. Additionally, finding the lowest allowed travel time is advantageous due to not keep the adjacent lane occupied unnecessarily.

1.5

Goals

This thesis is a part of a larger project that includes a total of six thesis students with different specialties. Each student has their individual goals where parts of the work should aim at developing an intelligent transport system. Two traffic scenarios are included, where the first operation is detecting pedestrians and the second operation is to execute an overtaking, if collisions can be avoided.

The individual goal is to investigate how different prediction models in conjunction with the trajectory planner, for an overtaking scenario, affects the travel time of the ego-vehicle within a collision probability threshold. Thus, an overtaking maneuver should be executed if it is possible before the merging point.

(20)

1.6

Methodology

In [2] the algorithm based on state space sampling was validated by implementation on an autonomous vehicle, but the highway scenario was only simulated. In [11] the test drives were performed on a test vehicle. The results in [10] was presented as simulations and implementation of one scenario on a demon-strator.

The method for this study will therefor include a literature study phase and a simulations phase. The literature study will be conducted in a qualitative manner and the simulation phase is based on quantitative data. For the simulation implementation, the algorithm is implemented in Matlab and will consider the different prediction models with different road conditions.

1.7

Ethical Considerations

In this study the scenario is to execute an autonomous overtaking with a trajectory planner, where a collision should be avoided. When developing autonomous vehicles there are several ethical issues associated. One of the purposes of developing autonomous vehicles is to reduce traffic accidents by re-placing the human factor, which results in decision taking of how to address ethical issues. The common addressed issue is to decide during an inevitable accident, which choice gives worse consequences than the other. For instance could the decision taking be between: harm the pedestrians alternatively the passengers. The word utilitarian used with autonomous vehicles means that the autonomous vehicle will sacrifice their passengers life for the greater good. In [13] a study showed that the participants wanted others to buy utilitarian autonomous vehicles but would rather not purchase it themselves, hence they preferred to have an autonomous vehicle that protects their own passengers. Taking these kind of ethic issues in to concern makes it difficult to define the algorithms for autonomous vehicles. Implementing such a moral algorithm, one need to consider to be consistent, not make the public upset and also not scare off the buyers [14].

For this thesis there will not be any requirements to address the previous mentioned ethical consid-erations, since this study is made in simulations and does not pose a major danger to the surrounding people. However, the presentation of the results could be an ethical issue, that will be addressed. One needs to avoid being biased or hide results even if a part of the result is undesirable. The work that is per-formed for this thesis will avoid any type of concealed results. Due to this work being conducted for the company Alten, one needs to furthermore consider that the company should use the study appropriately.

1.8

Delimitations

It is of high importance to consider the safety when developing autonomous systems in real life since the vehicle is suppose to integrate in the real traffic, where humans can be in harm if accidents occur. A robust autonomous system is very complex and should be prepared for all possible traffic situations. Due to the limited time of 20 weeks for this thesis, the problem must be delimited to achieve the goals. Not all scenarios in a real traffic can be considered, therefor is a use case presented for this study. This study will only include a system which plans an overtaking and not other concepts in autonomous vehicles such as object tracking, platooning, etc. The work for this thesis includes an academic report, presentations on Alten and KTH. For the complete overtaking maneuver the longitudinal motion will only be considered to simplify the ego-vehicle’s overtaking. The overtaking is considered as a highway scenario, with an unidirectional two-lane without curves and where there is only one observed vehicle included.

1.9

Report Outline

With a presented introduction of this master thesis in Chapter 1, the remainder of the report is structured as follows. Chapter 2 introduces the frame of reference, with a combination of theoretical background and state of the art of the trajectory planning for autonomous overtaking. Followed by the chosen method outlined in Chapter 3. Thereafter is the design and implementation of the algorithm presented in Chapter 4. The results of this study is presented in Chapter 5, followed by a discussion part combined with conclusion in Chapter 6. Lastly, the future work is proposed in Chapter 7.

(21)

Chapter 2

Frame of reference

In this chapter the theoretical reference frame is presented, which is a combination of the prior knowledge and previous performed research in this field. The chapter first introduces the theoretical background based on literature reviews and lastly a state of the art of trajectory planning of autonomous overtaking.

2.1

Architecture of Decision Stage

A general abstraction of the architecture of automated vehicles can be described as using the perception and/or communication information as input for the decision-making system to control a vehicle’s motion by actuators such as steering, throttle and brake [5]. On-board sensors such as LIDARs, GPS, cameras and radars are used to gain a perception of the environment [15]. Alternatively or additionally, com-munication network systems from vehicle to infrastructure (V2I) or between vehicles (V2V) can provide useful information about the environment. For instance, utilization of V2V communication provides sensor data from other vehicles, thus the information of the surroundings can be gained from the on-board sensors of other vehicles and thereafter sent to the ego vehicle. Warnings from other vehicles can be detected and communicated before the ego-vehicle detects the hazard [16]. The partitioning of the different layers in the decision-making system varies in the literature, however [15] decomposes it into four hierarchically components: route planning, behavioral decision making, local motion planning and local feedback control, see figure 2.1.

Figure 2.1: Hierarchy of the decision-making system.

(22)

The route planning is the highest level in the decision-making hierarchy, where the route from a current position to a requested position must be selected. A sequence of way-points through the road network is sent to the next level, where the interaction with the surrounding is needed to command an appropriate driving behaviour, for instance change-lane, turn-right or overtaking. Hence, uncertainties can arise due to the intention prediction and motion estimation in conjunction with constantly environ-ment changes [15]. When the motion specification is set, it should be interpreted as a path or trajectory which is the responsibility of the third level. The vehicle dynamic, collision avoidance and further con-straints should also be taken into consideration when the path or trajectory is selected. This level is called motion planning and is discussed more in detail in section 2.2. The last level is the vehicle control system, where a feedback controller adjusts actuation variables to correct errors when the reference tra-jectory, generated by the motion planning system, is executed. The occurred errors are due to inaccurate modeling of the vehicle [15].

2.2

Motion planning

The motion planning level is responsible for avoidance of the surrounding static and dynamic obstacles, respecting dynamically constraints for feasibility of the vehicle motion and ensure comfort for the pas-senger. A motion plan generates either a path or a trajectory [15]. Path planning is a spatial reference where the time and velocity is not considered, hence it is not prescribed how the path should be followed. Trajectory planning prescribes the path as a time-parametrized function, which means velocity is also considered. Thus, trajectory planning might be more suitable when considering dynamics in motion planning [15]. Several approaches have been proposed to solve the path/trajectory problem in motion planning for autonomous vehicles, these planning techniques can be roughly classified into four groups: graph search, sampling, interpolating and numerical optimization [5].

Graph Search Based Planners

The configure space of a vehicle is discretized and represented as a graph, to then search for a path with a minimum cost [15]. Graph search is the second most common used method in real implementations [5]. Some of the applied algorithms are Dijkstra, state lattice and A-Star (A∗), where state lattices is most popular [5].

Sampling Based Planners

Sampling based planners samples randomly in the configuration space or state space, meanwhile searching for connectivity inside it. These planners handle high dimensional spaces [5]. The algorithm Rapidly-Exploring Random Tree (RRT) [15] has been tested widely with autonomous vehicles [5]. The planning is fast in semi structured spaces and considers non-holonomic constraints, but the disadvantages is that the solution is not curvature continuous, jerky and not optimal [5].

Interpolating Curve Planners

Interpolating curve planners are most used for real implementation [5], where different methods are implemented for path smoothing and curve generation. With a given set of reference points the purpose is to insert a new set of data within the range, by interpolating. Clothoid curves, polynomial curves and B´ezier curves are some of the used techniques [5].

Numerical optimization

Numerical optimization planners selects the best solutions by solving constrained optimization problems. The purpose is to minimize or maximize a function that considers different constraints [5]. Function optimization is a technique that minimizes the potential field method (PFM) [17]. This technique gives advantages of managing several constraints on road, ego vehicle and surrounding vehicles. The disadvantage of optimizing at every motion state leads to the consequence of a time consuming technique [5].

2.3

Fren´

et coordinates

Planning trajectories in Cartesian coordinates imply considering an absolute ground (see figure 2.2), but human-like behavior tend to plan the lateral motion with the lanes as reference which is more dynamic.

(23)

Hence, the trajectory can be represented in the Fren´et coordinates of the street, see figure 2.3. The motion planning in [1] and [2] uses Fren´et coordinates since the planning is considering both longitudinal and lateral motion, but also to obtain a more human-like driving behaviour.

Figure 2.2: Cartesian Coordinates.

Figure 2.3: Fren´et Coordinates [1].

By considering the root point r(s) along the center line and the offset d(t), a generated trajectory x(t) can be reformulated according to equation 2.1.

x(s(t), d(t)) = r(s(t)) + d(t)nr(s(t)) (2.1)

As can be seen in figure 2.4, different planned lane change maneuvers is shown. The optimal scenario is (a), when considering comfort, time and energy. However, humans tend to maneuver according to (b) with the strategy shown in (c). Hence, when considering both longitudinal and lateral motion, the purpose of using Fren´et coordinates is to generate trajectories in a similar manner to human-like driving.

(24)

Figure 2.4: Lane change maneuvers [2].

2.4

Prediction Motion Model

Predicting the motion of surrounding vehicles and their future trajectories in different traffic scenarios is a wide research topic in the literature. In maneuvers like overtaking, an accurate prediction can improve the behaviour of the ego-vehicle with a decrease of collision risk [18]. Prediction motion models are mathematical models that predicts a vehicles motion in advance and can be divided into three levels [12]:

Physics-based

Physics-based motion models rules by the laws of physics where dynamic and kinematic models are combined with control inputs, car properties and external conditions to achieve the state of the vehicle. The external condition can for instance be the friction coefficient of the road surface. These motion models are the simplest but also in general most used, where the complexity might vary depending on how much of the real scenario is considered. The evolution models can be divided in dynamic- or kine-matic models. The dynamic models considers different forces, such as tire forces or road banking angle. Dynamic models can get extremely complex and are most suitable for control-oriented applications. Sim-pler dynamic models are recommended when considering trajectory prediction, for instance the ”bicycle” representation. Kinematic models are more common than dynamic models when the focus is not on the vehicle control. Kinematic models are only considering mathematical expressions between the movement parameters, such as position, velocity and acceleration. The friction force and other affecting motions are neglected. Several kinematic models are mentioned in [11] where the broad categorization is linear or curvilinear models. The two models Constant Velocity (CV) and Constant Acceleration (CA) are linear and only assume straight motions, not rotations and is therefore the least complex. These two models were used in the previous master thesis work [10] and as a built-on for that study, the two models will also be used to answer the research question for this study. The prediction models CV and CA is therefore presented more in detail in section 2.4.1. The curvilinear models are Constant Turn Rate and Velocity (CTRV), Constant Turn Rate and Acceleration (CTRA), Constant Steering Angle and Velocity (CSAV), Constant Curvature and Acceleration (CCA). Curvilinear models considers rotation around the z-axis which means the yaw angle and yaw rate is taken into account. CTRV and CTRA are the simplest curvilinear models and consider that the velocity and yaw rate are decoupled. Disadvantages such as inaccuracy of the yaw angle might occur when assuming this decoupling of the velocity and yaw rate. Thus, in the models CSAV and CCA a correlation is assumed between the velocity and yaw rate by us-ing the steerus-ing angle as a state variable. These curvilinear models does not consider driftus-ing or skiddus-ing. The simulation methods for using these physics-based motion models are Single trajectory simulation, Gaussian noise simulation or Monte Carlo simulation [12]. Single trajectory simulation is computational

(25)

efficient but does not account for uncertainties on the current state or errors of the motion models. Gaussian noise simulation considers the uncertainty but is still not reliable to represent different possible maneuvers. Monte Carlo simulation samples the motion models’ input variables randomly to achieve potential future trajectories. Input such as acceleration, steering angle or lateral deviation are normally sampled. There are two possible ways to consider the constraints, either by removing the generated trajectories that has a too high lateral acceleration than what is allowed or to set the vehicle’s physical limitations directly on the input samples. If the current state is not certain, a filtering algorithm can be used to predict a trajectory.

Maneuver-based

Maneuver-based motion models assumes every vehicles’ motion as independent from the surrounding vehicles [12]. These models are based on prototype trajectories or maneuver intention estimation where both are based on identifying the intended maneuver in advance. In trajectory prototype applications, the trajectory prediction is based on a partial trajectory being performed and then compare it with learned motion patterns, to then select the associated prototype trajectory that models the future motion. In maneuver intention estimation the intended maneuver is first estimated by physical state, road network information or driver behaviour, to then predict the different physical states that corresponds to the identified maneuver. These models are more reliable in long-term prediction than the physics-based motion models, however assuming independent vehicles is not compatible in practice [12].

Interaction-aware

Interaction-aware motion models assumes interaction between maneuvering vehicles, which means the vehicles motions are dependent on each other. These models are more reliable due to the increased surrounding perception, but they are few in the literature [12]. One mentioned method in [12] is based on trajectory prototypes combined with assumption of high collision avoidance of the driver, where the trajectories that leads to a collision are penalized. The other mentioned method [12] that is the most common method for interaction-aware based models, is based on dynamic bayesian networks and is assuming pairwise dependencies between several vehicles. To decrease the complexity level, one can assume that the surrounding traffic does only affect the vehicle of interest and not vice versa. Interaction-aware motion models are more long-term predictive than physics-based motion models and more reliable than maneuver-based motion models but are computational heavy [12].

2.4.1

Linear kinematic physic-based models

In [10], the state space models of the two linear models CV and CA was presented, where only the longi-tudinal motion was considered. The position, velocity, acceleration and time step is denoted respectively: x, ˙x, ¨x and ∆t. Equation 2.2 is the state space vector for CV and equation 2.3 denotes the state space model of CV. ~ x(t) = [x, ˙x]T (2.2) ~x(t + ∆t) =x(t) ˙ x(t)  + ∆t ˙x 0  (2.3) Equation 2.4 is the state space vector for CA and equation 2.5 denotes the state space model of CA.

~ x(t) = [x, ˙x, ¨x]T (2.4) ~ x(t + ∆t) =   x(t) ˙ x(t) ¨ x(t)  + ∆t   ˙ x +x∆t¨2 ¨ x 0   (2.5)

2.4.2

Intelligent Driver Model

The Intelligent Driver Model (IDM) is widely used to simulate and analyze traffic. The model is based on vehicle-following, which means that a vehicles motion is modelled when it is following another vehicle in front. However, this model can also be extended to a situation called free road, which means that there is no vehicle in front [19]. The IDM acceleration function is denoted [20]:

(26)

aIDM= a[1 − ( v v0 )δ− (s ∗(v, ∆v) s ) 2] (2.6) where s∗(v, ∆v) = s0+ vT + v∆v 2√ab. (2.7) The distance to the vehicle in front is denoted s, the desired safe gap is s∗, the current speed is v and the desired speed is v0, where ∆v = v - v1 is the velocity difference or approaching rate from the

vehicle in front. The parameter a is the maximum acceleration, b is the desired deceleration, s0 is the

minimum distance and T is the constant desired time gap. The free road acceleration can be separated from equation 2.6 to equation 2.8 [20].

˙vf ree(v) = a[1 − (

v v0

)δ] (2.8)

The exponent δ defines how the velocity will approach to its desired velocity and how the acceleration decreases. The acceleration will decrease linearly if the parameter is set to δ = 1, and constant if δ = ∞. A common used value for the exponent is 4 [20].

2.5

Vehicular Motion - Overtaking

The longitudinal motion of the vehicle is controlled by the throttle and brake. Hence, it ensures safe distance from a vehicle in the same lane. By steering, the lateral motion is controlled and it is ensuring safe distance from the vehicles in the adjacent lane [21]. An overtaking maneuver require a combination of lateral and longitudinal motion, where the transit should be smooth and collision should be avoided with the observed slower moving vehicle. The overtaking process can be divided in three sub-maneuvers [9]: lane changing (i), exceeding (ii) and merging (iii), see figure 2.5. In fact the division of the overtaking process can also be considered as two lane change phases and one exceeding phase. Hence, the lane change process is essential when studying overtaking maneuvers [22] ,[9].

Figure 2.5: Stages of an overtaking process.

Overtaking is an end-to-end autonomy maneuver that requires the determination of if, when, and how to execute the task. Each overtaking maneuver is unique in real road traffic, due to the dynamic road environment such as different traffic conditions in each lane, speed limits and road condition [17]. Hence, can the overtaking maneuver be categorized in four different aspects [23]:

• Normal - approaching the observed vehicle and performs the overtaking maneuver when suitable • Flying - directly overtaking the observed vehicle without adjusting the longitudinal velocity • Piggy backing - following a preceding vehicle that overtakes the observed vehicle, hence overtaking

in tandem with the preceding vehicle

• 2+ - at least two observed vehicles are overtaken in the same maneuver

(27)

2.6

Collision prediction

There are two main types of danger to consider when the possible collision needs to be defined [24]: • distance between the vehicles

• speed differences between the vehicles

The first responsibility of the collision avoidance system is to check that the distance between the ego vehicle and observed vehicle is within a safe distance during the whole trajectory, to predict if a collision will occur. In an approach [25] the vehicles are represented as circles with radius R to enclose the vehicles, see figure 2.6.

Figure 2.6: Representation of saf etygap between the ego-vehicle and the observed vehicle. Thereafter can the distance between the vehicles be defined as saf etygap denoted in equation 2.9, by considering the euclidean distance between the vehicles, see figure 2.6.

saf etygap =p∆x2+ ∆y2 (2.9)

Hence, the saf etygap needs to be larger than the sum of the two vehicles radius Rego, Robserved to

avoid collisions, see equation 2.10.

saf etygap > Rego+ Robserved (2.10)

The second responsibility of the collision avoidance system, which is a widely used method for collision prediction and risk assessment is called TTC (Time-to-Collision) [25]. TTC is defined as ”the time required for two vehicles to collide if they continue at their present speed and on the same trajectory”, which leads to equation 2.11 [24].

T T C = Di V − Vi

(2.11) Here, Didenotes the relative distance with vehicle i and V − Videnotes the relative velocity between

the vehicles. In [24] it is mentioned that several projects have studied TTC, conclusively it can be formulated to when TTC ≥ 10s, then it means that there is no risk for collision and if TTC < 1s, it is highly possible for a collision. Values in between has a linear possibility of collision with respect to TTC.

2.7

Cost function

In order to select an optimal trajectory among the generated trajectory set, each trajectory should be evaluated against some cost functions [26]. There are several ways to represent a cost function, in [27] three types of costs are proposed:

(28)

• Progress Cost - represents how well a strategy finishes a task, penalizing strategies that take longer time to finish the task. For instance, using travel time as a cost function can be seen as a progress cost.

• Comfort Cost - represents a comfort ride for the passenger, for instance avoid large accelerations. • Safety Cost - having an acceptable distance between vehicles, to avoid collisions.

2.8

Monte Carlo Simulation

Monte Carlo simulation is a method to analyze the probability and distribution of the outcome in a process, by an input of random variables. This method allows determination of the different outcomes of a process and the probability of occurrence. Monte Carlo simulation can be run multiple times in order to cover multiple and various possible outcomes, to then plot a probability distribution curve [28]. For instance, when using Monte Carlo simulations for predicting a vehicle’s trajectory, the random sampling of input variables are usually acceleration, steering angle or lateral deviation. In order to consider the feasibility of the trajectory, the constraints needs to hold true. There are two possible alternatives, either removing generated trajectories that does not hold the constraints, or by consider the constraints in the motion models so that the input is distributed in a more realistic manner [12].

2.9

Alten System Architecture

2.9.1

Hardware

Alten’s physical demonstrator has a scale of 1:8 relative to real vehicles. Where a Z-turn board with Zynq-7020 [29] is used as a platform with a dual-core ARM Cortex-A9 processor and FPGA (Field Programmable Gate Array). Previous work on Alten used the R/C vehicles to develop an intelligent transport system. The previous work has been implemented on a Zedboard, Zynqberry and Raspberry pie, however has current work been restricted to use Z-turn as a hardware platform, since it has FPGA, which is operating faster. The software tool Vivado Design Suite is used for the FPGA. FPGA are integrated circuits that can be configured to desired application or functionality after it has been manu-factured. They contain semiconductor devices based on configurable logic blocks that can be connected to different configurations [30]. An advantage with FPGA is that they can perform multiple operations in parallel and are therefor suitable for high-speed and high-performance tasks [31].

2.10

State of the Art - Trajectory planning for overtaking

Most of the proposed trajectory planning methods that uses on-board sensors to gain an environmental perception is only applicable for low-speed overtaking due to the uncertainties. Additionally, some pro-duction vehicles are currently provided with information by vehicle-to-everything communication system (V2X), but the contemporary autonomous vehicles are still limited to low-speed overtaking maneuvers [17]. This V2X communication is a first generation and is able to send updates on permanent or slowly changing features of the surroundings. However, there are still remaining limitations such as the range of sensing, blind spots, time for predicting motion, inaccurate sensors and possible lost V2X network connection that restricts the capability to perform a high-speed overtaking [17]. Due to the importance of predicting surrounding vehicles motion, much research has been done in this field, section 2.4 presents the different methods. Current research within the autonomous overtaking field shows a high interest of the V2X communication mainly for feasibility checks and decision making. In [17] it is discussed that a more connected driving environment, could be a possible solution to expand the sensory and perception view to improve the uncertainty caused by predictions, this topic is yet to be studied.

A trajectory planning algorithm for a high-speed overtaking requires consideration about the vehicle dynamics, environmental constraints and accurate surrounding perception. In the literature it occurs numerous methods of trajectory planning, where potential fields, cell decomposition, interdisciplinary methods and optimal control are the most common techniques used for overtaking applications [17].

(29)

Potential field algorithms

Potential field algorithms is based on attributing repulsive fields to obstacles in the environment and attractive fields to the vehicle’s safe zones. Along the steepest potential gradient of the resulting po-tential field, trajectories are generated and the final trajectory is found where the popo-tential is lowest. This method has only been experimental verified in low-speed maneuvers in [32] since it requires high computational cost and very accurate environment perception. Potential field algorithms are not able to handle vehicle kinematic constraints, and is therefor not suitable for high-speed driving scenarios. Cell decomposition algorithms

Cell decomposition algorithms are based on various shaped divided regions of the environment, called cells [24]. A method called Rapidly-exploring Random Tree (RRT) handles obstacles and the vehicular constraints, but still requires high computational and memory cost. These algorithms are not suitable on busy roads, for example heavy traffic density and frequency of road curvature. Another disadvantages with RRT is that the trajectory is jerky.

Inter-disciplinary algorithms

Inter-disciplinary algorithms are inspired by missile guidance and robotics systems. An experimental verification was achieved based on motion primitives, which is a combination of trajectories with steady-state equilibrium and maneuvers that are specified in advance [33]. Two other approaches, where one was a real-time implementation that consecutively tracks virtual reference points to generate feasible trajectories [34]. The other approach was based on matching the position and velocity of a shadow target during the maneuver. These two approaches has only simulation results and lacks the experimental validation. Efficiency of the approaches is therefor not available.

Optimal control algorithms

Optimal control algorithms are based on minimizing a performance index while considering the con-straints. This method does not require high computational requirements. An approach by Werling [1] based on optimal control, was successfully demonstrated on the autonomous vehicle JUNIOR, developed by Stanford University, while the highway scenario was simulated. To predict the observed vehicle, a constant acceleration model was used. It is mentioned in the article that a more precise prediction of other vehicles, would allow the test vehicle to be more advanced. These optimal control algorithms are normally suitable in more extremely controlled or structured environment since it does not consider un-certainties in a dynamic environment. The majority of these methods do not consider the non-linearities in the vehicle and tire dynamics, which leads to trajectories not suitable for high speeds and/or low road friction conditions [17]. This planner inspired by Werling [1] generates alternative final states by sampling the state space and was used in the previous master thesis work [10], due to the high replanning frequency. This planner will therefor be denoted as a state space sampling based motion planner. Since this master thesis work is based on evaluating different prediction models combined with this state space sampling based motion planner, a more detailed explanation of the planner is described in section 2.10.1.

2.10.1

Quartic polynomial

In a continued work by Werling [2], the state space sampling based approach is explained more in detail. The planning algorithm generates multiple goal states with high frequency of replanning cycles. Thus, the algorithm is highly adapted to traffic changes. The ”ideal” behaviour of an autonomous vehicle is described in [1], where a maneuver should be executed by fulfilling both ease and comfort when considering travel time. Hence, ease and comfort can be described as jerk, which is the derivative of acceleration. Using a quintic polynomial, optimizes the jerk between a start state and an end state, which means the jerk cost function is minimized. The cost function J is defined as the time integral of the square of jerk, see equation 2.12.

Jt(p(t)) = Z t1 t0 ... p2 (τ )dτ (2.12) This master thesis work is considering only longitudinal movement and focusing on adapting a desired velocity where the position does not need to be certain. Therefore, a quartic polynomial is to be preferred over the quintic polynomial. Equation 2.13 describes the trajectory of the vehicle as a function of time. The quartic polynomial, see equation 2.13, with the unknown parameters (a0, a1, a2, a3, a4) needs to be

(30)

solved, to be able to define the trajectory. Differentiating equation 2.13 with respect to time, gives the velocity (see equation 2.14) and acceleration (see equation 2.15) of the vehicle. Hence, the state vector is denoted in equation 2.16. x(t) = a0+ a1t + a2t2+ a3t3+ a4t4 (2.13) ˙ x(t) = a1+ 2a2t + 3a3t2+ 4a4t3 (2.14) ¨ x(t) = 2a2+ 6a3t + 12a4t2 (2.15) s(t) = [x, ˙x, ¨x]T (2.16) Since there is five unknown parameters, there should be five polynomial equations put in a matrix form, as in equation 2.17, to be able to solve the quartic polynomial. The matrix is based on equation 2.13, 2.14 and 2.15, where the initial values of position x0, velocity ˙x0and acceleration ¨x0is defined with

the initial time t0. The equations that defines the final desired velocity ˙xf and acceleration ¨xf is defined

with the desired final time tf. The final position xf should not be defined, since there is no desired final

position. Sampling tf to solve the matrix will generate a trajectory set with multiple and different end

(31)

Chapter 3

Method

This chapter describes the research methodology used to solve the problem statement introduced in Chap-ter 1.

The method for this study is divided in two parts, literature study and simulation phase. A literature study was performed in a qualitative manner, where the purpose of the literature study was mainly to gain knowledge on how to solve the research question, by understanding the theory behind motion planning and the stages to achieve a successful overtaking. The initial stage was to get an overview of motion planning and how to solve path/trajectory planning problems. Thereafter could a state of the art be carried out for how motion planning was applied to overtaking maneuvers. This stage enabled deeper understanding in the existing theories, the limitations in the existing research and the topics that has not yet been studied.

The research question involved to investigate three different prediction models and to consider three different tire-road friction condition for the overtaking maneuver. This study used an applied research method [35] since it was based on solving a specific, practical problem formulated in the research question where the results were based on a specific situation, the chosen use case. In order to verify the study and answer the research question, a simulation phase was conducted in Matlab. The quality assurance of this study included dependability in terms of safety. The safety of the planner was validated using Monte Carlo simulation. The simulation stage was based on randomly sampling the motion of the observed vehicle, to evaluate the motion of the ego vehicle that is aiming for an overtaking. The efficiency mea-surement was travel time for the ego vehicle, which was evaluated when randomly sampling the observed vehicles motion. The simulation was therefor conducted by using quantitative data.

The accuracy for each prediction model was also considered in the results, to verify the reliability. For instance if the chosen prediction model was not accurate from the beginning, then the result might not have been the most optimal solution and could be further discussed. In the end of this study, a deeper understanding of the underlying reasons and insight of the problem was gained and how to solve the problem.

(32)
(33)

Chapter 4

Design and Implementation

In the process of designing an algorithm, the system specifications and system requirements for the overall system needs to be defined, which will be include in this chapter. A description of the proposed approach used for the simulations in Matlab, with a system overview is presented. The technologies and processes for the planner will thereby be described in detail.

4.1

System Requirements

• The overtaking process should be initialized in the beginning of the motion planning. • The distance between the vehicles should be used for collision check, see section 2.6.

• The trajectories needs to be dynamic feasible, which means the velocity and acceleration constraints need to be taken into consideration.

• A safe distance needs to be considered at the merging point.

• Collision avoidance system should not be managed if there is no collision free trajectories within the trajectory set. A simplified action plan should be implemented. The collision management should be within the trajectory set, by removing the collision risk trajectories and keep the collision free trajectories.

• If there is no dynamic feasible trajectories within the trajectory set, the same action should be considered as when no collision free trajectories are found within the trajectory set.

• The time horizon for the ego vehicle should not be too long since the environment changes unpre-dictable.

4.2

System Specifications

• In [1] and [2], the safety margin is gradually increased to the end of the time horizon, but in this design the collision check is enabled when the distance to the merging point is within the prediction horizon of the ego vehicle.

• The desired velocity of the overtaking is chosen to a low speed, since the literature study verified that most of the proposed trajectory planning methods are applicable only for low-speed overtaking, due to uncertainties. The chosen value is 10 m/s.

• The goal of this study is to find the fastest trajectory, which means it can result in overshooting. Maximum allowed velocity is therefor 12 m/s too allow a small overshoot.

• Maximum acceleration/deceleration is defined µg, where the gravity g is 9.81 m/s2 and the

coeffi-cient of friction µ is 0.8 for dry road, 0.4 for wet road and 0.2 for icy road.

• The merging point is at 100 m. This value needs to be chosen to a value with enough time to be able to accelerate to the desired velocity. If the merging point is too small, there will not be any valid trajectories that lets the vehicle accelerate fast enough. If the merging point is chosen too

(34)

large, the ego vehicle has already reached the desired velocity at early stage and will just travel in constant velocity. The planner requires acceleration since it plans the trajectory to reach vf. If the

current velocity v0 is equal to vf the result will be that all trajectories travels in constant velocity

and if one trajectory has collision risk, the complete trajectory set gets invalid. • Sampling time of the replanning for the ego vehicles trajectory is 0.1s.

• Minimum maneuver time tfmin is 1s, maximum maneuver time tfmax is 5 and the amount of

trajectories Ntraj generated for each time step is 40. Increasing the number of trajectories to 400

gave no difference in the result, but the computational cost increased greatly which would affect the limited time for this study, therefor was 40 trajectories chosen for this study.

• The time horizon should be short since it is not sufficient to predict an event far ahead and take a decision farsighted. The predicted event might have changed after a few time steps. The time horizon for this study is chosen to 3s, since it is common used in the literature [1], [2].

• The prediction models are initialized for each replanning cycle (0.1s), with a resolution of 0.001s. • The minimum critical distance between the vehicles, called saf etygap in equation 2.10, is 3.8 m. • The desired velocity for the prediction model IDM is 7 m/s.

• Initial velocity is 6 m/s for the ego vehicle and 5 m/s for the observed vehicle. • Initial and final acceleration of ego vehicle is 0 m/s2.

4.3

Conceptual Design

The goal of the planner is to perform an overtaking of the observed vehicle in front before the merging point, without any collisions. In this case a collision can only occur in the merging point region, since only longitudinal motion is considered. In this design, the collision check should not be enabled until the merging point is detected within the prediction horizon. Enabling a collision check of an obstacle from a large distance is not feasible since the obstacle is changing its state unpredictable for each time instance. The overtaking must be executed and completed before reaching the merging point and consider a safe distance between the vehicles at this point. If an overtaking is not possible due to dynamic constraints of the ego vehicle, the planner will continue to aim for the desired velocity and consider a safe distance behind the observed vehicle at the merging point. A trajectory becomes invalid if it exceeds the dynamic constraints or leads to a collision. In cases when there is a complete invalid trajectory set generated by the planner, it is considered for a real life scenario that a decision making for an action plan must be taken. This case of handling an action plan is out of the scope for this study and will therefor be handled with a simple action plan. It is decided that the action plan is to emergency break to standstill, if the complete trajectory set is invalid.

In order to evaluate the impact of the different prediction models, the observed vehicles ground truth motion is simulated with random sampling to obtain unpredictable behaviour. Comparing the final output of the planner with the ground truth validates if the planner actually generated a collision free trajectory. By repeating this experiment, a probability on the collision risk of the planner is achieved. With a resulting threshold value on the collision risk, the distribution of the minimum travel time for each prediction model can be obtained.

4.4

Algorithm architecture

The proposed algorithm architecture can divided in two parts, firstly the trajectory generation and secondly the trajectory selection. For each of these parts, there are several subsets that the planner needs to go through to obtain a final trajectory for each time step. The flow chart in figure 4.1 gives an abstract overview of the complete algorithm.

(35)

Figure 4.1: Flow chart of the proposed algorithm.

4.4.1

Trajectory Generation

Definition of Start points and Endpoints

The local start points and the desired endpoints of the trajectory needs to be provided in order to be able to solve the linear equation system 2.17. The time of maneuver, tf is the time at end state of the

trajectory, which is sampled within an interval of [tfmin:tfmax], to generate a spread with an amount of

Ntraj trajectories with different end positions xf. The trajectory set is generated as local displacements

for each replanning cycle, where the start time t0 and start position x0 are always initialized as zero.

The initial velocity ˙x0and initial acceleration ¨x0are achieved at the time instant from the trajectory of

previous replanning cycle. The acceleration, ¨xf at final state is assumed to be zero. The final velocity ˙xf

is the desired velocity of the maneuver. The global displacement is updated every replanning cycle, where the end position of previous time step is added on the local displacement vector, since it is initialized to zero.

Polynomial Calculation

The provided start points and endpoints is used to solve the linear equation system 2.17 to obtain the parameter vector [a0, a1, a2, a3, a4]T. Thereafter is the parameter vector used as input for the polynomial

calculations, equation 2.13-2.15. This subsystem gives a set of trajectories as outcome. Each obtained parameter vector for each sampled tf, results in one trajectory within the set. With the sampling of tf,

a complete trajectory set is generated. Since the trajectory set has varying tf to reach the final velocity

and final acceleration, the displacement vectors will have different lengths, see figure 4.2. To be able to compare all the trajectories for the trajectory selection, the trajectory set should all have equal length corresponding to a common time horizon. The short trajectories are extended with a constant velocity model to retain the desired velocity and the long trajectories are truncated to have the same time horizon length, see figure 4.3.

4.4.2

Trajectory Selection

Dynamic Constraints Check

The dynamic constraints are considered for velocity and acceleration, see equation 4.1 and equation 4.2. By minimizing the end time tf to reach the final desired velocity ˙xf, an overshoot might occur on the

(36)

Figure 4.2: Generated trajectory set with different prediction horizon, before truncating and extending the trajectories to a common prediction horizon of 3s.

Figure 4.3: Generated trajectory set with a common prediction horizon of 3s.

velocity profile and a maximum allowed velocity must be restricted. The minimum velocity should not allow a negative value, since the vehicle should allow break but not a movement in the opposite direction. With different road conditions, the maximum acceleration must be restricted to avoid slip and achieve a dynamic feasible trajectory. The maximum acceleration and decceleration for each road condition is achieved from the friction coefficient between the road and the tire multiplied by the gravity, according to the physic law of tire-road contact, see equation 4.3.

vmin< v < vmax (4.1)

− amax< a < amax (4.2)

(37)

amax= µg (4.3)

The icy road has the most strict acceleration constraint, hence also the lowest maximum acceleration. The dry road has the least strict acceleration constraint and thereby the highest maximum acceleration. The trajectories that exceeds these dynamic constraints, are removed from the set, see figure 4.4. If the complete set is invalid, the action plan is to finish to the on going planning cycle by using the previous generated trajectory for next time step and thereafter stop the overtaking attempt by emergency break to zero.

Figure 4.4: The same trajectory set from figure 4.3, where the light green trajectories are within the dynamic constraints which represents the dynamic feasible trajectories. The colorful trajectories are invalid.

Prediction of Observed Vehicle, Collision Check

The initial value for the prediction of the observed vehicle are collected from the ground truth for each planning cycle. Thereafter are the prediction models used to predict the observed vehicles motion. Since only longitudinal motion is considered, a collision can only occur in the merging point. The distance from the ego vehicle to the merging point is therefor measured for each sample time. If any of the ego vehicles generated trajectories reaches the merging point within its prediction horizon, the collision check at the merging point is performed. The observed vehicle might be behind the ego vehicle at that time instance and has therefor a prediction horizon that is longer than the prediction horizon of the ego vehicle. The collision check is acceptable if equation 2.10 holds true. For each collision checked trajectory, the distance between the ego vehicle and the predicted observed vehicle is checked at the time the ego vehicle reaches the merging point. This means the collision check is only performed to remove the trajectories, within a trajectory set, that leads to a possible collision at the merging point. The first 0.1s of the local predicted motion will be added on the global predicted displacement. If the complete trajectory set is invalid, the action plan here is the same as when the complete trajectory set is dynamic infeasible, emergency break to zero.

Single Trajectory Selection

The time horizon is the same for all trajectories. Therefore, the trajectory with largest end position will be the fastest one. The fastest trajectory will also reach the merging point the fastest, which will be the trajectory with fastest travel time. Travel time is therefor the cost function and the final selected trajectory have the minimum travel time. When selecting the final trajectory, the remaining trajectories in the set are all valid since the dynamic constraint check and collision check is performed. Hence, the final selected trajectory is the fastest allowed trajectory, see figure 4.5.

(38)

Figure 4.5: The light green trajectories are valid, the other colorful trajectories are invalid and the pink thicker trajectory is the final selected trajectory.

4.5

Outcome scenarios of the planner

The outcome scenarios were defined from the conceptual design, section 4.3. When the final trajectory was achieved, the results were analyzed to identify the outcome scenario and thereby extract the travel time. Seen in figure 4.6, there are four possible outcome scenarios handled in the trajectory planning algorithm that will further be described more in detail.

Figure 4.6: Outcome scenarios of the planner.

Invalid trajectory set, dynamic infeasible

In the planning algorithm there are several dynamic constraints set to ensure dynamic feasibility, see equation 4.1 and equation 4.2. If all the trajectories within a set exceeds these dynamic constraints, it will lead to a complete invalid trajectory set, which leads to case (a) in figure 4.6. As mentioned in section 4.3 a simple action plan is handled, where the ego vehicle immediately applies emergency break. This case implies that the overtaking was stopped, hence the travel time for case (a) is not of interest.

Invalid trajectory set, no collision free trajectories

The planner generates multiple trajectories that passes the collision check, if the merging point is detected within the prediction horizon of the ego vehicle. If all trajectories in the generated trajectory set fails the collision check, the outcome will be a complete invalid trajectory set, case (b) in figure 4.6. The

(39)

action plan is the same for case (a) and (b), emergency break. In a real life scenario, when the planner detects no collision free trajectories, there should be a more complex action plan in order to not take that safety risk. The action plan is not the focus of this study, since the main study handles the trajectory generation of an overtaking, hence the action plan is execution of emergency break to avoid the collision. Similar to case (a) the travel time for case (b) is not of interest, since the overtaking maneuver was stopped.

Collision free overtaking

When the trajectory planner generates a collision free overtaking, case (c) in figure 4.6, it can be an easy or challenging overtaking scenario for the planner. Easy planned means that the distance between the vehicles at the merging point is large, hence much larger than the parameter saf etygap in equation 2.10. This means that during an easy planned overtaking, all of the trajectories within a set has successfully passed the collision check, thus all will be valid. A challenging overtaking for the planner implies that the distance between the vehicles at the merging point is close to the saf etygap. It is therefor more likely that the trajectories within a set, has potential failed collision checks. To identify if the generated collision free trajectory was an overtaking, the ego vehicle must be ahead of the observed vehicle at the merging point.

No overtaking but collision free trajectory

When a collision free trajectory is generated it does not have to imply that there was an overtaking. If the observed vehicle is ahead of the ego vehicle at the merging point, the final collision free trajectory is identified as ”no overtaking”, case (d) in figure 4.6. Similar to case (c), the final trajectory in (d), could also be an easy or challenging scenario for the planner.

4.6

System performance

The mean absolute percentage error (MAPE) for each prediction model is calculated for the observed vehicles predicted motion against the simulated ground truth of the observed vehicle. This method is commonly used in statistic to measure the accuracy of a forecast system. The accuracy is presented in percentage, extracted by equation 4.4.

M = 1 n n X t=1 At− Ft At (4.4) The variable Atis the ground truth value, Ftis the predicted value and n is the number of the fitted

points. The variable t represents the time element of the fitted point.

To verify if the prediction models are accurate enough for the trajectory planning algorithm, the final trajectory of the ego vehicle needs to be validated with ground truth of the observed vehicle to ensure if the final real outcome lead to a collision or not. With Monte Carlo simulation, a scenario can be repeated multiple times with random motion. Monte Carlo simulation will give an output of collision rate for each prediction model, which verifies the safety of the proposed algorithm. For each scenario that did not lead to a collision, it is also possible to extract the travel time.

(40)
(41)

Chapter 5

Results

This chapter presents the results of the trajectory planning algorithm and answers the research question. The performance of the proposed algorithm is validated by investigating the safety, which is presented in the end of this chapter.

Three random sampled scenarios of the simulated observed vehicles motion were saved to use for evaluation of the planner, the scenarios and its results will in this chapter be presented for each of the road conditions and prediction models. The three scenarios were chosen with dry road condition as reference, where scenario 1 is identified as easy planned overtaking, scenario 2 as challenged planned overtaking and scenario 3 as challenged planned but no overtaking. A validation is presented in the end of this chapter, where the collision probability with the ground truth is provided.

5.1

Scenario 1

5.1.1

Dry road

It can be seen in table 5.1 and in figure 5.1 that the motion of the observed vehicle gives the same travel time for all the prediction models and that the planner generated the same final trajectory. Since the ego vehicle reaches the merging point before the observed vehicle it means that the ego vehicle is ahead at the merging point, which implies that the planner generated an overtaking maneuver for all of the prediction models.

Figure 5.1: Merging point at 100 m, for CV, CA and IDM. Scenario 1 on dry road.

(42)

Prediction Model CV CA IDM Travel Time [s] 9.5010 9.5010 9.5010 Percentage Error [%] 0.0056 0.0021 0.0259

Table 5.1: Result for scenario 1 on dry road.

5.1.2

Wet road

It is seen in figure 5.2 and table 5.2 that the final trajectory was an overtaking for all of the prediction models. However the travel time during wet road condition is larger in comparison to the travel time during dry road condition.

Figure 5.2: Merging point at 100 m, for CV, CA and IDM. Scenario 1 on wet road.

Prediction Model CV CA IDM Travel Time [s] 9.7010 9.7010 9.7010 Percentage Error [%] 0.0056 0.0021 0.0153

Table 5.2: Result for scenario 1 on wet road.

5.1.3

Icy road

In figure 5.3 and table 5.3 it is seen that the planner generates the same overtaking trajectory for the prediction models CA and IDM. The values on the travel time for CA and IDM are larger than the travel time for dry and wet road. The planner detected a collision with prediction model CV, where the complete trajectory set is invalid and the action plan of emergency break was applied. However, there were no dynamic feasible trajectories allowing the action plan, hence no final trajectory was generated by the planner.

Prediction Model CV CA IDM Travel Time [s] - 10.3250 10.3250 Percentage Error [%] - 0.0021 0.0099

Table 5.3: Result for scenario 1 on icy road.

References

Related documents

Although a lot of research on gender mainstreaming in higher education is being done, we know little about how university teachers reflect on gender policies and their own role when

1) According to Nozick, an aquisition is just if it is in accordance with modified Lockean principle of aquisition. No other restrictions are justified. But due to

However, the same velocity sets could also be used for a binary mixture with mass ratio 3 of polyatomic molecules with two internal energy levels E and 2E (heavy species), and E and

The notion of supernormal models was introduced for binary mixtures by Bobylev and Vinerean in [13] (see Sect. 3), and denotes a normal discrete velocity model, which is normal

Men när allt kommer omkring så handlar den här likhet- en inte om att de har svårt att skilja på könen, det vill säga misstar kvinnor för män, utan pro- blemet verkar vara

segregate whenever the user uses a different type of transport. These ANNs or traditional classifiers, all use some type of classifying algorithm, e.g. Random Forest, Decision Trees,

Emojis are useful and efficient tools in computer-mediated communication. The present study aims to find out how English-speaking Twitter users employ five specific emojis, and if

Av sammanlagt 66 olika sorters smilisar är hela 52 kategoriserade som liggande. Det är alltså en övervikt på liggande smilisar både när det gäller totalt antal och antal olika