• No results found

Development of a Driver Model for Vehicle Testing

N/A
N/A
Protected

Academic year: 2021

Share "Development of a Driver Model for Vehicle Testing"

Copied!
107
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Development of a Driver Model for Vehicle Testing

Examensarbete utfört i Reglerteknik vid Tekniska högskolan vid Linköpings universitet

av

Andreas Jansson & Erik Olsson

LiTH-ISY-EX--13/4728--SE

Linköping 2013

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

Development of a Driver Model for Vehicle Testing

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköping

av

Andreas Jansson & Erik Olsson

LiTH-ISY-EX--13/4728--SE

Handledare: Mattias Hjort

vti, Linköping

Jonas Linder

isy, Linköpings universitet

Examinator: Daniel Axehill

isy, Linköpings universitet

(4)
(5)

Avdelning, Institution Division, Department

Division of Automatic Control Department of Electrical Engineering Linköpings universitet

SE-581 83 Linköping, Sweden

Datum Date 2013-10-10 Språk Language  Svenska/Swedish  Engelska/English   Rapporttyp Report category  Licentiatavhandling  Examensarbete  C-uppsats  D-uppsats  Övrig rapport  

URL för elektronisk version

http://www.control.isy.liu.se http://www.ep.liu.se ISBNISRN LiTH-ISY-EX--13/4728--SE Serietitel och serienummer Title of series, numbering

ISSN

Titel Title

Framtagning av förarmodell för fordonstester Development of a Driver Model for Vehicle Testing

Författare Author

Andreas Jansson & Erik Olsson

Sammanfattning Abstract

The safety requirements for vehicles are today high and they will become more stringent in the future. The car companies test their products every day to en-sure that safety requirements are met. These tests are often done by professional drivers. If the car is tested in an everyday traffic situation, a normal experienced driver is desired. A drawback is that a human will eventually learn the manoeuvre he/she is told to do. An artificial driver is therefore to prefer to make the test repeatable.

This thesis’ purpose is to develop and implement an artificial driver as a con-troller in order to follow a predefined trajectory. The driver model’s performance driving a double lane change manoeuvre should be as close to a real driver’s as possible.

Data was gathered by inviting people to drive in a simulator. The results from the simulator tests were used to implement three different drivers with different experiences. The gathered data was used to categorize the test drivers into differ-ent driver types for each specific velocity by using the vehicle position from the test results. This thesis studies the driver from a controller’s perspective and it resulted in two implemented controllers for reference tracking.

The first approach was a Model Predictive Controller with reference tracking and the other approach was to use a FIR-filter in order to describe the drivers’ characteristics. A vehicle model was implemented in order to do the double lane change manoeuvre in a simulation environment together with the implemented driver model.

The results show that the two approaches can be used for reference tracking. The MPC showed good results with the recreation of the test runs that were made

by the categorized drivers. The FIR-filter had problems to mimic the drivers’

test runs and their characteristics. The advantage with MPC is its robustness, while the advantages with the FIR-filter are its, in comparison, simplicity in the implementation and the algorithm’s low computational cost. In order to make the FIR-filter more robust, some improvements have to be made. One improvement is to use gain scheduling in order to adjust the filter coefficients depending on the velocity.

Nyckelord

(6)
(7)

Abstract

The safety requirements for vehicles are today high and they will become more stringent in the future. The car companies test their products every day to en-sure that safety requirements are met. These tests are often done by professional drivers. If the car is tested in an everyday traffic situation, a normal experienced driver is desired. A drawback is that a human will eventually learn the manoeuvre he/she is told to do. An artificial driver is therefore to prefer to make the test repeatable.

This thesis’ purpose is to develop and implement an artificial driver as a con-troller in order to follow a predefined trajectory. The driver model’s performance driving a double lane change manoeuvre should be as close to a real driver’s as possible.

Data was gathered by inviting people to drive in a simulator. The results from the simulator tests were used to implement three different drivers with different experiences. The gathered data was used to categorize the test drivers into different driver types for each specific velocity by using the vehicle position from the test results. This thesis studies the driver from a controller’s perspective and it resulted in two implemented controllers for reference tracking.

The first approach was a Model Predictive Controller with reference tracking and the other approach was to use a FIR-filter in order to describe the drivers’ characteristics. A vehicle model was implemented in order to do the double lane change manoeuvre in a simulation environment together with the implemented driver model.

The results show that the two approaches can be used for reference tracking. The MPC showed good results with the recreation of the test runs that were made by the categorized drivers. The FIR-filter had problems to mimic the drivers’ test runs and their characteristics. The advantage with MPC is its robustness, while the advantages with the FIR-filter are its, in comparison, simplicity in the implementation and the algorithm’s low computational cost. In order to make the FIR-filter more robust, some improvements have to be made. One improvement is to use gain scheduling in order to adjust the filter coefficients depending on the velocity.

(8)
(9)

Sammanfattning

De säkerhetskraven som idag ställs på fordon är höga och det kommer bli mer strikt i framtiden. Bilföretag testar sina bilar varje dag för att se om komponenterna och bilen klarar säkerhetskraven som ställs. Till dessa tester används professionella testförare. I en vardaglig trafiksituation är det önskvärt att en normalt erfaren bilförare utför testen. En mänsklig förare kommer använda sin inlärningsförmåga vid repeterande manöver, vilket inte är önskvärt. En artificiell förare är därför att föredra. Den artificiella föraren ska köra så likt en verklig förare som möjligt vid en "double lane change"- (DLC) manöver.

Detta examensarbete har som avsikt att implementera en förare som en regu-lator för att kunna följa en förutbestämd trajektoria på samma sätt som en verklig förare. I detta examensarbete har "DLC"-manövern studerats.

I examensarbetet har insamlad data från testförare använts för att kunna imple-mentera tre olika förartyper med olika erfarenheter. Den insamlade datan användes till att kategorisera testförarna för varje särskild hastighet. Två tillvägagångssätt har gjorts med föraren, en där föraren är en modellbaserad prediktionsregulator med referensignalsföljning (MPC) och en där föraren implementeras som ett änd-ligt impulssvarsfilter (FIR-filter). En fordonsmodell har implementerats för att en "DLC"-manövern ska kunna testas i en simuleringsmiljö.

Resultaten blev att de två metoderna klarade av referensföljningen. MPC:n var bra på att återskapa testförararnas körningar. FIR-filtret hade problem med att härma förarnas körningar och deras karaktäristik. Fördelen med MPC är dess robusthet och fördelen med FIR-filtret är dess, i jämförelse, simplicitet vid imple-mentering samt den låga beräkningskostnaden för algoritmen. För att göra FIR-filtret mer robust måste förbättringar göras. En förbättring är att använda gain scheduling för att anpassa filterkoefficienterna beroende på hastigheten.

(10)
(11)

Acknowledgments

We want to send big thanks to the thesis’ examiner Daniel Axehill at Linköpings University and the supervisors Jonas Linder at Linköping University and Mattias Hjort at VTI for the contributing discussions and guidance. Thanks to all test drivers that participated with the test drives in the simulator.

Furthermore, we would like to thank the FTS group at VTI for many interesting discussions and laughs throughout the thesis. Finally, we would like to thank our families and friends for their support, making our studies at the university so much better than we ever could expected.

Andreas Jansson & Erik Olsson

Linköping, October 2013

(12)
(13)

Contents

Notation xiii 1 Introduction 1 1.1 Background . . . 1 1.2 Purpose . . . 2 1.3 Objective . . . 2

1.4 The Thesis’ goals . . . 2

1.5 Related and Previous Work . . . 3

1.5.1 Vehicle model . . . 4 1.5.2 Driver Model . . . 4 1.6 Thesis Outline . . . 6 2 Vehicle Model 7 2.1 Steering Dynamics . . . 7 2.2 The Tyres . . . 9

2.3 Results and Discussion for Vehicle Model . . . 9

3 Test Drives and Data Gathering 15 3.1 Test Specification . . . 15

3.2 The Test Drivers . . . 16

3.3 Results and Discussion for the Simulator Tests . . . 18

4 Driver Type Modeling 23 4.1 The Driver Types . . . 23

4.2 Categorizing the Drivers . . . 24

4.3 Reference Trajectories . . . 28

4.4 Discussion of the Driver Type Modelling . . . 31

5 MPC as a Driver 33 5.1 The Driver’s Vehicle Model . . . 33

5.2 Model Predictive Control . . . 35

5.2.1 Implementing the MPC as a Driver . . . 36

5.3 Results for the MPC as a Driver . . . 38

5.3.1 MPC Drivers at 45 km/h . . . 38

5.3.2 MPC Drivers at 50 km/h . . . 41

(14)

xii Contents

5.3.3 MPC Drivers at 55 km/h . . . 43

5.3.4 MPC Drivers at 60 km/h . . . 46

5.4 Discussion of the MPC as a Driver . . . 48

6 FIR-Filter as a Driver 51 6.1 FIR-Filter as a Driver . . . 51

6.2 Results for the FIR-filter as a Driver . . . 53

6.2.1 FIR-Filters Drivers at 45 km/h . . . 56

6.2.2 FIR-Filters Drivers at 50 km/h . . . 59

6.2.3 FIR-Filters Drivers at 55 km/h . . . 61

6.2.4 FIR-Filters Drivers at 60 km/h . . . 63

6.3 Discussion of the FIR-filter as a Driver . . . 65

7 Summary 67 7.1 Conclusion . . . 67

7.2 Future Work . . . 68

Appendix A Hardware 73

Appendix B The Vehicle Model 74

Appendix C Tyre Dynamics 78

Appendix D The Driver’s Vehicle Model 83

Appendix E MPC 85

(15)

Notation

Abbreviations

Abbreviation Meaning

VTI The Swedish National Road and Transport Research

Institute

DLC Double Lane Change

IMU Inertial Measurement Unit

MPC Model Predictive Control

FIR Finite Impulse Response

PID Proportional-Integral-Derivative

(16)
(17)

Chapter 1

Introduction

Traffic safety is a frequently discussed subject due to all the accidents that happen every day. To decrease the number of accidents, the automotive engineers and designers of vehicle safety systems have to understand how a driver reacts in a critical situation. The interaction between the driver and vehicle can be analysed if it is possible to do an accurate simulation of the human driving behaviour. A drive simulator can be used for this purpose, which is positive in both an economical and a safety perspective compared to if the tests were done with real vehicles.

1.1

Background

An important field of study is the one on the steering of the driver. This includes the study on how a driver reacts when he/she has to do a evasive manoeuvre [21]. There are two types of testing to assess vehicle handling: open-loop and

closed-loop. The time trajectories of inputs are predefined in an open-loop test, which

make them independent from the response of the vehicle, e.g., J-turn and fishhook. These kinds of tests are performed with no feedback, i.e., the test relies on the input data to the system. These tests can be done by a car driving robot with high repeatability. During a closed-loop test, the vehicle needs to navigate through a predefined path with acceptable accuracy. This is however more demanding since a control algorithm will be needed to approximate human drivers’ actions. There is also a need of a reliable road-sensing system, which can be quite expensive. This is why car companies often use professional drivers in closed-loop tests [2, 21].

A vehicle test can be categorized into two types: an expected and a non-expected. A non-expecting test can be an evasive manoeuvre because an animal crosses the road. An expected test is, e.g., when the driver is told to do a U-turn on a predefined path. If a car company wants to test the performance of a vehicle in a normal situation, they rather use an average driver to be sure the situation is close to a realistic scenario in traffic. The downside of using an average driver is his/her ability to make progress the more he/she does the test, which gives a misleading test result. This can be prevented by having many test drivers to take the test. However, this can result in too big deviations in the test result.

(18)

2 Introduction

These downsides are eliminated by using a model of a driver in a robot [2, 21]. The Swedish National Road and Transport Research Institute, VTI, in Linköping Sweden has a robot which can be used for steering and accelerating/braking a car and the company wants a software implemented in order to make this robot’s driving performance close to a real human driver’s. This task provided the basis for this thesis work. This thesis work demands prerequisites in modelling, control theory and programming.

1.2

Purpose

The purpose of this thesis work was to develop a driver model that can be used in a closed-loop test to evaluate vehicle performance for drivers with different experiences.

1.3

Objective

The objective was to develop and implement a model of the human driver in a controller which controls a vehicle driving robot. The robot is supposed to drive the car similar to how a human driver would drive along a predefined trajectory which in this thesis work will be the double lane change (DLC), seen in Figure 1.1. This corresponds to an expected test because the track is known by the driver when he/she begins the test.

Figure 1.1: The double lane change manoeuvre

1.4

The Thesis’ goals

The thesis’ objective described above can be divided into sub-goals in order to get a brief overview over this thesis.

(19)

1.5 Related and Previous Work 3

Objective

The sub-goals tasks have to be done to make sure the objective of this thesis is fulfilled:

• Implement a vehicle model which later can be used for testing the driver model.

– Find a proper vehicle model in literature. – Implement the model in Matlab/Simulink.

– Validate the model with the existing model that is implemented in one

of VTI’s driving simulators.

• Gather test data from a driving simulator at VTI. This data will be used to study the steering action of a person and how he/she positions the vehicle when doing a DLC.

– Invite people to VTI.

– Give instructions on how the test shall be performed to the invited test

drivers and make sure they understand the information.

– Make sure the test drivers successfully complete the DLC manoeuvre

for the given velocity in order to get good data for the driver model.

• Use the data in order to categorize the drivers and create reference trajecto-ries for these drivers at a given velocity.

– Use the data considered as "good" from the test drivers. This data is the

test runs where the drivers successfully performed the DLC manoeuvre, i.e., a manoeuvre without any cone hits.

– The good data is used to divide the drivers into three types:

experi-enced, inexperienced and moderately experienced.

– Create a reference trajectory for the vehicle placement during the DLC

manoeuvre given a driver and velocity.

• Implement a controller for reference tracking that uses a simulated trajectory for a driver and velocity.

– Do a literature study in order to find a proper reference tracking

algo-rithm.

– Implement the chosen algorithm in Matlab/Simulink.

– Validate and tune the controller until it works without any errors.

1.5

Related and Previous Work

This section gives brief information about related and previous work done within the important parts in this thesis.

(20)

4 Introduction

1.5.1

Vehicle model

The literature in the field of vehicle dynamics today is vast. The question when modelling a vehicle is how much of the vehicle’s behaviour that must be included in the vehicle model. The more dynamics included in the model, the more complex it gets. There is well written literature about the steering and wheel dynamics, which are the most important factors in this thesis. The steering dynamics are well discussed in Sharp et al. [20] where a ten state nonlinear state space model for the steering dynamics is used. A simpler model can be used by studying the bicycle

model which is a simplified vehicle model with two wheels only [4]. Keen and Cole

[7] discuss how the vehicle can be described with a bicycle model which captures the vehicle dynamics quite well. The tyre’s dynamics must be well modelled with longitudinal and lateral forces combined with slip in order for the model to react normal in a situation as described in Figure 1.1. Pacejka and Besselink [14] have done a deep study in wheel dynamics and use the Magic formula to describe the relation between the slip of the tyres and the forces that are generated by them.

1.5.2

Driver Model

The driver modelling can be quite complex depending on which driver character-istics the model must handle. As discussed in Benderius [2], there are different model perspectives that can be identified when modelling a driver. The two most significant perspectives are the control perspective and the cognitive perspective.

The Control Perspective

In this perspective, the human driver can be seen as a controller. The human estimates "control inputs" (vehicle position, distance to other drivers etc.) with his/her senses, where the eyes are most important. The human uses the informa-tion from the senses to control the vehicle with his/her hands and feet to be sure that the vehicle’s velocity and position is good in regard of the road and other drivers.

The steering action is an important part when modelling the driver, which is well discussed in Ungoren and Peng [21], Benderius [2], Plöchl and Edelmann [15], Prokop [17] where the authors use the situation described in Figure 1.2. The figure shows how the vehicle is located a distance d from the trajectory and the angle between the vehicle heading and the tangent of the trajectory is β. An experienced driver would want to minimize these variables, which is what the authors do in different manners using penalty functions or parameter estimation and optimization. How to determine the driver model parameters is discussed in Renski [19], where the author optimizes a driver by using collected data from simulations. The optimal control signal can be calculated by minimizing a local performance index over a preview interval given a dynamic linear system, which is discussed by the authors in MacAdam [11]. In MacAdam [12] the author discusses how the controller in MacAdam [11] can be used for simulations of closed-loop automobile driving. A more complex approach is suggested in Cole [4], where the neuromuscular dynamics are studied when the driver puts torque on the steering

(21)

1.5 Related and Previous Work 5

wheel to navigate the vehicle. The control perspective seems to be the most studied one, probably because it is all based on control theory which has been well studied the last 100 years.

30

β d

Figure 1.2: A vehicle that is located on a distance d from the road path with a difference between the road path tangent and the vehicle’s heading β.

The Cognitive Perspective

This perspective looks on how it is possible to create a model over the human mind. This is far more difficult than the control perspective because little is known about how the human mind works. In Wann and Wilkie [23], the authors ask: how do we judge a bend? The authors discuss how the retinal flow varies on the visual direction whether the driver is heading in a straight line or is in a curve. The vi-sual direction is here defined as the angle between the vehicle’s yaw angle and the driver’s gaze. The proposed model tries to accomplish two things: minimizing the movement of visual direction and minimizing the rotation in the retinal flow. A phenomenon called looming is discussed in Li and Milgram [9], which means when a driver is in collision course with an object, the object will expand symmetrical in the drivers field of view, which can trigger reflexes. In MacAdam [13], the author discusses the importance of the human time delay and threshold limitations, e.g., a human can feel 0.005g linear accelerations. A model done by the cognitive per-spective is a good way to complete a model done by, e.g., the control perper-spective, but it is hard to use it in a standalone fashion [2].

(22)

6 Introduction

1.6

Thesis Outline

This thesis is divided in 7 chapters. Chapter 2 describes how the vehicle model works and how it was implemented. A validation of the vehicle model is presented in the same chapter where some of the dynamics are compared with the dynamics from a model which is implemented in a simulator at VTI. The results from the simulations with the test drivers and how the tests were done are presented and discussed in Chapter 3. Chapter 4 covers the categorization of the driver based on the test results and how the results can be used to build new trajectories. The driver modelling using an MPC approach is covered in Chapter 5 and the driver modelling with a FIR-filter approach is presented in Chapter 6. These two chapters also cover the control theory which is needed to create the driver model together with the simulation results for respectively driver. Chapter 7 summarizes the thesis with the conclusions of this thesis and possibilities for improvements and future work.

(23)

Chapter 2

Vehicle Model

This chapter contains a description of the implemented vehicle model. The vehicle model consists of two modelled parts: The steering dynamics and the tyres. The Figures 2.1 and 2.2 show the forces and states for the four-wheeled vehicle. Fig-ure 2.1 shows the modelled vehicle from the side where the distances from the axis to the centre of gravity can be seen. The h0s in the figure are the distances to the

roll axis which are used to calculate the vertical load, Fz in Figure 2.2. The

defi-nition of the roll axis is where the chassis wants to roll. Other vertical forces, e.g., the forces from the weight transfer of the chassis due to the roll and suspension, are neglected. Figure 2.2 shows the vehicle model from above. The vertical and lateral forces, Fx and Fy, are calculated by using the slip of the vehicle. Unlike

the assumption of constant roll angle of the vehicle, the yaw angle and yaw rate are included as states in the vehicle model.

2.1

Steering Dynamics

The steering dynamics are modelled as in Sharp et al. [20] where the authors use a model with ten states. The ten states are listed in Table 2.1.

Table 2.1: The Vehicle Model’s States

State number Quantity Unit

x1 Yaw Angle [rad]

x2 Yaw Rate [rad/s]

x3 Longitudinal Velocity (local reference system) [m/s]

x4 Lateral Velocity (local reference system) [m/s]

x5 Longitudinal Position (global reference system) [m]

x6 Lateral Position (global reference system) [m]

x7 Rear Wheels Angular Position [rad]

x8 Rear Wheels Angular Velocity [rad/s]

x9 Front Wheels Angular Position [rad]

x10 Front Wheels Angular Velocity [rad/s]

(24)

8 Vehicle Model

This model includes lateral and longitudinal forces on the front and rear of the vehicle together with airdrag and downforce. The model also includes the front and rear axle torque. All the equations handling the steering dynamics can be found in Appendix B. Frz Frx Ffx Ffz Fax Roll axis Faz Jm Jr Jf x9,x10 x7,x8 lr lf df dr Tr hrr hrf Tf M g G hg

Figure 2.1: The vehicle seen from the side with the states and forces.

Frx Fry Ffx Ffy tf δ Wb tr M,Iz,G x3 x4 x6 x5 x1,x2 1 2 3 4

(25)

2.2 The Tyres 9

2.2

The Tyres

The tyres have been modelled as in Pacejka and Besselink [14] where the Magic

Formula is used in order to determine the lateral and longitudinal forces on the

tyres given the angular slip. The angular slip αf for the front tyres and αr for the

rear tyres are calculated as

αf = −δ + arctan ( x4+ lfx2 x3 )180 π (2.1) and αr= arctan ( x4− lrx2 x3 )180 π (2.2)

where δ is the resulting turn in degrees from the steering wheel action. All the equations handling the tyres’ dynamics can be found in Appendix C. Figure 2.3 shows a typical Magic Formula-curve. The force is zero when the slip angle is zero for the normal case, but the curve can be used to initiate rolling resistance by lowering the curve or by moving it more to the right. This means when the vehicle has zero slip, i.e., when the vehicle is rolling and the driver does not step on the gas or brake, the vehicle will decelerate slightly.

−100 −80 −60 −40 −20 0 20 40 60 80 100 −3000 −2000 −1000 0 1000 2000 3000 Longitudinal slip [%] Force [N]

Longitudinal forces from longitudinal slip

Figure 2.3: An example of the Magic Formula from a simulation done on the modelled vehicle. This curve shows how the force is equal to zero when the slip is zero.

2.3

Results and Discussion for Vehicle Model

The vehicle model implemented is used together with the driver model for validat-ing if the artificial driver behaves like a real driver. A validation is done with the vehicle model in the driving simulator to ensure the modelled vehicle’s dynamics

(26)

10 Vehicle Model

behaves in a satisfactory manner. The model in the simulator was used for the data gathering so the importance of the two vehicle models giving similar results is crucial. The implemented model is validated by using the same initial states and front wheel angle as the simulator model. There is no braking and the clutch is pressed down so no torque is applied to the wheels from the powertrain. The steering wheel angle for the manoeuvre can be seen in Figure 2.4. The driver is turning the vehicle to the right and then a longer turn to the left. There is no major steering after three seconds.

10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 Time

Steering wheel angle [rad]

Figure 2.4: The steering wheel angle for the validation. This is the input for the vehicle model which shows how the driver wants to steer the vehicle.

The different approaches for modeling the tyres are the main reason why the dynamics for the modelled vehicle differ from the dynamics for the vehicle model in the simulator. The tyres used in this thesis are modelled in pairs, the front tyres and the back tyres, while each tyre in the simulator model is modelled individu-ally. The model in this thesis has two longitudinal and two lateral forces for the front and rear axis (Ff x, Frx, Ff y and Fry in the Figures 2.2 and 2.1). The DLC

manoeuvre exposes the tyres to great forces due to the fast steering movements from the driver. The equations for the longitudinal and lateral forces take several quantities into consideration, e.g., the slip angle and normal force on each tyre. The vehicle model used in this thesis does not take roll into consideration. The roll for the vehicle will create bigger down force on the tyres located on the opposite side from which the vehicle is steering, e.g., the tyres on the right hand side will feel a bigger down force if the vehicle is steering left. This will make the yaw rate bigger for the model taking roll into consideration due to the extra down force making the other side of the vehicle steer faster thanks to the friction.

The comparison between the two models are shown in Figures 2.5 and 2.6. Fig-ure 2.5 shows the velocities of the vehicle during the manoeuvre where the steering wheel angle described in Figure 2.4 was used. Figure 2.6 shows the longitudinal, lateral and yaw accelerations of the vehicle during the same manoeuvre.

The difference in yaw rate between the two models brings differences in the longitudinal and the lateral acceleration. The equations for the longitudinal ac-celeration ax and the lateral acceleration ay which are used in this vehicle model

(27)

2.3 Results and Discussion for Vehicle Model 11

and the one in the simulator can, e.g., be found in Wong [24] and are calculated as

ax= ˙Vx− Vyz (2.3)

and

ay= ˙Vy+ Vxz (2.4)

where Ωz is the yaw rate. The fact one model includes roll and the other does

not results in different yaw rates between the two models, as discussed above. Equations (2.3) and (2.4) will therefore calculate accelerations that will differ between the two models. This will also result in a difference between the two models’ longitudinal and lateral velocity. This may be the biggest reason why the curves differ in the Figures 2.5 and 2.6.

0 2 4 6 8 10 12 14 16 18 20 19 20 21 22 23 Longitudinal velocity Time Velocity [m/s] Simulator Model Implemented Model 0 2 4 6 8 10 12 14 16 18 20 −2 −1 0 1 2 Lateral velocity Time Velocity [m/s] Simulator Model Implemented Model 0 2 4 6 8 10 12 14 16 18 20 −0.5 0 0.5 Yawrate Time Yawrate [rad/s] Simulator Model Implemented Model

Figure 2.5: The longitudinal, lateral and angular velocities for the implemented vehicle model and the model used in the simulator. This is the result from a test where the driver steps on the clutch at 80 km/h and has the steering wheel angle shown in Figure 2.4.

(28)

12 Vehicle Model 0 2 4 6 8 10 12 14 16 18 20 −0.6 −0.4 −0.2 0 0.2 Longitudinal acceleration Time Acceleration [m/s 2] Simulator Model Implemented Model 0 2 4 6 8 10 12 14 16 18 20 −10 −5 0 5 10 Lateral acceleration Time Acceleration [m/s 2] Simulator Model Implemented Model 0 2 4 6 8 10 12 14 16 18 20 −3 −2 −1 0 1 2 Yaw acceleration Time

Yaw acceleration [rad/s

2]

Simulator Model Implemented Model

Figure 2.6: The longitudinal, lateral and angular accelerations for the implemented vehicle model and the model used in the simulator. This is the result from a test where the driver steps on the clutch at 80 km/h and has the steering wheel movement shown in Figure 2.4.

The reason why the model in the simulator could not be used from the begin-ning was because the model was originally written in the programming language

Fortran. There was however one person at VTI who worked with the interpreting

of the Fortran code to the Matlab/Simulink environment. This person managed to finish this interpretation at the same time as the implementation of the vehicle model in this thesis was finished. This made it possible to do a validation of this thesis’ model with the interpreted model, which was validated with the Fortran model in the simulator. The interpreted model was chosen for further work even though the two models had similar dynamics. This model was chosen because it is implemented in the simulator which was used for the data gathering described in Chapter 3. The model implemented in this thesis shows the possibility to use a simpler model for this problem formulation.

An even simpler approach could have been done if a bicycle model would have been used instead, e.g., the one found in [20]. This would have saved some time

(29)

2.3 Results and Discussion for Vehicle Model 13

because of the model’s simplicity. However, using a bicycle model may not be enough for covering all the vehicle’s dynamics in a satisfactory manner.

The biggest differences between the implemented model and the model in the simulator, besides how the tyres were modelled and the omission of the roll, are:

• The model in the simulator includes the dynamics of the engine and power-train and calculates the torque on each tyre given the throttle position. The modelled vehicle has the front and rear axle torque as known inputs.

• The simulator model includes the suspension on each wheel. This feature is not included in the modelled vehicle.

• Besides the roll of the vehicle, the vehicle model in the simulator also takes the pitch of the vehicle into consideration.

Another physical quantity left out in the implemented model is the camber angle of the vehicle’s tyres. The camber angle can be seen in Figure 2.7 where the camber angle is the angle between the normal of the surface and the tyre. The vehicle’s forces would have been greater if the camber angle would have been taken into consideration. This can bee seen in, e.g., (C.5) (Appendix C) for the lateral force, where the term SV y depends on the camber angle γ.

Figure 2.7: One of the vehicle’s tyres. The Camber angle is the angle between the normal of the surface (straight line) and the tyre (dashed line). This vehicle has a negative camber angle.

A typical value on the camber angle for a car is somewhere between +1 to −2 degrees. These angles are small and make less impact on the vehicle’s dynamics compared to the roll of the vehicle.

(30)
(31)

Chapter 3

Test Drives and Data

Gathering

This chapter presents the setup used for the data gathering from the test runs in the simulator together with the test results. The data gathering was done in one of VTI’s simulators. A requirement for the test drivers was to not have any earlier experiences of a DLC manoeuvre in the simulation environment. The simulator used was SIM III at VTI, Linköping. The technical specification for this simulator can be found in Appendix F.

3.1

Test Specification

It was desirable to get test results without too high deviations because the results should not differ too much in the DLC manoeuvre. In order to not get too high deviations in the results, the test drivers were allowed to get comfortable with the simulation environment before the real tests started. Another important factor was to make sure none of the test drivers got too many test runs and learned how to do an optimal DLC manoeuvre. A good balance between the comfort and keep the drivers inexperienced with the DLC manoeuvre had to be made. The test setup was therefore:

• The test driver did the DLC manoeuvre at low velocity around 30 km/h as a warm-up.

• This warm-up went on for around 2-4 turns before the real test started. • During the real test, the test driver got 4-5 tries on a required velocity. • If the test driver managed the manoeuvre, the required velocity increased 5

km/h.

• The maximal velocity in these tests was set after the test person’s perfor-mance, i.e., the highest velocity where the test driver successfully did a DLC manoeuvre.

(32)

16 Test Drives and Data Gathering

The required velocity would also be the maximal velocity of the vehicle during a manoeuvre. This made it easier for the test drivers to maintain the velocity of the vehicle by giving full throttle. This ensured the test drivers to only concentrate on steering through the cone track. When the test driver entered the zone where the manoeuvre took place, he/she pressed down the clutch pedal which made the velocity losses small. The clutch pedal was pressed down during the whole manoeuvre until the vehicle exited the last cones, see Figure 1.1 in Section 1.3. The manoeuvre was done on wet asphalt, which resulted in a low friction between the surface and the tyres. The main reason why the simulations were done on wet asphalt was because of the real tests later. The DLC manoeuvre would wear out the tyres after a few tries on dry asphalt, which leads to an economical issue.

The data gathered after each test was saved on a .dat-file which can easily be handled in Matlab. The physical quantities to be logged were decided in advance and needs to be set in the simulator before the tests start. The most important data for this test is the input to the vehicle, the steering wheel action.

3.2

The Test Drivers

Two simulation days were held at VTI where people were invited to drive the simulator and do the DLC manoeuvre. The test’s supervisors informed the test driver on how he/she should drive in the simulator. All the test drivers were supervised with a camera and microphone so the test supervisors could speak with them and give advices if something had been misinterpreted.

A total of 37 tests were done in the simulator. A goal set by the test supervisors was to make sure the test drivers at least should accomplished one DLC manoeuvre at a velocity between 45-60 km/h. The idea when the robot implementation is to keep the robot from driving in velocities over 60 km/h, just for safety reasons.

Most of the test drivers invited to the simulator were people from the university of Linköping with no experience of driving in a driving simulator at VTI. People from VTI were invited as well, as long as they did not have experience from the simulator. Figure 3.1 shows the ages and number of the male drivers participating in this simulation test.

(33)

3.2 The Test Drivers 17 20 21 22 23 24 25 33 34 0 1 2 3 4 5 6 7 8 9 10

Total number of male test drivers

Age

Number of test drivers

Figure 3.1: Partition of male test drivers based on their ages. The total of male test drivers participating were 21.

The ages and number of female test drivers can be seen in Figure 3.2. The two figures show how most of the test drivers are in the ages between 20-25 years. The total of test drivers during the two test days were 37, divided in 21 men and 16 women in different ages.

19 20 21 22 23 24 25 40 53 57 0 1 2 3 4 5 6 7 8 9 10

Total number of female test drivers

Age

Number of test drivers

Figure 3.2: Partition of female test drivers based on their ages. The total of female test drivers participating were 16.

Each test driver was asked to complete a questionnaire after he/she finished a simulation. This is a questionnaire VTI wants the test driver to answer in order to get some feedback if something in the simulator can be implemented better. One of the questions on this questionnaire is how many kilometres the person drives every year in a vehicle (car, truck, bus or mc). The answers from the test drivers are shown in Figure 3.3.

Ten thousand kilometres are quite a long distance and a person driving this distance a year probably has his/her work in a different city and therefore needs to

(34)

18 Test Drives and Data Gathering 0−10000 10000−20000 20000−30000 over 30000 0 5 10 15 20 25 30 35

Driving experience per year for all test drivers

Total of kilometers/year

Number of test drivers

Figure 3.3: The driving experience of the test drivers in kilometres.

commute. Another reason may be driving is involved in the person’s occupation. Most of the test drivers were students who do not own a car.

3.3

Results and Discussion for the Simulator Tests

Figure 3.3 showed how most of the test drivers are quite inexperienced drivers. However, the differences between the test results should not be too big because the DLC manoeuvre is not a common situation in the traffic. The biggest dif-ference between the experienced and the inexperienced drivers was the ability to know the vehicle’s placement during the manoeuvre. Figure 3.4 shows how the cone track is formed and the distances between passages.

2.397 m 3.2 m 2.97 m 10 m 2 m 20.25 m 2 m 8 m 16.25 m 1.77 m 4.47 m 2 m Middle Passage 1 m

First Passage Last Passage

Figure 3.4: The entire track. The figure shows the distances between the cones and the dimension of the car. The minimum lateral movement the driver has to do to successfully complete the manoeuvre is 2.77 m.

(35)

3.3 Results and Discussion for the Simulator Tests 19

A common error for an inexperienced driver observed during the test runs in the simulator was to drive the vehicle a little to the right through the first passage, which resulted in some cone hits. This is because of the drivers’ position in the car, where the driver sits on the left side and therefore has more control on the left side than the right side of the vehicle. Other common errors were:

• The left turn in the end of the first passage came too early, which resulted in a cone hit on the last cone to the left.

• The test driver did a too weak effort to go through the middle passage, which resulted in a cone hit on the right side.

• The left turn into the last passage came too early, which resulted in some cone hits on the left side.

• The test driver did a too violent turn after the middle passage, which made the driver to lose control of the vehicle and some cones got hit in the last passage.

Figure 3.5 shows the position for the car when a driver has done over 20 DLC manoeuvres. The figure shows how the test driver ends the simulation after almost 7000 meters and the vehicle’s lateral position differs approximately 4 meters. The driver lost control of the vehicle two times, one right after 4000 meters and one time after 6000 meters, also seen in Figure 3.5. The driver drove approximately 200 m between the cone passages as soon as he/she exited one manoeuvre. This distance was never logged.

0 1000 2000 3000 4000 5000 6000 7000 −4 −3 −2 −1 0 1 2 3 Longitudinal position [m] Lateral position [m]

A serie of double lane change−manoeuvres for one test driver

Figure 3.5: The position for the vehicle during a test with several DLC manoeu-vres. Every top on the curve is where the driver goes through the middle cone passage. The driver drove almost 7000 metres and lost control of the vehicle two times (at 4300 and 6200 meter) before he/she stopped the vehicle. The rectangle highlights one part of the curve which can be seen in the upper plot in Figure 3.7.

(36)

20 Test Drives and Data Gathering

The data gathered during the simulations was divided into a smaller data set containing all the manoeuvres where no cones were hit. This is done in order to get rid of all the outliers, e.g., when a test driver lost control of the vehicle.

This can be done by using a logged data vector named cone-hit, which contains the info if any cones were hit or not during a manoeuvre. This means it cannot be decided whether a test driver hit one cone or many cones. This scenario can be seen in Figure 3.6. The straight line is equal to one when the vehicle is inside the cone track. This straight line is set to zero as soon as the vehicle exits the cone track. Two bars can be seen in Figure 3.6, where the dashed line equals to zero but the straight line is one. This shows how the test driver did two successful manoeuvres. The second bar shows how the test driver hit a cone somewhere in the middle of the track, but it is uncertain if the driver hit more cones after the first hit. The fourth bar shows how the test driver almost did a successful manoeuvre, but he/she hit a cone/some cones in the end of the track, and again, it is uncertain if the driver only hit one cone or if he/she drove over two or more cones. 550 560 570 580 590 600 610 620 630 0 0.2 0.4 0.6 0.8 1 Time [s] Vehicle in cone−track and cone−hit

Inside cone track Cone hit

Figure 3.6: The solid line shows when the vehicle is inside (equals to one) or outside (equals to zero) the cone track. The dashed line gets equal to one if a cone gets hit.

Figure 3.7 shows the logged position for the vehicle when the driver does a successful manoeuvre in almost 55 km/h, which is the same curve highlighted with a rectangle in Figure 3.5. The frequency for the data logging in the simulator is 100 Hz. The point on the vehicle logged during the manoeuvre is located in the middle of the front axis, about one meter from the front of the vehicle.

The reason why so many test drivers were used during the data gathering was because it was an opportunity for colleagues and friends to try an advanced driving simulator. This offer of driving a simulator this advanced may not occur again for many of the people who were at VTI as test drivers. Two days for data gathering were considered enough and the fact a total of 37 test drivers showed up was satisfactory.

It perhaps would have been more interesting if a certain age of the test drivers would have been studied instead of the quite big spread between ages in order to

(37)

3.3 Results and Discussion for the Simulator Tests 21 0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Position for a vehicle through the cone track at 55 km/h

0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m]

Steering wheel angle [rad]

Steering wheel angle for a vehicle through the cone track at 55 km/h

Figure 3.7: The position and steering wheel angle for a vehicle during a successful manoeuvre. The upper curve in this figure is the manoeuvre highlighted with a rectangle in Figure 3.5. Note, the cones in the plots from now on until the result plots in Chapter 5 - 6 have bigger dimensions than they have in reality, just for making it clearer where they are located.

see what the differences could be between two different ages. Another possible arrangement for future works is to make sure the ratio between the test drivers’ genders is the same. The implemented driver model could represent gender and age of a person if these studies are done.

If a decision is made on which group of people is going to be used as test drivers is taken, only a few people have to be used for the data gathering. By using the results from this small group of people, an average trajectory for the position of the vehicle and steering wheel action can be calculated with a deviation. More trajectories can be created using Monte Carlo-simulations when the average and deviations from the group of drivers are used.

(38)
(39)

Chapter 4

Driver Type Modeling

The typical characteristics of the drivers have to be found in order to create a model representing an inexperienced driver, a moderately experienced driver and another model representing an experienced driver. The easiest way is by looking on the differences between an experienced driver and an inexperienced driver.

The categorization made here is based on the results from the DLC manoeuvres done in the simulator. An inexperienced driver is here a driver who performs poorly when it comes to do a DLC manoeuvre. This does not mean the driver has to be inexperienced when it comes to driving in real traffic. The experienced drivers in this thesis are test drivers who performed good DLC manoeuvres.

The biggest difference between the drivers was how they placed the vehicle in the cone track. This was easiest to observe at high velocities when it is crucial to know when it is possible to steer the vehicle. An assumption is an experienced driver who knows how he/she has to turn early to manage the manoeuvre. It was therefore assumed the experienced driver is earlier with the steering wheel action than an inexperienced driver who could be late with the turns and therefore had to steer more violent in order to do a successful DLC manoeuvre. Another assumption on the experienced driver is his/her ability to successfully complete the DLC manoeuvre at high velocities.

4.1

The Driver Types

Figure 4.1 shows the results for a typical inexperienced driver (dashed line) and a typical experienced driver (solid line). The figure shows the vehicle’s placement during a simulation. Typical for the inexperienced driver is to wait too long before the first left turn, because he/she is uncertain of the vehicle’s position and wants to be sure no cones are hit in the first passage. Another error by the inexperienced driver is he/she waits too long before steering the vehicle from the middle pas-sage to the last paspas-sage. These late steering actions lead to another typical action for an inexperienced driver; the driver has to compensate with a hard right turn, which leads to a hard left turn when the vehicle shall go through the last gate. This behaviour created the oscillations seen in the plot for the lateral position in

(40)

24 Driver Type Modeling

Figure 4.1. The driver is able to control the vehicle with the steering wheel and will make the oscillations disappear if the velocity is low. The consequence in a higher velocity would probably result in a driver who loses control over the vehicle and crashes. The typical trajectory for the experienced driver can be seen in the

0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Vehicle position for an experienced and inexperienced driver at 55 km/h

0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

Steering wheel angle for an experienced and inexperienced driver at 55 km/h

Inexperienced driver Experienced Inexperienced driver Experienced driver

Figure 4.1: Typical position and steering wheel angle for the vehicle in a DLC manoeuvre for the inexperienced and experienced driver. The inexperienced driver turns the vehicle later compared to the experienced driver. The turn through the last passage, seen in the steering wheel angle plot, is more violent than the same turn done by the experienced driver.

Figure 4.1. The experienced driver can locate the vehicle on the track and knows when he/she can turn left without hitting any cones in the first passage. The experienced driver also knows when it is possible to turn right from the middle passage to the last passage. By steering early from the middle passage, the expe-rienced driver has more time to steer the vehicle through the last passage. The oscillations which occurred for the inexperienced driver disappears when planning the path like this.

4.2

Categorizing the Drivers

The driver types are classified as experienced, moderately experienced and inex-perienced. To categorize the drivers from the simulation tests a method called

k-means clustering was used. The idea behind this method is to divide a set of

(41)

4.2 Categorizing the Drivers 25

inexperienced drivers and two more for the other two driver types. The algorithm for the k means clustering is described in Figure 4.2. First, it is decided how many

Start

Choose the number of clusters k

Calculate the distance between objects and centroid

of the cluster

Group the objects based on minimum distance No object changed cluster? Centroid

End

Figure 4.2: The k means clustering algorithm. The algorithm continues as long as any of the objects change cluster during an iteration.

clusters (k) the datasets are going to be divided into. The algorithm first randomly assigns k clusters for every data point and then updates. The algorithm computes the initial mean as the centroid of the cluster’s randomly assigned points. Each data point is then assigned to the cluster whose mean is closest. The new mean of each cluster is then updated and this progress will go on until the algorithm con-verges which is when the assignments no longer change. An algorithm for curves is here used which works like the algorithm described above. This is done by us-ing lrm (linear regression mixture) and srm (spline regression mixture) clusterus-ing. This is done in Matlab with the Curve Clustering toolbox [6]. The results from clustering the trajectories in Figure 4.3 are shown in the Figures 4.4 - 4.7. The

(42)

26 Driver Type Modeling

labelling of the clusters is based on the results from the simulation runs described in Chapter 3. The experienced drivers completed the manoeuvre at high velocities because they were early with the steering. At the velocity 60 km/h, the lateral position of the vehicle cannot be too high in order for the drivers to have time to steer the vehicle down through the last cone passage. The labelling of the clusters is therefore made by comparing the highest mean of the lateral position between the clusters. The experienced drivers are assumed to have the lowest mean, while the inexperienced drivers have the highest mean. The resulting clusters together with this assumption are used to labelling each cluster with a driver.

0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m] Test results 55 km/h 0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

(43)

4.2 Categorizing the Drivers 27 0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Vehicle position for all experienced drivers at 55 km/h

0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

Steering wheel angle for all experienced drivers at 55 km/h

Figure 4.4: These curves were categorized as a result from experienced drivers when the k means clustering method was used on the curves in Figure 4.3.

0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Vehicle position for all moderate drivers at 55 km/h

0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

Steering wheel angle for all moderately drivers at 55 km/h

Figure 4.5: These curves were categorized as a result from moderately experienced drivers when the k means clustering method was used on the curves in Figure 4.3.

The three curves in Figure 4.7 are the mean of the vehicle’s lateral position given the longitudinal position from the curves in Figures 4.4 - 4.6. The result shows something interesting. The typically driver behaviour characteristics for the DLC-manoeuvre discussed in Section 4.1 can be seen in this figure. As discussed

(44)

28 Driver Type Modeling 0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Vehicle position for all inexperienced drivers at 55 km/h

0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

Steering wheel angle for all inexperienced drivers at 55 km/h

Figure 4.6: These curves were categorized as a result from inexperienced drivers when the k means clustering method was used on the curves in Figure 4.3.

in Section 3.3, the experienced driver (solid curve) steers the vehicle earlier than the other two. This makes it easier for the driver to steer the vehicle back down to the last cone passage. The inexperienced driver (dot curve) is a bit late with the first left turn and wants to make sure the vehicle will go through the cone port in the middle without hitting any cones, therefore the bigger amplitude on the curve for the lateral position. The inexperienced driver is late with the turn back to the last passage which leads to a violent turn, which can be seen in the plot for the steering wheel angle. The moderately experienced driver (dash-dot curve) shows a behaviour which is somewhere between the other two drivers’. One reason why the moderately experienced driver has calmer steering wheel angle could be because the experienced driver knows he/she can be more violent with the turns and still manage the manoeuvre. The inexperienced driver is more violent with the steering wheel because he/she is struggling with the manoeuvre at this velocity.

4.3

Reference Trajectories

The reference trajectories are crucial in order to get the implemented driver models to work. The reference trajectory are the lateral position of the vehicle. This can in reality be seen as the human driver’s eyes which he/she is using to see if the vehicle’s position is acceptable with respect to the predefined path the driver has in mind. This path is defined as the distance the driver is fixing his/her sight and is determined by a constant look ahead horizon. The reference trajectory can of

(45)

4.3 Reference Trajectories 29 0 10 20 30 40 50 60 −4 −2 0 2 4 Longitudinal position [m] Lateral position [m]

Mean vehicle position for the three driver clusters at 55 km/h

0 10 20 30 40 50 60 −6 −4 −2 0 2 4 6 Longitudinal position [m]

Steering wheel angle [rad]

Mean steering wheel angle for the three driver clusters at 55 km/h

Figure 4.7: These curves are created by taking the mean of the vehicle’s lateral position, given the vehicle’s longitudinal position, for every curve from the Fig-ures 4.4 - 4.6. These trajectories are used as references for the drivers described in the Chapters 5 and 6. The steering wheel angles in the second plot are calculated in a same manner as the lateral positions in the first plot; by calculating the mean given the longitudinal position from the data in each cluster. All the trajectories from the cluster come from test drives who successfully completed the DLC ma-noeuvre, so the mean trajectories are guaranteed to be successfully manoeuvres as well.

course be something else, e.g., the yaw of the vehicle. This would be the same as a driver looking on the upcoming curvy road and thereafter decides how much it is necessary to steer in order to successfully complete the steering manoeuvre.

The reference trajectories for the driver models in the Chapters 5 and 6 use the curves in the Figures 4.4 - 4.6 when the driver is told to drive in 55 km/h. For picking the reference trajectory, a function randomly picks two curves for the vehicle’s lateral position given the longitudinal position for one driver type and velocity, calculates the mean of the lateral position for these two curves and sends this mean curve as a reference to the driver. Chances are the references comes closer the mean if more curves are picked, which would make the references look the same. Example 4.3.1 shows how a reference trajectory is created.

(46)

30 Driver Type Modeling

Example 4.3.1 Figure 4.8 show a cluster for experienced drivers at 50 km/h.

The function for creating reference curves takes randomly two curves from cluster. These two curves can be seen in Figure 4.9. The function then calculates the mean of these two curves and one reference trajectory for an experienced driver at 50 km/h is created. 0 10 20 30 40 50 60 −4 −3 −2 −1 0 1 2 3 4 Longitudinal position [m] Lateral position [m] Experienced drivers at 50 km/h

Figure 4.8: Cluster containing the experienced drivers trajectories from the simu-lator drives at 50 km/h. 0 10 20 30 40 50 60 −4 −3 −2 −1 0 1 2 3 4 Longitudinal position [m] Lateral position [m]

Two randomly picked trajectories from the good drivers at 50km/h cluster

Figure 4.9: Two trajectories from Figure 4.8 which were picked randomly by a function.

(47)

4.4 Discussion of the Driver Type Modelling 31 0 10 20 30 40 50 60 −4 −3 −2 −1 0 1 2 3 4

Mean position of the two randomly picked trajectories

Longitudinal position [m]

Lateral position [m]

Figure 4.10: The mean of the trajectories in Figure 4.9 which is going to be used as a reference trajectory for an experienced artificial driver in a simulation at 50 km/h.

4.4

Discussion of the Driver Type Modelling

This thesis has sought to create a driver by doing nothing more than letting the user decide the driver type and velocity. A user gives a driver type and velocity as input and the implemented algorithms make sure the driver is created without any more intervention from the user. This is why machine learning had to be used for categorizing the three different driver types. The k means algorithm was an effective tool to use for creating the three different drivers given the gathered data. There is also a small drawback with the algorithm. The clustering algorithm found curves from the bad drivers and very bad drivers and categorized them as inexperienced drivers. It also categorized the curves for the good drivers and the very good drivers as experienced drivers. Left are the curves in between these other curves, which were categorized as moderately experienced drivers. At higher velocities where the requirements for the drivers are higher, results with a lower variance for the moderately experienced driver compared to with other two driver types. This can be seen in Figures 4.6 - 4.4 where the curves for the moderately experienced drivers have less variance than the other driver types at 55 km/h. In reality, the experienced drivers should be more relaxed with lesser variance than a less experienced driver.

The choice of using the lateral position of the vehicle as the reference trajectory was based on the previous work where most of the authors in the Section 1.5.2 used this approach. Another reason was because it is easier to interpret and verify the lateral position in a plot, especially if the cones are printed as well, compared to if the yaw angle would have been used as the reference.

The labelling of the drivers was done by assuming the inexperienced drivers have the highest mean of the lateral position. The labelling was made in order to minimize the interventions from the users. Otherwise the user would have to categorize three clusters for each velocity every time after the clustering.

(48)

32 Driver Type Modeling

created with a quite simple method. The trajectories are determined by calculating the mean of the vehicle’s lateral position for one driver type and velocity given two random curves. It is important to have a large data set to be sure different reference trajectories are used. The number of possible reference trajectories for a data set containing l curves for the vehicle position can be calculated as the binomial coefficient: 2l. The curves are also combined in threes to maximise the number of reference trajectories if the dataset only contains three or four curves.

An alternative method for creating reference trajectories is by using Gaussian

regression. Inputs needed are a data set with inputs x and targets y, a covariance

function k and test inputs x∗. The goal is to predict the means and variances given

the inputs, by computing the negative log marginal likelihood with the covariance kernel and its hyperparameters. Gaussian regression processes is a interesting field in machine learning, which can, e.g., be studied in Rasmussen [18].

(49)

Chapter 5

MPC as a Driver

In this approach, Model Predictive Control (MPC) is used to control the vehicle as a driver. The MPC uses reference tracking in order to calculate a control signal, which is the steering wheel angle. The controller will use a linear vehicle model with four states. This model is not as complex as the one described in Chapter 2. The main reason is because this simplified vehicle model contains dynamics which is easier for a normal driver to perceive.

5.1

The Driver’s Vehicle Model

When a driver is driving a vehicle, he/she knows the velocity by looking at the speedometer and he/she also has the ability to determine the deviation in length between the centre of the path and the centre of the vehicle by using his/her eyes. The yaw-angle is not as easy to determine by eyes as the lateral placement, especially when the angle is small. Perhaps there is a chance to decide bigger angles with some deviation. Other typical states, e.g., yaw-rate, accelerations and the lateral velocity are however very hard for a human to determine while driving, if he/she is not using an IMU. The driver can use other senses to observe changes in quantities when driving a vehicle. It is, e.g., possible to feel the changes in acceleration. An assumption done in this thesis is the eyes are the most dominant sense in comparison with the other senses, when it comes to collecting information and the focus will be on quantities observed by the eyes.

A state space model of a vehicle model will be used in order to implement an MPC for the driver model. This model will not be near as complex as the model used in Chapter 2. The model used here is the same one as can be found in MacAdam [12]. This vehicle model, which can be expressed on a linear state space form

˙

x = Fx + gu

y = mTx (5.1)

is linear with four states and has the steering wheel angle as control input. The

(50)

34 MPC as a Driver

matrices and vectors in 5.1 are written as:

F =      −(2Cαf+2Cαf M U ) −(U + 2lfCαr−2lrCαr M U ) 0 0 −(2lfCαr−2lrCαr IzU ) −( 2l2 fCαr+2l2rCαr IzU ) 0 0 1 0 0 U 0 1 0 0      (5.2) g =     2Cαf M Gr 2lfCαf IzGr 0 0     m =0 0 1 0 (5.3)

The states and the parameters of the driver’s vehicle model can be seen in Ta-ble 5.1. The matrix m in (5.1) is used to pick the states which were later used

Table 5.1: The Driver’s Vehicle Model’s Parameters & States

States and Parameters Quantity Unit

x1 Lateral Velocity [m/s]

x2 Yaw Rate [rad/s]

x3 Lateral Position [m]

x4 Yaw Angle [rad]

CαF,CαR Front and rear cornering coefficients [N/rad]

U Forward vehicle velocity [m/s]

M Vehicle mass [kg]

Iz Vehicle yaw inertia [kgm2]

lf, lr Distance of the CG from the front and rear axles [m]

Gr Steering ratio [-]

in the optimization routine. The state used was the lateral position which can be seen in (5.1) and (5.3). The values used for the model’s parameters can be found in Appendix D. The given state space model for the driver’s vehicle model is continuous. The discrete z-plane is mapped to the continuous s-plane in order to make this model discrete. This is done by using

z = esT (5.4)

which is the natural logarithm function [5] and T is the sample time. The dis-cretization method used was the bilinear transformation or Tustin’s method,

esT = e

sT /2

e−sT /2

1 + sT /2

1 − sT /2 (5.5)

which is a first order approximation of the logarithm function. Combining (5.4) and (5.5) result in:

z = 1 + sT /2 1 − sT /2 s = 2 T 1 − z−1 1 + z−1 (5.6)

(51)

5.2 Model Predictive Control 35

5.2

Model Predictive Control

Model Predictive Control is a control strategy which has been developed since the late seventies and there are vast of literature written about how to calculate and implement it [3]. The book Model Predictive Control [3] covers information both on how MPC works and how to tune and implement it. Nonlinear MPC (NMPC) is well discussed as well in the same book. The book Industriell Reglerteknik

Kurskompendium [5] has a chapter about MPC and is a good alternative if the

reader wants a brief introduction to MPC. In Keen and Cole [7], the authors use MPC to control the steering action in order to optimize the vehicle’s trajectory. Figure 5.1 shows a descriptive block diagram over the authors’ closed loop sys-tem. The steering controller uses information about a predefined path together with a predictor. The predictor is for the trajectory estimation which generates the driver’s estimates of the future closed-loop vehicle state trajectory. The con-troller uses the predicted data together with the info about the road to calculate a control signal to the vehicle. The IMF -block (Internal Model Family) contains the capability of the driver, which is a set of linearised system models over how well a driver understands the vehicle’s dynamics. In this case, the dynamic is the slip angle of the vehicle. An experienced driver knows how to handle the vehicle when the slip angle becomes big. The non-experienced driver would lose control for the same slip angle. In Kim and Cole [8], the authors use the same strategy as described in Keen and Cole [7], but includes the steering wheel angular velocity to the cost function. The biggest difference between the controllers is Kim and Cole [8] use a time variant controller.

Reference Trajectory Vehicle Steering Controller

Driver Model

Internal Model Family Predicted Trajectory Estimation

References

Related documents

The simulations show that 802.11p is not suitable for periodic position messages in a highway scenario, if the network load is high (range, packet size and report rate) since

Interrater reliability evaluates the consistency of test results at two test occasions administered by two different raters, while intrarater reliability evaluates the

The connection between APPES patterns and fuel consumption can be used to, for example, cluster drivers in groups that correspond to high or low performance..

CNES, clean room, Toulouse.. The first are more conservative than the second ones, and mainly used to detect problems, even if they may not appear during real launch

The fuzzy PI controller always has a better control performance than the basic driver model in VTAB regardless of testing cycles and vehicle masses as it has

S HAHIDUL (2011) showed that Fisher’s g test failed to test periodicity in non-Fourier frequency series while the Pearson curve fitting method performed almost the same in both

In the third study, a method was developed by which realistic masker sounds, spectrally matched to each set of test phonemes in the SiP-test material, were generat- ed for

There are five criteria that used to demonstrate results for approach. of test cases: This is used to indicate that how many test cases are generated after applying the approach. b)