Вы находитесь на странице: 1из 12

BOUNDARY VALUE PROBLEM

FOR ORDINARY DIFFERENTIAL EQUATIONS


WITH APPLICATIONS TO OPTIMAL CONTROL
S. N. AVVAKUMOV AND YU. N. KISELEV
CMC DEPARTMENT, MOSCOW STATE LOMONOSOV UNIVERSITY
Abstract. Variation of parameter scheme (continuous form) in BVP for ODE
is outlined. Presented algorythm is used in the elaborated Maple program for
numerical solving of BVP. Some computational experience is described in the
paper, OC applications including.
1. Introduction
VPM (continuation method or homotopy method) may be considered as spe-
cial development and modication of classical Newtons method, see [1] - [5], [16].
The main idea of VPM admits short formulation: reducing of a given problem
to some IVP for ODE. This fundamental principle of mathematical physics is well
known, widely used and eective because IVP for ODE may be considered as a rou-
tine computational problem. The VPM-scheme outline is presented here in pressed
continuous form. It allows to combine simplicity of exposition of the main idea with
conviniencies for numerical realization on the way to computational experiments.
Some special VPM-schemes for solving BVP ODE are outlined below. It occurs con-
vinient to produce numerical experiments within the approach in MAPLE program
environment which permits to full analytical and numerical-analytical calculations
using MAPLE [15] computer algebra possibilities. By the way, instead of MAPLE,
the MAXIMA program, for example, may be used. Serious computational dicul-
ties, arising here, are adequate to complexity of the considered problem. Intention
to solve PMP BVP arising in OC was the main impulse for providing the investi-
gations. These results are of interest also for tutoring activity. Some numerics are
presented in the paper. The elaborated software (Program) allows to solve regular
BVP and some PMP BVP in OC, to search periodic solutions, limit cycles of ODE,
to determine unknown parameters in nonlinear ODE, etc. Note that considered
computational scheme does not coincide with previous ones.
Key words and phrases. Boundary value problem (BVP), initial value problem (IVP), ordi-
nary dierential equations (ODE), variation of parameter method (VPM), optimal control (OC),
Pontrygin maximum principle (PMP), Maple program, numerical experiments.
This work is supported by UR-BR, pr.43,5199, RFBR pr.99-01-01051 .
1
2. Theoretical background: short review
2.1. VPM for nonlinear vector equation in IR
m
. Let us consider the vector
equation
(p) = 0, (1)
where : IR
m
IR
m
is a smooth function. It is assumed that at least one solution
of the equation (1) exists. Classical Newtons method
p
k+1
= p
k
[(p
k
)]
1
(p
k
), k = 0, 1, ... (2)
requiring nonsingularity of the matrix

(p) = (
i
(p)/p
j
)
m
i,j=m
(3)
along the process possesses quadratic rate of convergence in the case of convergence,
but enough good starting point p
0
should be taken often. This disadvantage of
Newtons method is overcome in VPM-scheme which elaborates good initial ap-
proximation to solution starting with rough one. The VPM-scheme reduces search-
ing of a solution of the equation (1) to some IVP. It is possible to do under certain
assumptions listed below.
The VPM-scheme deals with the auxiliary equation
(p) = (1 )(p
0
), [0, 1], (4)
containing parameter . Here p
0
is some xed point from IR
m
, being an initial
approximation to solution of the equation (1); the accuracy of this approximation
is not assumed small. The equation (4) with = 0 has the known solution p
0
.
For = 1 the equation (4) coincides with the initial equation (1). In VPM the
known solution p
0
is transformed into an unknown solution of the equation (1). The
transformation law is described via some IVP. Note, that the auxiliary equation (4)
may be chosen in more general form: H(p, ) = 0, H(p
0
, 0) = 0, H(p, 1) = (p),
but we will consider the case (4) only.
Assumption 1 (on existence of smooth branch). The equation (4) for any
[0, 1] has solution
p = p(), 0 1, (5)
moreover, the function (5) is smooth with respect to parameter [0, 1], and
satises the initial condition
p()|
=0
= p
0
. (6)
Assumption 2 (on nonsingularity of matrix (3)) . The matrix (3) is nonsingular
along the solution (5).
Validity of the Assumptions depends on equation (1) and on choice of p
0
as
well. Of course, direct verication of Assumptions 1, 2 for complicated cases is not
possible in an eective way.
Substitution of the solution (5) into the equation (4) leads to the identity
(p()) = (1 )(p
0
), [0, 1].
Dierentiation of this identity with respect to parameter implies

(p())
dp()
d
= (p
0
). (7)
2
So, due to (6), (7), the function (5) is dened by the IVP
dp
d
= [

(p)]
1
(p
0
), p()|
=0
= p
0
, 0 1. (8)
Numerical solving of the IVP (8) allows to calculate the function p(), 0 1;
the vector
p()|
=1
(9)
should be a solution of the equation (1). Under real calculations the vector (9) gives
new approximation for solution, and its accuracy depends on applied numerical
method for solving the IVP (8).
So one can associate one step of iteration procedure with the IVP (8) solving.
On this way the following description of iterative process to search a solution of the
equation (1) may be proposed: iterative consequence p
0
, p
1
, p
2
, ... is produced by
p
0
= p
0
IV P(8),p0=p
0
= p
1
= p()
(8)
|
=1
IV P(8),p0=p
1
= p
2
= p()
(8)
|
=1
= ... (10)
The outlined process (10) includes a wide variety of discrete numerical schemes
dened by invoked numerical method for solving of IVP (8), but we do not need to
specify them now. Note only, that application of Eulers method with step = 1
in the IVP (8) converts process (10) into Newtons process (3).
Some modications of ODE (8) are possible.
2.2. VPM in BVP for ODE. Let us consider the BVP for ODE
x = f(t, x), a t b, x IR
n
, R(x(a), x(b)) = 0. (11)
Here f(t, x) : IR
1
IR
n
IR
n
, R(x, y) : IR
n
IR
n
IR
n
are smooth vector
functions. Supposing existence of solution to the BVP (11) we will discuss the
calculation questions.
Solution of BVP may be reduced to some nonlinear vector equation in IR
n
. Let
us choose a point t

[a, b] and consider the IVP


x = f(t, x), x|
t=t
= p IR
n
. (12)
Freedom in choice of this point t

may be very useful for numerical practice. Solu-


tion of IVP (12) is designated as
x(t, p), a t b. (13)
Solution (13) is assumed to be dened for all t [a, b] with any p. The initial value
parameter p IR
n
is to be found in such a way to satisfy the boundary condition
in the problem (12), i.e. p is a solution of the equation
(p) R(x(a, p), x(b, p)) = 0. (14)
Thus BVP (11) is reduced to the vector equation (14), with dimension n. VPM-
scheme, subsection 2.1, is used for solving equation (14). Some discussion on the
matrix

(p) calculation is to be done. We have:

(p) = R

x
x(a, p)
p
+R

y
x(b, p)
p
. (15)
3
Here n nmatrices R

x
(x, y), R

y
(x, y) are calculated along the solution (13), i.e.
for x = x(a, p), y = x(b, p). The notation
X(t, p)
x(t, p)
p
(16)
for n n-matrix of derivatives of the solution (14) with respect to initial value is
used. Matrix (16) is dened by the following dierential equation in variations

X = AX, X|
t=t
= I, a t b, (17)
where n n matrix
A = A(t, p) f

x
(t, x)|
x=x(t,p)
, (18)
I is identity matrix. Main IVP has form
dp
d
= [

(p)]
1
(p
0
), p(0) = 0, 0 1, (19)
with
(p) = R(x(a, p), x(b, p)),

(p) = R

x
(x(a, p), x(b, p))X(a, p) +R

y
(x(a, p), x(b, p))X(b, p).
(20)
For simultaneous calculation of x(t, p), X(t, p) the following vector-matrix IVP may
be written
_
_
_
x = f(t, x), x|
t=t
= p,

X = f

x
(t, x)X, X|
t=t
= I,
a t b.
(21)
The IVP (19) is said to be the external problem, the IVP (21) is said to be the
internal problem. In general nonlinear case the internal problem (21) depends on
p.
Thus iterative process (10), on the base of the external IVP (19) and the internal
IVP (21), is proposed.
The outlined scheme has been used to elaborate MAPLE Program for numerical
solving BVP (11). For composition of matrix f

x
the MAPLE analytical possibilities
were involved. For solving IVP, arising here, various MAPLE procedures may be
invoked.
Numerical expirience with the created software (Program) is presented in sec-
tion 3.
2.3. Smoothing technique used in PMP BVP in OC. PMP BVP in OC con-
taines discontinuous or unsmooth functions, for example, signature function ( sign),
saturation function (sat), dead zone function (dez), etc. So the previous approach
can not be used in a direct way to BVP in OC. Another reason for smoothing : in
problems with bang-bang type controls the inverted matrix may occur singular in
some domains. Certain preparing work is neccesary. Some technique for smoothing
optimal control problems were presented in [6] - [11]. These smoothing procedures
deal with changing of control dimension. Regularization of the problem may be
reached sometimes without changing of control dimension. Some simple smoothing
formulas are mentioned in this subsection.
4
The signature function sign(s) is approximated by
SIGNUM1(s, ) = s/
_
+s
2
, SIGNUM2(s, ) = tanh (s/).
The saturation function
sat(s) =
_
s, |s| 1,
sign(s), |s| > 1
is approximated by
SAT(s, ) =
1
2
_
_
+ (s + 1)
2

_
+ (s 1)
2
_
.
The dead zone function
dez(s) =
_
0, |s| < 1,
sign(s), |s| > 1,
is approximated by
DEZ(s, ) =
1
2
_
s + 1
_
+ (s + 1)
2
+
s 1
_
+ (s 1)
2
_
.
Smoothing parameter is some small positive number. Corresponding smoothing
formulas for extremal controls, while applying maximum principle [12], may be
got under appropriate small perturbation of the cost for some classes of OC
problems. The animation pictures for these approximating functions with respect
to parameter may be found in http://www.cs.msu.su/asn/Maple/movies.htm
3. Numerical Experiments
Example 1. Two bodies boundary value problem [3]:
x =
x
(x
2
+y
2
)
3/2
, y =
y
(x
2
+y
2
)
3/2
,
x(0) = a
1
, y(0) = a
2
, x(T) = b
1
, y(T) = b
2
.
To apply the Program this BVP is rewritten in the form :
_

_
x
1
= x
3
, x
1
(0) = a
1
, x
1
(T) = b
1
,
x
2
= x
4
, x
2
(0) = a
2
, x
2
(T) = b
2
,
x
3
= x
1
(x
2
1
+x
2
2
)
3/2
,
x
4
= x
2
(x
2
1
+x
2
2
)
3/2
.
For the case
T = 7, a
1
= 2., a
2
= 0., b
1
= 1.0738644361, b
2
= 1.0995343576,
choosing t

= 0, with the starting points


p
0
1 = [2., 0., 0.5, 0.5] and p
0
2 = [2., 0., 0.5., 0.5]
two dierent solutions of the BVP were got with dening answer-vectors correspon-
dently
ans1 = [2., 0., 0.0000004834, 0.5000000745] and
ans2 = [2., 0., 0.4510782034, 0.2994186665].
5
1
2
F
S
1.2
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
1.2
x
2
0.5 1 1.5 2 2.5
x
1
10
8
6
4
2
0
2
4
6
8
10
x
2
10 8 6 4 2 2 4 6 8 10
x
1
1
2
3
Fig.1. Fig.2.
Corresponding trajectories 1 and 2 (with the starting point S and the nal point
F) of the system in x
1
x
2
plane are shown on Fig.1. Here and in the following
examples rkf-45 methods for solving IVP were used. Chosen accuracy: for the
external problem 10
4
, for the internal problem 10
6
. Number of iteration steps
= 3.
Example 2. Calculation of limit cycles in Eckweiler system [13]
x
1
= x
2
, x
2
= x
1
+ sin (x
2
).
This system has a countable set of limit cycles. Some of them are calculated to-
gether with unknown period T. Using dierent starting vectors p
0
the Program nds
dierent limit cycles. Limit cycle searching is reduced to the following BVP:
_

_
x
1
= x
3
x
2
,
x
2
= x
3
(x
1
+ sin (x
2
)),
x
3
= 0,
x
4
= 0,
x
1
(0) = x
4
(0), x
2
(0) = 0, x
1
(1) = x
4
(1), x
2
(1) = 0.
Auxiliary variables: x
3
= T, for period, and x
4
= x
1
(0), for abscissa of limit cycle
intersection point with axis x
1
, are introduced. Choosing point t

= 0, and the
starting vectors
p
0
1 = [2., 0., 2, 2.], p
0
2 = [6.5, 0., 2, 6.5], p
0
3 = [9., 0., 2, 9.]
the following dening answer-vectors have been calculated:
ans1 = [3.9655467678, 0., 6.4661401325, 3.9655467678],
ans2 = [7.1078664573, 0., 6.3387892836, 7.1078664573],
ans3 = [10.2456910360, 0., 6.3101121791, 10.2456910360].
Corresponding limit cycles 1, 2, 3 are shown on Fig.2. This problem is solved
without any diculties.
6
14
12
10
8
6
4
2
2
4
6
8
10
12
14
x
2
2 1 1 2 x
1
x
2
(t/T)
x
1
(t/T)
14
12
10
8
6
4
2
0
2
4
6
8
10
12
14 x
1
,x
2
0 0.2 0.4 0.6 0.8 1
t/T
Fig.3. Fig.4.
Example 3. Calculation of limit cycle period of van der Pol equation
x
1
= x
2
, x
2
= (x
2
1
1)x
2
x
1
, (22)
for =
1
= 10, =
2
= 2.7721992263175, =
3
= 0.95893843253661.
Using similar technique as in Example 2 for period T() and solving correspond-
ing BVP one has got
T(
1
) = 19.0783730753, T(
2
) = 8.56600769087, T(
3
) = 6.6337646662.
Calculations with = 10 were not succesful for some starting vectors p
0
, but there
exists a wide enough domain for p
0
with stable convergence of the process; limit
cycle of the system (22) for = 10 is shown on Fig.3, dependence of coordinates
on time is shown on Fig.4. It is interesting to mention that the system is sti.
Example 4. Determination of parameter in van der Pol equation (22) under
initial conditions x
1
(0) = 2, x
2
(0) = 0 and mesurement x
1
(8) = 1.161168571601.
This problem may be reduced to solving the equation
h() x
1
(8, ) 1.161168571601 = 0.
Using MAPLE the graph of function h() is plotted, Fig.5, and its roots are calcu-
lated: see
1
,
2
.
3
from Example 3. These results may be calculated also using
the Program through solving the following BVP
_

_
x
1
= x
2
,
x
2
= x
3
(x
2
1
1)x
2
x
1
,
x
3
= 0,
x
1
(0) = 2, x
2
(0) = 0, x
1
(8) = 1.161168571601
with dierent initial vectors p
0
.
7
3
2
2 4 6 8 10
1
0

1

2

3
h
h()
Fig.5.
Example 5. Time optimal control problem for the simple entity
Let us consider time optimal problem ([12], example 1)
x
1
= x
2
+u
1
, x
2
= u
2
, x
1
(0) = x
2
(0) = 2, x
1
(T) = x
2
(T) = 0,
T min
(23)
with interval U
0
= {u
1
= 0, |u
2
| 1} as control domain. At rst we will apply
control domain smoothing technique. The set U
0
is approximated by smooth convex
set U

= {u
2
1
/ + u
2
2
1}, depending on smoothing parameter > 0 and bounded
by narrow (for small ) ellipse. The problem (23) is reduced to PMP BVP which
is presented as
_

_
x
1
= x
5
(x
2
+
x3

x
2
3
+x
2
4
),
x
2
= x
5
x4

x
2
3
+x
2
4
,
x
3
= 0,
x
4
= x
5
x
3
,
x
5
= 0,
x
1
(0) = 2, x
2
(0) = 2, x
1
(1) = 0, x
2
(1) = 0, x
3
(1)
2
+x
4
(1)
2
= 1.
(24)
Auxiliary variable x
5
= T is introduced, new time interval is [0, 1], and x
3
=
1
,
x
4
=
2
are conjugate variables. Starting with t

= 0 and the initial point p


0
=
[2, 2, 0, 1, 4] the Program solves BVP (24), = 0.5, and the received answer-vector
is used as p
0
for solwing BVP (24), = 0.1, and its answer-vector, at last, is used
as p
0
for solving BVP (24), = 10
8
. The resulting answer-vector:
ans = [2., 2., 0.4472136002, 1.7888543875, 5.9999999428]
It is interesting to make comparison with the exact solution :
T = 6.0, (0) = (
1

5
,
4

5
),
1

5
= 0.447213595499...,
4

5
= 1.788854381999...
Optimal trajectories and controls u
2
(t) of smoothed problem for = 0.5, 0.1, 10
8
are presented on Fig.6,7. Optimal control u
2
(t) for small has practically bang-
bang character while |u
1
(t)| is small negligibly.
8
One dimensional smoothing of control in this example leads to the following PMP
BVP:
_

_
x
1
= x
5
x
2
,
x
2
= x
5
tanh
_
x4

_
,
x
3
= 0,
x
4
= x
5
x
3
,
x
5
= 0,
x
1
(0) = 2, x
2
(0) = 2, x(1) = 0, x(1) = 0, x
3
(1)
2
+x
4
(1)
2
= 1.
Here similar numerical results may be be reached. Of course, special programs for
time optimal problem, see [10], [11], are more eective in comparison with the
Program, which permits to treat a wider class of problems.
3
1
2
1: =5*10
1
2: =1*10
1
3: =1*10
8
(2,2)
2
1
0
1
2 x
2
1 2 3 4
x
1
1
2
3
1: =5*10
1
2: =1*10
1
3: =1*10
8
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
u
1

u
2

u
3
1 2 3 4 5 t
Fig.6. Fig.7.
Example 6. Minimization of the energy cost for 3-tiple integrator
Let us consider the control problem
_

_
x
1
= x
2
,
x
2
= x
3
,
x
3
= u, |u| 1,
x(0) = (1, 0, 0), x(T) = (0, 0, 0), T = 3.275,
L =
1
2
_
T
0
u(t)
2
dt min .
(25)
For the control problem
_
x = Ax +bu, |u| 1, x(0) = x
0
, x(T) = 0, T > 0 xed,
L(u) =
1
2
_
T
0
u
2
dt min
(26)
with one dimensional bounded control the PMP BVP has form:
x = Ax +b sat(b

),

= A

, x(0) = x
0
, x(T) = 0.
9
In special case (25), using smoothing technique for saturation function (with smooth-
ing parameter ), this PMP BVP takes the form
_

_
x
1
= x
2
,
x
2
= x
3
,
x
3
=
1
2
(
_
+ (x
6
+ 1)
2

_
+ (x
6
1)
2
),
x
4
= 0,
x
5
= x
4
,
x
6
= x
5
with boundary conditions extracted from (25). This BVP was solved by the Program
(t

= T, = 10
10
) with resulting answer-vector
ans=[0,0,0,-2.9850435834, 4.8880088678,-2.9083874537]
Dependence of optimal x
i
(t), i = 1, 2, 3, and control u(t) on t is shown on Fig.8,9.
x
3
(t)
x
2
(t)
x
1
(t)
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
x
1

x
2
x
3
0.5 1 1.5 2 2.5 3 t
- u(t)
-
3
(t)
2
1
1 2 3
0
1
u

3
t
Fig.8. Fig.9.
Example 7. Minimization of the fuel-type cost
The cost L
1
(u) =
_
T
0
|u(t)| dt is said to be fuel-type cost. In the problem
(26) with cost L
1
(u) the extremal control is u

() = dez(b

). The cost L
1
(u) is
approximated by
L
1,m
(u) =
T
_
0
|u|
1+
1
m+1
dt, m = 0, 1, 2, ...
when m is large. Extremal control in the case of cost L
1,m
is u

()=sat(b

)
m+1
.
This idea is used in the problem
_

_
x
1
= x
2
+u
1
, |u
1
| 1,
x
2
= x
1
+u
2
, |u
2
| 1,
x
1
(0) = 6, x
2
(0) = 2, x
1
(T) = 0, x
2
(T) = 0, T = 8,
J =
_
T
0
(x
2
1
/4 +x
2
2
/4 +|u
1
|
1+1/(m+1)
+|u
2
|
1+1/(m+1)
) dt min .
Using smoothing technique for saturation function with smoothing parameter =
10
8
, choosing parameter m = 5 and applying the Program optimal solution was
calculated. Optimal controls to the problem are shown on Fig.10.
10
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
u
1,u
2
u
1
(t) u
2
(t)
1 2 3 4 5 6 7 8 t
Fig.10.
For three next examples only models are mentioned.
Example 8. Time optimal control for nonlinear pendulum [14].
Example 9. Time optimal control for two dimensional inertial entity with friction.
x =
_

1
0
0
2
_
x +v, x, v IR
2
, v 1.
Example 10. Time optimal control for two dimensional inertial oscillating entity
with friction.
x =
_

1
0
0
2
_
x
_

1
0
0
2
_
x +v, x, v IR
2
, v 1.
References
[1] D.F. Davidenko, Ob odnom novom metode chislennogo resheniya system nelineynyh urav-
neniy, Doklady AN SSSR, 1953, 88, pp. 601 602 (in Russian).
[2] V.S. Kiriya, Trudy Tbilisskogo Un-ta, 44, 1951, (in Russian).
[3] R.E. Bellman, R.E. Kalaba, Quasilinearization and nonlinear boudary-value problems, NY.
1965.
[4] V.E.Shamansky, Metody chislennogo reshenya kraevih zadach na ECVM, Kiev. Naukova
Dumka. 1966, (in Russian).
[5] J.M. Ortega, W.C Rheinboldt, Iterative solution of nonlinear equations in several variables,
Academic Press. New York and London. 1970.
[6] Y.N. Kiselev, Optimalnoe upravlenie, MSU publishing house. 1988, (in Russian).
[7] Y.N. Kiselev, Bystroshodyashchiesya metody resheniya lineynoy zadachi bystrodeystviya,
Kibernetika. 1990. N 6. pp. 47 - 57.
[8] Y.N. Kiselev, M.V. Orlov, Chislennye algoritmy lineynyh bystrodeystviy, Journal vichislitelnoi
matemetiki i matematicheskoi phiziki. 1991. N 12. pp. 1763 - 1771.
[9] Y.N. Kiselev, M.V. Orlov. Dierencialnie uravnenia. 1995. N 12. pp. 1843 - 1850.
[10] Y.N. Kiselev, M.V.Orlov. Dierencialnie uravnenia. 1996. N1. pp. 44 - 51.
[11] S.N. Avvakumov, Y.N. Kiselev, M.V. Orlov, Metody resheniya nekotoryh zadach optimalnogo
upravlenya na osnove principa maksimuma Pontrygina, Trudy MI RAN. 1995. pp. 3-31.
[12] L.S. Pontryagin, V.G. Boltynskii, R.V. Gamkrelidze, E.F. Mishchenko, The mathematical
theory of optimal processes, Interscience. 1962.
[13] J.J. Stoker. Nonlinear vibrations in mechanical and electrical systems, NY. 1950.
11
[14] B.I. Cheshankov, Certain control problems of the pendulum motion, In IX International
Conference on nonlinear oscillations. v.3. Kiev. Naukova Dumka. 1984. pp. 290-293.
[15] Bruce W. Char, Keith O. Geddes, Gaston H. Gonnet, Benton L. Leong, Michael B. Monagan,
Stephen M. Watt, MAPLE V. Language Reference Manual, Springer-Verlag. New York.
1991.
[16] V.I.Shalashilin, E.B.Kuznetsov, Metod prodolzheniya resheniya po parametru i nailuchshaya
parametrizaciya, Editorial URSS, Moscow, 1999, (in Russian).
S. N. Avvakumov and Yu. N. Kiselev,, CMC Department, Moscow State Lomonosov
University,, Moscow 119899, Russia
E-mail address: asn@cs.msu.su and kiselev@cs.msu.su
12

Вам также может понравиться