Sie sind auf Seite 1von 23

Introduction to Calculus of Variations

Contents

1 Euler-Lagrange Equation
1.1 Functionals . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Euler-Lagrange Equation . . . . . . . . . . . . . . . . . . .
1.2.1 Transversality conditions . . . . . . . . . . . . . . .
1.2.2 Functionals involving several independent variables
1.3 Constrained minimization of functionals . . . . . . . . . .
1.3.1 Point constraints . . . . . . . . . . . . . . . . . . .
1.3.2 Differential equation constraints . . . . . . . . . . .

.
.
.
.
.
.
.

2
2
4
6
9
11
11
12

2 Variational approach for optimal control


2.1 Necessary conditions for optimal control . . . . . . . . . . . .
2.1.1 Problems with fixed final time . . . . . . . . . . . . . .
2.1.2 Problems with free final time . . . . . . . . . . . . . .

16
16
18
19

.
.
.
.
.
.
.

1
Euler-Lagrange Equation

1.1

Functionals

The calculus of variations deals with minimization or maximization of functions of functions, or functionals. A functional is a mapping or a transformation that depends on one or more functions and the values of functionals
are numbers.
Example 1.1.1 Suppose x(t) is a continuous function of t defined in the
interval [t0 , tf ] and:
J(x) =

tf

t0

x(t)dt

(1.1)

The real number assigned by the functional J is the area under the x(t) curve.

x(t)

x(t)
x1(t)

x2(t)
t

t
t0

t0

tf

tf

Figure 1.1: Area under a curve


As shown in Figure 1.1, for various functions x(t), the functional has
different real values.
2

Example 1.1.2 The length l, of an arc connecting two given points A(x0 , y0),
B(x1 , y1 ) in the xy plane as depicted in Figure 1.2 is an example of a functional. We know that the length can be calculated as, (***, 2001):
y

B(x1,y1)

A(x0,y0)
dl dy(x)
dx
x

Figure 1.2: An arc connecting two points

l = l(y(x)) =

x1

x0

dl(x) =

x1

x0

dx2

dy(x)2

x1

x0

subject to the constraints:

v
u
u
t

dy(x)
1+
dx

y(x0 ) = y0 , y(x1 ) = y1

!2

dx

(1.2)

Example 1.1.3 The Brachistochrone problem. The problem originally


gave rise to the calculus of variations (Johann Bernoulli posed it in 1696).
The term derives from the Greek brachistos the shortest and chronos
time, delay.
We wish to find the curve that minimizes the time necessary for a bead
attached to a wire to go from (0,y1 ) to (x1 ,0) under the influence of a constant
gravitational field
y

(0,y 1)

gravity

(x1, 0)

Figure 1.3: Brachistochrone problem


The time to travel from point (0,y1 ) to (x1 ,0) is:
T =

dt

(1.3)

If the length of the curve is l, and ds is an infinitely small part of the curve,
we obtain:
Z T
Z l
ds
T =
dt =
(1.4)
0
0 v

where v is the speed of the bead. Since ds = dx2 + dy 2, the equation (1.4)
is written as:
v
!2
Z x1 2
Z x1 u
Z x1 q
2
dx + dy
1u
1
dy
t
T =
=
1+
dx =
1 + y 2 dx (1.5)
v
v
dx
v
0
0
0
The speed at any point can be obtain from energy conservation, equating
kinetic energy to gravitational potential energy:

q
1 2
mv = 2gy, v = 2gy
2
The functional to be minimized then gives:

T =

x1

1 + y 2
dx =
2gy

x1

L(y, y )dx

(1.6)

(1.7)

where y = y(x).

1.2

Euler-Lagrange Equation

Problem: Suppose we are given two points (t0 , x0 ) and (tf , xf ) in the (t, x)
plane. We wish to find a curve, trajectory, joining the given points such that
the functional:
Z tf
J=
g(t, x, x)dt

t0

along this trajectory can achieve its extremal, that is maximal or minimal
value, (Kirk, 2004).
A fundamental equation of calculus of variations states that J has a
stationary value if the Euler-Lagrange equation:
g
d

x dt

g
x

=0

(1.8)

is satisfied.
The curves x = x(t) that are solutions to the Euler-Lagrange equation
are called extremals. We shall write the above equation also as:
gx

d
gx = 0
dt
4

x(t)

x=x(t)

xf
x0

x*=x*(t)
tf

t0

Figure 1.4: Trajectories between two points


Example 1.2.1 Find the extremal for the functional:
J=

/2

(x(t)

x(t) )dt =

/2

(x 2 x2 )dt

where x(0) = 0, x(/2) = 1. The Euler-Lagrange equation for the problem


takes the form:
d
2
d
gx gx =
(x x2 )
dt
x
dt
2x

2
(x x2 ) = 0
x

d
(2x)
= 2x 2
x=0
dt

or
x + x = 0
Obs. a
x + bx + cx = 0 has the characteristic equation as2 + bs + c = 0. If the
roots of the characteristic equation are real: s1,2 , the general solution is:
x(t) = c1 es1 t + c2 es2 t . If the roots of the characteristic equation are complex
s1,2 = j, the general solution is: x(t) = c1 et cos t + c2 et sin t
The characteristic equation s2 + 1 = 0 has two complex roots s1,2 = j
and the solution is:
x(t) = c1 cos t + c2 sin t
Taking into account the end-point conditions:
x(0) = c1 cos 0 + c2 sin 0 = c1 = 0
x(/2) = c1 cos /2 + c2 sin /2 = c2 = 1
Thus we have the extremal x(t) = sin t. The functional J can be minimized
or maximized only on the extremal x(t) = sin t. The extremal value of the
functional is: J (sin t) = 1 /4 = 0.214.
5

Example 1.2.2 Find the extremal for the functional


Z

J=

(x(t)
2 + 12tx(t))dt

where x(0) = 0, x(1) = 1.


The Euler-Lagrange equation for this functional is:
d
2
d
gx gx =
(x + 12tx)
dt
x
dt

or

12t

2
(x + 12tx) = 0
x

d
(2x)
= 12t 2
x=0
dt

x(t) = 6t,

x(t)

=6

t2
+ c1
2

3t3
+ c1 t + c2 = t3 + c1 t + c2
3
x(0) = c2 = 0, x(1) = 1 + c1 + c2 = 1 c1 = 0
x(t) =

The extremal has the form: x(t) = t3 .

1.2.1

Transversality conditions

Final time specified, x(tf ) free


Problem: Find a necessary condition for a function to be extremal for a
functional
Z tf
J=
g(x(t), x(t),

t)dt
t0

where t0 , x(t0 ) and tf are specified and x(tf ) is free.


The asmissible curves all begin at the same point and terminate on a
vertical line as for example in the case presented in Figure 1.5. We shall call
x=x(t)

x(t)

x0

x*=x*(t)
tf

t0

Figure 1.5: Free final state


the necessary condition:
6


g(x, x,
t)|t=tf = 0
x

(1.9)

the natural boundary condition or the first transversality condition.


Example 1.2.3 Determine the extremal for the functional
Z

J=

[x(t)
2 + 2x(t)x(t)
+ 4x(t)2 ]dt

where x(0) = 1, x(2) is free.


The Euler-Lagrange equation:
2
d
d
(x + 2xx + 4x2 )
gx gx =
dt
x
dt

2
(x + 2xx + 4x2 ) = 0
x

d
(2x + 2x) = 2x + 8x 2
x 2x = 0
dt

2x + 8x

or x 4x = 0.
The characteristic equation is s2 4 = 0 with the solutions: s1,2 = 2.
The general solution is:
x(t) = c1 e2t + c2 e2t
Evaluating the transversality condition (1.9) with t = 2:
g
|t=2 = (2x(t)
+ 2x(t))t=2 = x(2)

+ x(2) = 0
x
where
x(t) = c1 e2t + c2 e2t , x(t)

= 2c1 e2t 2c2 e2t


We obtain:

2c1 e4 2c2 e4 + c1 e4 + c2 e4 = 0, 3c1 e4 c2 e4 = 0

From x(0) = 1:

c1 e20 + c2 e20 = 1, c1 + c2 = 1

The constants c1 , c2 result:

1
3e4 + e4 1
,
c
=
2
3e4 + e4
3e4 + e4
Exercise 1.1 . Determine the smooth curve of smallest length connecting
the point x(0) = 1 to the line t = 5, (Figure 1.6).
Hint. Find the extremal for the functional:
c1 =

J(x) =

tf

t0

v
u
u
t

dx
1+
dt

!2

dt =

1 + x(t)dt

x(t)

x=x(t)

1
t

0
5

Figure 1.6: The curve connecting a point to a line


Final time free, x(tf ) specified
Problem: Find a necessary condition for a function to be extremal for a
functional
Z tf
J=
g(x(t), x(t),

t)dt
t0

where t0 , x(t0 ) = x0 and x(tf ) are specified and tf is free.


The second transversality condition that is the necessary condition needed
is:
!

g
g x
|t=tf = 0, or (g xg
x ) |t=tf = 0
x
Example 1.2.4 Find an extremal for the functional:
J=

tf

1
(2x(t) + x(t)
2 )dt
2

with x(1) = 4, x(tf ) = 4 and tf > 1 free.


d
d
gx gx = 2
dt
dt

1
(2x x 2 ) = 2 x = 0
x
2

or
x = 2
with the solution x(t)

= 2t + c1 , x(t) = t2 + c1 t + c2 .
The final time tf is unspecified so, from (1.10):
1
(g xg
x ) |t=tf = (2x(t) + x(t)
2 x(t)
x(t))

t=tf = 0
2
1
1
2x(tf ) x(t
f )2 = 0 2(t2f + c1 tf + c2 ) (2tf + c1 ) = 0
2
2
8

(1.10)

From
4t2f + 4c1 tf + 4c2 2tf c1 = 0
together with the boundary conditions:
x(1) = 1 + c1 + c2 = 4, x(tf ) = t2f + c1 tf + c2 = 4
the constants and the final time can be calculated and the extremal result as:
x(t) = t2 6t + 9, and tf = 5

1.2.2

Functionals involving several independent variables

In the n+1 dimensional space: (t, x1 , x2 , ..., xn ) the functional


J=

tf

t0

g(t, x1 , x2 , ..., xn , x 1 , x 2 , ..., x n )dt

can only be extremized on the trajectories that satisfy the n Euler-Lagrange


equations:
g
d

xi dt

g
x i

= 0, or gxi

d
gx = 0, i = 1, ..., n
dt i

Using matrix-vector notation the functional, the Euler-Lagrange equation


and the transversality conditions are stated as:
J=

tf

t0

g(x(t), x(t),
t)dt

(1.11)

(1.12)

g
d

x dt

g
x

=0

g
|t=tf = 0
x

where:

"

g
g
x

#T

(1.13)
=0

(1.14)

t=tf

x1 (t)

x = x(t) = ... , x = x(t)


=
xn (t)
9

d
x (t)
dt 1

...

d
x
(t)
n
dt

Example 1.2.5 Find an extremal for the functional


J(x =

/4

[x21 (t) + x 1 (t)x 2 (t) + x 22 (t)]dt

The functions x1 and x2 are independent and the boundary conditions are:
x1 (0) = 1; x1 (/4) = 2; x2 (0) = 3/2; x2 (/4) f ree
The Euler-Lagrange equations are:
d
d
gx 1 = 2x1 (x 2 ) = 2x1 x2 = 0
dt
dt
d
d
x1 2
x2 = 0
gx2 gx 2 = (x 1 + 2x 2 ) =
dt
dt
From (1.15): x2 (t) = 2x1 (t). By replacing in (1.16) we obtain:
g x1

(1.15)
(1.16)

x1 + 4x1 = 0
which has the solution:
x1 (t) = c1 cos 2t + c2 sin 2t
therefore
x2 (t) = 2c1 cos 2t + 2c2 sin 2t
Integrating twice yields:
c1
c2
cos 2t sin 2t + c3 t + c4
2
2
From the first transversality condition (tf is specified and x2 (tf ) is free:
x2 (t) =

g
x 2

=0
t=/4

gx 2 = x 1 + 2x 2 = 2c3 = 0, c3 = 0

From the specified boundary conditions we have:

x1 (0) = c1 1 + c2 0 = 1 c1 = 1

x2 (0) =

c1
c2
3
c1
1 0 + c3 0 + c4 = , c4 = 1.5 +
=2
2
2
2
2
x1 (/4) = c1 0 + c2 1 = 2, c2 = 2

The extremals are then:


x1 (t) = cos 2t + 2 sin 2t,

1
x2 (t) = cos 2t sin 2t + 2
2
10

1.3
1.3.1

Constrained minimization of functionals


Point constraints

Let us determine a set of necessary conditions for a function x (t) to be an


extremal for a functional of the form:
J=

tf

t0

g(x(t), x(t),
t)dt

(1.17)

where x(t) is a n 1 vector of functions, that is required to satisfy m relationships of the form:
fi (x(t), t) = 0, i = 1, 2, ..., m < n

(1.18)

which are called point constraints. Constraints of this type would be present
if, for example, the admissible trajectories were required to lie on a specified
surface in the n + 1 dimensional (x(t), t) space. The presence of these m
constraining relations means that only n m of the n components of x are
independent.
One way to attack this problem might be to solve equations (1.18) for
m of the components of x(t) in terms of the remaining n m components which can the be regarded as n m independent functions - and use these

equations to eliminate the m dependent components of x(t) and x(t)


from
J.
Unfortunately, the constraining equations are generally nonlinear algebraic equations, which may be quite difficult to solve.
As an alternative approach we can use Lagrange multipliers. The first step
is to form an augmented functional by adjoining the constraining relations
to J, which yields:
Ja (x, ) =
=

tf

t0
Z tf
t0

[g(x(t), x(t),
t) + 1 (t)f1 (x(t), t) + .... + m (t)fm (x(t), t)] dt
h

g(x(t), x(t),
t) + T (t)f(x(t), t) dt

(1.19)

Since the constraints must be satisfied for all t [t0 , tf ], the Lagrange
multipliers 1 , ..., m are assumed to be functions of time. This allows us the
flexibility of multiplying the constraining relations by a different real number
for each value of t.
If we define the augmented integrand function as:

ga (x(t), x(t),
(t), t) = g(x(t), x(t),
t) + T (t)f(x(t), t)
11

The Euler-Lagrance equation is written:


ga
d
, t)
(x, x,
x
dt

ga
, t) = 0
(x, x,
x

(1.20)

Equations (1.20) are a set of n second-order differential equations, and the


constraining relations (1.18) are a set of m algebraic equations. Together
these n + m equations constitute a set of necessary conditions for x(t) to be
an extremal.
Example 1.3.1 Find necessary conditions that must be satisfied by the curve
of smallest length which lies on the sphere x21 (t) + x22 (t) + t2 = R2 , for t
[t0 , tf ], and joins the specified points x0 , t0 and xf , tf .
The functional to be minimized is:
J(x) =

tf
t0

1 + x 21 (t) + x 22 (t)dt

The augmented integrand function is:


, t) =
ga (x, x,

1 + x 21 (t) + x 22 (t) + (t)(x21 (t) + x22 (t) + t2 R2 )

Performing the operations indicated by (1.20) gives:


ga
d

x1 dt
ga
d

x2 dt

ga
= 2x1
x 1
!
ga
= 2x2
x 2

d
[x 1 (1 + x 21 + x 22 )1/2 ] = 0
dt
d
[x 2 (1 + x 21 + x 22 )1/2 ] = 0
dt

In addition, of course, it is necessary that the constraint relation:


x21 (t) + x22 (t) + t2 = R2
is satisfied.

1.3.2

Differential equation constraints

Let us now find necessary conditions for a function x(t) to be an extremal


for the functional
Z tf

J(x) =
g(x(t), x(t),
t)dt
t0

x is a (n + m) 1 vector of functions which must satisfy the n differential


equations:

fi (x(t), x(t),
t) = 0, i = 1, 2, ..., n
12

Because of the n differential equations constraints, only m components of x


are independent. Constraints of this type may represent the state equation
constraints in optimal control problems where x corresponds to the n + m
vector [x|u]T .
As with point constraints, it is generally not feasible to eliminate n dependent functions and their derivatives from the functional J so we shall use
the method of Lagrange multipliers.
If we define the augmented integrand fuction as:

ga (x(t), x(t),
(t), t) = g(x(t), x(t),
t) + (t)T f(x(t), x(t),
t)
where (t) is a vector of n functions of time (Lagrange multipliers).
The Euler- Lagrange equation can be written:
"

ga
d ga

(x(t), x(t),
t)
(x(t), x(t),
t) = 0
x
dt x

(1.21)

and the constraints can be written in the vector form:

f(x(t), x(t),
t) = 0

(1.22)

Equations (1.21) and (1.22) compose a set of 2n+ m second-order differential


equations.
Example 1.3.2 Find the equations that must be satisfied by an extremal for
the functional
Z tf
1 2
J(x) =
[x1 (t) + x22 (t)]dt
t0 2
where x1 (t) and x2 (t) are related by:
x 1 (t) = x2 (t)
There is one constraint, so the function f in (1.22) is:

f (x(t), x(t),
t) = x2 (t) x 1 (t)
and one Lagrange multiplier is required.
The augmented function ga is:
1

ga (x(t), x(t),
t) = [x21 (t) + x22 (t)] + (x2 (t) x 1 (t))
2
From equation (1.21) we have:
"

ga
d ga
d

= x1 (t) ((t)) = x1 (t) + (t)


=0
x1 dt x 1
dt
"
#
d ga
ga

= x2 (t) + (t) = 0
x2 dt x 2
13

(1.23)
(1.24)

We need also:
x 1 (t) = x2 (t)

(1.25)

Equations (1.23),(1.24), (1.25) are necessary conditions for x (t) = [x1 (t) x2 (t)]T
to be an extremal for the functional J.
The solution of system (1.23, 1.24, 1.25) can be found as follows: from
(1.24) we have (t) = x2 (t) which, if differentiated with respect to t and
replaced in (1.23) gives: x 2 (t) = x1 (t), or (using (1.25)) x2 (t) = x2 (t).
The solution result as:
x1 (t) = C1 et C2 et , x2 (t) = C1 et + C2 et

(1.26)

For a set of initial conditions x1 (0) = x10 , x2 (0) = x20 , the constants C1
and C2 can be calculated and the solution result as:
x10 + x20 t x20 x10 t
x10 + x20 t x20 x10 t
x1 (t) =
e
e , x2 (t) =
e +
e
2
2
2
2
(1.27)
Example 1.3.3 Suppose that the system
x 1 (t) = x2 (t) x1 (t)
x 2 (t) = 2x1 (t) 3x2 (t) + u(t)
is to be controlled to minimize the performance measure
Z tf
1 2
J(x, u) =
[x1 (t) + x22 (t) + u2 (t)]dt
t0 2
Find a set of necessary conditions for optimal control.
The differential equation constraints are then:
f1 (x, u) = x2 (t) x1 (t) x 1 (t)
f2 (x, u) = 2x1 (t) 3x2 (t) + u(t) x 2 (t)
The augmented function ga :
1
ga (x, u, ) = [x21 (t) + x22 (t) + u2 (t)] + 1 (x2 (t) x1 (t) x 1 (t)) +
2
+2 (2x1 (t) 3x2 (t) + u(t) x 2 (t))
The Euler equations:
"

ga
d ga

= x1 1 22 + 1 = 0
x1 dt x 1
"
#
ga
d ga

= x2 + 1 32 + 2 = 0
x2 dt x 2
"
#
d ga
ga

= u + 2 = 0
u
dt u
14

We obtain the differential equations:


1 = x1 + 1 + 22
2 = x2 1 + 32
and the algebraic equation (since u does not appear in ga )
u + 2 = 0
The two additional equations that must be satisfied by an extremal are the
constraints:
x 1 = x2 x1
x 2 = 2x1 3x2 + u

15

2
Variational approach for optimal control

2.1

Necessary conditions for optimal control

In this section we shall apply variational methods to optimal control problems.


We consider the problem of minimizing the performance measure
J = h(x(tf ), tf ) +

tf

t0

g(x(t), u(t), t)dt

(2.1)

x(t0 ) = x0

(2.2)

subject to:
x = f(x(t), u(t), t),

The problem is to find an admissible control u (t) that causes the system
(2.2) to follow an admissible trajectory x (t) that minimizes the performance
measure (2.1).
We shall initially assume that the admissible state and control are not
bounded and that the initial conditions x(t0 ) = x0 and the initial time t0
are specified. x(t) is the n 1 state vector and u(t) is the m 1 vector of
control inputs.
In the terminology of the previous section (Euler-Lagrange equation with
differential equation constraints) we have a problem involving n+m functions
which must satisfy the n differential equation constraints. The m control
inputs are the independent functions. The only difference between (2.1) and
the functionals considered in the previous section is the term involving the
final states and final time. Assuming that h is a differentiable function we
can write:
Z tf
d
h(x(tf ), tf ) =
[h(x(t), t)]dt + h(x(t0 ), t0 )
t0 dt
16

so that the performance measure can be expressed as:


J=

tf
t0

"

d
g(x(t), u(t), t) + (h(x(t), t)) dt + h(x(t0 ), t0 )
dt

Since x0 and t0 are fixed, the minimization does not affect the h(x(t0 ), t0 )
term, so we need consider only the functional:
J(x, u) =

tf

t0

"

d
g(x(t), u(t), t) + (h(x(t), t)) dt
dt

Using the chain rule of differentiation, we find that this becomes:


J(x, u) =

tf

t0

g(x(t), u(t), t) +

"

h
(x(t), t)
x

#T

+
x(t)

h
(x(t), t) dt

Obs. The derivative of h(x(t), t) with respect to time was calculated:


h dx h
h
h
d
x +
h(x(t), t) =
+
=
dt
x dt
t
x
t

To include the differential equation constraints we form the augmented


function ga by introducing the Lagrange multipliers T (t) = [1 (t) ... n (t)]T :
"

h
ga (x, u, , t) = g(x, u, t) +
(x, t)
x

#T

x +

(x, t) + T (f(x, u, t) x)
t

The Euler-Lagrange equations are:


ga
d

x
dt
ga
d

u
dt
ga
d

x
dt

ga
x

=
=
=
=

ga
=0
x
!
ga
=0
u

"

h
h
d h
(
g+
x +
+ T (f x)
) =
x
x
t
dt x
!
!

h
h
d h
T

(g + f ) + +
x +

=
x
x x
t
dt x

2h
2h
2 h x
2h
(g + T f ) + + 2 x +
2

x
x
xt x t
xt

(g + T f ) + = 0
(2.3)
x
17

ga
d

u
dt

ga
u

ga

=
(g + T f )
u
u

(2.4)

In the following we shall find it convenient to use the function H called


the hamiltonian, defined as:
H(x(t), u(t), (t), t) = g(x(t), u(t), t) + T (t)f (x(t), u(t), t) = g + T f
Using this notation, from (2.3) and (2.4) we can write the necessary conditions as follows:
H
=
(x(t), u(t), (t), t)
x
H
0=
(x(t), u(t), (t), t)
u

(2.5)
(2.6)

together with the equations (2.2), which are constraints for the optimal control problem:
x = f(x(t), u(t), t)
The differential equation (2.5) is called the costate equation and (t) is
the costate vector.

2.1.1

Problems with fixed final time

If the final time tf is specified, the final state x(tf ) may be free or specified.
Case I Final state specified.
x(tf ) = xf
are n relations which are boundary conditions for differential equations
(2.5) and (2.2). Together with the initial conditions x(t0 ) = x0 will
ensure a unique solution of the system of differential equations
Case II Final state free. The final condition can be calculated from the first
transversality condition:
ga
(x(t), u(t), (t), t)
x

t=tf

Thus:
(tf ) =

h
(x(tf ), tf ) (tf ) = 0
x

h
(x(tf ), tf )
x

18

(2.7)

2.1.2

Problems with free final time

Case I Final state x(tf ) = xf fixed, tf free. The second transversality


condition calculated for ga is:
ga
ga x
x
"

=0

t=tf

h
h
h
x
g+
x +
+ T (f x)

x
t
t

!#

t=tf

h
= g+ f +
t
T

=0
t=tf

The 2n + 1 relationship is:


H(x(tf ), u(tf ), (tf ), tf ) +

h
(x(tf ), tf ) = 0
t

Case II Final state free. The two boundary conditions are derived from the
two transversality conditions:
(tf ) =
H(x(tf ), u(tf ), (tf ), tf ) +

h
(x(tf ), tf )
x

h
(x(tf ), tf ) = 0
t

Example 2.1.1 The system


x 1 (t) = x2 (t)
x 2 (t) = x2 (t) + u(t)
is to be controlled so that its control effort is conserved; that is the performance measure
Z tf
1 2
J(u) =
u (t)dt
t0 2
is to be minimized. The admissible states and controls are not bounded. Find
necessary conditions that must be satisfied for optimal control.
The first step is to form the hamiltonian
1
H(x, u, ) = u2 (t) + 1 (t)x2 (t) + 2 (t)(x2 (t) + u(t))
2
From equations (2.5) and (2.6) the necessary conditions for optimality are:
H
1 (t) =
=0
x1
H
2 (t) =
= 1 (t) + 2 (t)
x2
19

(2.8)

and

H
= u(t) + 2 (t)
(2.9)
u
If (2.9) is solved for u (t) and substituted into the state equations, we have
0=

u (t) = 2 (t)
x 1 (t) = x2 (t)
x 2 (t) = x2 (t) 2 (t)

(2.10)

Equations (2.10) and (2.8) are a set of 4 first-order constant-coefficient differential equations. From (2.8):
1 (t) = c1 ;

2 (t) = c1 + 2 (t) 2 (t) = c2 et + c1


u (t) = c2 et c1

x 1 = x2
x 2 = x2 2 = x2 c2 et c1 ; x2 = c3 et + c4 et ;
The constant c4 from the particular solution of x2 is calculated by replacing
the general solution into the equation
c2 c1
c3 et + c4 et + c3 et + c4 et = c2 et c1 c4 = et
2
2
The general solution of the state equation result:
c2
c1
x2 (t) = c3 et et
2
2
c1
c2
x1 (t) = c3 et et t + c4
2
2
Suppose the initial and final states are specified:
x(0) = [0 0]T ; x(2) = [5 2]T
We calculate the constants from:
c2
x1 (0) = c3 + c4 = 0
2
c2 c1
x2 (0) = c3
=0
2
2
c2
x1 (2) = c3 e2 e2 c1 + c4 = 5
2
c2 2 c1
2
x2 (2) = c3 e e
2
2
20

Example 2.1.2 For the system


x 1 (t) = x2 (t)
x 2 (t) = x2 (t) + u(t)
find the necessary conditions for an optimal control u (t) that minimizes the
performance measure:
1
1
1
J(u) = [x1 (2) 5]2 + [x2 (2) 2]2 +
2
2
2

u2 (t)dt

The initial conditions are x(0) = 0, and x(2) are unspecified. The hamiltonian is:
1
H(x, u, ) = u2 (t) + 1 (t)x2 (t) + 2 (t)(x2 (t) + u(t))
2
H
= u + 2 = 0 u (t) = 2 (t)
u
The costate equations:
H
1 (t) =
=0
x1
H
1 (t) =
= 1 (t) + 2 (t)
x2
have the final conditions calculated from (2.7):
h
|t=t =2 = x1 (2) 5 = 1 (2)
x1 f
h
2 (tf ) =
|t=t =2 = x2 (2) 2 = 2 (2)
x2 f
1 (tf ) =

Comparing to the previous example, the modified performance measure affects


only the boundary conditions at t = 2. The general results obtained in the
previous example are valid here too. Only the constants will result different.

21

Bibliography

*** (2001). Optimal control. online, Purdue University.


Kirk, D. E. (2004). Optimal Control Theory. An Introduction. Dover Publications, Inc.

22

Das könnte Ihnen auch gefallen