• No results found

Model Predictive Control for Heavy Duty Vehicle Platooning

N/A
N/A
Protected

Academic year: 2021

Share "Model Predictive Control for Heavy Duty Vehicle Platooning"

Copied!
67
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Model Predictive Control for Heavy Duty Vehicle

Platooning

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

av

Josefin Kemppainen

LiTH-ISY-EX--12/4594--SE Linköping 2012

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

Model Predictive Control for Heavy Duty Vehicle

Platooning

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköping

av

Josefin Kemppainen

LiTH-ISY-EX--12/4594--SE

Handledare: Assad Alam

Scania CV AB

Henrik Pettersson

Scania CV AB

Sina Khoshfetrat Pakazad

isy, Linköpings universitet Examinator: Daniel Axehill

isy, Linköpings universitet Linköping, 15 June, 2012

(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 2012-06-15 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--12/4594--SE

Serietitel och serienummer

Title of series, numbering

ISSN

Titel

Title

Modellbaserad prediktionsreglering för tunga fordon Platooning Model Predictive Control for Heavy Duty Vehicle Platooning

Författare

Author

Josefin Kemppainen

Sammanfattning

Abstract

The aim of platooning is to enable several vehicles to drive in a convoy while each vehicle is controlled autonomously in longitudinal direction. All vehicles in the platoon are equipped with WiFi and can therefore apply Vehicle-to-Vehicle (V2V) communication. As a result, a short intermediate distance between the vehicles can be maintained. Reduction of the aerodynamic drag is the result of the short distance, which in turn, reduces the consumed fuel.

This thesis is a part of a larger project, consisting of two other theses that investigate estimation of the sensor data. Other scenarios that may arise with the platooning concept, e.g. packet losses and time synchronization of the different sensors are also analyzed.

The purpose of this master thesis is to develop and evaluate a Model Pre-dictive Control (MPC) in the concept of platooning. The main focus lies on implementation of two types of MPC, centralized and distributed, and later on integration with the other two subsystems is performed.

Results from the MPC itself are evaluated, principally in terms of fuel con-sumption and computational demand. The major part of the results are based on the complete system as one unit and covers different test scenarios such as WiFi loss and non-transmitting vehicle entering the platoon. A comparison of how much energy that is consumed by the engine between an HDV driving with its cruise control and an HDV driving in a platoon has been performed. With an intermediate distance of 10 meters, driving with varying velocity and ideal signals the energy consumption got reduced with an average of 11%.

Nyckelord

(6)
(7)

Abstract

The aim of platooning is to enable several vehicles to drive in a convoy while each vehicle is controlled autonomously in longitudinal direction. All vehicles in the platoon are equipped with WiFi and can therefore apply Vehicle-to-Vehicle (V2V) communication. As a result, a short intermediate distance between the vehicles can be maintained. Reduction of the aerodynamic drag is the result of the short distance, which in turn, reduces the consumed fuel.

This thesis is a part of a larger project, consisting of two other theses that investigate estimation of the sensor data. Other scenarios that may arise with the platooning concept, e.g. packet losses and time synchronization of the different sensors are also analyzed.

The purpose of this master thesis is to develop and evaluate a Model Predictive Control (MPC) in the concept of platooning. The main focus lies on implemen-tation of two types of MPC, centralized and distributed, and later on integration with the other two subsystems is performed.

Results from the MPC itself are evaluated, principally in terms of fuel con-sumption and computational demand. The major part of the results are based on the complete system as one unit and covers different test scenarios such as WiFi loss and non-transmitting vehicle entering the platoon. A comparison of how much energy that is consumed by the engine between an HDV driving with its cruise control and an HDV driving in a platoon has been performed. With an intermediate distance of 10 meters, driving with varying velocity and ideal signals the energy consumption got reduced with an average of 11%.

Sammanfattning

Syftet med platooning är att flera tunga fordon kör tätt efter varandra i ett for-donståg. Varje fordon regleras autonomt i longitudinell riktning och är utrustad med WiFi. Detta bidrar till att fordonen kan kommunicera med varandra och den-na kommunikation, även kallad Vehicle-to-Vehicle (V2V) - communication, leder till att det relativa avståndet mellan fordonen kan minskas, vilket i sin tur leder till minskat luftmotstånd och därmed minskad bränsleförbrukning.

Detta examensarbete är en del av ett större projekt som består av ytterliga-re två examensarbeten. De andra två hanterar estimeringen av sensordata samt

(8)

vi

behandlar förlorat sensordata och tidssynkronisering av de olika sensorerna som används.

Syftet med detta examensarbete är att utveckla och utvärdera en MPC regu-lator i platooning sammanhang. Huvudfokuset ligger på implementeringen, både centraliserad och distribuerad MPC, och integreringen med de två andra delsyste-men.

Resultaten från enbart MPC utvärderas i termer av bränsleförbrukning och även beräkningskapactiet, då MPC är känt för att vara väldigt beräkningskrävan-de och är ofta en begränsning för hårdvaran. Den största beräkningskrävan-delen av resultaten är baserade på hela systemet och täcker olika scenarion som exempelvis dålig Wi-Fi uppkoppling och att icke−sändande fordon intar platoonen. En jämförelse av hur mycket energi motorn förbrukade har gjorts mellan ett tungt fordon som kör med farthållaren påslagen och ett tungt fordon som kör i en platoon. Med ett relativt avstånd på 10 meter, varierande hastighet och icke brusiga signaler kan bränsleförbrukning minskas med ett medel på approximativt 11%.

(9)

Acknowledgments

With this thesis Model Predictive Control for Heavy Duty Vehicle Platooning I complete the Master of Science degree in Applied Physics and Electrical En-gineering at The Institute of Technology at Linköping University (LiTH). This thesis has been carried out at Scania CV AB in Södertälje at the pre-development department of Intelligent Transport Systems (REPI) and was supervised at the Automatic Control Department at LiTH.

Primarily, I want to express my gratitude to the Scania Student Intro program who gave me the opportunity to do my master thesis at Scania and work in this project together with Sanna Nilsson and Hanna Pettersson. All my days have been enjoyable thanks to Sanna and Hanna and above all, they helped me to keep motivated and focused throughout this master thesis. I want to express my further gratitude to my supervisors at Scania, Assad Alam and Henrik Pettersson for their valuable time, guidance and irreplaceable knowledge. I also want to thank my su-pervisor at LiTH, Sina Khoshfetrat Pakazad for his important help and inputs.

The groups at REPI and REPA deserves my best thanks for making my time here at Scania invaluable. Finally, I want to give warm thanks to my family and friends for all the support they given me.

Josefin Kemppainen

Södertälje, June 2012

(10)
(11)

Contents

1 Introduction 1

1.1 Control of Platoons of Vehicles . . . 1

1.1.1 Background . . . 2

1.1.2 Problem Formulation . . . 3

1.1.3 Thesis Objective and Delimitations . . . 3

1.1.4 Thesis Outline . . . 3

1.2 Common Project Description . . . 3

1.2.1 Individual Projects . . . 5

2 Control Theory 7 2.1 Linear Quadratic Control . . . 7

2.2 Model Predictive Control . . . 7

2.2.1 Basic . . . 7 2.2.2 Prediction Model . . . 8 2.2.3 Cost Function . . . 9 2.3 Different MPC Architectures . . . 11 2.3.1 Centralized MPC . . . 11 2.3.2 Distributed MPC . . . 11

2.3.3 Decomposition and ADMM . . . 12

2.4 Design Variables . . . 13 2.4.1 Prediction Horizon . . . 13 2.4.2 Control Horizon . . . 13 3 System Description 15 3.1 Vehicle Dynamics . . . 15 3.1.1 Powertrain . . . 15

3.1.2 Longitudinal Dynamic Model . . . 18

3.1.3 Forces . . . 19

3.1.4 Linearization . . . 21

3.1.5 Discretization . . . 22

3.2 Sensors and Networks . . . 23

3.2.1 Sensors . . . 23

3.2.2 Networks . . . 24

3.3 Existing Functionality . . . 24

(12)

x Contents

3.3.1 Cruise Control and Adaptive Cruise Control . . . 24

3.3.2 The Brake Management System . . . 25

4 Implementation 27 4.1 MPC . . . 27 4.1.1 Control Objective . . . 27 4.2 MPC in Supervisory Role . . . 27 4.2.1 Centralized MPC . . . 28 4.2.2 Distributed MPC . . . 29 4.3 Additional Functionality . . . 31 4.3.1 Categorization . . . 31 4.3.2 Control Logic . . . 32

4.3.3 Analysis of Sample Time . . . 32

4.4 Simulation . . . 34

5 Results 35 5.1 Individual Project . . . 35

5.1.1 Determination of Settling Time . . . 35

5.1.2 Centralized MPC . . . 35

5.1.3 Distributed MPC . . . 36

5.1.4 Computational Demand . . . 36

5.1.5 Estimator and Sensor Fusion blocks . . . 39

5.2 Common Project . . . 39 5.2.1 Reference Tracking . . . 40 5.2.2 WiFi Loss . . . 42 5.2.3 Unknown Vehicle . . . 43 5.3 Fuel Consumption . . . 44 6 Summary 49 6.1 Discussion . . . 49 6.1.1 MPC . . . 49 6.1.2 Simulation Environment . . . 50 6.1.3 Project . . . 50 6.2 Conclusion . . . 51 6.3 Future . . . 51 Bibliography 53 A Performance 55 A.1 Performance of the computer . . . 55

(13)

Chapter 1

Introduction

Today’s engines are constantly evolving towards satisfying new emissions require-ments. This in turn may lead to that radical improvements in fuel efficient engines are both difficult and expensive to achieve. In order to develop heavy duty vehicles (HDVs) which both meet the emission requirements and are fuel efficient, a nu-merous amount of technological aids are being developed. One such technological aid is platooning, which also is a step towards full automation. To let several ve-hicles drive together in a convoy where each vehicle is controlled autonomously in longitudinal direction is called platooning. The primary advantages of platooning are increased traffic flow and reduced fuel consumption. Other advantages involve increased safety and decreased environmental effect. Even though full automa-tion still may require more study before it becomes a realistic possibility, partially automated platooning may be implemented in practice in the next couple of years.

According to the annual report from Scania CV AB 2001 [1], 25 - 30 % of the total operating costs for heavy duty vehicles are fuel costs. For an average Euro-pean HDV the fuel consumption is roughly at 32.5 l/100 km and each truck travels about 150,000 km every year, [24]. The empirical study of potential fuel reduction of HDVs driving in a platoon, [2], shows that at an average speed of 70 km/h a maximal fuel reduction of 4.7-7.7 % is obtained with two identical HDVs. Thus, the advantages may be enormous with the increasing oil prices and the increase of environmental requirements.

1.1

Control of Platoons of Vehicles

This section covers the background of platooning together with problem formula-tion, thesis objective and delimitations and finally the thesis outline.

(14)

2 Introduction

Figure 1.1. This is the platooning vision on the highways within a near future. Provided

at the courtesy of Scania CV AB.

1.1.1

Background

Typically, it takes seconds for a human driver to react in case of an accident. By introducing Vehicle-to-Vehicle (V2V)-communication the vehicle states can be forwarded to the other vehicles in the platoon and the response time can be de-creased significantly and improve safety, [5]. This type of communication is also used in platooning. Platooning means that several vehicles drive in a convoy and behave as one unit. In order to be responsive to changes in vehicle behavior in the platoon, a longitudinal control is established which uses the V2V-communication among the HDVs. As a result, the intermediate distance can be decreased which leads to reduced atmospheric drag, [4], [17].

To realize this concept a set of sensors are available on each HDV, for example radar, GPS and tachometer. These sensors are described further in Section 3.2. Sensor data and characteristic properties for each vehicle are broadcasted via WiFi, which implies that every vehicle equipped with WiFi receives information from all the other vehicles with WiFi within a specific range. The practical system of pla-tooning is presented in the Figure 1.2.

(15)

1.2 Common Project Description 3

Notice that the last vehicle is numbered with 1 and the leading vehicle is number N . In the ideal case of platooning we have v1 = ... = vN −1 = vN and d1,2 = ... = dN −1,N = dref, where dref is the desired relative distance between

consecutive vehicles. The mentioned equalities essentially define the goal of the controller.

1.1.2

Problem Formulation

The problem that has been studied throughout this master thesis is the possibility to use model predictive control (MPC) as a controller in an HDV operating in a platoon. Both centralized and distributed MPC will be examined and the advan-tages and disadvanadvan-tages for each type will be presented. MPC is known as a very computationally demanding controller; therefore an analysis of the complexity of the problem is also conducted.

1.1.3

Thesis Objective and Delimitations

The focus of this thesis lies on implementation and examination of how an MPC controller can be applied to an HDV. The tests are performed principally in a simulation environment. The simulation environment is already established but modifications are necessary to fit the controller in the simulation environment. Fuel consumption, performance and finally complexity of the control system are the main performance measures that will be discussed in this master thesis.

1.1.4

Thesis Outline

This thesis is divided into 6 chapters. Chapter 2 covers the necessary theory that is applied in this thesis. Chapter 3 gives a detailed description of the system where the powertrain and dynamic model are produced both in continuous time and discrete time. The discrete time model is the one that is used in the controller. The implementation is presented in Chapter 4, where for instance the objective functions for the different MPC types are evaluated and different scenarios that can occur in the concept of platooning are also discussed. The results have been produced in a simulation environment and the results from both the individual project and the common project are illustrated in Chapter 5. Chapter 6 covers a discussion part where each part of the thesis is briefly discussed and advantages and disadvantages and also the conclusions and future work are presented.

1.2

Common Project Description

Model Predictive Control (MPC) for Heavy Duty Vehicles is a part of a project consisting of three parallel master theses. Identical vehicle dynamics among the HDVs, longitudinal control, straight road and no speed limits except the maximal limit of 90 km/h for HDVs are the assumptions that are applied during this project. The architecture of the project is described as follows, see Figure 1.3.

(16)

4 Introduction

Figure 1.3. An overview of the three parallel masters’ theses.

As can be seen from Figure 1.3 the loop is mainly comprised of three main blocks, namely Estimator, Sensor Fusion and MPC. Each part and also the in-terface will be described thoroughly in Section 1.2.1. This report will then cover a detailed description of the MPC. For a more detailed analysis of the remaining parts of the project the two master theses on Estimation of Heavy Duty Vehicle Platooning, [23] and Sensor Fusion and Association of Heavy Duty Vehicle Pla-tooning, [20] are available for further reading.

Next, a brief description of the common goal and approach to handle the project requirements is presented.

Project Goal

The goal for the whole project is to develop and implement a system that handles the process from raw sensor data to control signals in order to achieve a smooth and safe control of the vehicles in a platoon. The main purpose is to reduce the fuel consumption.

Approach

Primarily, each part of the project and a detailed description of the interface were defined. Using this predefined description, the individual project were initiated. The focus of this thesis is the MPC controller. The controller is implemented both in centralized and distributed forms and the implementation has been carried out using a Matlab toolbox called CVX, [15]. The controller has been evaluated, initially, in Matlab and later on in the existing simulation environment provided in Simulink, where some modifications have been made to fit the MPC require-ments. Further on, when each part of the project had been implemented and tested carefully, integration between the different parts was performed where the com-pact loop was tested together as one system. Next section provides a description and discusses the goals of each of the blocks presented in Figure 1.3

(17)

1.2 Common Project Description 5

1.2.1

Individual Projects

Estimator

The estimator receives desired raw sensor data, either from WiFi or the Con-troller Area Network (CAN), and performs the first processing on the data. The sensor data reaches the estimator with different frequencies and therefore time synchronization is conducted. After this phase, estimation of known sensor data is performed using an Extended Kalman Filter (EKF). Known sensor data means data that belong to a specific vehicle. The EKF is chosen due to the nonlinear dynamic of HDV.

The interface is depicted as in Figure 1.3. The outputs from the estimator are the estimated states (ˆxE), covariance matrix for the estimated states (PE), vector

including all the identities of vehicles from which data have been received (IDE),

filtered radar data (RE), data status (DSE) that classifies the leading vehicle, other

vehicles in the platoon and vehicles outside the platoon, inputs and parameters (uE), and finally a status flag (SE) that, for instance informs if there has been

WiFi loss.

Sensor Fusion

Afterwards, the Sensor Fusion block receives estimated states (ˆxE) and performs

fusion, using an EKF filter, on the received states and the radar data (RE) and

transmits ˆxSFto the MPC block. Note that the radar data is classified as unknown

sensor data. This is due to the fact that the identity of the detected vehicles by radar is uncertain. The aim of the fusion in this part is to decide on the order of the vehicles in the platoon and to detect slopes and curves. Categorization of the HDVs is performed in the Sensor Fusion block and this is described further in Section 4.3.1 and is forwarded to the controller via the status flag.

Initially, the IDE that is received from the estimator contains all the active

vehicles in a specific range and the Sensor Fusion block decides which vehicles that are interesting for the estimator. Feedback of the ID-vector (IDSF) informs the

estimator of which states of vehicles should be considered for the estimation in order to assure that vehicles with WiFi loss will not be forgotten. In some cases, estimation of vehicles driving in the adjacent lane are of interest just to keep track of their activity. For instance this can be used to detect the possible entering of those vehicles into the platoon.

The received covariance matrix PE is used as an initial value to the PSF that

is calculated in Sensor Fusion, that later on is forwarded to the controller.

MPC

The MPC controller, having received processed data, focuses on providing a smooth and safe control for the system. Basically, the model predictive controller solves

(18)

6 Introduction

an optimization problem minimizing a cost function based on a set of pre-specified requirements while satisfying constraints on control signals and states. It is also worth mentioning that this controller can easily handle systems with multiple inputs and outputs. Control logic is implemented to get a safe control and is de-scribed further in Section 4.3.2. Control signals to either the Cruise Control (CC) or the Brake Management System (BMS) are the outputs of the system, and MPC will act as a supervisory controller over the CC and BMS.

(19)

Chapter 2

Control Theory

This chapter covers the necessary control theory background such as the basics for model predictive control and different implementation approaches for MPC.

2.1

Linear Quadratic Control

One of the widely used methods for solving a multivariable control problem is the so-called Linear quadratic (LQ) control, which includes solving an optimization problem with a quadratic cost function and constraints describing the linear dy-namics of the system. Often, the cost function for this control approach is defined as a quadratic function of states and control signals e.g,

∞ X j=0 kx(k + j)k2P1+ ku(k + j)k 2 P2, (2.1)

where P1 and P2 are weight matrices and are used to indicate to the controller of

how the control signal and the states are valued. Note that P1 and P2 are chosen

to be positive semidefinite and positive definite, respectively, [13].

2.2

Model Predictive Control

This section describes the MPC theory that is used in this thesis. The notation is chosen in accordance with the one in [10].

2.2.1

Basic

The MPC controller is an extension of the LQ controller. The main difference between the two types of controllers is that the MPC can handle constraints on the control signals and states. The optimization problem considered in model predictive controllers are generally defined as

(20)

8 Control Theory

min PHp−1

j=0 f (x(k + j), P1) + g(u(k + j), P2)

subject to x(k + j + 1) = Ax(k + j) + Bu(k + j), j = 0, ..., Hp− 1

x(k + j) ∈ X , j = 1, ..., Hp− 1

u(k + j) ∈ U , j = 1, ..., Hp− 2

(2.2)

where Hpis the so-called prediction horizon and X and U represent the constraints

sets for the states and control signals, respectively. Depending on the control ob-jective, system dynamics and limitations, the functions in the cost function and constraints sets are chosen such that control objectives are reached while satisfying normal working conditions of the system. Different choices for these components are further discussed in the upcoming sections and chapters. Having defined the optimization problem in (2.2), at each time instant k the MPC controller follows the following strategy.

1. Measure x(k) (or estimate)

2. Compute u(k + j), j = 0, ..., Hp− 2 by solving (2.2)

3. Use u(k) as the next control signal for the next step k + 1 4. Time update, k := k + 1

5. Repeat from step 1.

In order to tailor the MPC controller for the application at hand the following steps are considered.

• Define future states that will be used in the cost function directly.

• Rewrite the cost function using the predictions from above.

• Formulate the optimization problem as a quadratic program.

2.2.2

Prediction Model

In this thesis, a linear model is considered for describing the behavior of the system in the controller. This model, also referred to as the prediction model, is given by

x(k + 1) = Ax(k) + Bu(k) − F eq(k), (2.3)

where x(k) are the states, u(k) is the control signal and eq(k) is the equilibrium point. The predictions can also be written explicitly. For instance, consider a prediction for time k + 2 based on information from time k given as

x(k + 2) = Ax(k + 1) + Bu(k + 1) − F eq(k + 1)(2.3)=

(21)

2.2 Model Predictive Control 9

To get an easier notation for prediction expressions the following vectors are in-troduced. U =      u(k) u(k + 1) .. . u(k + Hp− 1)      , X =      x(k) x(k + 1) .. . x(k + Hp− 1)      , EQ =      eq(k) eq(k + 1) .. . eq(k + Hp− 1)      (2.5)

As a result, by using (2.3) recursively, we have

X = Ax(k) + BU − F EQ (2.6) where A =      I A .. . AHp−1      , B =        0 0 0 . . . 0 B 0 0 . . . 0 AB B 0 . . . 0 .. . . .. . .. . .. ... AHp−2B . . . AB B 0        (2.7) (2.8) F =        0 0 0 . . . 0 F 0 0 . . . 0 AF F 0 . . . 0 .. . . .. . .. . .. ... AHp−2F . . . AF F 0        (2.9)

Now, if a simple quadratic function is considered, the cost function can be refor-mulated to a more compact form as below

Hp−1 X j=0 kx(k + j)k2 P1+ ku(k + j)k 2 P2 = X TP 1X + UTP2U (2.6) = (2.10)

= (Ax(k) + BU − F EQ)TP1(Ax(k) + BU − F EQ) + UTP2U (2.11)

P1=      P1 P1 . .. P1      , P2=      P2 P2 . .. P2      (2.12)

In Chapter 3, a description of how to derive the prediction model from the trucks dynamical model is presented.

2.2.3

Cost Function

In this subsection, a description of different terms in the cost function that are essential for achieving the control objective in this thesis is presented.

(22)

10 Control Theory

Reference Tracking

Reference tracking is the first property that will be considered in the cost function,

JHp(x(k)) = Hp−1 X j=0 kz(k + j) − r(k + j)k2 P1 (2.13)

where r(k + j), j = 1, ..., Hp−1, are the reference signal for different time instants

in the prediction horizon and z denotes the combination of states that are moni-tored for control. It is difficult to predict the future values of the reference signal, so instead an assumption that r(k + j) = r(k) is made.

Define, R =      r(k) r(k + 1) .. . r(k + Hp− 1)      , Z =      M x(k) M x(k + 1) .. . M x(k + Hp− 1)      =      M M . .. M      X = MX (2.14) where M represents the linear mapping between z and x. Hence this term of the cost function can be compactly rewritten as

(M(Ax(k) + BU − F EQ) − R)TP1(M(Ax(k) + BU − F EQ) − R) (2.15)

Smooth Control

In order to avoid sharp changes in the control signal and provide a smooth control a penalty of the difference between two consecutive control signal values is made. This modifies the cost function as follows,

JHp(x(k)) = Hp−1 X j=0 kz(k + j) − r(k + j)k2P1+ ku(k + j − 1) − u(k + j)k 2 P2 (2.16) Define,      u(k − 1) − u(k) u(k) − u(k + 1) .. . u(k + Hp− 2) − u(k + Hp− 1)      =      −I I −I . .. . .. I −I      | {z }

U +      u(k − 1) 0 .. . 0      | {z }

δ

(2.17) As a result, the cost function in (2.16) can be rewritten compactly as below.

(M(Ax(k) + BU − F EQ) − R)TP1(M(Ax(k) + BU − F EQ) − R) (2.18)

(23)

2.3 Different MPC Architectures 11

2.3

Different MPC Architectures

The MPC controller for controlling the platoon’s behavior can be implemented in centralized and distributed manners. These architectures are discussed below.

2.3.1

Centralized MPC

Centralized MPC means that each vehicle in the platoon solves the same optimiza-tion problem, i.e. each vehicle has informaoptimiza-tion about all the other vehicles such as dynamic, velocity, acceleration. Consequently, each vehicle computes an optimal control signal for every vehicle in the platoon. In Figure 2.1 the centralized MPC is shown, where the surrounding box states that all the vehicles have information about all the other vehicles in the platoon.

Figure 2.1. An overview of how the centralized MPC works. Each vehicle calculates a

control signal for all the other vehicles in the platoon. Adopted from [4].

Centralized control is the traditional way to solve an optimization problem. The major disadvantage is that the optimization problem easily gets very com-plex. As a result, the computational burden for computing the optimal control for platooning in this way can easily exceed the hardware capacity.

2.3.2

Distributed MPC

Distributed MPC is a separation of the centralized one, meaning that each vehicle only has a description of its own dynamic. The global solution is approached iteratively by communication between the nodes, i.e., the HDVs in the platoon in this application. This implies that each vehicle only performs optimization for its own control signal and therefore the control signal can be used immediately after it is computed. In Figure 2.2 the distributed MPC is shown, where the surrounding boxes represent that every vehicle has a description of its own dynamics.

Figure 2.2. An overview of how the distributed MPC is functioning. Each vehicle only

(24)

12 Control Theory

The distributed MPC does generally not perform as well the centralized one but is expected to return a solution that converges to that one. The major advan-tage with the distributed framework is that the complexity of the problem that each vehicle is required to solve is reduced.

To setup a distributed MPC, a decomposition of the centralized minimization problem has to be done. This can be done by dual decomposition methods to-gether with the Alternating Direction Method of Multipliers (ADMM).

2.3.3

Decomposition and ADMM

Consider the following optimization problem minimize

x f1(x) + f2(x), (2.20)

where a minimization of the sum of two so-called coupled functions is conducted. This optimization problem can be equivalently written as below,

minimize x1,x2,x f1(x1) + f2(x2) subject to x1− x = 0 x2− x = 0, (2.21)

where the coupling from the cost function has been moved to the constraints. Define the augmented Lagrangian function for this problem as

Lρ(x1, x2, ¯λ1, ¯λ2) = f1(x1) + f2(x2) + ρ 2kx1− x + ¯λ1k 2+ ρ 2kx2− x + ¯λ2k 2ρ 2k¯λ1k 2ρ 2k¯λ2k 2, (2.22)

Using this definition, the optimization problem in (2.21), can be solved using the following iterative algorithm, where given x(0)2 , ¯λ(0)1 = 0 and ¯λ(0)2 = 0 the update rules are as follows

x(k+1)1 = argmin x1 f1(x1) + ρ 2kx1− x (k)+ ¯λ(k) 1 k 2 (2.23a) x(k+1)2 = argmin x2 f2(x2) + ρ 2kx2− x (k)+ ¯λ(k) 2 k 2 (2.23b) x(k+1)=1 2(x (k+1) 1 + x (k+1) 2 ) (2.23c) ¯ λ(k+1)1 = ¯λ(k)1 + (x(k+1)1 − x(k+1)) (2.23d) ¯ λ(k+1)2 = ¯λ(k)2 + (x(k+1)2 − x(k+1)), (2.23e)

until the convergence criteria

kx(k+1)1 − x(k+1)k ≤ ε

1, (2.24a)

kx(k+1)2 − x(k+1)k ≤ ε

2, (2.24b)

(25)

2.4 Design Variables 13

are satisfied. This algorithm is referred to as the alternating direction method of multipliers (ADMM). Note that the smaller the values chosen for ε1, ε2and ε3are,

the more accurate the achieved results will be. However, this accuracy comes at the cost of higher number of required iterations to satisfy these criteria [8], [9]. As can be seen from the update rules in (2.23) this algorithm is highly parallelizable.

2.4

Design Variables

2.4.1

Prediction Horizon

The prediction horizon Hp is considered as a design variable and to be able to

achieve a nice control it is recommended to choose the prediction horizon such that,

HpTs≥ Tsettling, (2.25)

where Tsettlingcovers a certain settling time for the system. In Section 5.1.1 there

is a description of how Tsettling is determined, [13].

Normally, the Hpis used as a design variable but in some cases Tscan be

con-sidered as a design variable as well. Desirably, Tsis chosen small but that results

in large Hp to fulfill (2.25). One of the disadvantages of choosing a high value for

Hpis that the complexity of the resulting optimization problem increase. This is

due to the fact that the number of variables and constraints increases with Hpand

this results in a larger optimization problem. Also, in case the prediction model is not accurate enough, the computed control signal may not be a good choice for the actual system, [7].

2.4.2

Control Horizon

One way to decrease the high complexity of the MPC controller is to also introduce a control horizon, Hu. The number of free variables are defined as nuHu, where

nu is the number of control signals, and by choosing Hu ≤ Hp the complexity

of optimization problem will therefore be decreased. Consequently, the prediction horizon is still the same only the number of free variables are different. This can be solved in different ways. For example, by keeping u piecewise affine constant during some samples, see Figure 2.3, or perform interpolation between the optimization points see Figure 2.4, [7].

(26)

14 Control Theory

Figure 2.3. Piecewise affine constant control signal

Interpolation:

(27)

Chapter 3

System Description

This chapter contains a description of the dynamic model of an HDV. How this model can be simplified to obtain the final model that is used in the MPC is also shown. The important sensors, networks and existing functionality that are used throughout this master thesis are also described briefly.

3.1

Vehicle Dynamics

In this section, a relatively simple dynamic model for the vehicle is described which will be used in the controller as the prediction model. This model which has been developed using Newton’s second law describes HDV motion dynamics. Next, the dynamics of the powertrain are defined and then the dynamic of the whole vehicle are described. These dynamic models are presented in Section 3.1.1 and Section 3.1.2, respectively. The model of the vehicle and powertrain will be defined as in [6] and [18].

3.1.1

Powertrain

In Figure 3.1 an overview of the powertrain is illustrated. The powertrain consist of a diesel engine, clutch, transmission shaft and finally wheels, [11].

Engine:

The first part of the powertrain is the engine, which produces the driving torque by combustion of diesel and air in a high pressurized chamber. The dynamic model for the engine can be described using Newton’s second law as

Jeω˙e = Te− Tc, (3.1)

where Tcis the external load from the clutch and is described further below,

Jeis the mass moment of inertia of the engine, Teis the engine output torque

(28)

16 System Description

Figure 3.1. A powertrain model obtained from [6].

that depends on the angular velocity of the flywheel (ωe) and the fueling level

(δ) represented as a linear equation, shown below.

Tee, δ) = c1ωe+ c2δ + c3, (3.2)

where c1, c2and c3 are constants.

Clutch:

The flywheel of the engine is connected with the input shaft of the transmis-sion through the clutch consisting of two frictional discs which is the second part of the powertrain. A stiff clutch is considered which implies that changes in torque and angular velocity are provided by the engine through the clutch. Hence, the input torque (Tc) and angular velocity (ωc) remain the same when

they are forwarded to the transmission.

Transmission:

Conversion of the torque will be done in the third part of the powertrain de-pending on the engaged gear. The HDV consists of a 12 geared transmission box and each gear has a specific efficiency constant and conversion ratio,

Tt= icηcTc, (3.3)

icωt= ωe, (3.4)

where ic is the conversion ratio, ηc is the efficiency constant, Ttthe output

torque from the transmission and ωt angular velocity. Ttis the input to the

propeller shaft. Note that the inertia is neglected and the gear shifts are assumed to be instantaneous.

Propeller shaft:

(29)

3.1 Vehicle Dynamics 17

remain the same as the inputs because of the assumption that it is stiff with-out friction. The propeller shaft is the connection between the transmission and the final drive.

Final drive:

The final drive is the fifth part of the powertrain and has characteristics similar to the transmission. It can be described with a conversion ratio if

and efficiency constant ηf,

Td= ifηfTt, (3.5)

ifωd= ωt, (3.6)

where Tdis the output torque and ωdis the angular velocity from the final

drive and will be the input to the drive shaft.

Drive shafts:

The wheels are connected to the final drive through the two drive shafts that are presumed as stiff. Hence, the speed of both wheels are assumed to be the same which implies that there will not be any torque or angular speed losses. So,

Tw= Td, (3.7)

ωw= ωd, (3.8)

where Twis the output torque and ωwthe output angular velocity.

Wheels:

Under the assumption that there is no slip, together with the assumption from above regarding identical wheel speed the following equations describe the wheel motion dynamics

Jwω˙w= Tw− Tb− rwFw, (3.9)

v = rwωw=

rwωe

itif

, (3.10)

where Jw denotes the wheel inertia, v the velocity, rw the wheel radius, Tb

is the brake torque and Fwthe operating force, which is described further in

(30)

18 System Description

Figure 3.2. Forces acting on a vehicle in motion in longitudinal direction. The figure is

obtained from [6].

3.1.2

Longitudinal Dynamic Model

The forces acting on a vehicle in motion are depicted in Figure 3.2. where

Fengine force produced by the engine

Fairdrag airdrag force

Froll friction force

Fgravity gravity force

Fbrake force produced by the brakes

α angle of the inclination of the road

Table 3.1. Description of the parameters from Figure 3.2.

By applying Newtons second law of motion (F = ma) and considering the forces in Figure 3.2 the following equation is given,

ma˙v = Fengine− Fbrake− Fairdrag− Froll− Fgravity, (3.11)

where mais the accelerated mass and v is the longitudinal velocity of the vehicle.

The accelerated mass is the mass that is perceived when a vehicle accelerates.

Fengine and Finertia are given by the description of the whole powertrain in

Equa-tions (3.1) − (3.10), which can be summarized as,

Fw= ificηfηc rw Te | {z } Fengine −Fbrake− ˙v Jw+ i2fi 2 cηfηcJe r2 w | {z } Finertia = Fu− Finertia, (3.12) ma= m + Jw+ i2fi 2 cηfηcJe r2 w , (3.13)

(31)

3.1 Vehicle Dynamics 19

where m is the physical mass of the vehicle and Finertia is the inner force required

for the engine to overcome in order to produce a driving force. Furthermore, Fbrake

is difficult to model because of the nonlinear brake system. In order to control the brakes the Fengine and Fbrake are combined and forms Fu. Fuwill then adopt an

interval with a maximum limit that depends on Fengine and the minimum limit on

Fbrake. The Fairdrag, Froll, Fgravityare described in Section 3.1.3.

3.1.3

Forces

The forces acting on a vehicle in motion are presented below.

Airdrag:

The airdrag force on the moving HDV is given by

Fairdrag(v, d) =

1

2cD(d)Aaρav

2, (3.14)

where Aais the maximal cross sectional area of the HDV, ρa the air density

and d the intermediate distance. cD(d) is the air drag coefficient which

is derived based on an empirical study of the reduction of air drag that occurs when HDVs are driving in a platoon, [2]. This relation is given by

cD= cd(1 −

fi(d)

100) where cdis the commonly used air drag coefficient for an

HDV and fi(d) is the nonlinear function described in (3.15) which is based

on Figure 3.3. The figure illustrates how much the air drag is reduced as a function of the number of vehicles in the platoon and the intermediate distance, d. First order least square approximation is used to linearize fi(d)

and the result is presented below,

f1(d)ls= −0.9379d + 12.8966 0 ≤ d ≤ 15 f2(d)ls= −0.4502d + 43.0046 0 ≤ d ≤ 80

f3(d)ls= −0.4735d + 51.5027 0 ≤ d ≤ 80 (3.15) fi(d)ls= f3(d)ls, i ≥ 4.

Roll:

The roll resistance represents the force that appears between the wheels and the road.

Froll(α) = crmgcos(α), (3.16)

where α is the angle of the slope, g gravity constant and finally cris the roll

coefficient

Gravity:

The gravity force is described as,

(32)

20 System Description

Figure 3.3. Air drag reduction for vehicles in a platoon, [2].

Combining the equations (3.12)−(3.17) results in,

˙vi= r2w Jw+ mrw2 + i2fi2cηfηcJe  ificηfηc rw Te− 1 2cdAaρav 2 +1 2cdAaρav 2fi(d) 100 − crmgcos(α) − mgsin(α)  (3.18)

which can be written as,

˙vi= k1Te− ki(d)v2− k3cos(α) − k4sin(α), (3.19) where k1= rwificηfηc Jwmr2w+ i2fi2cηfηcJe , k2= 1 2r 2 wAaρacd Jwmr2w+ i2fi2cηfηcJe (3.20) k3= crr2wmg Jwmr2w+ i2fi2cηfηcJe , k4= r2 wmg Jwmr2w+ i2fi2cηfηcJe (3.21) Φ(d) = (1 −fi(d) 100 ) (3.22)

(33)

3.1 Vehicle Dynamics 21

3.1.4

Linearization

A linearized model of (3.18) is considered as the prediction model in the controller, in order to avoid difficult optimization problem that may be faced if the nonlinear model is used. This model is obtained by using the Taylor approximation around a given equilibrium points, [3]. Note that α is assumed to be zero according to the assumptions mentioned in Section 1.2 and therefore the linearized model can be written as ˙vi≈ g0(v0, α0, d0, T0) + gv0(v0, α0, d0, T0)∆vi+ gd0(v0, α0, d0, T0)∆di+ + g0T(v0, α0, d0, T0)∆Ti ≈ −2κi(d0)v0∆vi− κ2Φ0(d0)v02∆di+ κ1∆Ti = ai∆vi+ bi∆di,i+1+ ci∆Ti, (3.23) where ∆vi = vi− v0 ∆di= di− d0 ∆Ti = Ti− T0

The equilibrium point are chosen as

eq(k) =   v0 d0 T0  =   vref τhwv0 ki(d0)lsv20+ k3  ,

and are dependent on time k, due to the fact that linearization is done at each time instant k. τhw represents a desired time headway between the vehicles that

are driving in a platoon and Φ0i(d0)ls is the derivative of Φi(d) with respect to d.

Φ0i(d)ls=    0.009379 i = 1 0.004502 i = 2 0.004735 i ≥ 3

In order to get an overview of the state space model a three vehicle platoon is considered and the state space model is then given as

∆x(t) = ∆v1(t) ∆d1,2(t) ∆v2(t) ∆d2,3(t) ∆v3(t)  T , ∆u(t) = ∆T1(t) ∆T2(t) ∆T3(t) T , (3.24) The resulting linear dynamic model can be written in continuous state-space form as

(34)

22 System Description ∆ ˙x(t) =       a1 b1 0 0 0 −1 0 1 0 0 0 b2 a2 0 0 0 0 −1 0 1 0 0 0 0 a3       ∆x(t) +       c1 0 0 0 0 0 0 c2 0 0 0 0 0 0 c3       ∆u(t), (3.25)

where ai, bi and ci are described in (3.23).

3.1.5

Discretization

To be able to use the linearized model in (3.25) as the prediction model, it must be discretized. The discretization method that is applied on the continuous linear model in Section 3.1.4 is Forward Euler Method, [16], [19].

∆ ˙x(t)∆x(k+1)−∆x(k)T s = x(k+1)−x(k) Ts ⇒ v(k + 1) = v(k) + Ts∆ ˙v (3.23) = v(k) + Ts(ai∆vi+ bi∆di,i+1+ ci∆Ti) = v(k) + Ts(aivi(k) + bidi,i+1+ ciTi) − Ts(aiv0+ bid0+ ciT0), d(k + 1) = d(k) + Ts(∆vi+1(k) − ∆vi(k)) = d(k) + Ts(vi+1− vi).

The states and control signals are similar as in Section 3.1.4,

x(k) = v1(k) d1,2(k) v2(k) d2,3(k) v3(k) T , u(k) = T1(k) T2(k) T3(k)  T . (3.26)

Hence, the discrete model on state-space form is

x(k + 1) = Ax(k) + Bu(k) − F eq(k),

where A =       1 + Tsa1 Tsb1 0 0 0 −Ts 1 Ts 0 0 0 Tsb2 1 + Tsa2 0 0 0 0 −Ts 1 Ts 0 0 0 0 1 + Tsa3       , (3.27)

(35)

3.2 Sensors and Networks 23 B = Ts       c1 0 0 0 0 0 0 c2 0 0 0 0 0 0 c3       , F = Ts       a1 b1 c1 0 0 0 a2 b2 c2 0 0 0 a3 b3 c3       (3.28)

Note is that the equilibrium point is represented in F eq(k) instead of the states and control signals.

3.2

Sensors and Networks

3.2.1

Sensors

This section covers the utilized sensors and networks. A more detailed description of the two most utilized sensors, GPS and radar, and the networks CAN and WiFi are described.

Distance and Velocity Sensor:

Each vehicle is equipped with a radar that can measure distance to the vehicle ahead combined with relative velocity. The radar can only function if both the equipped vehicle and the target ahead are in motion and the maximal distance detection and the visual field are limited. The radar can detect objects at four different positions and this is shown in Figure 3.4.

Figure 3.4. An overview of how the radar can measure distance to vehicles at different

position

A vehicle at position RT2 is rarely detected and therefore will not be studied. On the other hand the other three positions RT1, RT3 and RT4 will be taken into account in this project, [21].

Position sensor

(36)

24 System Description

(GPS), [12]. This sensor is used to estimate the position in longitude and latitude, heading and the speed of the vehicle. The GPS is also necessary for getting overview of the platoon and positions of the different vehicles in it. How this is done is described further in [20] and [23].

Other sensors

Other sensors that are used to achieve desired estimations of states are tachometer, which gives the velocity, that also is the velocity shown on the instrumental panel for the driver, and a gyro that estimates the yaw rate, and is mainly used by the Sensor Fusion block to detect curves.

3.2.2

Networks

CAN:

Each HDV consist of a Controller Area Network (CAN) which allows the ECUs to communicate with each other without the need of a master, [17]. The CAN protocol is a message-based protocol and every message contains a priority, depending of how critical the message is, and the content of the data, [22].

WiFi:

To be able to be a part of the platoon a wireless network (WiFi)has to be installed on the vehicle. In this project a 802.11p wireless protocol is used. The desired sensor signals are received from the CAN bus are then broadcasted through the WiFi and are then available to all the other vehicles equipped with WiFi. Everything that is broadcasted via WiFi is tagged with a specific ID, so that it is possible to identify the transmitter vehicle. This communication is called Vehicle-to-Vehicle (V2V) communication. It is worth mentioning that there are other communication types, for instance the Vehicle-to-Infrastructure (V2I) communication which enables the possibility to communicate with e.g, traffic lights [3], however this is not considered in this thesis.

3.3

Existing Functionality

3.3.1

Cruise Control and Adaptive Cruise Control

There are certain control functionalities available on each HDV. In this thesis two of such functionalities are mainly used, namely the Cruise Control (CC) and the Adaptive Cruise Control (ACC). The CC can be switched on manually where also the driver sets a reference speed and the controller maintains it. The ACC is a more advanced controller where the vehicle ahead is also considered. Using the radar the relative distance and velocity are measured and the velocity is adjusted depending on the position of the vehicle ahead. When the radar does not detect a vehicle ahead the behavior of the ACC is the same as the CC.

(37)

3.3 Existing Functionality 25

3.3.2

The Brake Management System

The Brake Management System (BMS) requires a deceleration request as input and is used by, apart from the driver, other existing functionalities in the HDV, e.g. the ACC. The input will then be converted to brake pressure that is pushing the brake pads. Hence, it is assumed that the deceleration request is obtained without delays and disturbance. The BMS contains several non-linearities as well as partial brake systems, thus it is difficult to model.

(38)
(39)

Chapter 4

Implementation

This section describes the implementation of the control system, where centralized and distributed MPC are discussed, and the modifications made to the simulation environment are presented.

4.1

MPC

In this section the implementation for centralized and distributed MPC is de-scribed.

4.1.1

Control Objective

The control objective is defined given the goals presented in Section 1.2 under Project goal. With that in mind, we wish to minimize,

• The difference between the desired and actual distance between HDVs. • The difference in velocity of the HDVs in the platoon.

• The difference between each HDVs velocity and the reference velocity which is the leading HDV’s speed.

• The changes in the control signal.

Based on the mentioned criteria, the objective functions for the centralized and the distributed MPC are introduced in Sections 4.2.1 and 4.2.2, respectively.

4.2

MPC in Supervisory Role

To be able to control an HDV, the computed control signals in the MPC controller still need to be translated for the actuators in the truck. In order to do so, the MPC controller basically provides a reference velocity to the CC and a reference retardation to the BMS. This implies that the MPC will function as a higher level

(40)

28 Implementation

controller over the existing ones. The problem with this is that there does not exist a dynamic model for neither the CC nor BMS. This is illustrated in Figure 4.1.

Figure 4.1. An overview of the multilevel HDV control.

The converter shown in Figure 4.1 has the functionality to change the control signal from torque to either vref or rref. This is done using the following relation:

Te> −200, vref= v(k + 1) (4.1)

Te∗≤ −200, r∗ref=

v(k + 1) − v(k) Ts

(4.2)

−200 ≤ Te ≤ 0 implies that the engine brakes. The actual engine torque can not

adopt values less than −200 but has been extended, in order to control the brakes as described in Section 3.1.1. If the brake pedal is pressed down manually by the driver, the brake signal is forwarded directly via WiFi to the other vehicles in the platoon behind. If the pedal is pressed down by, for example 20%, all the vehicles will press down the pedal 20% and under the assumption of identical dynamics mentioned in Section 1.2, this should result in an equal amount of braking.

4.2.1

Centralized MPC

A centralized MPC has been implemented based on the theory described in tion 2.3.1, the dynamics in Section 3.1.5 and the objectives presented in

(41)

Sec-4.2 MPC in Supervisory Role 29

tion 4.1.1. Combining these results the following optimization problem is obtained.

min u N −1 X i=1 P1kDi,i+1− τhwVik2+ N X i=1 P2kVi− Vi+1k2+ P3kUik2+ P4k∆Uik2 (4.3) subject to X = Ax(k) + BU − F EQ dmin≤ Di≤ dmax vmin≤ Vi≤ vmax umin≤ Ui ≤ umax where Di,i+1(k) =    di,i+1(k) .. . di,i+1(k + Hp− 1)   , Vi(k) =    vi(k) .. . vi(k + Hp− 1)    (4.4) Ui(k) =    ui(k) .. . ui(k + Hp− 2)   , (4.5) ∆Ui(k) =    ui(k) − ui(k − 1) .. . ui(k + Hp− 2) − ui(k + Hp− 3)   , (4.6)

where i = 1, 2, ..., N , N is the number of vehicles and i = N represent the leading vehicle. The constraints dmin, vmin, umin are set according to the minimum

per-mitted intermediate distance, velocity and engine torque, correspondingly dmax,

vmax, umaxare the maximum permitted intermediate distance, velocity and engine

torque.

4.2.2

Distributed MPC

A distributed MPC has been implemented based on the theory in Sections 2.3.2, 3.1.5 and 4.2.1. To easily show how the decomposition is done, only two vehicles are considered. Initially, the two vehicles centralized cost function is presented on prediction form where Hpis the prediction horizon.

(42)

30 Implementation min u g(D1,2(k), V1(k), V C1 2 (k), U1(k))+f (V C2 2 (k), U2(k)) subject toD1,2(k + 1) = D1,2(k) + Ts(V2(k) − V1(k)) V1(k + 1) = V1(k) + Ts(a1∆V1(k) + b1∆D1,2(k) + c1∆U1(k)) (4.7) dmin≤ D1,2(k) ≤ dmax vmin≤ V1(k) ≤ vmax

umin≤ U1(k) ≤ umax

V2(k + 1) = V2(k) + Ts(a2∆V2(k) + c2∆U2(k))

vmin≤ V2(k) ≤ vmax

umin≤ U2(k) ≤ umax

Similar to Section 2.3.3, this optimization problem can be rewritten as below. When Lagrangian and ADMM algorithms from Section 2.3.2 are applied the de-coupling of the cost function is performed. Hence, each vehicle solves its own optimization problem and the appearance is as,

Vehicle 1:

{V(i+1)1 (k), VC1,(i+1)2 (k), D1,2(k), U(i+1)1 (k)}= (4.8) argming(D1,2(k), V1(k), VC12 (k), U1(k)) +ρ 2kV C1 2 (k) − V (i) 2 (k) + ¯λ (i) 1 k 2 subject toD1,2(k + 1) = D1,2(k) + Ts(VC12 (k) − V1(k)) V1(k + 1) = V1(k) + Ts(a1∆V1(k) + b1∆D1,2(k) + c1∆U1(k)) dmin≤ D1,2(k) ≤ dmax vmin≤ V1(k) ≤ vmax vmin≤ VC12 (k) ≤ vmax

umin≤ U1(k) ≤ umax

Vehicle 2: {V2C2,(i+1)(k), U2(i+1)(k)}= (4.9) argminf (V2C2(k), U2(k)) + ρ 2kV C2 2 (k) − V (i) 2 (k) + ¯λ (i) 2 k 2 subject toV2C2(k + 1) = V2C2(k) + Ts(a2∆V2C2(k) + c2∆U2(k)) vmin≤ V2C2(k) ≤ vmax umin≤ U2(k) ≤ umax where g(.)=P1kD1,2− τhwV1k2+ P2kV1− V2k2+ P3kU1k2+ P4k∆U1k2 f (.)= P4kU2k2+ P5k∆U2k2+ P6kR − V2k2

(43)

4.3 Additional Functionality 31

After each vehicle solved these optimization problems the vehicles communicate with each other and updates the variables Vjand ¯λj, where j is number of vehicles.

Vehicle 1:

V2(i+1)(k) = 1 2(V

C1,(i+1)(k) + VC2,(i+1)(k)) (4.10)

¯

λ(i+1)1 = ¯λi1+ V2C1,(i+1)(k) − V2(i+1)(k) (4.11)

Vehicle 2:

V2(i+1)(k) = 1 2(V

C1,(i+1)(k) + VC2,(i+1)(k)) (4.12)

¯

λ(i+1)2 = ¯λi2+ V2C2,(i+1)(k) − V2(i+1)(k) (4.13) The iterations have to be performed until certain criteria are satisfied:

kV2C1,(i+1)(k) − V2(i+1)(k)k < ε1, (4.14)

kV2C2,(i+1)(k) − V2(i+1)(k)k < ε2, (4.15)

kV2(i+1)(k) − V2i(k)k < ε3, (4.16)

εi, i = 1, 2, 3, are chosen such that the solution is close enough to the optimal one.

When the criteria are fulfilled the control signals can be used immediately in each one of the vehicles.

4.3

Additional Functionality

In this section, the additional functionality that is necessary for the platoon to behave appropriately is described.

4.3.1

Categorization

One of the tasks conducted by the Sensor Fusion block is the categorization of vehicles in and in the neighborhood of interest of the platoon. This enables the possibility to make decisions on how the MPC control problem should look like. There are four major categories of vehicles, namely,

Unknown vehicle:

An unknown vehicle is defined as a vehicle without WiFi. Hence, no infor-mation about the vehicle states is available.

Transmitting vehicle in the platoon:

A transmitting vehicle in the platoon is an HDV equipped with WiFi that is a part of the platoon.

(44)

32 Implementation

Transmitting vehicle not in the platoon:

A transmitting vehicle not in the platoon is a vehicle equipped with WiFi that is not a part of the platoon. For example, the vehicle that is driving in the opposite direction and sending data is categorized in this class and therefore no estimation on that vehicle will be performed. A transmitting vehicle in the neighboring lane moving in the same direction is also a part of this category, however estimation of this vehicle is done as long as it is within a specific range, in case it decides to enter the platoon.

Leading vehicle

The leading vehicle is the HDV at the head of the platoon and is of great importance to the controller. This is for instance due to the fact that the velocity of this HDV acts as the reference velocity for the rest of the HDVs in the platoon.

Among the mentioned categories the ones of interest for the controller are Unkown

vehicle, Sending vehicle in the platoon and Leading vehicle. How the categorization

is done is described in [20].

4.3.2

Control Logic

Safety in platooning applications has been discussed in [4]. To obtain safety, a con-trol logic part is implemented to be able to handle problems that can occur during platooning. Wifi loss, unknown vehicle entering the platoon and a low accuracy of the sensor data are three of the scenarios that are taken into account in this thesis.

The idea of this control logic is to define the strategy before the estimated data from the Sensor Fusion block reaches the MPC. The time headway is determined depending on the situation, which results in longer intermediate distance when for instance the sensor data has a low accuracy. The control logic is described as a flow chart shown in Figure 4.2. The accuracy is referred to as variance in the chart.

4.3.3

Analysis of Sample Time

An analysis of the choice of Tsis necessary to keep the complexity of the

optimiza-tion problem down. This is done by studying the worst-case scenario for different sampling times.

The standard driving speed for HDVs is assumed to be 70km/h. By letting the time headway be 0.5 seconds, the desired intermediate distance between HDVs is approximately 10 meters. In this case, one of the worst case scenarios that can happen is the entrance of a non-transmitting vehicle around 15 meters in front of the platoon. The question is how many meters the platoon will travel before a decision is made. This is shown in Table 4.1.

(45)

4.3 Additional Functionality 33

(46)

34 Implementation Ts [s] Worst-case [m] 0.2 3.8 0.4 7.8 0.6 11.7 0.8 15.5 1 19.5

Table 4.1. The sampling times evaluated for a worst-case scenario.

By balancing the two factors, namely short sampling time versus low complex-ity, the sampling time should not exceed Ts= 0.4. According to [4] the minimum

allowable intermediate distance between two HDVs with identical dynamics is 1.2 meter. However, this is under the assumption that there is no delay in the system. To avoid collisions in case of delays the minimum intermediate distance should be increased. As a result for a delay of 500 ms the minimum allowed distance is increased to 2 meters, [4].

4.4

Simulation

The simulation environment that has been used throughout this thesis is a detailed description of a Scania HDV containing for instance a description of the CC, the gearbox and also the surrounding environment, implemented in Simulink by Sca-nia CV AB. To be able to simulate platooning, several of these vehicles are used and are started with a specific time headway, τhw, between the HDVs. Some

addi-tions to the model have been made to fit the requirements, for example simulate the sensor data (GPS, radar and tachometer), simulate WiFi loss and let non-transmitting vehicles enter the platoon. The reduced air drag, which is the result of when vehicles driving in a platoon, was also added to the model to be able to determine the reduced fuel consumption.

Each vehicle was initially equipped with a controller and afterwards also with the Estimator block and Sensor Fusion block. The controller that has been used during the total system simulations is the centralized MPC. Because of the time constraints on this project the distributed MPC was not used in the simulations.

(47)

Chapter 5

Results

This chapter reports all the results achieved from simulations that are designed to test the system on the stated objectives. Firstly, the results from the individual project are presented and secondly, the results from the common project are given.

5.1

Individual Project

In this section, the results for the individual project, MPC, are presented. These results include both centralized and distributed MPC.

5.1.1

Determination of Settling Time

By using a step as input to the vehicle the settling time, Tsettlingis determined [14].

Figure 5.1 illustrates the step response of the system for this purpose. The settling time is set to 20 s, because it takes around 20 s for the signal to increase from 70 km/h to 80 km/h and stabilize. It should also be pointed out that a gear change has been done at time 25, which appears as a short velocity drop.

5.1.2

Centralized MPC

The centralized MPC has been implemented with three vehicles driving in the platoon. Figure 5.2 illustrates the result when the leading vehicle performs refer-ence tracking. Smooth control is also included in the controller. The vehicles have identical dynamics and τhw is set to 1 s, which implies a intermediate distance of

19.44 m if the vehicles are driving at a velocity of 70 km/h.

In the uppermost part of Figure 5.2 it can be seen that when the velocity changes from 70 to 80 km/h, the acceleration in all the HDVs are not performed exactly at the same time. This is due to the time dependent intermediate distance. If the velocity decreases the intermediate distance also should decrease and vice versa. As seen in the lowermost part in Figure 5.2 the distance oscillates a bit. This depends on how the weight matrices are set. The rather large top at time

(48)

36 Results 0 10 20 30 40 50 60 70 80 68 70 72 74 76 78 80 82

Step function as input to the system

Time [s]

Velocity [km/h]

Step respone Reference

Figure 5.1. Step response of the vehicle.

150 s that is seen is because of undershoots that appear with the velocity decrease.

By running the same scenario with a linear system instead of a non-linear system, the desired behavior is obtained. This is shown in Figure 5.3. The linear model does not include phenomena such as gear changes and this results in a very well behaved control. The time varying intermediate distance functions as a damper and provides a smoother control.

5.1.3

Distributed MPC

The test scenario for the distributed MPC is similar to the centralized one, though it is only tested with the linear model.

As can be seen in Figure 5.4 the behavior is similar, but not as smooth as the centralized one. This is most visible in the lowermost part of Figure 5.4. One of the design variables for the distributed MPC is the threshold in the stopping criteria. A lower threshold provides a more precise solution.

5.1.4

Computational Demand

One of the disadvantages with the MPC is the high computational complexity. Furthermore, both types of MPC have been analyzed by varying the control hori-zon, Huand prediction horizon, Hp. This test has been done with a linear model

of the system with τhw = 1 s and duration of 100 s. Given from Section 4.3.3 Ts

References

Related documents

The result is a control strategy that is less accurate in the sense of fuel model compared to the constant gear case but has the ability to plan Eco-roll action in a fuel efficient

Med avseende på att Chen et al (2004) med flera kommit fram till att det inte föreligger ett negativt samband mellan storlek och avkastning i familjefonder och med det

Then we start from Level 4 and work upwards (or backwards) when defining the system’s resilience. This includes two tasks. First, one has to have or define the methodology,

Detta kapitel ska ligga till grund för att kunna förstå vilka faktorer som ligger bakom att företag väljer att antingen bedriva Facility Management-funktionen

Figure 21: The results show that the change in the state which represents the dierence between the reference signal and the rst vehicles velocity and the state representing

Modeling of HDV platoon includes three different aspects: first of all, the properties, basic operations and advanced operations of an HDV platoon; secondly, the impacts of spacing

The difference in electrical output characteristics between the two different kinds of samples might be explained according to the mechanism discussed above, taking into account

Participant 2’s sketches were different in that they did not form a whole interface, rather they described a per view functionality that could be combined with other views, see