20
Chapter 8 Optimal Control Using Pontryagin’s Maximum Principle and Dynamic Programming Bart Saerens, Moritz Diehl, and Eric Van den Bulck Abstract. This chapter describes the application of Pontryagin’s Maximum Princi- ple and Dynamic Programming for vehicle driving with minimum fuel consumption. The focus is on minimum-fuel accelerations. For the fuel consumption modeling, a six-parameter polynomial approximation is proposed. With the Maximum Princi- ple, this consumption model yields optimal accelerations with a linearly decreasing acceleration as a function of the velocity. This linear acceleration behavior is also observed in real traffic situations by other researchers. Dynamic Programming is implemented with a backward recursion on a specially chosen distance grid. This grid enables the calculation of realistic gear shifting behaviour during vehicle accel- erations. Gear shifting dynamics are taken into account. 8.1 Introduction Transport is known to be the fastest rising source of CO 2 and other pollutant emis- sions. Environmental issues, the dependency on oil and the increasing fuel prices trigger the interest of lowering the fuel consumption of vehicles. Four distinct meth- ods to achieve this, exist: 1. fuel: by using alternative fuels; 2. vehicle: by improving vehicle technology; lowering rolling friction, air resistance and vehicle weight, and increasing powertrain efficiency; 3. road: by adapting the infrastructure and traffic management; and 4. driver: by changing the driving behavior. Bart Saerens and Eric Van den Bulck Department of Mechanical Engineering, Katholieke Universiteit Leuven, Celestijnenlaan 300, B-3001 Heverlee, Belgium e-mail: {bart.saerens,eric.vandenbulck}@mech.kuleuven.be Moritz Diehl Optimization in Engineering Center (ESAT/SCD), Katholieke Universiteit Leuven, Kasteelpark Arenberg 10, B-3001 Heverlee, Belgium e-mail: [email protected] L. del Re et al. (Eds.): Automotive Model Predictive Control, LNCIS 402, pp. 119–138. springerlink.com c Springer-Verlag Berlin Heidelberg 2010

Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

Chapter 8Optimal Control Using Pontryagin’s MaximumPrinciple and Dynamic Programming

Bart Saerens, Moritz Diehl, and Eric Van den Bulck

Abstract. This chapter describes the application of Pontryagin’s Maximum Princi-ple and Dynamic Programming for vehicle driving with minimum fuel consumption.The focus is on minimum-fuel accelerations. For the fuel consumption modeling, asix-parameter polynomial approximation is proposed. With the Maximum Princi-ple, this consumption model yields optimal accelerations with a linearly decreasingacceleration as a function of the velocity. This linear acceleration behavior is alsoobserved in real traffic situations by other researchers. Dynamic Programming isimplemented with a backward recursion on a specially chosen distance grid. Thisgrid enables the calculation of realistic gear shifting behaviour during vehicle accel-erations. Gear shifting dynamics are taken into account.

8.1 Introduction

Transport is known to be the fastest rising source of CO2 and other pollutant emis-sions. Environmental issues, the dependency on oil and the increasing fuel pricestrigger the interest of lowering the fuel consumption of vehicles. Four distinct meth-ods to achieve this, exist:

1. fuel: by using alternative fuels;2. vehicle: by improving vehicle technology; lowering rolling friction, air resistance

and vehicle weight, and increasing powertrain efficiency;3. road: by adapting the infrastructure and traffic management; and4. driver: by changing the driving behavior.

Bart Saerens and Eric Van den BulckDepartment of Mechanical Engineering, Katholieke Universiteit Leuven,Celestijnenlaan 300, B-3001 Heverlee, Belgiume-mail: bart.saerens,[email protected]

Moritz DiehlOptimization in Engineering Center (ESAT/SCD), Katholieke Universiteit Leuven,Kasteelpark Arenberg 10, B-3001 Heverlee, Belgiume-mail: [email protected]

L. del Re et al. (Eds.): Automotive Model Predictive Control, LNCIS 402, pp. 119–138.springerlink.com c© Springer-Verlag Berlin Heidelberg 2010

Page 2: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

120 B. Saerens, M. Diehl, and E. Van den Bulck

This chapter focusses on the latter. Numerous studies show the influence of thedriving style on fuel consumption [17, 12, 11]. Research predicts that by adaptingthe driving style, fuel consumption can be reduced by 15 to 25% [16, 36].

Thanks to the increasing environmental awareness of drivers, minumum-fuel driv-ing1 has become more and more popular. Ecodriving2 is a set of rules for a fuelefficient driving style. Several studies show that ecodriving can reduce fuel con-sumption on average between 15 and 25% in short term periods. On long term pe-riods, old driving habits will re-emerge and consumption savings are between 5 and8% [13]. Ecodriving tools are also emerging (e.g. gear selection indicators, force-feedback accelerator pedals, FEST [34],...). These minumum-fuel driving aids canonly reach their maximum potential if they are based on optimal control algorithmsthat minimize the fuel consumption. This chapter discusses the use of optimal con-trol as a basis for minumum-fuel vehicle driving. Only conventional powertrains areconsidered (no hybrid or CVT) and the main focus is on accelerations.

Section 8.2 gives an overview of different methods for optimal control and givessome more details on Pontryagin’s Maximum Principle and Dynamic Programming.Since optimal control is model-based, Sect. 8.3 discusses the vehicle and power-train modeling. There will be a focus on the fuel consumption modeling, which isessential for minumum-fuel driving. Based on the described model, Sects. 8.4 and8.5 apply optimal control for vehicle accelerations. In Sect. 8.4 this is done withPontryagin’s Maximum Principle, which gives an analytical insight in the problem,yet is rather complex. Section 8.5 uses Dynamic Programming. With this simplemethod, gear shifting can be included. Section 8.6 compares the results of the Max-imum Principle and Dynamic Programming and also compares them with resultsfrom other research. Section 8.7 concludes the chapter.

8.2 Optimal Control

Optimal control3 uses dynamic system models to minimize an objective function,with multiple constraints taken into account. Consider the following simplified op-timal control problem in ordinary differential equations (ODE):

minx(.),u(.),te

∫ te0 L(x(t), u(t))dt + E(x(te)), (8.1a)

subject to

x(0)− x0 = 0, (initial value) (8.1b)

x(t)− f (x(t), u(t)) = 0, ∀t ∈ [0, te], (ODE model) (8.1c)

h(x(t), u(t)) 0, ∀t ∈ [0, te], (path constraints) (8.1d)

r(x(te)) = 0. (terminal constraints) (8.1e)

1 Driving with an adapted driving style in order to save fuel.2 www.ecodrive.org3 Also referred to as dynamic optimization.

Page 3: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 121

The problem is visualized in Figure 8.1. The goal is to minimize an objective func-tion (8.1a), that can consist of a Mayer term E and a Lagrange term L, subject tocertain constraints. The horizon length te can be fixed or free for optimization. Theabove formulation is by far not the most general. Unnecessary notational overheadis avoided by omitting e.g. differential algebraic equations (DAE), multi-phase mo-tions, or coupled multipoint constraints, which are, however, all treatable by selectedoptimal control methods.

Generally speaking, there are three basic approaches to address optimal controlproblems: (a) indirect methods, (b) Dynamic Programming and (c) direct methods,cf. the top row of Figure 8.2.

(a)Indirect methods use the necessary conditions of optimality of the infinite prob-lem to derive a boundary value problem (BVP) in ordinary differential equations(ODE), as e.g. described in [9]. This BVP must numerically be solved, and the ap-proach is often sketched as “first optimize, then discretize”. The class of indirectmethods encompasses also the well known calculus of variations and the Euler-Lagrange differential equations, and Pontryagin’s Maximum Principle [28]. Thenumerical solution of the BVP is mostly performed by shooting techniques or bycollocation. The two major drawbacks are that the underlying differential equa-tions are often difficult to solve due to strong nonlinearity and instability, andthat changes in the control structure, i.e. the sequence of arcs where differentconstraints are active, are difficult to handle: they usually require a completelynew problem setup. Moreover, on so called singular arcs, higher index DAE arisewhich necessitate specialized solution techniques.

(b)Dynamic Programming [3, 5] uses the principle of optimality of subarcs to com-pute recursively a feedback control for all times t and all x0. In the continuoustime case, this leads to the Hamilton-Jacobi-Bellman (HJB) equation, a partialdifferential equation (PDE) in state space. Methods to numerically compute so-lution approximations exist, e.g. [24] but the approach severely suffers from Bell-man’s “curse of dimensionality” and is restricted to small state dimensions, likethe application in this paper.

terminalconstraint r(x(te)) = 0

path constraints h(x,u) 0

initial valuex0

states x(t)

controls u(t)

0 t

te

Fig. 8.1 Simplified optimal control problem

Page 4: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

122 B. Saerens, M. Diehl, and E. Van den Bulck

Optimal Control

Dynamic Programming

(Hamilton-Jacobi-BellmanEquation):

Tabulation inState Space

Indirect Methods(Pontryagin Maximum

Principle):Solve Boundary Value

Problem

Direct Methods:Transform into Nonlinear

Program (NLP)

Single Shooting:Only discretized controls in

NLP(sequential)

Collocation:Discretized controls and

states in NLP(simultaneous)

Multiple Shooting:Controls and node start

values in NLP(simultaneous)

Fig. 8.2 Overview of numerical methods for optimal control

(c)Direct methods [6, 7, 23, 31] transform the original infinite optimal control prob-lem into a finite dimensional nonlinear programming problem (NLP). This NLPis then solved by variants of state of the art numerical optimization methods, andthe approach is therefore often sketched as “first discretize, then optimize”. Oneof the most important advantages of direct compared to indirect methods is thatthey can easily treat inequality constraints, like the inequality path constraintsin the formulation above. This is because structural changes in the active con-straints during the optimization procedure are treated by well developed NLPmethods that can deal with inequality constraints and active set changes. All di-rect methods are based on a finite dimensional parameterization of the controltrajectory, but differ in the way the state trajectory is handled, cf. the bottom rowof Figure 8.2.

For solution of constrained optimal control problems in real world applications,direct methods are nowadays by far the most widespread and successfully used tech-niques. However, for rather simple optimal control problems, indirect methods andDynamic Programming still have their value. The analytical nature of Pontryagin’sMaximum Principle enables one to get a physical insight in the control problem.Dynamic Programming is very easy to implement and can easily handle all sortsof constraints and dynamics. Therefore, this paper will use the latter two methods

Page 5: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 123

to solve the minumum-fuel vehicle driving problem. The remainder of this Sectionwill briefly discuss these two methods.

8.2.1 Pontryagin’s Maximum Principle

This indirect method can solve rather complex control problems, yet for illustration,a very simple one is considered:

minx(.),u(.),te

∫ te0 L(x(t), u(t), t) dt, (8.2a)

subject to:

x(0)− x0 = 0, (initial value) (8.2b)

x(t)− f (x(t), u(t)) = 0, ∀t ∈ [0, te], (ODE model) (8.2c)

h(u(t)) 0, ∀t ∈ [0, te], (control constraints) (8.2d)

x(te)− xe = 0, (terminal constraints)(8.2e)

with L the Lagrange objective function, x the state variables and u the controls.The controls can be constrained, for simplicity the state variables are consideredunconstrained. To solve the optimal control problem with the Maximum Principle[9], the Hamiltonian H is defined:

H (x(t), u(t), λ (t), t) ≡ L(x(t), u(t), t)+λ T [ f (x(t), u(t), t)] . (8.3)

Here, λ are the adjoint variables that augment the system. The dynamics of thesevariables are given by:

λ ∗(t) = −∂H

∂x(x∗(t), u∗(t), λ ∗(t), t) . (8.4)

The superscript ∗ denotes optimality. Optimal control is achieved by choosing con-trols u∗ that minimize the Hamiltonian at each time instant, for given state and ad-joint variables:

H (x∗(t), u∗(t), λ ∗(t), t)︸ ︷︷ ︸

=M (t)

H (x∗(t), u(t), λ ∗(t), t) , h(u∗(t)) 0. (8.5)

Thus, the optimal control problem is translated to a boundary value problem withdynamics (8.2c,8.4). Constraints on the state variables are given by equations(8.2b,8.2e), contraints on the controls by equation (8.2d). Possible terminal con-straints on the adjoint variables are given by the following equations:

λ ∗i (te)δxe,i = 0 and H (x∗(te), u∗(te), λ ∗(te), te) δ te = 0, (8.6)

where δxe,i = 0 if xe,i is contrained and δ te = 0 if δ te is constrained. Thus whena state variable xi has no terminal constraint, the according adjoint variables λi has

Page 6: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

124 B. Saerens, M. Diehl, and E. Van den Bulck

one. The actual optimization is done analytically and one has to find the initial valuesfor the adjoint variables λ (0), so that possible terminal constraints are met.

8.2.2 Dynamic Programming

Dynamic Programming uses discrete system models. Consider the following opti-mal control problem:

mins,q

∑N−1i=0 li(si, qi) + E (sN) , (8.7a)

subject to

s0 − x0 = 0, (initial value) (8.7b)

si+1 − fi (si, qi) = 0, i = 0, . . . ,N −1, (discrete system) (8.7c)

hi (si, qi) 0, i = 0, . . . ,N, (path constraints) (8.7d)

r (sN) = 0. (terminal constraints) (8.7e)

s are the discretized state variables and q the discretized controls. Dynamic Pro-gramming can easily get rid of inequality constraints hi and r by giving infinitecosts li (s, q) or E(s) to infeasible points (s, u). The basis of Dynamic Programmingis a backward iteration. For k = N −1, N −2, . . .:

Jk(s) = minq

lk (s, q)+ Jk+1 ( fk (s, q))︸ ︷︷ ︸

=Jk(s,q)

, (8.8)

starting with:JN(s) = E(sN). (8.9)

Based on Jk, one can obtain feedback laws for k = 0, 1, . . . , N −1:

q∗k = argminq

lk (s, q)+ Jk+1 ( fk (s, q))︸ ︷︷ ︸

=Jk(s,q)

. (8.10)

For given initial values s0, one can thus obtain the optimal trajectories of sk and qk

by the closed-loop system:

sk+1 = fk (sk, q∗k (sk)) . (8.11)

This is a forward recursion yielding q0, . . . , qN−1.

8.3 Vehicle and Powertrain Model

This Section covers the modeling of the vehicle and the powertrain. Only longitudi-nal dynamics are considered. The powertrain consists of a combustion engine and adriveline (clutch, gearbox and differential).

Page 7: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 125

8.3.1 Vehicle and Driveline Model

The total load force Fl [N] on the wheels of the vehicle is given by:

Fl = λMdvdt︸ ︷︷ ︸

inertia

+ Scdρav2

2︸ ︷︷ ︸aerodynamic resistance

+ crMgcosφ︸ ︷︷ ︸

rolling friction

+ Mgsinφ︸ ︷︷ ︸road slope

, (8.12)

where M [kg] is the mass of the vehicle, λ [-] takes the rotational inertia of thedriveline into account, S [m2] is the frontal surface of the vehicle, cd [-] the dragcoefficient of the vehicle, ρa [kg/m3] the density of air, v [m/s] the velocity of thevehicle, cr [-] the rolling friction coefficient, g = 9.81m/s2 the gravity accelerationand φ [rad] the slope of the road.

The driveline converts the force on the wheels of the vehicle into a torque T [Nm]on the engine shaft. This is modeled by means of algebraic relations:

Flv = ωTηm, (8.13)

where ω [rad/s] is the engine rotation speed and ηm [-] the power transmissionefficiency, which is considered constant. Further:

v = Rwω

idig, (8.14)

where Rw [m] is the effective rolling radius of the wheels, id [-] the reduction ratioof the differential and ig [-] the reduction ratio of the gearbox.

Table 8.1 shows the parameters of the vehicle and driveline model, for a medium-size passenger car.

Table 8.1 Parameters of the vehicle and driveline model

M 1365 kg

λ 1.089 -

Rw 0.316 m

id 4.31 -

ig [3.32, 2, 1.36, 1.01, 0.82] -

ηm 0.95 -

cr 0.015 -

Scd 0.65 m2

ρa 1.2 kg/m3

8.3.2 Engine Model

The engine is modeled as a black box. The engine speed n [rpm] or ω [rad/s] is thestate variable, the engine brake torque T [Nm] (torque at the engine shaft) is the

Page 8: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

126 B. Saerens, M. Diehl, and E. Van den Bulck

control and the fuel mass flow rate mf [kg/s] is the output. Another possibility is touse, instead of n and T , the vehicle velocity v [m/s], acceleration a [m/s2], and thegear i [-] [21, 29].

Since in this paper we want to minimize the fuel consumption of a vehicle, themodeling of the consumption is a very important issue. A first method is to usemapped data, or piecewise affine approximations of this data [21, 4]. Although thismethod is very accurate, it has some disadvantages: it takes a lot of time to performengine tests to obtain detailed consumption maps if they are not provided by theengine manufacturer and this method is not appropriate for indirect optimal control,where one prefers simple analytical expressions. Polynomials are a good candidatefor such an analytical expression and they are commonly used [33, 27, 32, 10, 35,22]. This paper will also use a polynomial approximation of the fuel consumption.The goal is to make this model as simple as possible, while still being useful.

A first condition for an appropriate polynomial function can be derived usingPontryagin’s Maximum Principle. Consider the simplified minumum-fuel problemwith a generic driveline:

minω(.),T (.),te

∫ te

0mf (ω(t), T (t)) dt, (8.15a)

subject to:dω(t)

dt=

T (t)− l(ω)I

, ∀t ∈ [0, te], (8.15b)

Tmin(ω(t)) T (t) Tmax(ω(t)), (8.15c)

with l(ω) [Nm] a load function and I [kg·m2] the rotational inertia. A generic fuelconsumption polynomial is proposed:

mf (ω , T ) = mf0(ω)+ esfc(ω , T )ωT, (8.16)

with mf0 [kg/s] the fuel mass flow rate at zero torque and esfc [kg/J] the “extra spe-cific fuel consumption”. Using the Maximum Principle, the Hamiltonian is given by:

H = mf0(ω)− λI

l(ω)+(λI

+ esfc(ω , T )ω)

T. (8.17)

The optimal torque T ∗, is the torque that minimizes H . If the esfc is independentof T , then T ∗ = Tmin or T ∗ = Tmax, depending on the sign of λ

I + esfc(ω)ω . Thisyields that an acceleration with a vehicle should be “full throttle”, which is not a re-alistic result [30]. Therefore, the first condition for an appropriate fuel consumptionpolynomial is that the esfc is a function of the torque T .

Furthermore, a second consideration about the fuel consumption should be made.Talking about minimizing fuel consumption, most researchers have the specific fuelconsumption sfc= mf

ωT [kg/J] in mind. Although when comparing the fuel consump-tion of cars, the mileage is the most relevant. Since a car always has the task totravel a certain distance, the fuel consumption per traveled distance is the primaryobjective. Considering a fixed gear, this translates into a consumption per rotation

Page 9: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 127

Table 8.2 Parameters of the engine model

a1 1.1046×10−5 kg/rad

a2 −7.7511×10−8 kg·s/rad2)

a3 1.6958×10−10 kg·s2/rad3)

a4 1.7363×10−8 kg/(rad·Nm)

a5 6.4277×10−11 kg·s/(rad2·Nm)

a6 1.6088×10−10 kg/(rad·Nm2)

b1 1.5545 Nm·s/rad

b2 −4.8907×10−3 Nm·s2/rad2

b3 4.0442×10−6 Nm·s3/rad3

cpr [kg/r] of the engine. In order to model the consumption per traveled distance ofa car to a certain degree of accuracy, the cpr should at least be a quadratic functionof the engine speed. Therefore, the fuel mass flow rate should be at least cubic inω (or n).

Taken the two previous considerations into account, a polynomial approximationof the fuel consumption is proposed:

mf = a1ω+ a2ω2 + a3ω3 + a4ωT + a5ω2T + a6ωT 2. (8.18)

This model is identified with measurements on an engine dynamometer4, Table 8.2shows the parameters. Note that these parameters do not model the idle consumptionvery well, however this is of secondary importance when accelerating a vehicle.

Fig. 8.3 Fuel mass flow rate mf [g/s]

4 1.6l gasoline engine, 81kW, 150Nm.

Page 10: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

128 B. Saerens, M. Diehl, and E. Van den Bulck

Fig. 8.4 Consumption per rotation cpr [mg/r]

Fig. 8.5 Specific fuel consumption sfc [g/kWh]

The maximum torque Tmax is a function of ω :

Tmax(ω) = b1ω+ b2ω2 + b3ω3. (8.19)

The parameters are given in Table 8.2. The minimum torque Tmin is negative and isdetermined by the friction of the engine and driveline, the vehicle dynamics and thebrakes. Since accelerations only use positive torques, the lower torque limit will notbe considered in this paper.

Figures 8.3,8.4 and 8.5 show the fuel mass flow rate, the consumption per ro-tation and the specific fuel consumption of the engine respectively, as modeled by(8.18).

Page 11: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 129

8.4 Minumum-fuel Acceleration with the Maximum Principle

In this Section, we solve the minumum-fuel vehicle driving problem with Pontrya-gin’s Maximum Principle. This approach has already been used by Schwarzkopf andLeipnik [32] and by Stoicescu [33]. Stoicescu uses a 4-parameter fuel consumptionpolynomial approximation, with the esfc independent of T and indeed obtains bang-off-bang controls. Schwarzkopf and Leipnik use a better 9-parameter polynomialapproximation and obtain realistic results for selected driving loads. This Sectionuses the fuel consumption model (8.18).

Consider the following minumum-fuel vehicle acceleration problem in a fixedgear:

minω(.),T (.),te

∫ te

0mf (ω(t),T (t))dt, (8.20a)

subject to:

ω(0)−ω0 = 0, (8.20b)

ω(te)−ωc = 0, (8.20c)

dω(t)dt

− T (t)− l(ω)I

= 0, ∀t ∈ [0, te], (8.20d)

θ (0) = 0, (8.20e)

θ (te)−θe = 0, (8.20f)

dθ (t)dt

−ω(t) = 0, ∀t ∈ [0, te], (8.20g)

Tmin(ω(t)) T (t) Tmax(ω(t)), ∀t ∈ [0, te]. (8.20h)

The aim is to accelerate a vehicle from a initial velocity v0 to a cruising velocity vc,with minimum fuel consumption mf, on a level road (φ = 0). In a fixed gear, v0 andvc correspond to certain engine rotation speeds ω0 and ωc, according to (8.14). Thedynamics of the vehicle (8.20d), are given by (8.12–8.14):

l(ω) = Scdρa

(Rw

idig

)3 ω2

2ηm+

crMgRw

idigηm, (8.21)

and:

I =λMηm

(Rw

idig

)2

. (8.22)

A second state θ [rad], the position of the engine shaft, is added. In a fixed gear, thiscorresponds to the distance s [m/s] traveled by the car: s = Rw

idigθ .

The optimal control problem yields the following Hamiltonian:

H = −λ1

I(ω)+λ2ω+ mf0(ω)+

(λ1

I+ esfc(ω , T )ω

)

T. (8.23)

Page 12: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

130 B. Saerens, M. Diehl, and E. Van den Bulck

The dynamics of the augmented system are given by:

dλ1

dt= − ∂H

∂ω , (8.24a)

dλ2

dt= − ∂H

∂θ = 0. (8.24b)

The optimal torque T ∗ minimizes the Hamiltonian. Some special conditions followfrom the Maximum Principle [9]:

• if Tmin T ∗ Tmax, then: ∂H∂T ∗ = 0 and dM

dt = 0;• if the total amount of rotations θe is free, then: λ2 = 0; and• if the total time te is free, then: M (te) = 0.

The Maximum Principle translates the control problem into a boundary value prob-lem: one should determine λ1(0) and λ2 such that the terminal constraints are met.

First consider the control problem that a vehicle should travel a substantially longdistance (e.g. se = 1km), with no time constrain given (te is free) and we omit theend velocity constraint (8.20c). It is logical (and can also be proven), that the vehiclewill accelerate to an optimal cruising velocity vc,opt where the fuel consumptionper traveled distance is minimal. The vehicle will cruise at this velocity until thedesired distance se is traveled. Now assume an acceleration to this cruising velocity,or corresponding ωopt (this is the minimum-fuel vehicle acceleration).

Since there is no time constraint: Mopt = 0. Furthermore: Topt = l(ωopt). From∂H∂T = 0 one can obtain λ1,opt, and from (8.23) λ2,opt. With this information the

solution can be calculated with a backward simulation of the adjoint system from vopt

until v = v0. This backward simulation avoids numerical iterations to calculate theinitial values of λ and allows much faster calculations. Note that at v = vopt:

dλ1dt = 0

and the system is stuck in a steady state. In order to make the backward simulation

Fig. 8.6 Optimal accelerations with the Maximum Principle, in the cpr-map

Page 13: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 131

Fig. 8.7 Optimal accelerations evolve exponentially towards the cruising velocity

Fig. 8.8 Linear behavior of optimal accelerations, the start of the accelerations is not lineardue to the torque limits of the engine

work, it should start from v = vopt−ε , with ε small. The method explained above isstill valid since the optimal torque is continuous and therefore T ∗ Tmax and M = 0at v.

If the cruising velocity to attain is not the optimal cruising velocity vc = vc,opt,there are two possible cases:

1. vc < vc,opt

The principle of optimality yields that the minimum-fuel acceleration to vc is theinitial part of the minimum-fuel acceleration to vc,opt, upto v = vc; and

Page 14: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

132 B. Saerens, M. Diehl, and E. Van den Bulck

2. vc > vc,opt

Since a cruising velocity vc > vc,opt is not optimal, an optimal acceleration willnever reach vc. In order to do so, one has to adapt the fuel consumption modelsuch that vc = vc,opt. For certain driving conditions, cruising at vc,opt can be con-sidered too slow (e.g. highway). The will to cruise at higher velocities thus comesindirectly from a time constraint. In the maximum principle, this is enforcedby the Hamiltonian H . This yields that the fuel consumption model should beadapted as follows:

mf = mf −Mc, (8.25)

such that the adapted cpr is minimal at vc. In this equation Mc is a kind of pseudo-Hamiltonian.

Figure 8.6 shows two optimal accelerations in the cpr-map from 35km/h, to theoptimal cruising velocity 67km/h and to a cruising velocity of 90km/h. The cruis-ing torque Tc [Nm] is the necessary engine torque for driving at a constant velocity.Figures 8.7 and 8.8 show that these trajectories yield an asymptotical and exponen-tial evolution towards the cruising velocity and a linear decreasing acceleration as afunction of the velocity.

8.5 Minumum-fuel Acceleration with Dynamic Programming

In this Section we solve the same minumum-fuel acceleration problem as Section8.4, with Dynamic Programming and gear shifting. This approach has been used be-fore. Hooker et al. [20, 21] use forward dynamic programming on a time grid, bothwith instantaneous gear shifts and with shift dynamics. Using a time grid, one needsthe distance as an extra state variable. This makes the dynamic programming slow,due to the “curse of dimensionality” [3]. Therefore, Monastyrsky and Golownykh[26], and Hellstrom [19] use a distance grid, so that there is only one state variableleft: the vehicle velocity. The problem here is that at slow velocities, one distanceincrement takes a lot of time compared to higher velocities. This gives problems foroptimizing gear shifting in an acceleration.

This paper uses normal backward Dynamic Programming, with a speciallyadapted distance grid and gear shifting with shift dynamics. This original solutiontechnique is the following. Let se be the total traveled distance and Δ tshift the timeneeded for gear shifting (around 0.3 to 0.5s). First, a linear acceleration as a func-tion of the distance from v0 to ve is assumed. Then, the distance is divided in Kpieces Δsk, such that every Δsk has a duration Δ tk = σΔ tshift, longer than the timerequired for gear shifting (σ > 1):

Δsk = vk−1σ tshift, k = 1, 2, . . .K. (8.26)

The control problem is equivalent to (8.20), integrated over the distance s instead oft, and discretized:

Page 15: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 133

minv,a, i

K−1

∑k=0

mf,k(vk, vk+1, ik, ik+1, Δsk+1), (8.27a)

subject to:

v0 − v(0) = 0, (8.27b)

vK − v(te) = 0. (8.27c)

The calculation of the fuel consumption for every distance increment k is as follows:

• the fuel consumption mf,k(vk, vk+1, ik, ik+1, Δsk+1) [kg] over a distance Δsk+1,from velocity vk to vk+1, in a fixed gear ik = ik+1:

mf,k = mf(nk, Tk)Δsk+1

vk, (8.28)

with nk and Tk from vk, dvdt and ik according to (8.12–8.14), where vk = vk+vk+1

2

and dvkdt = (vk+1−vk)vk

Δ sk+1;

• if a gear shift occurs, it is assumed to be at the beginning of the distance in-crement Δs. The powertrain doesn’t deliver torque during the shifting, the vehi-cle is coasting and no fuel consumption is assumed (idle consumption can betaken into account). Thus, at the beginning of Δsk+1, the car will deceleratefrom vk to v′k = vk + ashifttshift, with ashift from (8.12) with v = vk and Fl = 0.

The car will have traveled a distance Δsk+1,shift = vk+v′k2 tshift. After the shifting,

the car has to drive the remainder of Δsk+1 in gear ik+1. The fuel consump-tion mf,k

(v′k, vk+1, ik+1, ik+1, Δsk+1 −Δsk+1,shift

)in this remaining part, is as ex-

plained above;• if no shift dynamics are considered, the whole distance Δsk+1 is driven in gear

ik+1.

The search space for v is discretized with Δv. The minumum-fuel problem is thensolved recursively as described in Section 8.2.2:

Jk(v) = minv, i

mf(vk, vk+1, ik, ik+1, Δsk+1)+ Jk+1(vk+1). (8.29)

To speed up the calculation for an acceleration, no decelerations or downshiftingis considered. Since the original assumption of the linear acceleration as a func-tion of the distance was wrong, one can redefine the distance grid Δs with theobtained solution and do the Dynamic Programming again to become a bettersolution.

Figures 8.9 and 8.10 show the results for an acceleration from 5km/h to the op-timal cruising velocity of 67km/h, in 1km. The exponential behavior can be seenagain. Gear shifting happens very fast at low engine speeds. A comparison is madebetween Dynamic Programming with instantaneous gear shifting and shifting withshift dynamics. The influence of the dynamics is rather small: without dynamics adistance of 1km is traveled in 64.05s with a fuel consumption of 55.08g, with dy-namics this is done in 64.47s and 55.26g. The only substantial difference between

Page 16: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

134 B. Saerens, M. Diehl, and E. Van den Bulck

Fig. 8.9 Optimal acceleration with Dynamic Programming and gear shifting

Fig. 8.10 Optimal acceleration with Dynamic Programming and gear shifting

the two is the upshift from 4th to 5th gear, as shown in figure 8.10. The shown re-sults are based on the following parameters: Δ tshift = 0.3s, σ = 1.5 and the velocityhas been discretized with Δv = 1km/h.

8.6 Discussion of the Results

This Section discusses the results obtained in Sections 8.4 and 8.5. The two ap-proaches are compared with each other and then with other research.

Page 17: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 135

Fig. 8.11 Comparison of results with Dynamic Programming and Pontryagin’s MaximumPrinciple

8.6.1 Comparison between the Maximum Principle and DynamicProgramming

Figure 8.11 shows an acceleration from 35km/h to the optimal cruising speed of67km/h over 850m. If se > 850m, the optimal velocity trajectory will start with thesame acceleration over 850m and then the car will cruise the remaining distanceat 67km/h. The minumum-fuel acceleration is calculated with both Pontryagin’sMaximum Principle and Dynamic Programming in 5th gear. The results are fairlysimilar: 42.2g in 51.2s versus 42.6g in 50.9s.

Although Dynamic Programming and the Maximum Principle yield almost thesame results, one can favor one above the other. Dynamic Programming has theadvantage that it is very easy to implement and can easily take into account gearshifting. It can also use mapped engine data. Pontryagin’s Maximum Principle onthe other hand, gives more precise solutions and the calculations are faster thenDynamic Programming. The calculation of a minimum-fuel acceleration with theMaximum Principle takes around 1s on a normal computer, calculation with Dy-namic Programming around 1minute.

8.6.2 Comparison with Other Research

The solution of a minumum-fuel acceleration with Pontryagin’s Maximum Principleyields accelerations that linearly decrease with the velocity, as shown in Figure 8.8.This is caused by the specific structure of the proposed fuel consumption model(8.18). This linear acceleration behavior has also been observed with real vehiclesin normal traffic situations [1, 2, 8, 14, 18, 25], so that one can conclude that this is

Page 18: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

136 B. Saerens, M. Diehl, and E. Van den Bulck

normal driving behavior. This is important for the application in driving assistancesystems, taken the driver acceptance into account.

A linear vehicle acceleration can be modeled with:

a = α−βv. (8.30)

In the most recent acceleration study, Bonneson [8] identifies α ± 2m/s2 andβ ±0.12s−1 for normal passenger cars. It is not clear to what velocity this acceler-ation takes place. A fast comparison with the results presented in this paper for anacceleration to the optimal velocity (α = 1.6 and β = 0.09), shows that the averagedriver accelerates to fast. Note that this might not be a representative comparison,since the calculations in this paper are only done for one specific vehicle.

El-Shawarbi et al. [15] measures the effect of acceleration levels on the fuel con-sumption. Although the test vehicle has a much bigger engine then the one modeledin this paper, they have a very similar fuel consumption per traveled distance. Threeacceleration types are defined: aggressive, normal and mild. For an accelerationfrom standstill over 1.4km, the mild acceleration (to 104km/h) consumes the leastamount of fuel. The same acceleration starting from 35km/h would take around1300m, this is almost the same result as obtained in this paper.

8.7 Conclusions

This paper discusses the problem of minumum-fuel vehicle driving, accelerationsin particular. This problem is solved with optimal control. The different methodsfor optimal control are discussed briefly and two methods (Pontryagin’s MaximumPrinciple and Dynamic Programming) more in detail. A polynomial fuel consump-tion model is favored over a detailed consumption map. This kind of model canbe used for every optimal control method and is relatively easy to obtain. To avoidbang-off-bang control and in order to have a decent mileage model of the vehi-cle, a six-parameter fuel consumption polynomial approximation is proposed. WithPontryagin’s Maximum Principle, this consumption model yields minumum-fuelaccelerations that decrease linearly as a function of the vehicle velocity. This lin-ear acceleration behavior is also observed in real traffic situations. Although thesix-parameter polynomial model might not be the most precise consumption model,it can be very interesting for implementation in driving assistance systems if oneconsiders driver acceptance. For solving the boundary value problem with the Max-imum Principle, a backward simulation is proposed. This method avoids shootingor collocations methods and allows fast calculations. The minumum-fuel accelera-tion problem is also addressed with Dynamic Programming. This method can easilyinclude gear shifting. A backward recursion with an adaptive distance grid and dy-namic gear shifting is proposed and implemented. This approach yields almost thesame results as with the Maximum Principle.

Page 19: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

8 Optimal Control Using Pontryagin’s Maximum Principle 137

References

[1] Beakey, J.: Acceleration and Deceleration Characteristics of Private Passenger Vehi-cles. In: Proc. 18th Annual Meeting Part I: Highway Research Board, Washington DC,USA, pp. 81–89 (1938)

[2] Bellis, W.R.: Capacity of Traffic Signals and Traffic Signal Timing. Highway ResearchBoard Bulletin 271, 45–67 (1960)

[3] Bellman, R.E.: Dynamic Programming. University Press, Princeton (1957)[4] Bemporad, A., Borodani, P., Mannelli, M.: Hybrid control of an automotive robotized

gearbox for reduction of consumptions and emissions. In: Maler, O., Pnueli, A. (eds.)HSCC 2003. LNCS, vol. 2623, pp. 81–96. Springer, Heidelberg (2003)

[5] Bertsekas, D.: Dynamic Programming and Optimal Control, 3rd edn., vol. 2. AthenaScientific, Belmont (2007)

[6] Biegler, L.T.: Solution of dynamic optimization problems by successive quadratic pro-gramming and orthogonal collocation. Computers and Chemical Engineering 8, 243–248 (1984)

[7] Bock, H.G., Plitt, K.J.: A multiple shooting algorithm for direct solution of optimalcontrol problems. In: Proc. 9th IFAC World Congress Budapest, pp. 243–247. Perga-mon Press, Oxford (1984)

[8] Bonneson, J.A.: Modeling Queued Driver Behavior at Signalized Junctions. Trans-portation Research Record 1365, 99–107 (1992)

[9] Bryson, A.E., Ho, Y.-C.: Applied Optimal Control. Wiley, New York (1975)[10] Chang, D.J., Morlok, E.K.: Vehicle Speed Profiles to Minimize Work and Fuel Con-

sumption. J. Transportation Engineering 131(3), 173–192 (2005)[11] Chang, M.F., Evans, L., Herman, R., Wasielewski, P.: The Influence of Vehicle Char-

acteristics, Driver Behavior, and Ambient Temperature on Gasoline Consumption inUrban Traffic. Technical Report GMR-1950, General Motors Research Laboratories(1976)

[12] Chang, M.F., Herman, R.: Driver Response to Different Driving Instructions: Effecton Speed, Acceleration and Fuel Consumption. Technical Report GMR-3090, GeneralMotors Research Laboratories (1979)

[13] CIECA. Internal project on Eco-driving in category B driver training & the driving test.Final report, CIECA, November 5 (2007)

[14] Dockerty, A.: Accelerations of Queue Leaders from Stop Lines. Traffic Engineeringand Control 8(3), 150–155 (1966)

[15] El-Shawarby, I., Ahn, K., Rakha, H.: Comparative field evaluation of vehicle cruisespeed and acceleration level impacts on hot stabilized emissions. Transportation Re-search Part D: Transport and Environment 10(1), 13–30 (2005)

[16] Evans, L.: Driver Behavior Effects on Fuel Consumption in Urban Driving. HumanFactors 21, 389–398 (1979)

[17] Evans, L., Herman, R.: Automobile Fuel Economy on Fixed Urban Driving Schedules.Transportation Science 12, 137–152 (1978)

[18] Gillespie, T.D.: Start-Up Accelerations of Heavy Trucks on Grades. Transportation Re-search Record 1052, 107–112 (1986)

[19] Hellstrom, E.: Explicit use of road topography for model predictive cruise control inheavy trucks. Master’s thesis, Vehicular Systems, Dept. of Electrical Engineering atLinkopings universitet (2005); Reg nr: LiTH-ISY-EX–05/3660–SE

[20] Hooker, J.N.: Optimal Driving for Single-Vehicle Fuel Economy. Transportation Re-search Part A: General 22(3), 183–201 (1988)

Page 20: Chapter 8 Optimal Control Using Pontryagin’s Maximum ...read.pudn.com/downloads267/sourcecode/app/1223949/Automotiv… · considered (no hybrid or CVT) and the main focus is on

138 B. Saerens, M. Diehl, and E. Van den Bulck

[21] Hooker, J.N., Rose, A.B., Roberts, G.F.: Optimal Control of Automobiles for FuelEconomy. Transportation Science 17(2), 146–167 (1983)

[22] Jahns, G., Forster, K.J., Hellickson, M.: Computer simulation of diesel engine perfor-mance. Trans. American Society of Agricultural Engineers 33(3), 764–770 (1990)

[23] Kraft, D.: On converting optimal control problems into nonlinear programming prob-lems. In: Schittkowski, K. (ed.) Computational Mathematical Programming. NATOASI, vol. F15, pp. 261–280. Springer, Heidelberg (1985)

[24] Lions, P.L.: Generalized Solutions of Hamilton-Jacobi Equations. Pittman (1982)[25] Long, G.: Acceleration Characteristics of Starting Vehicles. Transportation Research

Record 1737, 58–70 (2000)[26] Monastyrsky, V.V., Golownykh, I.M.: Rapid Computation of Optimal Control for Ve-

hicles. Transportation Research Part B: Methodological 27(3), 219–227 (1993)[27] Nielsen, L., Kiencke, U.: Automotive control systems. Springer, Berlin (2000)[28] Pontryagin, L.S., Boltyanski, V.G., Gamkrelidze, R.V., Miscenko, E.F.: The Mathemat-

ical Theory of Optimal Processes. Wiley, Chichester (1962)[29] Post, K., Kent, J.H., Tomlin, J., Carruthers, N.: Vehicle characterization and fuel con-

sumption prediction using maps and power demand models. Int. J. Vehicle Design 6(1),72–92 (1985)

[30] Saerens, B., Vandersteen, J., Persoons, T., Swevers, J., Diehl, M., Van den Bulck, E.:Minimization of the fuel consumption of a gasoline engine using dynamic optimization.Applied Energy 86(9), 1582–1588 (2009)

[31] Sargent, R.W.H., Sullivan, G.R.: The development of an efficient optimal control pack-age. In: Stoer, J. (ed.) Proc. 8th IFIP Conf. Optimization Techniques. Springer, Heidel-berg (1977)

[32] Schwarzkopf, A.B., Leipnik, R.B.: Control of Highway Vehicles for Minimum FuelConsumption over Varying Terrain. Transportation Research 11, 279–286 (1977)

[33] Stoicescu, A.P.: On Fuel-optimal Velocity Control of a Motor Vehicle. Int. J. VehicleDesign 16(2-3), 229–256 (1995)

[34] van der Voort, M., Dougherty, M.S., van Maarseveen, M.: A prototype fuel-efficiencysupport tool. Transportation Research Part C: Emerging Technologies 9, 279–296(2001)

[35] Wang, G., Zoerb, G.C.: Determination of optimal working points for diesel engines.Trans. American Society of Agricultural Engineers 32(5), 1519–1522 (1989)

[36] Waters, M.H.L., Laker, I.B.: Research on Fuel Conservation for Cars. Technical Report921, Transport and Road Research Laboratory, Crowthorne, England (1980)