Docsity

Alternative End Point Restrictions and Dynamic Programming in Optimal Control Theory, Study notes of Agricultural engineering

Toggle sidebar
bg1
Lecture XXIV
Alternative End Point Restrictions and Dynamic Programming
I. The Salvage Value Problem
A. The problem involves a value to be assigned to a state variable at the end of the
planning horizon.
B. Mathematically,
max ( , , ) ( ( ))
’( ) ( , , )
() ,,
()
f txudt xt
st x t g t x u
xt x t t
xt
t
t
0
1
1
0 012
1
∫+
=
=
φ
fixed
free
1. The standard control formulation becomes
[]
Jfgxdttxt xt
t
t
t
t
=++ − +
∫
λλ λ φ’()()(())
0
1
0
1
1
2. Hypothesizing alternative paths
[]
ut u t aht
yta gtxudt
Ja f tyta u t aht t gt yta u t aht tyta dt
tyta tyta yta
t
t
t
t
() () ()
(, ) (, , )
( ) (, (, ), () ()) () (, (, ), () ()) ’() (, )
()(,) ()(,) ((,))
*
**
=+
=
=++ ++−
++
∫
∫
0
1
0
1
11 00 1
λλ
λλφ
taking the derivative with respect to a and letting a go to zero yields:
()()
[]
Jfgytafghtdt
tyta ytayta
xx a uu
t
t
aa
’( ) ’ ( , ) ( )
() (,) ’((,)) (,)
0
0
1
11 1 1
=++ ++ −
+
∫
λλ λ
λφ
which yields the traditional optimality conditions plus
[]
−+ =⇒=λφ λφ() ’(()) (,) () ’(())txtyta t xt
a111 1 1
0
II. Fixed Endpoint Problems
A. Suppose both the initial and terminal points are fixed (as in the first formulation
of the calculus of variations problem):
max ( , , )
’( ) ( , , )
()
()
,
ftxudt
st x t g t x u
xt x
xt x
tt
t
t
0
1
00
11
01
∫
=
=
=
free
pf3
pf4
pf5

Partial preview of the text

Download Alternative End Point Restrictions and Dynamic Programming in Optimal Control Theory and more Study notes Agricultural engineering in PDF only on Docsity!

Lecture XXIV

Alternative End Point Restrictions and Dynamic Programming

I. The Salvage Value Problem A. The problem involves a value to be assigned to a state variable at the end of the planning horizon. B. Mathematically,

max ( , , ) ( ( ))

’( ) ( , , ) ( ) , , ( )

f t x u dt x t

st x t g t x u x t x t t x t

t

t

0

1 1

0 0 1 2 1

φ

fixed free

  1. The standard control formulation becomes

J [ f g x dt ] t x t x t

t

t t = + + − t +

∫ λ^ λ^ ’^ λ^ ( ) ( )^ φ( (^ ))

0

1 0

1 1

  1. Hypothesizing alternative paths

[ ]

u t u t a h t

y t a g t x u dt

J a f t y t a u t a h t t g t y t a u t a h t t y t a dt

t y t a t y t a y t a

t

t

t

t

0

1

0

1

1 1 0 0 1

λ λ

λ λ φ taking the derivative with respect to a and letting a go to zero yields:

J [ ( f g ) y t a ( f g ) h t ] dt

t y t a y t a y t a

x x a u u t

t

a a

0

1

1 1 1 1

∫ λ^ λ^ λ

λ φ which yields the traditional optimality conditions plus

[ −^ λ^ (^ t^ 1 )^ +^ φ^ ’( ( x t^^ 1 ))^ ] y^ a (^ t^ 1 ,^ a )^^ =^0 ⇒^ λ^ (^ t^ 1 )^ =φ’( ( x t^1 ))

II. Fixed Endpoint Problems A. Suppose both the initial and terminal points are fixed (as in the first formulation of the calculus of variations problem):

max ( , , )

’( ) ( , , ) ( ) ( ) ,

f t x u dt

st x t g t x u x t x x t x t t

t

t

0

1

0 0 1 1 0 1

free

  1. Let u ^ be the optimal control function and x^ be the corresponding state function. Let u denote another feasible function satisfying the equation of motion and terminal conditions:

J J J [ f t x u g t x u x f t x u g t x u x ] dt

t

t

− *^ = ∆ = ∫ ( , , ) + λ ( , , ) + λ ’ − ( , *^ , *^ ) − λ ( , *^ , *^ ) −λ’ *

0

1

using a Taylor series expansion

∆ J [ ( f x g x )( x x ) ( f u g u )( u u )] dt h o t

t

t

= ∫ + λ + λ ’ − *^ + + λ − * +...

0

1

Labeling δx=x-x*^ and δu=u-u *^ as perturbations:

δ J [ ( f x λ g x λ )δ x ( f u λ g u )δ u dt ]

t

t

0

1

  1. Similar to before, the optimal path must satisfy f (^) x + λ g (^) x + λ ’= 0 for any δx. The difference is that δu must now be chosen to satisfy the terminal conditions at both sides. Kamien and Schwartz show in an appendix that if there is a feasible control u that forces the state from x(t 0 )=x 0 to x(t 1 )=x 1 , then the coefficient on δu must be zero f (^) u + λ g (^) u = 0 when λ obeys λ’=-[fx+λgx].
  2. Our inventory problem then becomes:

min [ ( ) ( )]

c u t c x t dt

st x t u t x x T B u t

T 1 2 2 0

0 0

The Hamiltonian then becomes: H t x u ( , , , λ ) = c u t 1 ( ) 2 + c x t 2 ( ) +λ( ) ( ) t u t Deriving the costate condition: − = − = ⇒ = − +

λ λ

H

x c^^2 t^ t^ c t^2^ d^1

Using this result in the optimality condition: ∂ ∂ λ

H

u c u t^ t^ c u t^ c t^ d

u t c c

t d c

1 1 2 1

2 1

1 1

Lastly, using the equation of motion:

K x ( (^) s + 1 ,..., x (^) n , ) t ≥ 0 B. Solution of the general problem:

J [ f ( g x )] dt t x t

t

t

0

1 1 1 Integrating by parts

J [ f g x dt ] t x t t x t t x t

t

t

0

1 1 1 0 0 1 1 Assuming an optimal path x, u, and the optimal functions J, f, g, and φ. Let x and u be feasible paths satisfying the constraints t 0 <t<t 1 +δt 1 with values J, f, g, and φ. Assuming the same λ:

[ ]

[ ]

J J f g x f g x dt

t x t x t f t x u dt

t

t

t

t t


λ λ λ λ φ φ

λ

δ

0

1

1

1 1 1 1 1 Applying a Taylor expansion:

δ [ ( λ λ ) ( λ )δ ] φ δ φ δ

λ δ

δ δ δ δ δ δ δ

J f g h f g u dt x t

t h t f t x u t h x x u u u x x t t x t h t x t x t x x t t x g t x u t

x x u u t

t x t

i i i i i i


0

1 1 1

1 1 1 1

1 1 1 1 1 1 1 1 1 1 1 1 1 Collecting terms:

[^ ( )^ (^ ) ] [ ]

[ ]

δ λ λ λ δ φ λ δ

λ φ δ

J f g h f g u dt t x

f g t

x x u u t

t x

t (^) t

∫ ’^ (^ )

0

1

1

1 1

1 0 which implies:

  1. Our standard optimality conditions a. The costate or multiplier condition

λ ’= − ( f x +λ gx )

or in scalar form:

λ

λ

i i j ∂

j j i

f M x

g x

’= − + i ,... n

=

1

b. The optimality condition f (^) u + λ gu = 0 or in scalar form:

∂ λ^

f u

g j k u^ j^ m

k k j

n

  • = = =

∑ 1

c. The equations of motion

  1. The difference is the terminal conditions: (φ λ δ) ( λ φ ) δ

∂ φ ∂

λ δ λ ∂ φ ∂

δ

x t (^) t

i i i^ i

n j j^ j

m

t

x f g t

x

x f g t

t

= =

∑ ∑

1 1

1 1 1 1

1

1

, or

C. Terminal Conditions:

  1. xi (t 1 )=xi1 fixed. This is a lack of choice covered in this lecture. The initial and terminal conditions are completely specified.
  2. xi (t 1 ) free becomes the standard terminal condition: λ

∂ φ i ( t^^ 1 )^ =^ ∂ xi i^ =^ q^ +^1 ,... r

  1. xi (t 1 )>=0 then yields complimentary slackness conditions along the lines of inequality constrained problems in static optimization: x t t

x t t x

i r s

i i

i i i

1 1

1 1

 =^ =^ +

λ

λ

∂ φ ∂

  1. Now for the terrible part: K(.)>=0 implies a relationship between variables. a. The simple case K>- then λ

∂ φ ∂

λ φ

i i

i i^ i

n t

t x

f g i s n

1

1

=

∑ In this case there is no complementary slackness condition i.e. k=0 -> dk=0 also must be considered. b. If K=0 is possible, we have to consider the interactions that leave K unchanged i. The change in K: d K

K

x x^

K

i i i t^ t

n = + ≥ =

∑

∂ δ^

1 ∂^1 δ^1 ii. Farkas’s Lemma: Let q=(q 1 ,…qn) and x=(x 1 ,…xn) be n dimensional vectors and A denote a m*n matrix

A

a a

a a

n

m mn

11 1

1

L M O M L

J t x f t x u dt x T T

st x g t x u x t J T x T x T T

u

T ( , ) max ( , , ) ( ( ), )

’ ( , , ) ( ) ( , ( )) ( ( ), )

0 0 0 0

∫ φ

φ

  1. Breaking up the integral

J t x (^) u f dt f dt t

t t

t t

T ( 0 , 0 ) max 0

0

0

∫ ∫

∆

∆

φ

The argument then becomes that u(t) over t 0 +∆t<t<=T should be optimal for the beginning portion of the problem. In addition x(t 0 +∆t)=x 0 +∆x. x 0 +∆x depends both on the initial x 0 and on u(t) by ∆x. Hence

J t x f dt f dt

f dt J t t x x

t t ut t t

t t

t ut t T t^ t

T

t t ut t t

t t

( , ) max max

max ( , )

0 0

0 0

0 0 0

0

0 0

0 0 0

0

≤ ≤ +

  • ≤ ≤ +

≤ ≤ +

∫ ∫

∫

∆

∆

∆ ∆

∆

∆ ∆ ∆

φ

a. Approximating

f dt f t x u t t

t t

0

0 0 0

∫ ≈

∆ ( , , )∆

b. Expanding J t ( (^) 0 + ∆ t x , (^) 0 + ∆ x ) = J t ( (^) 0 , x (^) 0 ) + J (^) t ( t (^) 0 , x (^) 0 ) ∆ t + J (^) x ( t (^) 0 , x (^) 0 ) ∆ x + h o t.. Substituting all the above into the maximization: J t ( (^) 0 , x (^) 0 ) = max u (^) [ f ( , t x u , ) + J (^) t ( , t x ) + J (^) x ( t (^) 0 , x (^) 0 ) ∆ t + J (^) x ( t (^) 0 , x (^) 0 ) ∆ x + h o t.. .]

Subtracting J(t 0 ,x 0 ) from each side and dividing by∆t

0 = + + 0 0

max u f ( , t x u , ) J (^) t ( , t x ) J (^) x ( t , x ) 

x t

Letting the ∆t go to zero, the last term in brackets becomes x’(t) and hence we can substitute the equation of motion yielding the optimization rule: − J (^) t ( , t x ) = max u (^) [ f ( , t x u , ) + J (^) x ( , t x g t x u ) ( , , )]