You are on page 1of 23

Annals of Operations Research 98, 65–87, 2000

 2000 Kluwer Academic Publishers. Manufactured in The Netherlands.

The Optimal Control of a Train


PHIL HOWLETT p.howlett@unisa.edu.au
Centre for Industrial and Applicable Mathematics, University of South Australia, Adelaide, SA 5000,
Australia

Abstract. We consider the problem of determining an optimal driving strategy in a train control problem
with a generalised equation of motion. We assume that the journey must be completed within a given
time and seek a strategy that minimises fuel consumption. On the one hand we consider the case where
continuous control can be used and on the other hand we consider the case where only discrete control is
available. We pay particular attention to a unified development of the two cases. For the continuous control
problem we use the Pontryagin principle to find necessary conditions on an optimal strategy and show that
these conditions yield key equations that determine the optimal switching points. In the discrete control
problem, which is the typical situation with diesel-electric locomotives, we show that for each fixed control
sequence the cost of fuel can be minimised by finding the optimal switching times. The corresponding
strategies are called strategies of optimal type and in this case we use the Kuhn–Tucker equations to find
key equations that determine the optimal switching times. We note that the strategies of optimal type can
be used to approximate as closely as we please the optimal strategy obtained using continuous control and
we present two new derivations of the key equations. We illustrate our general remarks by reference to a
typical train control problem.
Keywords: train control, optimal control, discrete control, optimal switching times

1. Introduction

We consider the problem of determining an optimal driving strategy for a train. We


assume that the journey must be completed within a given time and seek a strategy
that minimises fuel consumption. Our main results are established using a generalised
equation of motion and, as such, are new. The derivations and many of the specific
results are also new. We introduce the discussion by presenting a brief review of the
significant papers in this area and illustrate our remarks by considering a typical train
control problem.

1.1. The significant milestones

Although the train control problem was studied in early works by Ichikawa [20] in 1968,
Kokotovic and Singh [22] in 1972 and by Milroy [23] in 1980 the first comprehensive
analysis on a flat track was presented by Asnis et al. [1] in 1985. Asnis et al. assumed
that the applied acceleration was the control variable; that the control was a continuous
control with uniform bounds; and that the cost associated with a particular strategy was
the mechanical energy consumed by the train.
66 HOWLETT

Although continuous control is available on some trains it is normally not possi-


ble to directly control acceleration and it is probably not reasonable to assume that the
acceleration is a uniformly bounded control. Asnis et al. used the Pontryagin principle
to find necessary conditions on an optimal control strategy and showed that these con-
ditions could be applied to determine an optimal driving strategy. A similar solution
was discovered independently by Howlett [9] in 1984 but for various reasons was not
published externally [10] until 1990. While the paper by Asnis et al. was a more ele-
gant treatment the paper by Howlett showed that after the optimal control sequence had
been determined by the Pontryagin principle a simplified problem could be formulated
as a finite dimensional constrained optimisation in which the variables are the unknown
switching times. This idea was the basis for subsequent solutions of the train control
problem in the case where only discrete control is allowed.
The next significant development was the observation by Benjamin et al. [2] in
1989 that the control mechanism on a typical diesel-electric locomotive is a throttle that
can take only a finite number of positions. Each position determines a constant rate
of fuel supply to the diesel motor and thereby determines a constant level of power
supply to the wheels. Benjamin et al. also observed that except at very small speeds the
acceleration of the train is inversely proportional to the speed.
The theoretical basis for the optimal control of a typical diesel-electric locomo-
tive was developed during an extensive railway research program begun in 1982 by the
Scheduling and Control Group (SCG) at the University of South Australia. This research
program is described in a recent book by Howlett and Pudney [14]. The significant the-
oretical papers produced by the SCG on the discrete control problem include papers by
Cheng and Howlett [4,5], Pudney and Howlett [24], Howlett et al. [11–13], Howlett [15]
and Howlett and Cheng [16]. The Ph.D. thesis by Cheng [7] is also a significant work
and contains many additional details including a comprehensive collection of realistic
examples.
Several other useful results were detailed by Howlett and Pudney [14] in their 1995
book. They showed that the optimal control problem for a train with a distributed mass
on a track with continuously varying gradient can be replaced by an equivalent problem
for a point mass train and that any strategy of continuous control can be approximated
as closely as we please by a strategy with discrete control. They also showed that where
speedholding is possible it must be optimal.
In the case of continuous control the first comprehensive analysis on a track with
continuously varying gradient was given by Khmelnitsky [21] in 1994 who formulated
the problem using kinetic energy as the primary dependent state variable. Khmelnitsky
showed that the predominant speedholding mode must be interrupted on steep uphill
sections1 by phases of maximum power and on steep downhill sections2 by phases of
coasting. These results are consistent with earlier work by Howlett et al. using discrete
1 An uphill section is said to be steep if the speed cannot be maintained at or above the desired level using
maximum power.
2 A downhill section is said to be steep if the speed cannot be kept at or below the desired speed by coasting.
TRAIN CONTROL 67

control. Khmelnitsky also showed that the continuous control problem can be solved
when speed restrictions are imposed. The corresponding problem for discrete control is
extremely difficult because it is no longer possible to follow an arbitrary smooth speed
limit precisely. This problem has been solved only recently by Cheng et al. [6].

1.2. Some new results

In this paper we formulate and solve a generalised train control problem using a general
equation of motion. In the first place we consider the problem with continuous control
and in the second place we study the problem when only discrete control is available.
In the case of continuous control we will present an argument that is essentially
equivalent to the argument presented by Khmelnitsky. We will however give a more
usual formulation3 with speed as the primary dependent state variable. To begin we fol-
low Khmelnitsky and show that the Pontryagin principle can be applied to find necessary
conditions on a solution. However we will also take some time to establish new formulae
that show how the solution of the continuous control problem can be related directly to
the solution of the corresponding discrete control problem. These results are new. We
also present new results relating to the calculation of optimal switching points.
In the case of discrete control we show that the known results can be extended
to apply in more general circumstances. We pay particular attention to the derivation
of the key equations that provide a basis for calculation of the strategies of optimal
type. We present two new methods for the derivation of these equations. We show that
an argument of restricted variation first used by Howlett for flat track [19] can also be
used in this more general situation and that a rather obscure continuity principle for the
Hamiltonian function [26] can be used to derive the key equations for optimal switching.

1.3. Other relevant research

The problem of finding optimal driving strategies for a solar powered racing car is
closely related to the above train control problems. We will refer to a paper by Howlett
et al. [17] which considered optimal driving strategies on flat track and a paper by
Howlett and Pudney [18] which considered the problem on undulating road. An al-
ternative formulation of the solar car problem as a problem of shortest path by Gates and
Westcott [8] is less relevant to our current discussion but is nevertheless an interesting
paper.

2. Formulation of the generalised train control problem

A train travels from one station to the next along a smooth track with non-zero gradient.
The journey must be completed within a given time and it is desirable to minimise the
fuel consumption.
3 Our formulation is more usual but not necessarily better.
68 HOWLETT

2.1. The generalised train model

We consider a control problem with t ∈ [0, T ] ⊆ R as the independent variable and


state variables x = x(t) ∈ [0, X] ⊆ R and v = v(t) ∈ [0, V ] ⊆ R satisfying a simple
autonomous system of differential equations in the form
dx
=v (1)
dt
and
dv
= F (x, v, u) (2)
dt
with
x(0) = 0, x(T ) = X and v(0) = v(T ) = 0
for (x, v) ∈ S = [0, X] × (0, V ] ⊆ R2 and u ∈ U ⊆ [−q, p] ⊆ R where p and q
are positive real numbers. The variable u is the control variable. For the train control
problem we interpret t as time, x as position, and v as speed. We assume that F (x, v, u)
is well defined and continuous for all (x, v, u) ∈ [0, X] × (0, V ] × U with
F (x, 0, −q) < 0 < F (x, 0, p)
for all x ∈ [0, X]. We also assume that the partial derivatives
∂F ∂F ∂F
, and
∂x ∂v ∂u
exist and are continuous with
∂F
(x, v, u) > 0 (3)
∂u
for all (x, v, u) ∈ [0, X] × (0, V ] × U . The cost of the journey is measured by the fuel
consumption
Z T
 
J = f u(t) dt, (4)
0
where f : [−q, p] 7→ R is a continuous function which is strictly increasing on [0, p]
and differentiable on (0, p). We also assume that f (u) = 0 for u ∈ [−q, 0].

Remark 2.1. Use of a generalised equation of motion (2) will allow us to extend the
established theory to more realistic models that could incorporate such things as the
effects of track curvature.

2.2. The vehicle control problem with continuous control

In some modern diesel-electric locomotives continuous control is available. In this case


the control variable u can take any value in some bounded interval [−q, p]. We assume
TRAIN CONTROL 69

that each value u ∈ [0, p] of the control variable determines a constant rate of fuel
supply. Although braking is more complex the complexities relate mainly to engineering
and safety issues and it is reasonable to assume that each value u ∈ [−q, 0] determines a
constant negative acceleration. It is also pertinent to observe that the time spent braking
is relatively small. We assume that no fuel is consumed during braking.
We wish to find a bounded and measurable control function that minimises fuel
consumption but allows the train to arrive at the destination on time. We use the model
described in subsection 2.1 and assume that the control variable u ∈ U = [−q, p] ⊆ R.

Remark 2.2. To state the problem precisely at this stage and in this general form is diffi-
cult and somewhat pointless. In general terms we can say that it is necessary to establish
a suitable function space for the set of control functions and to show that each control
function from this set determines a unique speed profile for the train. It is also necessary
to show that there is at least one feasible strategy and that there exists a control function
from within the specified set that minimises the cost of fuel. We refer to a paper by
Howlett and Pudney [18] where a similar problem is considered in detail and a complete
proof of existence is given.

2.3. The vehicle control problem with discrete control

In this case the control variable u can take only a finite number of pre-determined values.
This is the typical situation in a diesel-electric locomotive where there are a finite number
of distinct traction control settings

u ∈ {0, 1, . . . , p} ⊆ R

and each setting determines a constant rate of fuel supply. It is reasonable to assume that
there are a finite number of brake settings

u ∈ {−q, −q + 1, . . . , −1} ⊆ R

and that each setting determines a constant negative acceleration. We assume that no
fuel is consumed during braking.
As long as the track is not steep the train will be controlled using a finite sequence
of traction phases and a final brake phase. During each phase the control setting is
constant. For each sequence of controls there are many different strategies, each one
determined by different switching points. For each strategy there is a uniquely defined
speed profile determined by the equations of motion. We will say that a strategy is
feasible if the distance and time constraints are satisfied. We wish to find a feasible
strategy that minimises fuel consumption.
We use the model described in subsection 2.1 and assume that the control variable

u ∈ U = {−q, −q + 1, . . . , 0, . . . , p − 1, p} ⊆ R,
70 HOWLETT

where p and q are fixed positive integers.4 For each fixed sequence {uk+1 }k=0,1,...,n of
control settings and each partition
0 = t0 6 t1 6 · · · 6 tn+1 (5)
of the positive t-axis there is a corresponding control function u : (0, tn+1 ) → U defined
essentially by
u(t) = uk+1 (6)
for t ∈ (tk , tk+1 ) and each k = 0, 1, . . . , n. We denote the corresponding strategy by
 
S = uk+1 ; (tk , tk+1 ) k=0,1,...,n (7)
and use

S = S {uk+1 }k=0,1,...,n (8)
to denote the collection of all strategies using the given sequence {uk+1 }k=0,1,...,n of con-
trol settings. The value uk+1 is the control setting on the interval (tk , tk+1 ). The times
{tk }k=1,2,...,n are known as the switching times with t0 the starting time and tn+1 the stop-
ping time. We write xk = x(tk ) to generate a corresponding partition
0 = x0 6 x1 6 · · · 6 xn+1 (9)
of the positive x-axis, where the points {xk }k=1,2,...,n are known as the switching points
with x0 the starting point and xn+1 the stopping point. We write τk+1 = 1tk and ξk+1 =
1xk and also write Vk = v(tk ) for the speed at the switching time tk . If the cost rate of
each control is defined by a function f : U → R then the cost of the strategy S is given
by
Z tn+1 X
  n
J (S) = f u(t) dt = f (uk+1 )τk+1 . (10)
0 k=0

Note that J (S) depends continuously on the switching times t1 , t2r , . . . , tn . We can now
state the problem precisely.

Problem 2.3. For each fixed sequence {uk+1 }k=0,1,...,n of control settings find the switch-
ing times {tk }k=1,2,...,n that minimise J (S) subject to the initial condition V0 = 0, the final
condition Vn+1 = 0 and the constraints tn+1 6 T and xn+1 > X.

Remark 2.4. Howlett and Pudney [14] have shown that any sequence of positive measur-
able control can be approximated as closely as we please by a sequence of power–coast
pairs. Thus for a sufficiently long control sequence {p, 0, p, 0, . . . , p, 0, −q} on non-
steep track it is obvious that the strategy with the best switching points will be close to
4 The condition that ∂F /∂u > 0 can be replaced in this case by the weaker condition that F (x, v, u ) <
1
F (x, v, u2 ) whenever u1 , u2 ∈ U and u1 < u2 .
TRAIN CONTROL 71

the minimum cost strategy for continuous control. More information about the inter-
pretation of solutions to the discrete control problem can be obtained from the book by
Howlett and Pudney [14].

2.4. Existence of a solution for the discrete control problem

For the moment we consider the speed v and the control u as functions of position
x ∈ [0, X]. The equations of motion can be written as a single differential equation
dv 
v = F x, v, u(x) . (11)
dx
Assume that the solution v = vp (x) to the initial value problem
dv
v = F (x, v, p) (12)
dx
for the region x > 0 with v(0) = 0 exists and is unique and that the solution v = v−q (x)
to the final value problem
dv
v = F (x, v, −q) (13)
dx
for the region x 6 X with v(X) = 0 exists and is unique. In this case the condi-
tions F (x, 0, −q) < F (x, 0, p) for all x ∈ [0, X] and F (x, v, −q) < F (x, v, p) for
all (x, v) ∈ [0, X] × (0, V ) imply there is a uniquely defined point xb ∈ (0, X) with
vp (xb ) = v−q (xb ). It is now easy to see that there is a maximum speed strategy on
[0, X] with an initial phase of maximum power using um (x) = p for x ∈ [0, xb ] and
a final phase of maximum braking using um (x) = −q for x ∈ [xb , X]. The speed
v = vm (x) defined by

v (x) if 0 6 x 6 xb ,
vm (x) = p
v−q (x) if xb 6 x 6 X
satisfies the boundary conditions vm (0) = vm (X) = 0. If
Z X
1
t (X) = dx 6 T
0 vm (x)

then the maximum speed strategy is feasible. Now let r be a fixed positive integer
and consider the set Fr of feasible strategies of the form {p, 0, p, 0, . . . , p, 0, −q} with
switching points
0 = x0 6 x1 6 · · · 6 x2r 6 x2r+1 = X.
The set Fr is non empty since it contains the maximum speed strategy (the maximum
speed strategy has x1 = x2 = · · · = x2r = xb ) and so
Jinf = inf J (S) > 0
S∈Fr
72 HOWLETT

is well defined. We need to show the existence of a strategy b S ∈ Fr with J (b


S) = Jinf .
Let {S }i=1,2,... be a sequence of feasible strategies with switching points
(i)

0 = x0 (i) 6 x1 (i) 6 · · · 6 x2r (i) 6 x2r+1 (i) = X


such that
 1
J S (i) < Jinf + .
i
We can choose a subsequence {i(s)}s=1,2,... such that, for each k = 0, 1, . . . , 2r + 1, the
sequence of switching points
 (i(s))
xk s=1,2,...

converges, as s → ∞, to a limit x̂k . Clearly


0 = x̂0 6 x̂1 6 · · · 6 x̂2r 6 x̂2r+1 = X.
If we define tˆk = t (x̂k ) as the corresponding switching time then the strategy
         
b
S = p; (0, tˆ1 ) , 0; (tˆ1 , tˆ2 ) , . . . , p; (tˆ2r−2 , tˆ2r−1 ) , 0; (tˆ2r−1 , tˆ2r ) , −q; (tˆ2r , tˆ2r+1 )
is a minimum cost strategy in the set Fr . It is obvious from equation (10) that J (S i(s)) →
J (b
S) as s → ∞.

3. The general solution procedure for continuous control

In this section we will show how the Pontryagin principle [3] can be applied to find an
optimal strategy for the continuous control problem and indicate how the key equations
can be derived. The Hamiltonian is given by
H (x, v, α, β, u) = −f (u) + αv + βF (x, v, u) (14)
and the adjoint equations are
dα ∂H ∂F
=− = −β (15)
dt ∂x ∂x
and
dβ ∂H ∂F
=− = −α − β (16)
dt ∂v ∂v
for (x, v) ∈ [0, X] × (0, V ] and (α, β) ∈ L ⊆ R2 where L is an appropriate closed
rectangle. Let u = u(t) for t ∈ [a, b] be a given smooth control strategy5 and suppose
that the initial conditions x(a) = xa , v(a) = va and the final conditions α(b) = αb ,
β(b) = βb are known. Under these circumstances we can solve the state and adjoint
5 We refer here to a control strategy that is smooth on some subinterval [a, b] ⊆ [0, T ]. We will ultimately
piece together a succession of smooth strategies to form a piecewise smooth control strategy.
TRAIN CONTROL 73

equations to find uniquely defined state functions x(t), v(t) and adjoint functions α(t),
β(t). We will often use the abbreviated notation

K(t) = K x(t), v(t), α(t), β(t), u(t)
when we evaluate a function K : [0, X]×(0, V ]×L×U 7→ R along the unique trajectory
determined by u(t). In particular we write
 
H (t) = −f u(t) + αv(t) + βF (t) (17)
and it is easy to see that
 
0 ∂F0
 
H (t) = −f u(t) + β(t) (t) u0 (t). (18)
∂u
The Pontryagin principle tells us that the control u(t) is an optimal control at the point
(x, v, α, β) only if u(t) ∈ U is the value of the control that maximises the Hamiltonian
H (x, v, α, β, u). Since
∂H ∂F
= −f 0 (u) + β (19)
∂u ∂u
there are five different cases to consider. We have
1. β > f 0 (u)/ ∂F
∂u
⇒ u(t) = p;

2. β = f 0 (u)/ ∂F
∂u
> 0 ⇒ u(t) ∈ [0, p];

3. 0 < β < f 0 (u)/ ∂F


∂u
⇒ u(t) = 0;
4. β = 0 ⇒ u(t) ∈ [−q, 0]; and
5. β < 0 ⇒ u(t) = −q.
Notice that in all cases
 
0
 ∂F   0
−f u(t) + β x, v, u(t) u (t) = 0 (20)
∂u
and hence the Hamiltonian H (t) is necessarily constant along any portion of the optimal
trajectory generated by a smooth control. In fact the Pontryagin principle states that
the Hamiltonian is constant along the entire optimal trajectory even if the control is not
smooth. Therefore we have
 
µ = −f u(t) + α(t)v(t) + β(t)F (t) (21)
for some constant µ ∈ R. It is often useful to integrate the adjoint equations along the
optimal trajectory. Using equation (21) the first adjoint equation can be rewritten as
v(t) ∂F µ + f [u(t)] ∂F
α 0 (t) − (t)α(t) = − (t) (22)
F (t) ∂x F (t) ∂x
74 HOWLETT

and if we define
Z b
v(s) ∂F
D(t, b) = (s) ds (23)
s=t F (s) ∂x
for t ∈ [a, b] then it follows that
Z
D (t,b)
b
µ + f [u(s)] D(s,b)
αb − α(t) e = de (24)
s=t v(s)
for all t ∈ [a, b]. By substituting the expression (24) into the equation (21) we can find
a similar expression for β(t) for all t ∈ [a, b]. This expression can also be obtained by
direct integration along the optimal trajectory although the details are a little tricky. Such
integrations can be used to obtain key equations that determine the optimal switching
points. We will consider this more closely in the next section.

4. A typical train control problem with continuous control

For a typical train control problem we can write


Af (u)
F (x, v, u) = + B(u) + g(x) − r(v), (25)
v
where A > 0 is a constant, B(u) = 0 for 0 6 u 6 p and B(u1 ) < B(u2 ) < 0 for
u1 < u2 < 0, g(x) is the component of gravitational acceleration in the direction of
motion and r(v) is the frictional resistance per unit mass opposing the motion. The
equations of motion become
dx
=v (26)
dt
and
dv Af (u)
= + B(u) + g(x) − r(v) (27)
dt v
and the Hamiltonian is given by
 
Af (u)
H (x, v, α, β, u) = −f (u) + αv + β + B(u) + g(x) − r(v) . (28)
v
The adjoint equations are

= −βg 0 (x) (29)
dt
and
 
dβ Af (u) 0
= −α + β + r (v) . (30)
dt v2
TRAIN CONTROL 75

We maximise the Hamiltonian function by writing it in the form


 

H (u) = − 1 f (u) + βB(u) + · · · (31)
v
and note that there are five different cases to consider. We have
1. β > v/A ⇒ u = p,
2. β = v/A ⇒ u ∈ [0, p],
3. 0 < β < v/A ⇒ u = 0,
4. β = 0 ⇒ u ∈ [−q, 0], and
5. β < 0 ⇒ u = −q.
If the condition
Aβ = v (32)
is maintained over a non-trivial time interval we will show that the corresponding control
mode is a speedholding mode. Although the speedholding control is a singular control
it is nevertheless the key to the entire optimal strategy.

4.1. Speedholding with continuous control

If the condition (32) holds for all t ∈ [a, b] then by differentiating both sides and rear-
ranging we obtain
−g(x) + ϕ 0 (v)
α= , (33)
A
where ϕ(v) = vr(v). However we also have
 
dα 0 vg 0 (x) d g(x)
= −βg (x) = − = − (34)
dt A dt A
from which it follows that
−g(x) + C
α= (35)
A
for all t ∈ [a, b]. Therefore we deduce that
ϕ 0 (v) = C. (36)
If we assume that the graph y = ϕ(v) is convex then it follows that v = V is constant
and that
−V g(x) + ϕ(V )
f (u) = . (37)
A
76 HOWLETT

Since the Hamiltonian is constant along an optimal strategy we have H (t) = µ for some
constant µ ∈ R and all t ∈ [a, b]. From (28) it follows that
ψ(V )
µ= , (38)
A
where ψ(v) = v 2 r 0 (v).
On flat track it has been shown that the optimal strategy consists of an initial phase
of maximum power with u = p followed by a speedholding phase6 with u ∈ [0, p],
a coasting phase with u = 0 and a final brake phase with u = −q. The speed at which
braking begins is related to the holding speed by a simple formula. On a track where the
gradient varies continuously the most significant difference is that there may be sections
of track which are so steep that speedholding is not possible. If
Af (p)
g(x) < r(V ) − (39)
V
then the track is so steeply uphill that the desired speed V cannot be held even under
maximum power whereas if
g(x) > r(V ) (40)
then the track is so steeply downhill that the desired speed V cannot be held even if no
power is applied. On steep uphill sections we will show that maximum power must be
used and on steep downhill sections we will show that no power is used. We will also
show how to calculate the precise switching points when a steep section of track is to be
negotiated. If there are no steep sections then the optimal journey has the same form as
it does on flat track.

4.2. Calculation of switching points for steep sections of track

We make the following crucial observation. If the train is in speedholding mode before
reaching a steep uphill section and wishes to return to speedholding mode after traversing
the steep section, then the switch from speedhold to maximium power must occur before
the steep section is reached. The switch back to speedhold must occur after the traverse
of the steep section has been completed. We have the following result.

Proposition 4.1. Let V be the desired holding speed and let


Af (p)
g(x) < r(V ) −
V
for all x ∈ (xb , xc ). Suppose there is some interval [xa , xd ] with (xb , xc ) ⊆ [xa , xd ] and
Af (p)
g(x) > r(V ) −
V
6 On a long journey the speedholding phase becomes the dominant phase and the holding speed is approxi-
mately the total distance divided by the total time.
TRAIN CONTROL 77

for all x ∈ [xa , xb ) ∪ (xc , xd ]. Suppose also that we can find a feasible strategy R with
vR (xb ) = vR (xd ) = V , vR (x) = V for x ∈ [xa , xb ] and vR (x) < V for x ∈ (xb , xd ) and
with uR (x) = p for x ∈ (xb , xd ) and a feasible strategy S with vS (xa ) = vS (xc ) = V ,
vS (x) > V for x ∈ (xa , xc ) and vR (x) = V for x ∈ [xc , xd ], and with uS (x) = p for
x ∈ (xa , xc ). If g 0 (xb ) < 0 and g 0 (xc ) > 0 then neither R nor S is optimal.

Remark 4.2. Although it is often helpful to think of x as the independent variable and to
think of v and t as dependent variables we will nevertheless continue to use the notation
x = x(a) = xa and v = v(a) = va when t = a.

Remark 4.3. The above proposition shows that it is not optimal to switch maximum
power on at the start of the steep section and also shows that it is not optimal to switch
maximum power off at the end of the steep section.

Remark 4.4. The assumptions that g 0 (xb ) < 0 and g 0 (xc ) > 0 are reasonable since the
track is only steep at speed V between xb and xc and hence g(x) is decreasing at xb and
increasing at xc .

Proof of proposition 4.1. Consider the strategy R and suppose that it is part of an
optimal strategy. Define ηR = AβR /vR and note that ηR (b) = ηR (d) = 1 with ηR (t) > 1
for all t ∈ (b, d). From the basic state and adjoint equations it can be seen that
 0 
dηR AαR ϕ (vR ) − g(xR )
=− + ηR
dt vR vR
and if we use the expression
−g(xb ) + ϕ 0 (V )
αR (b) =
A
then it follows that
dηR
(b) = 0.
dt
By differentiating again we can show that
  00  
d2 ηR AαR ϕ (vR ) ϕ 0 (vR ) ηR g(xR ) dηR g(xR )
2
= 2
+ ηR − 2
+ 2
FR −
dt vR vR vR vR dt vR
and since
FR (b) = 0
we also have
d2 ηR
(b) = 0.
dt 2
78 HOWLETT

Differentiating once more shows us that


  00  
d3 ηR AαR ϕ (vR ) ϕ 0 (vR ) ηR g(xR ) dFR
= + ηR − + + ···,
dt 3 vR 2 vR vR 2 vR 2 dt
where the additional terms are multiples of FR , dηR /dt and d2 ηR /dt 2 . Since
 
dFR Af (p)
=− + r (vR ) FR + g 0 (xR )vR
0
dt vR 2
it follows that
d3 ηR
(b) = ϕ 00 (V )g 0 (xb ) < 0.
dt 3
Now it follows that ηR (t) < ηR (b) for t > b and sufficiently close to b. This contradicts
the fact that ηR (t) > 1 for all t ∈ (b, d). Hence R is not optimal. A similar argument
can be applied to S with the derivatives evaluated at xc .

The next result is a key equation that will allow us to determine the precise position
of the switching points. If we use the same notation as we used in proposition 4.1 then
we need to find an interval [xσ , xτ ] with xa < xσ < xb < xc < xτ < xd and a strategy
Q with u(t) = p and η(t) > 1 for t ∈ (σ, τ ) and with η(σ ) = η(τ ) = 1.
We can integrate the adjoint equation for α as we did in the general case to obtain
 Z τ
D (σ,τ ) ψ(V ) deD(t,τ )
α(τ ) − α(σ ) e = + f (p) , (41)
A t =σ v(t)
where
Z τ
v(s)g 0 [x(s)] ds
D(t, τ ) = .
s=t
Af (p)
v(s)
− r[v(s)] + g[x(s)]
However we also know that
Z τ   Z τ
Af (p)     D (t,τ )
 
− r v(t) + g x(t) de =− v(t)g 0 x(t) eD(t,τ ) dt
t =σ v(t) t =σ
Z τ
 
= −g(xτ ) + g(xσ ) eD(σ,τ ) + g x(t) deD(t,τ ) (42)
t =σ

from which it follows easily that


Z τ  
Af (p)  
− r v(t) deD(t,τ ) = −g(xτ ) + g(xσ ) eD(σ,τ ) . (43)
t =σ v(t)
By using the expression (35) and the equation (43) we have
Z τ  
D (σ,τ ) f (p) r[v(t)] ϕ 0 (V )[1 − eD(σ,τ ) ]
α(τ ) − α(σ ) e = − deD(t,τ ) + (44)
t =σ v(t) A A
TRAIN CONTROL 79

and if (41) is used to eliminate α we obtain the key equation


Z τ  
  D (σ,τ )
 Aµ  
0
r(V ) + V r (V ) 1 − e = + r v(t) deD(t,τ ) , (45)
t =σ v(t)
where µ = ψ(V )/A. If we define

Eµ (v) = + r(v) (46)
v
and use integration by parts then the key equation can be written in the more compact
form
Z τ
 
eD(t,τ ) dEµ v(t) = 0. (47)
t =σ

Remark 4.5. The key equation (47) can be used to find the precise switching points.
Choose σ ∈ (a, b) and solve the state equations forward in time with vσ = V to find
τ ∈ (c, d) with v(τ ) = V . Now evaluate the integral I (σ, τ ) in (47) over the interval
(σ, τ ). If I (σ, τ ) 6= 0 choose σ again and repeat the calculation.

Remark 4.6. The switching points can also be found in the following more standard
way. Choose σ ∈ (a, b) and solve the state equations forward in time with vσ = V to
find τ ∈ (c, d) with v(τ ) = V . Now solve the adjoint equations backward in time with
βτ = V /A to find β(σ ). If β(σ ) 6= V /A choose σ again and repeat the calculation.

Remark 4.7. The same equation, with u = 0 for t ∈ (σ, τ ), and the same procedure can
be used to determine the precise switching points for a coasting phase when speedhold-
ing is interrupted by a steep downhill segment.

4.3. Calculation of the point at which braking begins

If we assume that speedholding finishes at t = a and that we coast to t = b where


braking begins then we can use the adjoint equations to relate the speed U = v(b) at
which braking begins to the holding speed V = v(a). For t ∈ [a, b] we define
Z b
v(s)g 0 [x(s)]
D(t, b) = ds (48)
s=t g[x(s)] − r[v(s)]

and we define the effective speed V(t) on the interval [a, b] by the formula
Z b
1 1 D(t,b) 1
= e + deD(s,b) . (49)
V(t) v(t) s=t v(s)
In each of the above definitions x = x(t) and v = v(t) are the solutions in the region
t ∈ [a, b] to the differential equations
dx
=v (50)
dt
80 HOWLETT

and
dv
= g(x) − r(v) (51)
dt
with the given boundary conditions. First we note that H (t) = µ is constant on the
interval [a, b] and by evaluation at t = a that µ = ψ(V )/A as before. Following our
calculations in the general case we see that
Z b
D (a,b) deD(t,b)
αb − α(a) e =µ . (52)
t =a v(t)
If we evaluate the Hamiltonian at t = a and t = b we get
g(xa ) ϕ 0 (V )
α(a) = − + (53)
A A
and
µ
αb = (54)
U
and equation (52) becomes
1 g(xa ) − r(V ) D(a,b) 1
+ e = . (55)
U ψ(V ) V(a)
In the case of a flat track with g(x) = 0 for all x we have D(t, b) = 0 for all t and
V(a) = V and the above equation takes the simplified form
ψ(V )
U= . (56)
ϕ 0 (V )

5. The restricted variation argument for the general problem with discrete
control

We consider the general vehicle control problem with discrete control described in sec-
tion 2.3 and use the same notation. This problem was solved by Howlett and Cheng [16]
who found a rather elegant form for the key equations that determine necessary condi-
tions on a strategy of optimal type. However, the simplicity of the key equations was
somewhat obscured by the calculation of some complicated derivatives in the Kuhn–
Tucker equations. One reason for the difficulty of these derivatives is that for each
k = 0, 1, . . . , n the quantities
∂Vk+1
Vk+1 = v(tk+1 ) and for h < k
∂ξh+1
depend on the solution of the state equations in the interval (tk , tk+1 ). This solution
depends, in turn, on the initial condition
∂Vk
v(tk ) = Vk and the rate of change for h < k
∂ξh+1
TRAIN CONTROL 81

Figure 1. Variation of tk−1 , tk and tk+1 with xn+1 fixed.

of the initial condition with respect to the variable ξh+1 = xh+1 −xh . Thus these variables
depend in a recursive way on each of the previous switching points. An interesting idea
[19] is that instead of considering the simultaneous variation of all switching points we
may be able to obtain the necessary conditions for optimality by considering a more
restricted variation of the switching points. We might thereby require only a simplified
form of the full recursion. Indeed, a little consideration should convince us that the time
constraint tn+1 6 T and the distance constraint xn+1 > X could be preserved with a
variation of any three successive switching points. This is illustrated in figure 1 where
only the switching times tk−1 , tk and tk+1 are changed and they are changed in such a
way that the total distance travelled is unchanged. It is clear that the distance travelled
is represented by the area under the curve which is clearly preserved in the variation. In
fact the only switching points to change are xk−1 , xk and xk+1 .
From now on it will be convenient to regard x as the independent variable with
t = t (x) and v = v(x) as the dependent variables. Consider a differential variation of
successive switching points xk−1 , xk and xk+1 for an arbitrarily chosen integer k ∈ (1, n)
in a feasible strategy of optimal type. A necessary condition for optimality is essentially
that the differential increment of cost is non-negative when the differential increments of
distance and time are respectively non-negative and non-positive. Thus, when we have
the distance constraint

dξ (k) = dξk−1 + dξk + dξk+1 + dξk+2 > 0, (57)

and the time constraint

dτ (k) = dτk−1 + dτk + dτk+1 + dτk+2 6 0 (58)


82 HOWLETT

we must also have the cost minimisation condition


dJ (k) = f (uk−1 ) dτk−1 + f (uk ) dτk + f (uk+1 ) dτk+1 + f (uk+2 ) dτk+2 > 0. (59)
In terms of the Lagrangean differential
dJ (k) = dJ (k) + πk dξ (k) − ρk dτ (k) , (60)
where πk ∈ R and ρk ∈ R are non-negative multipliers the necessary conditions for a
local constrained minimum are given by
dJ (k) = 0 (61)
and
πk dξ (k) − ρk dτ (k) = 0. (62)
By calculating the relevant partial derivatives we can express this equation in the general
form
3(dξk−1 , dξk , dξk+1 ) = 0, (63)
where 3 ∈ L(R3 , R) is a linear mapping and where the equation (63) is satisfied for all
feasible differential increments (dξk−1 , dξk , dξk+1 ).
To establish the precise form of equation (63) we need the following additional
notation. We write Fs+1 (x, v) = F (x, v, us+1 ) and define
Z xs+1
1 ∂Fs+1 
Ds (x, xs+1 ) = w, v(w) dw
w=x Fs+1 (w, v(w)) ∂x

for each x ∈ [xs , xs+1 ]. We write Ds (x) = Ds (x, xs+1 ) and Ds = Ds (xs ) for conve-
nience. We also let
Fs (xs , Vs )
Qs = (64)
Fs+1 (xs , Vs )
and define the effective speed Vs (x) at each point x ∈ [xs , xs+1 ] by the formula
Z xs+1
1 1 Ds (x) 1
= e + deDs (w) . (65)
Vs (x) v(x) w=x v(w)

We write Vs = Vs (xs ). The basic recursive relations derived by Howlett and Cheng [16]
are simple enough and are given by
∂Vs+1 Fs+1 (xs+1 , Vs+1 )
= (66)
∂ξs+1 Vs+1
and
   
∂Vs+1 Fs+1 (xs+1 , Vs+1 ) Vs ∂Vs −Ds
= 1 + −1 + e (67)
∂ξr+1 Vs+1 Fs+1 (xs , Vs ) ∂ξr+1
TRAIN CONTROL 83

for r < s. Howlett and Cheng also show that

∂τs+1 1
= (68)
∂ξs+1 Vs+1

and
  
∂τs+1 1 1 Vs ∂Vs 1 1
= − + −1 + − e−Ds (69)
∂ξr+1 Vs+1 Vs Fs+1 (xs , Vs ) ∂ξr+1 Vs+1 Vs

for r < s. We will write fs = f (us ) and 1fs = fs+1 − fs . Although the algebra is
still somewhat tedious it is now possible to calculate the required partial derivatives. In
making these calculations one must remember that only xk−1 , xk and xk+1 are varied.
Because of the restricted variation the extensive recursion and excessive complication of
the original derivation [7,16] are avoided. We can now substitute these expressions into
the necessary condition (63) and equate the coefficients of dξk+1 , dξk and dξk−1 to zero.
From the coefficient of dξk+1 we have

−1fk+1 eDk+1 fk+2 + ρk


+ = πk . (70)
1 − Qk+1 Vk+1 Vk+1

From the coefficient of dξk and by elimination of πk using equation (70) we get
 
−1fk eDk 1 1 1fk+1 Qk+1
+ (fk+1 + ρk ) − + = 0. (71)
Qk − 1 Vk Vk+1 Vk Vk+1 Qk+1 − 1

From the coefficient of dξk−1 with πk once again eliminated using equations (70) and
(71) we obtain
 
−1fk−1 eDk−1 1 1 1fk Qk
+ (fk + ρk ) − + = 0. (72)
Qk−1 − 1 Vk−1 Vk Vk−1 Vk Qk − 1

If these conditions are applied to all values of k ∈ (1, n) we obtain the necessary condi-
tions for a strategy of optimal type. In particular we note that if k is replaced by k − 1 in
equation (71) and the resulting equation is compared with equation (72) we can see that
ρk−1 = ρk and hence ρk = ρ for some ρ ∈ R with ρ > 0 and all k. By replacing k by
k − 1 in equation (70) and comparing the new equation with the original it is now quite
easy to see that
 
fk+1 + ρ Qk+1 fk+2 + ρ
πk−1 = + D πk − . (73)
Vk+1 e k+1 Vk+1
The conditions (70) and (73) were found recently by Cheng [7] using a more complicated
version of the above argument involving a full variation.
84 HOWLETT

6. The key equations for a typical train control problem with discrete control

For the typical train control problem with discrete control where
Af (u)
F (x, v, u) = + B(u) + g(x) − r(v) (74)
v
the key equations take a simplified form. In this case equation (71) becomes
   
Afk+1 1 1
+ g(xk ) − r(Vk ) eDk + A(fk+1 + µ) −
Vk Vk+1 Vk
Afk+1
= + g(xk+1 ) − r(Vk+1 ). (75)
Vk+1
By using the equation
Z xk+1   

Dk Afk+1
g(xk )e − g(xk+1 ) = − r v(x) deDk (x,xk+1) (76)
xk v(x)
and applying an appropriate integration by parts the key equation can be written in the
equivalent form
Z xk+1
eDk (x,xk+1 ) dEρ [v(x)] = 0. (77)
xk

It is interesting to compare this equation with the equation (47) for optimal switching in
the continuous control problem.

7. The continuity principle

Once again we consider the general vehicle control problem with discrete control de-
scribed in section 2.1. We form a Hamiltonian function H : R4 × U → R by setting
H (x, v, α, β, u) = −f (u) + αv + βF (x, v, u), (78)
where the adjoint variables α = α(t) ∈ R and β = β(t) ∈ R satisfy the adjoint differen-
tial equations (15) and (16). It is easily seen that there is a sequence {µk+1 }k=0,1,...,n ∈ R
with
H = µk+1 (79)
for t ∈ (tk , tk+1 ). Therefore
−fk+1 + αv + βFk+1 (x, v) = µk+1 (80)
and hence
fk+1 + µk+1 − αv
β= (81)
Fk+1 (x, v)
TRAIN CONTROL 85

on this interval. If we rewrite equation (15) in the form


∂F
dα v ∂xk+1 (x, v) fk+1 + µk+1 ∂Fk+1
− α=− (x, v) (82)
dt Fk+1 (x, v) Fk+1 (x, v) ∂x
then we can integrate equation (82) from tk to tk+1 to deduce that
Z xk+1
Dk 1 Dk (x,xk+1 )
αk+1 − αk e = [fk+1 + µk+1 ] de , (83)
xk v
where we have used the notation αk = α(tk ) to denote the value of α at time tk .
If we assume that the Hamiltonian is continuous at tk and if we write βk = β(tk ) to
denote the value of β at time tk then, by equating the left and right hand limits of H (t)
at tk we have
−fk + αk Vk + βk Fk (xk , Vk ) = −fk+1 + αk Vk + βk Fk+1 (xk , Vk ) (84)
and hence
1fk 1fk 1
βk = = . (85)
Fk+1 (xk , Vk ) − Fk (xk , Vk ) 1 − Qk Fk+1 (xk , Vk )
The continuity of the Hamiltonian also implies that there is some µ ∈ R with µk+1 = µ
and hence
H (t) = µ (86)
for all t ∈ (tk , tk+1 ) and each k = 0, 1, . . . , n. Evaluating the Hamiltonian by taking the
right hand limit at tk and using equation (85) gives
1fk
−fk+1 + αk Vk + =µ (87)
1 − Qk
and by substituting in equation (83) and simplifying we obtain
−1fk eDk fk+1 + µ
+ = αk+1 . (88)
1 − Qk Vk Vk
On the other hand we note that evaluation of the Hamiltonian by taking the left hand
limit at tk gives
−fk + αk Vk + βk Fk (xk , Vk ) = µ (89)
and by rearranging and using equations (85) and (88) we have
 
fk + µ Qk 1fk fk + µ Qk 1fk eDk
αk = − = − D
Vk Vk 1 − Qk Vk e k 1 − Qk Vk
 
fk + µ Qk fk+1 + µ
= − D − αk+1 . (90)
Vk e k Vk
The equations (88) and (90) are the key equations given by Cheng [7].
86 HOWLETT

References

[1] I.A. Asnis, A.V. Dmitruk and N.P. Osmolovskii, Solution of the problem of the energetically optimal
control of the motion of a train by the maximum principle, U.S.S.R. Comput. Math. Math. Phys. 25(6)
(1985) 37–44.
[2] B.R. Benjamin, I.P. Milroy and P.J. Pudney, Energy-efficient operation of long-haul trains, in: Pro-
ceedings of the 4th International Heavy Haul Railway Conference, IE Aust. (Brisbane, 1989) pp. 369–
372.
[3] L. Cesari, Optimisation – Theory and Applications (Springer, 1983).
[4] J. Cheng and P.G. Howlett, Application of critical velocities to the minimisation of fuel consumption
in the control of trains, Automatica 28(1) (1992) 165–169.
[5] J. Cheng and P.G. Howlett, A note on the calculation of optimal strategies for the minimisation of
fuel consumption in the control of trains, IEEE Transactions on Automatic Control 38(11) (1993)
1730–1734.
[6] J. Cheng, Y. Davydova, P.G. Howlett and P.J. Pudney, Optimal driving strategies for a train journey
with non-zero track gradient and speed limits, IMA Journal of Mathematics Applied in Business and
Industry 10 (1999) 89–115.
[7] J. Cheng, Analysis of optimal driving strategies for train control problems, Ph.D. thesis, University of
South Australia (1997).
[8] D.J. Gates and M.R. Westcott, Solar cars and variational problems equivalent to shortest paths, SIAM
Journal on Control and Optimization 34(2) (1996) 428–436.
[9] P.G. Howlett, The optimal control of a train, Study Leave Report, School of Mathematics, University
of South Australia (1984).
[10] P.G. Howlett, An optimal strategy for the control of a train, J. Aust. Math. Soc. Ser. B 31 (1990)
454–471.
[11] P.G. Howlett, P.J. Pudney and B.R. Benjamin, Determination of optimal driving strategies for the con-
trol of a train, in: Computational Techniques and Applications; CTAC 91, eds. B.J. Noye, B.R. Ben-
jamin and L.H. Colgan, Computational Math. Group, Division of Applied Math., Aust. Math. Soc.
(1992) pp. 241–248.
[12] P.G. Howlett, I.P. Milroy and P.J. Pudney, Energy-efficient train control, Control Engineering Practice
2(2) (1994) 193–200.
[13] P.G. Howlett, J. Cheng, and P.J. Pudney, Optimal strategies for energy-efficient train control, in: Con-
trol Problems in Industry, eds. I. Lasiecka and B. Morton, Progress in Systems and Control Theory
(Birkhäuser, 1995) pp. 151–178.
[14] P.G. Howlett and P.J. Pudney, Energy-Efficient Train Control, Advances in Industrial Control
(Springer, London, 1995).
[15] P.G. Howlett, Optimal strategies for the control of a train, Automatica 32(4) (1996) 519–532.
[16] P.G. Howlett and J. Cheng, Optimal driving strategies for a train on a track with continuously varying
gradient, J. Aust. Math. Soc. Ser. B 38 (1997) 388–410.
[17] P.G. Howlett, P.J. Pudney, D. Gates and T. Tarnopolskaya, Optimal driving strategy for a solar car on
a level road, IMA Journal of Mathematics Applied in Business and Industry 8 (1997) 59–81.
[18] P.G. Howlett and P.J. Pudney, An optimal driving strategy for a solar powered car on an undulating
road, Dynamics of Continuous, Discrete and Impulsive Systems 4 (1998) 553–567.
[19] P.G. Howlett, A restricted variation argument to derive necessary conditions for the optimal control of
a train, in: Progress in Optimization II; Contributions from Australasia, eds. X.Q. Yang, A.I. Mees,
M.E. Fisher and L.S. Jennings (Kluwer) to appear.
[20] K. Ichikawa, Application of optimization theory for bounded state variable problems to the operation
of a train, Bulletin of Japanese Society of Mech. Eng. 11(47) (1968) 857–865.
[21] E. Khmelnitsky, On an optimal control problem of train operation, Report for the Faculty of Engi-
neering, Department of Industrial Engineering, Tel-Aviv University (1994).
TRAIN CONTROL 87

[22] P. Kokotović and G. Singh, Minimum-energy control of a traction motor, IEEE Trans. on Automatic
Control 17(1) (1972) 92–95.
[23] I.P. Milroy, Aspects of automatic train control, Ph.D. thesis, Loughborough University (1980).
[24] P.J. Pudney and P.G. Howlett, Optimal driving strategies for a train journey with speed limits, J. Aust.
Math. Soc. Ser. B 36 (1994) 38–49.
[25] P.J. Pudney, P.G. Howlett, B.R. Benjamin and I.P. Milroy, I.P., Modelling the operational performance
of large systems; A railway example, in: Computational Techniques and Applications; CTAC 95, eds.
R.L. May and A.K. Easton (World Scientific, 1996) pp. 655–662.
[26] K.L. Teo, C.J. Goh and K.H. Wong, A Unified Computational Approach to Optimal Control Prob-
lems, Pitman Monographs and Surveys in Pure and Applied Mathematics 55 (Longman Scientific and
Technical, Longman, UK, 1991).

You might also like