Download Part 6

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Part 7 Optimization in
Functional Space
7.0 Motivation Example
Maximizing Yield of Batch Reaction
Consider the following reactions
A BC
D
The rate equation for each species can be expressed as
dC A
dCB
2
 k1C 1.5

k
C
;
r

 k1C 1.5
A
2 A
B
A  k3C B ;
dt
dt
dCC
dCD
2
rC 
 k3CB ; rD 
 k3C A
dt
dt
11600 
29600 


where, k1  exp 17.2 
;
k

exp
41.9

 2

;
RT 
RT 


20000 

k3  exp  30.5 
 ; R  1.987.
RT 

rA 
Maximizing Yield of Batch Reaction
If the above reactions are to be carried out in a batch reactor
for 1000 minutes and the initial conentrations of the four components
are: C A  0   1.0 mole/liter and CB  0   CC  0   CD  0   0, determine
the temperature profile T (t ) for 0  t  1000 that maximizes the
yield of reactant B, i.e.,
CB 1000 
max
T  t  1.0  C 1000 
A
0t 1000
Note that it can be assumed that the volume of reaction mixture
remains unchanged.
Part 7 Optimization in
Functional Space
7.1 Calculus of Variation
Objective Functions
Lagrange Form
J1  x  t       x  t  , x  t  , t dt
t0
tf
Bolza Form
J 2  x  t      x  t f  , t f      x  t  , x  t  , t dt
t0
tf
Mayer Form
J 3  x  t      x  t f  , t f 
Equivalence of Lagrange and
Bolza Forms
Let
   
  x  t0  , t0   0
J 2    x  t f  , t f     dt    dt
t0
t0
tf
    x  t  , x  t  , t  dt  J1
t0
tf
tf
Equivalence of Bolza and
Mayer
Forms
Let
u  t     x  t  , x  t  , t  

u  t0   0

u  t f     dt
If   x  t f  , t f     x  t f  , t f   u  t f
then
tf
t0

J 2  x  t      x  t f  , t f   u  t f   u  t f
   x  t f  , t f   J 3  x  t  

Example
 /2
min
x ( t ),0 t  / 2
I

0

 dx  2
2
   x  2tx dt

 dt 
s.t.
 
x  0  x    0
2
Problem Statement
Consider
min I   F  t , x, x dt
b
a
s.t.
x( a )  A
x(b)  B
Assume that F  t , x, x  has continuous 2nd-order derivatives
wrt its three arguments and x(t ) possesses two derivatives
everywhere in (a, b).
Intuitive Interpretation
Let’s visualize a competition, to which only
functions which have 2 derivatives in (a,b) and
which take on the prescribed end values are
permissible. Let’s further assume that there
exists a x*(t) such that I is the smallest.
Variation
Let's consider a family of admissible functions, i.e.,
x  t   x*  t     t 
where,   t  is any arbitrarily chosen twice-differentiable
function which vanishes at the end points of the interval
(a, b), i.e.
  a    b  0
The increment   t  , representing the difference between the
varied function and the optimal function, is often called
the variation of x* (t ).
Necessary Condition
For a specific   t  ,
I  I      F  t , x*   , x*   dt
b
dI   
d

b
a
a
b  F x
I x I x
F x 


 

dt
a
x  x 
 x  x  
 F  t , x*   , x*   
F  t , x*   , x*    


 dt
*
*
  x   
  x   


dI   
d   0
*
*
*
*



F
t
,
x
,
x

F
t
,
x
,
x
b




0 

 dt
*
*
a
x
x


Integration by Parts - 2nd Term

b
a
F
  t  dt
*
x
u
dv
t b
b d  F 
 F

  *   t   
  t  dt


*
 x
 t  a a dt  x 
b d  F 
 
  t  dt


*
a dt x


Euler-Lagrange Equation
 d  F  F 
    *   *   t  dt  0
a dt x
 x 
 
Since this equation is valid for arbitrary   t  as long as
b
it is twice-differentable and   a     b   0.
d  F  F
 
0

dt  x  x
(Euler-Lagrange equation)
It is the necessary condition for the extremal solution x*  t  .
Example
min I  
xt 
 /2
0
F  t , x, x  dt
 dx 
 
F     x 2  2tx; x  0   x    0
 dt 
2
d  F  F d
  2 x    2t  2 x 


dt  x  x dt
 2 x  2 x  2t  0  x  x  t  0
2
 x  c1 cos t  c2 sin t  t
x  0   0  c1 ;
 x t   

2

 
x    0  c2 
2
2
sin t  t  I min  

2 
1  
2  12 
Transversality Conditions
In the previous development, the values of the
dependent variable, x(t ), are fixed at end points.
If this is not given, then
F
 t   0
x
for t  a and b.
Transversality Conditions
This equation must be examined in conjunction with
the given boundary conditions:
(1) x  a   given
x(b)  free
(2) x  a   free
x(b)  given
(3) x  a   free
x(b)  free
 a  0
F
x
0
t b
F
x
0
t a
 b  0
F
x
F
x
0
t a
0
t b
Example 1
Find the curve with minimum arc length between
the point x(0)  1 and the line t  2.
min I  
x (t )
0t  2
2
0
s.t.
x(0)  1
x(2)  free
1  x 2 dt
Solution of Example 1
1
d  F  F
2 2
 0 and F  1  x  ,
From Euler-Lagrange equation 

dt  x  x
x
d  x 
2
 const  x  const
x

const


0



2
2
dt  1  x 
1 x
 x  c1t  c2
From transversality conditions:
x  0   1  c2  1
F
x

t 2
x
1 x
2
 0  x  2   c1  0
t 2
 x  t   1 for 0  t  2
Example 2
1 2

min I    x  xx  x  x dt
0
2

x(0)  free
2
x(2)  free
Solution of Example 2
1 2
F  x  xx  x  x
2
d  F  F d
  x  x  1   x  1  x  1  0


dt  x  x dt
t2
 x  t    c1t  c2
2
F
Transversality conditions:
 x  x  1  0 at t  0, 2
x
 t2

 t  c1     c1t  c2   1  0 at t  0, 2
2

 c1  2, c2  1
t2
 x  t    2t  1
2
for 0  t  2
Dependent Boundary Conditions
If
G  x  a  , x b   0
G  x*  a     a  , x*  b     b    0
then
dG
0
d
G  x*  a     a  , x*  b     b  
 G     0 and
dG

d
  x  a     a  
*
 a 
G  x*  a     a  , x*  b     b  
G  x  a  , x  b  
G  x  a  , x  b  
dG

 a 
 b
d   0
  x  a 
  x b 

 a

 b
G  x  a  , x  b  
  x b
G  x  a  , x  b  
  x  a 
r
  x  b     b  
*
 b
Dependent Boundary Conditions
From the previous derivation, it is required that
F
F
 t  
x
x
a
b
F
 b 
x
t b
 a  0
t a
 F
   a   F 
 b 
  

0
 x t b    b   x t a 
Since   b  can be chosen arbitrarily,

 0  x(a )

t a
x(b)

G  x(a ), x(b)   0 
F
x
F
r
x
t b
Unspecified Terminal Time
We now consider a generalized problem where
the final time is defined as the first time after
the initial time t0 that the state trajectory is a
member of a target set or terminal manifold.
Problem Definition
min I     x, x, t dt
tf
t0
t0  given
x  t0   may or may not be given
t f  unspecified
x t f   C t f

Variations of Optimal Trajectory
and Terminal Time
Consider a family of curves
x  t   x*  t     t 
Since the terminal time is unspecified, it must be
treated as a variable. Thus,
t f  t *f    t *f 
Necessary Conditions
I 
 
t *f  t *f
t0
  x*  t     t  , x*  t     t  , t  dt
t *f   t *f  
dI

 
*
*
*
   t f   x  t f     t f  , x  t     t f  , t f  

t


t
dt






t
0
d
x
x 


dI
d


  t  x t
*
f
 0

  t  x t
*
f
*
*
f
*
*
f
 , x t  , t   
*
 , x t  , t 
*
*
f
*
f
*
f
*
f
t *f
t0

 t  *
x
t *f
t0

 


t


t
dt





x*
x* 
  d  
   t   * 
dt
*
t0

x
dt

x


t *f
t *f
 * 

 *
  d  
*
*
*
*
*
*
   t f   x  t f  , x  t f  , t f    t f  *  t f      t0  *  t0      t   * 
dt
*
t
0
x
x


 x dt x 


0
0
0
0
Terminal Constraint
x  t f   x*  t f     t f   C  t f
 x*

t   t     t   t    C t
*
f
*
f
*
f
*
f
LHS
*
f
   t *f 

RHS
d

LHS t f
LHS
LHS 
LHS 
  t *f    t *f  
  t *f 
d

t f 
t f

d
LHS
   t *f   x*  t *f    t *f 
d
 0
d
dC dt f
RHS 
 C  t f    t *f 
d
dt f d 
d
RHS
 C  t *f    t *f 
d
 0
   t *f     t *f  C  t f   x*  t *f  

Necessary Conditions
 d 
(1)

0
*
*
x dt x

(2)   t0  *  t0   0
x

(3)   t   x  t
*
f
*
*
f
t0  t  t f
 , x t  , t 
*
*
f
*
f
 *
 t  * t f 
x
*
f
 * 

*
*
*
*
*
*
*


   t   x  t f  , x  t f  , t f  C  t f   x  t f   *  t f  
x


0
*
f


Example
I 
tf
0
1
2 2
1  x  dt
x 0  1
x t f   2  t f
Example
From Euler-Lagrange equation
x  at  b
x  0  1 b  1
1  x  x


t  tf  C  x
  0 
 1  x2  0
x
1  x2

 x 1

a  1  x  t 1
x t f   t f  1  2  t f
1
t f 
2
Vector Formulation
 d 

0
x j dt x j
j  1, 2,
,n

 j  t0 
 t0   0

x j
j 1
n

 j t f 
tf   0


x j
j 1
n
Example
J     x, x, t dt f
tf
t0
where
x   x1 , x2 
T
x  t0   x 0
x t f   x t f   1
2
1
2
2
when t  t f
x
*
1
 1    x  2   1  x1*  t f 1  t f   x2*  t f 2  t f   0
2
*
2
2
  x2  


  x2  
1 
2 
2  0  2  

  2  

x1
x2
x1  x1  x2
 x1 x1 x2 
 x2 


 0
 x1 x1 x2
 x1  t f  , x2  t f 
x12  x22  1 