are
H
x
= p(t),
H
p
= x(t),
H
u
= 0 (1.2)
where the Hamiltonian of the problem is dened as the function
(1.3) H(x(t), u(t), p(t), t) :=
(x(t
f
), t
f
)
t
f
t
0
+p
T
(t)
_
f(x(t), u(t), t) x(t)
and the p
) where
h(x
(t)) = 0
on the optimal trajectory x
)
is called a boundary arc if it is a closed component of B(x
j
, j = 1, . . . , p
where h
i
:= t
i+1
t
i
is the length of the subinterval.
The basic strategy of collocation is to approximate the solution of problem (1.1)
using a continuous piecewise polynomial approximation x
(
ij
) = f(x
(
ij
), u
(
ij
),
ij
) (rst derivatives at collocation points);
(2) h(x
(t
i
)) 0 (path constraint at mesh points);
(3) Boundary conditions.
The simplest choice is to let the collocation points be the subinterval endpoints
(2.4)
1
= 0,
2
= 1.
This is called a (third order) Lobatto scheme. The values of x
and u
at the
meshpoints, x
(t
i
) and u
(t
i
), are taken to be free and act as the optimization
variables. With this choice of collocation points and given the values of x
(t
i
) and
u
(t
i
), x
(t) = c
i
0
+c
i
1
_
t t
i
h
i
_
+c
i
2
_
t t
i
h
i
_
2
+c
i
3
_
t t
i
h
i
_
3
, t [t
i
, t
i+1
],
where, denoting by f
i
the value of f(x
(t
i
), u(t
i
), t
i
), the coecients are [12]
c
i
0
= x
(t
i
); (2.6)
c
i
1
= h
i
f
i
; (2.7)
c
i
2
= 3x
(t
i
) 2h
i
f
i
+ 3x
(t
i+1
) h
i
f
i+1
; (2.8)
c
i
3
= 2x
(t
i
) + h
i
f
i
2x
(t
i+1
) + h
i
f
i+1
. (2.9)
Problem (1.1) is then approximated with a NLP problem with nonlinear constraints
represented by the collocation conditions on each subinterval, plus the boundary
conditions and path constraints.
4 TONI LASSILA
For notational purposes we compile the discretized state and control input into
one vector:
(2.10) y
i
=
_
x
i
1
. . . x
i
n
u
i
1
. . . u
i
m
T
(2.11) y
T
=
_
[y
1
]
T
. . . [y
N
]
T
.
2.1. Linear problems. If the system equation is of linear form
(2.12) y = A(t)y +q(t)
with m boundary conditions
(2.13) B
0
y
1
+B
f
y
N
= ,
then using the trapezoid rule at each interval [t
i
, t
i+1
] we have [1]:
(2.14) S
i
= h
1
i
I
1
2
A(t
i
), R
i
= h
1
i
I
1
2
A(t
i+1
)
(2.15) q
i
=
1
2
[q(t
i+1
) +q(t
i
)],
from which the conditions at the collocation points can be combined together with
the boundary conditions:
_
_
S
1
R
1
S
2
R
2
.
.
.
.
.
.
S
N1
R
N1
B
0
B
f
_
_
_
_
y
1
y
2
.
.
.
y
N1
y
N
_
_
=
_
_
q
1
q
2
.
.
.
q
N
_
.
We denote this linear equation as Ty = q. Note that the matrix T is of size
[nN + m] nN and very sparse. Now we can write the optimization problem
with a linear cost function, linear constraints, and a possibly nonlinear inequality
constraint:
(2.16) min
y
J(y) = (y
N
)
subject to
_
Ty = q
h(x
i
) 0, i = 1, . . . , N.
2.2. Nonlinear problems. For nonlinear systems the solution procedure is more
general. The nonlinear system equation is
(2.17) y = f(y, t)
with m nonlinear boundary conditions
(2.18) g(y
1
, y
N
) = 0
and k inequality constraints at the mesh points
(2.19) h(x
i
) 0, i = 1, . . . , N.
The collocation conditions are written as the residual error of a given dierence
approximation for the derivative x on each interval [t
i
, t
i+1
]:
(2.20) N(y
i
) = x
i+1
x
i
h
i
q
j=1
q
f
ij
= 0, i = 1, . . . , N 1
where
(2.21) f
ij
= f(y
i
+ h
i
q
l=1
jl
f
il
, t
i
+ h
i
j
),
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 5
where , , and are the weights. If
1
= 0 and
jl
= 0 when j l, then the method
is explicit, otherwise implicit. When the method is implicit, the local unknowns f
ij
in the collocation equations require either:
(1) The solution of nonlinear equation (2.21) to determine the values f
ij
at
every evaluation of the collocation constraints (see [4], p.69)
(2) Introduction of the local unknowns f
ij
as extra variables into the optimiza
tion problem (1.1).
Both methods increase the computational eort of the optimization iteration. How
ever, if there is only one collocation point on the interval (0, 1) its possible to write
an explicit formula for the method. This allows the third order implicit Lobatto
method:
(2.22) x
i+1
x
i
=
h
i
6
_
f(y
i
, t
i
) + 4
f +f(y
i+1
, t
i+1
)
_
where
(2.23)
f := f(
1
2
(y
i
+y
i+1
) +
h
i
8
(f(y
i
, t
i
) f(y
i+1
, t
i+1
)), t + h
i
/2).
The NLP problem is then:
(2.24) min
u
(y
N
)
subject to
_
_
_
N(y
i
) = 0, i = 1, . . . , N
B
0
y
1
+B
f
y
N
= 0
h(x
i
) 0
where the boundary conditions have been linearized:
(2.25) B
0
:=
g(y
1
, y
N
)
y
1
, B
f
:=
g(y
1
, y
N
)
y
N
.
Ecient solvers for such problems have been developed using the method of se
quential quadratic programming (SQP), and will not be elaborated further in this
work. See [2] for an introduction to SQP.
3. Boundary arcs
To begin, a few results from [8] and [10]. Consider problem (1.1) with a scalar
input control u(t). Denote again by  the set of feasible input controls.
Theorem 3.1 (JacobsonLeleSpeyer). Assume rst the technical conditions that
follow:
(1) u ,  := u(t) : u(t) is piecewise continuous and bounded;
(2) h(x(t)) is (p + 1)times continuously dierentiable with respect to x;
(3) Problem (1.1) has an optimal solution with nite cost;
(4) Along a boundary arc (h = 0) the control that maintains
d
p
dt
p
h(x) = 0 is
ptimes continuously dierentiable with respect to time;
(5) Along the optimal solution
u
_
d
p
dt
p
h(x)
_
,= 0, t [t
0
, t
f
].
Assume further that problem (1.1) has an optimal trajectory with a single boundary
arc [t
entry
, t
exit
]. For the adjoined cost functional
J = (x(t
f
), t
f
) +
_
t
f
t
0
p
T
(t)(f x)dt +
_
t
f
t
0
h(x)d(t)
where (t) is a function of bounded variation, at the junction points we have the
conditions:
(3.1) p(t
entry
) p(t
+
entry
) = (t
+
entry
)
x
h(t
entry
);
6 TONI LASSILA
(3.2) p(t
exit
) p(t
+
exit
) = (t
exit
)
x
h(t
exit
),
where (t
+
) and (t
u
d
q
dt
q
h(x) ,= 0, t [t
0
, t
f
], u ;
(3) The set of junction points is nite and h(x
(t
f
)) < 0,
then it holds that:
(1) u
is everywhere continuous.
(2) and u
are C
1
smooth outside the junction points. Also, u
has q 2
continuous time derivatives at the junction points.
(3) vanishes outside the boundary arcs.
Note that requirement 1 is very strong and often does not hold in practical prob
lems. Especially minimumtime problems with bangbang type solutions have opti
mal trajectories which are not everywhere dierentiable and optimal control inputs
which contain jumps. On the other hand, we can apply regularization to the op
timality measure that attempts to fulll this condition. For example, consider the
controlwise linear optimal control problem x = f(x) + bu with the performance
measure
(3.3) J(u) =
1
2
_
t
f
t
0
xu
2
dt
and the state constraint [x(t)[ 1. The regularized performance measure
(3.4)
J(u) =
1
2
_
t
f
t
0
_
xu
2
+ (1 + )u
2
_
dt
fullls the condition H
uu
= x + (1 + ) 0.
When the NLP problem (2.24) is solved using SQP, in addition to the solution,
estimates of the Lagrange multipliers
i
related to the path inequality constraint
at each mesh point are obtained. Is there a connection between the discrete La
grange multipliers
i
and the piecewise smooth Lagrange multiplier function
seen in (3.1)?
In [12] the problem (1.1) is discretized using a uniform mesh and the Lobatto3
rule. Among the rst order necessary conditions (1.2) for the problem are
(3.5) p(t) = p(t)
T
f(x(t), u(t), t)
x
T
(t)
h(x(t))
x
.
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 7
The rst order necessary KarushKuhnTucker conditions for the discrete NLP
problem include
(3.6)
3
2
i
=
3
2
T
i
f(x(t
i
), u(t
i
), t
i
)
x
T
i
h(x(t
i
))
x
for all i = 1, . . . , N. This demonstrates that (t
i
) and
i
dier only by a constant
factor dependant on the discretization method.
Proposition 3.1. For a uniform mesh with N points, the Lobatto3 collocation
solution of problem (2.24) has pointwise Lagrange multipliers
i
and
i
for the
collocation and state inequality constraint h(x(t)) 0 respectively such that:
p(t
i
) =
3
2
c(N)
i
, (t
i
) = c(N)
i
,
where p(t) is the costate and (t) is a function of bounded variation.
3.1. Subarc optimization estimator. For notational simplicity, assume that
problem (1.1) has been converted to Lagrange form
(3.7) min
u
J(u) =
_
t
f
t
0
g(x(t), u(t), t)dt
and that we are working with a scalar path constraint h(x(t)) 0. Assume that
the problem has been solved approximately and the solution y
J(u) =
_
t
i+1
t
i
g(x(t), u(t), t)dt
subject to
_
_
x(t) = f(x(t), u(t), t)
x(t
i
) = x
i
x(t
i+1
) = x
i+1
h(x(t)) 0, h(x(t
i+1
)) = 0
where x
, then so are x
i
and x
i+1
sub
for the
optimal trajectory.
Denote the value of the constraint at
k
, h(x
sub
(
k
)) =:
k
0. We attempt to
nd the entry point t
entry
using a combination of the secant and bisection methods
applied to h:
(1) Let
1
= t
i
,
1
= t
i+1
and choose
1
=
1
+
1
2
and set
0
:= h(x
i
).
(2) For each k: Compute
k
(
k
) by solving the local NLP problem on the 3point
mesh. If
k
= 0, i.e. the constraint becomes active then let:
k+1
:=
k
,
k+1
:=
k
,
k+1
:=
k+1
+
k+1
2
.
If
k
< 0 then let:
k+1
:=
k
,
k+1
:=
k
,
k+1
:=
k
+
k
k
x
k
k
k1
,
8 TONI LASSILA

?
1
1
h(x
sub
())
Step 1

?
2
2
2
h(x
sub
())
Step 2

?
3
3
h(x
sub
())
%
%
%
%
%
d
d
Step 3

?
Step 4
4
4
h(x
sub
())
d
d
#
#
#
4
Figure 3.1. Progress of the subarc optimization estimator
provided that
k+1
[
k+1
,
k+1
]. Otherwise fall back to the bisection step:
k+1
:=
k
,
k+1
:=
k
,
k+1
:=
k+1
+
k+1
2
.
(3) Increment k until the stopping criteria:
0 < [
k
k
[ <
is fullled for some > 0, or until suciently many steps have been taken.
The method is illustrated in Figure 3.1. A similar idea has been presented in [5].
3.2. Secant extrapolation estimator. If the strong convexity condition (1) from
Theorem 3.2 holds and the constraint h(x(t)) is of order 1, we can assume that the
Lagrange multiplier is everywhere continuous and dierentiable on the boundary
arc. Assume that there exists a boundary arc and a triplet of mesh point such that:
(3.9) t
entry
(t
i1
, t
i
),
i+1
>
i
> 0.
Attempt to extrapolate with a secant line drawn through t
i
and t
i+1
. Denote by
h
i
:= t
i+1
t
i
and choose the estimator:
(3.10)
t
entry
:= t
i
h
i
(t
i
)
(t
i+1
) (t
i
)
provided that t
i1
<
t
entry
< t
i
. Similarly for the exit point:
(3.11)
t
exit
:= t
i
+ h
i1
(t
i
)
(t
i1
) (t
i
)
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 9
provided that t
i
<
t
exit
< t
i+1
. This method is not very useful due to the fact that
the Lagrange multiplier function (t) usually has jumps at the junction points, but
it serves as an introduction to the next method.
3.3. Jump condition estimator. In case the Lagrange multiplier function (t)
is not continuous at the junction points, we can use the jump conditions from
Theorem 3.1. Using the costate at p(t
i1
) and p(t
i
) as estimators for the limits of
the costate variables at t
entry
:
p(t
i1
) lim
0
p(t
entry
+ ) = p(t
entry
);
p(t
i
) lim
0
+
p(t
entry
+ ) = p(t
+
entry
),
we have the approximate relation for the jump at (t
entry
):
(3.12) (t
+
entry
)
x
h(t
entry
) p(t
i1
) p(t
i
).
If h is linear with respect to x, then
x
h is constant, and the equation is simple
to solve for (t
+
entry
). Once the magnitude of the jump has been established, we
proceed with a similar secant extrapolation method as in the previous case. Using
Proposition 3.1 and the previous results, the equation for the entry point estimator
takes the form:
t
entry
= t
i
+ h
i
(t
+
entry
) (t
i
)
(t
i+1
) (t
i
)
t
i
+ h
i
(
x
h)
T
[p(t
i1
) p(t
i
)] c(N)
i
c(N)[
i+1
i
]
= t
i
+ h
i
(3/2)
c(N)(
x
h)
T
[
i1
i
]
c(N)
i
c(N)[
i+1
i
]
= t
i
+
3
2
h
i
(
x
h)
T
[
i1
i
]
i
[
i+1
i
]
where (
x
h)
T
:=
_
(
x
h)
1
1
. . . (
x
h)
1
m
. Similarly:
t
exit
= t
i
+ h
i
(t
exit
) (t
i
)
(t
i
) (t
i1
)
t
i
+
3
2
h
i
(
x
h)
T
[
i1
i
]
i
[
i
i1
].
The method is illustrated in Figure 3.2.
3.4. Local shooting estimator. Assume that at point t
i
on the optimal trajec
tory the state constraint is not yet active, but becomes active between [t
i
, t
i+1
]. Let
u
i
= u(t
i
) and integrate numerically the state equation:
(3.13) x(t) = f(x(t), u
i
, t), t [t
i
, t
i+1
]
with the initial value x(t
i
) = x
(t
i
) from the best numerical approximation avail
able to obtain a local shooting solution x
LS
. Starting from the point t
i
, nd the
point where the state constraint h becomes active, i.e. where:
(3.14) h(x
LS
(), u
i
) = 0.
This gives an estimate for the entry point t
entry
. To nd the exit point t
exit
, look
at the rst mesh point where the state constraint has become inactive, and then
integrate backwards in similar fashion.
10 TONI LASSILA

e
e
(t
+
entry
)
t
entry
t
exit
(t
i+1
)
(t
i
)
(t)
Figure 3.2. Secant extrapolation estimator with a jump condi
tion for (t)
3.5. Boundary arc completion. Assume that the optimal trajectory contains
boundary arcs 1
1
, . . . , 1
r
that have been identied using some of the methods pre
sented above. This information can be used to accelerate converge of the optimiza
tion problem by reducing the set of feasible states. On each interval we have the
additional condition:
(3.15) h(x
(t)) = 0, t 1
j
, j = 1, . . . , r.
For all points t
i
that lie inside the boundary arcs we write a new constraint in
(2.24):
h(x(t
i
)) = 0, t
i
: t
i
is on a boundary arc.
4. Mesh Selection Issues
4.1. Error equidistribution. From the theory of nite dierence methods for the
solution of boundary value ODEs, we know the importance of the selection of mesh
points. The same principles apply to discretized optimal control problems. In par
ticular, we attempt to measure the discretization error caused by replacing x with
an approximant x
[[ =
_
t
f
t
0
(t, x(t))dt = N.
This denition is motivated as follows. Assume that we have an estimate for the
collocation error at each interval given as a linear function of the interval length h:
(4.3)
i
:=
i
h
i
, i = 1, . . . , N 1.
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 11
where
i
is independent of h
i
. We then minimize the maximum error over all inter
vals as a function of the mesh points:
(4.4) min
max
i
[
i
[
subject to
N
i=1
h
i
= t
f
t
0
.
The solution of this minimax problem is simple. By choosing
(4.5)
i
= (t
f
t
0
)/
N
i=1
1
i
(constant)
for all i we get an equidistributing mesh and this is the optimal choice.
4.1.1. Constructing an as.eq. mesh. The algorithm presented here is from [1]. As
sume that a chosen dierence method of order s has local truncation error
(4.6)
i
(x) = h
s
i
T(t
i
) + O(h
r
i
), r > s.
Then our monitor function (t, x(t)) can be chosen to be
(4.7) (t, x(t)) := [T(t)[
1/s
where T(t) contains the (s + 1):st derivative of x(t).
For example, using the third order Lobatto method (2.22) we choose a monitor
function
(4.8) (t, x(t)) := C[x
(4)
(t)[
1/3
.
Since the actual solution x(t) is not available, we replace it with the solution x
,
interpolated with cubic splines between the mesh points. The cubic splines will of
course have
(4.9) x
(4)
(t) 0,
so instead we approximate linearly:
(4.10) x
(3)
(t
i
) = (t
i
), i = 1, . . . , N
where (t) continuous, piecewise linear on every subinterval [t
i
, t
i+1
], and we get
the piecewise constant monitor function
(4.11) (t, x(t)) = [ (t)[
1/3
.
Since (t, x(t)) is piecewise constant, it is easy to nd a mesh with N points
that fullls (4.1). Another useful condition to impose on the mesh is that it is
quasiuniform:
Denition 4.1. A mesh = t
1
, . . . , t
N
is said to be quasiuniform if there exists
a constant K 1 such that:
K
1
_
t
f
t
0
N
_
h
i
K
_
t
f
t
0
N
_
, i = 1, . . . , N 1.
The optimal choice of K depends on the problem in question.
12 TONI LASSILA
4.2. Adaptive mesh algorithm. With all the pieces together, we can formulate
an algorithm for constructing an adaptive mesh for the direct collocation method:
(1) Form the NLP problem (2.24) using a uniform mesh.
(2) Solve the NLP problem with a few iterations until sucient (low) accuracy
is obtained.
(3) Find the junction points
1
, . . . ,
l
using one of the methods described.
(4) Divide the interval [t
0
, t
f
] into interior and boundary arcs:
I
1
= [t
0
,
1
], I
2
= [
1
,
2
], . . . , I
k+1
= [
k
, t
f
].
(5) Compute an estimate of the local error
j
incurred on each arc I
j
using
(4.11).
(6) Decide the total number of subintervals to be used, N. For each arc I
j
the
number of mesh points is:
#p
j
= 2 +(N k + 1)
j
/
k+1
j=1
j
.
(7) Form an as.eq. mesh for each arc I
j
using the proportionally assigned num
ber of mesh points #p
j
. For each arc enforce the quasiuniformity condition:
K 1 : K
1
_
i+1
i
#p
j
1
_
h
i
K
_
i+1
i
#p
j
1
_
.
(8) Form the new NLP problem on the adaptive mesh.
(9) (optional) Add boundary arc completion conditions:
h(x(t
i
)) = 0, t
i
: t
i
is on a boundary arc.
(10) Solve the problem until convergence is achieved.
A reference implementation called MATCOL was written using the Matlab scientic
computing environment and is available for download at
http://www.math.tkk.fi/~tlassila/
The comparison of methods presented in this work was done using MATCOL. The
NLP solver used was Matlabs fmincon .
5. Comparison of methods
Two dierent problems were used to test the methods presented. First, the linear
optimal control problem studied by Bryson, Denham, and Dreyfus:
(LP) min J(u) =
1
2
_
1
0
u(t)
2
dt
subject to
_
_
_
x
1
(t) = x
2
(t), x
1
(0) = 0, x
1
(1) = 0
x
2
(t) = u(t), x
2
(0) = 1, x
2
(1) = 1
x
1
(t) 1/9.
The state inequality constraint is of second order.
The other test problem was the Rayleigh optimal control problem:
(NLP) min J(u) =
_
2.5
0
u(t)
2
+ x
1
(t)
2
dt
subject to
_
_
_
x
1
(t) = x
2
(t), x
1
(0) = 5
x
2
(t) = x
1
(t) + x
2
(t)[c x
2
(t)
2
] + ku(t), x
2
(0) = 5
x
2
(t) 3.5.
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 13
with c = 1.4, = 0.14, and k = 4. Here, the state inequality constraint is of rst
order. Note that both problems fulll the assumptions of Theorem 3.2 and therefore
the optimal control u
x
ref
[[
1
.
A stopping tolerance of 10
6
was used for both the target function as well as the
optimization variables.
5.3. Indirect solution using a penalty function. To compare the results ob
tained using the direct collocation method, the problem (LP) was also solved in
directly by writing the necessary rstorder optimality conditions obtained using
14 TONI LASSILA
Table 5.2. Comparison of meshes for problem (LP)
Uniform Adaptive Adaptive (with BAC)
N SQP iters Error SQP iters Error SQP iters Error
10 2 0.30734 6 0.22851 3 0.19652
15 2 0.18025 19 0.12062 8 0.15437
20 2 0.11336 21 0.14585 12 0.12497
25 2 0.082786 25 0.060324 20 0.069808
30 2 0.052504 31 0.057758 22 0.075685
Table 5.3. Comparison of meshes for problem (NLP)
Uniform Adaptive (K = 1) Adaptive (BAC)
N SQP iters Error SQP iters Error SQP iters Error
10 21 7.8743 16 6.5279 13 8.0868
15 33 4.1358 21 2.9521 25 3.6024
20 28 2.208 29 1.0459 32 2.049
25 27 1.1581 35 0.85025 30 1.9559
30 36 0.75308 30 1.0686 38 1.2303
Figure 5.1. Uniform mesh division and absolute error of solution
for problem (NLP) using N = 14
calculus of variations. The state inequality constraint was handled by augmenting
the Hamiltonian with a penalty term:
(5.1) H(x
1
, x
2
, p
1
, p
2
, u) =
1
2
u
2
+ p
1
x
2
+ p
2
u + (x
1
)
where
(5.2) (x
1
) :=
_
x
1
L
_
M
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 15
Figure 5.2. Adaptive mesh division and absolute error of solution
for problem (NLP) using subarc identication, K = 1, and N = 14
with M N large, even. The necessary rstorder optimality conditions were then:
_
_
u + p
2
= 0;
p
1
+
x
1
= 0;
p
2
+ p
1
= 0;
x
1
x
2
= 0, x
1
(0) = 0, x
1
(1) = 0;
x
2
+ p
2
= 0, x
2
(0) = 1, x
2
(1) = 1.
This twopoint boundary value problem was solved using a collocation solver. The
solution accuracy compared to the reference solution was
[[x
bvp
x
ref
[[
1
0.20206.
when using a penalty term M = 150. This accuracy compares with direct collocation
using coarse meshes of only 1015 mesh points, despite the fact that the collocation
BVP solver (Matlabs bvp4c) used internally over 100 mesh points. Furthermore,
the solution does not exhibit a proper boundary arc as can be seen from Figure
5.3.
6. Conclusions
Of the three junction point identication methods, the method based on the
Lagrange multipliers of the NLP problem (JCE) exhibited the most accurate con
vergence. Unfortunately the method also suers from instability in some cases. The
reason for this instability was not clear. The method based on solving a threepoint
subproblem (SAOE) was almost as accurate but did not display any instability and
was therefore chosen as the method of choice for testing the actual algorithms.
For real problems, correctly identifying the boundary arcs can be a dicult job,
since in addition to proper boundary arcs it is possible that the optimal trajectory
merely touches the boundary at a single touch point. In fact, such behaviour occurs
every time the constraint is of odd order higher or equal to 3 ([8]). In such cases,
identication of the touch points would require more robust methods.
16 TONI LASSILA
Figure 5.3. Optimal trajectory for problem (LP) as given by the
indirect collocation method. For comparison, the reference solution
is drawn for the state component x
1
using a dotted line. The in
direct collocation solution does not correctly follow the boundary
arc x(t) = 1/9.
Problem (LP) was more suited to the uniform mesh. The linearity of the prob
lem together with the uniform mesh causes the quasiNewton SQP algorithm to
converge with only a few steps. In contrast, the adaptive mesh takes many more
steps to converge without boundary arc completion. If boundary arc completion is
enabled, the nal result is slightly less accurate but convergence is improved con
siderably. However, nothing suggests that an adaptive mesh is really necessary for
simple linear pathconstrained problems.
For problem (NLP) it can immediately be noted that more mesh points are needed
to obtain a sensible solution. When N 25, the solution with the adaptive mesh is
superior to the one given by a uniform mesh. However, as the number of subinter
vals N increases then the adaptive mesh starts to resemble locally the uniform mesh
and any advantages disappear. Here the benets of using boundary arc completion
are negligible at best.
It should be noted that in the solution of problem (NLP), all meshes were uni
form on each subinterval. While in theory better equidistributing meshes could be
ADAPTIVE MESH GENERATION METHODS FOR OPTIMAL CONTROL 17
achieved by increasing the quasiuniformity constant K, in practice this results in
numerical instability that can destroy the theoretical benets quite easily. This
suggests that the choice of K is dependant on the problem in hand and should be
included as a parameter for the user.
While more accurate results were obtained using nonuniform adaptive meshes,
the number of iterations required also grew. The introduction of ecient SQP
based solvers like SNOPT
1
makes such problems tractable, but for computational
eciency it would be better if the initial guess which produces the adaptive mesh
would be cheaply computable. One idea is to use the indirect solution with a penalty
function, as detailed in Section 5.3, but this approach does not allow for methods
based on the Lagrange multipliers. There is also the added workload of deriving
necessary conditions for the solution.
It should be noted that the adaptive mesh generation methods explained in this
work do not necessarily require that the solution method used be specically the
direct collocation method, and further study of similar techniques using other nu
merical solution methods for optimal control problems is in order.
References
[1] Ascher, U.M; Mattheij, R.M.M; Russell, R.D: Numerical Solution of Boundary Value Prob
lems for Ordinary Dierential Equations, SIAM, 1995
[2] Bazaraa, M.S; Sherali, H.D; Shetty, C.M: Nonlinear Programming, Theory and Algorithms,
2nd Edition, Wiley & Sons, 1993
[3] Betts, J.T: Survey of Numerical Methods for Trajectory Optimization, Journal of Guidance,
Control, and Dynamics, Vol. 21, No. 2, pp. 193207, 1998
[4] Betts, J.T: Practical Methods for Optimal Control Using Nonlinear Programming, Advances
in Design and Control, SIAM, 2001
[5] Betts, J.T; Human, W.P: Mesh Renement in Direct Transcription Methods for Optimal
Control, Optimal Control Applications & Methods, Vol. 19, No. 1, pp. 121, 1998
[6] Hargraves, C.R; Paris, S.W.: Direct Trajectory Optimization Using Nonlinear Programming
and Collocation, Journal of Guidance, Control, and Dynamics, Vol. 10, No. 4, pp. 338342,
1987
[7] Hull, D.G: Conversion of Optimal Control Problems into Parameter Optimization Problems,
Journal of Guidance, Control, and Dynamics, Vol. 20, No. 1, pp. 5760, 1997
[8] Jacobson, D.H; Lele, M.M; Speyer, J.L: New Necessary Conditions of Optimality for Control
Problems with StateVariable Inequality Constraints, J. Math. Anal. Appl. 35, pp.255284,
1971
[9] Kirk, D.E: Optimal Control Theory, Prentice Hall, 1970
[10] Maurer, H: On the Minimum Principle for Optimal Control Problems with State Constraints,
Schriftenreihe des Rechenzentrums der Univ. Mnster Nr.41, Mnster, 1979
[11] Seywald, H: Trajectory Optimization Based on Dierential Inclusion, Journal of Guidance,
Control, and Dynamics, Vol. 17, No. 3, pp. 480487, 1994
[12] von Stryk, O: Numerical Solution of Optimal Control Problems by Direct Collocation, Opti
mal Control (International Series in Numerical Mathematics 111), pp.129143, 1993
1
SNOPT is a FORTRAN Package for largescale nonlinear programming, developed by Philip
Gill (University of California, San Diego) and Walter Murray and Michael Saunders (Systems
Optimization Laboratory, Stanford University, Stanford).
Lebih dari sekadar dokumen.
Temukan segala yang ditawarkan Scribd, termasuk buku dan buku audio dari penerbitpenerbit terkemuka.
Batalkan kapan saja.